:root{--navy:#101e30;--panel:#1a2c43;--ink:#f4f6f3;--muted:#b5c2d0;--lime:#d4fc59}*{box-sizing:border-box}body{background:radial-gradient(ellipse at 80% 10%,#284452 0,transparent 55%),var(--navy);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}header{max-width:1180px;margin:auto;padding:18px 24px}.build{font-size:11px;color:var(--muted)}main{max-width:1180px;padding:0 24px;margin:auto}button,select{font:inherit}button{border-radius:15px;font-weight:800;letter-spacing:.03em;min-height:48px;cursor:pointer;transition:transform .12s,background .18s,box-shadow .18s}button:active{transform:scale(.97)}button:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:4px}button:disabled{cursor:not-allowed;opacity:.45}.primary{background:var(--lime);color:#142434;box-shadow:0 5px 0 #73932d;padding:14px 22px;border:0}.secondary{background:#263b51;color:var(--ink);border:1px solid #52677b;padding:13px 20px}.home-screen{position:relative;min-height:610px;display:grid;grid-template-columns:1.05fr 1fr;align-items:center;padding:48px;border:1px solid #476072;border-radius:32px;overflow:hidden;background:linear-gradient(120deg,#192b3fff,#192b3fbb)}.home-art{position:absolute;inset:0;background:linear-gradient(90deg,#12243cee,#162a4199),url('assets/construction/soft/skyline-standard.webp') center bottom/cover;opacity:.58}.home-copy{z-index:1}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.18em;color:var(--lime);margin:0 0 14px}.game-logo{font-size:clamp(48px,7vw,88px);font-weight:1000;letter-spacing:-.075em;line-height:.86;margin:0;text-shadow:0 6px 0 #0b1625}.game-logo span{display:block;color:var(--lime)}.home-tagline{font-size:24px;font-weight:700;margin:22px 0 12px}.home-intro{font-size:15px;line-height:1.6;color:#d5dce5}.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:400px;margin:24px 0}.home-actions button:first-child{grid-column:1/-1;display:flex;justify-content:space-between;font-size:20px;min-height:62px}.home-credit,.home-policy{font-size:11px;color:#c0cbd6}.home-policy{letter-spacing:.12em;color:var(--lime)}.hero-character{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center}.hero-character canvas{width:100%;max-width:380px;aspect-ratio:320/360;z-index:1}.hero-orbit{position:absolute;top:22%;width:310px;height:310px;border-radius:50%;background:radial-gradient(circle,#8dbb5b88,#4d9a8060 58%,transparent 59%);border:1px solid #b0d46c33}.hero-pill{border:1px solid #92b852;border-radius:20px;background:#1b353f;font-size:12px;font-weight:800;color:var(--lime);padding:9px 18px}.menu-screen{position:static!important;inset:auto!important;display:block;max-width:none!important;max-height:none!important;overflow:visible!important;background:none!important;padding:28px 0 48px!important;box-shadow:none!important;color:var(--ink)}.screen-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.screen-heading h2{font-size:clamp(28px,4vw,42px);margin:0;text-align:left;letter-spacing:-.04em}.screen-heading p{font-size:14px;color:var(--muted);margin:8px 0}.screen-heading .eyebrow{color:var(--lime);font-size:11px;margin:0}.selection-bar{display:flex;gap:18px;flex-wrap:wrap;padding:16px 20px;border-radius:18px;background:#1e3346;margin-bottom:16px}.selection-bar label{display:flex;gap:12px;align-items:center;font-size:11px;font-weight:800;letter-spacing:.06em}select{border:1px solid #597080;border-radius:10px;background:#263d52;color:white;min-height:44px;padding:10px;max-width:100%}.stage-cards{overflow:visible;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.stage-card{padding:0!important;gap:0!important;border:1px solid #4b6376;border-radius:22px;background:#1d3047;overflow:hidden;box-shadow:0 8px 24px #050d1844;opacity:1!important}.stage-card img{height:150px!important;width:100%;object-fit:cover;border-radius:0}.stage-card .card-body{padding:18px}.stage-card h3{font-size:18px!important;line-height:1.25;margin:0 0 12px}.stage-card p{font-size:12px!important;line-height:1.5!important;margin:6px 0;color:#c9d6df}.stage-card button{font-size:13px!important;min-height:48px!important;width:100%;margin-top:14px;padding:12px!important}.stage-card.locked img{opacity:.55}.stage-card.locked .lock-copy{color:#d0d9df}.card-number{display:inline-block;border-radius:8px;padding:4px 8px;background:#0c2036;color:var(--lime);font-size:12px;font-weight:800}.card-medal{color:#f5ce86!important}.screen-tail{display:flex;gap:12px;margin-top:22px}.save-notice{font-size:13px;color:#c9d9d7;line-height:1.5}.settings-grid,.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}fieldset,.help-grid article{border:1px solid #496177;border-radius:20px;padding:22px;background:#192e43;min-width:0}legend{font-size:18px;font-weight:800;padding:0 8px}.settings-grid label{display:flex;justify-content:space-between;align-items:center;gap:18px;font-size:14px;margin:18px 0}.settings-grid input[type=checkbox]{width:22px;height:22px;accent-color:var(--lime)}.settings-grid input[type=range]{width:55%;min-height:36px;accent-color:var(--lime)}.settings-grid button{margin:8px 8px 0 0;font-size:12px}.field-note,.muted{font-size:12px;line-height:1.6;color:var(--muted)}.help-lead{display:flex;align-items:center;gap:24px;margin-bottom:24px;padding:24px;background:#264354;border-radius:24px}.help-lead img{width:145px;object-fit:contain}.help-lead h3,.help-grid h3{font-size:20px;margin:0 0 14px}.help-grid p,.help-lead p{font-size:14px;line-height:1.7}.help-grid dt{font-weight:800;font-size:14px;margin:14px 0 4px}.help-grid dd{margin:0;color:#c9d6df;font-size:14px;line-height:1.6}.confirm-screen{max-width:480px;margin:8vh auto;border:1px solid #7b9562;border-radius:26px;background:#21354b;padding:32px;box-shadow:0 20px 60px #0006}.confirm-screen p{line-height:1.6;color:#d6dfe5}.confirm-screen>div{display:flex;gap:12px}.toast{font-size:13px;color:var(--lime)}.toast:empty{display:none}#profileBanner{padding:10px;background:#5b4521;color:#ffdc89;text-align:center;font-size:12px}#profileBanner a{color:white;margin-left:12px}#loadingStatus{font-size:12px;color:#d4fc59}.cabinet{max-width:1050px;margin:auto;border-radius:24px}.overlay{background:#152941ec;padding:22px;gap:10px}.overlay #portrait{width:100px;height:100px}.overlay h2{font-size:clamp(24px,4vw,36px);letter-spacing:-.03em;margin:0}.overlay p{max-width:430px;font-size:14px;line-height:1.55}.overlay .stamp{font-size:10px;letter-spacing:.1em}.overlay button{min-height:44px;font-size:12px;padding:10px 16px}.overlay .actions{gap:10px}.medal-reveal{padding:10px 20px;border:1px solid #e7ca75;border-radius:18px;background:#6b512b;color:#ffecae;font-size:20px;font-weight:900;animation:medalIn .35s ease-out}.medal-reveal:empty{display:none}@keyframes medalIn{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}#tutorialBar{display:flex;align-items:center;gap:12px;background:#263f4e;padding:14px 18px}#tutorialBar>div{flex:1}#tutorialBar p{font-size:12px;margin:5px 0}#tutorialBar small{color:var(--lime);font-size:9px}#tutorialBar button{font-size:11px;padding:10px 14px}.controls button{min-height:62px;font-size:17px}.controls small{display:none}.large-controls .controls button{min-height:80px;font-size:21px}.high-contrast .stage-progress span,.high-contrast .feedback{background:#07111b;color:#fff}.less-motion *{animation:none!important;transition:none!important}.less-flashing .rush{animation:none!important}.game-open header,.game-open footer{display:none}.game-open main{padding:0;max-width:1100px}.game-open .cabinet{border-radius:0}.game-open .toast{position:fixed;bottom:6px;font-size:10px;pointer-events:none}footer{font-size:11px;line-height:1.8;color:#a9bac8;text-align:center;padding:24px}footer a{color:var(--lime);margin-left:10px}[hidden]{display:none!important}
@media(max-width:850px){.stage-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.home-screen{padding:32px;min-height:580px}.hero-orbit{width:230px;height:230px}.settings-grid,.help-grid{grid-template-columns:1fr}}
@media(max-width:650px){header{padding:14px 16px}main{padding:0 14px}.home-screen{grid-template-columns:1fr;min-height:0;padding:28px 24px;border-radius:25px}.home-copy{position:relative;z-index:2}.game-logo{font-size:57px;max-width:60%}.home-tagline{font-size:18px;margin-top:18px}.home-intro{font-size:12px;max-width:66%}.hero-character{position:absolute;right:-14px;top:27px;width:185px}.hero-orbit{width:170px;height:170px}.hero-character canvas{width:190px}.hero-pill{display:none}.home-actions{margin-top:27px;gap:11px}.home-actions .secondary{font-size:12px;min-height:50px;padding:10px}.home-credit{font-size:10px}.home-policy{font-size:9px}.stage-cards{grid-template-columns:1fr;gap:18px}.stage-card img{height:155px!important}.stage-card .card-body{padding:18px}.screen-heading{align-items:flex-start}.screen-heading h2{font-size:27px}.screen-heading .secondary{padding:10px 14px;font-size:11px}.selection-bar{padding:14px;gap:12px}.selection-bar label{justify-content:space-between;width:100%;font-size:10px}.selection-bar select{font-size:12px;min-width:190px}.help-lead{padding:18px;gap:14px}.help-lead img{width:90px}.help-lead h3{font-size:18px}.help-lead p{font-size:12px}.controls{padding-bottom:max(12px,env(safe-area-inset-bottom));gap:8px}.controls button{min-height:58px;font-size:16px}.labelmeter{min-width:90px}.topbar{padding:10px;gap:6px}.topbar button{min-height:42px}.topbar>div:first-child{font-size:10px}.readouts b{font-size:17px}.overlay #portrait{width:85px;height:85px}.overlay p{font-size:12px;margin:0}.overlay h2{font-size:26px}.overlay .actions{margin:4px 0}.overlay .small{font-size:9px}.overlay button{font-size:10px;padding:8px 12px;min-height:40px}#tutorialBar{padding:10px;flex-wrap:wrap}#tutorialBar>div{flex-basis:100%}.settings-grid label{font-size:13px}fieldset{padding:18px}.confirm-screen{padding:24px}.game-open .stage{touch-action:none}.game-open body{overflow:hidden}.game-open .cabinet{width:100%}}
@media(orientation:landscape) and (max-height:550px){.game-open .cabinet{display:grid;grid-template-columns:minmax(0,1fr) 130px;grid-template-rows:42px minmax(0,1fr);height:100svh}.game-open .topbar{grid-column:1/-1}.game-open .stage{grid-column:1;grid-row:2;height:calc(100svh - 42px);aspect-ratio:auto}.game-open .stage canvas{width:100%;height:100%;object-fit:contain}.game-open .controls{grid-column:2;grid-row:2;display:flex;flex-direction:column;justify-content:center;gap:16px;padding:12px}.game-open .controls button{width:100%;min-height:66px}.game-open .overlay #portrait{display:none}.game-open .overlay p{font-size:11px}.game-open .overlay h2{font-size:24px}.game-open .overlay{padding:14px;gap:4px}.hero-character{max-height:330px}.home-screen{min-height:510px}.stage-card img{height:130px!important}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.unlock-reveal{padding:8px 14px;border-radius:12px;background:#d4fc59;color:#172a3d;font-size:12px;font-weight:900;animation:medalIn .4s ease-out}.archive-view pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 system-ui;color:#c9d6df}.game-open .cabinet{padding-right:0}.game-open .controls{min-width:0}.game-open .controls button{min-width:0}.game-open .readouts{gap:12px}.game-open .topbar>div:first-child{letter-spacing:0}.menu-screen a{color:var(--lime)}

body.game-open{overflow:hidden;overscroll-behavior:none}.game-open .cabinet{touch-action:none}
@media(max-width:650px) and (orientation:portrait){.game-open .topbar{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,42px);gap:5px;padding:8px 10px}.game-open .topbar>div:first-child{grid-column:1/-1;grid-row:1}.game-open .readouts{margin:0;gap:10px;grid-row:2;grid-column:1;font-size:8px}.game-open .readouts b{margin-left:4px;font-size:16px}.game-open .topbar button{padding:6px 0;min-height:40px;grid-row:2}.game-open .controls{padding:10px 10px max(12px,env(safe-area-inset-bottom))}.game-open .controls button{padding:10px 12px;min-width:0}.game-open .labelmeter{min-width:70px;font-size:17px}.game-open .labelmeter small{font-size:7px;letter-spacing:0}.game-open .stage{max-height:calc(100svh - 165px)}}
@media(orientation:landscape) and (max-height:550px){.game-open .topbar{display:flex}.game-open .controls{position:static;width:auto;top:auto;bottom:auto;right:auto}.game-open .cabinet:has(#tutorialBar:not([hidden])) .stage{height:auto;min-height:0}.game-open #tutorialBar{grid-column:1/-1;grid-row:3;flex-wrap:nowrap}.game-open #tutorialBar>div{flex-basis:auto}.game-open .stage-progress span{font-size:10px}.game-open .controls .labelmeter{display:none}}
/* A bounded play grid replaces additive canvas heights. Informational pages retain zoom and scrolling. */
html,body{max-width:100%;overflow-x:clip}button{white-space:normal;overflow-wrap:normal}button,select,input{font-size:16px}.menu-screen{width:100%;min-width:0}.screen-heading>div{min-width:0}.screen-heading h2{overflow-wrap:break-word}.game-open header,.game-open footer{display:none}.game-open main{padding:0;margin:0;max-width:none}
body.game-open{overflow:hidden;overscroll-behavior:none}.game-open .cabinet{position:fixed;left:var(--play-left,0);top:var(--play-top,0);width:var(--play-width,100%);height:var(--play-height,100svh);height:var(--play-height,100dvh);max-width:1100px;max-height:none;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);border-radius:0;border:0;box-sizing:border-box;background:#101e30;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.game-open .topbar{grid-row:1;grid-column:1;min-width:0}.game-open .stage{grid-row:2;grid-column:1;height:auto;max-height:none;min-height:0;width:100%;aspect-ratio:auto;overflow:hidden;background:#101e30}.game-open .stage canvas{width:100%;height:100%;object-fit:contain;-webkit-user-drag:none}.game-open #tutorialBar{grid-row:3;grid-column:1;margin:0;min-width:0;padding:10px 12px;display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:10px}.game-open #tutorialBar>div{min-width:0;flex-basis:auto}.game-open #tutorialBar p{font-size:12px;line-height:1.35;margin:4px 0;overflow-wrap:break-word}.game-open #tutorialBar b{font-size:13px}.game-open #tutorialDemo{width:52px;height:60px;background:#183043;border-radius:10px;align-self:center}.game-open #tutorialBar .lesson-actions{display:flex;gap:7px;align-items:center}.game-open #tutorialBar button{min-height:44px;padding:8px 12px;font-size:11px}.game-open .controls{position:static;grid-row:4;grid-column:1;min-width:0;width:auto;display:grid;grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr);padding:10px 12px;gap:10px}.game-open .controls button{min-width:0;min-height:58px;padding:10px 12px;font-size:16px}.game-open .controls small{display:none}.game-open .labelmeter{min-width:0;font-size:18px;letter-spacing:2px}.game-open .labelmeter small{font-size:7px;letter-spacing:0}.game-open .large-controls .controls button,.game-open.large-controls .controls button{min-height:76px}.game-open .overlay{padding:12px;gap:8px;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}.game-open .overlay h2{font-size:clamp(21px,3vw,32px);line-height:1.1}.game-open .overlay p{font-size:12px;line-height:1.45;max-width:430px;margin:0}.game-open .overlay .stamp{margin:0;font-size:9px}.game-open .overlay #portrait{width:72px;height:72px;flex:0 0 72px;margin:0}.game-open .overlay .actions{flex-wrap:wrap;justify-content:center;margin:0;gap:7px}.game-open .overlay button{min-height:44px;min-width:84px;padding:9px 12px;font-size:12px}.game-open .overlay #notice:empty{display:none}.game-open .toast{position:fixed;left:12px;bottom:4px;margin:0;padding:4px 8px;background:#102034e8;font-size:10px;pointer-events:none;max-width:calc(100% - 24px)}#game,#jump,#duck{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.lesson-success{color:var(--lime);font-size:11px;font-weight:800}.lesson-status{color:#c9d6df;font-size:10px}.overlay .result-summary{font-variant-numeric:tabular-nums}.report-link{color:var(--lime)}.menu-screen a:hover{text-decoration:underline}
@media(max-width:650px){.home-screen{padding:24px 20px}.game-logo{font-size:clamp(44px,14vw,57px)}.hero-character{width:160px;right:-18px;top:27px}.hero-character canvas{width:175px}.home-tagline{font-size:16px}.home-intro{font-size:12px;max-width:67%}.screen-heading h2{font-size:26px;letter-spacing:-.03em}.settings-grid label{flex-wrap:wrap;gap:8px}.settings-grid select{max-width:100%;min-width:0}.settings-grid input[type=range]{width:55%}.game-open #tutorialBar{grid-template-columns:42px minmax(0,1fr);padding:8px 10px;gap:5px 9px}.game-open #tutorialDemo{width:42px;height:48px}.game-open #tutorialBar .lesson-actions{grid-column:1/-1;justify-content:flex-end}.game-open .topbar{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,42px);gap:4px;padding:6px 10px}.game-open .topbar>div:first-child{grid-column:1/-1;grid-row:1;font-size:9px}.game-open .readouts{grid-column:1;grid-row:2;gap:8px;font-size:8px;margin:0}.game-open .readouts b{font-size:16px;margin-left:4px}.game-open .topbar button{grid-row:2;min-height:42px;padding:5px 0}.game-open .controls{grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);padding:8px 10px;gap:8px}.game-open .controls button{min-height:56px;padding:8px;font-size:15px}.game-open .overlay #portrait{width:56px;height:56px;flex-basis:56px}.game-open .medal-reveal{font-size:15px;padding:7px 12px}.game-open .unlock-reveal{font-size:10px;padding:7px 10px}}
@media(max-height:660px) and (orientation:portrait){.game-open .overlay #portrait{display:none}.game-open .overlay{gap:6px}.game-open .overlay .stamp{font-size:8px}.game-open .overlay h2{font-size:23px}}
body.game-open.compact-landscape .cabinet{grid-template-columns:minmax(0,1fr) 124px;grid-template-rows:auto minmax(0,1fr) auto}body.game-open.compact-landscape .topbar{grid-column:1/-1;grid-row:1;display:flex;padding:4px 10px;min-height:44px}body.game-open.compact-landscape .topbar>div:first-child{font-size:9px}body.game-open.compact-landscape .readouts{margin-left:auto;gap:10px}body.game-open.compact-landscape .stage{grid-column:1;grid-row:2;height:auto;max-height:none;min-height:0}body.game-open.compact-landscape .controls{grid-column:2;grid-row:2;display:flex;position:static;flex-direction:column;justify-content:center;gap:12px;padding:10px;width:auto}body.game-open.compact-landscape .controls button{width:100%;min-height:60px}body.game-open.compact-landscape .labelmeter{display:none}body.game-open.compact-landscape #tutorialBar{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:8px;padding:6px 10px}body.game-open.compact-landscape #tutorialBar .lesson-actions{grid-column:3;grid-row:1}body.game-open.compact-landscape #tutorialDemo{width:36px;height:40px}body.game-open.compact-landscape .overlay #portrait{display:none}body.game-open.compact-landscape .overlay{gap:5px;padding:8px}body.game-open.compact-landscape .overlay h2{font-size:22px}body.game-open.compact-landscape .overlay p{font-size:11px}body.game-open.compact-landscape .overlay button{min-height:44px;padding:8px 10px}
@media(prefers-reduced-motion:reduce){.lesson-success{animation:none}}button:not(:disabled):hover{filter:brightness(1.06)}.less-motion button{filter:none}
.settings-grid select,.selection-bar select,.settings-grid input{font-size:16px}.document-page{max-width:920px;margin:auto;padding:26px 24px 60px}.document-page .document-hero{padding:30px;border:1px solid #486275;border-radius:24px;background:#192e43;margin:24px 0}.document-page h1{font-size:clamp(30px,6vw,48px);line-height:1.1;letter-spacing:-.04em}.document-page h2{font-size:22px;line-height:1.3;letter-spacing:-.02em;margin:28px 0 12px}.document-page h3{font-size:17px;line-height:1.4;margin:20px 0 8px}.document-page p,.document-page li{font-size:15px;line-height:1.7;color:#ced9e4}.document-page a{color:var(--lime);text-decoration:underline;text-underline-offset:3px}.document-page .doc-nav{display:flex;align-items:center;justify-content:space-between;gap:16px}.document-page .doc-nav a{font-weight:800;text-decoration:none;font-size:13px}.document-page .policy-section{border-top:1px solid #36516a;padding:10px 0}.document-page details.report-section{border:1px solid #476072;background:#192c40;border-radius:16px;padding:0;margin:14px 0}.document-page .report-section>summary{padding:18px 20px;font-size:16px;font-weight:800;min-height:56px;cursor:pointer}.document-page .report-section>.section-body{padding:0 20px 20px}.status-badge{display:inline-block;font-size:10px;font-weight:900;letter-spacing:.07em;padding:5px 8px;border-radius:7px;background:#315946;color:#d4fc59;margin:0 8px 8px 0}.status-badge.pending{background:#674c2b;color:#ffe0a0}.status-badge.missing{background:#4b3d54;color:#e5cbf2}.status-badge.failed{background:#713b3b;color:#ffdad0}.document-page table{border-collapse:collapse;width:100%;margin:16px 0;font-size:13px}.document-page td,.document-page th{text-align:left;border-bottom:1px solid #456075;padding:12px 8px;vertical-align:top}.document-page th{color:var(--lime)}.document-page .table-scroll{overflow:auto}.document-page .document-note{border-left:3px solid var(--lime);padding:12px 18px;background:#213c48;border-radius:0 14px 14px 0}.document-page .stage-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.document-page .test-field{display:grid;gap:8px;margin:20px 0}.document-page textarea,.document-page select{width:100%;font:16px/1.5 system-ui;background:#243b51;color:white;border:1px solid #62798a;border-radius:12px;padding:12px}.document-page textarea{min-height:140px}.document-page button{margin:8px 10px 0 0;min-height:48px}.document-page .test-field label{font-size:14px;font-weight:700}.document-page footer{margin-top:30px;border-top:1px solid #456075;padding:20px 0;text-align:left}
@media(max-width:650px){.document-page{padding:18px 16px 40px}.document-page .document-hero{padding:24px 20px}.document-page h1{font-size:34px}.document-page p,.document-page li{font-size:14px}.document-page .stage-cards{grid-template-columns:1fr}.document-page .report-section>summary{font-size:14px}.document-page .report-section>.section-body{padding:0 16px 16px}}

.game-open .topbar button{min-height:44px}.game-open .feedback{top:auto;bottom:10px;left:12px;right:auto;font-size:11px;max-width:calc(100% - 24px);line-height:1.3}.game-open .readouts b{white-space:nowrap}@media(max-width:650px){.game-open .topbar{grid-template-columns:minmax(0,1fr) repeat(3,44px)}}

.game-open .overlay{backdrop-filter:none}@media(max-width:650px){.selection-bar label{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}.selection-bar select{min-width:0;width:100%}}

/* Player navigation: uses the same game and saved preferences. */
.compact-menu{max-width:760px;margin-inline:auto}.nav-actions{display:flex;gap:8px;flex-wrap:wrap}.mode-list{display:grid;gap:12px}.mode-list button,.compact-menu>button{width:100%;margin:8px 0;text-align:left}button small{display:block;font-size:.8rem;font-weight:500;letter-spacing:0;line-height:1.5;margin-top:5px}.home-progress{color:#c8e88d;font-size:.95rem}.setup-fields{display:grid;gap:16px;margin:20px 0}.setup-fields label,.compact-menu>label{display:grid;gap:8px;font-size:.85rem;font-weight:700}.setup-fields select,.compact-menu>label select{width:100%;min-height:48px;font-size:16px}.setup-preview{width:100%;max-height:190px;object-fit:cover;border-radius:16px}.splash-screen{position:fixed;inset:0;z-index:100;background:#101e30;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;animation:splash-enter .35s ease-out}.splash-screen[hidden]{display:none}.splash-screen img{height:min(40vh,280px);width:auto;object-fit:contain}.splash-screen .game-logo{font-size:clamp(2rem,8vw,4rem);margin:0}.splash-screen p{font-size:1.2rem;color:#d3e5eb}@keyframes splash-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.less-motion .splash-screen{animation:none}@media(prefers-reduced-motion:reduce){.splash-screen{animation:none}}@media(max-width:500px){.screen-heading{flex-wrap:wrap}.nav-actions{width:100%}.nav-actions button{flex:1}.compact-menu{padding:18px}.setup-preview{max-height:140px}.stage-card .card-body{padding:14px}}

/* Pre-economy polish: clear mobile menus and a short skippable welcome. */
.home-progress{text-align:center;margin:22px auto 4px;max-width:440px;line-height:1.6}footer p{margin:6px 0}footer a{margin:0 6px}.footer-phrase{white-space:nowrap}.creator-name{display:inline-block}.menu-screen{padding-bottom:calc(40px + env(safe-area-inset-bottom,0px))}.stage-cards{padding-bottom:24px}.stage-card button{min-height:48px}.screen-heading>.nav-actions{display:flex;gap:8px;align-items:center}.screen-heading>.nav-actions button{min-height:44px}.splash-screen{padding:calc(20px + env(safe-area-inset-top,0px)) 20px calc(20px + env(safe-area-inset-bottom,0px));animation:splash-enter .45s ease-out}.splash-screen img{animation:mascot-enter .6s ease-out}.splash-screen h1{animation:splash-enter .6s .1s both}.splash-screen>p{animation:splash-enter .45s .3s both}.splash-screen.splash-exit{animation:splash-out .3s ease-in forwards}.splash-skip{border:0;background:transparent;color:#b8c9d8;font-size:12px;padding:14px;min-height:44px;letter-spacing:.12em}.less-motion .splash-screen,.less-motion .splash-screen *{animation:none!important}@keyframes mascot-enter{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}@keyframes splash-out{to{opacity:0;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.splash-screen,.splash-screen *{animation:none!important}}@media(max-height:500px){.splash-screen img{height:32vh}.splash-screen .game-logo{font-size:2rem;line-height:1}.splash-screen>p{margin:4px;font-size:1rem}.splash-screen{gap:4px}}

.wallet-link{margin-top:12px;min-height:44px}.wallet-tabs{display:flex;gap:8px;margin:20px 0}.wallet-tabs button{flex:1;min-height:48px}.wallet-balance{background:linear-gradient(130deg,#234536,#172d42);border:1px solid #829765;border-radius:20px;padding:24px;text-align:center}.wallet-balance>span{font-size:12px;letter-spacing:.1em}.wallet-balance>strong{display:block;font-size:64px;color:var(--lime);font-variant-numeric:tabular-nums}.wallet-totals{display:flex;justify-content:space-between;gap:12px}.wallet-totals b{display:block;font-size:24px}.transaction{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:14px 0;border-bottom:1px solid #456079}.transaction small{display:block;color:#a9becd;font-size:12px}.transaction b{color:#d4fc59}.transaction.spent b{color:#ffc583}.coin-readout{color:#f3d371!important}.coin-readout b{margin-left:2px!important}.revive-offer{max-width:420px;width:100%;padding:8px 12px;border:1px solid #9cab64;border-radius:12px}.revive-offer p{margin:4px auto 8px;font-size:12px}.revive-offer button{margin:3px;min-height:44px}#runEarnings{margin:3px 0}.overlay:has(#reviveOffer:not([hidden])) #portrait{width:62px;height:62px}.overlay:has(#reviveOffer:not([hidden])){gap:5px}.overlay:has(#reviveOffer:not([hidden])) .stamp{margin:0}.overlay:has(#reviveOffer:not([hidden])) .actions{margin:4px 0}.overlay:has(#reviveOffer:not([hidden])) #overlayText{margin:2px;font-size:12px}@media(max-width:500px){.topbar .readouts{gap:7px}.topbar .coin-readout{font-size:10px}.wallet-totals p{font-size:12px}.wallet-balance>strong{font-size:48px}}@media(max-height:450px){.overlay:has(#reviveOffer:not([hidden])) #portrait{display:none}.revive-offer{padding:4px}.overlay:has(#reviveOffer:not([hidden])) h2{font-size:20px}.overlay:has(#reviveOffer:not([hidden])) #overlayText{display:none}}

.game-open .topbar>div:first-child{display:flex;align-items:center;gap:6px;min-width:0}.game-open .topbar .coin-readout{margin-left:8px;white-space:nowrap;font-size:11px}.game-open .topbar .coin-readout b{font-size:14px}footer a{display:inline-block;min-height:44px;padding:10px 4px}@media(max-width:650px){.game-open .topbar .coin-readout{margin-left:auto;font-size:10px}.game-open .topbar .readouts{gap:8px}}
/* Short game-over screens must scroll from the first item, never from clipped centered content. */
.game-open .overlay{justify-content:flex-start;padding-top:16px}.game-open .overlay #portrait{flex-shrink:0}.game-open .overlay>button,.game-open .overlay .actions,.game-open .overlay .revive-offer{flex-shrink:0}

.wallet-shop{border:1px solid #4c657d;border-radius:16px;padding:16px;margin:16px 0}.wallet-shop>summary{min-height:44px;cursor:pointer;font-weight:800;color:var(--lime)}.shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px}.shop-item{background:#203950;padding:16px;border-radius:12px}.shop-item h3{font-size:18px}.shop-item button{width:100%;margin-top:8px}.shop-item p{font-size:14px;line-height:1.5}#workshopArt{width:100%;max-height:250px;margin-top:16px}#workshopArt[data-level="0"] .workshop-builder,#workshopArt[data-level="0"] .workshop-contractor,#workshopArt[data-level="0"] .workshop-empire,#workshopArt[data-level="1"] .workshop-contractor,#workshopArt[data-level="1"] .workshop-empire,#workshopArt[data-level="2"] .workshop-empire{display:none}.document-page input{width:100%;font:16px/1.5 system-ui;background:#243b51;color:white;border:1px solid #62798a;border-radius:12px;padding:12px}.document-page fieldset{min-width:0;border:1px solid #62798a;border-radius:12px;padding:16px}.document-page .nav-actions{flex-wrap:wrap}.document-page input,.document-page textarea,.document-page select{box-sizing:border-box}
