:root{color-scheme:light;--ink:#293d39;--muted:#778079;--paper:#fbf6ea;--green:#31594b;--gold:#bd8a3f;--line:#dfd5c2}
*{box-sizing:border-box}body{margin:0;background:#f2ecdf;color:var(--ink);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;background-image:radial-gradient(ellipse at 15% 0,#fefbf3 0,transparent 55%),radial-gradient(ellipse at 90% 50%,#e4e8db 0,transparent 60%)}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #c58e3f;outline-offset:4px}a{color:inherit;text-decoration:none}button{color:var(--ink)}button:hover:not(:disabled){filter:brightness(1.07)}[hidden]{display:none!important}.page{max-width:1100px;padding:0 28px;margin:auto}.topbar{display:flex;align-items:center;gap:20px;height:68px;border-bottom:1px solid var(--line);font-size:13px}.back-link{color:#53635a}.back-link:hover{color:var(--gold)}.brand{margin-left:auto;color:var(--muted)}.icon-button{width:34px;height:34px;display:inline-grid;place-items:center;border:1px solid #d8d0bc;border-radius:9px;background:#fbf7ec;font-size:19px;line-height:1}.title-row{display:flex;justify-content:space-between;align-items:center;padding:27px 0 23px}.eyebrow{margin:0 0 9px;font-size:11px;letter-spacing:3px;color:#8a826d}h1{margin:0;font-size:30px;letter-spacing:2px;font-weight:800}h1 span{font-size:15px;font-weight:400;letter-spacing:3px;margin-left:18px;color:#6e786a}.wallet{display:flex;align-items:center;gap:9px;background:#f9f4e8;border:1px solid #d9c9a9;border-radius:30px;padding:9px 17px;color:#a47836}.wallet>span{font-size:22px}.wallet b{font-size:18px}.wallet small{font-size:11px}.game-shell{border:1px solid #ccc4af;border-radius:16px;overflow:hidden;box-shadow:0 16px 44px #3d443216;background:var(--paper)}.hud{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 22px;min-height:75px;background:#fcf8ec;border-bottom:1px solid #d5cbb5}.stage-info{display:flex;align-items:center;gap:12px;min-width:150px}.chapter-mark{font-family:Georgia,serif;font-size:24px;color:#b19d70;border-right:1px solid #d6cfbd;padding-right:12px}.stage-info small{display:block;font-size:10px;letter-spacing:2px;color:var(--muted);margin-bottom:5px}.stage-info strong{display:block;font-size:14px;letter-spacing:1px}.health{width:210px;max-width:30%}.health>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#738067;margin-bottom:7px}.health b{font-size:10px;font-weight:500}.health-track{height:6px;background:#e0ddcf;border-radius:6px;overflow:hidden}.health-track i{display:block;height:100%;background:#739461;width:100%;transition:width .18s}.hud-actions{display:flex;align-items:center;gap:8px}.wave-label{font-size:11px;color:#77806d;margin-right:10px}.scene{position:relative;height:380px;isolation:isolate;background:#203d44}.scene canvas{display:block;width:100%;height:100%}.scene-caption{position:absolute;bottom:15px;left:0;width:100%;color:#fff4d9;text-align:center;letter-spacing:2px;font-size:12px;text-shadow:0 2px 5px #162622;pointer-events:none}.loading{position:absolute;inset:0;display:grid;place-items:center;background:#f3ecdf;z-index:5;color:#737d66;font-size:13px}.boss-warning{position:absolute;top:16px;left:50%;transform:translateX(-50%);background:#813f32e8;color:#fff1da;border:1px solid #e7b184;padding:9px 18px;border-radius:8px;white-space:nowrap;font-size:12px;box-shadow:0 3px 18px #31150f55}.combo-badge{position:absolute;top:20px;left:25px;color:#ffdfa2;text-shadow:0 2px 4px #173b30;letter-spacing:1px;font-weight:700;font-size:17px}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;background:#162f3938;backdrop-filter:blur(2px)}.panel{max-width:650px;width:100%;padding:24px 32px;border-radius:14px;border:1px solid #cdbb91;background:#faf5e8f5;box-shadow:0 15px 55px #12242938;text-align:center}.panel-kicker{font-size:10px;color:#ab8748;letter-spacing:3px;margin:0 0 8px}.panel h2{font-family:Georgia,"Microsoft YaHei",serif;font-size:27px;margin:0 0 10px;letter-spacing:2px}.panel p{font-size:12px;line-height:1.8;color:#727b6e;margin:0 0 14px}.menu-options{display:flex;justify-content:center;gap:20px;margin:12px 0 17px}.menu-options label{display:flex;align-items:center;gap:8px;font-size:11px;color:#68705f}.menu-options select{padding:7px 10px;border:1px solid #d8cdb4;background:#fffcf4;color:#405844;border-radius:7px;font:inherit;max-width:165px}.stage-map{display:grid;grid-template-columns:repeat(10,1fr);gap:7px;margin:0 0 16px}.stage-node{height:33px;border:1px solid #d8cbb1;border-radius:50%;background:#f0e9d7;font-family:Georgia,serif;position:relative;font-size:13px}.stage-node.completed{background:#e4eadb;border-color:#becbb0;color:#647b53}.stage-node.selected{background:#385f50;color:#fff6db;border-color:#385f50;box-shadow:0 0 0 3px #355e4d19}.stage-node.boss{color:#a36d35}.stage-node.selected.boss{color:#ffe2a0}.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:15px;background:var(--green);border:1px solid #294d3e;border-radius:8px;padding:12px 36px;color:#fff4d6;font-weight:600;font-size:14px;box-shadow:0 3px 0 #254439}.secondary-button{display:inline-flex;align-items:center;justify-content:center;background:#ede7d8;border:1px solid #d2c5ab;border-radius:8px;padding:11px 22px;font-size:12px;color:#66715a}.panel-actions{display:flex;justify-content:center;gap:12px}.camp-upgrades{display:flex;justify-content:center;gap:10px;border-top:1px dashed #d5cab0;padding-top:14px;margin-top:18px}.upgrade-button{text-align:left;border:1px solid #dbceb3;border-radius:8px;padding:8px 12px;background:#f8f0df;font-size:11px;flex:1}.upgrade-button strong{display:block;font-size:11px;color:#5b6e50;margin-bottom:4px}.upgrade-button small{color:#8c805e;font-size:10px}.upgrade-button span{float:right;color:#ad8036}.panel .menu-note{margin:9px 0 0;font-size:10px;color:#9a8b71;line-height:1.5}.typing-dock{padding:20px 24px 14px;background:#fbf7ee}.target-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px;min-height:56px}.target-label{font-size:10px;color:#8a907d;letter-spacing:2px}.target-word{font-size:27px;line-height:1.35;font-weight:700;color:#365446;letter-spacing:5px;margin-top:6px;min-height:37px}.target-word .typed{color:#b68a3b}.word-meaning{display:block;color:#98927f;font-size:11px;min-height:0}.run-stats{display:flex;gap:7px;align-items:baseline;font-size:10px;color:#898c7c}.run-stats b{font-family:Georgia,serif;font-size:26px;color:#59724e;font-weight:400}.run-stats i{height:23px;width:1px;background:var(--line);align-self:center;margin:0 14px}form{display:flex;gap:10px}#word-input{width:100%;min-width:0;outline:none;border:1px solid #d4c9b0;background:#fffdf5;border-radius:8px;height:49px;padding:0 16px;font-size:17px;color:#365446;caret-color:#9c7a35;transition:border-color .2s,box-shadow .2s}#word-input::placeholder{color:#b4ae9c;font-size:13px;letter-spacing:1px}#word-input:focus{border-color:#9da987;box-shadow:0 0 0 3px #68865312}.cast-button{flex:none;border:1px solid #355746;border-radius:8px;background:#426651;color:#fcf4df;width:98px;font-size:13px}.dock-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:11px}.dock-bottom p{font-size:10px;color:#8a8d7b;margin:0;line-height:1.6}.dock-bottom p.error{color:#b4674d}.spell-tools{display:flex;gap:12px;flex:none}.spell-tools button{background:none;border:0;padding:5px 0;color:#8d8266;font-size:11px}.below-game{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 3px}.below-game p{color:#929483;font-size:10px;line-height:1.8;margin:0}.below-game a{color:#8c8169;font-size:11px;white-space:nowrap}footer{display:flex;justify-content:center;gap:24px;padding:17px 0 24px;font-size:10px;color:#a3a18e}.result-stats{display:flex;justify-content:center;gap:28px;margin:18px 0 24px}.result-stats div{font-size:10px;color:#7f846f}.result-stats b{display:block;color:#57714d;font-size:25px;font-family:Georgia,serif;font-weight:400;margin-bottom:4px}.rune-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:20px}.rune-option{border:1px solid #d3c6a7;background:#f7efd9;border-radius:10px;padding:18px 10px;font-size:11px}.rune-option .rune-icon{display:block;font-size:30px;color:#a58041;margin-bottom:12px}.rune-option strong{display:block;font-size:13px;color:#4d684a;margin-bottom:8px}.rune-option small{line-height:1.7;color:#968365;font-size:10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.input-error{animation:nudge .18s 2}@keyframes nudge{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}.game-shell:fullscreen{width:100vw;height:100dvh;display:flex;flex-direction:column;border-radius:0}.game-shell:fullscreen .scene{flex:1;min-height:200px;height:auto}.game-shell:fullscreen .typing-dock{flex:none}.game-shell:fullscreen .hud{flex:none}
@media(min-width:1200px){.scene{height:410px}}
@media(max-width:700px){.page{padding:0 14px}.topbar{height:54px;gap:12px}.title-row{padding:20px 0 17px}h1{font-size:25px}h1 span{font-size:11px;letter-spacing:1px;margin-left:12px}.eyebrow{font-size:9px;letter-spacing:2px}.wallet{padding:7px 12px;gap:6px}.wallet small{display:none}.wallet b{font-size:16px}.hud{gap:10px;padding:11px 13px;min-height:65px}.stage-info{gap:8px;min-width:112px}.chapter-mark{font-size:19px;padding-right:8px}.stage-info small{font-size:8px;letter-spacing:0}.stage-info strong{font-size:12px;letter-spacing:0}.health{width:130px;max-width:29%}.hud-actions{gap:5px}.hud-actions .icon-button{width:29px;height:29px;font-size:16px}.wave-label{display:none}.scene{height:350px}.panel{padding:20px 17px;max-width:450px}.panel h2{font-size:23px}.panel p{font-size:11px}.menu-options{gap:12px;margin-bottom:14px}.menu-options label{display:block;text-align:left;font-size:10px}.menu-options select{display:block;margin-top:5px;font-size:11px;padding:6px 8px}.stage-map{gap:5px;margin-bottom:14px}.stage-node{height:27px;font-size:11px}.primary-button{padding:11px 26px;font-size:13px}.camp-upgrades{padding-top:12px;margin-top:16px;gap:7px}.upgrade-button{padding:7px 8px}.upgrade-button span{float:none;display:block;margin-top:4px}.typing-dock{padding:16px 14px 12px}.target-row{margin-bottom:11px}.target-word{font-size:24px;letter-spacing:3px}.target-label{font-size:9px;letter-spacing:1px}.run-stats{gap:5px;font-size:9px}.run-stats b{font-size:23px}.run-stats i{margin:0 6px}.cast-button{width:74px;font-size:12px}#word-input{height:45px;padding:0 11px;font-size:16px}#word-input::placeholder{font-size:11px;letter-spacing:0}.dock-bottom{gap:6px;align-items:flex-start}.dock-bottom p{font-size:9px}.spell-tools{gap:10px}.spell-tools button{font-size:10px;padding-top:0}.below-game{gap:10px;padding:12px 0}.below-game p{font-size:9px}.below-game a{font-size:10px}footer{padding-top:9px;gap:12px;font-size:8px}.rune-options{gap:7px}.rune-option{padding:15px 5px}.rune-option strong{font-size:11px}.rune-option small{font-size:9px}.boss-warning{font-size:10px;padding:8px 12px}.combo-badge{font-size:13px;left:14px;top:14px}}
@media(max-width:380px){.page{padding:0 9px}h1{font-size:22px}h1 span{font-size:10px;margin-left:8px}.panel{padding:18px 13px}.scene{height:340px}.stage-node{height:25px}.stage-map{gap:3px}.health{max-width:25%}.hud{gap:6px}.hud-actions .icon-button{width:26px;height:28px}.run-stats span{font-size:8px}.run-stats i{margin:0 3px}.camp-upgrades{gap:5px}}
@media(max-height:620px) and (min-width:701px){.title-row{padding:12px 0}.eyebrow{display:none}.topbar{height:45px}.scene{height:310px}.typing-dock{padding:12px 20px}.target-row{margin-bottom:8px}.panel{padding:17px 26px}.camp-upgrades{margin-top:12px}.below-game,footer{padding:8px}}
.topbar #tgma-lang-switcher{position:relative;top:auto;right:auto;z-index:20;flex:none}.topbar #tgma-lang-switcher .tgma-lang-btn{padding:8px 10px;font-size:11px;background:#fbf7ec;box-shadow:none;border-color:#d8d0bc}.topbar #tgma-lang-switcher .tgma-lang-menu{z-index:20}
.scene{height:440px}.overlay{overflow:auto}.panel{flex-shrink:0;margin:auto 0;padding:20px 28px}.panel .panel-kicker{font-size:10px;line-height:1.2;margin-bottom:8px}.camp-upgrades{margin-top:14px;padding-top:11px}.stage-node{width:100%;max-width:33px;height:auto;aspect-ratio:1;justify-self:center}
@media(max-width:700px){.topbar .brand{display:none}.topbar .back-link{margin-right:auto}.scene{height:430px}.panel{padding:20px 16px}.panel .menu-note{font-size:9px}.stage-node{max-width:27px}}
@media(max-width:700px){.panel h2{margin-bottom:7px}.panel>p:not(.menu-note):not(.panel-kicker){margin-bottom:10px;line-height:1.6}.menu-options{margin:8px 0 11px}.camp-upgrades{margin-top:11px;padding-top:9px}.panel .menu-note{margin-top:7px;margin-bottom:0}.panel{padding-top:17px;padding-bottom:17px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.related-links{display:flex;gap:16px;flex:none}@media(max-width:700px){.below-game{align-items:flex-start}.related-links{flex-direction:column;gap:7px}}
.typing-dock.spell-cast{animation:spell-dock-glow .45s ease-out}.typing-dock.spell-cast .target-word{animation:spell-word-glow .45s ease-out}.typing-dock.spell-volley{animation:volley-dock-glow .7s ease-out}.typing-dock.spell-volley .target-word{animation:volley-word-glow .7s ease-out}
@keyframes spell-dock-glow{0%{box-shadow:inset 0 2px 0 #e9bd65,inset 0 10px 28px #f3d28938}100%{box-shadow:inset 0 2px 0 transparent,inset 0 10px 28px transparent}}
@keyframes spell-word-glow{0%{color:#ae7c2b;text-shadow:0 0 16px #edc77088}100%{color:#365446;text-shadow:0 0 0 transparent}}
@keyframes volley-dock-glow{0%{box-shadow:inset 0 3px 0 #b48cd5,inset 0 14px 35px #c9a3df40}100%{box-shadow:inset 0 3px 0 transparent,inset 0 14px 35px transparent}}
@keyframes volley-word-glow{0%{color:#8653a8;text-shadow:0 0 18px #c5a0e5aa}100%{color:#365446;text-shadow:0 0 0 transparent}}
@media(prefers-reduced-motion:reduce){.typing-dock.spell-cast{box-shadow:inset 0 2px 0 #d7be83}.typing-dock.spell-volley{box-shadow:inset 0 2px 0 #b897c8}}
