/* Page identity and next action stay visible; only content scrolls. */
.gear-choice.is-selected{border:2px solid #367859;background:#e5efd9;box-shadow:0 0 0 3px #397b5520}
.game-screen[data-view=upgrade] .screen-header{background:linear-gradient(115deg,#69532f,#826b40)}.game-screen[data-view=result] .screen-header{background:linear-gradient(115deg,#304e60,#456878)}.game-screen[data-view=quit] .screen-header{background:#714d3e}
.game-screen .screen-footer{position:static;inset:auto;width:auto;letter-spacing:0}.game-screen .screen-header{position:static;inset:auto}.game-screen .screen-body{width:100%}
.overlay{padding:24px;background:#182b26a8;backdrop-filter:blur(6px)}
#dialog.game-screen{width:min(1120px,96vw);height:min(850px,94dvh);max-height:94dvh;padding:0!important;display:flex;flex-direction:column;overflow:hidden;background:#f7f0dd!important;border:1px solid #b8a779;border-radius:18px;box-shadow:0 22px 80px #10292066;text-align:left;isolation:isolate}
#dialog.game-screen:before,#dialog.game-screen:after{display:none}
.game-screen .dialog-art{display:none}
.screen-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 26px;background:linear-gradient(115deg,#254d43,#3a6655);color:#fff6de;border-bottom:3px solid #cfae65}
.screen-identity{display:flex;align-items:center;gap:14px;min-width:0}.screen-emblem{display:grid;place-items:center;width:48px;height:48px;flex:none;border:1px solid #d5b76d;background:#ffffff12;border-radius:12px;color:#f4d995;font-size:25px}
.game-screen .screen-header h2{margin:0;color:#fff7e3;font-size:25px!important;line-height:1.25;text-align:left}.screen-path{margin:0 0 4px;font-size:12px;color:#d2dec9;letter-spacing:1px}.screen-back{background:#ffffff13;border:1px solid #c7d2b780;color:#fff5d8;border-radius:8px;min-height:44px;padding:9px 14px;white-space:nowrap;font-size:14px}.screen-status{font-size:12px;color:#dfebd4;white-space:nowrap}
.screen-steps{flex:none;display:flex;padding:12px 26px;gap:12px;background:#e8e6cf;border-bottom:1px solid #cfc7a7}.screen-steps span{flex:1;text-align:center;font-size:14px;color:#827b64;padding:6px;border-bottom:2px solid transparent}.screen-steps .current{color:#285747;border-color:#397258;font-weight:700}.screen-steps .complete{color:#54785f}
.screen-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:22px 28px;scrollbar-gutter:stable;scroll-padding:20px}.screen-body>.sub{margin:0 0 18px!important;text-align:left}.screen-body>.footnote{margin:16px 0;text-align:left}.screen-flavour{color:#8a6c37;margin:0 0 12px}
.screen-footer{flex:none;padding:14px 26px max(14px,env(safe-area-inset-bottom));background:#fff9e9;border-top:1px solid #d3c39b;box-shadow:0 -6px 22px #8976400b;display:flex;align-items:center;justify-content:space-between;gap:18px}.screen-footer>p{font-size:14px;line-height:1.5;margin:0;color:#6e654e;flex:1}.screen-footer .dialog-actions{flex:none;display:flex;gap:10px;margin:0!important;padding:0!important;border:0;justify-content:flex-end}.screen-footer .primary{min-width:175px;margin:0!important}.screen-footer .secondary{min-width:0}.screen-utility{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.screen-utility .secondary{padding:10px 14px!important;min-width:0!important;font-size:14px!important}
.screen-tabs.gear-tabs{position:static;margin:0;padding:10px 24px;flex-wrap:nowrap;overflow:auto;flex:none;border-bottom:1px solid #d3c9a7;background:#f0ead6}.screen-tabs button{flex:none;white-space:nowrap;min-height:44px}
.game-screen[data-view=upgrade] .choice.is-selected,.game-screen .camp-choices .choice.is-selected{border:2px solid #367859!important;box-shadow:0 0 0 3px #397b5520!important;background:#e5efd9!important}.game-screen .choice[aria-pressed=true]:after{content:'已选择';position:absolute;right:10px;top:8px;color:#23603d;font-size:13px;background:#e6f4da;padding:2px 8px;border-radius:12px}.game-screen .choice{position:relative;text-align:left}.game-screen .choice .rank b{display:none}
.game-screen[data-view=upgrade] .choices{margin:0;gap:14px}.game-screen[data-view=upgrade] #upgradeProgress{margin:0 0 14px;font-size:14px;padding:10px 14px}.game-screen[data-view=upgrade] .upgrade-tools{margin:14px 0 0}.game-screen[data-view=upgrade] .choice{min-height:0}.game-screen button:disabled{opacity:.5;cursor:not-allowed;filter:none}.game-screen button:focus-visible{outline:3px solid #448bae;outline-offset:3px}
.camp-summary{padding:16px;border:1px solid #b7c7a3;background:#edf2de;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.camp-summary h3{margin:0 0 4px;color:#345c47}.camp-summary p{margin:0;line-height:1.5;color:#6c6954}.camp-summary .primary{min-width:0;white-space:nowrap;font-size:15px}.camp-section-title{font-size:18px;color:#365447;margin:20px 0 12px}.game-screen .camp-choices{gap:12px}.game-screen .camp-choices .choice{min-height:150px;padding:18px}.game-screen .camp-choices .choice .glyph{position:static!important;width:44px;height:44px;font-size:24px;float:none;margin:0 0 8px}.game-screen .camp-choices .choice .category{display:none}.game-screen .camp-choices .choice p{font-size:14px}.game-screen .camp-choices .choice strong{font-size:18px}.game-screen .route-options button:before{display:none}.game-screen .route-options{margin:0;gap:10px}.game-screen .route-options button{padding:12px;min-height:0}.game-screen .route-options small{font-size:13px}
@media(max-width:760px){.overlay{padding:0}#dialog.game-screen{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.screen-header{padding:max(12px,env(safe-area-inset-top)) 14px 12px;gap:8px}.screen-emblem{width:38px;height:38px;font-size:22px}.screen-identity{gap:9px}.game-screen .screen-header h2{font-size:21px!important}.screen-path{font-size:11px;letter-spacing:0}.screen-status{font-size:11px}.screen-back{font-size:12px;padding:8px 10px}.screen-steps{padding:6px 12px;gap:4px}.screen-steps span{font-size:12px;padding:6px 1px}.screen-body{padding:16px 14px;scrollbar-gutter:auto}.screen-footer{padding:10px 14px max(12px,env(safe-area-inset-bottom));display:block}.screen-footer>p{font-size:12px;margin:0 0 8px}.screen-footer .dialog-actions{display:flex;gap:8px}.screen-footer .dialog-actions>.primary{flex:1;min-width:0!important}.screen-footer .dialog-actions>.secondary{font-size:14px;padding:10px 12px}.screen-tabs.gear-tabs{padding:8px 12px;gap:6px}.screen-tabs button{font-size:13px;padding:8px 12px}.camp-summary{padding:12px;align-items:flex-start}.camp-summary h3{font-size:17px}.camp-summary p{font-size:13px}.camp-summary .primary{padding:10px!important;font-size:13px!important}.game-screen .camp-choices{grid-template-columns:1fr}.game-screen .camp-choices .choice{padding:14px 14px 14px 72px;min-height:95px}.game-screen .camp-choices .choice .glyph{position:absolute!important;left:14px;top:20px}.game-screen .camp-choices .choice p{margin:6px 0 0}.game-screen .route-options{grid-template-columns:1fr}.screen-footer .dialog-actions a{font-size:12px}}
@media(max-height:500px) and (orientation:landscape){#dialog.game-screen{height:100dvh;max-height:100dvh;width:100%;border-radius:0}.overlay{padding:0}.screen-header{padding:8px 18px}.screen-emblem{width:32px;height:32px}.game-screen .screen-header h2{font-size:20px!important}.screen-steps{padding:2px 16px}.screen-steps span{padding:3px}.screen-footer{display:flex;padding:8px 18px;gap:10px}.screen-footer>p{font-size:12px;margin:0}.screen-footer .primary,.screen-footer .secondary{min-height:42px!important;padding:8px 15px!important}.screen-body{padding:14px 18px}.screen-tabs.gear-tabs{padding:4px 16px}.screen-tabs button{min-height:36px;padding:4px 10px}}
