:root {
  --bg: #070708;
  --bg-rgb: 7, 7, 8;
  --bg-2: #0e0e10;
  --ink: #f1ede6;
  --ink-rgb: 241, 237, 230;
  --ink-2: rgba(var(--ink-rgb), 0.66);
  --ink-3: rgba(var(--ink-rgb), 0.42);
  --line: rgba(var(--ink-rgb), 0.12);
  --si: #34d399;
  --si-rgb: 52, 211, 153;
  --no: #ff6b5b;
  --no-rgb: 255, 107, 91;
  --f-d: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-m: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-s: "Instrument Serif", Georgia, serif;
  --gut: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.3, 0, 0.2, 1);
  --t-fast: 160ms;
  --t-med: 260ms;
  --p-si: 0;
  --p-no: 0;
  color-scheme: dark;
}
/* Modo claro: papel cálido y tinta casi negra; el Sí y el No, más oscuros para que se lean sobre claro. */
:root[data-tema="claro"] {
  --bg: #f3f0e9;
  --bg-rgb: 243, 240, 233;
  --bg-2: #e9e5dc;
  --ink: #17161a;
  --ink-rgb: 23, 22, 26;
  --ink-2: rgba(23, 22, 26, 0.7);
  --ink-3: rgba(23, 22, 26, 0.5);
  --line: rgba(23, 22, 26, 0.14);
  --si: #0d9467;
  --si-rgb: 13, 148, 103;
  --no: #d93a2b;
  --no-rgb: 217, 58, 43;
  color-scheme: light;
}
:root[data-tema="claro"] .placa { box-shadow: 0 0 0 1px rgba(23, 22, 26, 0.12), 0 8px 24px -12px rgba(23, 22, 26, 0.35); }
:root[data-tema="claro"] .poster-marco { box-shadow: 0 0 0 1px rgba(23, 22, 26, 0.12), 0 50px 90px -30px rgba(23, 22, 26, 0.45); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-d);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}
body.is-intro, body.is-pausa, body.is-resultado, body.is-todas, body.is-info { overflow-x: hidden; overflow-y: auto; }
body:not(.listo) .vista { visibility: hidden; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.mono { font-family: var(--f-m); font-weight: 400; letter-spacing: 0.02em; }
.tenue { color: var(--ink-3); }
::selection { background: rgba(var(--ink-rgb), 0.25); }

/* ——— Lienzo ——— */
#campo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: var(--bg); }
.velo {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(var(--bg-rgb), 0.5), rgba(var(--bg-rgb), 0) 72%);
  opacity: 0; transition: opacity 900ms var(--ease-out);
}
.is-juego .velo { opacity: 1; }
.is-resultado .velo {
  opacity: 1;
  background:
    radial-gradient(ellipse 42% 60% at 18% 48%, rgba(var(--bg-rgb), 0.7), rgba(var(--bg-rgb), 0) 75%),
    radial-gradient(ellipse 36% 55% at 80% 45%, rgba(var(--bg-rgb), 0.62), rgba(var(--bg-rgb), 0) 78%);
}
.grano { display: none; }
.sin-gl #campo { background: var(--bg); }
.sin-gl .grano {
  display: block; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vista { position: relative; z-index: 2; }

/* ——— Portada ——— */
#v-intro {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(env(safe-area-inset-top) + 22px) var(--gut) calc(env(safe-area-inset-bottom) + 26px);
}
.intro-top { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-2); }
.intro-top .mono { letter-spacing: 0.16em; }
.intro-centro { align-self: center; display: grid; gap: clamp(20px, 3vw, 36px); justify-items: center; text-align: center; padding: 4vh 0; }
.titulo {
  margin: 0;
  font-size: clamp(76px, 15.5vw, 252px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  font-weight: 620;
  white-space: nowrap;
}
.titulo-l { display: inline-block; }
.titulo [class*="-mask"], .titulo .ch-mask { padding: 0.04em 0.02em 0.1em; margin: -0.04em -0.02em -0.1em; }
.intro-lead { margin: 0; max-width: 36ch; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.42; color: var(--ink-2); text-wrap: pretty; font-weight: 380; }
.intro-pie { display: grid; justify-items: center; gap: 22px; }
.modos { display: flex; gap: 10px; border: 0; padding: 0; margin: 0; }
.modo { position: relative; cursor: pointer; }
.modo input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.modo-c {
  display: grid; gap: 4px; padding: 14px 20px 14px 40px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(var(--ink-rgb), 0.02);
  transition: border-color var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
  position: relative; text-align: left;
}
.modo-c::before {
  content: ""; position: absolute; left: 16px; top: 19px; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--ink-3); transition: border-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.modo-t { font-weight: 600; font-size: 16px; }
.modo-d { font-size: 12px; color: var(--ink-3); }
.modo:hover .modo-c { border-color: rgba(var(--ink-rgb), 0.26); }
.modo:active .modo-c { scale: 0.98; }
.modo input:checked + .modo-c { border-color: rgba(var(--ink-rgb), 0.6); background: rgba(var(--ink-rgb), 0.06); }
.modo input:checked + .modo-c::before { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 6px var(--ink); }
.modo input:focus-visible + .modo-c { outline: 2px solid var(--ink); outline-offset: 3px; }

.cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 62px; padding: 0 40px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--bg); font-weight: 640; font-size: 18px; letter-spacing: -0.01em;
  transition: scale var(--t-fast) var(--ease-press), background-color var(--t-med) var(--ease-out);
}
.cta-txt { position: relative; z-index: 1; }
.cta:hover { scale: 1.03; }
.cta:active { scale: 0.97; }
.cta:disabled { opacity: 0.35; cursor: default; scale: 1; }
.cta-pulso { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.cta-pulso::before, .cta-pulso::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--ink);
  opacity: 0; animation: latido 2.4s var(--ease-out) infinite;
}
.cta-pulso::after { animation-delay: 0.28s; }
@keyframes latido {
  0% { transform: scale(1); opacity: 0.55; }
  60%, 100% { transform: scale(1.32, 1.6); opacity: 0; }
}
.cta-sm { height: 54px; padding: 0 28px; font-size: 16px; }
.intro-nota { margin: 0; max-width: 46ch; text-align: center; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.intro-nota .tenue { font-size: 13px; }
.ajustes-vista { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip-v {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 520; color: var(--ink-2);
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
}
.chip-v::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; transition: background-color var(--t-med) var(--ease-out); }
.chip-v:hover { color: var(--ink); border-color: rgba(var(--ink-rgb), 0.3); }
.chip-v:active { scale: 0.96; }
.chip-v[aria-pressed="true"] { color: var(--ink); border-color: rgba(var(--ink-rgb), 0.55); background: rgba(var(--ink-rgb), 0.06); }
.chip-v[aria-pressed="true"]::before { background: currentColor; }
.chip-v:disabled { cursor: default; opacity: 0.6; }

/* ——— Juego ——— */
#v-juego {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  padding: calc(env(safe-area-inset-top) + var(--alto-streamer, 0px)) 0 calc(env(safe-area-inset-bottom) + 14px);
}
.juego-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 62px; padding: 0 var(--gut); }
.marca { font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-2); }
.contador { justify-self: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.contador b { display: inline-block; font-weight: 500; color: var(--ink); }
.deshacer {
  justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--bg-rgb), 0.4); cursor: pointer; font-size: 14px; color: var(--ink-2);
  transition: color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
}
.deshacer svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.deshacer:hover:not(:disabled) { color: var(--ink); border-color: rgba(var(--ink-rgb), 0.32); }
.deshacer:active:not(:disabled) { scale: 0.95; }
.deshacer:disabled { opacity: 0.3; cursor: default; }
.ecg { height: 30px; margin: 0 var(--gut); }
.ecg svg { width: 100%; height: 100%; overflow: visible; display: block; }
.ecg-base { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.ecg-traza { stroke: rgba(var(--ink-rgb), 0.8); stroke-width: 1.3; fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ecg-punto { fill: var(--ink); filter: drop-shadow(0 0 4px rgba(var(--ink-rgb), 0.7)); }
.ecg-punto[data-v="si"] { fill: var(--si); filter: drop-shadow(0 0 6px rgba(var(--si-rgb), 0.9)); }
.ecg-punto[data-v="no"] { fill: var(--no); filter: drop-shadow(0 0 6px rgba(var(--no-rgb), 0.9)); }

.escena {
  position: relative; display: grid; place-items: center; min-height: 0;
  padding: clamp(16px, 6vh, 76px) var(--gut); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.escena:active { cursor: grabbing; }
.escena > * { grid-area: 1 / 1; }
.carta { width: min(1120px, 100%); will-change: transform; transform-origin: 50% 80%; }
.carta.clon { pointer-events: none; z-index: 1; }
.carta-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 clamp(14px, 2.4vh, 26px); }
.carta-tema { margin: 0; font-size: 12px; letter-spacing: 0.24em; color: var(--ink-3); min-height: 1.2em; }
.carta-detalle, .item-detalle-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(var(--ink-rgb), 0.55); background: rgba(var(--ink-rgb), 0.12); font: inherit; font-size: 15px; font-weight: 620; color: var(--ink);
  transition: background-color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
  -webkit-tap-highlight-color: transparent;
}
.carta-detalle svg, .item-detalle-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.carta-detalle:hover, .item-detalle-btn:hover { background: rgba(var(--ink-rgb), 0.2); border-color: var(--ink); }
.carta-detalle:active, .item-detalle-btn:active { scale: 0.96; }
/* En la propuesta crece con la pantalla para no quedar diminuto junto a un texto tan grande. */
.carta-detalle { height: clamp(40px, 3.4vw, 50px); padding: 0 clamp(18px, 1.5vw, 22px) 0 clamp(12px, 1vw, 15px); font-size: clamp(15px, 1.25vw, 18px); }
.carta-detalle svg { width: clamp(19px, 1.5vw, 22px); height: clamp(19px, 1.5vw, 22px); }
.item-detalle-btn { justify-self: start; }
.item-detalle { margin: 0; max-width: 64ch; padding: 14px 18px; border-radius: 16px; background: rgba(var(--ink-rgb), 0.04); font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.hoja-detalle { width: min(600px, calc(100% - 32px)); }
.detalle-carta { margin: 0; font-size: 18px; font-weight: 560; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink-2); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detalle-texto { margin: 0; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.55; text-wrap: pretty; }
.detalle-nota { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.hoja-detalle .cta { justify-self: start; }
.carta-txt {
  margin: 0; font-weight: 560; line-height: 1.04; letter-spacing: -0.028em; color: var(--ink);
  font-size: 48px; text-wrap: balance; overflow-wrap: break-word; hyphens: manual;
}
.carta-txt .ln { white-space: nowrap; will-change: transform; }
.carta-txt .wd-mask { padding: 0.08em 0.03em 0.17em; margin: -0.08em -0.03em -0.17em; }
.carta-txt .wd { will-change: transform; }

.lados { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.lado {
  position: absolute; top: 50%; font-weight: 800; font-size: clamp(140px, 27vw, 440px); line-height: 0.8; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px currentColor; font-variation-settings: "wdth" 80;
}
.lado-no {
  left: 0.02em; -webkit-text-stroke-color: rgba(var(--no-rgb), 0.85);
  opacity: var(--p-no); transform: translate(calc(-12% + var(--p-no) * 12%), -50%) scale(calc(0.9 + var(--p-no) * 0.1));
}
.lado-si {
  right: 0.02em; -webkit-text-stroke-color: rgba(var(--si-rgb), 0.9);
  opacity: var(--p-si); transform: translate(calc(12% - var(--p-si) * 12%), -50%) scale(calc(0.9 + var(--p-si) * 0.1));
}
.lado-no.listo { color: rgba(var(--no-rgb), 0.14); }
.lado-si.listo { color: rgba(var(--si-rgb), 0.16); }
.lado { transition: color var(--t-med) var(--ease-out); }

.mandos {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  width: min(660px, 100%); margin: 0 auto; padding: 8px var(--gut) 0;
}
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 64px; padding: 0 22px;
  border-radius: 999px; border: 1px solid; cursor: pointer; font-weight: 600; font-size: 20px; letter-spacing: -0.01em;
  transition: scale var(--t-fast) var(--ease-press), background-color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.boton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-med) var(--ease-out); }
.boton:active { scale: 0.96; }
.boton-no { color: var(--no); border-color: rgba(var(--no-rgb), calc(0.3 + var(--p-no) * 0.7)); background: rgba(var(--no-rgb), calc(0.04 + var(--p-no) * 0.2)); }
.boton-si { color: var(--si); border-color: rgba(var(--si-rgb), calc(0.32 + var(--p-si) * 0.68)); background: rgba(var(--si-rgb), calc(0.05 + var(--p-si) * 0.22)); }
.boton-nose { height: 50px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--ink-2); border-color: var(--line); background: rgba(var(--bg-rgb), 0.35); }
@media (hover: hover) {
  .boton-no:hover { background: rgba(var(--no-rgb), 0.12); }
  .boton-no:hover svg { transform: translateX(-3px); }
  .boton-si:hover { background: rgba(var(--si-rgb), 0.13); }
  .boton-si:hover svg { transform: translateX(3px); }
  .boton-nose:hover { color: var(--ink); border-color: rgba(var(--ink-rgb), 0.3); }
}
.atajos { margin: 14px 0 0; text-align: center; font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
.atajos kbd { font-family: var(--f-m); display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-2); margin-right: 4px; }
.atajos i { display: inline-block; width: 14px; }
@media (pointer: coarse) { .atajos { display: none; } }

.chispa {
  position: fixed; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  z-index: 40; pointer-events: none; will-change: transform;
}
.c-si { background: var(--si); box-shadow: 0 0 14px 4px rgba(var(--si-rgb), 0.55), 0 0 40px 10px rgba(var(--si-rgb), 0.25); }
.c-no { background: var(--no); box-shadow: 0 0 14px 4px rgba(var(--no-rgb), 0.5), 0 0 40px 10px rgba(var(--no-rgb), 0.2); }
.c-nose { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #9a9893; box-shadow: 0 0 10px 2px rgba(154, 152, 147, 0.4); }

/* ——— Lectura ——— */
.lectura { position: fixed; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; pointer-events: none; }
.lectura-t { margin: 0; font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-2); }
.lectura-n { margin: 0; font-size: clamp(120px, 24vw, 320px); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.lectura-s { margin: 0; font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-3); }

/* ——— Resultado ——— */
.eyebrow { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.24em; color: var(--ink-2); }
.res-hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas: "top barras" "nota bajar";
  grid-template-rows: 1fr auto;
  column-gap: clamp(32px, 6vw, 110px);
  row-gap: 32px;
  padding: calc(env(safe-area-inset-top) + clamp(40px, 8vh, 96px)) var(--gut) 32px;
}
.res-top { grid-area: top; align-self: center; display: grid; gap: 18px; justify-items: start; }
.res-top .eyebrow:focus { outline: none; }
.res-gana { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.gana { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }
.gana-n { font-size: clamp(60px, 8.2vw, 140px); font-weight: 640; line-height: 0.9; letter-spacing: -0.045em; }
.gana-n [class*="-mask"] { padding: 0.05em 0.02em 0.12em; margin: -0.05em -0.02em -0.12em; }
.res-pct { margin: 0; font-size: clamp(120px, 17vw, 280px); font-weight: 720; line-height: 0.8; letter-spacing: -0.065em; font-variant-numeric: tabular-nums; }
.res-pct-s { font-size: 0.38em; font-weight: 500; color: var(--ink-2); margin-left: 0.06em; vertical-align: 0.95em; letter-spacing: 0; }
.res-frase { margin: 8px 0 0; max-width: 34ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }

.placa { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 64px; height: 42px; padding: 7px 9px; border-radius: 9px; background: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 24px -10px rgba(0, 0, 0, 0.6); }
.placa img { width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; }
.placa-xl { width: clamp(104px, 10vw, 150px); height: clamp(68px, 6.6vw, 98px); padding: 12px 16px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 60px -6px color-mix(in srgb, var(--c) 70%, transparent), 0 20px 40px -18px rgba(0, 0, 0, 0.8); }
.placa-mini { width: 44px; height: 28px; padding: 4px 6px; border-radius: 6px; }
.placa-chip { width: 34px; height: 22px; padding: 3px 4px; border-radius: 5px; box-shadow: none; }

.res-barras { grid-area: barras; align-self: center; display: grid; }
.fila {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "placa n pct" "barra barra barra" "det det det";
  align-items: center; column-gap: 16px; row-gap: 10px; padding: 18px 0 16px; border-top: 1px solid var(--line);
}
.fila:last-child { border-bottom: 1px solid var(--line); }
.fila .placa { grid-area: placa; }
.fila-n { grid-area: n; font-size: 22px; font-weight: 560; letter-spacing: -0.01em; }
.fila-pct { grid-area: pct; font-size: 34px; font-weight: 620; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.fila-pct b { font-weight: inherit; }
.fila-barra { grid-area: barra; height: 6px; border-radius: 3px; background: rgba(var(--ink-rgb), 0.09); overflow: hidden; }
.fila-barra i { display: block; height: 100%; border-radius: inherit; background: var(--c); transform-origin: 0 50%; transform: scaleX(var(--k)); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 80%, transparent); }
.fila-det { grid-area: det; font-size: 12px; color: var(--ink-2); }
.fila.es-top .fila-n { font-weight: 700; }
.fila.es-top .fila-barra { height: 8px; border-radius: 4px; }
.res-nota { grid-area: nota; align-self: end; margin: 0; max-width: 62ch; font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.res-bajar {
  grid-area: bajar; align-self: end; justify-self: end; display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink); text-decoration: none;
  padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; transition: border-color var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out);
}
.res-bajar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: bajar 2.2s var(--ease-out) infinite; }
.res-bajar:hover { border-color: rgba(var(--ink-rgb), 0.34); background: rgba(var(--ink-rgb), 0.05); }
@keyframes bajar { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

.huella {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 110px);
  padding: clamp(72px, 12vh, 140px) var(--gut);
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0) 0%, rgba(var(--bg-rgb), 0.78) 22%, rgba(var(--bg-rgb), 0.86) 100%);
}
.huella-txt { display: grid; gap: 20px; justify-items: start; max-width: 520px; justify-self: end; }
.huella h2, .repaso h2 { margin: 0; font-size: clamp(44px, 5.6vw, 92px); font-weight: 620; line-height: 0.94; letter-spacing: -0.045em; }
.huella-txt p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 40ch; }
.huella-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 10px; }
.boton-texto { border: 0; background: none; padding: 10px 2px; cursor: pointer; font-size: 16px; font-weight: 520; color: var(--ink-2); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line); transition: color var(--t-med) var(--ease-out), text-decoration-color var(--t-med) var(--ease-out); }
.boton-texto:hover { color: var(--ink); text-decoration-color: var(--ink); }
.poster { margin: 0; perspective: 1400px; justify-self: start; width: min(460px, 100%); }
.poster-marco {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 0 0 1px rgba(var(--ink-rgb), 0.1), 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 120px -40px rgba(var(--si-rgb), 0.25);
  transform-style: preserve-3d; will-change: transform;
}
.poster-marco::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(var(--ink-rgb), 0) 30%, rgba(var(--ink-rgb), 0.06) 50%, rgba(var(--ink-rgb), 0) 70%) 0 0 / 250% 100%;
  animation: brillo 1.6s linear infinite;
}
.poster.listo .poster-marco::before { display: none; }
@keyframes brillo { to { background-position: -250% 0; } }
.poster-marco img { position: relative; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms var(--ease-out); }
.poster.listo .poster-marco img { opacity: 1; }

.repaso { position: relative; background: rgba(var(--bg-rgb), 0.94); padding: clamp(64px, 10vh, 120px) var(--gut) 40px; }
.repaso-cab, .lista { width: min(980px, 100%); margin: 0 auto; }
.repaso-cab { display: grid; gap: 14px; margin-bottom: 30px; }
.repaso-cab > p { margin: 0; font-size: 17px; }
.filtros { display: grid; gap: 10px; margin-top: 14px; }
.filtros-g { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; font-weight: 520; color: var(--ink-2);
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
}
.chip .mono { font-size: 12px; color: var(--ink-3); transition: color var(--t-med); }
.chip:hover { border-color: rgba(var(--ink-rgb), 0.3); color: var(--ink); }
.chip:active { scale: 0.96; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .mono { color: rgba(var(--bg-rgb), 0.6); }
.chip-p { padding-left: 6px; }
.chip.chip-cero:not([aria-pressed="true"]) { opacity: 0.45; }
.chip-p[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip-p[aria-pressed="true"] .mono { color: rgba(255, 255, 255, 0.75); }

.lista { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.item { padding: 30px 0; border-top: 1px solid var(--line); display: grid; gap: 14px; opacity: 0; translate: 0 26px; transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out); }
.item.visto { opacity: 1; translate: none; }
.item-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 12px; }
.item-cab .mono { letter-spacing: 0.08em; text-transform: uppercase; }
.tu { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid; font-size: 13px; font-weight: 560; }
.tu::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tu-si { color: var(--si); border-color: rgba(var(--si-rgb), 0.4); }
.tu-no { color: var(--no); border-color: rgba(var(--no-rgb), 0.4); }
.tu-nose { color: var(--ink-3); border-color: var(--line); }
.item-txt { margin: 0; font-size: clamp(21px, 2.1vw, 30px); font-weight: 520; line-height: 1.2; letter-spacing: -0.02em; text-wrap: pretty; }
.item-fuentes { display: grid; gap: 14px; margin-top: 4px; }
.fuente { display: grid; gap: 8px; padding-left: 18px; border-left: 2px solid var(--c); }
.fuente-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fuente-cab b { font-weight: 640; font-size: 16px; }
.fuente-cab .mono { font-size: 11px; letter-spacing: 0.06em; }
.cita { margin: 0; font-family: var(--f-s); font-style: italic; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--ink-2); }
.fuente-link {
  justify-self: start; display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--f-m); font-size: 12px; line-height: 1.5; color: var(--ink-3);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
  transition: color var(--t-med) var(--ease-out), text-decoration-color var(--t-med) var(--ease-out);
}
.fuente-link svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; transform: translateY(1px); transition: transform var(--t-med) var(--ease-out); }
.fuente-link:hover { color: var(--ink); text-decoration-color: var(--ink); }
.fuente-link:hover svg { transform: translate(2px, -1px); }

/* ——— Portada: navegación, reto y resumen ——— */
/* overflow-x: clip: los anillos del latido no ensanchan la página en el móvil. */
#v-intro { padding-top: calc(env(safe-area-inset-top) + 22px + var(--alto-streamer, 0px)); overflow-x: clip; }
.intro-nav { display: flex; gap: 22px; }
.intro-nav a { color: var(--ink-2); text-decoration: none; letter-spacing: 0.16em; transition: color var(--t-med) var(--ease-out); }
.intro-nav a:hover { color: var(--ink); }
.reto-banner {
  display: flex; align-items: center; gap: 16px 24px; width: min(660px, 100%); padding: 16px 16px 16px 22px; text-align: left;
  border: 1px solid rgba(var(--si-rgb), 0.45); border-radius: 22px; background: rgba(var(--bg-rgb), 0.78);
}
.reto-txt { display: grid; gap: 5px; }
.reto-t { margin: 0; font-size: 21px; font-weight: 620; letter-spacing: -0.015em; }
.reto-d { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.reto-acc { display: flex; align-items: center; gap: 8px; flex: none; }
.reto-cerrar {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ink-2); transition: color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out);
}
.reto-cerrar:hover { color: var(--ink); border-color: rgba(var(--ink-rgb), 0.4); }
.intro-resumen { margin: -8px 0 0; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); text-align: center; text-wrap: balance; }
.intro-continuar { margin: -14px 0 0; }
.intro-continuar .boton-texto { font-size: 14px; padding: 6px 2px; }
.chip-abre::before { content: "+"; width: auto; height: auto; border: 0; border-radius: 0; font-family: var(--f-m); font-size: 15px; line-height: 1; }
.chip-abre[data-activo="si"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--si); }

/* ——— Partida: salir, ronda, chat y autor ——— */
.deshacer.salir { justify-self: start; padding: 0 14px 0 10px; }
.juego-info { display: grid; justify-items: center; gap: 8px; padding: 0 var(--gut); }
.juego-info:has(> :not([hidden])) { padding-top: 12px; }
.ronda { margin: 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.chat-barra { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); font-size: 12px; }
.chat-estado { flex: none; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.chat-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.chat-estado.vivo::before { background: var(--no); box-shadow: 0 0 0 3px rgba(var(--no-rgb), 0.22); }
.chat-pista { flex: 1; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(var(--ink-rgb), 0.09); }
.chat-pista i { display: block; height: 100%; transition: width 400ms var(--ease-out); }
.chat-si { background: var(--si); }
.chat-no { background: var(--no); }
.chat-n { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.carta-autor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: clamp(16px, 2.6vh, 28px); }
.autor-t { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.autor-p { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 620; letter-spacing: -0.01em; }

/* ——— Entre rondas ——— */
.pausa {
  min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 24px; text-align: center;
  padding: calc(env(safe-area-inset-top) + 40px + var(--alto-streamer, 0px)) var(--gut) calc(env(safe-area-inset-bottom) + 40px);
}
.pausa-t { margin: 0; font-size: clamp(56px, 10vw, 168px); font-weight: 640; line-height: 0.9; letter-spacing: -0.05em; outline: none; }
.pausa-placas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pausa-placas .placa-xl { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 20px 40px -18px rgba(0, 0, 0, 0.8); }
.pausa-lead { margin: 0; max-width: 44ch; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

/* ——— Resultado: aviso, segunda ronda y retar ——— */
.res-hero { padding-top: calc(env(safe-area-inset-top) + clamp(40px, 8vh, 96px) + var(--alto-streamer, 0px)); }
.res-aviso { margin: 0; max-width: 46ch; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.fila-barras { grid-area: barra; display: grid; gap: 5px; }
.fila-barras .fila-barra { grid-area: auto; }
.fila .fila-barra-2, .fila.es-top .fila-barra-2 { height: 3px; border-radius: 2px; }
.fila-barra-2 i { opacity: 0.5; box-shadow: none; }
.reta { display: grid; gap: 10px; width: 100%; margin-top: 6px; padding-top: 24px; border-top: 1px solid var(--line); }
.huella-txt .reta-t { margin: 0; font-size: 22px; font-weight: 620; letter-spacing: -0.015em; color: var(--ink); }
.huella-txt .reta-d { font-size: 15px; }
.campo { display: grid; gap: 6px; }
.campo > .mono { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.campo-in {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--bg-rgb), 0.55);
  color: var(--ink); font: inherit; font-size: 16px; transition: border-color var(--t-med) var(--ease-out);
}
.campo-in::placeholder { color: var(--ink-3); }
.campo-in:hover { border-color: rgba(var(--ink-rgb), 0.3); }
.campo-in:focus { outline: none; border-color: rgba(var(--ink-rgb), 0.7); }
.campo-in:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.campo-in:disabled { opacity: 0.6; }
select.campo-in {
  appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8780' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select.campo-in option { background: var(--bg-2); color: var(--ink); }
.boton-linea {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(var(--ink-rgb), 0.28); background: transparent; color: var(--ink); font-size: 16px; font-weight: 560;
  transition: border-color var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
}
.boton-linea:hover:not(:disabled) { border-color: var(--ink); background: rgba(var(--ink-rgb), 0.05); }
.boton-linea:active:not(:disabled) { scale: 0.97; }
.boton-linea:disabled { opacity: 0.4; cursor: default; }

/* ——— Comparaciones ——— */
.extras {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vh, 72px) clamp(32px, 5vw, 80px);
  padding: clamp(56px, 9vh, 110px) var(--gut) 0; background: rgba(var(--bg-rgb), 0.9);
}
.extras > * { min-width: 0; }
.bloque { display: grid; gap: 24px; align-content: start; padding-top: 24px; border-top: 1px solid var(--line); }
.bloque-ancho { grid-column: 1 / -1; }
.bloque-cab { display: grid; gap: 10px; }
.bloque-t { margin: 0; font-size: clamp(30px, 3.4vw, 54px); font-weight: 620; line-height: 0.98; letter-spacing: -0.035em; }
.bloque-cuerpo { display: grid; gap: 24px; }
.bloque-dato { display: grid; gap: 8px; }
.bloque-cifra { margin: 0; font-size: clamp(76px, 9vw, 136px); font-weight: 700; line-height: 0.82; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.bloque-cifra span { font-size: 0.38em; font-weight: 500; color: var(--ink-2); margin-left: 0.05em; vertical-align: 0.95em; letter-spacing: 0; }
.bloque-sub { margin: 0; max-width: 54ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tabla-scroll { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabla th { padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-family: var(--f-m); font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.tabla td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla th:not(:first-child), .tabla td:not(:first-child) { text-align: right; font-family: var(--f-m); }
.tabla th:last-child, .tabla td:last-child { padding-right: 0; }
.celda-p { display: inline-flex; align-items: center; gap: 10px; font-weight: 580; }
.bloque-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 56px; }
.mini-t { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.mini-t .mono { margin-left: 4px; font-size: 13px; }
.mini-lista { list-style: none; margin: 0; padding: 0; }
.mini-item {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 16px; line-height: 1.35; color: var(--ink);
}
.mini-txt { display: grid; gap: 4px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color var(--t-med) var(--ease-out); }
.mini-item:hover .mini-txt { text-decoration-color: var(--line); }
.mini-txt small { font-size: 11px; letter-spacing: 0.04em; color: var(--ink-3); }
.mini-p { display: flex; gap: 4px; flex: none; }
.vacio { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.aciertos { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.acierto-p { display: inline-flex; align-items: center; gap: 10px; }
.acierto-p .mono { font-size: 14px; color: var(--ink-2); }
.bloque-temas summary { display: grid; gap: 10px; cursor: pointer; list-style: none; }
.bloque-temas summary::-webkit-details-marker { display: none; }
.bloque-temas summary .bloque-t::after { content: " +"; font-weight: 400; color: var(--ink-3); }
.bloque-temas[open] summary .bloque-t::after { content: " −"; }
.bloque-temas[open] summary { margin-bottom: 10px; }
.bloque-temas .tabla td:first-child { min-width: 190px; white-space: normal; }

/* ——— Repaso: cambiar respuesta y apuestas ——— */
.item-cambiar {
  margin-left: auto; padding: 6px 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink-3);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color var(--t-med) var(--ease-out);
}
.item-cambiar:hover { color: var(--ink); }
.item-editar { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.editar-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.editar-fila > .mono { min-width: 110px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.chip-voto { height: 36px; padding: 0 14px; }
.chip-si[aria-pressed="true"] { background: var(--si); border-color: var(--si); color: var(--bg); }
.chip-no[aria-pressed="true"] { background: var(--no); border-color: var(--no); color: var(--bg); }
:root[data-tema="claro"] .chip-si[aria-pressed="true"], :root[data-tema="claro"] .chip-no[aria-pressed="true"] { color: #fff; }
.tu-apuesta { color: var(--ink-2); border-color: var(--line); }
.tu-apuesta.acierto { color: var(--ink); border-color: rgba(var(--ink-rgb), 0.5); }
.quien { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.item.resalta { animation: resalta 1.8s var(--ease-out); }
@keyframes resalta { 0%, 35% { background: rgba(var(--ink-rgb), 0.07); } 100% { background: transparent; } }

.pie-res {
  position: relative; display: grid; justify-items: center; gap: 22px; text-align: center;
  padding: 48px var(--gut) calc(env(safe-area-inset-bottom) + 40px); background: rgba(var(--bg-rgb), 0.94); border-top: 1px solid var(--line);
}
.pie-acciones { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; }
.pie-credito { margin: 0; max-width: 70ch; font-size: 12px; line-height: 1.6; }

/* ——— Páginas de lectura ——— */
.pagina { min-height: 100dvh; background: rgba(var(--bg-rgb), 0.9); }
.pagina-top {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: calc(env(safe-area-inset-top) + var(--alto-streamer, 0px)) var(--gut) 0; background: rgba(var(--bg-rgb), 0.9); border-bottom: 1px solid var(--line);
}
.pagina-cab { width: min(980px, 100%); margin: 0 auto; display: grid; gap: 16px; padding: clamp(48px, 9vh, 96px) var(--gut) 28px; }
.pagina-t { margin: 0; font-size: clamp(52px, 8vw, 128px); font-weight: 640; line-height: 0.9; letter-spacing: -0.05em; outline: none; }
.pagina-lead { margin: 0; max-width: 56ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.filtros-campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; width: 100%; }
.todas-cuenta { margin: 4px 0 0; font-size: 12px; }
#lista-todas { width: min(980px, calc(100% - 2 * var(--gut))); }
#lista-todas > .vacio { padding: 30px 0; border-top: 1px solid var(--line); }
.pagina-mas { display: flex; justify-content: center; padding: 28px var(--gut) 72px; }
.cifras { width: min(980px, calc(100% - 2 * var(--gut))); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cifra { display: grid; align-content: start; gap: 14px; padding: 28px 28px 32px 0; }
.cifra + .cifra { padding-left: 28px; border-left: 1px solid var(--line); }
.cifra b { font-size: clamp(64px, 7vw, 112px); font-weight: 700; line-height: 0.85; letter-spacing: -0.06em; }
.cifra p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.cifra ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.cifra li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.cifra li .mono { color: var(--ink-2); }
.metodo { width: min(980px, calc(100% - 2 * var(--gut))); margin: 28px auto 64px; border-top: 1px solid var(--line); }
.ficha-metodo { border-bottom: 1px solid var(--line); }
.ficha-metodo summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; list-style: none; font-size: clamp(20px, 2vw, 26px); font-weight: 580; letter-spacing: -0.015em; }
.ficha-metodo summary::-webkit-details-marker { display: none; }
.ficha-metodo summary::after { content: "+"; flex: none; font-family: var(--f-m); font-weight: 400; color: var(--ink-3); transition: rotate var(--t-med) var(--ease-out); }
.ficha-metodo[open] summary::after { rotate: 45deg; }
.ficha-metodo p { margin: 0 0 26px; max-width: 64ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

/* ——— Privacidad y aviso legal ——— */
.legal { width: min(980px, calc(100% - 2 * var(--gut))); margin: 0 auto 64px; display: grid; gap: 18px; padding-top: 32px; border-top: 1px solid var(--line); outline: none; scroll-margin-top: 80px; }
.legal-t { margin: 0; font-size: clamp(34px, 4.4vw, 64px); font-weight: 620; line-height: 0.96; letter-spacing: -0.04em; }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 48px; margin-top: 10px; }
.legal-b h3 { margin: 0 0 8px; font-size: 18px; font-weight: 620; letter-spacing: -0.01em; }
.legal-b p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.legal a, a.enlace-legal { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.legal a:hover, a.enlace-legal:hover { color: var(--ink); text-decoration-color: currentColor; }
.legal-borrar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.legal-nota { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ——— Ventanas ——— */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(var(--bg-rgb), 0.64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hoja {
  width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px;
  border: 1px solid var(--line); border-radius: 24px; background: var(--bg-2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}
.hoja[open] { display: grid; gap: 18px; }
.hoja .eyebrow:focus { outline: none; }
.hoja-texto { margin: 0; font-size: 20px; font-weight: 540; line-height: 1.35; letter-spacing: -0.01em; text-wrap: pretty; }
.hoja-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.hoja .atajos { margin: 0; text-align: left; }
.apuesta-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.apuesta-op {
  position: relative; display: grid; justify-items: center; gap: 10px; padding: 18px 12px 14px; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(var(--ink-rgb), 0.02); font-size: 17px; font-weight: 600;
  transition: border-color var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out), scale var(--t-fast) var(--ease-press);
}
.apuesta-op:hover { border-color: rgba(var(--ink-rgb), 0.5); background: rgba(var(--ink-rgb), 0.06); }
.apuesta-op:active { scale: 0.97; }
.apuesta-op kbd { position: absolute; top: 8px; right: 10px; font-size: 11px; color: var(--ink-3); }
@media (pointer: coarse) { .apuesta-op kbd { display: none; } }
#apuesta-nose { justify-self: start; }
.panel {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100%); max-width: none; height: 100dvh; max-height: none; padding: 0;
  border: 0; border-left: 1px solid var(--line); background: var(--bg-2);
}
.panel[open] { display: flex; flex-direction: column; }
.panel-cab { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: calc(env(safe-area-inset-top) + 18px) 24px 16px; border-bottom: 1px solid var(--line); }
.panel-t { margin: 0; font-size: 28px; font-weight: 640; letter-spacing: -0.03em; }
.panel-t:focus { outline: none; }
.panel-cab .deshacer { justify-self: auto; padding: 0 18px; color: var(--ink); }
.panel-cuerpo { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px calc(env(safe-area-inset-bottom) + 32px); }
.grupo { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); }
.grupo:last-child { border-bottom: 0; }
.grupo legend { float: left; width: 100%; margin-bottom: 14px; padding: 0; }
.grupo legend + * { clear: both; }
.grupo > :not(legend) + :not(legend) { margin-top: 10px; }
.grupo-nota { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.grupo-nota:empty { display: none; }
.grupo-aviso { margin: 0; font-size: 14px; color: var(--no); }
.opcion { display: block; position: relative; cursor: pointer; }
.opcion input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.opcion-c {
  position: relative; display: grid; gap: 4px; padding: 14px 16px 14px 46px; border-radius: 16px; border: 1px solid var(--line);
  transition: border-color var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out);
}
.opcion-c::before {
  content: ""; position: absolute; left: 16px; top: 17px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ink-3);
  transition: border-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.opcion input[type="checkbox"] + .opcion-c::before { border-radius: 4px; }
.opcion-c b { font-size: 16px; font-weight: 620; }
.opcion-c span { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.opcion:hover .opcion-c { border-color: rgba(var(--ink-rgb), 0.3); }
.opcion input:checked + .opcion-c { border-color: rgba(var(--ink-rgb), 0.6); background: rgba(var(--ink-rgb), 0.05); }
.opcion input:checked + .opcion-c::before { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--bg-2), inset 0 0 0 7px var(--ink); }
.opcion input:focus-visible + .opcion-c { outline: 2px solid var(--ink); outline-offset: 2px; }
.opcion input:disabled { cursor: default; }
.opcion input:disabled + .opcion-c { opacity: 0.5; }
.temas { display: flex; flex-wrap: wrap; gap: 8px; }
.temas .chip { height: 36px; padding: 0 12px; font-size: 13px; }
.temas-acciones { display: flex; gap: 20px; }
.temas-acciones .boton-texto { padding: 4px 0; font-size: 14px; }
.streamer-form { display: flex; gap: 8px; }
.streamer-form .boton-linea { height: 48px; flex: none; }
.streamer-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ——— Marca del streamer ——— */
.streamer {
  position: fixed; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; pointer-events: none;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--bg-rgb), 0.88); box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.7);
}
.streamer[data-esquina="ab-der"] { right: 18px; bottom: calc(env(safe-area-inset-bottom) + 18px); }
.streamer[data-esquina="ar-der"] { right: 18px; top: calc(env(safe-area-inset-top) + 14px); }
.streamer[data-esquina="ab-izq"] { left: 18px; bottom: calc(env(safe-area-inset-bottom) + 18px); }
.streamer[data-esquina="ar-izq"] { left: 18px; top: calc(env(safe-area-inset-top) + 14px); }
.streamer img, .streamer .inicial { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; }
.streamer .inicial { display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; }
.streamer-txt { display: grid; line-height: 1.15; }
.streamer b { font-size: 15px; font-weight: 640; }
.streamer small { font-size: 11px; color: var(--ink-2); }
.streamer[data-tam="grande"] { gap: 14px; padding: 8px 26px 8px 8px; }
.streamer[data-tam="grande"] img, .streamer[data-tam="grande"] .inicial { width: 60px; height: 60px; font-size: 24px; }
.streamer[data-tam="grande"] b { font-size: 24px; }
.streamer[data-tam="grande"] small { font-size: 15px; }
/* Si la marca va arriba, las vistas bajan para no quedar tapadas. */
body.streamer-arriba { --alto-streamer: 60px; }
body.streamer-arriba.streamer-grande { --alto-streamer: 84px; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); z-index: 60; translate: -50% 0; pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 560;
  animation: toast 2.6s var(--ease-out) both;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(12px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ——— Móvil ——— */
@media (max-width: 760px) {
  .titulo { font-size: 29vw; white-space: normal; line-height: 0.84; }
  .titulo-l { display: block; }
  .intro-centro { gap: 22px; }
  .intro-top { font-size: 11px; }
  .solo-ancho { display: none; }
  .modos { width: 100%; }
  .modo { flex: 1; }
  .modo-c { padding: 12px 12px 12px 34px; }
  .modo-c::before { left: 12px; top: 17px; }
  .modo-t { font-size: 15px; }
  .modo-d { font-size: 11px; }
  .cta { width: 100%; }
  .intro-pie { gap: 16px; }
  .juego-top { height: 56px; }
  .marca { font-size: 11px; letter-spacing: 0.14em; }
  .deshacer span { display: none; }
  .deshacer { width: 40px; padding: 0; justify-content: center; }
  .mandos { gap: 8px; }
  .boton { height: 58px; padding: 0 14px; font-size: 18px; }
  .boton-nose { height: 46px; padding: 0 12px; font-size: 14px; }
  .is-resultado .velo { background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.55), rgba(var(--bg-rgb), 0.35) 50%, rgba(var(--bg-rgb), 0.6)); }
  .res-hero { grid-template-columns: 1fr; grid-template-areas: "top" "barras" "nota" "bajar"; grid-template-rows: auto; min-height: 0; row-gap: 26px; padding-top: calc(env(safe-area-inset-top) + 56px); }
  .res-top { gap: 14px; }
  .gana-n { font-size: 15vw; }
  .placa-xl { width: 92px; height: 60px; padding: 9px 12px; border-radius: 13px; }
  .gana { gap: 14px; }
  .res-bajar { justify-self: start; }
  .huella { grid-template-columns: 1fr; padding-top: 72px; }
  .huella-txt { justify-self: start; }
  .poster { justify-self: center; }
  .fila { column-gap: 12px; padding: 14px 0 12px; }
  .fila-pct { font-size: 28px; }
  .intro-nav { gap: 14px; }
  .modos { gap: 6px; }
  .modo-c { padding: 10px 6px; text-align: center; }
  .modo-c::before { display: none; }
  .reto-banner { flex-direction: column; align-items: stretch; padding: 16px; }
  .reto-acc .cta { flex: 1; width: auto; }
  .chat-barra { gap: 8px; font-size: 11px; }
  .autor-p { font-size: 17px; }
  .extras { grid-template-columns: 1fr; }
  .bloque-dos { grid-template-columns: 1fr; }
  .cifras { grid-template-columns: 1fr; }
  .cifra { padding-right: 0; }
  .cifra + .cifra { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .legal-grid { grid-template-columns: 1fr; }
  .legal-borrar .boton-linea { width: 100%; }
  .filtros-campos { grid-template-columns: 1fr; }
  .huella-acciones .cta, .huella-acciones .boton-linea { width: 100%; }
  .editar-fila > .mono { min-width: 100%; }
  .item-cambiar { margin-left: 0; }
  .panel { inset: auto 0 0 0; width: 100%; height: auto; max-height: 90dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; }
  .panel-cab { padding-top: 18px; }
  .streamer-opciones { grid-template-columns: 1fr; }
  .hoja { padding: 22px; }
  /* En el móvil la marca del streamer va arriba en el centro, pequeña, y todo baja un poco. */
  body.con-streamer { --alto-streamer: 50px; }
  .streamer, .streamer[data-esquina] { top: calc(env(safe-area-inset-top) + 6px); bottom: auto; left: 50%; right: auto; translate: -50% 0; gap: 8px; padding: 4px 14px 4px 4px; }
  .streamer img, .streamer .inicial, .streamer[data-tam="grande"] img, .streamer[data-tam="grande"] .inicial { width: 32px; height: 32px; font-size: 15px; }
  .streamer b, .streamer[data-tam="grande"] b { font-size: 14px; }
  .streamer small, .streamer[data-tam="grande"] small { font-size: 10px; }
}
@media (max-height: 640px) and (min-width: 761px) {
  .titulo { font-size: clamp(64px, 12vw, 180px); }
}

/* ——— Movimiento reducido (del sistema o con «Animaciones suaves») ——— */
@media (prefers-reduced-motion: reduce) {
  .cta-pulso::before, .cta-pulso::after, .res-bajar svg, .poster-marco::before { animation: none !important; }
  .cta-pulso::before, .cta-pulso::after { opacity: 0; }
  .item { transition: opacity 200ms linear; translate: none; }
  .velo { transition: none; }
}
.reducido .cta-pulso::before, .reducido .cta-pulso::after, .reducido .res-bajar svg, .reducido .poster-marco::before { animation: none !important; }
.reducido .cta-pulso::before, .reducido .cta-pulso::after { opacity: 0; }
.reducido .item { transition: opacity 200ms linear; translate: none; }
.reducido .velo { transition: none; }
.reducido .lado { display: none; }
.reducido .item.resalta, .reducido .toast { animation-duration: 1.2s; }
@media (prefers-reduced-motion: reduce) { .toast { animation-duration: 1.2s; } }
