/* ¡Vota a Ciegas! — estética de tebeo clásico y videojuego de los 90. */
:root {
  color-scheme: light;
  --ink: #111;
  --paper: #fdf1d3;
  --panel: #fffdf6;
  --yellow: #ffd23f;
  --red: #e63946;
  --sky: #bfe3ff;
  --muted: #5b5141;
  --c-default: #8e6cc4;
  --shadow: 5px 5px 0 var(--ink);
  --font-title: 'Bangers', Impact, 'Arial Black', sans-serif;
  --font-body: 'Comic Neue', 'Comic Sans MS', 'Trebuchet MS', system-ui, sans-serif;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 700 17px/1.45 var(--font-body);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0,0,0,.07) 1.3px, transparent 1.5px);
  background-size: 11px 11px;
  min-height: 100vh;
}
main { max-width: 860px; margin: 0 auto; padding: 0 16px 120px; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; letter-spacing: .04em; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: 1.8rem; margin: 28px 0 12px; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px dashed var(--red); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .9rem; }

/* ---------- Piezas de tebeo ---------- */
.panel { background: var(--panel); border: 3px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-title); font-size: 1.5rem; letter-spacing: .06em; line-height: 1;
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink); padding: 12px 22px 10px; transition: transform .06s, box-shadow .06s;
}
@media (hover: hover) { .btn:hover:not(:disabled) { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); } }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { background: #d9d2c0; color: #7d7564; cursor: not-allowed; box-shadow: 2px 2px 0 #7d7564; border-color: #7d7564; }
.btn.red { background: var(--red); color: #fff; }
.btn.white { background: #fff; }
.btn.small { font-size: 1.1rem; padding: 8px 14px 6px; }
.link { background: none; border: 0; padding: 4px 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.bubble {
  position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 22px;
  padding: 12px 16px; box-shadow: 4px 4px 0 var(--ink); font-size: 1.02rem;
}
.bubble::before, .bubble::after { content: ''; position: absolute; left: -18px; top: 22px; border: 10px solid transparent; }
.bubble::before { border-right: 18px solid var(--ink); left: -27px; top: 20px; border-width: 12px 18px 12px 0; border-style: solid; border-color: transparent var(--ink) transparent transparent; }
.bubble::after { left: -20px; top: 23px; border-width: 9px 15px 9px 0; border-style: solid; border-color: transparent #fff transparent transparent; }
.host { display: grid; grid-template-columns: 74px 1fr; gap: 18px; align-items: start; margin: 14px 0 18px; }
.host .mascot { width: 74px; height: auto; }
.host .mascot.talk { animation: bob 1.6s ease-in-out infinite; }

.burst-wrap { position: absolute; filter: drop-shadow(3px 3px 0 var(--ink)); pointer-events: none; z-index: 3; }
.burst {
  display: grid; place-items: center; width: 118px; height: 92px; padding: 6px;
  background: var(--yellow); color: var(--red); font-family: var(--font-title); font-size: 1.45rem; letter-spacing: .03em;
  -webkit-text-stroke: 1px var(--ink); text-align: center; line-height: 1;
  clip-path: polygon(50% 0, 60% 22%, 82% 6%, 76% 30%, 100% 30%, 82% 48%, 100% 66%, 76% 66%, 84% 94%, 60% 76%, 50% 100%, 40% 76%, 16% 94%, 24% 66%, 0 66%, 18% 48%, 0 30%, 24% 30%, 18% 6%, 40% 22%);
}
.burst.big { width: 220px; height: 160px; font-size: 2.4rem; }

/* ---------- HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 20; margin: 0 -16px 8px; padding: 8px 16px;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: var(--ink); color: #fff; font-family: var(--font-title); font-size: 1.05rem; letter-spacing: .08em; line-height: 1.2;
  border-bottom: 4px solid var(--yellow);
}
.hud button { background: none; border: 2px solid #fff; color: #fff; border-radius: 4px; padding: 6px 8px; font-family: var(--font-title); font-size: 1rem; letter-spacing: .08em; }
.hud .hud-mid { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud .lives { color: var(--yellow); letter-spacing: .1em; }

/* ---------- Portada ---------- */
.title-screen { text-align: center; padding-top: 28px; }
.logo {
  font-family: var(--font-title); font-size: clamp(3.2rem, 13vw, 6.4rem); line-height: .9; margin: 6px 0 4px;
  color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink); transform: rotate(-3deg); letter-spacing: .03em;
}
.logo .red { color: var(--red); }
.tagline { font-family: var(--font-title); font-size: 1.5rem; letter-spacing: .05em; margin-bottom: 18px; }
.lineup { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; max-width: 600px; margin: 10px auto 0; align-items: end; }
.lineup figure { margin: 0; position: relative; }
.lineup figure:nth-child(2n) .portrait { animation-delay: .25s; }
.lineup .portrait { width: 100%; height: auto; animation: bob 2.2s ease-in-out infinite; }
.lineup figcaption { font-family: var(--font-title); font-size: 1rem; line-height: 1.1; letter-spacing: .05em; margin-top: 2px; }
.masked .portrait { filter: brightness(0) opacity(.85); }
.masked figure::after {
  content: '?'; position: absolute; inset: 18% 0 auto; font-family: var(--font-title); font-size: 3.4rem; color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink); text-shadow: 3px 3px 0 var(--ink);
}
.stage-floor { height: 16px; max-width: 600px; margin: 0 auto 22px; background: repeating-linear-gradient(90deg, #c0392b 0 30px, #fff 30px 60px, #1e7fd6 60px 90px); border: 3px solid var(--ink); }
.press-start { font-family: var(--font-pixel); font-size: .9rem; margin: 16px 0 10px; animation: blink 1.1s steps(2) infinite; }
.title-actions { display: grid; gap: 14px; justify-items: center; margin-top: 8px; }
.credits { margin-top: 30px; font-size: .85rem; font-weight: 400; color: var(--muted); }

/* ---------- Menús ---------- */
.menu-head { padding: 20px 0 6px; }
.step { font-family: var(--font-pixel); font-size: .65rem; color: var(--red); margin-bottom: 8px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 18px 0; }
.choice {
  position: relative; text-align: left; padding: 18px 18px 16px; display: grid; gap: 6px;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow);
  transition: transform .08s;
}
@media (hover: hover) { .choice:hover { transform: rotate(-.8deg) translate(-2px, -2px); } }
.choice[aria-pressed="true"] { background: #fff4c2; outline: 4px solid var(--red); outline-offset: -9px; }
.choice .icon { font-size: 2.6rem; line-height: 1; }
.choice h3 { font-size: 1.9rem; }
.choice p { margin: 0; font-weight: 400; }
.choice .tag { justify-self: start; font-family: var(--font-title); font-size: .95rem; letter-spacing: .08em; background: var(--ink); color: #fff; padding: 5px 7px; border-radius: 3px; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 10px; }

.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.stage {
  position: relative; padding: 14px 10px 12px; text-align: center; display: grid; gap: 4px; justify-items: center;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink);
}
@media (hover: hover) { .stage:hover:not(:disabled) { transform: translate(-2px, -2px) rotate(1deg); box-shadow: 6px 6px 0 var(--ink); } }
.stage .icon { font-size: 2.4rem; line-height: 1.1; }
.stage .name { font-family: var(--font-title); font-size: 1.25rem; letter-spacing: .04em; line-height: 1.05; }
.stage .meta { font-size: .78rem; font-weight: 400; color: var(--muted); }
.stage:disabled { background: #e9e1cc; color: #7d7564; box-shadow: 2px 2px 0 #7d7564; border-color: #7d7564; cursor: not-allowed; }
.stage:disabled .icon { filter: grayscale(1) opacity(.5); }
.stage .lock { position: absolute; top: -10px; right: -8px; font-size: 1.3rem; transform: rotate(12deg); }
.stage.done { background: #e5f6d8; }
.stage.done::after { content: '✔'; position: absolute; top: -12px; right: -10px; width: 30px; height: 30px; display: grid; place-items: center; background: #4fae2a; color: #fff; border: 3px solid var(--ink); border-radius: 50%; font-size: .95rem; }
.stage.current { outline: 4px solid var(--red); outline-offset: 3px; animation: wiggle 1.2s ease-in-out infinite; }
.locked-note { font-weight: 400; color: var(--muted); font-size: .9rem; }

/* ---------- Partida ---------- */
.play-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; }
.play-head .icon { font-size: 2.4rem; }
.progress { display: flex; gap: 6px; margin: 10px 0 0; }
.progress span { flex: 1; height: 12px; border: 2px solid var(--ink); background: #fff; border-radius: 3px; }
.progress span.on { background: var(--yellow); }
.progress span.done { background: #4fae2a; }

.section-label { font-family: var(--font-title); font-size: 1.35rem; letter-spacing: .05em; margin: 18px 0 8px; display: flex; gap: 10px; align-items: baseline; }
.section-label small { font-family: var(--font-body); font-size: .85rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.prop {
  position: relative; background: var(--panel); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink);
}
.prop-main {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: 16px 16px 14px;
  font-size: 1.08rem; line-height: 1.45; border-radius: 6px;
}
@media (hover: hover) { .prop-main:hover { background: #fff8d9; } }
.prop .sub { display: block; font-family: var(--font-title); font-size: .95rem; letter-spacing: .08em; font-weight: 400; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; line-height: 1.6; }
.prop .cta { display: block; margin-top: 10px; font-family: var(--font-title); font-size: 1.05rem; letter-spacing: .05em; color: var(--red); }
.prop.picked { background: #fff4c2; transform: rotate(-.4deg); }
.prop.pop { animation: pop .28s ease-out; }
.prop.slot-empty { border-style: dashed; box-shadow: none; background: transparent; padding: 14px 16px 14px 70px; color: var(--muted); font-weight: 400; min-height: 58px; }

.stamp {
  position: absolute; top: -14px; right: -6px; z-index: 2; pointer-events: none;
  font-family: var(--font-title); font-size: 1.15rem; letter-spacing: .06em; color: var(--red);
  border: 3px solid var(--red); border-radius: 6px; padding: 2px 8px; background: rgba(255,255,255,.85);
  transform: rotate(8deg); animation: stamp .22s ease-out;
}

.ranked { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: stretch; }
.medal {
  display: grid; place-items: center; align-self: start; margin: 12px 0 0 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--ink); font-family: var(--font-title); font-size: 1.6rem; background: #fff;
}
.medal.m1 { background: #ffd23f; } .medal.m2 { background: #d9dde3; } .medal.m3 { background: #e8a46c; }
.ranked .prop-main { padding-left: 8px; cursor: default; }
@media (hover: hover) { .ranked .prop-main:hover { background: none; } }
.rank-tools { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; padding: 0 10px 10px; flex-wrap: wrap; }
.tool { min-width: 44px; min-height: 40px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; font-size: 1.05rem; box-shadow: 2px 2px 0 var(--ink); }
.tool:disabled { opacity: .3; cursor: default; box-shadow: none; }
.tool.back { font-size: .85rem; padding: 0 10px; }
.slot-num { position: absolute; left: 14px; top: 10px; width: 40px; height: 40px; border: 3px dashed #9b917b; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-size: 1.4rem; color: #9b917b; }

.helps { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; grid-column: 1 / -1; }
.help { flex: 1 1 100%; font-size: .95rem; }
.help summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  font-weight: 700; color: var(--ink); background: #dff0ff; border: 2px solid var(--ink); border-radius: 999px;
  padding: 4px 12px 4px 8px; box-shadow: 2px 2px 0 var(--ink);
}
.help summary::-webkit-details-marker { display: none; }
.help summary::before { content: "?"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); font-family: var(--font-title); font-size: 1rem; line-height: 1; }
.help[open] summary { background: var(--yellow); }
.help .help-body { margin-top: 10px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 10px 14px; font-weight: 400; position: relative; box-shadow: 3px 3px 0 var(--ink); }
.help .help-body p { margin: 0 0 6px; }
.help .src { display: block; font-size: .85rem; color: var(--muted); }
.help a { color: #1e5fb3; font-weight: 700; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--paper) 30%);
}
.dock-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.dock .status { font-family: var(--font-pixel); font-size: .62rem; line-height: 1.7; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 4px; }

/* ---------- Revelación ---------- */
.reveal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rv { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 12px 14px 12px 12px; }
.rv .who { display: grid; justify-items: center; align-content: start; gap: 4px; }
.rv .who .portrait { width: 82px; height: auto; }
.rv .who .duo { display: flex; }
.rv .who .duo .portrait { width: 48px; margin: 0 -4px; }
.rv .party-chip { font-family: var(--font-title); font-size: 1.05rem; letter-spacing: .05em; color: #fff; background: var(--party, var(--c-default)); border: 2px solid var(--ink); border-radius: 4px; padding: 2px 8px 0; text-align: center; line-height: 1.15; }
.rv .mystery { width: 82px; height: 96px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 8px; background: repeating-linear-gradient(45deg, #2d3142 0 8px, #3c4157 8px 16px); color: var(--yellow); font-family: var(--font-title); font-size: 3rem; -webkit-text-stroke: 1.5px var(--ink); }
.rv .score-tag { font-family: var(--font-pixel); font-size: .55rem; color: var(--muted); margin-bottom: 6px; line-height: 1.6; }
.rv.shown { border-left: 10px solid var(--party, var(--c-default)); }
.rv.shown .who { animation: pop .35s ease-out; }
.rv .burst-wrap { right: -10px; top: -24px; animation: burst .7s ease-out forwards; }
.rv details { margin-top: 8px; font-size: .9rem; font-weight: 400; }
.rv details summary { cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rv details p { margin: 6px 0 0; }

/* ---------- Resultados ---------- */
.result-panel { padding: 18px 16px 16px; margin-top: 22px; position: relative; overflow: visible; }
.result-panel.appear { animation: pop .35s ease-out; }
.bars { display: grid; gap: 16px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.bar-row .portrait { width: 64px; height: auto; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bar-top .name { font-family: var(--font-title); font-size: 1.3rem; letter-spacing: .04em; }
.bar-top .pct { font-family: var(--font-pixel); font-size: 1rem; white-space: nowrap; }
.bar-top .cand { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.track { height: 24px; background: #fff; border: 3px solid var(--ink); border-radius: 4px; overflow: hidden; margin: 4px 0 2px; }
.fill { height: 100%; width: 0; background: var(--party, var(--c-default)); transition: width .9s cubic-bezier(.2,.9,.3,1.2); background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.22) 0 8px, transparent 8px 16px); }
.bar-row .meta { font-size: .85rem; font-weight: 400; color: var(--muted); }
.result-panel .burst-wrap { right: -8px; top: -46px; animation: burst .8s ease-out forwards; }
.disclaimer { margin-top: 14px; font-size: .85rem; font-weight: 400; color: var(--muted); }

.podium { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; align-items: end; max-width: 560px; margin: 26px auto 4px; }
.podium .col { display: grid; justify-items: center; }
.podium .portrait { width: 86%; height: auto; }
.podium .block { width: 100%; border: 3px solid var(--ink); border-bottom: 0; background: var(--party, var(--c-default)); color: #fff; display: grid; place-items: start center; padding-top: 6px; font-family: var(--font-pixel); font-size: .8rem; text-shadow: 2px 2px 0 var(--ink); min-height: 34px; }
.podium .place { font-family: var(--font-title); font-size: 1.15rem; letter-spacing: .04em; }
.podium-floor { max-width: 560px; margin: 0 auto 18px; height: 10px; background: var(--ink); }

.topic-table { display: grid; gap: 12px; margin: 10px 0 0; }
.topic-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
.topic-row .t { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); font-size: 1.3rem; letter-spacing: .04em; }
.topic-row .t .portrait { width: 34px; height: auto; margin-left: auto; }
.stack { display: flex; height: 30px; border: 3px solid var(--ink); border-radius: 4px; overflow: hidden; background: #fff; }
.stack span { display: grid; place-items: center; background: var(--party, var(--c-default)); color: #fff; font-family: var(--font-pixel); font-size: .55rem; text-shadow: 1px 1px 0 var(--ink); white-space: nowrap; overflow: hidden; border-right: 2px solid var(--ink); }
.stack span:last-child { border-right: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; margin-top: 8px; }
.legend i { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--party); margin-right: 5px; vertical-align: -2px; }

.end-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 0; }

/* ---------- Animaciones ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1.5deg); } }
@keyframes pop { 0% { transform: scale(.85); opacity: .3; } 70% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes stamp { 0% { transform: rotate(8deg) scale(2.2); opacity: 0; } 100% { transform: rotate(8deg) scale(1); opacity: 1; } }
@keyframes burst { 0% { transform: scale(0) rotate(-20deg); opacity: 1; } 35% { transform: scale(1.1) rotate(4deg); } 75% { opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: shake .25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv .burst-wrap, .result-panel .burst-wrap { opacity: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .host { grid-template-columns: 56px 1fr; gap: 16px; }
  .host .mascot { width: 56px; }
  .rv { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
  .rv .who .portrait, .rv .mystery { width: 66px; }
  .rv .mystery { height: 78px; }
  .rv .who .duo .portrait { width: 40px; }
  .bar-row { grid-template-columns: 50px minmax(0, 1fr); }
  .bar-row .portrait { width: 50px; }
  .burst.big { width: 170px; height: 124px; font-size: 1.9rem; }
  .hud { font-size: .95rem; }
}

/* ---------- Viñetas de color con fondo de hemiciclo (a juego con las caricaturas) ---------- */
.lineup { gap: 12px; align-items: stretch; max-width: 640px; }
.lineup figure {
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 10px 6px 0;
  border: 3px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--ink);
  background-color: var(--party, #8e6cc4);
  background-color: color-mix(in srgb, var(--party, #8e6cc4) 78%, #fff);
  background-image: radial-gradient(rgba(0, 0, 0, .13) 1.2px, transparent 1.5px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .10) 0 5px, transparent 5px 24px);
  background-size: 9px 9px, auto;
}
.lineup figcaption { margin: 8px -6px 0; padding: 5px 6px 3px; background: var(--panel); border-top: 3px solid var(--ink); }
.rv .who .portrait, .bar-row .portrait, .podium .portrait {
  border: 2px solid var(--ink); border-radius: 4px;
  background-color: var(--party, #8e6cc4);
  background-color: color-mix(in srgb, var(--party, #8e6cc4) 60%, #fff);
  background-image: radial-gradient(rgba(0, 0, 0, .13) 1.1px, transparent 1.4px); background-size: 8px 8px;
}
.rv .who .duo .portrait { background: none; border: 0; }
.podium .portrait { width: 80%; }

/* ---------- Ajustes para móvil ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; min-height: 100dvh; touch-action: manipulation; overscroll-behavior-y: none; }
button, summary, .stage, .choice, .prop-main { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.hud { margin-left: calc(-1 * max(16px, env(safe-area-inset-left))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right))); padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.hud button { min-height: 40px; min-width: 44px; }
.help summary { min-height: 40px; }
.lineup figcaption small { display: block; font-family: var(--font-body); font-weight: 700; font-size: .72rem; letter-spacing: 0; opacity: .8; line-height: 1.15; }
.lineup figcaption { text-align: center; }
@media (max-width: 560px) {
  .tool { min-width: 48px; min-height: 44px; }
  .rank-tools { gap: 10px; }
  .btn { min-height: 48px; }
  .dock-inner .btn { flex: 1 1 auto; }
  .dock .status { flex: 0 0 auto; }
  .prop-main { padding: 14px 14px 12px; }
  .lineup { gap: 8px; }
  .lineup figcaption { font-size: .95rem; }
  .podium .block { font-size: .7rem; }
  .menu-actions .btn, .end-actions .btn { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  main { padding-left: 12px; padding-right: 12px; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .btn { font-size: 1.3rem; padding: 10px 14px 8px; }
  .logo { text-shadow: 4px 4px 0 var(--ink); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hud { position: static; }
  .dock { position: static; background: none; padding: 12px 0; }
  main { padding-bottom: 24px; }
}

.hud-audio { display: flex; gap: 6px; }

/* ---------- Pilla al mentiroso ---------- */
.party-chip { display: inline-block; font-family: var(--font-title); font-weight: 400; font-size: 1.05em; letter-spacing: .05em; line-height: 1.15; color: #fff; background: var(--party, var(--c-default)); border: 2px solid var(--ink); border-radius: 4px; padding: 1px 7px 0; text-shadow: 1px 1px 0 var(--ink); vertical-align: 1px; }

/* Cómo se juega: tira de cuatro viñetitas */
.howto { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.howto-step { position: relative; display: grid; justify-items: center; align-content: start; text-align: center; gap: 2px; padding: 14px 8px 10px; background: var(--panel); border: 3px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); font-size: .85rem; font-weight: 400; line-height: 1.3; }
.howto-step:nth-child(odd) { transform: rotate(-1deg); }
.howto-step:nth-child(even) { transform: rotate(1deg); }
.howto-step .n { position: absolute; top: -12px; left: -10px; width: 28px; height: 28px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-title); font-size: 1.05rem; }
.howto-step .icon { font-size: 2rem; line-height: 1.15; }
.howto-step strong { font-family: var(--font-title); font-weight: 400; font-size: 1.2rem; letter-spacing: .04em; }

/* Marcador */
.liar-bar { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.liar-bar .progress { flex: 1; margin: 0; }
.progress span.fail { background: var(--red); }
.score-box { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--yellow); border-radius: 4px; padding: 8px 10px; font-family: var(--font-pixel); font-size: .8rem; line-height: 1; box-shadow: 3px 3px 0 var(--red); white-space: nowrap; }
.score-box small { color: #fff; font-size: .5rem; }
.streak { color: #ff9a3c; font-size: .7rem; }
.streak.pop { animation: pop .45s ease-out; }

/* La viñeta: telón, bambalina dorada, tribuna y público */
.vineta {
  position: relative; overflow: hidden; padding: 36px 14px 40px;
  border: 4px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink);
  background-color: #7c1f24;
  background-image: radial-gradient(rgba(0, 0, 0, .2) 1.2px, transparent 1.6px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .3) 0 6px, rgba(255, 255, 255, .08) 6px 20px, rgba(0, 0, 0, .14) 20px 32px, transparent 32px 42px);
  background-size: 9px 9px, auto;
}
.vineta::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 24px; z-index: 1; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35));
  background: linear-gradient(#e0b13a, #c99522) 0 0 / 100% 9px no-repeat, radial-gradient(circle at 50% 0, #e0b13a 0 13px, var(--ink) 13.5px 15.5px, transparent 16px) 0 0 / 32px 24px repeat-x;
}
.cartela { position: relative; z-index: 4; display: inline-block; margin: 0 0 10px; padding: 4px 10px 3px; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: .82rem; line-height: 1.3; transform: rotate(-1deg); }
.cartela em { font-weight: 400; }
.vineta-grid { position: relative; z-index: 2; display: grid; gap: 14px; }
.escena { position: relative; aspect-ratio: 640 / 500; }
.escena .tribuna { display: block; width: 100%; height: 100%; }
.escena-fx { position: absolute; inset: 0; pointer-events: none; }
.crowd { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 3; pointer-events: none; }
.crowd svg { display: block; width: 100%; height: 100%; }

/* Bocadillo del orador */
.speech {
  position: relative; z-index: 3; cursor: pointer; background: #fff; border: 3px solid var(--ink); border-radius: 26px; padding: 12px 18px; box-shadow: 4px 4px 0 var(--ink);
  opacity: 0; transform: scale(.4); transform-origin: 50% 100%; transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.speech.in { opacity: 1; transform: none; }
.speech::before, .speech::after { content: ''; position: absolute; border-style: solid; }
.speech::before { left: 50%; bottom: -26px; border-width: 26px 6px 0 20px; border-color: var(--ink) transparent transparent transparent; }
.speech::after { left: calc(50% + 5px); bottom: -18px; border-width: 19px 4px 0 13px; border-color: #fff transparent transparent transparent; }
.speech-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-family: var(--font-title); font-size: 1.15rem; letter-spacing: .05em; }
.speech-who .party-chip { font-size: .9rem; }
.speech-text { margin: 0 0 6px; font-size: 1.18rem; line-height: 1.4; min-height: 2.8em; }
.speech:not(.typed-done) .typed::after { content: '▌'; animation: blink .6s steps(2) infinite; }
.speech-topic { margin: 0; font-size: .8rem; font-weight: 400; color: var(--muted); }
@media (min-width: 760px) {
  .vineta-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; }
  .speech { order: 2; margin-bottom: 60px; transform-origin: 0 50%; }
  .speech::before { left: -28px; top: 44%; bottom: auto; border-width: 8px 28px 16px 0; border-color: transparent var(--ink) transparent transparent; }
  .speech::after { left: -19px; top: calc(44% + 4px); bottom: auto; border-width: 5px 20px 10px 0; border-color: transparent #fff transparent transparent; }
}

.liar-question { margin: 18px 0 8px; text-align: center; font-family: var(--font-title); font-size: 1.5rem; letter-spacing: .03em; line-height: 1.2; }

/* Botones de veredicto en el muelle inferior */
.liar-dock { flex-wrap: nowrap; }
.verdict-btn { flex: 1 1 0; min-width: 0; justify-content: flex-start; text-align: left; gap: 10px; padding: 10px 14px 8px; font-size: 1.45rem; }
.verdict-btn .vb-icon { font-size: 1.9rem; line-height: 1; }
.verdict-btn small { display: block; margin-top: 3px; font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: 0; opacity: .85; }
.verdict-btn.chosen:disabled { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: scale(1.03) rotate(-1deg); }
.verdict-btn:disabled:not(.chosen) { opacity: .45; }
.liar-dock .next-btn { flex: 1 1 auto; }

/* Efectos del orador (dentro del SVG) */
.tribuna .fx { display: none; }
.tribuna .orator { transform-origin: 295px 700px; }
.tribuna .rays { opacity: 0; transition: opacity .4s; transform-origin: 320px 250px; animation: spin 18s linear infinite; }
.tribuna .rays path { fill: #ffd23f; }
.escena.enter .orator { animation: walk-in 1s cubic-bezier(.3, .7, .4, 1) both; }
.escena.applause .orator { animation: bow 1.3s ease-in-out both; }
.escena.knock .orator { animation: knock .9s cubic-bezier(.2, .9, .3, 1) both; }
.escena.slap .fx-hand { display: inline; }
.escena.slap .slap-hand { animation: slap-in .75s cubic-bezier(.5, 0, .6, 1) both; }
.escena.impact .fx-impact { display: inline; animation: flash .45s ease-out both; }
.escena.impact .fx-handprint, .escena.impact .fx-stars { display: inline; }
.fx-handprint { opacity: .82; animation: fade-in .15s ease-out both; }
.fx-stars .orb { animation: orb-x 1.1s ease-in-out infinite alternate; }
.fx-stars .orb-y { animation: orb-y 1.1s ease-in-out infinite alternate; }

.escena.mood-happy .orator { animation: hop .42s ease-in-out infinite alternate; }
.escena.mood-happy .rays { opacity: .55; }
.escena.mood-happy .fx-sparkle { display: inline; }
.fx-sparkle .spark { animation: twinkle .9s ease-in-out infinite; }

.escena.mood-sad .orator { animation: slump 2.4s ease-in-out infinite alternate; }
.escena.mood-sad .sprite-wrap { filter: url(#liar-gloom); }
.escena.mood-sad .fx-tears, .escena.mood-sad .fx-cloud, .escena.mood-sad .fx-gloom { display: inline; }
.fx-gloom { animation: fade-in .6s both; }
.fx-tears .jet { animation: jet-x .75s linear infinite; }
.fx-tears .drop { animation: jet-y .75s cubic-bezier(.3, 0, .9, .6) infinite; }
.fx-cloud .cloud-bob { animation: cloud-bob 1.4s ease-in-out infinite alternate; }
.fx-cloud .rain { animation: rain .35s linear infinite; }
.fx-cloud .bolt { animation: bolt 1.8s steps(1) infinite; }

.escena.mood-angry .orator { animation: jitter .11s linear infinite; }
.escena.mood-angry .rays { opacity: .4; }
.escena.mood-angry .rays path { fill: #ff5a3c; }
.escena.mood-angry .fx-flush, .escena.mood-angry .fx-steam { display: inline; }
.fx-flush ellipse { mix-blend-mode: multiply; animation: flush 1s ease-in-out infinite alternate; }
.fx-steam .puff { animation: puff .9s ease-out infinite; }
.fx-steam .vein { animation: vein .45s ease-in-out infinite alternate; }

/* Público: las manos solo aparecen al aplaudir */
.crowd .clap { display: none; }
.vineta.applause .crowd .clap { display: inline; animation: clap-hop .3s ease-in-out infinite alternate; }
.vineta.applause .crowd .hl { animation: clap-l .13s ease-in-out infinite alternate; }
.vineta.applause .crowd .hr { animation: clap-r .13s ease-in-out infinite alternate; }
.vineta.shake { animation: shake-hard .45s; }

/* Capas HTML sobre la escena: onomatopeyas, réplica del orador, sello y puntos */
div.pop:not(.prop) { position: absolute; z-index: 6; transform: translate(-50%, -50%); filter: drop-shadow(3px 3px 0 var(--ink)); }
div.pop:not(.prop) .burst { animation: burst .95s ease-out forwards; }
div.pop:not(.prop).small .burst { width: 98px; height: 74px; font-size: 1.15rem; }
div.pop:not(.prop).big .burst { width: clamp(130px, 30vw, 210px); height: clamp(96px, 22vw, 152px); font-size: clamp(1.6rem, 5.5vw, 2.5rem); }
.react {
  position: absolute; z-index: 5; left: 59%; right: 1%; top: 2%; padding: 10px 12px 8px;
  background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-title); font-size: clamp(.95rem, 2.7vw, 1.35rem); letter-spacing: .03em; line-height: 1.1; text-align: center;
  animation: pop .35s ease-out both;
}
.react::before, .react::after { content: ''; position: absolute; border-style: solid; }
.react::before { left: 10%; bottom: -20px; border-width: 20px 0 0 18px; border-color: var(--ink) transparent transparent transparent; }
.react::after { left: calc(10% + 4px); bottom: -13px; border-width: 13px 0 0 11px; border-color: #fff transparent transparent transparent; }
.react-sad { background: #e3f1ff; border-style: dashed; color: #1d3b6e; }
.react-sad::after { border-top-color: #e3f1ff; }
.react-angry { background: #fff3c4; border: 4px solid var(--red); color: var(--red); transform: rotate(-3deg); animation: pop .35s ease-out both, jitter-html .14s linear .35s infinite; }
.react-angry::before { border-top-color: var(--red); }
.react-angry::after { border-top-color: #fff3c4; }
.liar-stamp {
  position: absolute; z-index: 7; left: 50%; top: 79%; padding: 2px 14px 0; white-space: nowrap;
  font-family: var(--font-title); font-size: clamp(1.5rem, 5.5vw, 2.9rem); letter-spacing: .05em; line-height: 1.1;
  border: 5px solid currentColor; border-radius: 8px; background: rgba(255, 255, 255, .94); box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(-7deg); animation: stamp-in .32s cubic-bezier(.3, 1.5, .6, 1) both;
}
.liar-stamp.good { color: #2f8f1d; }
.liar-stamp.bad { color: var(--red); }
.points-pop {
  position: absolute; z-index: 8; left: 50%; top: 58%; text-align: center; white-space: nowrap;
  font-family: var(--font-pixel); font-size: clamp(1rem, 3.4vw, 1.6rem); color: var(--yellow);
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink);
  transform: translateX(-50%); animation: rise 1.7s ease-out .25s both;
}
.points-pop small { display: block; margin-top: 6px; font-size: .5em; color: #fff; }
.confetti { position: absolute; z-index: 4; top: -4%; width: 9px; height: 14px; border: 1.5px solid var(--ink); transform: rotate(var(--r)); animation: fall 1.9s cubic-bezier(.3, .6, .6, 1) both; }
.ha { position: absolute; z-index: 5; font-family: var(--font-title); font-size: clamp(1rem, 3vw, 1.6rem); color: var(--red); -webkit-text-stroke: 1px var(--ink); animation: ha 1.2s ease-out infinite both; }

/* La clave tras cada respuesta */
.clave { margin-top: 18px; padding: 14px 16px 12px; border-left: 10px solid #2f8f1d; }
.clave.bad { border-left-color: var(--red); }
.clave.appear { animation: pop .35s ease-out; }
.clave h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.clave .gain { font-family: var(--font-pixel); font-size: .8rem; color: #2f8f1d; }
.clave .tip { background: #fff4c2; border: 2px dashed var(--ink); border-radius: 6px; padding: 6px 10px; font-weight: 400; }
.clave details, .owner-card details { margin-top: 6px; font-size: .92rem; font-weight: 400; }
.clave summary, .owner-card summary { cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.clave details p, .owner-card details p { margin: 6px 0 0; }

/* Informe final */
.liar-score { text-align: center; padding-top: 22px; }
.score-line small { display: block; font-family: var(--font-pixel); font-size: .7rem; color: var(--muted); margin-bottom: 8px; }
.big-score { font-family: var(--font-pixel); font-size: clamp(2rem, 9vw, 3.4rem); color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.score-meta { margin: 14px 0 8px; }
.record { margin: 10px 0 0; font-family: var(--font-title); font-size: 1.35rem; letter-spacing: .04em; color: var(--red); }
.liar-score .progress { max-width: 360px; margin: 6px auto 0; }
.owners { display: grid; gap: 18px; margin-top: 12px; }
.owner { padding: 12px 14px 14px; border-top: 10px solid var(--party, var(--c-default)); }
.owner-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.owner-head h3 { font-size: 1.7rem; }
.owner-head h3 small { display: block; font-family: var(--font-body); font-size: .85rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.owner-head .portrait, .oc-meta .portrait {
  border: 2px solid var(--ink); background-color: var(--party, #8e6cc4); background-color: color-mix(in srgb, var(--party, #8e6cc4) 60%, #fff);
  background-image: radial-gradient(rgba(0, 0, 0, .13) 1.1px, transparent 1.4px); background-size: 8px 8px;
}
.owner-head .portrait { width: 60px; height: auto; border-radius: 4px; }
.owner-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.owner-card { padding: 10px 12px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; }
.owner-card.ok { background: #f0fae8; }
.owner-card.ko { background: #fff0f0; }
.oc-text { margin: 0 0 8px; }
.oc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: .85rem; font-weight: 400; color: var(--muted); }
.oc-meta .portrait { width: 34px; height: auto; border-radius: 50%; }
.oc-verdict { margin-left: auto; font-weight: 700; color: var(--ink); }

@media (max-width: 560px) {
  .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .vineta { padding: 34px 8px 30px; box-shadow: 4px 4px 0 var(--ink); }
  .crowd { height: 80px; }
  .speech { padding: 10px 14px; }
  .speech-text { font-size: 1.05rem; }
  .liar-question { font-size: 1.2rem; margin-top: 14px; }
  .score-box { font-size: .7rem; padding: 7px 8px; }
  .verdict-btn { font-size: 1.12rem; gap: 6px; padding: 8px 9px 6px; }
  .verdict-btn .vb-icon { font-size: 1.45rem; }
  .verdict-btn small { font-size: .6rem; }
  .react { left: 55%; padding: 7px 8px 6px; border-radius: 16px; }
  .liar-stamp { border-width: 4px; }
  .oc-verdict { margin-left: 0; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes walk-in {
  0% { transform: translateX(-900px) rotate(-4deg); } 20% { transform: translate(-720px, -22px) rotate(4deg); }
  40% { transform: translate(-540px, 0) rotate(-4deg); } 60% { transform: translate(-360px, -22px) rotate(4deg); }
  80% { transform: translate(-180px, 0) rotate(-2deg); } 100% { transform: none; }
}
@keyframes bow { 30%, 65% { transform: translateY(12px) rotate(7deg); } }
@keyframes knock { 12% { transform: translateX(-70px) rotate(-15deg); } 35% { transform: translateX(12px) rotate(6deg); } 55% { transform: rotate(-4deg); } 75% { transform: rotate(2deg); } }
@keyframes slap-in { 0% { transform: translate(380px, 70px) rotate(25deg); } 36% { transform: translate(0, 0) rotate(-12deg); } 50% { transform: translate(12px, 2px) rotate(-6deg); } 100% { transform: translate(440px, 130px) rotate(22deg); } }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes orb-x { from { transform: translateX(-150px); } to { transform: translateX(150px); } }
@keyframes orb-y { from { transform: translateY(-36px); } to { transform: translateY(36px); } }
@keyframes hop { to { transform: translateY(-28px); } }
@keyframes twinkle { 0%, 100% { transform: scale(.2); opacity: .2; } 50% { transform: scale(1.25) rotate(45deg); opacity: 1; } }
@keyframes slump { from { transform: translateY(26px) rotate(-3deg); } to { transform: translateY(36px) rotate(-1deg); } }
@keyframes jet-x { to { transform: translateX(var(--dx)); } }
@keyframes jet-y { 0% { transform: translateY(0) scale(.6); opacity: 1; } 30% { transform: translateY(-34px) scale(1); } 100% { transform: translateY(160px); opacity: 0; } }
@keyframes cloud-bob { to { transform: translateY(-14px); } }
@keyframes rain { from { transform: translateY(-12px); opacity: 1; } to { transform: translateY(20px); opacity: .3; } }
@keyframes bolt { 0%, 70% { opacity: 0; } 72%, 80% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes jitter { 0%, 100% { transform: translate(-4px, 0); } 50% { transform: translate(4px, 2px); } }
@keyframes jitter-html { 0%, 100% { transform: rotate(-3deg) translate(-1px, 0); } 50% { transform: rotate(-3deg) translate(1px, 1px); } }
@keyframes flush { from { opacity: .3; } to { opacity: .55; } }
@keyframes puff { 0% { transform: translate(0, 0) scale(.3); opacity: 1; } 100% { transform: translate(var(--sx), -95px) scale(1.5); opacity: 0; } }
@keyframes vein { from { transform: scale(.8); } to { transform: scale(1.2); } }
@keyframes clap-hop { to { transform: translateY(-6px); } }
@keyframes clap-l { to { transform: translateX(10px); } }
@keyframes clap-r { to { transform: translateX(-10px); } }
@keyframes shake-hard { 20% { transform: translate(-9px, 4px) rotate(-.6deg); } 40% { transform: translate(8px, -5px) rotate(.5deg); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); } }
@keyframes stamp-in { from { transform: translate(-50%, -50%) rotate(-7deg) scale(2.6); opacity: 0; } }
@keyframes rise { 0% { transform: translate(-50%, 20px) scale(.5); opacity: 0; } 25% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -60px); opacity: 0; } }
@keyframes fall { from { transform: translateY(0) rotate(var(--r)); opacity: 1; } to { transform: translateY(440px) rotate(calc(var(--r) + 540deg)); opacity: 0; } }
@keyframes ha { 0% { transform: translateY(10px) scale(.6); opacity: 0; } 30% { transform: scale(1.1); opacity: 1; } 100% { transform: translateY(-34px) rotate(-10deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .speech { transform: none; }
  .tribuna .rays { transform: none; }
}

/* ---------- Resultados: el voto en el sobre ---------- */
/* Los estados base son los finales (sobre dentro de la urna); las animaciones parten del principio. */
.votar { position: relative; margin: 14px 0 6px; padding: 14px 12px 14px; text-align: center; border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink); background-color: var(--sky); background-image: radial-gradient(rgba(0, 0, 0, .1) 1.2px, transparent 1.5px); background-size: 9px 9px; }
.votar h3 { font-size: 1.8rem; margin-bottom: 2px; }
.votar-stage { position: relative; max-width: 330px; margin: 0 auto; overflow: hidden; }
.votar-svg { display: block; width: 100%; height: auto; }
.votar-svg .slot { fill: var(--slot, #ffd23f); }
.votar-svg .env { transform-origin: 200px 195px; transform: translateY(195px) scale(.45); }
.votar-svg .flap-open, .votar-svg .ring { opacity: 0; }
.votar-svg .flap, .votar-svg .seal-in, .votar-svg .ring, .votar-svg .paper { transform-box: fill-box; transform-origin: center; }
.votar-svg .flap { transform-origin: 50% 0; }
.votar-svg .urn-front { transform-origin: 200px 420px; }
.votar-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.votar-cap { margin: 4px 0 6px; font-size: 1.05rem; }
.votar .disclaimer { margin: 6px 0 8px; }
.votar .replay { margin-top: 4px; }
.votar.wait .env, .votar.wait .votar-cap { opacity: 0; }

.votar.go .paper { animation: v-paper 1s cubic-bezier(.5, 0, .9, .6) .3s backwards; }
.votar.go .flap-open { animation: v-flap-open 1.9s steps(1) backwards; }
.votar.go .flap { animation: v-flap .4s ease-in 1.3s backwards; }
.votar.go .seal-in { animation: v-seal .35s cubic-bezier(.3, 1.5, .6, 1) 1.9s backwards; }
.votar.go .ring { animation: v-ring .5s ease-out 2.1s backwards; }
.votar.go .env { animation: v-env 1.05s cubic-bezier(.5, 0, .5, 1) 3s backwards; }
.votar.go .urn-front { animation: v-squish .5s ease-out 3.85s backwards; }
.votar.go .slot { animation: v-slot .5s linear 3.9s backwards; }
.votar.go .votar-cap { animation: v-cap .4s ease-out 3.9s backwards; }

@keyframes v-paper { from { transform: translateY(-200px) rotate(-10deg); } 70% { transform: translateY(6px) rotate(2deg); } }
@keyframes v-flap-open { from { opacity: 1; } }
@keyframes v-flap { from { transform: scaleY(0); } }
@keyframes v-seal { from { transform: scale(3.2) rotate(-25deg); opacity: 0; } }
@keyframes v-ring { from { transform: scale(.6); opacity: 0; } 15% { opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@keyframes v-env { from { transform: none; } 14% { transform: translateY(-16px) rotate(-3deg); } 30% { transform: none; } }
@keyframes v-squish { 40% { transform: scale(1.04, .93); } 70% { transform: scale(.98, 1.03); } }
@keyframes v-slot { from { fill: #222; } }
@keyframes v-cap { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .votar-svg .env { transform: none; }
  .votar-svg .flap-open { opacity: 0; }
}

/* La caricatura del partido saluda cuando el sobre ya está en la urna */
.votar-hero { position: absolute; left: 0; right: 0; top: 4%; display: grid; justify-items: center; gap: 6px; animation: hero-in .55s cubic-bezier(.3, 1.5, .5, 1) both; }
.hero-bubble { position: relative; max-width: 78%; padding: 6px 12px 4px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-title); font-size: 1.05rem; letter-spacing: .03em; line-height: 1.1; text-align: center; }
.hero-bubble::before, .hero-bubble::after { content: ''; position: absolute; left: 50%; border-style: solid; }
.hero-bubble::before { bottom: -15px; margin-left: -8px; border-width: 15px 8px 0 8px; border-color: var(--ink) transparent transparent transparent; }
.hero-bubble::after { bottom: -9px; margin-left: -5px; border-width: 10px 5px 0 5px; border-color: #fff transparent transparent transparent; }
.hero-heads { display: flex; justify-content: center; gap: 6px; transform-origin: 50% 100%; animation: hero-wiggle 1.1s ease-in-out .5s infinite alternate; }
.hero-head { width: 150px; line-height: 0; }
.votar-hero.n2 .hero-head { width: 108px; }
.votar-hero.n3 .hero-head { width: 92px; }
.hero-head .portrait { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--ink); background-color: var(--party, #8e6cc4); background-color: color-mix(in srgb, var(--party, #8e6cc4) 60%, #fff); background-image: radial-gradient(rgba(0, 0, 0, .13) 1.1px, transparent 1.4px); background-size: 8px 8px; }
.hero-wave { position: absolute; right: 10%; bottom: 8%; font-size: 2.4rem; line-height: 1; transform-origin: 70% 80%; filter: drop-shadow(2px 2px 0 var(--ink)); animation: hero-hand .4s ease-in-out .5s infinite alternate; }
@keyframes hero-in { from { transform: translateY(70px) scale(.4); opacity: 0; } }
@keyframes hero-wiggle { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg) translateY(-4px); } }
@keyframes hero-hand { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }

/* Los desplazamientos automáticos dejan el contenido libre de la barra fija de abajo. */
.clave-slot { scroll-margin-top: 68px; }
.clave, .reveal li { scroll-margin-bottom: calc(110px + env(safe-area-inset-bottom)); }
/* Escena del atril compacta en móviles con poca altura: cabe la viñeta entera sobre los botones. */
@media (max-width: 560px) and (max-height: 820px) {
  .vineta { padding: 28px 10px 12px; }
  .cartela { margin-bottom: 6px; padding: 2px 8px; font-size: .72rem; line-height: 1.25; }
  .vineta-grid { gap: 10px; }
  .escena { aspect-ratio: 640 / 430; }
  .crowd { height: 80px; }
  .speech { padding: 8px 14px; border-radius: 22px; }
  .speech-who { font-size: 1.05rem; margin-bottom: 2px; }
  .speech-text { font-size: 1.02rem; line-height: 1.32; min-height: 0; margin-bottom: 4px; }
  .speech-topic { font-size: .74rem; }
  .verdict-btn { min-height: 52px; }
}
