body { min-height: 100dvh; background: radial-gradient(circle at 100% 0, #3a0c24, transparent 55%), radial-gradient(circle at 0 100%, #3a3300, transparent 55%), var(--black); background-attachment: fixed; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 16px 10px; background: #0b0b0dee; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .logo { font-size: 11px; }
.bar-mid { flex: 1; min-width: 0; }
.bar-mid .display { font-size: 20px; }
.bar-team { color: var(--yellow); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-score { text-align: right; font-size: 13px; color: var(--muted); }
.bar-score b { display: block; font-family: var(--display); font-size: 22px; color: var(--white); }
.bar-score small { font-size: 12px; }

.tbar { position: sticky; top: 64px; z-index: 9; height: 26px; background: var(--panel); overflow: hidden; }
.tbar i { position: absolute; inset: 0; background: var(--yellow); transform-origin: left; }
.tbar span { position: relative; display: block; text-align: center; color: var(--black); font-weight: 800; font-size: 14px; line-height: 26px; mix-blend-mode: normal; }
.tbar.urgent i { background: var(--pink); }

main { padding: 16px; max-width: 560px; margin: 0 auto; }
.card { background: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; }
.center { text-align: center; }
.big { font-size: 40px; margin: 10px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: grid; gap: 14px; margin-top: 16px; }
label, .field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; text-align: left; }
input { width: 100%; padding: 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--black); font-size: 18px; }
input:focus { outline: none; border-color: var(--yellow); }
.code-input { text-transform: uppercase; letter-spacing: .4em; text-align: center; font-family: var(--display); font-size: 30px; }

.btn-primary { background: var(--yellow); color: var(--black); border: 0; border-radius: 14px; padding: 16px; font-weight: 800; font-size: 18px; text-transform: uppercase; }
.btn-primary:disabled { opacity: .4; }
.btn-ghost { background: none; border: 2px solid var(--white); border-radius: 12px; padding: 10px 16px; font-weight: 600; }
.btn-choice { display: grid; gap: 4px; text-align: left; border: 0; border-radius: 16px; padding: 18px; background: var(--yellow); color: var(--black); }
.btn-choice.pink { background: var(--pink); color: var(--white); }
.btn-choice.white { background: var(--white); }
.btn-choice b { font-family: var(--display); text-transform: uppercase; font-size: 24px; font-weight: 400; }
.btn-choice span { font-size: 14px; opacity: .8; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; margin-top: 18px; padding: 8px; }
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--yellow); background: none; font-size: 26px; color: var(--yellow); }
.stepper b { font-family: var(--display); font-size: 34px; min-width: 40px; text-align: center; }

.team-badge { display: inline-block; font-family: var(--display); text-transform: uppercase; font-size: 30px; padding: 8px 18px; border-radius: 10px; background: var(--team); color: var(--black); margin-bottom: 12px; }
.code { font-family: var(--display); font-size: 64px; letter-spacing: .15em; color: var(--yellow); margin: 4px 0 8px; }
.mates { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.mates span { background: var(--panel); padding: 4px 10px; border-radius: 99px; font-size: 14px; }
.waiting-dots { margin-top: 24px; font-weight: 600; }
.waiting-dots i { animation: blink 1.4s infinite; font-style: normal; } .waiting-dots i:nth-child(2) { animation-delay: .2s; } .waiting-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: 0; } }

.play { display: grid; gap: 14px; }
.q-meta { color: var(--yellow); font-weight: 600; font-size: 14px; }
.q-text { margin: 0; font-size: 21px; line-height: 1.25; }
.q-img { max-width: 100%; max-height: 30vh; border-radius: 12px; justify-self: center; }
.p-choices { display: grid; gap: 10px; }
.p-choice { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--white); color: var(--black); border: 0; border-radius: 14px; padding: 10px; min-height: 64px; font-weight: 800; font-size: 18px; transition: transform .1s, opacity .3s, box-shadow .2s; }
.p-choice:active { transform: scale(.97); }
.p-choice .choice-letter { width: 44px; height: 44px; flex: none; background: var(--k); font-size: 24px; }
.p-choice.picked { background: var(--k); color: var(--white); box-shadow: 0 0 0 4px var(--white) inset; }
.p-choice.picked .choice-letter { background: #0003; }
.p-choice:disabled:not(.picked) { opacity: .55; }
.p-choice.bad { opacity: .3; }
.p-choice.good { opacity: 1; box-shadow: 0 0 0 4px var(--ok); }
.p-choices.vf { grid-template-columns: 1fr 1fr; }
.p-choices.vf .p-choice { flex-direction: column; justify-content: center; min-height: 140px; font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 26px; }
.p-estimate { display: grid; gap: 10px; text-align: center; }
.p-estimate input { font-family: var(--display); font-size: 34px; text-align: center; }
.p-estimate .unit { color: var(--muted); }
.p-big { font-family: var(--display); font-size: 32px; color: var(--yellow); }
.status { text-align: center; color: var(--muted); font-size: 14px; }
.status.ok { color: var(--ok); }
.joker { justify-self: center; background: none; border: 2px dashed var(--pink); color: var(--pink); border-radius: 99px; padding: 8px 18px; font-weight: 800; }
.joker.on { border-style: solid; background: var(--pink); color: var(--white); }
.feedback { border-radius: 14px; padding: 14px; text-align: center; animation: pop .35s cubic-bezier(.2, .9, .3, 1.4); }
.feedback .display { font-size: 32px; }
.feedback p { margin: 6px 0 0; font-size: 15px; }
.feedback.good { background: var(--ok); color: var(--black); }
.feedback.bad { background: var(--ko); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

.rank { font-size: 96px; color: var(--yellow); margin: 10px 0 0; }
.rank sup { font-size: 36px; text-transform: none; }
.win { font-size: 20px; font-weight: 800; color: var(--yellow); }
.top5 { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 6px; text-align: left; }
.top5 li { display: flex; gap: 10px; background: var(--panel); padding: 10px 12px; border-radius: 10px; }
.top5 li span { color: var(--muted); width: 1.5em; }
.top5 li b { margin-left: auto; }
.top5 li.me { background: var(--yellow); color: var(--black); }
.top5 li.me span { color: var(--black); }
