/* Proyección clara · pantalla completa */
body.projection {
  --p-bg: #eef3f8;
  --p-card: #ffffff;
  --p-ink: #0f172a;
  --p-muted: #64748b;
  --p-line: #dbe4ef;
  --p-orange: #f59e0b;
  --p-orange-2: #ea580c;
  --p-teal: #0d9488;
  --p-teal-2: #0891b2;
  height: 100vh;
  overflow: hidden;
  background: var(--p-bg);
  color: var(--p-ink);
  font-family: var(--font);
}

body.projection .projection-bg {
  background:
    radial-gradient(900px 520px at 8% 0%, rgba(245, 158, 11, 0.18), transparent 62%),
    radial-gradient(900px 560px at 100% 8%, rgba(13, 148, 136, 0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(8, 145, 178, 0.1), transparent 60%),
    var(--p-bg);
  pointer-events: none;
}

body.projection .projection-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.2vw;
  height: 10vh;
  padding: 0 2vw;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--p-line);
  backdrop-filter: blur(18px);
}
body.projection .projection-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--p-orange), var(--p-teal), var(--p-orange-2), var(--p-teal-2), var(--p-orange));
  background-size: 250% 100%;
  animation: projFlow 12s linear infinite;
}
@keyframes projFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}

.proj-brand { display: flex; align-items: center; gap: 0.8vw; flex: none; }
body.projection .proj-logo {
  height: 6.2vh;
  max-height: 72px;
  width: auto;
  background: #fff;
  padding: 0.35vh 0.7vh;
  border-radius: 0.9vh;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
body.projection .proj-logo.pp { height: 5.4vh; }

body.projection .proj-title { flex: 1; text-align: center; min-width: 0; }
body.projection .proj-title .proj-live { margin-bottom: 0.5vh; }
body.projection .proj-title h1 {
  font-family: var(--display);
  font-size: 3.3vw;
  line-height: 1;
  letter-spacing: 0.02vw;
  text-transform: uppercase;
  color: var(--p-ink);
  margin: 0.2vh 0;
}
body.projection .proj-title p {
  font-size: 0.72vw;
  letter-spacing: 0.12vw;
  color: var(--p-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.proj-head-right { text-align: right; flex: none; }
body.projection .proj-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35vw;
  padding: 0.35vh 0.7vw;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.25);
  color: #15803d;
  font-size: 0.58vw;
  font-weight: 800;
  letter-spacing: 0.12vw;
}
body.projection .proj-live i {
  width: 0.4vw;
  height: 0.4vw;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse 1.6s infinite;
}
body.projection .proj-clock {
  font-family: var(--display);
  font-size: 2.5vw;
  line-height: 1;
  color: var(--p-ink);
  font-variant-numeric: tabular-nums;
  margin-top: 0.2vh;
}
body.projection .proj-clock-label {
  font-size: 0.48vw;
  font-weight: 800;
  letter-spacing: 0.18vw;
  color: var(--p-muted);
  margin-top: 0.35vh;
}

body.projection .projection-main {
  position: relative;
  z-index: 1;
  height: calc(100vh - 10vh - 1.8vh);
  padding: 1.3vh 2vw 0.8vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1.2vh;
}

.proj-hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.2vw;
  min-height: 0;
}

body.projection .proj-total-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6vh 1.8vw;
  border-radius: 1.1vw;
  border: 1px solid var(--p-line);
  background: var(--p-card);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
body.projection .proj-total-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0.55vh;
  background: linear-gradient(90deg, var(--p-orange), var(--p-orange-2));
}
body.projection .proj-total-card::after {
  content: "";
  position: absolute;
  right: -6vw;
  top: -8vh;
  width: 22vw;
  height: 22vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.14), transparent 62%);
  pointer-events: none;
}
body.projection .proj-kicker {
  font-size: 0.62vw;
  font-weight: 800;
  letter-spacing: 0.28vw;
  color: var(--p-orange-2);
  text-transform: uppercase;
}
body.projection .proj-number {
  font-family: var(--display);
  font-size: 9.4vw;
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.1vw;
  color: var(--p-ink);
  background: none;
  -webkit-text-fill-color: initial;
  font-variant-numeric: tabular-nums;
  margin: 0.6vh 0;
}
body.projection .proj-total-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1vw;
  font-size: 0.58vw;
  color: var(--p-muted);
}

.proj-turnout { margin-top: 0.8vh; }
.proj-turnout-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.45vh;
}
.proj-turnout-head span {
  font-size: 0.56vw;
  font-weight: 800;
  letter-spacing: 0.2vw;
  color: var(--p-muted);
}
.proj-turnout-head strong {
  font-family: var(--display);
  font-size: 1.55vw;
  line-height: 1;
  color: var(--p-teal);
  font-variant-numeric: tabular-nums;
}
.proj-turnout-track {
  height: 1.4vh;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}
.proj-turnout-track > div {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--p-teal), var(--p-orange));
  transition: width 0.8s ease;
}
.proj-turnout-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4vh;
  font-size: 0.5vw;
  color: #94a3b8;
}

.proj-stats {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1vh;
  min-height: 0;
}
body.projection .proj-stat-card {
  display: flex;
  align-items: center;
  gap: 1vw;
  padding: 1.2vh 1.2vw;
  border-radius: 1vw;
  border: 1px solid var(--p-line);
  background: var(--p-card);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
body.projection .proj-stat-card.accent {
  background: linear-gradient(135deg, #fff7ed, #ffffff 70%);
  border-color: rgba(245, 158, 11, 0.35);
}
.proj-stat-card .stat-icon {
  display: grid;
  place-items: center;
  width: 3.2vw;
  height: 3.2vw;
  flex: none;
  border-radius: 0.8vw;
  background: #f1f5f9;
  font-size: 1.4vw;
}
body.projection .proj-stat-card.accent .stat-icon { background: #ffedd5; }
.proj-stat-card > div:last-child { min-width: 0; }
body.projection .proj-stat-card span {
  display: block;
  font-size: 0.52vw;
  font-weight: 800;
  letter-spacing: 0.16vw;
  color: var(--p-muted);
  text-transform: uppercase;
}
body.projection .proj-stat-card strong {
  display: block;
  font-family: var(--display);
  font-size: 2.55vw;
  font-weight: 700;
  line-height: 1;
  color: var(--p-ink);
  font-variant-numeric: tabular-nums;
}
body.projection .proj-stat-card small {
  display: block;
  font-size: 0.52vw;
  color: var(--p-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.projection .proj-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2vw;
  min-height: 0;
}
body.projection .proj-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.2vh 1.4vw 1.4vh;
  border-radius: 1.1vw;
  border: 1px solid var(--p-line);
  background: var(--p-card);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}
body.projection .proj-block.general { border-top: 0.5vh solid var(--p-orange); background: linear-gradient(180deg, #fffaf0, #ffffff 24%); }
body.projection .proj-block.joven { border-top: 0.5vh solid var(--p-teal); background: linear-gradient(180deg, #effcf9, #ffffff 24%); }

body.projection .block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1vw;
  margin-bottom: 0.2vh;
}
body.projection .block-brand {
  display: flex;
  align-items: center;
  gap: 0.55vw;
  font-size: 0.78vw;
  font-weight: 800;
  letter-spacing: 0.18vw;
  color: var(--p-ink);
  text-transform: uppercase;
}
body.projection .block-logo {
  height: 2.3vw;
  max-height: 40px;
  width: auto;
  background: #fff;
  padding: 0.1vw 0.3vw;
  border-radius: 0.35vw;
}
.block-dot {
  width: 0.55vw;
  height: 0.55vw;
  border-radius: 50%;
  display: inline-block;
}
.block-dot.general { background: var(--p-orange); }
body.projection .block-total { text-align: right; }
body.projection .block-total b {
  display: block;
  font-family: var(--display);
  font-size: 3.6vw;
  line-height: 0.9;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--p-ink);
}
body.projection .proj-block.general .block-total b { color: var(--p-orange-2); }
body.projection .proj-block.joven .block-total b { color: var(--p-teal); }
body.projection .block-total span {
  font-size: 0.5vw;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.06vw;
}
body.projection .block-sub {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.7vh;
  margin-bottom: 0.7vh;
  border-bottom: 1px dashed var(--p-line);
  font-size: 0.55vw;
  color: var(--p-muted);
}

body.projection .proj-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7vh;
  min-height: 0;
  overflow: hidden;
}
body.projection .proj-bar {
  display: grid;
  grid-template-columns: 1.6vw 1fr 4.2vw;
  gap: 0.65vw;
  align-items: center;
}
body.projection .rank {
  display: grid;
  place-items: center;
  width: 1.45vw;
  height: 1.45vw;
  border-radius: 0.35vw;
  background: #f1f5f9;
  color: var(--p-muted);
  font-size: 0.6vw;
  font-weight: 800;
}
body.projection .proj-block.general .rank { background: #fff1d6; color: #b45309; }
body.projection .proj-block.joven .rank { background: #d9f7f2; color: #0f766e; }
body.projection .bar-main { min-width: 0; }
body.projection .bar-caption {
  display: flex;
  align-items: baseline;
  gap: 0.55vw;
  margin-bottom: 0.25vh;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.projection .bar-caption b { font-size: 0.62vw; font-weight: 700; color: var(--p-ink); }
body.projection .bar-caption small {
  font-size: 0.5vw;
  color: var(--p-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
body.projection .track {
  height: 0.95vh;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
body.projection .fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}
body.projection .fill.general { background: linear-gradient(90deg, #fbbf24, var(--p-orange-2)); }
body.projection .fill.joven { background: linear-gradient(90deg, #2dd4bf, var(--p-teal-2)); }
body.projection .bar-number {
  font-family: var(--display);
  font-size: 1.15vw;
  font-weight: 700;
  text-align: right;
  color: var(--p-ink);
  font-variant-numeric: tabular-nums;
}
body.projection .proj-empty {
  display: grid;
  place-items: center;
  min-height: 8vh;
  border: 1px dashed var(--p-line);
  border-radius: 0.7vw;
  color: #94a3b8;
  font-size: 0.62vw;
}

.proj-bottom {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.2vw;
  min-height: 0;
}
body.projection .proj-info {
  display: flex;
  align-items: stretch;
  padding: 0.8vh 1vw;
  border-radius: 0.9vw;
  border: 1px solid var(--p-line);
  background: var(--p-card);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.proj-info-item {
  flex: 1;
  min-width: 0;
  padding: 0 0.9vw;
  border-right: 1px solid var(--p-line);
}
.proj-info-item:last-child { border-right: 0; }
.proj-info-item.wide { flex: 1.7; }
.proj-info-item span {
  display: block;
  font-size: 0.45vw;
  font-weight: 800;
  letter-spacing: 0.14vw;
  color: var(--p-muted);
  text-transform: uppercase;
}
.proj-info-item strong {
  display: block;
  font-size: 0.72vw;
  color: var(--p-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-info-item.warning strong { color: #b45309; }
.proj-info-item.warning.has-value { background: #fff7ed; }
body.projection .proj-ticker {
  display: flex;
  align-items: center;
  gap: 0.8vw;
  padding: 0.6vh 1vw;
  border-radius: 0.9vw;
  border: 1px solid var(--p-line);
  background: var(--p-card);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.ticker-label {
  flex: none;
  font-size: 0.45vw;
  font-weight: 800;
  letter-spacing: 0.12vw;
  color: var(--p-orange-2);
  text-transform: uppercase;
  padding-right: 0.8vw;
  border-right: 1px solid var(--p-line);
}
.ticker-window { flex: 1; overflow: hidden; }
.ticker-window > div {
  white-space: nowrap;
  color: var(--p-muted);
  font-size: 0.66vw;
  animation: ticker 26s linear infinite;
}

body.projection .proj-status {
  position: fixed;
  right: 1.4vw;
  bottom: 0.6vh;
  display: flex;
  align-items: center;
  gap: 0.35vw;
  color: #94a3b8;
  font-size: 0.45vw;
  letter-spacing: 0.12vw;
  text-transform: uppercase;
}
body.projection .proj-status i {
  width: 0.35vw;
  height: 0.35vw;
  border-radius: 50%;
  background: var(--p-teal);
  animation: pulse 1.6s infinite;
}

@media (max-width: 1100px) {
  body.projection { height: auto; overflow: auto; }
  body.projection .projection-head { height: auto; flex-wrap: wrap; padding: 1.2vh 3vw; gap: 1.2vw; }
  body.projection .proj-title h1 { font-size: 4.6vw; }
  body.projection .projection-main { height: auto; padding: 1.6vh 3vw; }
  .proj-hero { grid-template-columns: 1fr; }
  .proj-stats { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  body.projection .proj-split { grid-template-columns: 1fr; }
  .proj-bottom { grid-template-columns: 1fr; }
  body.projection .proj-number { font-size: 15vw; }
  body.projection .proj-title span, body.projection .proj-title p { font-size: 1vw; }
  body.projection .proj-live, body.projection .proj-clock-label { font-size: 0.9vw; }
  .proj-stat-card .stat-icon { width: 6vw; height: 6vw; font-size: 2.6vw; }
  body.projection .proj-stat-card span, body.projection .proj-stat-card small { font-size: 0.95vw; }
  body.projection .proj-stat-card strong { font-size: 4.6vw; }
  body.projection .block-brand { font-size: 1.5vw; }
  body.projection .block-total b { font-size: 6vw; }
  body.projection .bar-caption b { font-size: 1.2vw; }
  body.projection .bar-caption small, body.projection .block-sub { font-size: 1vw; }
  body.projection .proj-bar { grid-template-columns: 3vw 1fr 6vw; }
  body.projection .rank { width: 2.6vw; height: 2.6vw; font-size: 1.1vw; }
  body.projection .bar-number { font-size: 2vw; }
  body.projection .proj-info { flex-wrap: wrap; }
  .proj-info-item { flex: 1 1 40%; padding: 0.8vh 1vw; border-right: 0; border-bottom: 1px solid var(--p-line); }
  .proj-info-item span { font-size: 0.9vw; }
  .proj-info-item strong { font-size: 1.4vw; }
  .ticker-label, body.projection .proj-status { font-size: 0.9vw; }
  .ticker-window > div { font-size: 1.2vw; }
}
