/* Original cream, timber and blue UI after the selected concept. Desktop. */
#game-hud{--ink:#16223e;--muted:#756045;--wood:#a8682f;--blue:#1478e6;position:absolute;inset:0;z-index:3;pointer-events:none;color:var(--ink);font-family:'Trebuchet MS',Arial,sans-serif}
#viewport.placing{cursor:crosshair}
#game-hud button,body.game-active .settings button,body.game-active .tool{font-family:inherit;color:#17243c;cursor:pointer;border:1px solid #b58b52;border-radius:8px;background:linear-gradient(#fff9e9 0%,#fff0d7 70%,#edd0a1 100%);box-shadow:inset 0 1px 0 #fff,0 2px 0 #8a4d2638;font-weight:700;transition:filter .12s,box-shadow .12s,transform .12s}
#game-hud button:hover,body.game-active .settings button:hover,body.game-active .tool:hover{filter:brightness(1.055);color:#0e4f9a;box-shadow:inset 0 1px #fff,0 3px 0 #8a4d2638}
#game-hud button:active,body.game-active .tool:active{transform:translateY(1px)}
#game-hud button:disabled{cursor:default;filter:none;opacity:.53}
#game-hud button[aria-pressed=true],#game-hud .primary-button{color:#fff;background:linear-gradient(#36a2ff,#177ced 45%,#0759c0);border-color:#065bb9;box-shadow:inset 0 2px #9ed9ff,0 3px 0 #144d85}
#game-hud button:focus-visible,body.game-active .settings :focus-visible,body.game-active .toolbar :focus-visible{outline:3px solid #1c80ed;outline-offset:3px}
#game-hud .parchment,body.game-active .settings{pointer-events:auto;background:radial-gradient(ellipse at 8% 3%,#fff8e7,#f9e5c7 75%);border:5px solid #b97832;border-radius:16px;box-shadow:inset 0 0 0 2px #ffe5b6,inset 0 0 15px #e9b96935,0 3px 0 #754223,0 7px 18px #0003;position:absolute}
#game-hud .parchment:before,#game-hud .parchment:after{content:'';pointer-events:none;position:absolute;z-index:2;width:8px;height:8px;left:1px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#fff4c8 0 14%,#d49c50 35%,#875322 80%);box-shadow:0 1px 2px #623820}
#game-hud .parchment:before{top:1px}#game-hud .parchment:after{bottom:1px}
.ui-art{display:block;object-fit:contain;aspect-ratio:1;flex-shrink:0;user-select:none;pointer-events:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.resource-strip{top:14px;left:50%;transform:translateX(-50%);display:flex;align-items:stretch;height:72px;padding:2px 10px;width:650px}
#game-hud .resource-counter{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0;border:0;border-radius:0;border-right:1px solid #c59a6566;box-shadow:none;background:none;padding:3px 7px;text-align:left}
#game-hud .resource-counter:last-child{border:0}
#game-hud .resource-counter:hover{background:#eac69540;box-shadow:none;filter:none}
.resource-counter .ui-art{width:50px;height:50px}
.resource-counter>span{font-weight:800;font-size:13px;line-height:1.1}
.resource-counter strong{display:block;font-size:25px;line-height:1.15;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
.game-time{pointer-events:auto;position:absolute;top:16px;right:78px;text-align:center}
.session-buttons{display:flex;gap:9px}
#game-hud .square-button{width:46px;height:46px;font-size:23px;border:2px solid #bd7d3d;box-shadow:inset 0 1px #fff,0 3px 0 #774529;padding:0}
.game-time output{display:block;font-size:10px;letter-spacing:.5px;padding-top:7px;color:#e9f3ff;font-variant-numeric:tabular-nums;text-shadow:0 1px 3px #031729}
.attack-alerts{position:absolute;right:16px;top:89px;width:min(290px,calc(100% - 32px));max-height:min(35dvh,310px);display:grid;gap:7px;margin:0;padding:5px;list-style:none;overflow:auto;overscroll-behavior:contain}
.attack-alerts:not(:empty){pointer-events:auto}
.attack-alerts li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;align-items:stretch}
#game-hud [data-action=focus-attack-alert]{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:7px 10px;border-color:#b46a45;border-left:4px solid #b24d3f;text-align:left}
#game-hud [data-action=focus-attack-alert] span{font-size:19px;line-height:1;color:#864530}
#game-hud [data-action=dismiss-attack-alert]{min-width:36px;font-size:18px;padding:0}
.scenario-goal{position:absolute;top:100px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:8px;background:#13253deb;color:#fff1d7;font-size:12px;pointer-events:auto}
.scenario-goal button{padding:4px 8px}
#game-hud .settlement-panel{top:118px;left:20px;width:324px;max-height:calc(100% - 139px);display:flex;flex-direction:column;overflow:hidden}
.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:12px 14px 9px;flex-shrink:0}
.panel-heading h2{font-size:25px;letter-spacing:-.7px;line-height:1.15;margin:0;font-weight:900}
#game-hud .panel-heading button{width:30px;height:30px;padding:0;font-size:27px;line-height:1;flex-shrink:0}
.panel-body{padding:4px 12px 14px;overflow:auto;scrollbar-color:#c7985b #fae9cf;scrollbar-width:thin}
.panel-footer{padding:10px 12px 13px;border-top:1px solid #bd945e77;flex-shrink:0;background:#f9e7cd}
.panel-tabs{display:flex;gap:5px;margin:1px 0 10px}
#game-hud .panel-tabs button{flex:1;padding:8px 5px;font-size:12px;min-width:0}
.building-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#game-hud .building-card{padding:3px 5px 8px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;min-width:0;background:#fff2db;border:1px solid #c4a178;box-shadow:inset 0 1px #fff,0 1px 1px #916c3820}
#game-hud .building-card .ui-art{width:124px;height:90px}
#game-hud .building-card b{font-size:13px;line-height:17px}
#game-hud .building-card[aria-pressed=true]{background:linear-gradient(#f1faff,#e0f1ff);color:#102c50;outline:3px solid #1989ec;outline-offset:-2px;border-color:#0066c2;box-shadow:inset 0 0 0 4px #8bd5ff}
.build-details{margin-top:12px;padding-top:9px;border-top:2px solid #c3a077}
.selected-building{display:flex;align-items:center;gap:10px;min-height:39px}
.selected-building .ui-art{width:50px;height:43px}
.selected-building h3{margin:0;font-size:20px;line-height:1.1;letter-spacing:-.4px}
.selected-building p{font-size:12px;margin:3px 0 0;font-weight:700}
.cost-row{display:flex;align-items:center;gap:12px;border:1px solid #c4a178;border-radius:7px;padding:4px 9px;margin-top:8px;min-height:34px}
.cost-row>span:first-child{font-size:12px;font-weight:700;margin-right:auto}
.cost-chip{display:flex;align-items:center;gap:3px;font-size:19px;font-variant-numeric:tabular-nums}.cost-chip .ui-art{width:30px;height:25px}.cost-chip.shortage{color:#9b3c22}
.staffing-note{font-size:11px;font-weight:700;margin:8px 0 0}.staffing-note>span{font-weight:400;color:var(--muted)}
.availability-note{font-size:11px;line-height:1.4;margin:7px 0 0;color:#8c4a24}
#game-hud .full-width{width:100%;min-height:40px;font-size:15px;padding:9px 12px}
#game-hud .primary-button .ui-art{width:25px;height:25px;display:inline-block;vertical-align:middle;margin:-5px 9px -5px 0}
#game-hud .secondary-button{font-size:12px;min-height:32px;padding:7px 10px}
.rotation-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px}.rotation-controls>span{font-size:11px;font-weight:700}.rotation-controls button{min-width:85px;padding:6px 10px;font-size:22px}.rotation-controls kbd{font:700 11px Arial,sans-serif;background:#fff7e5;border:1px solid #c5a880;border-radius:4px;padding:2px 4px;vertical-align:middle}
.panel-intro{color:var(--muted);font-size:12px;line-height:1.6;margin:2px 0 14px}.panel-note{color:var(--muted);font-size:11px;line-height:1.5;margin:12px 0 0}
.road-tools{display:flex;flex-direction:column;gap:9px}
#game-hud .road-tools button{display:flex;align-items:center;gap:12px;text-align:left;padding:11px 10px}
.road-tools b{display:block;font-size:14px}.road-tools small{display:block;font-size:11px;font-weight:400;line-height:1.4;opacity:.85;margin-top:4px}.road-symbol{font-size:32px;width:30px;text-align:center}
.stat-line{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #c8a67755;padding:10px 0;font-size:12px}.stat-line strong{font-size:14px;font-variant-numeric:tabular-nums}.section-label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--muted);margin:17px 0 7px}
.inventory-heading{display:flex;align-items:baseline;justify-content:space-between;margin:16px 0 5px}.inventory-heading h3{font-size:15px;margin:0}.inventory-heading>span{font-size:10px;color:var(--muted)}
.stock-row,.construction-material,.input-stock{display:flex;align-items:center;gap:10px;padding:6px 5px;border-bottom:1px solid #c8a67744;font-size:13px;border-radius:4px}.stock-row .ui-art,.construction-material .ui-art,.input-stock .ui-art{width:34px;height:31px}.stock-row strong,.construction-material strong,.input-stock strong{margin-left:auto;font-size:18px;font-variant-numeric:tabular-nums}.stock-highlight{background:#e6ce9d60}.construction-material small{display:block;font-size:10px;color:var(--muted);margin-top:3px}.construction-material strong{font-size:15px}
.transit-summary{display:flex;align-items:center;gap:10px;margin-top:16px;background:#e3d0ac55;border-radius:8px;padding:5px 8px;font-size:12px}.transit-summary .ui-art{width:33px;height:33px}.transit-summary strong{margin-left:10px;font-size:17px}.stock-summary{display:flex;align-items:center;gap:14px;margin:14px 0}.stock-summary .ui-art{width:65px;height:65px}.stock-summary strong{display:block;font-size:32px;line-height:1.1}.stock-summary span{display:block;font-size:11px;color:var(--muted)}
.chain-guide{display:flex;align-items:center;justify-content:center;gap:14px;padding:0 0 6px}.chain-guide .ui-art{width:45px;height:45px}.chain-guide>span{color:var(--muted)}
#game-hud .production-row{border:0;border-bottom:1px solid #c8a67777;border-radius:0;background:none;box-shadow:none;display:flex;text-align:left;align-items:center;gap:8px;width:100%;padding:12px 0;min-height:95px}.production-row>.ui-art{width:75px;height:72px}.production-row>span:nth-child(2){flex:1;min-width:0}.production-row b{font-size:14px;display:block}.production-row small{display:block;font-size:11px;font-weight:400;color:var(--muted);margin:4px 0}.production-row em{font-size:10px;display:block;font-style:normal;font-weight:700;margin-top:6px;color:#427746}.row-arrow{font-size:23px;opacity:.5}.production-row progress{display:block;width:100%;height:7px;accent-color:#2185e1;margin:7px 0}
.inspection-hero{display:flex;align-items:center;gap:10px}.inspection-hero>.ui-art{width:90px;height:90px}.inspection-hero h3{font-size:20px;line-height:1.1;margin:3px 0}.inspection-hero p{font-size:11px;margin:5px 0}.eyebrow{font-size:9px;text-transform:uppercase;letter-spacing:1px;color:var(--muted)}
.status-tag{font-size:12px;font-weight:700;line-height:1.4;color:#44623a;background:#e1e8c4;border:1px solid #acb782;border-radius:7px;padding:8px 10px;margin:10px 0}.status-tag.needs-attention{color:#845122;background:#f6d99e;border-color:#c8a05e}.context-emblem{display:flex;justify-content:center;padding:10px;font-size:46px;color:#e0a338}.context-emblem .ui-art{width:80px;height:80px}
#game-hud .game-commands{bottom:21px;left:50%;transform:translateX(-50%);display:flex;padding:3px;gap:0;width:570px;height:65px}
#game-hud .game-commands button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;border:0;border-right:1px solid #c2a06c66;border-radius:0;box-shadow:none;background:none;font-size:17px;padding:5px 10px;min-width:0}
#game-hud .game-commands button:first-child{border-radius:8px 0 0 8px}#game-hud .game-commands button:last-child{border-radius:0 8px 8px 0;border:0}
#game-hud .game-commands button[aria-pressed=true]{color:#fff;background:linear-gradient(#34a0ff,#187eeb 50%,#065bc3);box-shadow:inset 0 1px #abddff,0 1px 0 #0b579f}
.game-commands .ui-art{width:36px;height:36px}
.tool-prompt{position:absolute;bottom:102px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:9px 16px;border:2px solid #bd8745;border-radius:20px;background:#fff0d4;color:#263c53;font-size:12px;font-weight:700;box-shadow:0 3px 8px #0003;text-align:center}
.tool-prompt[data-invalid]{border-color:#b56855;color:#872f23;max-width:min(420px,calc(100% - 32px));text-align:center;white-space:normal}
body.game-active .topbar{padding:19px 20px;z-index:2}body.game-active .brand{width:210px}
body.game-active .bottom-bar{z-index:4;padding:0;pointer-events:none}
body.game-active .toolbar{position:fixed;bottom:55px;right:20px;left:auto;transform:none;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;padding:0;gap:8px;display:flex}
body.game-active .tool{height:43px;min-width:43px;padding:0;font-size:27px;border:2px solid #b97832;box-shadow:inset 0 1px #fff,0 3px #754223;background:linear-gradient(#fff9e9,#f7dfb7);color:#182940}
body.game-active .toolbar .divider{display:none}body.game-active #plant-grove{display:none}
body.game-active #home-base{font-size:0;order:0}body.game-active #home-base:before{content:'⌂';font:bold 30px Arial,sans-serif}body.game-active #zoom-out{order:1}body.game-active #zoom-in{order:2}body.game-active #reset{font-size:0;order:3}body.game-active #reset>span{font-size:28px}
body.game-active #toggle-settings{position:fixed;top:16px;right:20px;width:46px;height:46px;z-index:8;order:4}body.game-active #toggle-settings svg{width:23px;height:23px}body.game-active #toggle-settings svg circle{fill:#f9e6c7}body.game-active #toggle-settings svg path,body.game-active #toggle-settings svg circle{stroke:#17243c;stroke-width:1.8}
body.game-active .trackpad-hint{pointer-events:none;position:fixed;right:20px;bottom:14px;max-width:290px;padding:6px 11px;border:1px solid #c0955b;border-radius:18px;background:#fff0d9;color:#23334a;box-shadow:0 2px #8a5c32;display:flex;gap:6px}
body.game-active .trackpad-hint svg{display:none}body.game-active .trackpad-hint>span{display:block;font-size:10px}body.game-active .trackpad-hint b{font-size:10px;color:inherit;font-weight:700;letter-spacing:0}body.game-active .trackpad-hint b:after{content:' · ';font-weight:400}body.game-active .trackpad-hint>span>span{display:inline;font-size:10px}
body.game-active .settings{position:absolute;z-index:8;right:20px;top:89px;bottom:auto;width:310px;max-height:calc(100% - 180px);overflow:auto;padding:14px 16px;color:#17243c;backdrop-filter:none;font-family:'Trebuchet MS',Arial,sans-serif}
body.game-active .panel-title{margin:0 0 10px}body.game-active .panel-title h2{font-size:22px;font-weight:800}body.game-active .icon-button{border:1px solid #b58b52;width:28px;height:28px;padding:0;font-size:23px}
body.game-active .settings .save-controls{border:0;margin:0 0 16px;padding:0;gap:8px}body.game-active .save-controls button{flex:1;padding:10px 7px;font-size:12px;color:#17243c;background:linear-gradient(#fff9e9,#eed3a8)}body.game-active .save-controls output{font-size:11px;color:#41683a;min-height:14px}body.game-active .save-controls output[data-error=true]{color:#9a392c}
.game-display-setting{display:none;justify-content:space-between;align-items:center;gap:8px;margin:4px 0 16px;font-size:12px}body.game-active .game-display-setting{display:flex}.game-display-setting select{font:700 12px 'Trebuchet MS',Arial,sans-serif;color:#17243c;background:#fff5df;border:1px solid #ba945d;border-radius:6px;padding:6px;min-width:115px}
body.game-active .settings details{border-top:1px solid #c5a57a66;padding:11px 0;font-size:12px}body.game-active .settings summary{cursor:pointer;font-weight:700;color:#5b492f}body.game-active .settings .slider-label{color:#5b492f;font-size:11px;margin:15px 0 9px}body.game-active .settings .slider-label output{color:#2f6f48}body.game-active .settings input{accent-color:#217ddd}body.game-active .settings .switch-row{font-size:11px;margin:18px 0 3px}
.controls-help dl{margin:10px 0 0}.controls-help dl>div{display:flex;gap:10px;justify-content:space-between;padding:5px 0;font-size:10px}.controls-help dd{margin:0;color:#77624b;text-align:right}
body.game-active .settings .size-trial-link,body.game-active .settings .forest-settings{display:none}
body.game-active .toast{z-index:7;bottom:105px;color:#23334a;background:#fff0d9;border:1px solid #ba945d;box-shadow:0 2px 7px #0003;font:700 12px 'Trebuchet MS',Arial,sans-serif}
@media(min-width:1500px){.resource-strip{width:770px;height:78px}.resource-counter .ui-art{width:58px;height:58px}.resource-counter>span{font-size:15px}.resource-counter strong{font-size:28px}#game-hud .settlement-panel{width:352px;top:132px;max-height:calc(100% - 153px)}#game-hud .building-card .ui-art{width:126px;height:85px}#game-hud .building-card b{font-size:14px}.panel-body{padding:6px 16px 16px}.selected-building h3{font-size:23px}#game-hud .game-commands{width:650px;height:70px}.game-commands .ui-art{width:40px;height:40px}#game-hud .game-commands button{font-size:19px}}
@media(max-width:1150px){body.game-active .brand{width:168px}.resource-strip{width:550px;left:210px;transform:none;height:64px}.resource-counter .ui-art{width:39px;height:39px}.resource-counter>span{font-size:11px}.resource-counter strong{font-size:22px}.game-time{right:70px}.session-buttons{gap:6px}#game-hud .square-button{width:40px;height:40px;font-size:20px}body.game-active #toggle-settings{width:40px;height:40px;right:18px}#game-hud .game-commands{left:20px;transform:none;width:510px}#game-hud .game-commands button{font-size:15px}body.game-active .trackpad-hint{font-size:9px}#game-hud .settlement-panel{left:18px;width:306px;top:105px;max-height:calc(100% - 205px)}}
@media(max-height:680px){#game-hud .settlement-panel{top:99px;max-height:calc(100% - 193px)}#game-hud .building-card .ui-art{height:56px}.panel-heading{padding-top:9px;padding-bottom:6px}.panel-heading h2{font-size:22px}.panel-body{padding-top:3px}.resource-strip{top:10px;height:61px}body.game-active .toolbar{bottom:50px}}

.controls-help{display:none}body.game-active .controls-help{display:block}

.panel-footer>.build-details{margin:0;padding:0 0 10px;border:0}

.panel-tabs{position:sticky;top:0;z-index:2;background:#fbeace;padding:3px 0 7px}
@media(min-width:1151px) and (max-height:680px){#game-hud .settlement-panel{max-height:calc(100% - 120px)}}

.status-tag.needs-connection{color:#92382a;background:#fbe3d7;border-color:#cb8d74}.status-tag.needs-connection:before{content:"⚑ ";font-size:14px}
#game-hud .military-strength{display:block;width:100%;margin:7px 0 10px;accent-color:var(--blue)}

#game-hud,body.game-active .settings{color-scheme:light}
