/* Misión Infancias · World Children's Day — tablero de la oca en vivo */
:root {
  --noche: #081a52;
  --noche-2: #0c2a72;
  --azul: #123a8c;
  --turquesa: #12a7c0;
  --violeta: #5b3cc4;
  --magenta: #e2207e;
  --coral: #f65d5b;
  --sol: #ffc93c;
  --crema: #fff8ec;
  --tinta: #0b1f4d;
  --blanco: #ffffff;
  --vidrio: rgba(255, 255, 255, 0.08);
  --vidrio-borde: rgba(255, 255, 255, 0.16);
  --texto-suave: rgba(255, 255, 255, 0.72);
  --radio: 22px;
  --f-tit: "Bricolage Grotesque", system-ui, sans-serif;
  --f-txt: "Chivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: #0a2a6b linear-gradient(125deg, #0a2a6b 0%, #0b4f86 38%, #1c3a9e 70%, #4b2fb0 100%) fixed;
  color: var(--blanco);
  font-family: var(--f-txt);
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
}
.cielo {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 46% 10%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 44%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 82% 22%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 78%, #fff8 50%, transparent 51%),
    radial-gradient(60% 50% at 0% 100%, rgba(18, 167, 192, .35), transparent 70%),
    radial-gradient(50% 45% at 100% 0%, rgba(226, 32, 126, .28), transparent 70%);
}
.cabecera, .principal, .pie { position: relative; z-index: 1; }

/* ── Cabecera ─────────────────────────────────────────────── */
.cabecera {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 28px 10px;
}
.marca { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { height: clamp(22px, 2vw, 32px); width: auto; flex: none; }
.separador { width: 1px; align-self: stretch; margin: 4px 2px; background: rgba(255, 255, 255, .3); flex: none; }
.marca-ico { width: 40px; height: 40px; fill: var(--sol); filter: drop-shadow(0 0 12px rgba(255, 201, 60, .6)); flex: none; animation: girar 14s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.marca h1 { font-family: var(--f-tit); font-weight: 800; font-size: clamp(24px, 2.4vw, 40px); line-height: 1; margin: 0; letter-spacing: -.02em; }
.marca p { margin: 4px 0 0; color: var(--texto-suave); font-size: 14px; }

.dias { display: flex; gap: 6px; padding: 5px; background: var(--vidrio); border: 1px solid var(--vidrio-borde); border-radius: 999px; }
.dias button {
  font: 600 15px var(--f-txt); color: var(--texto-suave); background: none; border: 0; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; white-space: nowrap; min-height: 40px;
}
.dias button[aria-pressed="true"] { background: var(--blanco); color: var(--tinta); }
.dias button small { font-weight: 400; opacity: .75; margin-left: 4px; }

.contador { justify-self: end; width: min(340px, 100%); }
.contador-num { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.contador-num strong { font-family: var(--f-tit); font-weight: 800; font-size: clamp(38px, 3.6vw, 60px); line-height: .9; font-variant-numeric: tabular-nums; }
.contador-num span { color: var(--texto-suave); font-size: 16px; }
.barra { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); margin-top: 8px; overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sol), var(--coral), var(--magenta)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.faltan { margin: 6px 0 0; text-align: right; font-size: 14px; color: var(--texto-suave); }
.faltan b { color: var(--sol); }

/* ── Principal ────────────────────────────────────────────── */
.principal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 8px 28px 14px;
  min-height: 0;
}
.tablero-panel {
  display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, #0a1d5a 0%, #0d2b78 70%, #123a8c 100%);
  border: 1px solid var(--vidrio-borde);
  border-radius: 28px;
  padding: 14px 18px 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.tablero-panel::after { /* lomas, como en un tablero de juego infantil */
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -1px; height: 15%; pointer-events: none;
  background:
    radial-gradient(55% 120% at 18% 100%, #2f8a3f 60%, transparent 61%),
    radial-gradient(50% 110% at 70% 100%, #3d9c48 60%, transparent 61%),
    radial-gradient(40% 90% at 100% 100%, #2f8a3f 60%, transparent 61%);
  opacity: .9;
}
.tablero-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 2; }
.ongs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ongs li { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .09); border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 14px; }
.ongs i { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.ongs b { font-family: var(--f-tit); font-size: 16px; font-variant-numeric: tabular-nums; }
.vivo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-suave); }
.punto { width: 9px; height: 9px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 #3ee08f; animation: latido 2s infinite; }
.vivo.caido .punto { background: var(--coral); animation: none; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(62, 224, 143, .7); } 70% { box-shadow: 0 0 0 10px rgba(62, 224, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 143, 0); } }

.tablero { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; z-index: 2; padding: 6px 0 14px; }
.tablero svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* casilleros */
.camino { fill: none; stroke: rgba(255, 255, 255, .07); stroke-linecap: round; stroke-linejoin: round; }
/* casillero vacío: oscuro, así se distingue cualquier color encendido (incluido el blanco de TECHO) */
.cas rect { fill: #1b3a8f; stroke: rgba(255, 255, 255, .22); stroke-width: 2; transition: fill .5s; }
.cas text { font-family: var(--f-tit); font-weight: 800; fill: rgba(255, 255, 255, .6); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.cas.on rect { stroke: #fff; stroke-width: 3; }
.centro rect { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .18); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.centro text { text-anchor: middle; dominant-baseline: central; fill: #fff; }
.centro-eti { font-family: var(--f-txt); font-weight: 700; letter-spacing: .14em; fill: var(--sol) !important; }
.centro-num { font-family: var(--f-tit); font-weight: 800; }
.centro-sub { font-family: var(--f-txt); font-weight: 500; fill: rgba(255, 255, 255, .85) !important; }
.meta rect { fill: var(--sol); }
.meta text { font-family: var(--f-tit); font-weight: 800; fill: var(--tinta); text-anchor: middle; dominant-baseline: central; letter-spacing: .06em; }
.cas.on.ult rect { filter: url(#brillo); }
.cas.nuevo { animation: pop .9s cubic-bezier(.2, 1.6, .4, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes pop { 0% { transform: scale(.4); opacity: .3; } 60% { transform: scale(1.18); } 100% { transform: scale(1); opacity: 1; } }
.cas.premio rect { stroke: var(--sol); stroke-width: 4; stroke-dasharray: 10 6; }
.cas.premio.on rect { stroke-dasharray: none; }
.badge circle { fill: var(--magenta); stroke: #fff; stroke-width: 3; }
.badge.hecha circle { fill: var(--sol); }
.badge path, .badge polygon, .badge rect, .badge line { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.badge.hecha path, .badge.hecha polygon, .badge.hecha rect, .badge.hecha line { stroke: var(--tinta); }
.rotulo { font-family: var(--f-tit); font-weight: 800; fill: #fff; letter-spacing: .04em; }
.ficha { transition: transform 1.1s cubic-bezier(.3, 1.4, .5, 1); }
.ficha-cuerpo { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); animation: saltito 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
@keyframes saltito { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14%); } }

/* ── KPIs (debajo del tablero, de margen a margen) ─────────── */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kpi { position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; padding: 18px 22px; border-radius: var(--radio); background: var(--vidrio); border: 1px solid var(--vidrio-borde); backdrop-filter: blur(10px); min-width: 0; }
.kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--k, var(--sol)); }
.kpi:nth-child(1) { --k: linear-gradient(var(--sol), var(--coral)); }
.kpi:nth-child(2) { --k: var(--turquesa); }
.kpi:nth-child(3) { --k: var(--magenta); }
.kpi-eti { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); }
.kpi-val { font: 800 clamp(38px, 3.6vw, 60px) var(--f-tit); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.kpi-val small { font-size: .45em; font-weight: 700; color: var(--texto-suave); margin-left: 6px; letter-spacing: 0; }
.kpi-sub { font-size: 14px; color: var(--texto-suave); }
.kpi-sub b { color: var(--sol); font-size: 16px; }
.kpi-barra { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; margin: 6px 0 2px; }
.kpi-barra i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sol), var(--coral), var(--magenta)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }

/* ── Lateral ──────────────────────────────────────────────── */
.lateral { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; min-width: 0; }
.tarjeta { flex: none; background: var(--vidrio); border: 1px solid var(--vidrio-borde); border-radius: var(--radio); padding: 16px 18px; backdrop-filter: blur(10px); }
.tarjeta h2 { font-family: var(--f-tit); font-size: 18px; margin: 0 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tarjeta h2 small { font: 400 13px var(--f-txt); color: var(--texto-suave); }

.consigna-activa { background: linear-gradient(140deg, var(--coral), var(--magenta) 60%, var(--violeta)); border: 0; position: relative; overflow: hidden; }
.consigna-activa .eti { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; opacity: .9; }
.consigna-activa h3 { font-family: var(--f-tit); font-weight: 800; font-size: 27px; line-height: 1.02; margin: 6px 0 8px; }
.consigna-activa p { margin: 0; font-size: 15px; line-height: 1.4; }
.consigna-activa .premio { display: inline-block; margin-top: 12px; background: #fff; color: var(--magenta); font: 800 16px var(--f-tit); border-radius: 999px; padding: 6px 14px; }
.consigna-activa .por { margin-top: 10px; font-size: 13px; opacity: .92; }
.consigna-activa .ico { position: absolute; right: -14px; top: -14px; width: 110px; height: 110px; opacity: .2; }
.consigna-activa .ico * { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.linea { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.linea li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; font-size: 14px; color: var(--texto-suave); }
.linea li b { font-family: var(--f-tit); font-size: 16px; text-align: center; border-radius: 10px; padding: 3px 0; background: rgba(255, 255, 255, .08); color: #fff; font-variant-numeric: tabular-nums; }
.linea li.hecha { color: #fff; }
.linea li.hecha b { background: var(--sol); color: var(--tinta); }
.linea li.prox { background: rgba(255, 255, 255, .1); color: #fff; }
.linea li.prox b { background: var(--magenta); }
.linea .monto { font-size: 12px; opacity: .8; }
.linea li.mas { display: block; padding: 2px 8px; font-size: 12px; opacity: .7; }
.linea .ok { width: 18px; height: 18px; stroke: var(--sol); fill: none; stroke-width: 3; }

.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ranking li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 50px 36px 78px; gap: 8px; align-items: center; padding: 6px 4px; }
.ranking li.enc { padding: 0 4px 6px; border-bottom: 1px solid var(--vidrio-borde); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); }
.ranking li.enc span:nth-child(n+3) { text-align: right; }
.ranking li.vacio { display: block; }
.ranking .pos { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--f-tit); background: rgba(255, 255, 255, .1); }
.ranking li:nth-child(2) .pos { background: #ffd447; color: var(--tinta); }
.ranking li:nth-child(3) .pos { background: #dfe7f5; color: var(--tinta); }
.ranking li:nth-child(4) .pos { background: #f0a868; color: var(--tinta); }
.ranking .tc { font: 700 18px var(--f-tit); font-variant-numeric: tabular-nums; text-align: right; color: var(--sol); }
.ranking .prom { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ranking .nom { font-weight: 700; font-size: 15px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .sub { font-size: 12px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking .sub em { font-style: normal; color: var(--sol); }
.ranking .cant { font: 800 22px var(--f-tit); font-variant-numeric: tabular-nums; text-align: right; }
.ranking .cant small { display: block; font: 400 11px var(--f-txt); color: var(--texto-suave); }
.vacio { color: var(--texto-suave); font-size: 14px; margin: 4px 0; }

/* ── Pie: cinta de últimos donantes ───────────────────────── */
.pie { display: flex; align-items: center; gap: 14px; padding: 0 28px 16px; min-width: 0; }
.pie-tit { font: 700 13px var(--f-txt); text-transform: uppercase; letter-spacing: .1em; color: var(--sol); white-space: nowrap; }
.cinta { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); min-width: 0; }
.cinta > div { display: flex; gap: 10px; width: max-content; animation: cinta 60s linear infinite; }
.cinta span { display: inline-flex; align-items: center; gap: 8px; background: var(--vidrio); border: 1px solid var(--vidrio-borde); border-radius: 999px; padding: 6px 14px; font-size: 14px; white-space: nowrap; }
.cinta span i { width: 10px; height: 10px; border-radius: 50%; }
.cinta span small { color: var(--texto-suave); }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ── Avisos, toasts y celebraciones ───────────────────────── */
.aviso-prueba { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 20; background: var(--sol); color: var(--tinta); font: 800 13px var(--f-txt); letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.toasts { position: fixed; left: 28px; bottom: 70px; z-index: 30; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--tinta); border-radius: 16px; padding: 10px 16px 10px 10px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); animation: entra .5s cubic-bezier(.2, 1.4, .4, 1) both; font-size: 15px; }
.toast.sale { animation: sale .4s ease-in both; }
.toast i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 15px var(--f-tit); font-style: normal; }
.toast b { font-family: var(--f-tit); }
@keyframes entra { from { transform: translateX(-30px); opacity: 0; } }
@keyframes sale { to { transform: translateX(-30px); opacity: 0; } }

.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(5, 14, 48, .72); backdrop-filter: blur(6px); padding: 20px; }
.overlay[hidden] { display: none; }
.celebra { width: min(720px, 100%); text-align: center; background: linear-gradient(150deg, var(--coral), var(--magenta) 55%, var(--violeta)); border-radius: 36px; padding: 40px 36px 34px; box-shadow: 0 40px 120px -20px rgba(226, 32, 126, .6); animation: aparece .7s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes aparece { from { transform: scale(.6) rotate(-3deg); opacity: 0; } }
.celebra .eti { font: 700 15px var(--f-txt); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.celebra .num { font: 800 clamp(70px, 12vw, 140px) var(--f-tit); line-height: .9; color: var(--sol); text-shadow: 0 6px 0 rgba(0, 0, 0, .15); }
.celebra h3 { font: 800 clamp(32px, 5vw, 58px) var(--f-tit); line-height: 1; margin: 8px 0 14px; letter-spacing: -.02em; }
.celebra p { font-size: clamp(17px, 2vw, 22px); line-height: 1.4; margin: 0 auto; max-width: 30em; }
.celebra .premio { display: inline-block; margin-top: 20px; background: #fff; color: var(--magenta); font: 800 24px var(--f-tit); border-radius: 999px; padding: 10px 24px; }
.celebra .por { margin-top: 14px; font-size: 16px; opacity: .9; }
.celebra .ruleta { font: 800 clamp(34px, 6vw, 64px) var(--f-tit); margin: 18px 0 6px; min-height: 1.2em; color: #fff; }
.celebra .ruleta.gano { color: var(--sol); animation: aparece .6s cubic-bezier(.2, 1.6, .4, 1) both; }
#confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ── Pantallas chicas ─────────────────────────────────────── */
@media (min-width: 1101px) {
  .tablero { height: calc(100vh - 210px); min-height: 520px; }
  .tablero-panel { min-height: 0; }
}
@media (max-width: 1100px) {
  .cabecera { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 16px 8px; }
  .dias { justify-self: start; }
  .contador { justify-self: stretch; width: 100%; }
  .contador-num, .faltan { justify-content: flex-start; text-align: left; }
  .principal { grid-template-columns: minmax(0, 1fr); padding: 8px 16px 14px; }
  .tablero { display: block; width: 100%; }
  .tablero svg { height: auto; }
  .lateral, .tablero-panel, .cabecera > * { min-width: 0; }
  .aviso-prueba { top: auto; bottom: 12px; white-space: nowrap; }
  .tablero-panel { padding: 12px 10px 0; border-radius: 22px; }
  .lateral { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .lateral > .consigna-activa { grid-column: 1 / -1; }
  .pie { padding: 0 16px 16px; }
  .toasts { left: 16px; right: 16px; bottom: 64px; }
}
@media (max-width: 520px) {
  .marca { flex-wrap: wrap; row-gap: 10px; }
  .marca-ico { display: none; }
  .separador { display: none; }
  .logo { flex-basis: 100%; max-width: 150px; height: auto; }
  .dias { width: 100%; }
  .dias button { flex: 1; padding: 8px 10px; font-size: 14px; }
  .pie-tit { display: none; }
  .lateral { grid-template-columns: minmax(0, 1fr); }
  .tablero-cab { gap: 8px; }
  .ongs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .ongs li { min-width: 0; font-size: 13px; padding: 6px 10px 6px 8px; }
  .ongs li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 0; }
  .ongs li span::before { content: attr(data-corto); font-size: 13px; }
  .ongs b { margin-left: auto; }
  .kpis { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:first-child { grid-column: 1 / -1; }
  .kpi:first-child .kpi-eti { min-height: 0; }
  .kpi:first-child .kpi-val { font-size: 34px; }
  .kpi:first-child .kpi-val small { display: inline; font-size: 16px; margin-left: 4px; }
  .kpi { padding: 12px 10px 12px 14px; gap: 2px; }
  .kpi::before { width: 4px; }
  .kpi-eti { font-size: 10px; letter-spacing: .03em; line-height: 1.2; min-height: 2.4em; }
  .kpi-val { font-size: 28px; }
  .kpi-val small { display: block; font-size: 12px; margin: 2px 0 0; }
  .kpi-sub { font-size: 11px; line-height: 1.25; }
  .kpi-sub b { font-size: 12px; }
  .ranking li { grid-template-columns: 24px minmax(0, 1fr) 30px 24px 60px; gap: 6px; padding: 6px 0; }
  .ranking li.enc { padding: 0 0 6px; font-size: 10px; letter-spacing: .02em; }
  .ranking .pos { width: 24px; height: 24px; font-size: 13px; }
  .ranking .nom { white-space: normal; font-size: 14px; }
  .ranking .cant { font-size: 18px; }
  .ranking .tc { font-size: 15px; }
  .ranking .prom { font-size: 12px; }
  .celebra { padding: 28px 20px 24px; border-radius: 26px; }
}
/* ── Festejo por ONG (un ícono animado sobre el casillero nuevo) ── */
.festejo { position: fixed; z-index: 35; pointer-events: none; transform: translate(-50%, -50%); animation: festejo 3.5s cubic-bezier(.2, 1, .3, 1) both; }
.festejo::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--fondo); border: 5px solid #fff; box-shadow: 0 18px 50px -10px rgba(0, 0, 0, .55), 0 0 0 10px rgba(255, 255, 255, .18); }
.festejo svg { position: relative; width: 100%; height: 100%; display: block; clip-path: circle(47%); }
@keyframes festejo {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1); }
  82% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -90%) scale(.7); opacity: 0; }
}
.festejo *, .mini * { transform-box: fill-box; }
.festejo .trazo, .mini .trazo { fill: none; stroke: var(--tinta-f); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.festejo .fino, .mini .fino { stroke-width: 4; opacity: .55; }
.festejo .lleno, .mini .lleno { fill: var(--tinta-f); }
.festejo .hueco, .mini .hueco { fill: var(--fondo); }
/* casita */
.a-casa .paredes { transform-origin: center bottom; animation: crece .5s .15s cubic-bezier(.3, 1.5, .5, 1) both; }
.a-casa .techo { animation: cae .5s .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.a-casa .ventana { fill: var(--fondo); animation: luz .4s 1.1s both; }
.a-casa .humo circle { fill: var(--tinta-f); opacity: 0; animation: humo 1.6s 1.3s ease-out infinite; }
.a-casa .humo circle:nth-child(2) { animation-delay: 1.5s; }
.a-casa .humo circle:nth-child(3) { animation-delay: 1.7s; }
@keyframes crece { from { transform: scaleY(0); } }
@keyframes cae { from { transform: translateY(-40px); opacity: 0; } }
@keyframes luz { to { fill: #ffc93c; } }
@keyframes humo { 0% { opacity: 0; transform: translateY(6px) scale(.5); } 30% { opacity: .5; } 100% { opacity: 0; transform: translateY(-14px) scale(1.2); } }
/* velita */
.a-vela .cera { fill: #fff; stroke: var(--tinta-f); stroke-width: 4; }
.a-vela .gota { fill: #fff; stroke: var(--tinta-f); stroke-width: 3; }
.a-vela .llama { transform-origin: center bottom; animation: enciende .6s .5s cubic-bezier(.3, 1.6, .5, 1) both, titila .18s 1.1s ease-in-out infinite alternate; }
.a-vela .fuego { fill: #f65d5b; stroke: var(--tinta-f); stroke-width: 3; stroke-linejoin: round; }
.a-vela .nucleo { fill: #fff; }
.a-vela .halo { fill: #fff; opacity: 0; transform-origin: center; animation: halo 1.4s 1s ease-in-out infinite; }
@keyframes enciende { from { transform: scale(0); opacity: 0; } }
@keyframes titila { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(.92, 1.08) rotate(3deg); } }
@keyframes halo { 0%, 100% { opacity: .2; transform: scale(.9); } 50% { opacity: .45; transform: scale(1.15); } }
/* ambulancia */
.a-ambu .cuerpo { animation: llega 1s .1s cubic-bezier(.2, .9, .3, 1.15) both; }
.a-ambu .cruz { fill: var(--fondo); }
.a-ambu .sirena { animation: sirena .35s steps(1) infinite; }
.a-ambu .goma { fill: #0b1f4d; stroke: var(--tinta-f); stroke-width: 3; }
.a-ambu .rayo { stroke: var(--tinta-f); stroke-width: 2.5; }
.a-ambu .rueda { transform-origin: center; animation: gira .35s linear 3; }
.a-ambu .velocidad line { stroke: var(--tinta-f); stroke-width: 4; stroke-linecap: round; opacity: 0; animation: veloz .9s .1s both; }
@keyframes llega { from { transform: translateX(-120px); } }
@keyframes sirena { 0% { fill: #ffc93c; } 50% { fill: #4fc3ff; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes veloz { 0%, 100% { opacity: 0; } 30%, 70% { opacity: .8; } }
/* infantes */
.a-chicos .chico-in { transform-origin: center bottom; animation: aparecechico .5s cubic-bezier(.3, 1.7, .5, 1) both; }
.a-chicos .chico { transform-origin: center bottom; animation: salta .5s ease-in-out infinite alternate; }
.a-chicos .brazos { fill: none; stroke: var(--tinta-f); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; transform-origin: center bottom; animation: saludo .25s ease-in-out infinite alternate; }
.a-chicos .corazon { fill: #ffc93c; stroke: var(--tinta-f); stroke-width: 1.5; opacity: 0; animation: corazon 1.8s 1.1s ease-out infinite; }
.a-chicos .corazon:nth-of-type(2) { animation-delay: 1.5s; }
.a-chicos .corazon:nth-of-type(3) { animation-delay: 1.9s; }
@keyframes aparecechico { from { transform: scale(0); opacity: 0; } }
@keyframes salta { 0% { transform: translateY(3px) scaleY(.94); } 100% { transform: translateY(-16px) scaleY(1); } }
@keyframes saludo { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes corazon { 0% { opacity: 0; translate: 0 8px; scale: .4; } 25% { opacity: 1; scale: 1.1; } 100% { opacity: 0; translate: 0 -18px; scale: .9; } }
.toast .mini { width: 30px; height: 30px; clip-path: circle(50%); }
.toast small { color: #5a6787; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Detalle del casillero (al hacer click) ───────────────── */
.cas.on { cursor: pointer; }
.cas.on:hover rect, .cas.elegida rect { stroke: var(--sol); stroke-width: 6; }
.tip { position: fixed; z-index: 45; width: 290px; background: #fff; color: var(--tinta); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .55); font-size: 14px; animation: tip .15s ease-out; }
@keyframes tip { from { opacity: 0; transform: translateY(4px); } }
.tip-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--fondo); color: var(--tinta-f); border-bottom: 1px solid rgba(11, 31, 77, .12); }
.tip-cab b { display: block; font: 800 16px var(--f-tit); }
.tip-cab small { display: block; font-size: 12px; opacity: .85; }
.tip-ico { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--fondo); border: 2px solid var(--tinta-f); overflow: hidden; }
.tip-ico svg { width: 100%; height: 100%; display: block; }
.tip dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 12px 14px 14px; }
.tip dt { color: #5a6787; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; align-self: center; }
.tip dd { margin: 0; font-weight: 700; text-align: right; }
.tip dd small { display: block; font-weight: 400; font-size: 12px; color: #5a6787; }
.tip dd em { font-style: normal; font: 800 11px var(--f-tit); background: var(--sol); color: var(--tinta); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.ficha, .badge, .meta { pointer-events: none; }

/* ícono de la tarjeta sorpresa en la celebración */
.celebra .ico-grande { width: 96px; height: 96px; margin: -78px auto 10px; border-radius: 50%; background: var(--sol); border: 5px solid #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .4); animation: icoentra .8s .25s cubic-bezier(.2, 1.6, .4, 1) both, icobaila 1.4s 1.2s ease-in-out infinite; }
.celebra .ico-grande svg { width: 52px; height: 52px; }
.celebra .ico-grande :is(path, polygon, rect, line, circle, polyline) { fill: none; stroke: var(--tinta); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes icoentra { from { transform: scale(0) rotate(-200deg); } }
@keyframes icobaila { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.08); } }
.celebra { margin-top: 50px; }
