*,:before,:after{box-sizing:border-box}html,body,#root{height:100dvh;overflow:hidden}html{background:var(--lobby-bg);min-height:100%;color:var(--lobby-ink);font-family:var(--font-body);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility}html[data-theme]{background-color:var(--bg);background-image:var(--page-image);color:var(--ink);color-scheme:var(--color-scheme);background-attachment:fixed}body{min-height:100dvh;margin:0}button,input{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:not-allowed;opacity:.55}:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.stage.is-entering{animation:.16s stage-fade}@keyframes stage-fade{0%{opacity:.72}to{opacity:1}}.scene-gate{z-index:8;text-align:center;color:#f6e7c1;background:radial-gradient(circle at 50% 18%,#78562a73,#0000 42%),#1c140e;flex-direction:column;justify-content:center;align-items:center;gap:14px;padding:28px 20px;display:flex;position:absolute;inset:0}.scene-gate.is-closing{opacity:0;transition:opacity .16s}.scene-gate h1{color:#f8edd4;margin:0;font-size:28px}.scene-gate-card{background:#2a2118eb;border:1px solid #c4a574;border-radius:16px;width:min(100%,320px);padding:18px 16px}.scene-gate-card span{letter-spacing:.12em;color:#e7c98a;font-size:13px;display:block}.scene-gate-card strong{margin-top:8px;font-size:18px;line-height:1.65;display:block}.scene-gate button{appearance:none;color:#f8ecd0;background:#f6d38629;border:1px solid #f6d386a6;border-radius:12px;min-width:148px;min-height:48px;padding:8px 18px;font-weight:700}.scene-gate-orb{background:#e7c98a;border-radius:999px;width:14px;height:14px;animation:1s ease-in-out infinite town-breathe}.stage{width:min(100%, var(--stage-max));box-sizing:border-box;height:100dvh;min-height:100dvh;padding:calc(12px + var(--safe-top,env(safe-area-inset-top,0px))) calc(16px + var(--safe-right,env(safe-area-inset-right,0px))) var(--safe-bottom,env(safe-area-inset-bottom,0px)) calc(16px + var(--safe-left,env(safe-area-inset-left,0px)));flex-direction:column;margin:0 auto;display:flex;position:relative;overflow:hidden}.rise{animation:rise var(--motion-base) var(--ease)}.topbar{align-items:center;gap:8px;margin-bottom:18px;display:flex}.brand{flex-direction:column;min-width:0;display:flex}.brand strong{font-family:var(--font-display);letter-spacing:var(--kicker-spacing);font-size:1.05rem}.brand span,.kicker{color:var(--muted);letter-spacing:var(--kicker-spacing);font-size:.82rem;font-weight:700}.paper .kicker,.paper .lead,.sheet .kicker,.sheet .lead{color:var(--paper-muted)}.spacer{flex:1}.icon-btn,.btn,.choice,.switch{min-height:var(--tap-min);min-width:var(--tap-min);border-radius:var(--radius-sm);border:var(--stroke) solid var(--btn-line)}.icon-btn,.btn.secondary,.btn.ghost{background:var(--paper);color:var(--paper-ink);border-color:var(--paper-line);box-shadow:var(--choice-shadow)}.icon-btn{padding:0 12px;font-weight:700}.btn{background:var(--accent);color:var(--accent-ink);box-shadow:var(--choice-shadow);padding:0 18px;font-weight:700}.btn.secondary{background:var(--paper);color:var(--paper-ink)}.btn.ghost{color:var(--ink);border-color:var(--chrome-line);box-shadow:none;background:0 0}.btn.block,.choice{width:100%}.btn:active:not(:disabled),.choice:active:not(:disabled),.icon-btn:active,.player-card:active{transform:translate(var(--press-x), var(--press-y)) scale(var(--press-scale))}h1,h2,p{margin:0}h1{font-family:var(--font-display);font-size:var(--display-size);font-weight:700;line-height:1.05}h2{font-size:var(--title-size);white-space:pre-wrap;font-weight:700;line-height:1.35}.match-grid{gap:var(--choice-gap);grid-template-columns:1fr 1fr;margin-top:14px;display:grid}.order-built{gap:8px;margin-top:10px;display:grid}.stage.battle-on{height:calc(100dvh - var(--keyboard-inset,0px))}.stage.battle-on .topbar{display:none}.battle-root{flex-direction:column;flex:1;gap:8px;min-height:0;display:flex}.arena{border-radius:var(--radius);background:radial-gradient(120px 80px at 30% 80%,#e2a04a2e,#0000 70%),linear-gradient(#2a211c,#14110f);flex:0 0 42%;min-height:230px;padding:10px;position:relative;overflow:hidden}.hp-row{grid-template-columns:1fr 1fr;gap:8px;display:grid}.hp-block{color:#f6efe6;font-size:.78rem;font-weight:700}.hp-frame{background:var(--sprite-hp) center / 100% 100% no-repeat;align-items:center;height:22px;margin-top:4px;padding:0 8px;display:flex}.hp-frame i{background:#e23b3b;border-radius:99px;height:8px;display:block}.hero-hp .hp-frame i{background:#3cba7a}.fighters{height:calc(100% - 78px);min-height:140px;position:relative}.sprite{background:50%/contain no-repeat;width:132px;height:150px;position:absolute;bottom:0}.sprite.hero{background-image:var(--sprite-hero);left:8px}.sprite.foe{width:150px;height:160px;right:4px}.sprite.foe.speed{background-image:var(--sprite-monster-speed)}.sprite.foe.inertia{background-image:var(--sprite-monster-inertia)}.sprite.foe.force{background-image:var(--sprite-monster-force)}.sprite.foe.boss{background-image:var(--sprite-boss);width:176px;height:176px}.fx{pointer-events:none;background:50%/contain no-repeat;height:120px;position:absolute;inset:18% 10% auto}.fx.slash{background-image:var(--sprite-fx-slash)}.fx.hit{background-image:var(--sprite-fx-hit)}.fx.ultimate{background-image:var(--sprite-fx-ultimate)}.floating-dmg{font-family:var(--font-display);margin:0;font-size:2rem;font-weight:800;position:absolute;top:18px}.good-dmg{color:#ffd56a;right:28px}.bad-dmg{color:#ff8d7a;left:36px}.battle-status{color:#f6efe6;margin:0;font-size:.82rem;font-weight:700;position:absolute;bottom:6px;left:10px;right:10px}.battle-q{min-height:0;padding-bottom:calc(8px + env(safe-area-inset-bottom));flex:1;overflow:auto}.thumb-zone{gap:8px;margin-top:10px;display:grid}.chest{background:var(--sprite-chest) center / contain no-repeat;width:120px;height:96px;margin:0 auto 8px}.arena.shake{animation:.38s linear battle-shake}.sprite.hero.lunge{animation:battle-lunge .42s var(--ease)}.sprite.flinch{animation:.28s linear battle-flinch}.floating-dmg{animation:float .7s var(--ease)}@keyframes battle-shake{0%,to{transform:translate(0)}25%{transform:translate(-7px)}75%{transform:translate(7px)}}@keyframes battle-lunge{40%{transform:translate(36px)scale(1.04)}}@keyframes battle-flinch{30%{transform:translate(8px)}60%{transform:translate(-6px)}}.sheet{max-height:min(82dvh,680px);overflow:auto}.sheet.town-panel{padding:0 0 env(safe-area-inset-bottom);overflow:hidden}.journey{text-align:center;flex-direction:column;align-items:center;gap:10px;padding-top:12px;display:flex}.journey h1{margin:0;font-size:40px}.journey-kicker,.journey-sub{color:var(--color-text-muted);margin:0;font-weight:600}.journey-cast{justify-content:center;align-items:flex-end;gap:12px;margin:8px 0 12px;display:flex}.journey-cast img{object-fit:contain;width:132px;height:160px}.journey-hero{object-fit:contain;width:148px;height:180px}.journey-score{font-family:var(--font-display);margin:0;font-size:40px;font-weight:700}.journey-stars{color:var(--color-star-fill,#c4a35a);letter-spacing:8px;margin:0;font-size:28px}.journey-chest{width:88px}.journey .btn{justify-content:center;align-items:center;gap:8px;width:min(100%,320px);display:inline-flex}.journey .btn img{width:22px;height:22px}.journey-tools{gap:12px;margin-top:4px;display:flex}.journey-tools .icon-btn{place-items:center;width:56px;height:56px;padding:0;display:grid}.journey-tools img{width:28px;height:28px}.journey-clear{gap:8px;padding-top:4px}.battle{flex-direction:column;flex:1;gap:8px;min-height:0;display:flex}.battle-quiz .choice{background:var(--color-surface);color:var(--color-text);border:2px solid var(--color-border);box-shadow:var(--shadow-sm);min-height:48px;padding:8px 12px;font-weight:500}.battle-quiz .choice:disabled{opacity:1}.battle-quiz .choice__key{background:var(--color-primary-soft);width:28px;height:28px;color:var(--color-primary);border-radius:8px;flex:none;place-items:center;font-weight:700;display:grid}.battle-quiz .choice--correct{border-color:var(--color-success);color:var(--color-success-text);background:#d7f3ef}.battle-quiz .choice--correct .choice__key{background:var(--color-success);color:#fff}.battle-quiz .choice--retry{background:var(--color-warning-soft);border-color:var(--color-warning);color:var(--color-warning-text)}.battle-quiz .choice--miss{background:var(--color-error-soft);border-color:var(--color-error);color:var(--color-error-text)}.hint-bubble,.explain-card{background:var(--color-hint-soft);color:var(--color-text);border-radius:12px;margin-top:8px;padding:12px}.explain-card{background:var(--color-surface);border:1px solid var(--color-accent-metal,var(--color-border))}.battle-arena-bg{background:0 0}.battle-arena-bg img{opacity:1}.battle-hud{grid-template-columns:72px 1fr auto;align-items:center;gap:8px;display:grid}.battle-hud__stats{border:1px solid var(--color-accent-metal,#c4a35a);background:linear-gradient(#f7f6f2f7,#ede8ddf2);border-radius:14px;flex-direction:column;gap:6px;min-width:0;padding:8px 10px;display:flex}.battle-hero-frame{border:2px solid var(--color-accent-metal,#c4a35a);background:linear-gradient(#d5e6ea,#f7f6f2);border-radius:16px;place-items:center;width:72px;height:72px;padding:4px;display:grid;overflow:hidden}.battle-hero{object-fit:contain;object-position:center;width:64px;height:64px}.hp,.exp{flex-direction:column;gap:2px;min-width:0;display:flex}.hp__label,.exp__label{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:600;overflow:hidden}.hp__track,.exp__track{background:var(--color-surface);border:1px solid var(--color-border);border-radius:999px;height:10px;overflow:hidden}.exp__track{height:6px}.hp__fill,.exp__fill{border-radius:999px;height:100%;display:block}.hp--player .hp__fill{background:var(--color-hp,#0f766e)}.hp--foe .hp__fill{background:var(--color-hp-foe,#8a6a1f)}.hp--player .hp__fill.is-low{background:var(--color-hp-low,#7a4a38)}.exp__fill{background:var(--color-exp-fill,#c4a35a)}.battle-hud__side{flex-direction:column;align-items:flex-end;gap:4px;display:flex}.combo{color:var(--color-combo,#8a6a1f);background:var(--color-combo-soft,#f4e4b0);border:1px solid var(--color-accent-metal,#c4a35a);animation:pop .22s var(--ease-out);border-radius:8px;padding:2px 8px;font-size:14px;font-weight:700}.combo strong{font-size:18px}.hud-stat{background:var(--color-surface);border-radius:999px;align-items:center;gap:4px;min-height:36px;padding:0 8px;font-size:14px;font-weight:600;display:inline-flex}.hud-stat img{width:20px;height:20px}.battle.keyboard-open .battle-arena{flex:0 0 88px;min-height:88px}.battle.has-figure .battle-arena{flex:0 0 128px;min-height:128px}.battle.has-figure .battle-foe{height:92px}.battle.has-figure .battle-foe.is-boss{height:104px}.final-ask{flex-direction:column;gap:10px;display:flex}.unit-note{color:var(--accent,#b45309);margin:0;font-weight:700}.finale-banner{text-align:center;margin:8px 0 0;font-weight:700}.steps{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.step-row{flex-direction:column;gap:8px;display:flex;position:relative}.step-row.is-upcoming{opacity:.4}.step-row.is-upcoming .q-text{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.steps .fill-form{flex-wrap:nowrap;align-items:center;width:100%;margin:0;display:flex;position:static}.steps .fill-form input,.steps .fill-form .btn{position:static}.steps .fill-form input{flex:auto}.steps .fill-form .btn{flex:none;width:auto}.battle-qingxing{object-fit:contain;object-position:bottom;filter:drop-shadow(0 8px 8px #0f172a59);width:auto;height:132px}.battle-qingxing.is-victory,.qingxing--reward.is-victory{height:180px;animation:.7s victory-hop}@keyframes victory-hop{40%{transform:translateY(-16px)}to{transform:translateY(0)}}.painted-stage{border-radius:16px;justify-content:space-between;align-items:flex-end;min-height:168px;display:flex;position:relative;overflow:hidden}.painted-bg{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.painted-hero,.painted-foe img{z-index:1;object-fit:contain;width:auto;height:128px;position:relative}.painted-foe{z-index:1;text-align:center;margin-right:8px;position:relative}.painted-foe p{color:#f8ecd0;text-shadow:0 1px 2px #1c140e;margin:0;font-weight:700}.painted-foe.is-hit img{animation:.28s battle-shake}.grind-stage{flex:0 0 30dvh;min-height:220px;max-height:245px}.arena-hall{flex:1;min-height:0;position:relative}.arena-hall .world-sheet{z-index:1}.arena-trial{background:#f7f6f2eb;border-radius:12px;margin:0 0 12px;padding:12px}.arena-trial.is-sealed{opacity:.72}.arena-trial button{width:100%;min-height:48px}.mock-grade{margin:0;font-size:56px}.mock-chapters{gap:10px;margin:12px 0 0;padding:0;list-style:none;display:grid}.mock-chapters li{background:#efece4;border-radius:10px;gap:2px;min-height:48px;padding:8px;display:grid;position:relative;overflow:hidden}.mock-chapters strong{white-space:nowrap}.mock-chapters i{background:#0f766e;height:4px;position:absolute;bottom:0;left:0}.battle-exit{z-index:6;color:#f8ecd0;background:#0f172ab8;border:1px solid #f8ecd0a6;border-radius:999px;min-width:40px;min-height:36px;padding:6px 10px;font-size:13px;font-weight:700;position:absolute;top:8px;right:8px}.battle-arena{aspect-ratio:16/9;flex-direction:column;flex:none;justify-content:flex-end;align-items:center;width:100%;height:min(30dvh,245px);min-height:220px;max-height:245px;padding-bottom:6px;display:flex;position:relative}.battle-arena-bg{z-index:0;border-radius:16px;position:absolute;inset:0;overflow:hidden}.battle-arena-bg img{object-fit:cover;width:100%;height:100%}.battle-cast{z-index:1;justify-content:center;align-items:flex-end;width:100%;display:flex;position:relative;overflow:visible}.battle-foe-wrap{z-index:1;flex-direction:column;align-items:center;width:min(250px,68%);display:flex;position:relative}.battle-foe{filter:drop-shadow(0 8px 12px #1b4d5c40);width:auto;max-width:86%;height:118px}.battle-foe.is-boss{height:132px}.battle-foe.is-hit{animation:battle-shake .28s var(--ease-out), battle-flash .18s var(--ease-out)}.battle-foe-meta{background:#0a0e12c7;border:1px solid #c4a35a6b;border-radius:12px;width:min(280px,94%);margin-top:4px;padding:8px 12px}.battle-foe-meta .hp__label{color:#f7f6f2}.boss-tag{background:var(--color-primary);color:#fff;letter-spacing:.08em;border-radius:999px;margin-bottom:4px;padding:1px 8px;font-size:12px;font-weight:700;display:inline-block}.battle .fx{pointer-events:none;z-index:2;background:0 0;height:auto;position:absolute;inset:auto}.fx--slash{width:160px;animation:fx-slash .32s var(--ease-out) both;top:8%;left:18%}.fx--impact{width:110px;animation:fx-pop .36s var(--ease-out) both;top:22%;left:50%}.fx--flash{width:180px;animation:fx-pop .28s var(--ease-out) both;top:6%;left:50%}.fx--spark{width:36px;animation:fx-pop .4s var(--ease-out) both;top:4%;right:18%}.dmg-pop{z-index:3;color:var(--color-accent);animation:dmg-float .7s var(--ease-out) both;font-size:32px;font-weight:700;position:absolute;top:8%;left:58%}.battle-quiz{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex-direction:column;flex:1;gap:8px;min-height:0;padding-bottom:8px;display:flex;overflow:hidden auto}.battle-next{flex:none;min-height:48px;margin-top:4px}.question-card{background:var(--color-surface);border:1px solid var(--color-accent-metal,var(--color-border));border-radius:16px;padding:12px}.q-tag{background:var(--color-primary-soft);color:var(--color-primary);border-radius:999px;margin:0 0 6px;padding:2px 10px;font-size:14px;font-weight:600;display:inline-block}.q-text{white-space:pre-wrap;margin:0;font-size:16px;font-weight:600;line-height:1.35}.choices{gap:8px;display:grid}@keyframes battle-flash{0%{filter:brightness(2.2)saturate(.4)}to{filter:none}}@keyframes fx-slash{0%{opacity:0;transform:translate(-12px,12px)scale(.8)}to{opacity:1;transform:none}}@keyframes fx-pop{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:none}}@keyframes dmg-float{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(-18px)}}.fx-ultimate{object-fit:cover;z-index:8;pointer-events:none;width:100%;height:100%;animation:ult-fade .56s var(--ease-out,ease-out) both;position:fixed;inset:0}@keyframes ult-fade{0%{opacity:0}18%{opacity:1}to{opacity:0}}.reward{flex-direction:column;flex:1;gap:12px;min-height:0;padding-bottom:8px;display:flex;position:relative;overflow:auto}.reward-bg{object-fit:cover;pointer-events:none;z-index:0;width:100%;height:100%;position:absolute;inset:0}.reward>:not(.reward-bg){z-index:1;position:relative}.wall-head{align-items:center;gap:12px;display:flex}.wall-head h1{margin:0;font-size:24px}.wall-head .icon-btn{place-items:center;width:44px;height:44px;padding:0;display:grid}.wall-head img{width:24px;height:24px}.levelup-hero{filter:drop-shadow(0 6px 10px #1b4d5c33);width:168px;height:auto;margin:0 auto}.levelup-lv{text-align:center;font-family:var(--font-display);color:var(--color-primary);margin:0;font-size:32px;font-weight:700}.levelup-hello,.levelup-note{text-align:center;margin:0}.levelup-note{color:var(--color-text-muted);font-size:14px}.boost-grid,.loot-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.boost-card,.loot-list li{text-align:left;background:var(--color-surface);border:2px solid var(--color-accent-metal,var(--color-border));width:100%;min-height:88px;box-shadow:var(--shadow-md);color:var(--color-text);border-radius:16px;grid-template-columns:64px 1fr;align-items:center;gap:2px 12px;padding:12px;display:grid}.loot-list li{border-width:1px}.boost-card img,.loot-list img{grid-row:1/span 2;width:64px;height:64px}.boost-card strong,.loot-list strong{font-family:var(--font-display);color:var(--color-primary);font-size:18px;display:block}.boost-card span,.loot-list span{color:var(--color-text-muted);font-size:16px;display:block}.chest-stage{justify-content:center;align-items:flex-end;gap:4px;min-height:220px;display:flex;position:relative;overflow:visible}.chest-glow{opacity:.85;pointer-events:none;width:220px;height:auto;position:absolute}.chest-art{z-index:1;width:168px;height:auto;position:relative}.reward .result-actions{margin-top:auto}.reward .result-actions .btn{width:100%}.lead{color:var(--muted);font-size:var(--body-size);margin-top:8px;line-height:1.5}.player-grid,.home-grid,.stack,.choice-list,.review-list,.history-list{gap:12px;display:grid}.player-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));margin-top:22px}.home-grid{grid-template-columns:repeat(auto-fit, minmax(min(100%, var(--card-min)), 1fr));margin-top:18px}.player-card{text-align:left;border:var(--stroke) solid var(--chrome-line);border-radius:var(--radius);background-color:var(--bg);background-image:var(--page-image);min-height:240px;color:var(--ink);box-shadow:var(--shadow);flex-direction:column;align-items:flex-start;gap:8px;padding:18px;display:flex}.player-card.is-last{outline:3px solid var(--gold)}.emblem{background:var(--mark) center / contain no-repeat;width:84px;height:84px}.player-card strong{font-family:var(--font-display);font-size:2rem}.paper{background:var(--paper);color:var(--paper-ink);border:var(--stroke) solid var(--paper-line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}.row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.badge,.chip{border-radius:999px;align-items:center;min-height:28px;padding:0 10px;font-size:.8rem;font-weight:700;display:inline-flex}.badge{background:var(--gold);color:var(--gold-ink)}.chip{background:var(--chip-bg);color:var(--chip-ink)}.mode-card h3{margin:6px 0;font-size:1.15rem}.mode-card p,.review p,.panel p,.about p,.history-card p{line-height:1.5}.play-status{align-items:center;gap:10px;margin-bottom:12px;display:flex}.score-readout{font-variant-numeric:tabular-nums;font-family:var(--font-display);margin-left:auto;font-size:1.4rem}.combo{background:var(--gold);color:var(--gold-ink);animation:pop var(--motion-fast) var(--ease);border-radius:999px;padding:4px 10px;font-weight:800}.timer{flex:none;width:64px;height:64px;position:relative}.timer svg{width:64px;height:64px;transform:rotate(-90deg)}.timer-track,.timer-value{fill:none;stroke-width:5px}.timer-track{stroke:var(--timer-track)}.timer-value{stroke:var(--timer);stroke-linecap:round}.timer.urgent .timer-value{stroke:var(--bad)}.timer.paused .timer-value{stroke:var(--hint)}.timer span{font-variant-numeric:tabular-nums;place-items:center;font-size:.95rem;font-weight:800;display:grid;position:absolute;inset:0}.q-card{position:relative}.q-card header{justify-content:space-between;gap:8px;margin-bottom:10px;display:flex}.q-image{width:min(100%, var(--image-max));max-height:var(--image-max-block);object-fit:contain;border-radius:calc(var(--radius-sm) - 2px);background:var(--choice-bg);height:auto;margin:12px auto 0;display:block}.battle-quiz .q-image{object-fit:contain;background:#f7f6f2;width:100%;max-width:342px;max-height:200px}.choice-list{margin-top:14px}.choice{text-align:left;background:var(--choice-bg);color:var(--paper-ink);border-color:var(--paper-line);box-shadow:var(--choice-shadow);font-size:var(--body-size);align-items:center;gap:12px;padding:10px 12px;font-weight:600;line-height:1.35;display:flex}.keycap{background:var(--keycap-bg);width:32px;height:32px;color:var(--keycap-ink);font-variant-numeric:tabular-nums;border-radius:10px;flex:none;place-items:center;font-size:.9rem;display:grid}.choice.is-correct{background:var(--good-bg);border-color:var(--good)}.choice.is-wrong{background:var(--bad-bg);border-color:var(--bad)}.choice.shake{animation:shake .42s var(--ease)}.tf-row{gap:var(--choice-gap);grid-template-columns:1fr 1fr;margin-top:14px;display:grid}.tf-row .choice{justify-content:center;min-height:84px;font-size:1.45rem}.fill-form{flex-wrap:wrap;gap:8px;margin-top:14px;display:flex}.fill-form input{min-width:0;min-height:var(--tap-min);border-radius:var(--radius-sm);border:var(--stroke) solid var(--paper-line);background:var(--choice-bg);color:var(--paper-ink);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;flex:180px;padding:0 14px;font-size:18px}.panel{border-radius:var(--radius-sm);margin-top:14px;padding:14px}.panel.hint{background:var(--hint-bg);color:var(--hint)}.panel.explain{background:var(--bad-bg);color:var(--paper-ink)}.panel.good{background:var(--good-bg);color:var(--good)}.panel .btn,.actions{margin-top:12px}.actions{flex-wrap:wrap;gap:8px;display:flex}.stack-actions{grid-template-columns:1fr;display:grid}.stack-actions .btn{width:100%}.score-pop{font-family:var(--font-display);color:var(--good);animation:float .9s var(--ease);font-size:1.6rem;position:absolute;top:12px;right:16px}.hero-score{justify-content:space-between;align-items:center;gap:12px;display:flex}.accuracy{background:conic-gradient(var(--good) calc(var(--p) * 1%), var(--choice-bg) 0);border-radius:50%;flex:none;place-items:center;width:92px;height:92px;display:grid}.accuracy span{background:var(--paper);font-variant-numeric:tabular-nums;border-radius:50%;place-items:center;width:70px;height:70px;font-weight:800;display:grid}.stat-row{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px;display:grid}.stat-row div{background:var(--choice-bg);border-radius:var(--radius-sm);padding:10px}.stat-row strong{font-variant-numeric:tabular-nums;font-size:1.2rem;display:block}.review+.review,.history-card+.history-card{margin-top:10px}.sheet-back{z-index:5;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));background:#14100c75;align-items:end;display:grid;position:fixed;inset:0}.sheet{width:min(100%, var(--stage-max));background:var(--paper);color:var(--paper-ink);border-radius:var(--radius);border:var(--stroke) solid var(--paper-line);box-shadow:var(--shadow);margin:0 auto;padding:16px}.switch{background:var(--choice-bg);width:100%;color:var(--paper-ink);border-color:var(--paper-line);justify-content:space-between;align-items:center;margin-top:8px;padding:0 14px;font-weight:700;display:flex}.switch i{background:var(--chrome-line);border-radius:999px;width:46px;height:28px;font-style:normal;position:relative}.switch i:after{content:"";width:22px;height:22px;transition:transform var(--motion-fast) var(--ease);background:#fff;border-radius:50%;position:absolute;top:3px;left:3px}.switch[aria-checked=true] i{background:var(--accent)}.switch[aria-checked=true] i:after{transform:translate(18px)}.offline{margin-bottom:10px}.sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.empty{padding:8px 0 4px}.key-hint{color:var(--muted);margin-top:10px;font-size:.92rem}.credit+.credit{border-top:var(--stroke) solid var(--paper-line);margin-top:12px;padding-top:12px}.credit h3{margin:0 0 4px;font-size:1rem}@keyframes rise{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes pop{0%{transform:scale(.9)}to{transform:scale(1)}}@keyframes float{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(-6px)}}@keyframes shake{20%{transform:translate(-5px)}40%{transform:translate(5px)}60%{transform:translate(-3px)}80%{transform:translate(2px)}}@media (width>=900px){.sheet-back{align-items:center}}.press-title{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.parent-bar{background:var(--color-primary-soft,#d5e6ea);color:var(--color-primary,#1b4d5c);border-radius:999px;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;padding:4px 10px;font-size:13px;font-weight:700;display:flex}.parent-bar .btn{min-height:32px;padding:0 12px}.parent-answer{color:var(--color-primary,#1b4d5c);margin:8px 0 0;font-size:15px;line-height:1.45}.step-done{color:var(--color-success,#0f766e);margin:0 0 8px;font-weight:700}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.cp1-shell{min-height:0;color:var(--color-text);flex-direction:column;flex:1;display:flex}.cp1-header{flex-direction:column;flex:none;gap:8px;padding-bottom:8px;display:flex}.cp1-header-row{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.cp1-title{font-family:var(--font-display);margin:0;font-size:28px;line-height:1.2}.cp1-edition,.cp1-player span,.cp1-subject small,.cp1-save span,.cp1-node small{color:var(--color-text-muted);font-size:14px;font-style:normal;font-weight:600;display:block}.cp1-player{text-align:right;margin:0;font-weight:700}.cp1-parent-bar,.cp1-hero,.cp1-save,.cp1-tools{justify-content:space-between;align-items:center;gap:8px;display:flex}.cp1-parent-bar{background:var(--color-hint-soft);border-radius:12px;flex-wrap:wrap;padding:8px}.cp1-shell .cp1-node{background:0 0;border:0}.cp1-shell button{border:2px solid var(--color-border,#d2cdc0);background:var(--color-surface);border-radius:12px;min-height:48px;padding:8px 12px;font-weight:700}.cp1-parent-bar button.is-on,.cp1-nav button.is-on{background:var(--color-primary);color:var(--color-text-on-primary);border-color:var(--color-primary)}.cp1-main{flex-direction:column;flex:1;gap:12px;min-height:0;padding-bottom:8px;display:flex;overflow:auto}.cp1-hello{margin:0 0 4px;font-size:18px;font-weight:700}.cp1-hero button{white-space:nowrap}.cp1-hero p,.cp1-map-note,.cp1-save p{margin:0}.cp1-subjects{flex-direction:column;gap:8px;display:flex}.cp1-subject{text-align:left;grid-template-columns:56px 1fr auto;align-items:center;gap:10px;min-height:76px;display:grid}.cp1-subject img{width:48px;height:48px}.cp1-subject strong{font-size:18px;display:block}.cp1-subject em{margin-left:8px;font-size:13px;font-style:normal}.cp1-subject.is-phys{border-color:var(--subject-phys-border);background:var(--subject-phys-soft);color:var(--subject-phys-text)}.cp1-subject.is-chi{border-color:var(--subject-chi-border);background:var(--subject-chi-soft);color:var(--subject-chi-text)}.cp1-subject.is-eng{border-color:var(--subject-eng-border);background:var(--subject-eng-soft);color:var(--subject-eng-text)}.cp1-subject.is-his{border-color:var(--subject-his-border);background:var(--subject-his-soft);color:var(--subject-his-text)}.cp1-subject.is-phys b{color:var(--subject-phys)}.cp1-subject.is-chi b{color:var(--subject-chi)}.cp1-subject.is-eng b{color:var(--subject-eng)}.cp1-subject.is-his b{color:var(--subject-his)}.cp1-save button{background:var(--subject-phys);color:var(--subject-phys-on);border-color:var(--subject-phys);align-items:center;gap:8px;display:inline-flex}.cp1-save img{width:24px;height:24px}.cp1-nav{flex:none;grid-template-columns:repeat(3,1fr);gap:8px;padding-top:8px;display:grid}.cp1-nav button{flex-direction:column;justify-content:center;align-items:center;line-height:1.2;display:flex}.cp1-nav small{font-size:12px;font-weight:600}.cp1-toast{left:50%;bottom:calc(24px + var(--safe-bottom,env(safe-area-inset-bottom,0px)));z-index:6;background:var(--color-primary);max-width:min(320px,90vw);color:var(--color-text-on-primary);border-radius:12px;margin:0;padding:12px 16px;font-weight:700;position:fixed;transform:translate(-50%)}.cp1-map-main{padding-bottom:12px}.cp1-board{aspect-ratio:1536/2752;width:100%;position:relative}.cp1-map-bg{object-fit:cover;border-radius:16px;width:100%;height:100%;position:absolute;inset:0}.cp1-seal{z-index:1;pointer-events:none;width:72px;position:absolute;transform:translate(-50%,-50%)}.cp1-seal img{width:100%;height:auto;display:block}.cp1-emblem{position:absolute;top:16%;left:18%;width:64%!important}.cp1-node{z-index:2;background:0 0;border:0;flex-direction:column;align-items:center;width:112px;min-height:48px;padding:0;display:flex;position:absolute;transform:translate(-50%,-50%)}.cp1-node img{width:56px;height:56px}.cp1-node span{background:#f7f6f2eb;border-radius:8px;margin-top:2px;padding:2px 6px;font-size:12px;font-weight:700;line-height:1.25}.cp1-node.is-current img{animation:1.6s ease-in-out infinite cp1-pulse}.cp1-sheet{z-index:7;padding:16px;padding-bottom:calc(16px + var(--safe-bottom,env(safe-area-inset-bottom,0px)));background:#1a1f2675;align-items:end;display:grid;position:fixed;inset:0}.cp1-sheet div{background:var(--color-surface);border-radius:16px;padding:16px}.cp1-sheet h2{margin:0 0 8px;font-size:20px}.cp1-sheet button{background:var(--subject-phys);width:100%;color:var(--subject-phys-on)}.map-return{border:2px solid var(--color-border);background:var(--color-surface);border-radius:12px;min-height:48px;font-weight:700}.history-screen{flex:1;min-height:0;overflow:hidden}.history-screen.town-panel{background:0 0;border-radius:0;height:auto;max-height:none}@keyframes cp1-pulse{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}@media (prefers-reduced-motion:reduce){.cp1-node.is-current img{animation:none}}.world-shell,.town-shell,.volcano-shell{flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.world-bg{object-fit:cover;object-position:center top;width:100%;height:100%;position:absolute;inset:0}.town-shell img.town-bg,.volcano-shell img.volcano-bg{object-fit:cover;object-position:center 42%;width:100%;max-width:none;height:230px;position:absolute;top:0;left:0}.world-hud,.world-bar,.town-head,.town-shell main,.volcano-shell header,.volcano-shell ol,.volcano-shell .cp1-parent-bar{z-index:2;position:relative}.world-hud{background:linear-gradient(#f7f6f2eb,#f7f6f200);flex:0 0 10%;justify-content:space-between;align-items:center;gap:8px;min-height:64px;padding:4px 4px 0;display:flex}.world-hud strong{font-family:var(--font-display);font-size:22px;display:block}.world-hud span{color:var(--color-text-muted);font-size:13px;font-weight:700;display:block}.world-hud button,.world-bar button,.town-shell button,.volcano-shell button{border:2px solid var(--color-border,#d2cdc0);background:#f7f6f2f0;border-radius:12px;min-height:48px;padding:8px 12px;font-weight:700}.world-board{position:absolute;inset:0}.world-node{z-index:2;width:52px;min-width:52px;height:52px;min-height:52px;box-shadow:none;background:0 0;border:0;border-radius:999px;padding:0;position:absolute;transform:translate(-50%,-50%)}.world-node i{background:#faf7f2b8;border-radius:999px;width:8px;height:8px;margin:22px auto 0;display:block;box-shadow:0 0 0 1px #1a1f2647}.world-node.is-open{box-shadow:none;background:0 0}.world-node.is-open i{background:#f8e7a0;width:11px;height:11px;margin-top:20px;box-shadow:0 0 0 2px #8a6a1f,0 0 10px #f4e4b0}.world-node span{color:#1a1f26;pointer-events:none;background:#f7f6f29e;border:1px solid #1a1f261f;border-radius:999px;width:max-content;max-width:96px;padding:2px 7px;font-size:11px;font-weight:650;line-height:1.25;position:absolute;top:40px;left:50%;transform:translate(-50%)}.world-node.is-open span{color:#faf7f2;background:#1a1f26e6;border-color:#c4a35a;font-size:12px;font-weight:700}.world-node.side-left span{top:8px;left:auto;right:36px;transform:none}.world-node.side-right span{top:8px;left:36px;transform:none}.world-node.side-top span{top:auto;bottom:40px}.world-node[data-id=exam-arena] span{white-space:nowrap;max-width:none;font-size:10px;top:44px}.world-node[data-id=chi-tower] span{top:-6px;right:44px}.world-node[data-id=math-temple] span{top:-4px;left:42px}.world-node[data-id=social-city] span{bottom:48px}.world-node[data-id=earth-observatory] span{top:44px;left:64%}.world-hero{z-index:3;pointer-events:none;filter:drop-shadow(0 2px 2px #1a1f2673)drop-shadow(0 0 6px #f8e7a0d9);width:50px;height:50px;position:absolute;transform:translate(-130%,-80%)}.world-hero img{object-fit:contain;width:100%;height:100%}.world-hero.face-left img{transform:scaleX(-1)}.world-hero.is-walking{animation:.42s ease-in-out infinite world-bob}.world-bar{background:linear-gradient(#f7f6f200,#f7f6f2f0);flex-direction:column;flex:0 0 16%;justify-content:flex-end;gap:6px;min-height:92px;margin-top:auto;padding-bottom:4px;display:flex}.world-bar p{margin:0;font-weight:700}.world-bar div{grid-template-columns:1fr 1fr;gap:8px;display:grid}.world-sheet{z-index:5;background:#1a1f2666;align-items:end;padding:12px;display:grid;position:absolute;inset:0}.world-sheet>div:not(.town-panel){background:var(--color-surface);border-radius:16px;max-height:72dvh;padding:16px;overflow-y:auto}.town-panel{background:var(--color-surface);height:82dvh;max-height:82dvh;padding:0 0 env(safe-area-inset-bottom);border-radius:16px;flex-direction:column;display:flex;overflow:hidden}.town-panel-head,.town-panel-foot{flex-shrink:0;padding:12px 16px 8px}.town-panel-head p{margin:0}.town-panel-body{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;flex:auto;min-height:0;padding:0 16px 8px;overflow:hidden auto}.town-panel-foot button{width:100%;min-height:48px}.backup-box{gap:8px;margin:8px 0;display:grid}.backup-box textarea{width:100%;min-height:72px;font-size:14px}.world-sheet h2{margin:0 0 6px;font-size:22px}.world-sheet ul{gap:8px;margin:0 0 12px;padding:0;list-style:none;display:grid}.world-sheet li{background:var(--color-surface-alt,#efece4);border-radius:12px;justify-content:space-between;align-items:center;gap:8px;min-height:48px;padding:8px 12px;font-weight:700;display:flex}.world-sheet small{color:var(--color-text-muted)}.world-sheet button{width:100%}.town-head,.volcano-shell header{background:linear-gradient(#e8e6de26,#e8e6def0);flex-direction:column;justify-content:space-between;min-height:200px;display:flex}.town-head,.town-shell main,.volcano-shell header,.volcano-shell ol{padding:8px 0}.town-shell main,.volcano-shell ol{flex-direction:column;gap:10px;margin:0;list-style:none;display:flex;overflow:auto}.town-shell section,.volcano-shell li button{background:#f7f6f2eb;border-radius:16px;flex-direction:column;gap:8px;padding:12px;display:flex}.town-shell h1,.volcano-shell h1,.town-shell h2{margin:0}.town-shell .is-primary{background:var(--subject-phys);color:#faf7f2;justify-content:center;align-items:center;gap:8px;display:inline-flex}.town-shell .is-primary svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.town-shell img{width:24px;height:24px}.volcano-shell header{align-items:center;gap:8px;display:flex}.volcano-shell li button{text-align:left;flex-direction:row;align-items:center;width:100%}.volcano-shell li{list-style:none}.volcano-shell img{width:48px;height:48px}.volcano-shell small,.town-shell small{color:var(--color-text-muted);display:block}.dungeon-shell{flex:1;min-height:0;position:relative;overflow:hidden}.dungeon-bg{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.dungeon-paths{width:100%;height:100%;position:absolute;inset:0}.dungeon-paths line{stroke:#faf7f2bf;stroke-width:.6px;stroke-dasharray:1.4 1.1}.dungeon-hud,.dungeon-parent,.dungeon-tabs{z-index:2;align-items:center;gap:8px;display:flex;position:relative}.dungeon-tabs button{flex:1;min-height:48px;padding:6px;font-size:13px}.dungeon-tabs button.is-on{color:#faf7f2;background:#1f2937}.dungeon-hud h1{color:#faf7f2;text-shadow:0 1px 2px #00000073;background:#0f172abd;border-radius:999px;margin:0;padding:6px 12px;font-size:22px}.world-hud .world-leave{white-space:nowrap;padding:8px 10px;font-size:14px}.dungeon-node{z-index:2;background:0 0;border:0;border-radius:999px;width:52px;min-width:52px;height:52px;min-height:52px;padding:0;position:absolute;transform:translate(-50%,-50%)}.dungeon-node i{background:#faf7f2cc;border-radius:999px;width:10px;height:10px;margin:21px auto 0;display:block;box-shadow:0 0 8px #fb923ce6}.dungeon-node.is-open i{background:#f8e7a0;box-shadow:0 0 0 2px #8a6a1f,0 0 10px #fb923c}.dungeon-node span{color:#faf7f2;background:#1a1f26d1;border-radius:999px;width:max-content;max-width:140px;padding:3px 8px;font-size:12px;font-weight:700;position:absolute;top:6px;left:58px}.dungeon-node.side-left span{left:auto;right:58px}.dungeon-node.side-top span{top:auto;bottom:40px;left:50%;transform:translate(-50%)}.dungeon-node small{color:#f4e4b0;font-weight:600;display:block}.dungeon-hud button,.dungeon-parent button,.grind-hud button,.grind-items button,.grind-card button{min-height:48px}.grind-shell{flex-direction:column;flex:1;height:100%;min-height:0;display:flex;position:relative;overflow:hidden}.grind-card{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:1;min-height:0;overflow-y:auto}.town-map{flex:1;min-height:0;position:relative;overflow:hidden}.town-map-bg{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.town-map-hud,.town-map-bar,.town-map-parent{z-index:3;position:relative}.town-map-hud{background:linear-gradient(#f7f6f2e6,#0000);justify-content:space-between;align-items:center;min-height:56px;padding:4px;display:flex}.town-map-bar{z-index:3;background:linear-gradient(#0000,#f7f6f2f0);padding:8px 0 4px;position:absolute;bottom:0;left:0;right:0}.town-map-bar button,.town-map-parent button,.world-sheet button{min-height:48px}.town-node,.town-npc{z-index:2;background:0 0;border:0;border-radius:999px;width:52px;min-width:52px;height:52px;min-height:52px;padding:0;position:absolute;transform:translate(-50%,-50%)}.town-node i{background:#f8e7a0;border-radius:999px;width:9px;height:9px;margin:21px auto 0;display:block;box-shadow:0 0 8px #c4a35a}.town-node span,.town-npc em{color:#faf7f2;background:#1a1f26e0;border-radius:999px;width:max-content;max-width:120px;padding:3px 8px;font-size:12px;font-style:normal;position:absolute;top:8px;left:56px}.town-node.side-left span{left:auto;right:56px}.town-node.side-top span{top:auto;bottom:42px;left:50%;transform:translate(-50%)}.town-npc img{object-fit:contain;width:42px;height:42px}.town-npc em{width:160px;top:auto;bottom:46px;left:50%;transform:translate(-50%)}.town-hero{z-index:2;pointer-events:none;filter:drop-shadow(0 2px 2px #1a1f2673);width:48px;height:48px;position:absolute;transform:translate(-50%,-80%)}.town-hero img{object-fit:contain;width:100%;height:100%}.town-hero.face-left img{transform:scaleX(-1)}.town-hero.is-walking,.town-npc.is-walking{animation:.45s ease-in-out infinite town-bob}.town-npc.is-idle:not(.is-walking){animation:2.8s ease-in-out infinite town-breathe}@keyframes town-bob{0%,to{margin-top:0}50%{margin-top:-4px}}@keyframes town-breathe{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}.town-npc.face-left img{transform:scaleX(-1)}.church-seal{min-height:48px;font:inherit;background:0 0;border:0;font-size:22px;font-weight:700}.world-sheet section button{min-height:48px}.grind-bg{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.grind-hud,.grind-card,.grind-items{z-index:1;position:relative}.grind-hud{color:#faf7f2;background:#0f172abd;border-radius:12px;justify-content:space-between;align-items:center;gap:8px;margin:4px 0;padding:8px 10px;display:flex}.grind-hud p,.grind-hud span,.grind-hud button{color:#faf7f2}.grind-hud button.grind-escape{color:#1f2937;background:#faf7f2}.grind-hud p,.grind-card p{margin:0}.grind-hud span,.grind-items small{font-size:13px;display:block}.grind-items button:disabled{opacity:1;background:#0f172abd}.grind-items button:disabled,.grind-items button:disabled small{color:#faf7f2d9}.grind-card{background:#f7f6f2eb;border-radius:16px;margin:8px 0;padding:12px;overflow:auto}.grind-items{grid-template-columns:repeat(3,1fr);gap:6px;margin-top:auto;display:grid}.grind-items button{flex-direction:column;align-items:center;font-size:12px;display:flex}.grind-items img{object-fit:contain;width:36px;height:36px}.town-shell section button{text-align:left;align-items:center;gap:8px;display:flex}.town-shell section img{object-fit:contain;width:40px;height:40px}.battle-shot{z-index:4;object-fit:contain;pointer-events:none;border-radius:999px;width:36px;height:36px;animation:.52s ease-out both shot-fly;position:absolute;top:51%;left:26%}.battle-shot--snow{width:18px;height:18px;box-shadow:0 0 12px #e2f1ff}@keyframes shot-fly{0%{opacity:1;top:51%;left:26%;transform:translate(-50%,-50%)}to{opacity:.15;top:52%;left:74%;transform:translate(-50%,-50%)}}.painted-hero.is-hurt{animation:.42s hero-hurt}@keyframes hero-hurt{0%,to{filter:none;transform:translate(0)}35%{filter:drop-shadow(0 0 10px #ef4444)saturate(2.4);transform:translate(-8px)}70%{filter:drop-shadow(0 0 6px #b91c1c);transform:translate(5px)}}.goods-icon{background:#e7e2d6;border-radius:10px;flex:none;width:48px;height:48px;overflow:hidden}.goods-icon img{object-fit:contain;opacity:0;width:48px;height:48px}.goods-icon img.is-ready{opacity:1;transition:opacity .18s}@keyframes world-bob{0%,to{margin-top:0}50%{margin-top:-6px}}@media (prefers-reduced-motion:reduce){.world-hero.is-walking{animation:none}}
