:root{--paper:#fff9ec;--surface:#fffdf6;--ink:#30382f;--muted:#63705a;--line:#b4c29d;--outline:#414936;--grass:#dfebcb;--amber:#f1cc67;--danger:#934832;color-scheme:light;font-family:"Arial Rounded MT Bold","PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);background:#e1ebd2;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;min-width:300px;min-height:100%;overscroll-behavior:none}button,input{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation;border:0;background:none;min-height:44px;min-width:44px}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #527644;outline-offset:3px}button:disabled{cursor:default;opacity:.6}button[aria-disabled=true]{color:#64705b}h1,h2,h3,p{margin:0}h1{font-size:21px}h2{font-size:19px}h3{font-size:16px}img{display:block;max-width:100%;object-fit:contain;pointer-events:none;user-select:none}small{font-size:12px}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}[hidden]{display:none!important}.app-shell{max-width:920px;margin:auto;background:var(--paper);min-height:100dvh;padding-bottom:calc(76px + env(safe-area-inset-bottom));position:relative}.topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:4px 12px;gap:8px}.brand{display:flex;align-items:center;gap:3px;font-weight:800;font-size:21px;padding:0}.brand img{width:39px;height:42px}.calendar{font-size:12px;display:flex;align-items:center;gap:6px}.top-actions{display:flex;align-items:center}.icon-button{display:inline-flex;align-items:center;justify-content:center;border-radius:12px}.resource-ribbon{display:flex;align-items:center;gap:2px;min-height:62px;padding:0 8px 7px;border-bottom:2px solid var(--line)}.resource-tile{min-width:0;flex:1;display:flex;align-items:center;gap:4px;text-align:left;padding:1px 3px}.resource-tile img{width:38px;height:38px;flex:none}.resource-tile strong{font-size:16px;font-variant-numeric:tabular-nums}.resource-tile small{display:block;font-size:11px;white-space:nowrap;color:var(--muted)}.resource-tile.at-cap strong{color:#6a6c35}.negative,.short{color:var(--danger)!important}.all-resources{border:2px solid var(--outline);background:#e4edcf;margin-left:4px}.status-banner{background:#fae5a1;border-bottom:1px solid var(--line);font-size:13px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.status-banner.error{background:#f3d9c8}.status-banner button{font-size:12px;text-decoration:underline;flex:none}.status-banner p{line-height:1.5}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,920px);display:flex;justify-content:space-around;padding:5px 5px calc(4px + env(safe-area-inset-bottom));background:var(--paper);border-top:2px solid var(--outline);z-index:30}.bottom-nav button{flex:1;max-width:150px;min-width:0;border-radius:15px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:0;font-size:12px;min-height:62px}.bottom-nav img{width:39px;height:37px}.bottom-nav .active{background:#e6edcf;color:var(--ink);font-weight:700}.bottom-nav .nav-more{height:37px;display:flex;align-items:center}.world-toolbar{display:flex;align-items:center;gap:4px;padding:0 8px;border-bottom:1px solid var(--line);height:48px}.scene-tabs{display:flex;overflow-x:auto;scrollbar-width:none;gap:4px;flex:1}.scene-tabs button{white-space:nowrap;font-size:14px;padding:0 12px}.scene-tabs .selected{font-weight:700;background:#e3eccf;border-radius:13px}.scene-status{font-size:11px;color:var(--muted);white-space:nowrap}.world-scene{height:clamp(300px,48dvh,500px);overflow-y:auto;overflow-x:hidden;background-color:var(--grass);overscroll-behavior:contain;scrollbar-width:thin;position:relative;isolation:isolate}.continuous-map{position:relative;min-height:max(460px,100%);height:var(--map-height,620px);background-size:cover;background-position:center top;background-repeat:no-repeat;overflow:hidden}.placed-building{position:absolute;left:var(--x);top:var(--y);width:39%;max-width:230px;height:176px;transform:translate(-50%,-50%);z-index:3;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;overflow:visible}.building-ground{width:90%;height:18px;border-radius:50%;background:#a9bd8c66;position:absolute;bottom:24px;z-index:-1}.placed-building>img{width:100%;height:145px;object-fit:contain}.building-label{max-width:100%;display:block;background:#fffbed;border:1.5px solid var(--outline);border-radius:8px;font-size:12px;padding:3px 8px;white-space:nowrap}.building-count{position:absolute;top:16px;right:4%;font-size:12px;border:1.5px solid var(--outline);background:var(--amber);padding:2px 5px;border-radius:7px}.scene-worker{position:absolute;left:var(--x);top:var(--y);z-index:5;transform:translate(-50%,-50%);width:72px;height:90px;padding:0}.worker-body{display:block;position:relative;width:72px;height:76px}.worker-body img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.worker-work{visibility:hidden}.is-working .worker-ready{animation:pose-ready 2s steps(1) infinite}.is-working .worker-work{animation:pose-work 2s steps(1) infinite}.worker-label{font-size:10px;white-space:nowrap;background:#fff9ece6;border-radius:5px;padding:2px 4px}.home-controls{padding:10px 12px 12px;background:var(--paper);border-top:1px solid var(--line)}.guide{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:2px 0 8px;font-size:13px;min-height:51px}.guide img{width:42px;height:42px}.guide b{display:block}.guide small{color:var(--muted);display:block;margin-top:3px;line-height:1.4}.gather-zone{display:flex;gap:9px}.gather-zone button{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;border:2px solid var(--outline);border-radius:16px;min-height:61px;box-shadow:0 3px 0 var(--outline);background:var(--amber);padding:8px 10px}.gather-zone button.secondary{background:#e3eccf}.gather-zone button:active{box-shadow:none;transform:translateY(2px)}.gather-zone img{width:37px;height:37px}.gather-zone b{font-size:15px;white-space:nowrap}.gather-zone small{display:block;font-size:11px;margin-top:2px;white-space:nowrap}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:#e3eccf;border-bottom:2px solid var(--outline)}.page-heading button{font-size:13px}.page-body{padding:15px}.build-station{padding:8px 16px 15px;text-align:center}.build-showcase{width:100%;height:180px;display:flex;align-items:center;justify-content:center;background:#e3eccf66;border-radius:48%;margin:8px 0}.build-showcase img{height:175px;width:240px}.build-caption{padding:7px 0 14px}.build-caption p{font-size:13px;color:var(--muted);line-height:1.6;margin-top:7px}.owned{color:var(--muted);font-size:12px;display:block;margin-top:6px}.decision-costs{display:flex;flex-wrap:wrap;gap:8px 15px;margin:8px 0;text-align:left}.decision-cost{display:flex;align-items:center;gap:5px;min-height:37px;flex:1;min-width:118px}.decision-cost img{width:32px;height:32px}.decision-cost b{font-size:12px}.decision-cost small{display:block;font-size:11px;color:var(--muted);margin-top:3px}.action-row{display:flex;gap:8px;align-items:center;margin-top:10px;flex-wrap:wrap}.primary,.secondary,.danger{border:2px solid var(--outline);border-radius:12px;padding:9px 14px;min-height:47px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary{background:var(--amber);box-shadow:0 2px 0 var(--outline)}.secondary{background:#e3eccf}.danger{color:var(--danger);border-color:var(--danger);background:#f6e7d8}.primary[aria-disabled=true],.secondary[aria-disabled=true]{background:#e8eadb;border-color:#a7b093;box-shadow:none}.action-row .primary{flex:1}.building-picker{display:flex;overflow-x:auto;padding:12px;gap:10px;border-top:1px solid var(--line);background:#e8eed9;scrollbar-width:thin}.building-option{flex:0 0 91px;border:2px solid #a5b392;background:#f4f1df;border-radius:13px;min-height:112px;padding:5px;font-size:12px;position:relative}.building-option img{width:77px;height:73px}.building-option.selected{background:#fae5a1;border-color:var(--outline)}.building-option small{position:absolute;top:5px;right:5px;background:var(--paper);padding:2px 4px;border-radius:5px}.fold{border-top:1px solid var(--line);margin-top:10px}.fold summary{min-height:48px;padding:14px 15px;cursor:pointer;font-size:14px;font-weight:600}.fold-content{padding:0 15px 15px}.segmented{display:flex;gap:5px;padding:7px 12px;border-bottom:1px solid var(--line)}.segmented button{flex:1;font-size:14px}.segmented .selected{background:#e3eccf;border-radius:12px;font-weight:700}.notebook-intro{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;padding:14px 16px 2px}.research-list,.craft-list{padding:12px;display:grid;gap:12px}.discovery-card{border:2px solid #a6b68f;border-radius:16px;padding:10px;background:var(--surface);display:grid;grid-template-columns:87px 1fr;gap:7px 12px;align-items:center;min-width:0}.card-picture{height:91px;width:87px;padding:2px;background:#edf2df;border-radius:43%;display:flex;align-items:center;justify-content:center}.card-picture img{height:86px;width:82px}.card-copy{min-width:0}.card-copy p{font-size:12px;line-height:1.5;color:var(--muted);margin-top:5px}.discovery-card .decision-costs,.discovery-card .action-row{grid-column:1/-1;margin:2px 0}.done-mark{font-size:13px;color:#50674b;padding:8px 0}.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px 20px;gap:10px;color:var(--muted);line-height:1.7}.empty-state img{width:98px;height:100px}.village-overview{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:14px 18px}.village-overview img{width:70px;height:77px}.village-overview p{margin:5px 0;font-size:13px}.village-overview small{color:var(--muted)}.job-list{display:grid;gap:12px;padding:13px}.job-card{border:2px solid #a6b68f;border-radius:16px;background:var(--surface);padding:10px;display:grid;grid-template-columns:83px minmax(0,1fr);gap:8px 12px;align-items:center}.job-portrait{height:91px;display:flex;align-items:center;justify-content:center;border-radius:40%;background:#e3eccf}.job-portrait img{height:88px;width:78px}.job-card p{font-size:12px;color:var(--muted);line-height:1.6;margin:5px 0}.job-stepper{grid-column:1/-1;display:flex;justify-content:flex-end;gap:7px;align-items:center}.job-stepper button{border:2px solid var(--outline);background:#e3eccf;border-radius:12px;font-size:17px;min-width:46px}.job-stepper b{min-width:32px;text-align:center;font-size:19px}.job-stepper .text-button{font-size:12px;padding:8px;border:1px solid var(--line);background:none}.more-list{margin:0 16px;border-top:1px solid var(--line)}.more-list button{width:100%;border-bottom:1px solid var(--line);padding:14px 5px;min-height:61px;display:flex;gap:14px;align-items:center;text-align:left;font-size:15px}.more-list button span{flex:1}.more-list img{width:36px;height:36px}.save-foot{font-size:11px;color:var(--muted);text-align:center;padding:18px}.world-map-scroll{flex:1;min-height:0;height:auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;background:#dfebcb;padding:28px 14px}.map-region{display:block;position:relative;width:100%;min-height:250px;margin:0 auto 32px;border:2px solid #9fb48b;border-radius:45% 38% 42% 35%;background-color:#e3eccf;background-size:cover;max-width:530px;padding:20px}.map-region .region-buildings{display:block;position:relative;width:100%;min-height:142px}.map-building{position:absolute;left:var(--x);top:var(--y);width:39%;transform:translate(-50%,-50%)}.map-building img{width:100%;height:100%;object-fit:contain}.map-region b{background:var(--paper);border:1.5px solid var(--outline);border-radius:10px;padding:6px 12px}.map-region small{display:block;padding-top:13px;font-size:12px;color:var(--muted)}.completion{margin:12px;border:2px solid var(--outline);background:#f5e9b9;border-radius:17px;padding:16px;display:flex;gap:12px;align-items:center}.completion img{width:67px;height:73px}.completion h2{font-size:17px}.completion p{font-size:12px;line-height:1.7;margin-top:6px}.dialog-backdrop{position:fixed;inset:0;background:#34412a66;display:flex;align-items:flex-end;justify-content:center;z-index:80;padding:12px 8px 0}.dialog{max-width:580px;width:100%;max-height:88dvh;border:2px solid var(--outline);border-radius:23px 23px 0 0;background:var(--paper);display:flex;flex-direction:column;overflow:hidden;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 4px 0 #41493644}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:9px 13px;background:#e3eccf;border-bottom:2px solid var(--outline);min-height:60px;gap:10px}.dialog-header h2{font-size:18px}.dialog-body{overflow:auto;overscroll-behavior:contain;padding:16px;line-height:1.6}.dialog-body>p{margin:8px 0;font-size:14px}.detail-hero{height:150px;display:flex;align-items:center;justify-content:center;background:#eaf0db;border-radius:45%;margin-bottom:15px}.detail-hero img{width:220px;height:145px}.detail-effect{font-size:13px;background:#eaf0db;padding:10px 12px;border-radius:12px;margin:12px 0}.detail-note{font-size:12px!important;color:var(--muted)}.inventory-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:9px;align-items:center;border-bottom:1px solid var(--line);padding:12px 0}.inventory-item img{height:42px;width:42px}.inventory-item p{font-size:11px;color:var(--muted)}.inventory-number{text-align:right;font-variant-numeric:tabular-nums}.inventory-number small{display:block;color:var(--muted)}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;border-bottom:1px solid var(--line);padding:11px 2px;min-height:68px}.setting-row small{display:block;color:var(--muted);font-size:12px;line-height:1.6;margin-top:4px}.setting-value{flex:none;border:1.5px solid var(--outline);border-radius:20px;padding:5px 10px;background:#e3eccf;font-size:12px}.save-actions{display:grid;gap:10px;margin:14px 0}.save-actions button{width:100%}.help-content h3{margin-top:18px}.help-content p{font-size:13px;margin:6px 0;line-height:1.8}.help-content img{width:100px;height:100px;margin:0 auto 12px}.confirm-copy{font-size:14px;line-height:1.8;padding:7px 0 16px}.loading-screen{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--paper);gap:15px;text-align:center;padding:25px;overflow-y:auto;transition:opacity .22s ease-out}.loading-screen.loading-complete{opacity:0}.loading-picture{height:120px;width:120px;flex:none;transform-origin:50% 85%;animation:loading-bear 2.8s cubic-bezier(.45,0,.55,1) infinite}.loading-picture img{width:100%;height:100%;object-fit:contain}.loading-screen p{color:var(--muted);font-size:13px;max-width:310px;line-height:1.7}.loading-screen progress,.offline-progress{width:220px;height:12px;border:2px solid var(--outline);border-radius:9px;background:#e3eccf;overflow:hidden}.loading-screen progress::-webkit-progress-bar,.offline-progress::-webkit-progress-bar{background:#e3eccf}.loading-screen progress::-webkit-progress-value,.offline-progress::-webkit-progress-value{background:var(--amber);transition:width .18s ease-out}.loading-screen progress::-moz-progress-bar,.offline-progress::-moz-progress-bar{background:var(--amber);transition:width .18s ease-out}.loading-screen button{border:2px solid var(--outline);border-radius:12px;padding:10px 20px;background:var(--amber)}.offline-body{text-align:center;padding:20px 0}.offline-body img{height:110px;width:110px;margin:0 auto 10px}.offline-body p{font-size:13px;color:var(--muted);margin:12px auto;max-width:330px}.offline-body progress{display:block;margin:20px auto}#toast{position:fixed;z-index:120;left:50%;bottom:calc(91px + env(safe-area-inset-bottom));transform:translate(-50%,10px);max-width:min(90vw,480px);width:max-content;background:var(--paper);border:2px solid var(--outline);border-radius:14px;box-shadow:0 3px 0 #41493644;padding:11px 17px;font-size:13px;line-height:1.6;pointer-events:none;opacity:0;transition:opacity .12s,transform .12s}#toast.visible{opacity:1;transform:translate(-50%,0)}body.modal-open{overflow:hidden}.motion-reduced *{animation:none!important;transition:none!important}.scene-paused *{animation-play-state:paused!important}.motion-reduced .worker-ready,.scene-paused .worker-ready{visibility:visible!important}.motion-reduced .worker-work,.scene-paused .worker-work{visibility:hidden!important}.fatal-error{padding:35px 20px;max-width:560px;margin:auto;line-height:1.7}.fatal-error p{margin:15px 0}.fatal-error button{margin:5px}@keyframes pose-ready{0%,100%{visibility:visible}50%{visibility:hidden}}@keyframes pose-work{0%,100%{visibility:hidden}50%{visibility:visible}}@keyframes loading-bear{0%,100%{transform:translateY(0) rotate(-1deg) scale(1)}50%{transform:translateY(-4px) rotate(1deg) scale(1.015)}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.worker-work{visibility:hidden!important}.worker-ready{visibility:visible!important}}@media(min-width:700px){.app-shell{border-left:2px solid var(--line);border-right:2px solid var(--line)}.world-scene{height:57dvh;max-height:630px}.continuous-map{max-width:680px;margin:auto}.home-controls{max-width:680px;margin:auto}.build-station{max-width:620px;margin:auto}.build-showcase{height:240px}.build-showcase img{height:225px;width:320px}.research-list,.craft-list,.job-list{grid-template-columns:1fr 1fr;max-width:900px;margin:auto}.dialog-backdrop{align-items:center;padding:20px}.dialog{border-radius:23px;max-height:88dvh}.more-list{max-width:620px;margin:auto}.resource-ribbon{padding-left:40px;padding-right:40px}.resource-tile{justify-content:center}.resource-tile img{width:43px;height:43px}.placed-building{height:190px}.placed-building>img{height:160px}}@media(max-width:350px){.resource-tile img{width:31px;height:34px}.resource-tile strong{font-size:14px}.resource-tile small{font-size:10px}.topbar{padding-left:8px;padding-right:8px}.calendar{font-size:11px}.scene-tabs button{padding:0 8px}.build-station{padding-left:12px;padding-right:12px}.discovery-card{grid-template-columns:75px minmax(0,1fr)}.card-picture{width:75px}.placed-building{width:44%;height:163px}.placed-building>img{height:135px}.scene-worker{width:62px;height:79px}.worker-body{width:62px;height:65px}.gather-zone{gap:7px}.gather-zone button{padding:7px;gap:5px}.gather-zone b{font-size:14px}.gather-zone img{width:30px}.guide{font-size:12px}.dialog-body{padding:13px}}

/* Keep the map heading and bottom tabs outside its single scrollable picture. */
.app-shell.map-view{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.map-view .topbar,.map-view #resource-bar,.map-view #status,.map-view .page-heading{flex:none}
.map-view #main-content{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}

/* Home has one viewport and one scrollable picture. The action dock never
   participates in document scrolling, even on short 336px-wide phones. */
.app-shell.home-view{
 --home-topbar:48px;--home-hud:48px;--home-toolbar:44px;--home-dock:104px;--home-nav:64px;
 height:100dvh;min-height:0;display:flex;flex-direction:column;
 padding-bottom:calc(var(--home-nav) + env(safe-area-inset-bottom));overflow:hidden;
}
.home-view .topbar{height:var(--home-topbar);flex:0 0 var(--home-topbar);padding:2px 10px}
.home-view .brand{font-size:19px}.home-view .brand img{width:32px;height:37px}
.home-view #resource-bar{flex:none;min-height:0}
.home-view .resource-ribbon{height:var(--home-hud);min-height:0;padding:0 8px 2px}
.home-view .resource-tile{min-height:44px}.home-view .resource-tile img{width:32px;height:32px}
.home-view #status{flex:none}
.home-view #main-content{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.home-view .world-board{flex:1;min-height:0;display:flex;flex-direction:column}
.home-view .world-toolbar{height:var(--home-toolbar);flex:0 0 var(--home-toolbar);min-height:0}
.home-view .world-scene{height:auto;min-height:0;max-height:none;flex:1;overflow-y:auto;overflow-x:hidden}
.home-view .continuous-map{flex:none;width:100%}
.home-view .home-controls{height:var(--home-dock);flex:0 0 var(--home-dock);width:100%;padding:5px 10px 6px;position:relative;margin:0 auto}
.home-view .guide{height:44px;min-height:44px;padding:0 0 4px;overflow:hidden}
.home-view .guide img{width:32px;height:32px;flex:none}
.home-view .guide>span{min-width:0}.home-view .guide b{font-size:12px;line-height:17px}
.home-view .guide small{font-size:11px;line-height:14px;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-view .gather-zone button{height:48px;min-height:48px;padding:4px 7px;gap:7px}
.home-view .gather-zone img{width:30px;height:30px}.home-view .gather-zone b{font-size:14px;line-height:17px}
.home-view .gather-zone small{font-size:10px;line-height:12px;margin-top:1px}
.home-view #observe-slot{position:absolute;right:10px;bottom:calc(100% + 8px);z-index:8}
.home-view #observe-slot button{min-height:44px;font-size:12px;padding:6px 10px;background:var(--paper)}



.home-view #completion-slot{flex:none;max-height:94px;overflow:auto}
.home-view .completion{margin:5px 10px;padding:6px 10px;gap:8px}
.home-view .completion img{height:47px;width:44px}.home-view .completion h2{font-size:14px}
.home-view .completion p{font-size:11px;line-height:1.5;margin-top:3px}
.home-view .bottom-nav{height:calc(var(--home-nav) + env(safe-area-inset-bottom));padding:3px 5px calc(3px + env(safe-area-inset-bottom))}
.home-view .bottom-nav button{min-height:56px;max-height:56px}
.home-view .bottom-nav img{height:32px;width:35px}.home-view .bottom-nav .nav-more{height:32px}

.home-view .status-banner:not(.error){height:44px;min-height:44px;padding:0 10px;gap:6px}
.home-view .status-banner:not(.error) p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.home-view .status-banner:not(.error) button{min-height:44px;padding:0 4px}
/* Completion occupies the existing guidance row, rather than shrinking the map. */
.home-view #completion-slot:empty{display:none}

/* A short phone must show the selected item's cost and primary action before
   its fixed bottom tabs. Full descriptions remain available from the picture. */
@media(max-width:699px) and (max-height:650px){
 :root{--compact-topbar:48px;--compact-hud:48px;--compact-heading:46px;--compact-hero:100px;--compact-nav:64px}
 .app-shell{padding-bottom:calc(var(--compact-nav) + env(safe-area-inset-bottom))}
 .topbar{height:var(--compact-topbar);padding:2px 10px}
 .brand{font-size:19px}.brand img{width:32px;height:37px}
 .resource-ribbon{height:var(--compact-hud);min-height:0;padding:0 8px 2px}
 .resource-tile{min-height:44px}.resource-tile img{width:32px;height:32px}
 .bottom-nav{height:calc(var(--compact-nav) + env(safe-area-inset-bottom));padding:3px 5px calc(3px + env(safe-area-inset-bottom))}
 .bottom-nav button{min-height:56px;max-height:56px}
 .bottom-nav img{height:32px;width:35px}.bottom-nav .nav-more{height:32px}
 .status-banner:not(.error){height:44px;min-height:44px;padding:0 10px;gap:6px}
 .status-banner:not(.error) p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
 .status-banner:not(.error) button{min-height:44px;padding:0 4px}
 .page-heading{min-height:var(--compact-heading);height:var(--compact-heading);padding:0 12px;gap:8px}
 .page-heading h1{font-size:19px;line-height:24px}.page-heading button{min-height:44px}
 .build-station{padding:4px 12px}
 .build-station .build-showcase{height:var(--compact-hero);margin:3px 0;border-radius:42%}
 .build-station .build-showcase img{height:96px;width:163px}
 .build-caption{padding:3px 0 5px}.build-caption h2{display:inline;font-size:17px;line-height:22px}
 .build-caption .owned{display:inline;font-size:11px;line-height:14px;margin:0 0 0 8px}
 .build-caption p{font-size:11px;line-height:14px;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .build-station .decision-costs,.discovery-card .decision-costs{margin:5px 0;gap:4px 8px}
 .build-station .decision-cost,.discovery-card .decision-cost{min-height:32px;min-width:116px;gap:4px}
 .build-station .decision-cost img,.discovery-card .decision-cost img{height:28px;width:28px}
 .build-station .decision-cost b,.discovery-card .decision-cost b{font-size:11px;line-height:13px}
 .build-station .decision-cost small,.discovery-card .decision-cost small{font-size:10px;line-height:12px;margin-top:2px}
 .build-station .action-row,.discovery-card .action-row{margin-top:6px;gap:7px}
 .build-station .action-row button,.discovery-card .action-row button{height:44px;min-height:44px;font-size:13px;line-height:18px;padding:6px 10px}
 .building-picker{padding:9px 12px;gap:8px}.building-option{min-height:96px;flex-basis:84px}
 .building-option img{width:70px;height:61px}
 .segmented{padding:3px 12px;min-height:51px}.segmented button{min-height:44px}
 .notebook-intro{padding:8px 12px 0;font-size:11px;line-height:16px}
 .research-list,.craft-list{padding:10px 12px;gap:10px}
 .discovery-card{padding:8px;grid-template-columns:74px minmax(0,1fr);gap:6px 10px}
 .card-picture{height:76px;width:74px}.card-picture img{height:72px;width:70px}
 .card-copy h2{font-size:17px;line-height:22px}
 .card-copy p{font-size:11px;line-height:15px;margin-top:4px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 .dialog .detail-hero{height:112px;margin-bottom:10px}.dialog .detail-hero img{height:108px;width:175px}
}

@media(max-height:450px){.loading-screen{gap:9px;padding:16px}.loading-picture{width:84px;height:84px}}

/* Queue access shares the existing heading, so it never pushes the purchase
   action out of the first screen. The queue itself is one ordinary page. */
.queue-entry{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 8px;border:1.5px solid var(--outline);border-radius:11px;background:var(--paper);white-space:nowrap}
.queue-entry span{font-weight:700}.queue-entry b{font-size:11px;color:var(--muted)}.queue-entry svg{width:14px;height:14px}
.queue-back{white-space:nowrap}.queue-panel{padding:14px 12px 22px;max-width:680px;margin:auto}
.queue-overview{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px}.queue-overview>span{font-size:12px;color:var(--muted)}
.queue-rule{font-size:12px;color:var(--muted);line-height:1.6;margin:5px 0 12px}
.queue-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}.queue-item{padding:10px;border:2px solid #a6b68f;border-radius:15px;background:var(--surface)}
.queue-item-heading{display:flex;align-items:center;gap:8px;min-width:0}.queue-item-heading h2{font-size:16px;min-width:0}.queue-item-heading h2 small{font-size:13px;white-space:nowrap;color:var(--muted)}
.queue-number{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;font-size:12px;border-radius:50%;background:#e3eccf}
.queue-picture{height:48px;width:48px;flex:none;display:flex;align-items:center;justify-content:center}.queue-picture img{width:48px;height:48px}
.queue-status{font-size:12px;line-height:1.6;color:var(--muted);margin:7px 0}.queue-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px}
.queue-controls .secondary{min-height:44px;padding:6px 10px;font-size:12px}.queue-controls button[disabled]{opacity:.4}.queue-controls .text-button{font-size:12px;color:var(--muted);padding:6px}
.queue-clear{margin-top:12px;min-height:44px;padding:7px 12px;font-size:12px}
.queue-empty{display:flex;align-items:center;gap:14px;padding:14px 8px;border-block:1px solid var(--line);font-size:14px}.queue-empty img{height:65px;width:65px}.queue-empty small{display:block;font-size:12px;color:var(--muted);margin-top:6px}
.queue-choices-heading{font-size:17px;margin:24px 0 10px}.queue-choices{display:grid;gap:10px}.queue-choice{padding:10px;border:1px solid var(--line);border-radius:13px;background:#f4f1df;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:6px 10px;min-width:0}
.queue-choice h3{font-size:15px;min-width:0}.queue-choice>button{min-height:44px;font-size:12px;padding:7px 10px;white-space:nowrap}.queue-choice .decision-costs{grid-column:1/-1;margin:3px 0 0}
.queue-choice .decision-cost{min-width:116px}.queue-choice .decision-cost b{font-size:11px}.queue-choice .decision-cost small{font-size:10px}
@media(max-width:350px){.queue-entry{padding:0 6px;gap:5px;font-size:12px}.queue-entry svg{width:12px}.queue-panel{padding-inline:10px}.queue-item,.queue-choice{padding:9px}.queue-controls{gap:5px}.queue-controls .secondary{padding-inline:9px}}
.queue-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;font-size:12px}.queue-pagination button{min-height:44px;padding:6px 10px;font-size:12px}
