:root{--ui-scale:1;--ui-width:100vw;--ui-height:100dvh;--start-inset:6vw}
/* Native layout zoom rasterizes text at the chosen size; the world canvas stays independent. */
.ui-layer{position:absolute;left:0;top:0;width:var(--ui-width);height:var(--ui-height);zoom:var(--ui-scale);z-index:3;pointer-events:none}
.ui-layer .topbar,.ui-layer .bottom-hud>*,.ui-layer .time-panel,.ui-layer .operations,.ui-layer .objectives-toggle,.ui-layer .screen-overlay,.ui-layer dialog,.ui-layer .paused{pointer-events:auto}
.ui-layer [hidden]{display:none!important}
.ui-layer .topbar{height:64px;padding:0 18px;gap:24px}.topbar .wordmark{font-size:18px}.topbar .wordmark small{font-size:9px}.topbar .resource b{font-size:21px}.topbar .resource small{font-size:11px}.topbar .resources{gap:25px}.topbar .resource svg{width:21px;height:21px}.topbar .top-actions{gap:8px}
.ui-layer .bottom-hud{height:auto;left:16px;right:16px;bottom:32px;gap:10px;align-items:flex-end;pointer-events:none}
.ui-layer .minimap-panel{box-sizing:border-box;flex:0 0 184px;width:184px;height:174px;padding:9px;transition:none}
.minimap-header{height:18px;font-size:10px;margin-bottom:6px;white-space:nowrap}.minimap-buttons{display:flex;gap:5px}.minimap-buttons button{width:20px;height:20px;line-height:18px;font-size:16px;color:#d5c18b}
.ui-layer #minimap{width:100%;height:115px;min-height:0;flex:1}.map-legend{margin-top:6px;font-size:10px}.ui-layer .minimap-panel.map-minimized{height:38px}.map-minimized #minimap,.map-minimized .map-legend{display:none!important}.map-minimized .minimap-header{margin-bottom:0}
.ui-layer .command-panel{box-sizing:border-box;flex:0 1 860px;width:860px;max-width:calc(100% - 194px);height:auto;min-height:0;padding:10px 13px}
.ui-layer .command-header{position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;min-height:36px;height:36px;padding-right:0;margin-bottom:7px;align-items:start}
.ui-layer #selectionName{font-size:22px;line-height:1.15;margin-top:3px}.selection-title .eyebrow{font-size:10px;letter-spacing:.8px}.ui-layer .selection-shortcuts{position:static;max-width:none;gap:7px;flex-wrap:nowrap}.selection-shortcuts button{font-size:11px;white-space:nowrap}.selection-shortcuts kbd{display:inline-block;font-size:10px}.selection-shortcuts #hudToggle{font-size:20px;line-height:16px;color:#e1cf9a;min-width:24px;padding:1px 4px;border:1px solid #748366}
.ui-layer .actions{height:72px;min-height:72px;gap:7px;overflow-x:auto}.ui-layer .action{flex:0 0 125px;min-width:125px;max-width:145px;padding:8px}.action .name{font-size:12px;line-height:1.2}.action .cost{font-size:11px}.action .time{font-size:10px}.action-top svg{width:19px;height:19px}.build-tabs{gap:5px;margin-bottom:6px}.build-tabs button{font-size:11px;padding:5px 8px}
.ui-layer .selection-vitals{font-size:12px;line-height:17px;margin-top:5px}.ui-layer .selection-description{font-size:13px;line-height:1.4;min-height:18px;max-height:37px;white-space:normal;margin-top:4px;overflow-y:auto}
.idle-dock{display:flex;align-items:center;gap:5px;padding:7px;background:#172f25ee;border:1px solid #75876c88;box-shadow:0 4px 15px #07190e55;height:42px;box-sizing:border-box}.idle-dock button{color:#dce2c9;font-size:12px;padding:5px 9px;line-height:18px;white-space:nowrap}.idle-dock button:hover{background:#8caa7130;color:#f1d7a1}.idle-dock #restoreOrders{border-left:1px solid #75876c88;color:#e6cd91;padding-left:12px}
.ui-layer .operations:not(.expanded){display:none}.ui-layer .operations.expanded{display:block;position:absolute;top:112px;left:16px;width:280px;max-height:calc(var(--ui-height) - 340px);padding:14px 16px}
.ui-layer .objectives-toggle{display:block;position:absolute;left:16px;top:78px;padding:8px 12px;background:#19372aee;border:1px solid #71876b80;color:#e2d5ac;font-size:12px}.ui-layer .time-panel{top:78px;right:16px;width:224px;max-width:224px;min-width:0;padding:10px 12px;gap:8px;box-sizing:border-box}.time-panel b{font-size:13px}.time-panel small,.time-panel #stage,.time-panel #dayPhase{font-size:11px;line-height:1.5}.time-panel #stage{max-width:165px}.time-panel>span{display:none}.time-panel .icon-btn{width:26px}
.ui-layer .sector-label{display:flex;top:83px;left:280px;max-width:210px}.sector-label .coordinate{font-size:9px}.sector-label #zoneName{font-size:11px;line-height:1.4;max-width:210px;white-space:normal}.ui-layer .paused{top:78px;padding:8px 13px;max-width:270px;gap:13px;z-index:5}.paused>span{font-size:10px;letter-spacing:1px}.paused button{font-size:12px}
.ui-layer .controls{height:24px;padding:0 16px;gap:18px;font-size:10px;pointer-events:none;box-sizing:border-box}.controls b{font-size:9px}.controls #saveState{font-size:10px}
.ui-layer .toast{bottom:255px;left:50%;max-width:520px;font-size:13px;pointer-events:none}.orders-minimized .toast{bottom:220px}.ui-layer .placement-hint{top:210px;font-size:12px}.ui-layer .screen-overlay .start-copy{margin-left:var(--start-inset);max-height:calc(var(--ui-height) - 24px);padding:14px 0}.ui-layer .start-caption{right:5%;bottom:9%}.ui-layer dialog{max-width:calc(var(--ui-width) - 48px);max-height:calc(var(--ui-height) - 64px)}
.display-settings{display:grid;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid #74856866}.display-settings label{display:grid;gap:7px;font-size:13px}.display-settings select{font:13px 'Segoe UI',sans-serif;color:#e2dfc3;background:#172f25;padding:9px;border:1px solid #748568}.display-settings p{font-size:12px;line-height:1.5;margin:0;color:#c0cbb2}
.health-layer{clip-path:inset(0)}.entity-health{width:calc(36px * var(--ui-scale));height:calc(5px * var(--ui-scale))}.building-health{width:calc(78px * var(--ui-scale));height:calc(6px * var(--ui-scale))}.health-level{font-size:calc(10px * var(--ui-scale));top:calc(-5px * var(--ui-scale));padding:calc(1px * var(--ui-scale)) calc(3px * var(--ui-scale));min-width:calc(18px * var(--ui-scale));left:calc(100% + 5px * var(--ui-scale))}.infection-marker{font-size:calc(12px * var(--ui-scale));line-height:calc(17px * var(--ui-scale));top:calc(-21px * var(--ui-scale))}.infection-clock{top:calc(7px * var(--ui-scale));height:calc(2px * var(--ui-scale))}.world-tooltip{font-size:calc(13px * var(--ui-scale));padding:calc(7px * var(--ui-scale)) calc(10px * var(--ui-scale));max-width:calc(310px * var(--ui-scale))}
@media(max-width:1100px){.ui-layer .topbar{height:96px;gap:10px;padding:8px 14px;flex-wrap:wrap}.topbar .wordmark{font-size:16px}.topbar .resources{order:3;width:100%;justify-content:space-between;gap:10px}.topbar .resource b{font-size:18px}.topbar .resource small{font-size:10px}.topbar .wordmark small{display:none}.ui-layer .objectives-toggle,.ui-layer .time-panel,.ui-layer .paused{top:110px}.ui-layer .operations.expanded{top:150px;max-height:calc(var(--ui-height) - 360px)}.ui-layer .sector-label{display:none}.ui-layer .command-panel{flex-basis:750px}.ui-layer .command-header{grid-template-columns:minmax(0,1fr) auto}.ui-layer #selectionName{font-size:19px}.ui-layer .selection-shortcuts{gap:5px}.selection-shortcuts button{font-size:10px}.selection-shortcuts kbd{display:none}.ui-layer .action{min-width:114px;flex-basis:114px}.idle-dock button{font-size:11px;padding:5px 7px}}
@media(max-width:760px){.ui-layer .minimap-panel{flex-basis:150px;width:150px;height:154px}.ui-layer .minimap-panel.map-minimized{height:38px}.ui-layer .command-panel{max-width:calc(100% - 160px);padding:8px}.ui-layer .command-header{grid-template-columns:1fr;height:auto;min-height:57px;gap:4px}.ui-layer .selection-shortcuts{justify-content:flex-start}.ui-layer .selection-description{font-size:12px}.idle-dock{gap:1px}.idle-dock button{padding:5px}.ui-layer .bottom-hud{left:10px;right:10px;gap:7px}}

/* Idle economy shortcut stays visible independently of the command panel. */
.ui-layer .idle-workers{border:1px solid #a58f5766;background:#bc9d4514;border-radius:2px;padding:5px 9px;min-width:116px;text-align:left;color:#edd9a6;gap:8px;flex-shrink:0;cursor:pointer}.ui-layer .idle-workers small{font-size:9px;letter-spacing:.7px;color:#d3c59e}.idle-workers kbd{font:10px Segoe UI,sans-serif;margin-left:3px;color:#eee1ba}.ui-layer .idle-workers:disabled{opacity:.5;cursor:default;background:transparent}.ui-layer .idle-workers:hover:enabled{background:#b89b4530;border-color:#d9bc79}.ui-layer .idle-workers:focus-visible{outline:2px solid #e2cc8a;outline-offset:3px}
@media(max-width:1100px){.ui-layer .idle-workers{padding:4px 7px;min-width:105px}.ui-layer .idle-workers small{font-size:9px}.ui-layer .resources{gap:8px}.ui-layer .resource{min-width:75px}.ui-layer .population{min-width:95px;padding-left:12px}}

.ui-layer .controls #cameraZoom{display:inline-block!important;color:#d8c798;white-space:nowrap;font-variant-numeric:tabular-nums}

@media(max-width:1100px){.ui-layer .topbar{padding:6px 14px;gap:6px}.ui-layer .resources{position:static;display:flex;flex:0 0 100%;width:100%;height:42px;left:auto;right:auto;bottom:auto;grid-template-columns:none;justify-content:space-between;align-items:center}.ui-layer .idle-workers{padding:2px 7px}}

.queue-shortcut{font:12px 'Segoe UI',sans-serif;color:#d7d9b8;padding:5px 9px;border:1px solid #75876c88;background:#abc07b12;white-space:nowrap}.queue-shortcut b{display:inline-block;min-width:15px;margin-left:4px;color:#ead19a}.queue-shortcut:hover{background:#9db36628}#constructionDialog{width:540px}#constructionList{max-height:420px;overflow-y:auto;margin-top:16px}.construction-row{display:grid;grid-template-columns:minmax(0,1fr) 28px 66px;gap:6px 9px;border-top:1px solid #74856855;padding:10px 0}.construction-info{text-align:left;color:#e2dfc7;font:14px 'Segoe UI',sans-serif;line-height:1.4}.construction-info small{display:block;font-size:11px;color:#aebda1;margin-top:4px}.construction-row progress{grid-column:1/-1;width:100%;height:5px;accent-color:#b5c884}.queue-priority,.queue-cancel{border:1px solid #74856866;color:#d9c79e;font-size:12px}.queue-priority{font-size:18px}.queue-cancel{padding:5px}#constructionDialog .micro{font-size:12px;line-height:1.5}

#constructionList{max-height:min(420px,calc(var(--ui-height) - 300px));min-height:80px}

.ui-layer .selection-description{height:37px;min-height:37px;max-height:37px;box-sizing:border-box}.ui-layer #waveTime{white-space:normal;line-height:1.45}.ui-layer #waveScope{font-size:10px;color:#aabda7}

.expedition-setup .diplomacy-label{grid-column:1/-1}.expedition-setup [hidden]{display:none!important}

@media(min-width:900px){.expedition-setup .doctrine-label,.expedition-setup .diplomacy-label{grid-column:auto}}

/* Keep complete action cards visible; never put names or costs behind a scrollbar. */
.ui-layer .command-panel{flex-basis:1040px;width:1040px}
.ui-layer .actions{display:grid;grid-template-columns:repeat(var(--action-columns,4),minmax(0,1fr));grid-auto-rows:minmax(96px,auto);height:auto;min-height:0;gap:7px;padding:0;overflow:visible;align-items:stretch}
.ui-layer .actions:empty{display:none}
.ui-layer .action{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px minmax(30px,auto) 16px;gap:4px;flex:none;width:100%;min-width:0;max-width:none;height:auto;min-height:96px;padding:8px;overflow:visible;text-align:left;transform:none;box-sizing:border-box;border:1px solid #71836a55;position:relative}
.ui-layer .action:hover{transform:none;background:#9eb7801a;border-color:#b6c48a}
.ui-layer .action .action-top{display:flex;justify-content:space-between;align-items:center;gap:6px;margin:0;min-width:0;height:20px}
.ui-layer .action .action-meta{display:flex;gap:6px;align-items:center;margin-left:auto;color:#aeba9e;font-size:10px;white-space:nowrap}
.ui-layer .action .time{position:static;font-size:10px;line-height:16px;white-space:nowrap}
.ui-layer .action .lock-icon{display:none;width:13px;height:13px;color:#d3c08b}
.ui-layer .action.locked .lock-icon{display:block}
.ui-layer .action .name{display:block;min-width:0;font-size:12px;line-height:15px;font-weight:600;white-space:normal;overflow-wrap:normal;word-break:normal;align-self:center;color:#e1e6d1}
.ui-layer .action .cost{display:flex;flex-wrap:nowrap;align-items:center;gap:7px;margin:0;height:16px;min-width:0;white-space:nowrap;font-size:11px;line-height:16px;color:#cbd2b7}
.ui-layer .action .cost>span{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.ui-layer .action svg.ui-icon{display:block;flex:0 0 auto;width:20px;height:20px;overflow:visible}
.ui-layer .action .cost svg.ui-icon{width:12px;height:12px}
.ui-layer .action svg.lock-icon{width:13px;height:13px}
.ui-layer .action.locked{opacity:.76}
.ui-layer .command-header{min-height:40px;height:auto}
.ui-layer .selection-description{scrollbar-width:thin}

.ui-layer .action svg.lock-icon{display:none}.ui-layer .action.locked svg.lock-icon{display:block}.ui-layer .toast{bottom:calc(var(--hud-obstacle-height,210px) + 44px)}

.ui-layer .command-panel{flex-basis:var(--command-width,860px);width:var(--command-width,860px)}.ui-layer .action .name{font-size:13px;line-height:16px}.ui-layer .action .cost{font-size:12px}.ui-layer .action .cost svg.ui-icon{width:13px;height:13px}

/* Recruitment is visible locally and from the camp-wide production shortcut. */
.ui-layer .queue-shortcuts{display:grid;gap:3px;align-self:center}.ui-layer .queue-shortcuts .queue-shortcut{padding:2px 7px;font-size:11px;line-height:16px}
.recruitment-selected[hidden]{display:none}.recruitment-selected{margin:9px 0 3px;border-top:1px solid #74856866;padding-top:8px}.recruitment-card{min-width:0;color:#dce0c7;font:12px/1.45 'Segoe UI',sans-serif}.recruitment-heading{display:block;text-align:left;font:600 13px/1.4 'Segoe UI',sans-serif;color:#ead19a;max-width:100%;overflow-wrap:anywhere}.recruitment-current{margin:3px 0;overflow-wrap:anywhere}.recruitment-card progress{display:block;width:100%;height:6px;accent-color:#cfbd7c;margin:5px 0}.recruitment-card progress[hidden]{display:none}.recruitment-counts{display:flex;flex-wrap:wrap;gap:4px 7px;margin-top:6px}.recruitment-counts>span{padding:2px 6px;background:#adc48415;border:1px solid #74856866;border-radius:2px;overflow-wrap:anywhere}.recruitment-counts>span:empty{display:none}
#recruitmentDialog{width:650px}#recruitmentList{max-height:50dvh;overflow:auto}#recruitmentList .recruitment-card{padding:14px 0;border-top:1px solid #74856855}#recruitmentList .recruitment-heading{cursor:pointer;text-decoration:underline;text-underline-offset:3px}.audio-settings{margin:14px 0;padding:12px 0;border-top:1px solid #74856855;border-bottom:1px solid #74856855}.audio-settings>label{display:flex;justify-content:space-between;gap:12px;font:14px 'Segoe UI',sans-serif}.audio-settings input{width:100%;accent-color:#ddc58b;margin-top:10px}.audio-settings .micro{margin:6px 0 0}

.loot-progress-marker{position:absolute;transform:translateX(-50%);padding:5px 7px;background:#182e28f5;border:1px solid #e0bf70;color:#f3e5b7;line-height:1.3;box-shadow:0 2px 8px #08171288;pointer-events:none;font-family:"Segoe UI",sans-serif}.loot-progress-marker strong,.loot-progress-marker span{display:block;overflow-wrap:anywhere}.loot-progress-marker span{color:#c6d3b7;margin-top:1px}.loot-progress-marker progress{display:block;width:100%;height:5px;margin-top:4px;accent-color:#e5c06e}.ui-layer .toast.loot{border:2px solid #e1bd6c;color:#fff0c4;background:#263a27;box-shadow:0 0 0 4px #e1bd6c22,0 6px 18px #09181288;font-weight:600}

#recruitmentDialog .recruitment-card{font-size:14px}#recruitmentDialog .recruitment-heading{font-size:15px}#recruitmentDialog .micro{font-size:13px;line-height:1.5}

.music-settings{margin:14px 0;padding-bottom:12px;border-bottom:1px solid #74856855}.music-settings>label{display:flex;align-items:center;justify-content:space-between;gap:12px;font:14px "Segoe UI",sans-serif}.music-settings .music-toggle{justify-content:flex-start;margin-bottom:12px}.music-toggle input{accent-color:#ddc58b;width:17px;height:17px}.music-toggle span{margin-left:auto;font-size:12px;color:#b8c9a6}.music-settings input[type="range"]{width:100%;accent-color:#ddc58b;margin-top:10px}.music-settings .micro{margin:6px 0 0}
.ui-layer #options{width:640px;max-width:calc(var(--ui-width,100vw) - 40px);max-height:calc(var(--ui-height,100dvh) - 64px)}

.combat-miss{position:absolute;transform:translate(-50%,-100%);color:#ff7973;font-weight:800;font-family:Segoe UI,Arial,sans-serif;letter-spacing:.5px;line-height:1.3;white-space:nowrap;text-shadow:0 1px 2px #190c09,1px 0 2px #190c09,-1px 0 2px #190c09;pointer-events:none;z-index:3}

#weatherPhase{color:#c5e1e7;font-weight:600;letter-spacing:.2px}.ui-layer .expedition-setup .biome-label{grid-column:auto}
@media(min-width:900px){.ui-layer .expedition-setup .seed-label{grid-column:auto}}
.expedition-setup .biome-choices{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px;border:0;padding:0;margin:0;min-width:0}
.expedition-setup .biome-choices legend{color:#d4d9c6;font:11px system-ui;letter-spacing:1px;margin-bottom:7px}
.expedition-setup .biome-choices label{display:flex;flex-direction:row;align-items:center;gap:10px;letter-spacing:0;padding:10px 12px;border:1px solid #71816b;border-radius:4px;background:#192e29;cursor:pointer}
.expedition-setup .biome-choices label.selected{border-color:#d9c58e;background:#304437;box-shadow:inset 0 0 0 1px #d9c58e35}
.expedition-setup .biome-choices input[type=radio]{width:16px;height:16px;margin:0;accent-color:#dac48e;flex:0 0 16px}
.biome-choices strong{display:block;font:600 14px system-ui;color:#f0ead7}.biome-choices small{display:block;font:11px/1.5 system-ui;color:#c2ccbd}
.expedition-setup .map-setup-hint{font-size:12px;line-height:1.5;color:#b9cabb;margin:0}
.ui-layer .expedition-setup .seed-label{grid-column:1/-1}
.topbar .queue-shortcuts{gap:2px}.topbar .queue-shortcuts .queue-shortcut:not(.diplomacy-quick){font-size:10px;line-height:12px;padding:1px 7px}
.topbar .queue-shortcuts .diplomacy-quick{font-size:12px;line-height:15px;padding:2px 8px;color:#f0d7a0;border-color:#b8a36e;background:#ac985b22}
#diplomacy{width:840px;max-width:calc(var(--ui-width) - 40px);max-height:calc(var(--ui-height) - 48px);box-sizing:border-box;overflow-y:auto}
.diplomacy-summary{font:14px/1.5 'Segoe UI',sans-serif;color:#e0deca;margin:12px 0 8px}.diplomacy-paused-note{font:12px/1.5 'Segoe UI',sans-serif;color:#acbda7;margin:0 0 16px}
.diplomacy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.diplomacy-card{border:1px solid #6d8269;background:#172e26;padding:15px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.diplomacy-card.enemy{border-top:3px solid #cc927d}.diplomacy-card.ally{border-top:3px solid #8cb7bb}.diplomacy-card.neutral{border-top:3px solid #abbf8d}.diplomacy-card.defeated{opacity:.7}
.diplomacy-badge{font:600 11px 'Segoe UI',sans-serif;letter-spacing:.4px;border:1px solid #80947b88;padding:3px 6px;color:#d2dfbf}.enemy .diplomacy-badge{color:#f0baa2}.ally .diplomacy-badge{color:#b5d6dc}
.diplomacy-card h3{font:21px/1.2 Georgia,serif;color:#eee5cb;margin:0;overflow-wrap:anywhere}.diplomacy-card h3:focus{outline:1px solid #ddca9b;outline-offset:3px}
.diplomacy-card .diplomacy-doctrine{font:12px/1.4 'Segoe UI',sans-serif;color:#adbea7;margin:0}.diplomacy-card .diplomacy-cost-label{font:600 12px/1.5 'Segoe UI',sans-serif;margin:7px 0 0;color:#d3d9bb}
.diplomacy-cost{display:flex;flex-direction:column;gap:6px;width:100%;font:13px 'Segoe UI',sans-serif;color:#e4ce97}.diplomacy-cost>span{display:flex;align-items:center;gap:7px}.diplomacy-cost svg{width:16px;height:16px;flex:0 0 16px}.diplomacy-cost .missing{color:#ecac8d}
.diplomacy-card .diplomacy-reason{font:13px/1.5 'Segoe UI',sans-serif;color:#c7d0b8;margin:4px 0 12px;flex:1}.diplomacy-card button{font:600 12px/1.4 'Segoe UI',sans-serif;padding:10px;width:100%;white-space:normal}.diplomacy-card button:disabled{opacity:.45;cursor:default}.diplomacy-war{border-color:#b78770!important;color:#f0bfaa!important}.diplomacy-peace{color:#dce8bc!important}
.diplomacy-feedback{border:1px solid #a6b985;background:#344d2e66;color:#e7e3be;padding:10px 12px;font:14px/1.5 'Segoe UI',sans-serif;margin:0 0 14px}
@media(max-width:760px){.diplomacy-grid{grid-template-columns:1fr}.diplomacy-card h3{font-size:20px}}

#rangeLegend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12px;color:#dce2ca;margin:6px 0}#rangeLegend[hidden],#rangeLegend [hidden]{display:none!important}#rangeLegend>span{display:inline-flex;align-items:center;gap:5px}#rangeLegend b{font-weight:600}.range-dot{width:9px;height:9px;border-radius:50%;display:inline-block}.range-dot.light{border:1px dashed #e4d4a2}.range-dot.heat{border:2px solid #eeaa68}#rangeLegend.inactive #rangeActive{color:#a5b5b7}

.diplomacy-personality{color:#cad2bb;font-size:12px;line-height:1.5;margin:10px 0 12px}


.cult-ritual-marker{border-color:#c3a0bb;background:#2b2530f5}.cult-ritual-marker progress{accent-color:#d8b88e}.cult-bonus-marker{position:absolute;transform:translateX(-50%);background:#292431f5;border:1px solid #d7bf91;color:#f2dfb9;padding:5px 8px;line-height:1.4;pointer-events:none;text-align:center;font-family:"Segoe UI",sans-serif;font-weight:600}

/* Optional support sits beside the menu, leaving the play controls in place. */
.start-right-column{position:absolute;right:5%;bottom:9%;display:flex;flex-direction:column;align-items:flex-start;gap:22px;max-width:300px}
.start-right-column .start-caption{position:static;display:flex}
.start-support{box-sizing:border-box;width:280px;padding:17px 18px;background:#172d27eb;border:1px solid #a0af8055;box-shadow:0 8px 24px #091b1733}
.start-support>.eyebrow{font-size:11px;letter-spacing:1.2px;color:#d9c894}
.start-support p{margin:9px 0 13px;font:14px/1.5 "Segoe UI",sans-serif;color:#d3d9c4}
.start-support a{display:block;width:240px;max-width:100%;border-radius:6px;line-height:0;transition:filter .15s}
.start-support a:hover{filter:brightness(1.12)}
.start-support a:focus-visible{outline:2px solid #e5d39d;outline-offset:5px}
.start-support img{display:block;width:100%;height:auto;max-width:240px;image-rendering:auto}
.start-support small{display:block;margin-top:11px;font:11px/1.45 "Segoe UI",sans-serif;color:#a8baa6}
@media(max-width:760px){.ui-layer #startScreen{display:block;overflow-y:auto}.ui-layer #startScreen .start-copy{max-height:none;overflow:visible}.start-right-column{position:static;margin:4px 20px 24px;max-width:calc(100% - 40px)}.start-right-column .start-caption{display:none}.start-support{max-width:100%}}

/* Main menu: play first, match settings only when starting a new game. */
.ui-layer #startScreen .start-copy{width:min(610px,calc(var(--ui-width) - 80px));max-width:610px;padding:28px 0;max-height:calc(var(--ui-height) - 40px);overflow-y:auto}
.ui-layer #startScreen h2{font:76px/.96 Georgia,serif;letter-spacing:-2px;margin:0 0 32px;color:#e8dfbd}
.home-menu{display:grid;gap:10px;width:280px;max-width:100%}
.home-menu button{min-height:48px;padding:12px 18px;font:16px/1.4 "Segoe UI",sans-serif;text-align:left;letter-spacing:0;text-transform:none;width:100%}
.home-menu .secondary{border:1px solid #81957766;background:#1730279c;color:#e0e4d0}
.home-menu .secondary:hover{background:#81957724}
.ui-layer #startScreen .version{display:block;font:11px/18px "Segoe UI",sans-serif;letter-spacing:0;color:#97aa98;margin-top:28px}
.setup-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.setup-heading h3{font:600 20px/1.3 "Segoe UI",sans-serif;margin:0}
.setup-heading button{min-height:44px;padding:7px 10px;color:#c4ceba;font-size:14px}
.ui-layer #startScreen .expedition-setup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;margin:0 0 18px;max-width:none}
.ui-layer #startScreen .expedition-setup>label{grid-column:auto;font:13px/1.4 "Segoe UI",sans-serif;letter-spacing:0;text-transform:none;gap:7px;min-width:0;color:#c2cebb}
.ui-layer #startScreen select,.ui-layer #startScreen input{font-size:14px;min-height:44px;padding:9px 11px;border:1px solid #748568;background:#183027;color:#e5e7d4;width:100%;box-sizing:border-box}
.ui-layer #startScreen .biome-choices{margin:0;gap:10px;grid-column:1/-1}
.ui-layer #startScreen .biome-choices legend{font-size:13px;letter-spacing:0;text-transform:none;color:#c2cebb}
.ui-layer #startScreen .biome-choices label{padding:10px 12px;min-height:46px;gap:9px}
.ui-layer #startScreen .biome-choices strong{font-size:14px;font-weight:500}
.ui-layer #startScreen .biome-choices input{width:17px;min-height:17px;padding:0}
.setup-details{grid-column:1/-1;border-top:1px solid #7b8f6555;padding-top:2px}
.setup-details summary{cursor:pointer;font:13px/20px "Segoe UI",sans-serif;color:#bdcdb3;padding:10px 0;min-height:44px}
.setup-details p{font:13px/1.6 "Segoe UI",sans-serif!important;color:#c5cfb9!important;margin:6px 0 10px!important}
.setup-details label{display:grid;gap:7px;font-size:13px;margin:8px 0;color:#c2cebb}
.ui-layer #startScreen .setup-play{min-height:48px;padding:12px 24px;font-size:16px;letter-spacing:0;text-transform:none;min-width:180px}
.ui-layer #startScreen .start-right-column{right:40px;bottom:40px;max-width:240px}
.ui-layer #startScreen .start-support{padding:0;margin:0;width:240px;max-width:100%;border:0;background:none;box-shadow:none}
#game:has(#startScreen:not(.hidden)) #mobileBar,#game:has(#startScreen:not(.hidden)) #mobileSelection,#game:has(#startScreen:not(.hidden)) #mobileBuild,#game:has(#startScreen:not(.hidden)) #mobileHint{display:none!important}
.home-menu button,.ui-layer #startScreen .setup-play{text-align:center;justify-content:center}

.ui-layer #startScreen[data-view="setup"] .start-copy>h2{display:none}
#game:has(#startScreen:not(.hidden)) #toast{display:none}

/* Command locations do not depend on recruitment or resource updates. */
.ui-layer .command-panel{width:900px;flex-basis:900px;height:auto;container:orders / inline-size;max-height:calc(var(--ui-height) - 180px);display:flex;flex-direction:column}
.ui-layer .command-header,.ui-layer .build-tabs,.ui-layer .selection-vitals,.ui-layer .selection-description,.ui-layer #rangeLegend{flex-shrink:0}
.ui-layer .command-header{height:40px;min-height:40px}
.ui-layer .build-tabs:empty{display:none}
.ui-layer .actions{flex:none;grid-template-columns:repeat(5,minmax(0,1fr));min-height:0;max-height:176px;overflow-y:auto;overflow-x:hidden;align-content:start;grid-auto-rows:80px}
.ui-layer .action{height:80px;min-height:80px;padding:6px 8px;grid-template-rows:16px 32px 14px;gap:2px}
.ui-layer .action .action-top{height:16px}.ui-layer .action .action-top>svg{width:17px;height:17px}.ui-layer .action .cost{height:14px;font-size:11px;line-height:14px}.ui-layer .action .cost:not(:has(span)){visibility:hidden}
.recruitment-selected{flex:0 0 96px;height:96px;box-sizing:border-box;overflow:hidden}
.recruitment-header{display:flex;align-items:center;justify-content:space-between;gap:8px;height:30px}
.recruitment-cancel{height:28px;min-width:112px;padding:3px 8px;color:#e2cca0;border:1px solid #71836a88;font-size:12px}
.recruitment-cancel:disabled{opacity:.4;cursor:default}
.recruitment-current{height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.recruitment-counts{min-height:22px;max-height:22px;overflow:auto;flex-wrap:nowrap}
.panel-closing,.panel-closing *{pointer-events:none!important}
#foodInfo{font:inherit;color:inherit;text-align:left;padding:0;background:none;border:0}
#foodInfo:hover{color:#efd59a}#foodConsumption{color:#d0b984;font-size:10px!important;line-height:11px!important}
#foodDialog{width:480px}#foodUpkeep{color:#e6d098;font-weight:600}
@keyframes menu-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
#startHome:not([hidden]),#startConfig:not([hidden]),dialog[open]{animation:menu-enter 140ms ease-out}
@media(prefers-reduced-motion:reduce){#startHome,#startConfig,dialog[open]{animation:none!important}}


@container orders (max-width:819px){.ui-layer .actions{grid-template-columns:repeat(4,minmax(0,1fr))}}
@container orders (max-width:650px){.ui-layer .actions{grid-template-columns:repeat(3,minmax(0,1fr))}}

.recruitment-selected .recruitment-header{height:26px}.recruitment-selected .recruitment-cancel{height:24px}.recruitment-selected .recruitment-current{height:18px;margin:2px 0}.recruitment-selected progress{height:4px;margin:3px 0}.recruitment-selected .recruitment-counts{margin-top:4px}.recruitment-selected .recruitment-counts>span{padding:0 5px;line-height:18px}

/* Placement tools stay visible after the command panel folds away. */
.ui-layer .placement-hint{left:50%;transform:translateX(-50%);width:max-content;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;max-width:calc(var(--ui-width) - 40px);pointer-events:auto}
#placementText{min-width:0;overflow-wrap:anywhere}#placementTools{display:inline-flex;align-items:center;gap:6px;flex-shrink:0}#placementTools button{min-height:34px;padding:6px 10px;border:1px solid #9d9c73;background:#192f25;color:#e4d3a6;white-space:nowrap;font-size:12px}#placementTools button:hover{background:#40513a}

/* Compact tactical tools keep production cards in their existing slots. */
.tactics-bar{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}.tactics-bar[hidden],.tactical-hint[hidden]{display:none!important}.tactics-bar button,.tactics-bar select{font:inherit;font-size:12px;min-height:34px;padding:5px 9px;border:1px solid #70866c;background:#20372c;color:#e6e2c9}.tactics-bar button[aria-pressed=true]{border-color:#e1c383;background:#43533b}.tactics-bar select{max-width:120px}.tactical-hint{position:absolute;top:calc(var(--topbar-height,76px) + 14px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:calc(100% - 28px);background:#182f26;border:1px solid #b1ab7d;padding:8px 12px;pointer-events:auto;font-size:13px;z-index:12}.tactical-hint button{padding:6px 9px;border:1px solid #9ba281;background:#293f30;color:#f1dfb1}#expeditionsOpen{margin:0 0 12px;width:100%}.expedition-card{padding:14px 0;border-top:1px solid #4d6554}.expedition-card p{margin:6px 0 10px;font-size:13px}.expedition-card button{min-height:40px;margin:0 6px 4px 0;padding:6px 12px;background:#293f30;border:1px solid #8f9c78;color:#e6dfbc}.expedition-card button:disabled{opacity:.45}

/* Sound pressure is a permanent, sharp HTML control in the resource bar. */
.ui-layer .topbar .resources{gap:clamp(8px,1vw,18px)}.topbar .noise-info{min-width:76px;justify-content:center;align-self:center}.noise-data{min-width:50px}.noise-track{display:block;width:100%;height:4px;margin-top:3px;background:#071a14;border:1px solid #73866b66;box-sizing:border-box;overflow:hidden}.noise-track i{display:block;height:100%;width:0;background:#cfbd83;transition:width .15s linear}.noise-warning .noise-track i{background:#d58d68}.noise-warning b{color:#edb085}#noiseDialog{width:540px}#noiseDialog p{line-height:1.5;font-size:14px}#noiseCycleState{padding:10px;border:1px solid #6f8263;background:#263b2e;color:#e8dcae}

/* Building placement stays on the lower edge, beside the folded HUD. */
.ui-layer .placement-hint{top:auto;bottom:32px;left:auto;right:16px;transform:none;width:max-content;max-width:min(760px,calc(var(--ui-width) - 230px));gap:6px 10px;padding:6px 10px;z-index:12;font-size:12px;line-height:18px}#placementText{flex:1 1 180px}#placementTools{margin-left:auto}

/* Workshop production remains visible before its research unlock. */
.ui-layer .action[data-action-key^="ammo|"]:disabled{filter:grayscale(1);cursor:not-allowed}
