/* Ghar Ka Quiz — a warm living-room quiz show: navy evening, marigold toran, diya glow, big readable type. */
:root {
  --desk: #141721; --panel: #1f2337; --panel-2: #282d47; --line: #363d5c; --ink: #f5f3ff; --muted: #aeb0cb;
  --orange: #ff9a3c; --pink: #f04fa8; --violet: #8b5cf6; --teal: #2fd4c8; --gold: #ffc93c; --good: #5fd08a; --bad: #ff8a7a;
  --grad: linear-gradient(100deg, var(--orange), var(--pink) 50%, var(--violet));
  --display: "Outfit", "Trebuchet MS", system-ui, sans-serif; --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { background: radial-gradient(70% 45% at 50% -5%, rgba(255, 154, 60, .16), transparent 70%), radial-gradient(60% 50% at 100% 100%, rgba(139, 92, 246, .14), transparent 70%), var(--desk); background-attachment: fixed; color: var(--ink); font-family: var(--body); font-size: 16px; -webkit-tap-highlight-color: transparent; min-height: 100vh; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 12px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
svg { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(240, 79, 168, .28); }
.btn.teal { background: var(--teal); color: #08221f; }
.btn.ghost { border: 2px solid var(--line); }
.btn.small { min-height: 42px; padding: 8px 14px; font-size: 15px; }
.btn.big { min-height: 56px; min-width: min(260px, 100%); font-size: 19px; }
.btn:disabled { opacity: .45; cursor: default; }
.kick { color: var(--gold); font: 800 13px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.small { color: var(--muted); font-size: 14px; font-weight: 700; }
.av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pc); color: #141721; font: 800 14px var(--display); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .15); }

/* ---------- set-up ---------- */
.setup { max-width: 1120px; margin: 0 auto; padding: 14px 16px 60px; display: flex; flex-direction: column; gap: 22px; }
.ptop { display: flex; gap: 14px; align-items: flex-start; }
.ptop h1 { font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; }
.ptop .sub { color: var(--muted); font-weight: 700; margin-top: 4px; }
.back { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--line); font-weight: 800; white-space: nowrap; }
.kind { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
.kind span { color: var(--muted); font-size: 14px; font-weight: 700; margin-left: 8px; font-family: var(--body); white-space: nowrap; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pk { position: relative; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 18px; background: var(--panel); border: 2px solid var(--line); transition: transform .15s, border-color .15s, background .15s; min-width: 0; }
@media (hover: hover) { .pk:hover { transform: translateY(-2px); border-color: var(--pc); } }
.pk .pico { width: 52px; height: 52px; flex: none; }
.pk > span:not(.tick) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk b { font: 800 17px/1.2 var(--display); }
.pk small { color: var(--muted); font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.pk i { font-style: normal; font-weight: 800; font-size: 12.5px; color: var(--pc); margin-top: 2px; }
.pk .tick { position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; background: var(--pc); color: #141721; opacity: 0; transform: scale(.6); transition: .15s; }
.pk.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, var(--panel)); }
.pk.on .tick { opacity: 1; transform: none; }
.pk.locked { opacity: .78; border-style: dashed; }
.pk.locked .pico { filter: grayscale(.6); opacity: .7; }
.pk .plus { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); }
.lockic { width: 14px; height: 14px; }
.two-up { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.seg { display: grid; gap: 10px; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg button { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); min-width: 0; }
.seg button b { font: 800 17px var(--display); }
.seg button small { color: var(--muted); font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.seg button small.who { color: var(--teal); font-size: 12.5px; }
.seg button[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 154, 60, .12); }
.toggle { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); }
.toggle i { flex: none; width: 52px; height: 30px; border-radius: 999px; background: #3a405f; position: relative; transition: .2s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle[aria-pressed="true"] { border-color: var(--teal); }
.toggle[aria-pressed="true"] i { background: var(--teal); }
.toggle[aria-pressed="true"] i::after { left: 25px; }
.toggle b { display: block; font: 800 17px var(--display); }
.toggle small { color: var(--muted); font-weight: 700; font-size: 13.5px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { min-width: 52px; min-height: 46px; border-radius: 14px; background: var(--panel); border: 2px solid var(--line); font: 800 18px var(--display); }
.chip[aria-pressed="true"] { background: var(--gold); color: #141721; border-color: var(--gold); }
.names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nm { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 2px solid color-mix(in srgb, var(--pc) 50%, var(--line)); text-align: left; min-width: 0; }
.nm b { font: 800 16px var(--display); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm small { color: var(--muted); font-weight: 800; font-size: 12.5px; }
.sgo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 4px; }
#play[data-sub="board"] .timer { visibility: hidden; }

/* ---------- playing ---------- */
.play { padding-bottom: 20px; }
.toran-wrap { height: 50px; overflow: hidden; pointer-events: none; }
.toran { width: 100%; height: 66px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.playwrap { max-width: 1240px; margin: -8px auto 0; padding: 0 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.stage { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.qbar { display: flex; align-items: center; gap: 12px; }
.qico .pico { width: 40px; height: 40px; }
.qinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qinfo b { font: 800 18px/1.2 var(--display); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qinfo span { color: var(--muted); font-weight: 800; font-size: 14px; }
.timer { --f: 0; position: relative; width: 56px; height: 56px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .tr { fill: rgba(255, 255, 255, .06); stroke: #2f3552; stroke-width: 5; }
.timer .tf { fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(var(--f) * 100); transition: stroke-dashoffset .1s linear, stroke .3s; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 21px var(--display); font-variant-numeric: tabular-nums; }
.timer.reading .tf { stroke: var(--gold); }
.timer.low .tf { stroke: var(--pink); }
.timer.low b { color: var(--pink); animation: beat 1s ease-in-out infinite; }
.timer.idle .tf { stroke: transparent; }
@keyframes beat { 50% { transform: scale(1.18); } }
.qcard { position: relative; border-radius: 26px; padding: 26px 22px 30px; min-height: 150px; display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, #262b46, #1c2034); box-shadow: 0 0 0 2px rgba(255, 201, 60, .28), 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06); overflow: hidden; }
.qcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 120%, rgba(255, 176, 0, .16), transparent 70%); pointer-events: none; }
.qcard h2 { position: relative; font-size: clamp(22px, 4.6vw, 40px); line-height: 1.22; font-weight: 800; max-width: 26ch; animation: qin .45s ease-out; }
.qcard.hidden-q h2 { visibility: hidden; }
@keyframes qin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.qcard .diya { position: absolute; bottom: 4px; width: 38px; height: 38px; opacity: .9; }
.qcard .diya.l { left: 10px; } .qcard .diya.r { right: 10px; }
.flame { transform-origin: 32px 30px; animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 30% { transform: scale(.94, 1.06) rotate(-2deg); } 60% { transform: scale(1.04, .96) rotate(2deg); } }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ans { position: relative; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 14px; text-align: left; border-radius: 18px; background: color-mix(in srgb, var(--ac) 10%, var(--panel)); border: 3px solid color-mix(in srgb, var(--ac) 55%, transparent); font: 800 19px/1.2 var(--display); transition: transform .12s, background .2s, opacity .3s, filter .3s; min-width: 0; }
.ans .mk { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.ans .at { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (hover: hover) { .ans:not([aria-disabled]):hover { transform: translateY(-2px); background: color-mix(in srgb, var(--ac) 22%, var(--panel)); } }
.ans:not([aria-disabled]):active { transform: scale(.98); }
.ans[aria-disabled] { cursor: default; }
.answers.closed .ans { opacity: .5; min-height: 60px; }
.ans.mine { background: var(--ac); color: var(--ai); border-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 40%, transparent), 0 10px 26px rgba(0, 0, 0, .35); }
.ans.mine::after { content: "Locked"; position: absolute; top: -10px; right: 12px; background: #fff; color: #141721; font: 800 11.5px var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.answers.revealed .ans.wrong { animation: dim .35s .6s both; }
.answers.revealed .ans.right { animation: win .55s .6s both; }
.answers.revealed .ans.mine.wrong { animation: dim .35s .6s both, shake .4s .65s; }
.answers.revealed .ans.mine::after { content: "You"; }
@keyframes dim { to { opacity: .42; filter: saturate(.4); } }
@keyframes win { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1.02); } }
.answers.shown .ans.right { background: var(--ac); color: var(--ai); border-color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 45%, transparent), 0 0 34px color-mix(in srgb, var(--ac) 60%, transparent); }
@keyframes shake { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
.ans .ok { position: absolute; top: -12px; left: -8px; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #138a45; display: grid; place-items: center; font: 900 18px var(--body); box-shadow: 0 3px 10px rgba(0, 0, 0, .35); animation: pop .4s .9s both; }
@keyframes pop { from { transform: scale(0); } }
.ans .who { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 40%; }
.ans .who .av { width: 24px; height: 24px; font-size: 12px; box-shadow: 0 0 0 2px #fff; animation: pop .3s 1s both; }
.status { text-align: center; color: var(--muted); font-weight: 800; font-size: 16px; min-height: 22px; }
.dyk { border-radius: 18px; padding: 14px 16px; background: rgba(255, 201, 60, .08); border: 1px solid rgba(255, 201, 60, .3); display: flex; flex-direction: column; gap: 6px; animation: qin .4s 1s both; }
.dyk .v { font: 800 20px var(--display); }
.dyk .v.good { color: var(--good); } .dyk .v.bad { color: var(--bad); }
.dyk .ans-line { font-weight: 700; }
.dyk .fact { font-weight: 700; font-size: 16px; line-height: 1.45; color: #e6e4f6; }
.dk { color: var(--gold); font-weight: 900; margin-right: 4px; }
.locks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lk { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 800; font-size: 14px; max-width: 100%; }
.lk .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lk i { font-style: normal; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.lk b { color: var(--muted); font-size: 13px; white-space: nowrap; }
.lk.in { border-color: rgba(47, 212, 200, .6); } .lk.in b { color: var(--teal); }
.lk.good { border-color: rgba(95, 208, 138, .7); } .lk.good b { color: var(--good); animation: pop .3s 1s both; }
.lk.bad b { color: var(--bad); }
.lk.me { box-shadow: 0 0 0 2px var(--gold); }
.act { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.auto { color: var(--muted); font-weight: 800; font-size: 14px; }

/* scoreboard */
.sb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sb li { display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; grid-template-areas: "pos av sn pts" "pos av bar sm"; align-items: center; column-gap: 9px; row-gap: 3px; padding: 7px 10px; border-radius: 14px; background: var(--panel-2); }
.sb li.me { box-shadow: 0 0 0 2px var(--gold); }
.sb .pos { grid-area: pos; font: 800 16px var(--display); color: var(--gold); text-align: center; }
.sb .av { grid-area: av; }
.sb .sn { grid-area: sn; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb .sn i { font-style: normal; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.sb .bar { grid-area: bar; height: 7px; border-radius: 9px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.sb .bar i { display: block; height: 100%; background: var(--pc); border-radius: 9px; transition: width .8s ease-out; }
.sb .pts { grid-area: pts; font: 800 17px var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.sb small { grid-area: sm; color: var(--muted); font-weight: 700; font-size: 12px; text-align: right; }
.sb.big li { padding: 11px 14px; }
.sb.big .sn { font-size: 18px; } .sb.big .pts { font-size: 22px; }
.sb.big li:first-child { background: linear-gradient(100deg, rgba(255, 201, 60, .2), var(--panel-2) 60%); }
.bview { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 10px; animation: qin .4s ease-out; }
.btop { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.btop h2 { font-size: clamp(26px, 5vw, 40px); }
.btop .diya { width: 44px; height: 44px; }
.next-up { text-align: center; color: var(--muted); font-weight: 800; }
.next-up b { color: var(--ink); }
.bview .btns { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* side panel (wide screens) */
.side { display: none; }
.sp-card { background: var(--panel); border-radius: 22px; padding: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .05); }
.sp-h { color: #9aa0bd; font: 800 12.5px/1.2 var(--body); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 10px; }
.sp-l { font-weight: 800; color: #d9dbee; font-size: 14.5px; margin-bottom: 4px; }
.dots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.dots .rd { display: flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #343a58; }
.dots i.done { background: var(--teal); } .dots i.now { background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 60, .3); }
.join { text-align: center; border: 2px dashed rgba(47, 212, 200, .55); background: rgba(47, 212, 200, .06); }
.join .jl { font-weight: 800; color: var(--teal); }
.join .code { font: 800 34px/1.1 var(--display); letter-spacing: .16em; color: #fff; margin: 6px 0; }
.join small { color: var(--muted); font-weight: 700; font-size: 13px; }
@media (min-width: 1000px) {
  .playwrap { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
  .ans { min-height: 92px; font-size: 21px; }
  .qcard { min-height: 200px; }
}

/* Show on TV: the host's big screen */
body.tv .toran-wrap { height: 60px; }
body.tv .qcard { min-height: 28vh; }
body.tv #play[data-sub="reveal"] .qcard { min-height: 0; padding: 14px 20px 18px; }
body.tv #play[data-sub="reveal"] .qcard h2 { font-size: clamp(22px, 2.6vw, 42px); }
body.tv #play[data-sub="reveal"] .qcard .diya { display: none; }
body.tv .qcard h2 { font-size: clamp(28px, 4vw, 64px); max-width: 30ch; }
body.tv .ans { min-height: 12vh; font-size: clamp(20px, 2.3vw, 34px); }
body.tv .ans .mk { width: clamp(40px, 4vw, 64px); height: clamp(40px, 4vw, 64px); }
body.tv .timer { width: 76px; height: 76px; } body.tv .timer b { font-size: 28px; }
body.tv .qinfo b { font-size: 24px; } body.tv .qinfo span { font-size: 17px; }
body.tv .dyk .fact { font-size: 22px; } body.tv .dyk .ans-line { font-size: 20px; }
body.tv .status { font-size: 22px; color: var(--gold); }
@media (min-width: 1000px) { body.tv .playwrap { grid-template-columns: minmax(0, 1fr) 360px; max-width: 1600px; } }

/* pass and play cover */
.cover { position: fixed; inset: 0; z-index: 950; background: radial-gradient(70% 50% at 50% 30%, rgba(255, 154, 60, .2), transparent 70%), #141721; display: flex; flex-direction: column; overflow: auto; }
.cover > .toran { flex: none; }
.cv { margin: auto; width: 100%; max-width: 520px; padding: 0 20px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.cv-av .av { width: 84px; height: 84px; font-size: 40px; }
.cv h2 { font-size: clamp(26px, 6vw, 38px); font-weight: 800; }
.cv h2 b { display: block; font-size: 1.15em; }
.cv p { color: var(--muted); font-weight: 800; }

/* the end */
.end { min-height: 100vh; }
.end .toran { height: 66px; }
.end-in { max-width: 760px; margin: 0 auto; padding: 6px 16px 96px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.end-in h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; width: 100%; max-width: 560px; margin-top: 8px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; animation: rise .6s ease-out both; }
.step.p1 { animation-delay: .5s; } .step.p2 { animation-delay: .25s; } .step.p3 { animation-delay: 0s; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.step .av { width: 52px; height: 52px; font-size: 24px; box-shadow: 0 0 0 3px #fff; }
.step.p1 .av { width: 66px; height: 66px; font-size: 30px; }
.step.me b { color: var(--gold); }
.step b { font: 800 15px/1.2 var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step span { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.step .blk { width: 100%; border-radius: 14px 14px 4px 4px; display: grid; place-items: center; background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 70%, #fff 0%), color-mix(in srgb, var(--pc) 45%, #141721)); }
.step .blk i { font: 800 34px var(--display); font-style: normal; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.step.p1 .blk { height: 130px; } .step.p2 .blk { height: 96px; } .step.p3 .blk { height: 72px; }
.step.empty { visibility: hidden; }
.podium.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 380px; }
.rest { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.rest li { display: flex; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--panel); font-weight: 800; }
.rest li b { margin-left: auto; }
.end-stars { display: flex; gap: 8px; font-size: 46px; }
.end-stars span { color: #3a4060; animation: pop .45s both; }
.end-stars span.on { color: var(--gold); text-shadow: 0 0 18px rgba(255, 201, 60, .6); }
.end-line { color: var(--muted); font-weight: 800; }
.new-badges .nb { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.new-badges .nb > div { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; }
.new-badges .bdg { width: 64px; height: 64px; animation: pop .5s 1.6s both; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.btns.col { flex-direction: column; align-items: stretch; width: 100%; max-width: 380px; }
.confetti { position: fixed; inset: 0; z-index: 960; pointer-events: none; width: 100vw; height: 100vh; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 9, 16, .72); display: flex; align-items: center; justify-content: center; padding: 12px; }
.box { width: 100%; max-width: 480px; max-height: calc(100vh - 24px); overflow: auto; background: #1b1d2e; border-radius: 24px; padding: 20px 18px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.box.wide { max-width: 640px; }
.box h2 { font-size: 24px; margin-bottom: 8px; }
.box p { margin-bottom: 8px; line-height: 1.45; }
.steps { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-weight: 700; line-height: 1.45; color: #e2e1f2; }
.steps .mini .mk { display: inline-block; width: 24px; height: 24px; vertical-align: middle; margin-right: 2px; }
.phrases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.phrases .btn { white-space: normal; font-size: 15px; min-height: 52px; }
.startot { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.startot .bigstar { color: var(--gold); font-size: 34px; }
.startot b { font: 800 30px var(--display); }
.startot span:last-child { color: var(--muted); font-weight: 800; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.bcell { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 8px; border-radius: 16px; background: var(--panel); }
.bcell .bdg { width: 54px; height: 54px; }
.bcell b { font: 800 14px var(--display); }
.bcell small { color: var(--muted); font-weight: 700; font-size: 12px; line-height: 1.3; }
.bcell:not(.on) b { color: var(--muted); }
.kh { font-size: 17px; margin: 16px 0 8px; }
.kia { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kia li { display: grid; grid-template-columns: 30px 90px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-weight: 800; }
.kia .pico { width: 30px; height: 30px; }
.kia small { color: var(--muted); font-weight: 700; }
.meter { display: block; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--pc); }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1100; background: #f5f3ff; color: #141721; font-weight: 800; padding: 11px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100vw - 24px); text-align: center; }

@media (max-width: 860px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two-up { grid-template-columns: minmax(0, 1fr); } .names { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .kind span { display: block; margin: 2px 0 0; white-space: normal; }
  .packs { grid-template-columns: minmax(0, 1fr); }
  .pk { padding: 10px 12px; } .pk .pico { width: 44px; height: 44px; }
  .seg.three, .seg.two { grid-template-columns: minmax(0, 1fr); }
  .seg.three.len { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toran-wrap { height: 40px; }
  .qcard { padding: 20px 14px 26px; min-height: 120px; border-radius: 22px; }
  .qcard .diya { width: 28px; height: 28px; }
  .ans { min-height: 70px; padding: 8px 10px; gap: 8px; font-size: 16.5px; border-radius: 16px; }
  .ans .mk { width: 32px; height: 32px; }
  .ans .who { position: absolute; right: 6px; bottom: -10px; max-width: 70%; }
  .timer { width: 50px; height: 50px; }
  .qinfo b { font-size: 16px; }
  .phrases { grid-template-columns: minmax(0, 1fr); }
  .kia li { grid-template-columns: 26px 70px minmax(0, 1fr) auto; }
}
@media (max-width: 340px) { .answers { grid-template-columns: minmax(0, 1fr); } .ans { min-height: 56px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
