:root {
  --blue: #1A73E8; --red: #C5221F; --yellow: #FBBC04; --green: #188038;
  --ink: #202124; --muted: #5F6368; --line: #DADCE0; --bg: #FFFFFF; --soft: #F8F9FA;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Roboto, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
.stripe { height: 8px; background: linear-gradient(90deg, #4285F4 0 25%, #EA4335 25% 50%, #FBBC04 50% 75%, #34A853 75%); }
main { max-width: 560px; margin: 0 auto; padding: 24px 20px calc(32px + env(safe-area-inset-bottom)); }
.screen[hidden] { display: none; }
.screen { animation: in .25s ease; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1 { font: 800 34px/1.1 Outfit, Arial, sans-serif; margin: 12px 0 16px; letter-spacing: -.5px; overflow-wrap: anywhere; }
h2 { font: 800 24px/1.25 Outfit, Arial, sans-serif; margin: 12px 0 18px; }
.blue { color: var(--blue); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin: 0; }
.lead { font-size: 18px; line-height: 1.45; color: var(--muted); margin: 8px 0; }
.center { text-align: center; }
.fineprint { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 24px; }
.error { color: var(--red); font-weight: 700; margin: 4px 0 10px; }
.hint { font-weight: 400; color: var(--muted); }
.codeok { font-size: 15px; color: var(--green); font-weight: 700; margin: 12px 0 0; }
#code { text-transform: uppercase; letter-spacing: 2px; }
#code::placeholder { text-transform: none; letter-spacing: 0; }

.dots { display: flex; gap: 10px; margin: 8px 0 12px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #4285F4; } .dots i:nth-child(2) { background: #EA4335; }
.dots i:nth-child(3) { background: #FBBC04; } .dots i:nth-child(4) { background: #34A853; }
.dots.bounce i { animation: bounce 1.2s ease-in-out infinite; }
.dots.bounce i:nth-child(2) { animation-delay: .15s; } .dots.bounce i:nth-child(3) { animation-delay: .3s; } .dots.bounce i:nth-child(4) { animation-delay: .45s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }

label { display: block; font-weight: 700; margin: 20px 0 8px; }
input { width: 100%; font-size: 20px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; outline: none; }
input:focus { border-color: var(--blue); }
button { font: 700 18px Roboto, Arial, sans-serif; border: 0; border-radius: 999px; padding: 16px 24px; width: 100%; margin-top: 12px; background: var(--blue); color: #fff; cursor: pointer; }
button:disabled { opacity: .6; }

.qhead { display: flex; align-items: center; justify-content: space-between; }
.timer { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--blue); font: 800 20px/40px Outfit, Arial, sans-serif; text-align: center; margin: 0; }
.timer.low { border-color: #EA4335; color: var(--red); }
.timerbar { height: 6px; background: #E8EAED; border-radius: 3px; margin: 12px 0 4px; overflow: hidden; }
.timerbar div { height: 100%; width: 100%; background: var(--blue); transform-origin: left; transition: transform .2s linear; }

.options { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: 18px; margin: 0; font: 500 17px/1.35 Roboto, Arial, sans-serif; min-height: 76px; color: #fff; transition: opacity .2s, transform .1s; }
.opt:active { transform: scale(.98); }
.opt .l { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); font: 800 20px/40px Outfit, Arial, sans-serif; text-align: center; }
.opt.o0 { background: var(--blue); } .opt.o1 { background: var(--red); } .opt.o2 { background: var(--green); } .opt.o3 { background: #E37400; }
.opt.faded { opacity: .28; }
.opt.chosen { outline: 4px solid var(--ink); outline-offset: 2px; }

.badge { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 38px Outfit, Arial, sans-serif; color: #fff; margin-top: 8px; }
.badge.ok { background: var(--green); } .badge.no { background: var(--red); } .badge.none { background: var(--muted); }
.points { font: 800 22px Outfit, Arial, sans-serif; margin: 0 0 16px; }
.card { background: var(--soft); border-radius: 18px; padding: 16px 18px; margin: 12px 0; }
.card p { margin: 6px 0; line-height: 1.45; }
.answer { font-weight: 700; }
.score-line { font: 700 18px Roboto, Arial, sans-serif; margin-top: 16px; }

.note { font-size: 15px; color: var(--muted); font-weight: 500; margin: 12px 0 0; }

.board { list-style: none; padding: 0; margin: 8px 0 16px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.board li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 17px; }
.board li:first-child { border-top: 0; }
.board .r { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); font: 800 15px/32px Outfit, Arial, sans-serif; text-align: center; }
.board .r.m1 { background: #FBBC04; } .board .r.m2 { background: #DADCE0; } .board .r.m3 { background: #E8B282; }
.board .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.board .s { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.board li.you { background: #E8F0FE; }
.board li.you .n { color: var(--blue); font-weight: 700; }
.board li.gap { justify-content: center; color: var(--muted); padding: 4px; }

#me { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 560px; margin: 0 auto; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
#me[hidden] { display: none; }
#me b { color: var(--ink); }
button.link { width: auto; margin: 0; padding: 8px 4px; background: none; color: var(--blue); font-size: 15px; border-radius: 8px; }
main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

#offline { position: sticky; top: 0; background: var(--red); color: #fff; text-align: center; font-weight: 700; padding: 8px; z-index: 5; }
