:root{font-family:Arial,Helvetica,sans-serif;color:#24314a;background:#edf0f5;--surface:#fffefb;--panel:#f1edff;--soft:#f7f5f1;--text:#24314a;--muted:#5c6780;--line:#dce0ea;--accent:#6b52d9;--mint:#e6f5ee;--peach:#fff0dd;--green:#1e7153;--red:#a23047;color-scheme:light}*{box-sizing:border-box}body{margin:0;padding:16px}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;min-height:48px;border:1px solid var(--line);border-radius:14px;padding:12px 18px;color:var(--text);background:var(--surface);transition:transform .15s,background .15s}button:hover{background:var(--panel)}button:active{transform:translateY(2px)}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #9b89ef;outline-offset:3px}.primary{color:#fff;background:var(--accent);border-color:var(--accent);font-weight:700;box-shadow:0 3px 0 #48349d}.primary:hover{background:#5740bb}.quiet{background:transparent;border-color:transparent;padding:8px 12px;font-size:13px}.stage{width:min(1120px,100%);min-height:calc(100dvh - 32px);margin:auto;border:1px solid var(--line);border-radius:24px;background:var(--surface);display:flex;flex-direction:column;overflow:hidden}header,footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 28px}header{min-height:72px;border-bottom:1px solid var(--line)}.brand{position:relative;text-decoration:none;display:flex;align-items:center;gap:10px;font-size:22px;font-weight:800;color:var(--accent);letter-spacing:-.7px}.brand small{position:absolute;left:48px;bottom:-10px;font-size:9px;font-weight:400;letter-spacing:1px}.brand img{border-radius:10px}header:has(#back[hidden]) .brand{margin-right:auto}main{padding:clamp(20px,3vw,36px);flex:1;min-width:0;outline:none}footer{border-top:1px solid var(--line);font-size:12px;padding:8px 24px;color:var(--muted)}footer a{color:inherit;text-decoration:none}.skip{position:fixed;left:10px;top:-90px;z-index:10;background:var(--surface);padding:12px}.skip:focus{top:10px}[hidden]{display:none!important}h1{font-size:clamp(32px,4.5vw,56px);line-height:1.08;letter-spacing:-1.8px;margin:12px 0 24px}h2{font-size:24px;letter-spacing:-.6px}p{line-height:1.5}.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:700;color:var(--accent);margin:0 0 12px}em{font-style:normal;color:var(--accent)}.lead{font-size:20px;line-height:1.5;color:var(--muted)}.welcome,.setup{display:grid;grid-template-columns:1.15fr 1fr;gap:clamp(24px,5vw,72px);align-items:center;min-height:clamp(480px,calc(100dvh - 200px),720px)}.flag-fan{display:flex;align-items:center;margin:36px 0 24px;padding:10px 20px;min-height:140px}.flag-fan .flag{width:125px;height:95px;object-fit:contain;filter:drop-shadow(0 8px 8px #28355325);transform:rotate(-12deg);background:var(--surface);border:8px solid var(--surface);border-radius:8px}.flag-fan .flag:nth-child(2){transform:rotate(5deg);margin-left:-28px;z-index:1}.flag-fan .flag:nth-child(3){transform:rotate(15deg);margin-left:-28px}.passport-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--muted)}.passport-meta span{padding:7px 10px;background:var(--soft);border-radius:20px}.choices{display:grid;gap:16px}.choice{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:12px;padding:26px;background:var(--panel);border-color:#d8d0f2;min-height:190px}.choice strong{font-size:26px;letter-spacing:-.8px}.choice>span:not(.eyebrow){color:var(--muted);font-size:15px;line-height:1.5}.choice b{font-size:13px;color:var(--accent)}.daily{background:var(--mint);border-color:#cde4d8}.study-link{font-size:13px;border:0;background:transparent;padding:8px;min-height:44px;color:var(--muted)}.form{display:grid;gap:16px;max-width:500px;width:100%;justify-self:center}label{display:grid;gap:8px;font-size:13px;font-weight:600}input,select{width:100%;min-height:48px;background:var(--surface);color:var(--text);padding:12px;border:1px solid var(--line);border-radius:10px;font-size:15px}.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.trip-note{background:var(--mint);padding:20px;border-radius:16px;color:var(--green);line-height:1.6;font-size:15px}.error{color:var(--red);font-size:13px;margin:0}.game-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.game-heading h1{font-size:clamp(24px,3.2vw,36px);margin:8px 0 16px;max-width:720px}.timer{font-size:34px;font-weight:700;border:1px solid var(--line);background:var(--panel);border-radius:16px;padding:16px;min-width:74px;text-align:center;font-variant-numeric:tabular-nums}.urgent{background:#ffe1e5;color:#992039}.pace-tag{font-size:12px;color:var(--muted);white-space:nowrap}.scoreline{display:flex;align-items:center;gap:12px;margin:8px 0 16px;flex-wrap:wrap}.game-score{background:var(--soft);padding:10px 14px;border-radius:12px;display:flex;align-items:center;gap:12px;border:1px solid transparent}.game-score.active{background:var(--panel);border-color:#cfc3f8}.game-score>span{font-size:14px;font-weight:600}.game-score strong{font-size:26px;color:var(--accent)}.streak{font-size:12px;color:var(--green);margin-left:auto}.progress{height:5px;background:var(--soft);border-radius:6px;overflow:hidden;margin:0 0 20px}.progress span{display:block;height:100%;background:var(--accent);transition:width .2s}.play-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:24px;min-height:clamp(340px,calc(100dvh - 350px),650px);align-items:stretch}.question-card{background:var(--mint);border:1px solid #cde4d8;border-radius:20px;padding:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:20px;min-width:0}.question-card>.flag{max-width:100%;width:300px;height:200px;object-fit:contain;filter:drop-shadow(0 7px 8px #24314a12)}.question-card h2{margin:0}.question-caption{font-size:10px;letter-spacing:1.5px;color:var(--green);margin:0}.question-card>p:not(.question-caption){color:var(--muted);margin:0}.country-orbit{font-size:130px;line-height:1;color:var(--accent);font-weight:300}.find-card{background:var(--panel);border-color:#d8d0f2}.answer-side{display:flex;flex-direction:column;justify-content:center;gap:16px;min-width:0}.options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.option{display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:12px;position:relative;min-height:110px;padding:18px;font-size:17px;font-weight:600;overflow-wrap:anywhere;background:var(--surface)}.option-letter{font-size:12px;min-width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--muted);flex-shrink:0}.option:hover{border-color:var(--accent);background:var(--panel)}.option.correct{background:#dff3e6;border-color:#39855c;color:#184c32;opacity:1}.option.wrong{background:#ffe2e7;border-color:#b14c62;color:#7a1f35;opacity:1}.option:disabled:not(.correct):not(.wrong){opacity:.55}.answer-mark{position:absolute;right:8px;top:8px;font-size:16px}.flag-options .option{flex-direction:column;padding:12px;gap:8px;justify-content:center;min-height:150px}.flag-options .option-letter{align-self:flex-start}.flag-options .flag{max-width:100%;width:140px;height:84px;object-fit:contain}.answer-feedback{min-height:84px;color:var(--muted);font-size:14px;padding:8px 0}.answer-feedback p{margin:6px 0}.answer-feedback small{font-size:12px;line-height:1.5;display:block}.answer-feedback.success{color:var(--green)}.answer-feedback.miss{color:var(--text)}.answer-side>#next{width:100%;min-height:52px}.summary{text-align:center;max-width:850px;margin:auto}.summary h1{font-size:clamp(30px,4vw,46px);margin:12px 0 20px}.passport-stamp{width:180px;height:180px;border:3px dashed var(--accent);border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;margin:24px auto;background:var(--panel);transform:rotate(-7deg)}.passport-stamp>span{font-size:48px;font-weight:800;color:var(--accent)}.passport-stamp small{font-size:11px;color:var(--muted)}.summary-scores{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin:20px 0}.summary-scores article{display:flex;flex-direction:column;gap:8px;padding:16px 36px;background:var(--mint);border-radius:16px}.summary-scores strong{font-size:34px;color:var(--green)}.summary-scores small{color:var(--muted)}.summary-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:24px 0}.summary-actions button{min-width:170px}.trip-recap{margin:28px auto 0;text-align:left;max-width:650px}.trip-recap summary{cursor:pointer;padding:12px;font-size:14px;color:var(--muted)}.trip-recap>div{max-height:360px;overflow:auto}.trip-recap article{display:flex;align-items:center;gap:16px;padding:14px;border-bottom:1px solid var(--line)}.trip-recap article>.flag{width:64px;height:42px;object-fit:contain}.trip-recap article>span{display:flex;flex-direction:column;gap:6px;flex:1}.trip-recap small{font-size:12px;color:var(--muted)}.trip-recap b{color:var(--green)}.study{text-align:center;max-width:650px;margin:auto}.study-card{background:var(--mint);border:1px solid #cde4d8;border-radius:20px;padding:32px;min-height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px}.study-card .flag{width:280px;max-width:100%;height:180px;object-fit:contain}.study-card h2{margin:0}.study-card p{margin:0;color:var(--muted)}.secondary{color:var(--muted);font-size:13px}.loading{padding:64px 24px;text-align:center}.challenge-banner{padding:16px;background:var(--peach);border-radius:14px;display:flex;align-items:center;gap:16px;margin-bottom:20px;font-size:14px}.challenge-banner button{margin-left:auto;white-space:nowrap}dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:20px;padding:28px;width:min(560px,calc(100% - 24px));max-height:90dvh}dialog::backdrop{background:#10182a99}dialog p{color:var(--muted);font-size:15px}dialog .primary{width:100%}.perfect .passport-stamp{animation:stamp .6s ease-out}@keyframes stamp{from{transform:scale(1.5) rotate(-20deg);opacity:0}to{transform:scale(1) rotate(-7deg);opacity:1}}
[data-theme=dark]{--surface:#182238;--panel:#2c2b4d;--soft:#202d44;--text:#edf2ff;--muted:#b4bfd5;--line:#43516a;--accent:#b2a4ff;--mint:#1e3938;--peach:#443525;--green:#a9e4c8;--red:#ffb6c5;background:#0e1626;color:var(--text);color-scheme:dark}[data-theme=dark] .primary{background:#6b52d9;border-color:#8d78ed;color:#fff}[data-theme=dark] .primary:hover{background:#7b61e8}[data-theme=dark] .choice,[data-theme=dark] .find-card{border-color:#4a4268}[data-theme=dark] .daily,[data-theme=dark] .question-card,[data-theme=dark] .study-card{border-color:#365956}[data-theme=dark] .option.correct{background:#254c3b;color:#d2f5df;border-color:#70b48e}[data-theme=dark] .option.wrong{background:#552e3d;color:#ffd7df;border-color:#c8798a}[data-theme=dark] .urgent{background:#552e3d;color:#ffd7df}[data-theme=dark] .game-score.active{border-color:#7363b4}
@media(max-width:760px){body{padding:8px}.stage{min-height:calc(100dvh - 16px);border-radius:18px}header{min-height:60px;padding:8px 14px;gap:8px}.brand{font-size:18px;gap:8px}.brand img{width:32px;height:32px}.brand small{left:40px;bottom:-8px;font-size:8px}header .quiet{padding:8px 6px;font-size:12px;min-height:44px}main{padding:20px 16px}footer{padding:6px 16px;gap:8px}footer .quiet{min-height:36px;font-size:12px}.welcome,.setup{grid-template-columns:1fr;gap:24px;min-height:0}.welcome{min-height:calc(100dvh - 180px);align-content:space-evenly}.identity{text-align:center}h1{font-size:38px;letter-spacing:-1.4px;margin:8px 0 16px}.lead{font-size:17px;margin:12px 0}.flag-fan{justify-content:center;margin:16px 0;min-height:100px;padding:8px}.flag-fan .flag{width:100px;height:74px;border-width:6px}.passport-meta{justify-content:center;font-size:10px}.choices{gap:12px;grid-template-columns:1fr 1fr}.choice{min-height:200px;padding:18px 14px;gap:12px}.choice strong{font-size:22px}.choice .eyebrow{font-size:8px;letter-spacing:1px;margin:0}.choice>span:not(.eyebrow){font-size:13px}.choice b{font-size:12px;margin-top:auto}.study-link{grid-column:1/-1;font-size:12px}.setup h1{font-size:32px;margin:8px 0}.setup .lead,.setup .trip-note{display:none}.setup .eyebrow{margin-bottom:8px}.form{gap:14px}select,input{font-size:16px}.field-pair{gap:10px}.field-pair select{font-size:13px;padding:10px 6px}label{font-size:12px}.game-heading{gap:12px;align-items:flex-start}.game-heading h1{font-size:25px;margin:8px 0 12px;letter-spacing:-.8px}.game-heading .eyebrow{font-size:9px;letter-spacing:1.1px}.timer{font-size:28px;padding:10px;min-width:56px;border-radius:12px}.pace-tag{display:none}.scoreline{margin:8px 0 12px;gap:8px}.game-score{padding:8px 10px;gap:8px}.game-score span{font-size:12px}.game-score strong{font-size:23px}.streak{font-size:11px}.progress{margin-bottom:16px}.play-layout{grid-template-columns:1fr;min-height:0;gap:16px}.question-card{padding:20px;gap:14px;min-height:200px}.question-card>.flag{width:220px;height:140px}.question-card h2{font-size:24px}.question-caption{font-size:9px;letter-spacing:1px}.country-orbit{font-size:70px}.find-card{min-height:160px}.options{gap:10px}.option{min-height:72px;padding:12px 10px;font-size:15px;gap:8px;border-radius:12px}.option-letter{width:24px;min-width:24px;height:24px;font-size:11px}.flag-options .option{min-height:120px;padding:10px}.flag-options .flag{width:130px;height:64px}.answer-side{gap:12px}.answer-feedback{min-height:50px;padding:0;font-size:13px}.answer-feedback small{font-size:11px}.answer-feedback p{margin:4px 0}.answer-side>#next{min-height:48px}.summary h1{font-size:30px}.passport-stamp{width:144px;height:144px;margin:20px auto}.passport-stamp>span{font-size:40px}.summary-scores{gap:12px;margin:16px 0}.summary-scores article{padding:14px 24px}.summary-scores strong{font-size:30px}.summary-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.summary-actions button{min-width:0;font-size:13px;padding:12px 8px}.summary-actions .primary{grid-column:1/-1}.trip-recap{margin-top:16px}.study h1{font-size:32px}.study-card{min-height:320px;padding:24px}.study-card .flag{width:240px;height:150px}.challenge-banner{flex-direction:column;align-items:stretch}.challenge-banner button{margin:0}}
@media(max-width:380px),(max-height:740px) and (max-width:760px){main{padding:16px 12px}.game-heading h1{font-size:22px}.question-card{min-height:150px;padding:16px;gap:10px}.question-card>.flag{height:110px}.question-caption{display:none}.option{min-height:64px}.flag-options .option{min-height:100px}.answer-feedback{min-height:40px}.play-layout{gap:12px}.identity h1{font-size:34px}.choices .choice{padding:14px 10px;min-height:180px}.choice strong{font-size:20px}.flag-fan{margin:12px 0}.lead{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:760px){.challenge-banner+.welcome{min-height:0;gap:16px}.challenge-banner+.welcome .lead{display:none}.challenge-banner+.welcome .flag-fan{min-height:70px;margin:8px 0}.challenge-banner+.welcome .identity h1{font-size:30px}.challenge-banner+.welcome .choice{min-height:180px}}
/* Keep four flag choices and the feedback action together on phone screens. */
@media(max-width:760px){.find-card{min-height:110px;padding:16px;gap:10px}.find-card .country-orbit,.find-card .question-caption{display:none}.find-card>p{font-size:13px}.question-card:not(.find-card):has(h2){padding:16px;gap:10px;min-height:180px}.question-card:has(h2)>.flag{height:105px}.question-card:has(h2) .question-caption{display:none}}

/* Passport edition: a clear route, a small reward, and room for every answer. */
:root{--accent:#6549cc;--accent-strong:#5138b2;--coral:#f39878;--mint-strong:#2c8266;--gold:#a06917;--shadow:0 10px 28px #26314b0a}
.stage{box-shadow:var(--shadow)}
.brand{flex-shrink:0;letter-spacing:-.8px}
.brand img{filter:drop-shadow(0 2px 0 #27135916)}
header .quiet[aria-pressed=true]{background:var(--panel);color:var(--accent)}
#sound{margin-left:auto;white-space:nowrap}
#theme{white-space:nowrap}
.choice{position:relative;overflow:hidden;box-shadow:0 3px 0 #c9c0e34a}
.choice .eyebrow{max-width:100%}
.choice:hover{transform:translateY(-3px);box-shadow:0 6px 0 #c9c0e34a}
.choice:active{transform:translateY(1px)}
.passport-meta span:last-child{border:1px solid var(--line)}
.passport-meta .xp,.passport-meta [data-xp]{color:var(--accent);background:var(--panel);border-color:transparent;font-weight:700}
.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;grid-column:1/-1}
.quick-actions button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:52px;padding:12px 14px;font-size:13px;font-weight:700}
.quick-actions [data-action=ranked]{background:var(--peach);border-color:#e6cfb8;color:#7b4d18}
.run-route{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;margin:0 0 22px;position:relative;isolation:isolate}
.run-route::before{content:'';position:absolute;top:50%;left:8px;right:8px;height:2px;background:var(--line);z-index:-1}
.run-route>span{height:26px;max-width:26px;justify-self:center;width:100%;border:2px solid var(--line);border-radius:50%;background:var(--surface);display:grid;place-items:center;font-size:10px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.run-route .done{background:var(--mint);border-color:#5e9b7e;color:var(--green)}
.run-route .miss{background:var(--peach);border-color:#cb9f71;color:#80511f}
.run-route .current{background:var(--accent);border-color:var(--accent);color:var(--surface);box-shadow:0 0 0 4px var(--panel)}
.game-board:has(.run-route)>.progress{display:none}
.game-board{position:relative}
.question-card{box-shadow:inset 0 1px 0 #ffffff66}
.option{border-width:2px;box-shadow:0 3px 0 #dce0ea66}
.option:hover:not(:disabled){transform:translateY(-2px)}
.option:active:not(:disabled){transform:translateY(1px)}
.option.correct{box-shadow:0 3px 0 #72ad8850;animation:answer-in .28s ease-out}
.option.wrong{box-shadow:0 3px 0 #b14c6220}
.option.eliminated,.option[data-eliminated=true]{opacity:.32;box-shadow:none;text-decoration:line-through}
#lifeline,.lifeline button,button.lifeline{align-self:flex-start;min-height:48px;padding:10px 14px;font-size:12px;font-weight:700;background:var(--peach);border-color:#e6cfb8;color:#7b4d18;box-shadow:none}
#lifeline:disabled,.lifeline button:disabled,button.lifeline:disabled{opacity:.6;color:var(--muted);background:var(--soft);border-color:var(--line)}
.celebration{position:absolute;inset:40% 0 auto;pointer-events:none;text-align:center;font-size:clamp(24px,4vw,44px);font-weight:800;letter-spacing:-1px;color:var(--accent);text-shadow:0 2px var(--surface),0 -2px var(--surface),2px 0 var(--surface),-2px 0 var(--surface);z-index:2;animation:discovery-pop .85s ease-out both}
.celebration:empty{display:none}
.celebration>span{display:inline-block;padding:12px 22px;border-radius:100px;background:var(--surface);box-shadow:0 6px 24px #24314a18}
.medal{width:124px;min-height:138px;margin:18px auto 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative;isolation:isolate;color:var(--accent);font-weight:800}
.medal::before{content:'';position:absolute;inset:0 0 14px;background:var(--panel);border:2px solid currentColor;border-radius:50%;box-shadow:inset 0 0 0 7px var(--surface),inset 0 0 0 9px currentColor;z-index:-1}
.medal::after{content:'';position:absolute;left:38px;right:38px;bottom:0;height:32px;background:var(--coral);clip-path:polygon(0 0,100% 0,90% 100%,50% 78%,10% 100%);z-index:-2}
.medal>span,.medal>strong{font-size:38px;line-height:1}
.medal small{font-size:10px;max-width:80px;line-height:1.3}
.medal-tier{margin:8px 0 12px;font-size:13px;font-weight:700;color:var(--accent);letter-spacing:.3px}
.medal.gold{color:var(--gold)}
.medal.gold::before{background:var(--peach)}
.summary:has(.medal) .passport-stamp{width:116px;height:116px;margin:12px auto;border-width:2px}
.summary:has(.medal) .passport-stamp>span{font-size:32px}
.summary:has(.medal) .summary-scores{margin:14px 0}
.summary:has(.medal) .summary-scores article{padding:12px 28px}
.rank-submit{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;max-width:540px;margin:20px auto;text-align:left;background:var(--panel);border:1px solid var(--line);padding:16px;border-radius:16px}
.rank-submit label{min-width:0}
.rank-submit input{min-width:0}
.rank-submit button{white-space:nowrap}
.rank-submit small{grid-column:1/-1;font-size:11px;line-height:1.4;color:var(--muted)}
.rank-status{max-width:560px;margin:10px auto;min-height:20px;font-size:13px;line-height:1.5;color:var(--muted)}
.rank-status.error{color:var(--red)}
.rank-status a{color:var(--accent)}
.leaderboard-view{max-width:840px;margin:0 auto}
.leaderboard-view h1{font-size:clamp(32px,4vw,46px);margin:8px 0 12px}
.leaderboard-view>.lead{font-size:16px;margin:12px 0 22px}
.board-tabs{display:flex;gap:8px;padding:5px;background:var(--soft);border:1px solid var(--line);border-radius:16px;margin:20px 0 16px}
.board-tabs button{flex:1;border-color:transparent;background:transparent;font-size:14px;font-weight:700;min-height:46px;padding:10px 16px}
.board-tabs button[aria-pressed=true]{color:var(--accent);background:var(--surface);box-shadow:0 2px 6px #24314a0d;border-color:var(--line)}
.board-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;max-height:min(500px,calc(100dvh - 360px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding-right:4px}
.board-list>li{display:grid;grid-template-columns:38px minmax(0,1fr) auto;grid-template-rows:auto auto;gap:3px 14px;align-items:center;min-height:74px;padding:14px 18px;background:var(--soft);border:1px solid transparent;border-radius:16px}
.board-list>li:first-child{background:var(--peach);border-color:#e6cfb8}
.board-list>li:nth-child(2){background:var(--panel)}
.board-list>li:nth-child(3){background:var(--mint)}
.board-list>li.current-player{border-color:var(--accent)}
.board-rank{grid-row:1/3;grid-column:1;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;font-size:13px;font-weight:700;color:var(--muted);background:var(--surface);font-variant-numeric:tabular-nums}
.board-list>li:first-child .board-rank{color:var(--gold)}
.board-player{grid-row:1;grid-column:2;font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board-score{grid-row:1/3;grid-column:3;align-self:center;color:var(--accent);font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.board-meta{grid-row:2;grid-column:2;font-size:11px;color:var(--muted);line-height:1.4}
.empty-board{padding:42px 24px;text-align:center;border:1px dashed var(--line);background:var(--soft);border-radius:20px;color:var(--muted);line-height:1.6}
.empty-board strong{display:block;margin-bottom:8px;color:var(--text);font-size:20px}
.board-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:20px 0 0}
.board-actions button{min-width:170px}
#ranked-start{display:grid;gap:18px;max-width:520px;margin:28px auto 0;padding:28px;background:var(--panel);border:1px solid var(--line);border-radius:24px}
#ranked-start h1{font-size:36px;margin:0}
#ranked-start p{margin:0;color:var(--muted);font-size:14px;line-height:1.6}
#ranked-start .primary{width:100%;margin-top:4px}
#ranked-start .error{color:var(--red)}
#ranked-start small{font-size:12px;line-height:1.5;color:var(--muted)}
@keyframes answer-in{from{transform:scale(.97)}to{transform:scale(1)}}
@keyframes discovery-pop{0%{opacity:0;transform:translateY(8px) scale(.9)}20%,65%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-15px) scale(1.03)}}
[data-theme=dark]{--accent:#b2a4ff;--accent-strong:#ccbeff;--coral:#e7977d;--mint-strong:#9bdbc0;--gold:#f0ce85;--shadow:0 12px 36px #0000001a}
[data-theme=dark] .choice{box-shadow:0 3px 0 #0d142433}
[data-theme=dark] .quick-actions [data-action=ranked],[data-theme=dark] #lifeline,[data-theme=dark] .lifeline button,[data-theme=dark] button.lifeline{color:#f5d9ac;border-color:#665036}
[data-theme=dark] .run-route .current{color:#1b2339}
[data-theme=dark] .run-route .done{border-color:#5b9a80}
[data-theme=dark] .run-route .miss{border-color:#8b6b42;color:#f5d9ac}
[data-theme=dark] .question-card{box-shadow:inset 0 1px 0 #ffffff05}
[data-theme=dark] .option{box-shadow:0 3px 0 #0d142433}
[data-theme=dark] .board-list>li:first-child{border-color:#665036}
[data-theme=dark] .board-tabs button[aria-pressed=true]{box-shadow:0 2px 6px #0000001a}
@media(max-width:760px){
 header{gap:6px;padding:8px 12px}
 header .quiet{font-size:11px;padding:8px 5px}
 header .brand{font-size:18px;gap:7px}
 header .brand small{left:39px}
 header:has(#back:not([hidden])) .brand small{display:none}
 .welcome{gap:20px;align-content:space-between;min-height:calc(100dvh - 174px)}
 .identity h1{font-size:35px;margin:8px 0 12px;letter-spacing:-1.4px}
 .identity .eyebrow{font-size:9px;margin-bottom:8px}
 .identity .lead{font-size:15px;line-height:1.4;margin:8px 0 12px}
 .flag-fan{min-height:86px;margin:12px 0;padding:4px 8px}
 .flag-fan .flag{width:94px;height:70px;border-width:5px}
 .passport-meta{gap:6px}
 .passport-meta span{padding:6px 9px}
 .choices{gap:10px}
 .choice{padding:16px 13px;gap:10px;min-height:190px;border-radius:16px}
 .choice strong{font-size:21px;letter-spacing:-.6px}
 .choice .eyebrow{line-height:1.4}
 .choice>span:not(.eyebrow){font-size:12px;line-height:1.45}
 .choice b{font-size:11px}
 .quick-actions{gap:10px}
 .quick-actions button{min-height:48px;font-size:12px;padding:10px 9px;border-radius:12px}
 .study-link{min-height:38px;padding:6px}
 .game-heading h1{font-size:24px;margin:6px 0 8px;line-height:1.12}
 .game-heading .eyebrow{margin-bottom:8px}
 .scoreline{margin:6px 0 14px}
 .game-score{padding:7px 10px}
 .game-score strong{font-size:22px}
 .run-route{gap:5px;margin:0 0 16px}
 .run-route>span{height:21px;max-width:21px;font-size:8px;border-width:1px}
 .run-route .current{box-shadow:0 0 0 3px var(--panel)}
 .question-card{min-height:178px;padding:18px;gap:10px;border-radius:17px}
 .question-card>.flag{height:124px;width:220px}
 .find-card{min-height:104px;padding:14px}
 .question-card:not(.find-card):has(h2){min-height:176px;padding:14px;gap:8px}
 .question-card:has(h2)>.flag{height:101px}
 .question-card h2{font-size:22px;line-height:1.15}
 .play-layout{gap:14px}
 .options{gap:10px}
 .option{min-height:68px;padding:10px 9px;font-size:14px;gap:7px}
 .flag-options .option{min-height:110px;gap:6px;padding:8px}
 .flag-options .flag{height:60px;width:125px}
 .answer-side{gap:10px}
 .answer-feedback{min-height:50px;line-height:1.4}
 .answer-feedback small{font-size:10px}
 #lifeline,.lifeline button,button.lifeline{min-height:44px;font-size:11px;padding:10px 12px}
 .celebration{inset:39% 0 auto;font-size:26px}
 .medal{width:104px;min-height:118px;margin:12px auto 6px}
 .medal>span,.medal>strong{font-size:32px}
 .medal::after{left:31px;right:31px;height:28px}
 .medal-tier{margin:6px 0 10px;font-size:12px}
 .summary:has(.medal) h1{font-size:28px;margin:10px 0 14px}
 .summary:has(.medal) .passport-stamp{width:98px;height:98px;margin:10px auto}
 .summary:has(.medal) .passport-stamp>span{font-size:28px}
 .summary:has(.medal) .summary-scores{margin:10px 0}
 .summary:has(.medal) .summary-scores article{padding:10px 22px}
 .summary:has(.medal) .summary-scores strong{font-size:28px}
 .summary:has(.medal) .summary-actions{margin:14px 0;gap:8px}
 .rank-submit{padding:12px;gap:8px;margin:12px auto;border-radius:14px}
 .rank-submit label{gap:6px;font-size:11px}
 .rank-submit input{font-size:16px;padding:10px;min-height:46px}
 .rank-submit button{font-size:12px;padding:10px;min-height:46px}
 .rank-status{margin:8px auto;font-size:12px;min-height:18px}
 .leaderboard-view h1{font-size:32px;margin-bottom:10px}
 .leaderboard-view>.lead{font-size:14px;margin:10px 0 16px}
 .board-tabs{margin:16px 0 12px;gap:6px;padding:4px;border-radius:14px}
 .board-tabs button{min-height:44px;padding:10px;font-size:13px;border-radius:10px}
 .board-list{max-height:calc(100dvh - 345px);gap:7px;padding-right:2px}
 .board-list>li{min-height:65px;padding:11px 12px;gap:3px 10px;grid-template-columns:30px minmax(0,1fr) auto;border-radius:13px}
 .board-rank{width:28px;height:28px;font-size:11px}
 .board-player{font-size:14px}
 .board-score{font-size:22px}
 .board-meta{font-size:10px}
 .board-actions{margin-top:16px;gap:10px}
 .board-actions button{min-width:0;flex:1;font-size:12px;padding:10px}
 .empty-board{padding:30px 18px;font-size:14px}
 #ranked-start{margin-top:20px;padding:20px;gap:16px;border-radius:20px}
 #ranked-start h1{font-size:31px}
 #ranked-start p{font-size:13px}
}
@media(max-width:380px),(max-height:740px) and (max-width:760px){
 .welcome{min-height:0;gap:16px}
 .identity h1{font-size:31px}
 .identity .lead{display:none}
 .flag-fan{min-height:70px;margin:8px 0}
 .flag-fan .flag{width:84px;height:62px}
 .choice{min-height:178px;padding:13px 11px;gap:8px}
 .choice strong{font-size:19px}
 .choice>span:not(.eyebrow){font-size:11px}
 .quick-actions button{font-size:11px}
 .game-heading h1{font-size:21px}
 .scoreline{margin-bottom:10px}
 .run-route{margin-bottom:12px}
 .question-card{min-height:146px;padding:14px;gap:8px}
 .question-card>.flag{height:110px}
 .question-card:not(.find-card):has(h2){min-height:150px}
 .question-card:has(h2)>.flag{height:84px}
 .question-card h2{font-size:20px}
 .find-card{min-height:92px}
 .option{min-height:61px;font-size:13px}
 .flag-options .option{min-height:98px}
 .flag-options .flag{height:52px}
 .answer-feedback{min-height:40px;font-size:12px}
 .answer-feedback small{font-size:9px}
 .play-layout,.answer-side{gap:9px}
 .medal{width:90px;min-height:104px;margin:8px auto 4px}
 .medal>span,.medal>strong{font-size:28px}
 .summary:has(.medal) .passport-stamp{width:84px;height:84px}
 .summary:has(.medal) .passport-stamp>span{font-size:24px}
 .summary:has(.medal) .summary-scores article{padding:8px 18px}
 .summary:has(.medal) .summary-actions button{padding:10px 8px;min-height:44px}
 .board-list{max-height:calc(100dvh - 325px)}
}
@media(min-width:761px) and (max-width:950px){
 .options:not(.flag-options){grid-template-columns:1fr}
 .options:not(.flag-options) .option{min-height:68px;padding:14px}
}
@media(prefers-reduced-motion:reduce){
 .choice:hover,.option:hover:not(:disabled){transform:none}
 .celebration{animation:none!important}
}
