:root {
  --cream: #FFF4EC; --paper: #FFFDFB; --ink: #4A2433; --muted: #9A7E88;
  --rosa: #F59AB8; --amarillo: #FFD36E; --vino: #8C2F4B; --verde: #8FD3AE; --lila: #B9A7F5; --cielo: #7EC8F0;
  --good: #2FA36B; --bad: #E5484D;
  --r: 22px; --shadow: 0 10px 30px rgba(140, 47, 75, .12), 0 2px 6px rgba(140, 47, 75, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); font-family: 'Fredoka', system-ui, sans-serif; }
body { overscroll-behavior: none; }
button { font-family: inherit; color: inherit; }
#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: env(safe-area-inset-top) 14px calc(20px + env(safe-area-inset-bottom)); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* Fondo acuarela */
.blobs { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blobs span { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.blobs span:nth-child(1) { width: 60vw; height: 60vw; background: var(--rosa); top: -15vw; left: -15vw; }
.blobs span:nth-child(2) { width: 55vw; height: 55vw; background: var(--amarillo); bottom: -10vw; right: -20vw; animation-delay: -6s; }
.blobs span:nth-child(3) { width: 45vw; height: 45vw; background: var(--verde); top: 40%; left: 30%; opacity: .35; animation-delay: -12s; }
@keyframes float { to { transform: translate(6vw, 4vh) scale(1.1); } }

.center { min-height: 90dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.logo { font-size: 58px; font-weight: 700; color: var(--vino); letter-spacing: -1px; text-shadow: 3px 3px 0 var(--amarillo); }
.logo span { color: var(--rosa); }
.tagline { margin: -6px 0 18px; color: var(--muted); font-size: 18px; }
.home .btn { width: min(100%, 360px); }

.card { background: var(--paper); border-radius: var(--r); padding: 20px 18px; box-shadow: var(--shadow); margin: 12px 0; text-align: center; width: 100%; position: relative; }
.card h2 { margin: 6px 0 12px; font-size: 26px; line-height: 1.15; color: var(--vino); }
.card h3 { margin: 18px 0 8px; font-size: 18px; color: var(--vino); }
.card.secret { background: linear-gradient(160deg, #2E1A2A, #4A2433); color: #fff; }
.card.secret h2 { color: var(--amarillo); }
.card.final h2 { font-size: 30px; }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.shake { animation: shake .5s; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.label { margin: 10px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: 15px; margin: 10px 0; }
.big { font-size: 19px; line-height: 1.35; margin: 10px 0; }
.huge { font-size: 34px !important; }
.muted { color: var(--muted); }
.question { font-size: 24px; }
.question.small { font-size: 19px; }

.btn { display: block; width: 100%; border: 0; border-radius: 16px; padding: 15px 18px; margin: 10px 0 0; font-size: 18px; font-weight: 600; cursor: pointer;
  background: var(--vino); color: #fff; box-shadow: 0 4px 0 #5e1d32; transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #5e1d32; }
.btn.alt { background: var(--rosa); color: var(--vino); box-shadow: 0 4px 0 #d77396; }
.btn.good { background: var(--good); box-shadow: 0 4px 0 #1f7a4f; }
.btn.danger { background: var(--bad); box-shadow: 0 4px 0 #a82e32; }
.btn.ghost { background: transparent; color: var(--vino); box-shadow: none; border: 2px solid #f0d6dd; }
.btn.small { font-size: 15px; padding: 10px; }
.btn.tiny { display: inline-block; width: auto; font-size: 13px; padding: 7px 10px; margin: 0 0 0 6px; box-shadow: none; }
.btn.big-btn { font-size: 21px; padding: 18px; }
.btn:disabled { opacity: .6; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; font-size: inherit; cursor: pointer; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 4px; background: rgba(255, 244, 236, .85); backdrop-filter: blur(8px); font-weight: 600; }
.top .me { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .lvl { font-size: 13px; color: var(--muted); }
.top .score { background: var(--amarillo); padding: 4px 10px; border-radius: 99px; }
.icon { background: none; border: 0; font-size: 20px; padding: 4px; cursor: pointer; }
.banner { background: var(--amarillo); border-radius: 14px; padding: 10px 14px; margin: 8px 0; text-align: center; font-weight: 500; }
.banner.warn { background: #FFE1E1; color: #8a1f22; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 99px; z-index: 60; }

label { display: block; text-align: left; font-weight: 600; margin: 12px 0; color: var(--vino); }
input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 20px; padding: 14px; border-radius: 14px; border: 2px solid #f0d6dd; background: #fff; color: var(--ink); }
#f-code { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-weight: 700; }
.avatars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.avatar { font-size: 28px; padding: 8px 0; border-radius: 14px; border: 2px solid transparent; background: #FFF1F5; cursor: pointer; }
.avatar.picked { border-color: var(--vino); background: #FFE3EC; transform: scale(1.08); }

.code { font-size: 46px; font-weight: 700; letter-spacing: 8px; color: var(--vino); background: #FFF1F5; border-radius: 16px; padding: 8px; margin-bottom: 6px; }
.rank { list-style: none; padding: 0; margin: 6px 0; text-align: left; }
.rank li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; margin: 4px 0; background: #FFF6F0; }
.rank li.me { background: #FFE3EC; outline: 2px solid var(--rosa); }
.rank li > b { margin-left: auto; font-size: 18px; }
.rank li .pos { width: 22px; font-weight: 700; color: var(--muted); }
.rank li .grow { flex: 1; }
.rank b.gpos { color: var(--good); } .rank b.gneg { color: var(--bad); }
.who { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.av { font-size: 22px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; } .dot.on { background: var(--good); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.chip { background: #FFF1F5; padding: 6px 12px; border-radius: 99px; font-weight: 600; }

.timer { position: relative; height: 12px; background: #F5E6EA; border-radius: 99px; margin: 12px 0; overflow: hidden; }
.timer .bar { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, var(--verde), var(--amarillo)); border-radius: 99px; transition: width .2s linear; }
.timer.low .bar { background: var(--bad); }
.timer .secs { position: absolute; right: 8px; top: -2px; font-size: 11px; font-weight: 700; }
.timer[data-total="0"] { height: auto; background: none; } .timer[data-total="0"] .secs { position: static; font-size: 22px; }
.big-timer .secs, .turn-timer .secs { display: block; font-size: 72px; font-weight: 700; color: var(--vino); }
.turn-timer.low .secs { color: var(--bad); animation: pulse .5s infinite alternate; }
.stopwatch .secs { display: block; font-size: 56px; font-weight: 700; color: var(--vino); }
@keyframes pulse { to { transform: scale(1.12); } }

.qhead { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.tag { background: #FFF1F5; color: var(--vino); padding: 4px 10px; border-radius: 99px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.opt { position: relative; min-height: 84px; border: 0; border-radius: 16px; padding: 12px 10px 12px 34px; font-size: 17px; font-weight: 600; color: #fff; text-align: left; cursor: pointer; display: flex; align-items: center; transition: transform .1s, opacity .2s; }
.opt .shape { position: absolute; left: 10px; top: 10px; font-size: 16px; opacity: .8; }
.opt .count { position: absolute; right: 10px; top: 8px; background: rgba(255, 255, 255, .3); border-radius: 99px; padding: 0 8px; font-size: 14px; }
.o0 { background: #E5689A; } .o1 { background: #5B8DEF; } .o2 { background: #E8A93A; } .o3 { background: #3FAE7A; }
.opt:active { transform: scale(.96); }
.opts.locked .opt { opacity: .45; pointer-events: none; }
.opts.answered .opt:not(.picked) { opacity: .35; }
.opt.picked { outline: 4px solid var(--ink); }
.opts.reveal .opt.wrong, .opt.gone { opacity: .25; }
.opt.right { outline: 4px solid var(--good); box-shadow: 0 0 0 7px rgba(47, 163, 107, .25); opacity: 1 !important; }
.opt:disabled { cursor: default; }
.result-banner { margin: 14px 0 4px; padding: 12px; border-radius: 14px; font-size: 20px; font-weight: 700; }
.result-banner.good { background: #DDF5E7; color: #1f7a4f; } .result-banner.bad { background: #FFE1E1; color: #8a1f22; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.people.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; border: 2px solid #f0d6dd; background: #fff; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink); }
.person .av { font-size: 32px; }
.person.picked { border-color: var(--vino); background: #FFE3EC; }
.card.secret .person { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }
.judge-box { background: #FFF8E3; border-radius: 16px; padding: 10px; margin-top: 10px; }
.mystery { font-size: 54px; letter-spacing: 10px; animation: pulse 1s infinite alternate; }

.bars { text-align: left; margin-top: 10px; }
.barrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 8px 0; }
.barfill { height: 14px; background: var(--lila); border-radius: 99px; }
.barrow.top .barfill { background: var(--rosa); }

.level-badge { display: inline-block; font-size: 44px; font-weight: 700; color: #fff; background: var(--vino); padding: 10px 26px; border-radius: 22px; transform: rotate(-3deg); box-shadow: 6px 6px 0 var(--amarillo); }
.level-badge small { display: block; font-size: 14px; font-weight: 500; opacity: .8; }
.presenter { display: flex; flex-direction: column; align-items: center; font-size: 26px; font-weight: 700; margin: 6px 0; }
.presenter .av { font-size: 64px; }

.wheel-wrap { position: relative; width: min(84vw, 340px); margin: 8px auto; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--vino); font-size: 28px; }
.wheel { width: 100%; filter: drop-shadow(0 8px 16px rgba(140, 47, 75, .2)); animation: spin 4.6s cubic-bezier(.12, .7, .15, 1) forwards; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(var(--rot)); } }
.wheel-result { font-size: 30px; font-weight: 700; color: var(--vino); opacity: 0; animation: pop .5s 4.7s forwards; }
@keyframes appear { to { opacity: 1; } }
.wheel-result { animation: appear .4s 4.7s forwards; }

.mini-wrap { text-align: center; }
.mini-title { font-size: 22px; font-weight: 700; color: var(--vino); margin-top: 8px; }
.practice-tag { display: inline-block; margin-top: 10px; background: var(--amarillo); padding: 4px 12px; border-radius: 99px; font-weight: 700; }
.mini-emoji { font-size: 64px; }
#mini-host { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.mini-score { font-size: 18px; margin-bottom: 8px; }
.mini-area { border-radius: 16px; transition: background .2s; }
.mini-area.ok { animation: flashok .35s; } .mini-area.bad { animation: flashbad .35s; }
@keyframes flashok { 30% { background: #DDF5E7; } } @keyframes flashbad { 30% { background: #FFE1E1; } }
.mini-hint { font-size: 18px; margin: 6px 0; }
.stroop-word { font-size: 46px; font-weight: 700; margin: 16px 0; letter-spacing: 2px; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-btn { min-height: 70px; border: 0; border-radius: 16px; font-size: 22px; font-weight: 700; background: #FFF1F5; cursor: pointer; }
.odd-grid { display: grid; gap: 6px; }
.odd-cell { aspect-ratio: 1; border: 0; border-radius: 12px; background: #FFF6F0; font-size: 26px; cursor: pointer; padding: 0; }
.odd-cell.num { font-size: 24px; font-weight: 700; color: var(--vino); }
.odd-cell.done { background: var(--verde); color: #fff; }
.mem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mem-pad { aspect-ratio: 1; border: 0; border-radius: 22px; opacity: .45; cursor: pointer; transition: opacity .1s, transform .1s; }
.mem-pad.lit { opacity: 1; transform: scale(1.05); }
.maze { display: block; margin: 0 auto; border-radius: 12px; touch-action: none; }
.dpad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 6px; justify-content: center; margin-top: 12px; }
.dpad-btn { border: 0; border-radius: 14px; background: var(--rosa); font-size: 26px; color: var(--vino); cursor: pointer; }
.dpad-btn.d0 { grid-column: 2; grid-row: 1; } .dpad-btn.d3 { grid-column: 1; grid-row: 2; } .dpad-btn.d2 { grid-column: 2; grid-row: 2; } .dpad-btn.d1 { grid-column: 3; grid-row: 2; }

.ladder { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 14px; }
.ladder span { width: 28px; height: 28px; line-height: 28px; border-radius: 8px; font-size: 13px; font-weight: 700; background: #F5E6EA; }
.ladder span.safe { outline: 2px solid var(--amarillo); }
.ladder span.done { background: var(--verde); color: #fff; }
.ladder span.cur { background: var(--vino); color: #fff; transform: scale(1.15); }
.lifelines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.life { border: 2px solid var(--vino); background: #fff; border-radius: 14px; padding: 10px; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--vino); }
.life:disabled { opacity: .3; text-decoration: line-through; }
.reveal-text { font-size: 22px; }

.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; margin: 18px 0; }
.pod { display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.pod .av { font-size: 40px; }
.pod .step { width: 100%; border-radius: 14px 14px 4px 4px; color: #fff; font-size: 28px; padding: 8px 0; margin-top: 4px; }
.pod.p1 .step { height: 110px; background: var(--amarillo); color: var(--vino); }
.pod.p2 .step { height: 80px; background: var(--rosa); }
.pod.p3 .step { height: 60px; background: var(--lila); }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(74, 36, 51, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.overlay .card { max-width: 520px; max-height: 88dvh; overflow: auto; text-align: left; }
.overlay .card h2 { text-align: center; }
.onboard .dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0 4px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: #f0d6dd; } .dots span.on { background: var(--vino); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid #f0d6dd; border-top-color: var(--vino); animation: rot 1s linear infinite; margin: 20px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

.read-aloud { background: var(--vino); color: #fff; border-radius: 16px; padding: 12px 14px; margin: 8px 0; font-size: 19px; font-weight: 600; line-height: 1.3; box-shadow: 0 4px 0 #5e1d32; animation: pop .4s; }
.read-aloud span { display: block; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--amarillo); margin-bottom: 4px; }

.version { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }

/* Opciones con identidad Pum! Party! */
.o0 { background: #F7B6CB; } .o1 { background: #C7B8F5; } .o2 { background: #FFE08F; } .o3 { background: #A8E2C2; }
.opt { color: var(--ink); }
.opt .shape { font-size: 20px; opacity: 1; top: 8px; }
.opt .otext { padding-left: 4px; }
.opt.mywrong { outline: 4px solid var(--bad); box-shadow: 0 0 0 7px rgba(229, 72, 77, .25); opacity: 1 !important; background: #FFD6D6; }
.opts.reveal .opt.right { background: #BDEFD2; }
.gate { margin: 4px 0 12px; text-align: center; }
.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.t3 { display: flex; flex-direction: column; align-items: center; background: #FFF6F0; border-radius: 14px; padding: 8px 4px; font-size: 14px; }
.t3.me { outline: 2px solid var(--rosa); background: #FFE3EC; }
.t3 .m { font-size: 20px; } .t3 .av { font-size: 26px; } .t3 small { color: var(--muted); }
.votes { list-style: none; padding: 0; margin: 6px 0; text-align: left; }
.votes li { padding: 6px 10px; border-radius: 10px; background: #FFF6F0; margin: 4px 0; }
.votes .arrow { color: var(--muted); margin: 0 4px; }
ol.how { text-align: left; padding-left: 22px; margin: 10px 0; line-height: 1.4; }
ol.how li { margin: 4px 0; }
.odd-cell.topo { font-size: 34px; background: #EFFAF3; }
.odd-cell.static { display: flex; align-items: center; justify-content: center; font-size: 22px; aspect-ratio: 1; }

/* Misma pantalla redibujada (p. ej., cambia el conteo de listos): sin animación, sin parpadeo */
.no-anim .pop, .no-anim .shake, .no-anim .read-aloud { animation: none !important; }
