:root{font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#171717;background:#fff1b9;--base:#fff1b9;--hue:47;--aurora:0;--prism:0;--rings:0;--veil:0;--drift:24s;--spin:80s}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;height:100dvh;overflow:hidden}button,input{font:inherit}button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}button:focus-visible,input:focus-visible{outline:4px solid #247654;outline-offset:4px}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#backdrop{position:fixed;inset:0;overflow:hidden;z-index:-1;background:var(--base);transition:background 700ms ease}.aurora,.prism,.rings{position:absolute;inset:-40%;pointer-events:none;will-change:transform;transition:opacity 700ms ease}.aurora{opacity:var(--aurora);background:radial-gradient(ellipse at 25% 30%,hsl(var(--hue) 100% 58%) 0,transparent 45%),radial-gradient(ellipse at 78% 40%,hsl(calc(var(--hue) + 110) 100% 60%) 0,transparent 48%),radial-gradient(ellipse at 40% 80%,hsl(calc(var(--hue) + 230) 100% 58%) 0,transparent 45%);filter:blur(26px);animation:aurora-drift var(--drift) ease-in-out infinite alternate}.prism{opacity:var(--prism);background:repeating-conic-gradient(from 20deg,hsl(var(--hue) 100% 55% / .8) 0deg 25deg,hsl(calc(var(--hue) + 100) 100% 65% / .7) 45deg,hsl(calc(var(--hue) + 240) 100% 65% / .8) 70deg,hsl(var(--hue) 100% 55% / .8) 90deg);filter:blur(15px);animation:prism-spin var(--spin) linear infinite}.rings{opacity:var(--rings);background:repeating-radial-gradient(ellipse at center,transparent 0 30px,#fff9 32px 35px,transparent 39px 65px);animation:ring-drift 18s ease-in-out infinite alternate}
.app{position:relative;width:100%;max-width:620px;margin:auto;height:100%;display:flex;flex-direction:column;padding:env(safe-area-inset-top) clamp(16px,4.6vw,28px) env(safe-area-inset-bottom);background:rgb(255 253 241 / var(--veil));transition:background 700ms ease}.top{height:68px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{font-size:18px;font-weight:950;letter-spacing:-.8px}.level-badge{background:#151515;color:#fff;padding:9px 15px;border-radius:999px;font-size:18px;font-weight:900;letter-spacing:.5px;font-variant-numeric:tabular-nums;white-space:nowrap}.level-badge span{font-size:25px;margin-left:4px}.run-progress{display:flex;align-items:center;gap:12px;flex:none;padding:0 0 12px}.progress-track{height:5px;flex:1;background:#15151520;border-radius:20px;overflow:hidden}#progressFill{height:100%;background:#151515;width:0;transition:width 200ms ease;border-radius:20px}#progressCount{font-size:14px;font-weight:850;font-variant-numeric:tabular-nums;min-width:48px;text-align:right}.stage{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}.panel{min-height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:20px;padding:24px 4px 32px}.panel>*{flex-shrink:0;max-width:100%}h1,p{margin:0}h1{font-weight:1000;font-size:clamp(44px,12vw,72px);line-height:.98;letter-spacing:-2.8px}.intro{gap:18px}.intro-mark{font-size:90px;font-weight:850;line-height:1.2}.intro-rule{font-size:19px;font-weight:650}.intro .primary{margin-top:22px}.primary{border:2px solid #151515;background:#151515;color:white;padding:19px 20px;min-height:64px;border-radius:15px;font-weight:900;font-size:20px;line-height:1.2;text-transform:uppercase;letter-spacing:.4px;width:100%;max-width:410px}.primary:active{transform:scale(.98)}.primary:disabled{opacity:.5;cursor:default}.best{font-size:15px;font-weight:700;line-height:1.5;color:#364139}.question{gap:clamp(18px,3dvh,28px)}.prompt{font-size:clamp(36px,9.5vw,60px);line-height:1.12;font-weight:900;letter-spacing:-1.3px;overflow-wrap:anywhere;max-width:100%}.prompt.hanzi{font-size:clamp(52px,15vw,88px);line-height:1.18;letter-spacing:0}.prompt.long{font-size:clamp(28px,7.5vw,42px)}.prompt.hanzi.long{font-size:clamp(35px,10vw,60px)}.prompt.emoji{font-size:clamp(80px,24vw,126px)}
.choices{display:grid;grid-template-columns:1fr 1fr;gap:13px;width:100%;padding:0 4px 5px 0}.choice{display:flex;align-items:center;justify-content:center;min-width:0;min-height:clamp(112px,19dvh,146px);padding:17px 10px;background:#fff;color:#151515;border:2px solid #151515;border-radius:17px;box-shadow:3px 4px 0 #151515;font-size:clamp(34px,9vw,46px);font-weight:850;line-height:1.1;overflow-wrap:anywhere;hyphens:auto;transition:transform 90ms ease,background 100ms ease}.choices.hanzi-options .choice{font-size:clamp(46px,13vw,66px);font-weight:800;line-height:1.15}.choices.long-options{grid-template-columns:1fr;gap:11px}.choices.long-options .choice{min-height:82px;padding:15px 16px}.choice:active:not(:disabled){transform:translate(2px,3px);box-shadow:1px 1px 0 #151515}.choice:disabled{cursor:default;opacity:1}.choice.right{background:#6cf1a8}.choice.wrong{background:#ff8799}.answer{display:flex;flex-direction:column;gap:14px;width:100%}.answer input{width:100%;min-height:72px;border:2px solid #151515;border-radius:15px;padding:17px;font-size:28px;background:#fff;color:#151515}.answer .primary{max-width:none}
.success-card{gap:18px}.success-badge{position:relative;display:grid;place-items:center;width:68px;height:68px;border:2px solid #151515;border-radius:50%;background:#6cf1a8;box-shadow:3px 4px 0 #151515;margin:15px 0 10px;animation:check-pop 420ms cubic-bezier(.2,.8,.2,1) both}.success-badge svg{width:35px;height:35px;overflow:visible}.success-badge path{stroke-dasharray:36;stroke-dashoffset:36;animation:check-draw 220ms 100ms ease-out forwards}.spark{position:absolute;left:calc(50% - 3px);top:calc(50% - 5px);width:6px;height:10px;border-radius:2px;background:#182922;opacity:0;pointer-events:none;animation:spark-burst 520ms 40ms ease-out both}.spark:nth-of-type(even){background:#3c9d6e;width:7px;height:7px;border-radius:50%}.success-hanzi{font-size:clamp(38px,12vw,72px);font-weight:900;line-height:1.2;overflow-wrap:anywhere}.success-hanzi.long{font-size:clamp(30px,8vw,48px)}.success-pinyin{font-size:clamp(26px,7vw,38px);font-weight:800;line-height:1.35;overflow-wrap:anywhere;color:#164e32}.success-english{font-size:clamp(19px,5vw,25px);line-height:1.35;color:#253f2e}.score-pop{animation:score-pop 380ms ease-out}.card-exit{animation:card-exit 180ms ease-in both;pointer-events:none}.card-enter{animation:card-enter 240ms cubic-bezier(.16,1,.3,1) both}
.eyebrow{font-size:20px;font-weight:950;letter-spacing:3px;text-transform:uppercase}.level-up{gap:0}.level-arrow{font-size:90px;font-weight:1000;line-height:1.1;animation:level-arrow 650ms cubic-bezier(.2,.8,.2,1) both}.level-number{font-size:clamp(140px,43vw,220px);font-weight:1000;line-height:1.1;letter-spacing:-8px;animation:level-pop 700ms cubic-bezier(.2,.8,.2,1) both;text-shadow:5px 5px 0 #ffffffaa}.level-up .eyebrow{margin-top:12px}.game-over{gap:17px}.end-icon{font-size:85px;font-weight:900;line-height:.8;color:#c53753}.game-over h1{font-size:clamp(40px,11vw,64px)}.run-result{font-size:20px;font-weight:850}.correction{width:100%;border-block:2px solid #15151520;padding:20px 6px;display:flex;flex-direction:column;gap:10px;overflow-wrap:anywhere}#correctHanzi{font-size:clamp(34px,10vw,55px);font-weight:900;line-height:1.2}#correctPinyin{font-size:clamp(23px,6vw,30px);font-weight:750}#correctEnglish{font-size:19px;font-weight:650}.game-over .primary{margin-top:3px}.win{gap:21px}.win-icon{font-size:110px;color:#151515;line-height:1;animation:level-pop 700ms ease-out both}.win-message{font-size:25px;line-height:1.4;font-weight:700}.win .primary{margin-top:16px}.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:3}.confetti i{position:absolute;left:50%;top:48%;width:10px;height:18px;background:hsl(var(--color) 95% 60%);border:1px solid #15151530;opacity:0;animation:confetti-burst 1100ms var(--delay) cubic-bezier(.12,.75,.3,1) both}.confetti i:nth-child(3n){border-radius:50%;width:12px;height:12px}
@keyframes aurora-drift{from{transform:translate(-4%,-3%) rotate(-10deg) scale(1)}to{transform:translate(5%,4%) rotate(15deg) scale(1.1)}}@keyframes prism-spin{to{transform:rotate(360deg)}}@keyframes ring-drift{from{transform:scale(.8) translate(-3%,2%)}to{transform:scale(1.2) translate(3%,-2%)}}@keyframes check-pop{0%{transform:scale(.55) rotate(-12deg)}55%{transform:scale(1.16) rotate(4deg)}100%{transform:scale(1) rotate(0)}}@keyframes check-draw{to{stroke-dashoffset:0}}@keyframes spark-burst{0%{opacity:0;transform:rotate(var(--angle)) translateY(-28px) scale(.6)}20%{opacity:1}100%{opacity:0;transform:rotate(var(--angle)) translateY(-66px) scale(.2)}}@keyframes reading-time{to{transform:scaleX(0)}}@keyframes score-pop{0%,100%{transform:scale(1)}45%{transform:scale(1.15)}}@keyframes card-exit{to{opacity:0;transform:translateX(-34px) scale(.97)}}@keyframes card-enter{from{opacity:0;transform:translateX(34px) scale(.97)}to{opacity:1;transform:translateX(0) scale(1)}}@keyframes level-pop{0%{opacity:0;transform:scale(.45) rotate(-12deg)}55%{opacity:1;transform:scale(1.12) rotate(4deg)}100%{transform:scale(1) rotate(0)}}@keyframes level-arrow{0%{opacity:0;transform:translateY(35px)}55%{opacity:1;transform:translateY(-12px)}100%{transform:translateY(0)}}@keyframes confetti-burst{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}15%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(var(--rotation)) scale(.65)}}
@media(max-height:700px){.top{height:54px}.run-progress{padding-bottom:8px}.panel{padding-block:16px 24px;gap:16px}.question{gap:18px}.intro-mark{font-size:72px}.intro .primary{margin-top:14px}.choice{min-height:108px}.choices.long-options .choice{min-height:76px;padding:12px}.success-badge{width:55px;height:55px;margin-block:12px 6px}.game-over{gap:12px}.end-icon{font-size:60px}.correction{padding-block:14px}.win-icon{font-size:80px}.level-arrow{font-size:72px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}.success-badge path{stroke-dashoffset:0}.spark,.confetti,.success-timer{display:none}.aurora,.prism,.rings{will-change:auto}}

.choice.has-hint{flex-direction:column;gap:8px}.choice-label{display:block}.choice-pinyin{display:block;font-size:clamp(19px,5vw,24px);font-weight:700;line-height:1.2;color:#476651;letter-spacing:0}

body[data-screen="successCard"]{--base:#def3e4;--aurora:0;--prism:0;--rings:0;--veil:0}
body[data-screen="successCard"] #backdrop,body[data-screen="successCard"] .aurora,body[data-screen="successCard"] .prism,body[data-screen="successCard"] .rings,body[data-screen="successCard"] .app{transition-duration:180ms}

.brand{background:none;border:0;color:inherit;padding:8px;margin-left:-8px;min-height:44px;border-radius:9px;text-align:left}.brand:active{transform:scale(.97)}
.intro-mark{font-size:clamp(34px,10vw,52px);letter-spacing:.08em;line-height:1.2}

body[data-screen="gameOver"]{--base:#0e0509;--aurora:0;--prism:0;--rings:0;--veil:0;color:#ffe7eb}
body[data-screen="gameOver"] #backdrop,body[data-screen="gameOver"] .aurora,body[data-screen="gameOver"] .prism,body[data-screen="gameOver"] .rings,body[data-screen="gameOver"] .app{transition-duration:120ms}
body[data-screen="gameOver"] #backdrop::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 38%,#6c102845,transparent 62%),radial-gradient(ellipse at 50% 110%,#780c2c70,transparent 65%)}
body::after{content:"";position:fixed;inset:0;z-index:5;pointer-events:none;background:#ff3756;opacity:0}
body[data-screen="gameOver"]::after{animation:defeat-flash 1s ease-out both}
body[data-screen="gameOver"] .game-over{animation:defeat-shake 360ms ease-out both}
body[data-screen="gameOver"] .brand{color:#ffb3c1}
body[data-screen="gameOver"] .level-badge{background:#270b13;border:1px solid #7b263c;color:#ffccd6}
body[data-screen="gameOver"] .progress-track{background:#ff87992a}
body[data-screen="gameOver"] #progressFill{background:#ff506e}
body[data-screen="gameOver"] #progressCount{color:#ffb3c1}
.game-over .end-icon{color:#ff4869;text-shadow:0 0 30px #ff264b55}
.game-over h1{color:#ff4869;text-shadow:0 0 32px #e5173f40}
.game-over .run-result{color:#ffb3c1}
.game-over .correction{border-color:#96394d75}
.game-over #correctPinyin{color:#ff94ab}
.game-over #correctEnglish,.game-over .best{color:#dcc0c8}
.game-over .primary{background:#ff506e;border-color:#ff506e;color:#17070d;box-shadow:0 5px 25px #ff264b20}
body[data-screen="gameOver"] button:focus-visible{outline-color:#ff94ab}
@keyframes defeat-flash{0%{opacity:.72}22%{opacity:.28}100%{opacity:0}}
@keyframes defeat-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(2px)}}

.success-card{cursor:default;touch-action:manipulation;animation:success-reveal 220ms ease-out both}.success-card:focus{outline:none}.success-card:focus-visible{outline:3px solid #247654;outline-offset:-5px;border-radius:18px}@keyframes success-reveal{from{opacity:.6;transform:scale(.97)}to{opacity:1;transform:scale(1)}}

/* Keep tap feedback visible after answer buttons are disabled. */
.choice.selected{animation:choice-tap 180ms ease-out both;transform:translate(2px,3px);box-shadow:1px 1px 0 #151515}
@keyframes choice-tap{0%{transform:translate(2px,3px) scale(.95)}65%{transform:translate(0,0) scale(1.025)}100%{transform:translate(2px,3px) scale(1)}}

.voice-practice{width:100%;display:flex;flex-direction:column;align-items:center;gap:14px}.voice-practice .primary{text-transform:none}.voice-practice p{font-size:18px;line-height:1.4;max-width:390px}.voice-practice .voice-privacy{font-size:12px;color:#506c59;max-width:310px}.voice-skip,.voice-off{background:transparent;border:0;padding:10px 16px;color:#24563b;font-weight:750}.voice-skip{font-size:22px}.voice-off{font-size:14px;text-decoration:underline}#voiceStatus[data-result="pass"]{font-weight:850;color:#166534}#voiceStatus[data-result="retry"]{color:#735216}.success-card{gap:14px}@media(max-height:700px){.success-card{gap:10px}.voice-practice{gap:8px}.voice-practice .primary{min-height:54px;padding:14px}}

body[data-screen="intro"] #restartTrigger{display:none}body[data-screen="intro"] .top{justify-content:flex-end}

#voiceRecord{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}#voiceRecord:active:not(:disabled){transform:scale(.97);background:#24563b}.syllable-good{color:#168344}.syllable-bad{color:#c52e42;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px}#successPinyin span+span{margin-left:.18em}
.install-app{background:transparent;border:2px solid #151515;border-radius:15px;min-height:52px;padding:12px 20px;font-size:18px;font-weight:800;width:100%;max-width:410px;color:#151515}.install-app[hidden]{display:none!important}#installDialog{border:2px solid #151515;border-radius:22px;background:#fff9df;color:#151515;width:calc(100% - 36px);max-width:410px;padding:26px;text-align:center;box-shadow:6px 6px 0 #151515}#installDialog::backdrop{background:#0008}#installDialog h2{font-size:26px;margin:0 0 18px}#installSteps{font-size:19px;line-height:1.6;margin-bottom:24px}
#runnerSetup{gap:22px}#runnerSetup h1{font-size:clamp(30px,8vw,44px);letter-spacing:-1.5px;line-height:1.1}#runnerForm{width:100%;max-width:430px;display:flex;flex-direction:column;gap:18px;text-align:left}#runnerForm>label{font-size:17px;font-weight:800}#runnerName{width:100%;border:2px solid #171717;border-radius:14px;background:#fffdf7;padding:15px;font-size:20px;color:#171717}.runner-grid{border:0;padding:3px;margin:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}.runner-choice{position:relative;cursor:pointer}.runner-choice input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.runner-choice img{display:block;width:100%;height:auto;aspect-ratio:1;border-radius:50%;border:3px solid transparent}.runner-choice input:checked+img{border-color:#171717;box-shadow:0 0 0 3px #fff,0 0 0 5px #171717}.runner-choice input:focus-visible+img{outline:3px solid #247654;outline-offset:5px}.locked-runner{display:grid;place-items:center;aspect-ratio:1;border-radius:50%;background:#23272b;color:#747c87;font-size:clamp(24px,6vw,35px);font-weight:900;box-shadow:inset 0 0 15px #0006}#runnerSubmit{max-width:none}#signupGate{gap:18px}#signupGate h1{font-size:clamp(39px,10vw,58px)}.claim-avatar{width:96px;height:96px;border-radius:50%;border:3px solid #171717}#claimName{font-size:23px}#signupGate p{font-size:20px;line-height:1.6}#claimSignup{text-decoration:none}#rankingDialog{border:2px solid #171717;border-radius:22px;background:#fff9df;color:#171717;width:calc(100% - 32px);max-width:430px;padding:24px;max-height:85dvh;overflow:auto}#rankingDialog::backdrop{background:#0008}#rankingDialog h2{margin:0 0 20px;font-size:28px}#rankingList{margin-bottom:24px}.rank-row{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid #17171725}.rank-row strong{flex:1;overflow-wrap:anywhere}.rank-row img{width:36px;height:36px;border-radius:50%}body[data-screen=runnerSetup] .top .brand{visibility:hidden}
.runner-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}#runnerSetup{gap:18px}#runnerForm{gap:14px}#runnerCity{width:100%;border:2px solid #171717;border-radius:14px;background:#fffdf7;padding:15px;font-size:20px;color:#171717}.city-input{display:flex;flex-direction:column;align-items:flex-end;gap:8px}#locationStatus{font-size:14px;line-height:1.4}.city-input button:disabled{opacity:.5}

/* Career progress is separate from the ten-question run counter. */
.career-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 0 14px;flex:none}.rank-badge{display:flex;align-items:center;gap:8px;background:var(--rank-bg,#e4f2d9);color:var(--rank-color,#267a48);border:1px solid currentColor;border-radius:99px;padding:6px 14px 6px 7px;font-weight:850;font-size:17px;min-height:44px}.rank-emblem{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--rank-color,#267a48);color:white;font-size:22px}.trial-milestone{background:#e4f2d9;color:#267a48;font-size:18px;font-weight:800;border-radius:99px;padding:10px 18px}.rank-dialog{border:2px solid #171717;border-radius:22px;background:#fffdf6;color:#171717;width:calc(100% - 28px);max-width:500px;max-height:90dvh;padding:24px;overflow-y:auto}.rank-dialog::backdrop{background:#0009}.rank-dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.rank-dialog h2{margin:0;font-size:30px;letter-spacing:-1px}#rankProgressLabel{font-size:17px;font-weight:750}.rank-progress{height:7px;border-radius:9px;background:#17171715;margin:14px 0 20px;overflow:hidden}#rankProgressFill{background:var(--rank-color,#267a48);height:100%;width:0}.journey-rank{display:flex;align-items:center;gap:16px;padding:17px 8px;border-bottom:1px solid #17171715}.journey-rank.current{background:var(--tier-bg);border-radius:14px;border:1px solid var(--tier-color)}.journey-emblem{font-size:37px;font-weight:850;color:var(--tier-color);width:47px;text-align:center}.journey-detail{flex:1}.journey-detail strong{font-size:21px}.journey-hsk{margin-left:10px;font-size:14px;color:#57615b}.division-marks{display:flex;gap:5px;margin-top:8px}.division-marks span{font-size:12px;font-weight:850;min-width:22px;height:22px;display:grid;place-items:center;border:1px solid #17171725;border-radius:5px;color:#777}.division-marks .earned{background:var(--tier-color);color:white;border-color:var(--tier-color)}.journey-character{width:52px;height:52px;border-radius:50%;overflow:hidden;background:#202027;color:#777;text-align:center;font-size:28px;line-height:52px;font-weight:850}.journey-character img{width:100%;height:100%;display:block}.rank-rules{margin-top:20px;font-size:14px;line-height:1.6}.rank-rules summary{font-size:17px;font-weight:750;cursor:pointer}.rank-rules p{margin-top:12px}.rank-rules a{color:#305a47}.boss-start{background:var(--rank-color);border-color:var(--rank-color);margin-top:0!important}body[data-screen=gameOver] .career-bar{color:#ffb3c1}.rank-row>span:last-child{font-size:14px;text-align:right}.rank-row small{display:block;color:#536153}.level-badge{font-size:12px;padding:6px 10px}.level-badge span{font-size:18px}.intro .primary{margin-top:12px}.skin-option.is-locked .skin-card{background:#202027;border-color:#202027;position:relative}.skin-option.is-locked img{visibility:hidden}.skin-option.is-locked .skin-card:after{content:'?';position:absolute;inset:0;display:grid;place-items:center;color:#777;font-size:36px;font-weight:900}.skin-option.is-locked{cursor:not-allowed}.skin-unlock-label{font-size:13px;text-align:center;color:#52605a;display:block;margin-top:8px}.promotion-character{width:112px;height:112px;border-radius:50%;border:3px solid var(--rank-color)}
@media(max-width:400px){.rank-dialog{padding:18px}.journey-rank{gap:9px}.journey-hsk{display:block;margin:2px 0}.journey-character{width:44px;height:44px}.rank-badge{font-size:15px}.account-name{max-width:110px;overflow:hidden;text-overflow:ellipsis}.top{gap:7px}.career-bar{padding-bottom:9px}}

.city-autocomplete{position:relative;width:100%}.city-suggestions{position:absolute;inset:calc(100% + 5px) 0 auto;z-index:8;max-height:260px;overflow:auto;background:#fffdf7;border:2px solid #171717;border-radius:12px;box-shadow:0 7px 20px #0002;text-align:left}.city-option,.city-empty{padding:12px 14px;font-size:17px;line-height:1.4;cursor:pointer}.city-option+.city-option{border-top:1px solid #17171714}.city-option:hover,.city-option[aria-selected=true]{background:#e4f2d9}.city-empty{color:#59625c;cursor:default}.floating-feedback{position:fixed;z-index:12;pointer-events:none;color:#168344;font-weight:950;font-size:clamp(24px,6vw,36px);line-height:1.05;white-space:pre;text-align:center;text-shadow:0 2px 0 #fff,0 0 14px #fff;animation:feedback-rise .8s ease-out forwards;transform:translate(-50%,-50%)}.floating-feedback.perfect{color:#9c5700;font-size:clamp(28px,7vw,42px)}.mic-button{position:relative;display:grid;place-items:center;width:76px;height:76px;border:2px solid #24563b;border-radius:50%;background:#24563b;color:#fff;touch-action:manipulation!important;box-shadow:0 0 0 8px #24563b0c}.mic-button svg{width:31px;height:35px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.mic-button[data-state=listening]{animation:mic-breathe 1.7s ease-in-out infinite}.mic-button[data-state=speaking]{box-shadow:0 0 0 12px #16834425;background:#168344}.mic-button[data-state=off],.mic-button[data-state=error]{background:transparent;color:#52675b;border-color:#52675b;box-shadow:none}.mic-button[data-state=off]:after{content:'';position:absolute;width:44px;height:3px;transform:rotate(-45deg);background:currentColor;box-shadow:0 0 0 2px #def3e4}.mic-button[data-state=checking]{opacity:.65}.voice-practice{gap:14px}.voice-practice #voiceStatus{min-height:25px;font-size:17px}#voiceRecord:active:not(:disabled){transform:scale(.96)}
@keyframes feedback-rise{0%{opacity:0;transform:translate(-50%,-30%) rotate(-7deg) scale(.8)}18%{opacity:1;transform:translate(-50%,-60%) rotate(-7deg) scale(1.05)}65%{opacity:1}100%{opacity:0;transform:translate(-45%,calc(-50% - 48px)) rotate(-4deg) scale(1)}}@keyframes mic-breathe{50%{box-shadow:0 0 0 13px #24563b12}}
@media(prefers-reduced-motion:reduce){.floating-feedback{animation:none;transform:translate(-50%,-50%)}.mic-button{animation:none}}
.settings-gear{display:grid;place-items:center;width:46px;height:46px;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;margin-left:auto}.settings-gear svg{width:27px;height:27px}.settings-gear:hover{background:#0001}.settings-gear:focus-visible{outline:3px solid #4b7852;outline-offset:3px}#settingsDialog{width:min(440px,calc(100vw - 32px));max-height:85dvh;overflow:auto;box-sizing:border-box;border:1.5px solid #171717;border-radius:24px;background:#fff8dd;color:#171717;padding:24px}#settingsDialog::backdrop{background:#17171766}.settings-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.settings-heading h2{font-size:28px;margin:0}.settings-heading button{font-size:30px;background:none;border:0;cursor:pointer;width:44px;height:44px}.settings-actions{display:grid;gap:4px;margin-bottom:24px}.settings-actions>a,.settings-actions>button{display:flex;align-items:center;justify-content:flex-start;gap:10px;text-align:left;width:100%;max-width:none;box-sizing:border-box;border:0;border-bottom:1px solid #0002;border-radius:0;background:none;color:inherit;text-decoration:none;font-size:18px;font-weight:650;padding:14px 0;margin:0;cursor:pointer}.settings-actions>[hidden]{display:none}#settingsDialog label{display:block;font-size:16px;font-weight:700;margin-bottom:10px}.invite-row{display:flex;gap:8px}.invite-row input{width:0;flex:1;min-width:0;padding:12px;border:1px solid #0004;border-radius:10px;font-size:16px;background:#fffdf6}.invite-row button{padding:12px;border:0;border-radius:10px;background:#171717;color:white;font-size:16px;cursor:pointer}#inviteStatus{font-size:14px;min-height:20px}

/* Prestige rank artwork */
.rank-emblem{width:40px;height:40px;object-fit:contain;background:transparent;border-radius:0;flex-shrink:0}.journey-emblem{width:72px;height:72px;object-fit:contain;flex-shrink:0}.rank-badge{padding:3px 14px 3px 5px}.journey-rank.locked .journey-emblem{filter:saturate(.55);opacity:.65}body:not([data-screen]) #careerXP,body[data-screen=intro] 

/* The first-visit welcome has no player stats, even before identity loads. */
body:not([data-screen]) .career-bar,body[data-screen=intro]:not([data-landing=home]) .career-bar{display:none}
body[data-screen=intro]:not([data-landing=home]) #introBest,body[data-screen=intro]:not([data-landing=home]) #bossStart{display:none}

/* Rank and settings share the top row; run and progress share the row below. */
.app>.top{display:grid;grid-template-columns:minmax(0,1fr) auto auto;height:auto;min-height:68px;padding:10px 0;column-gap:10px;row-gap:6px;align-items:center}
.top #restartTrigger{grid-column:1;grid-row:1;justify-self:start}.top #openSettings{grid-column:3;grid-row:1;margin-left:0}.top .career-bar{grid-column:2;grid-row:1;padding:0;justify-content:flex-end}
body[data-screen=intro] .top .career-bar,body[data-screen=runnerSetup] .top .career-bar{grid-row:1}body[data-screen=runnerSetup] #restartTrigger{display:none}
.city-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}.city-label-row label{font-size:17px;font-weight:800}.city-label-row .text-button{font-size:14px;white-space:nowrap;padding:4px 0;margin:0;text-align:right}.city-label-row button:disabled{opacity:.5}

#customizeRunner{gap:16px}#customizeRunner h1{font-size:clamp(30px,7vw,40px);line-height:1.1;letter-spacing:-1px}#customizeForm{width:100%;max-width:430px;display:flex;flex-direction:column;gap:14px;text-align:left}#customizeForm label:not(.runner-choice){display:flex;flex-direction:column;gap:7px;font-size:15px;font-weight:750}#customizeForm input:not([type=radio]),#customizeForm select{width:100%;border:2px solid #171717;border-radius:12px;background:#fffdf7;padding:12px;font:inherit;font-weight:400;color:#171717}#customizeForm .primary{max-width:none;font-size:18px;padding:16px}body[data-screen=customizeRunner] .top .career-bar{grid-row:1}body[data-screen=customizeRunner] #restartTrigger{display:none}

.question .voice-practice{gap:8px;margin-top:4px}.question .mic-button{width:56px;height:56px;box-shadow:none}.question .mic-button svg{width:24px;height:28px}.question #voiceStatus{font-size:13px;min-height:18px;margin:0;line-height:1.35}.mic-button[data-state=idle]{background:transparent;color:#24563b}
@media(max-height:700px){.question{gap:14px;padding-block:12px}.question .choice{min-height:86px}.question .voice-practice{gap:6px}.question .mic-button{width:48px;height:48px}}

.top .rank-badge,.run-progress .level-badge{box-sizing:border-box;height:48px;min-height:48px;display:flex;align-items:center;line-height:1;flex-shrink:0}.run-progress .level-badge{padding:0 14px}.top .rank-badge{white-space:nowrap}
/* Run entrance */
.play-mode{gap:26px}.play-mode h1{font-size:clamp(48px,13vw,76px);font-style:italic;letter-spacing:-3px;line-height:.92}.play-mode .eyebrow{letter-spacing:2px;font-size:11px}.play-mode-options{width:100%;display:grid;gap:14px;margin-top:12px}.mode-choice{width:100%;display:flex;align-items:center;gap:16px;text-align:left;border:2px solid #151515;border-radius:20px;padding:23px 20px;box-shadow:5px 6px 0 #151515;transition:transform .16s,box-shadow .16s}.mode-voice{background:#c7ff3c;color:#151515}.mode-touch{background:#fffdf1;color:#151515}.mode-choice strong{display:block;font-size:25px;font-weight:950;letter-spacing:-.8px}.mode-choice small{display:block;font-size:13px;margin-top:5px;line-height:1.4}.mode-symbol{font-size:36px;line-height:1}.mode-arrow{font-size:26px;margin-left:auto}.mode-choice:hover{transform:translate(-2px,-2px);box-shadow:7px 8px 0 #151515}.mode-choice:active{transform:translate(4px,5px);box-shadow:1px 1px 0 #151515}.mode-choice:focus-visible{outline:3px solid #2b7554;outline-offset:6px}
.run-countdown{position:fixed;inset:0;z-index:100;background:#c7ff3c;color:#121911;overflow:hidden;isolation:isolate;justify-content:center;min-height:100dvh;padding:24px;gap:0;background-image:repeating-linear-gradient(115deg,transparent 0 65px,#14231408 65px 68px)}.countdown-kicker{position:absolute;top:max(12%,env(safe-area-inset-top));font-size:clamp(17px,4vw,28px);font-weight:950;letter-spacing:8px;transform:rotate(-6deg)}.countdown-beat{position:relative;z-index:2;display:grid;place-items:center;width:100%;height:55dvh}.countdown-number{display:block;font-size:clamp(160px,57vw,420px);font-weight:1000;line-height:.9;font-style:italic;letter-spacing:-.08em;padding-right:.08em;text-shadow:7px 9px 0 #fffdf1;animation:countdown-slam 1s cubic-bezier(.2,.8,.2,1) both}.countdown-footer{position:absolute;bottom:max(12%,env(safe-area-inset-bottom));font-weight:900;font-size:clamp(11px,3vw,16px);letter-spacing:2px}.countdown-orbit{position:absolute;width:90vmin;height:90vmin;border:2px solid #172c2340;border-radius:50%;transform:rotate(-25deg) scaleX(1.35);animation:orbit-charge 3.5s ease-in both;z-index:0}.orbit-two{width:110vmin;height:110vmin;border-style:dashed;animation-direction:reverse}.run-countdown[data-beat="Go!"]{background-color:#172c23;color:#c7ff3c}.run-countdown[data-beat="Go!"] .countdown-number{font-size:clamp(125px,43vw,320px);text-shadow:6px 7px 0 #4d7258;animation:countdown-go .5s ease-out both}.run-countdown[data-beat="Go!"] .countdown-kicker{visibility:hidden}
@keyframes countdown-slam{0%{opacity:0;transform:scale(2.4) rotate(-18deg);filter:blur(9px)}18%{opacity:1;transform:scale(.91) rotate(-8deg);filter:blur(0)}35%{transform:scale(1.08) rotate(-8deg)}75%{opacity:1;transform:scale(1) rotate(-8deg)}100%{opacity:0;transform:scale(.8) rotate(-8deg)}}
@keyframes countdown-go{0%{opacity:0;transform:scale(.3) rotate(-12deg)}45%{opacity:1;transform:scale(1.1) rotate(-8deg)}100%{opacity:1;transform:scale(1.2) rotate(-8deg)}}
@keyframes orbit-charge{from{transform:rotate(-25deg) scale(.65)}to{transform:rotate(145deg) scale(1.5)}}
@media(max-height:650px){.play-mode{gap:16px}.play-mode h1{font-size:48px}.mode-choice{padding:16px}.play-mode-options{margin-top:0}.mode-choice strong{font-size:22px}}
@media(prefers-reduced-motion:reduce){.countdown-number{animation:none;transform:rotate(-8deg)}.countdown-orbit{animation:none}.mode-choice{transition:none}}
/* First-run reward and personal vocabulary onboarding */
.first-run-unlock{gap:16px}.first-run-unlock h1{font-size:clamp(40px,10vw,62px);font-style:italic;line-height:.94}.unlock-hero{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px}.unlock-hero img{height:clamp(125px,22dvh,190px);width:auto;filter:drop-shadow(0 12px 16px #267a4829);animation:runner-reveal .65s cubic-bezier(.2,.8,.2,1) both}.unlock-hero>span{font-size:13px;font-weight:900;background:#c7ff3c;border:1.5px solid #151515;padding:7px 14px;border-radius:999px;transform:rotate(-3deg)}#customizeForm{width:100%;max-width:410px;display:grid;gap:14px}.unlock-choices{border:0;margin:0;padding:0;display:flex;justify-content:center;gap:14px}.unlock-choices legend{font-size:12px;font-weight:750;margin-bottom:10px}.unlock-choices .runner-choice{position:relative;width:84px;height:80px}.unlock-choices img{width:68px;height:68px;object-fit:contain}.new-runner-label{position:absolute;bottom:-5px;right:-8px;font-size:9px;letter-spacing:1px;background:#172c23;color:#c7ff3c;border-radius:8px;padding:3px 6px;font-weight:950}.unlock-save-copy{font-size:13px;line-height:1.4}.personal-details{gap:20px}.personal-details h1{font-size:clamp(38px,10vw,58px);font-style:italic;line-height:.97}.personal-promise{font-size:16px;line-height:1.5;max-width:420px}.personal-promise strong{color:#267a48}.personal-details form{width:100%;max-width:430px;display:grid;gap:15px;text-align:left}.personal-details label{display:grid;gap:7px;font-size:13px;font-weight:800}.personal-details input,.personal-details textarea{width:100%;min-height:48px;border:1px solid #172c2333;border-radius:12px;background:#fffdf1;padding:12px 14px;font:inherit;font-weight:500;font-size:16px;resize:vertical}.personal-details input:focus,.personal-details textarea:focus{outline:2px solid #267a48;outline-offset:2px}.personal-optional{font-size:12px;color:#69725e;line-height:1.4}.personal-details .primary{max-width:none}.personal-details .text-button{text-align:center}.personal-details #personalStatus{font-size:14px;font-weight:750;color:#267a48}.personal-details:has(button:disabled) input,.personal-details:has(button:disabled) textarea{opacity:.65;pointer-events:none}
@keyframes runner-reveal{from{opacity:0;transform:translateY(35px) scale(.6) rotate(-12deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
@media(max-height:720px){.first-run-unlock{gap:12px}.first-run-unlock h1{font-size:40px}.unlock-hero img{height:115px}.unlock-choices .runner-choice{height:65px;width:74px}.unlock-choices img{height:54px;width:54px}.personal-details{justify-content:flex-start;padding-top:20px}.personal-details h1{font-size:38px}}
.first-run-unlock .eyebrow,.personal-details .eyebrow{font-size:12px;letter-spacing:1.8px}.unlock-hero img{border-radius:24px;height:clamp(115px,20dvh,165px)}.personal-details h1{font-size:clamp(38px,9vw,48px)}

#locateCity{display:inline-flex;align-items:center;gap:5px}#locateCity svg{width:17px;height:17px;flex-shrink:0}#locateCity span{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}

.run-progress .progress-track{min-width:0}@media(max-width:360px){.top #restartTrigger{font-size:16px}.app>.top{column-gap:6px}}

.mode-symbol svg{display:block;width:36px;height:40px}.saving-account h1{font-size:clamp(32px,8vw,46px);letter-spacing:-1.5px}.saving-account p{font-size:17px;line-height:1.5;max-width:340px}.saving-spinner{width:42px;height:42px;border:4px solid #267a4826;border-top-color:#267a48;border-radius:50%;animation:saving-spin .8s linear infinite}body[data-screen=savingAccount] .top,body[data-screen=savingAccount] #runProgress{visibility:hidden}#gameSurface[data-claim=true] .top{visibility:hidden}@keyframes saving-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.saving-spinner{animation:none}}

.saving-account:has(#retryClaim:not(.hidden)) .saving-spinner{display:none}

/* China red brand accent; rank, character and correctness colors stay semantic. */
:root{--brand:#d92525;--brand-ink:#fffdf1}
.primary,.mode-voice,.unlock-hero>span{background:var(--brand);color:var(--brand-ink)}
.primary:hover{background:#b71d1d}.primary:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline-color:var(--brand)}
#progressFill{background:var(--brand)}
.run-countdown{background-color:var(--brand);color:var(--brand-ink)}
.run-countdown[data-beat="Go!"]{background-color:#171717;color:var(--brand-ink)}
.run-countdown .countdown-number{text-shadow:7px 9px 0 #791919}
.runner-choice:has(input:checked){border-color:var(--brand)}
.mic-button,.mic-button[data-state=idle]{border-color:var(--brand);color:var(--brand)}
.mic-button[data-state=listening]{background:var(--brand);color:var(--brand-ink)}
.saving-spinner{border-color:#d9252526;border-top-color:var(--brand)}
.city-option{display:block;width:100%;border:0;background:transparent;color:#171717;text-align:left;font:inherit;min-height:48px;touch-action:manipulation}
.city-option:hover,.city-option[aria-selected=true]{background:#ffe1dc}
.city-suggestions{max-height:min(260px,35dvh);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body[data-screen=runnerSetup] .stage{overflow:visible}body[data-screen=runnerSetup]{overflow-y:auto}
