/* The world owns the viewport. Windows never resize or push the camera. */
body.game-hud{margin:0;overflow:hidden;background:#194c52;--hud-ink:#eff4df;--hud-glass:#193e3de8;--hud-line:#d0d9ac55;}
.game-hud .page{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;padding:0;display:block;}
.game-hud .page>main,.game-hud .game-layout,.game-hud .island-panel,.game-hud .island-panel>.world{position:absolute;inset:0;width:100%;height:100%;max-height:none;min-height:0;margin:0;display:block;border:0;border-radius:0;aspect-ratio:auto;}
.game-hud .island-panel{overflow:clip;}
.game-hud .page>main>footer{display:none;}
.game-hud [hidden]{display:none!important;}
/* One continuous top rail; only the resource strip scrolls when space is tight. */
.game-hud .page>.masthead{position:fixed;inset:0 0 auto;height:48px;min-height:0;margin:0;padding:0 14px;border:0;border-bottom:1px solid var(--hud-line);background:var(--hud-glass);backdrop-filter:blur(12px);z-index:40;display:flex;align-items:center;gap:12px;color:var(--hud-ink);}
.game-hud .masthead>*{flex:none;min-width:0;}
.game-hud .brand{color:var(--hud-ink);gap:0;}.game-hud .brand h1{font-size:14px;white-space:nowrap;}.game-hud .brand small,.game-hud .brand-icon{display:none;}
.game-hud .journey-menu>summary{display:flex;align-items:center;gap:5px;padding:0;min-width:0;height:36px;background:none;border:0;border-radius:0;color:var(--hud-ink);}
.game-hud .journey-menu>summary>span:nth-child(2){display:flex;align-items:center;gap:8px;}
.game-hud .journey-menu strong{font-size:11px;color:var(--hud-ink);}.game-hud .journey-menu small{font-size:10px;color:#c9d6ba;margin:0;}.game-hud .journey-number{font-size:17px;}
.game-hud .system-menu{position:relative;font-size:11px;margin:0;}
.game-hud .system-menu>summary{list-style:none;cursor:pointer;white-space:nowrap;padding:8px 0;background:none;border:0;border-radius:0;}
.game-hud .system-menu .header-tools{position:absolute;right:0;top:38px;width:180px;display:grid;gap:6px;padding:12px;border-radius:12px;background:#f6f7eefa;border:1px solid #b9c9ac;box-shadow:0 12px 30px #163d3c44;color:#426a59;}
.game-hud .header-tools button{width:100%;font-size:12px;min-height:36px;}.game-hud [data-save]{font-size:10px;text-align:center;}
.game-hud .masthead>.resource-bar{position:static;flex:1;display:flex;align-items:center;gap:14px;padding:0 12px;min-width:60px;min-height:0;height:30px;margin:0;background:none;border:0;border-left:1px solid var(--hud-line);border-right:1px solid var(--hud-line);border-radius:0;overflow-x:auto;scrollbar-width:none;}
.game-hud .resource{min-width:0;gap:4px;flex:none;color:#f3f5df;}.game-hud .resource>div{display:flex;align-items:baseline;gap:4px;white-space:nowrap;}.game-hud .resource b{font-size:13px;color:#f3f5df;}.game-hud .resource small{font-size:10px;color:#c1d1b7;margin:0;}.game-hud .resource-symbol{font-size:16px;color:#d1bc87;}
.game-hud .masthead>.world-top{position:static;display:flex;align-items:center;gap:8px;pointer-events:auto;}
.game-hud .map-label{font-size:11px;white-space:nowrap;}.game-hud .map-label small{display:none;}.game-hud .health{font-size:10px;padding:0;background:none;white-space:nowrap;}
.game-hud .masthead>.world-controls{position:static;display:flex;gap:4px;}.game-hud .world-controls button{padding:6px;min-height:28px;font-size:10px;background:#ffffff14;color:var(--hud-ink);border:0;}
.game-hud [data-camera-controls] .visual-toolbar{pointer-events:auto;position:relative;inset:auto;display:block;padding:0;background:none;border:0;box-shadow:none;}
.game-hud .visual-toolbar>summary{padding:8px 0;min-height:0;background:none;box-shadow:none;color:var(--hud-ink);font-size:11px;white-space:nowrap;}
.game-hud .visual-toolbar>.camera-actions{position:absolute;right:0;top:32px;width:260px;margin:0;padding:8px;background:#f6f7eefa;border:1px solid #b9c9ac;border-radius:10px;box-shadow:0 12px 30px #163d3c44;}
.game-hud .map-travel{top:auto;bottom:22px;left:18px;right:auto;transform:none;z-index:20;}
.game-hud .sea-map-weather{top:62px;left:18px;right:auto;}
.game-hud .island-panel>.needs-bar{position:absolute;bottom:68px;left:18px;right:auto;width:300px;max-width:calc(100% - 36px);padding:7px 10px;min-height:0;display:flex;flex-wrap:wrap;gap:7px;background:var(--hud-glass);color:var(--hud-ink);border:1px solid var(--hud-line);border-radius:8px;z-index:12;}
.game-hud .needs-bar>*{flex:1;min-width:90px;}.game-hud .needs-bar button{color:var(--hud-ink);}
.game-hud .world .map-guide{left:18px;right:auto;bottom:122px;width:300px;max-width:calc(100% - 36px);padding:10px 12px;background:#f5f7e9e8;border-radius:10px;box-shadow:0 5px 18px #163f4033;}
.game-hud .map-guide .guide-task h3{font-size:12px;}.game-hud .map-guide .guide-task .primary{min-height:34px;padding:7px 10px;font-size:11px;}
.game-hud .map-guide.chapter-ready .guide-task{padding-right:0;}.game-hud .map-guide .chapter-next{position:static;margin-top:6px;}
/* The original category buttons are the dock: there is only one navigation state. */
.game-hud .game-layout>.panel-tabs{position:fixed;bottom:18px;right:18px;left:auto;top:auto;z-index:35;display:flex;gap:6px;width:max-content;max-width:calc(100% - 360px);overflow:auto;padding:7px;margin:0;border:1px solid #cfcca375;border-radius:14px;background:var(--hud-glass);box-shadow:0 5px 22px #133b3e55;backdrop-filter:blur(14px);}
.game-hud .panel-tabs [data-tab]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:62px;min-height:58px;padding:6px 9px;border:1px solid #b1c4ac45;border-radius:9px;background:#31594b;color:#ebefda;box-shadow:none;font-size:11px;line-height:1.2;}
.game-hud .panel-tabs [data-tab]::before{font-size:23px;line-height:1;color:#ddc58c;content:'◇';}
.game-hud .panel-tabs [data-tab="life"]::before{content:'♧';}.game-hud .panel-tabs [data-tab="build"]::before{content:'⌂';}.game-hud .panel-tabs [data-tab="partners"]::before{content:'♙';}.game-hud .panel-tabs [data-tab="defense"]::before{content:'♜';}.game-hud .panel-tabs [data-tab="trade"]::before{content:'⚖';}.game-hud .panel-tabs [data-tab="voyages"]::before{content:'⛵';}
.game-hud .panel-tabs [data-tab].hud-active{background:#637954;color:#fffbe1;border-color:#e7cd88;box-shadow:inset 0 0 0 1px #dcc18c55;}
.game-hud .panel-tabs [data-tab]:hover{background:#4a7159;}.game-hud button:focus-visible,.game-hud summary:focus-visible{outline:2px solid #e6c87f;outline-offset:3px;}
.game-hud .control-panel{position:fixed;top:60px;bottom:106px;right:18px;left:auto;width:min(420px,calc(100vw - 36px));max-height:none;min-height:0;padding:12px 16px 16px;overflow:auto;border:1px solid #c7d1b2;border-radius:14px;background:#fbfcf2;box-shadow:0 15px 44px #183e3e55;z-index:30;transform:none;opacity:1;transition:none;overscroll-behavior:contain;}
.game-hud .panel-dock{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:700;position:sticky;top:-12px;margin:-12px -16px 12px;padding:10px 16px;z-index:8;background:#315847;color:#f5f0d6;border-bottom:1px solid #b7b991;}
.game-hud .panel-dock button{width:30px;height:30px;padding:0;color:#f6ebca;background:#ffffff12;border:1px solid #f2ead047;font-size:24px;line-height:1;}
.game-hud .encounter-dock{position:absolute;top:64px;left:18px;max-width:300px;z-index:21;background:#f6ecccfa;border:1px solid #d4bd86;border-radius:9px;box-shadow:0 5px 15px #163b3b22;}
.game-hud .encounter-dock:has([data-encounter][hidden]){display:none;}
.game-hud .encounter-dock>summary{cursor:pointer;padding:10px 12px;font-size:11px;color:#6b643d;}.game-hud .encounter-dock summary span{display:block;margin-top:4px;color:#315947;font-weight:700;}
.game-hud .encounter-dock .encounter{position:static;width:auto;max-height:240px;margin:0;padding:12px;border:0;overflow:auto;box-shadow:none;}
@media(max-width:800px){
 .game-hud .page>.masthead{height:44px;padding:0 8px;gap:7px;}.game-hud .brand{display:none;}
 .game-hud .journey-menu strong,.game-hud .journey-menu small,.game-hud .world-top{display:none;}.game-hud .masthead>.world-top{display:none;}
 .game-hud .journey-menu>summary{gap:2px;}.game-hud .journey-number{display:inline;}.game-hud .masthead>.resource-bar{gap:10px;padding:0 6px;}.game-hud .resource small{font-size:9px;}
 .game-hud .game-layout>.panel-tabs{bottom:10px;left:10px;right:10px;max-width:none;width:auto;justify-content:center;gap:4px;padding:5px;}
 .game-hud .panel-tabs [data-tab]{min-width:45px;min-height:49px;flex:1;padding:4px;font-size:10px;}.game-hud .panel-tabs [data-tab]::before{font-size:20px;}
 .game-hud .control-panel{top:54px;bottom:82px;left:10px;right:10px;width:auto;max-height:none;}
 .game-hud .world .map-guide{bottom:138px;left:10px;width:270px;}.game-hud .island-panel>.needs-bar{bottom:80px;left:10px;width:270px;}
 .game-hud .map-travel{top:54px;bottom:auto;left:12px;font-size:10px;}.game-hud .sea-map-weather{display:none;}.game-hud .encounter-dock{top:96px;left:12px;max-width:250px;}
}
@media(max-height:600px) and (min-width:801px){.game-hud .control-panel{top:56px;bottom:99px;}.game-hud .world .map-guide{bottom:117px;}.game-hud .encounter-dock{top:60px;}}

@media(min-width:801px) and (max-width:1350px){.game-hud .journey-menu small,.game-hud .map-label{display:none;}.game-hud .page>.masthead{gap:9px;}}
.slime-work,.tide-challenge{margin-top:18px;padding-top:14px;border-top:1px solid #d6dfcb;}
.slime-work p,.tide-challenge p{font-size:12px;line-height:1.7;}
.slime-work small,.tide-challenge small{display:block;font-size:11px;line-height:1.7;color:#68806c;}
.slime-work>div{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0;}
.tide-challenge>button{display:block;width:100%;margin:8px 0;}
.tide-challenge article{padding:10px 0;border-bottom:1px solid #e1e6d7;}.tide-challenge article button{margin-top:6px;}
/* Building identity first; one selected detail owns costs, locations and links. */
.facility-catalog{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:14px 0 10px;}
.facility-choice,.facility-moves button{display:flex;align-items:center;text-align:left;gap:8px;padding:9px 7px;border:1px solid #dce3d0;border-radius:10px;background:#f9faf2;box-shadow:none;color:#345b4c;min-width:0;}
.facility-choice.selected{background:#e8efda;border-color:#739a77;box-shadow:inset 0 0 0 1px #739a7722;}
.facility-icon{width:42px;height:42px;flex:none;}
.facility-choice span,.facility-moves span{min-width:0;}.facility-choice b,.facility-moves b{display:block;font-size:12px;line-height:1.5;font-weight:650;}
.facility-choice small,.facility-moves small{display:block;font-size:10px;line-height:1.65;color:#78866c;}
.facility-choice .facility-route-tag{color:#4a7a65;font-size:10px;}
.facility-detail{padding:14px;background:#fffef6;border:1px solid #ccdabc;border-radius:12px;margin-bottom:16px;}
.facility-detail header{display:flex;align-items:center;gap:10px;}.facility-detail header .facility-icon{width:52px;height:52px;}
.facility-detail h4{font-size:15px;margin:0 0 3px;}.facility-detail header p{margin:0;font-size:11px;line-height:1.6;color:#758168;}
.facility-flow{font-size:11px;line-height:1.6;color:#56765e;padding:8px 0;border-bottom:1px solid #e2e8d8;}
.facility-cost{display:flex;gap:6px 12px;flex-wrap:wrap;font-size:11px;color:#5d795e;margin:10px 0;}.facility-cost .missing{color:#b05438;}.facility-cost em{font-size:10px;font-style:normal;}
.facility-places{display:grid;grid-template-columns:1fr 1fr;gap:8px;}.facility-places button{font-size:11px;width:100%;min-height:36px;line-height:1.5;padding:7px 5px;background:#39745b;color:#fff;border-radius:7px;box-shadow:none;}.facility-places button:disabled{background:#ebeedf;color:#8a987f;opacity:1;}
.facility-places small,.facility-detail>small{display:block;font-size:10px;color:#99704f;line-height:1.5;margin-top:4px;}
.facility-transport{border-top:1px solid #e0e6d5;padding-top:10px;margin-top:12px;font-size:11px;color:#4a735c;}.facility-transport p{font-size:11px;line-height:1.8;margin:8px 0;}.facility-transport button{font-size:11px;padding:7px 10px;}
[data-move-catalog],[data-yard-routes]{margin:16px 0;font-size:12px;}[data-move-catalog]>summary,[data-yard-routes]>summary{padding:7px 0;cursor:pointer;font-weight:600;}
.facility-moves{display:grid;gap:6px;margin:10px 0;}.facility-moves button{padding:6px 10px;}.facility-moves .facility-icon{width:34px;height:34px;}
.yard-project header b{display:flex;align-items:center;gap:6px;font-size:12px;}.yard-project .facility-icon{width:30px;height:30px;}
@media(max-width:400px){.facility-choice{gap:5px;padding:8px 5px;}.facility-choice .facility-icon{width:33px;height:33px;}.facility-choice b{font-size:11px;}.facility-choice small{font-size:9px;}.facility-places{grid-template-columns:1fr;}}
/* The entire dock tile is a hit target, including its transparent rounded corners.
   Keep it still on press so a release near the edge cannot miss the original tile. */
.game-hud .panel-tabs [data-tab]{transform:none;touch-action:manipulation;}
.game-hud .panel-tabs [data-tab]::after{content:'';position:absolute;inset:0;}
/* The header holds a small watch list; recipe navigation lives in one focused window. */
.game-hud button.resource{display:flex;background:transparent;padding:2px 0;border:0;box-shadow:none;transform:none;min-height:26px;}
.game-hud .materials-launch{flex:none;background:#ffffff13;border:1px solid #c4d1b75c;color:#f3f5df;font-size:12px;padding:3px 8px;white-space:nowrap;}
.materials-dialog{width:min(860px,calc(100vw - 32px));max-width:860px;height:min(720px,calc(100dvh - 52px));max-height:none;padding:0;border:1px solid #9aac8e;border-radius:18px;background:#fafbf1;color:#28594d;overflow:hidden;box-shadow:0 20px 80px #102f3370;}
.materials-dialog[open]{display:flex;flex-direction:column;}
.materials-dialog::backdrop{background:#0e303c70;}
.materials-heading{display:flex;align-items:center;justify-content:space-between;background:#2c5649;color:#f5f5dd;padding:18px 24px;flex:none;}
.materials-heading h2{font-size:22px;margin:0 0 3px;}.materials-heading small{color:#cbd6be;font-size:12px;}.materials-heading button{background:#ffffff12;border:1px solid #d0d9bf66;color:#f5f5dd;font-size:25px;padding:2px 12px;box-shadow:none;}
.materials-body{display:grid;grid-template-columns:210px minmax(0,1fr);flex:1;min-height:0;}
.materials-library{padding:20px 12px;background:#edf1e4;border-right:1px solid #d9e1cc;display:flex;flex-direction:column;min-height:0;}
.material-search{font-size:12px;display:grid;gap:7px;padding:0 6px;}.material-search input{width:100%;box-sizing:border-box;background:#fffef8;border:1px solid #cad5bd;border-radius:8px;padding:10px;color:#28594d;font:inherit;font-size:14px;}
.material-filters{display:flex;gap:3px;margin:14px 0 10px;}.material-filters button{flex:1;padding:7px 2px;box-shadow:none;font-size:12px;}.material-filters [aria-pressed=true]{background:#2f6955;color:#fffde9;}
[data-material-list]{overflow-y:auto;min-height:0;display:flex;flex-direction:column;gap:4px;}
[data-material-list]>button{display:flex;text-align:left;align-items:center;gap:9px;background:transparent;padding:10px 8px;border:1px solid transparent;box-shadow:none;flex-shrink:0;font-size:14px;}
[data-material-list]>button[aria-current=true]{background:#fffef7;border-color:#c3d0b4;}[data-material-list] small{display:block;font-size:10px;color:#7d8c71;margin-top:3px;}[data-material-list] b{margin-left:auto;font-size:13px;}.material-symbol{color:#a88848;font-size:22px;width:24px;text-align:center;}
.material-detail{padding:20px 26px 30px;overflow-y:auto;outline:none;}.material-history{display:flex;align-items:center;gap:12px;min-width:0;}.material-history button{padding:5px 9px;box-shadow:none;flex:none;}.material-history span{font-size:11px;color:#829075;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.material-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px;}.material-title h3{font-size:28px;margin:5px 0 16px;}.material-title h3 span{color:#a68b51;}.material-title small{color:#809171;font-size:11px;}.material-title button{font-size:11px;padding:7px 10px;box-shadow:none;flex:none;}.material-pin-note{font-size:11px;color:#7b886b;margin:0 0 12px;}
.material-stock{background:#eaf0dc;border-radius:10px;padding:14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;}.material-stock b{font-size:24px;}.material-stock small{font-size:11px;font-weight:400;}.material-stock span{font-size:11px;color:#6d8261;}.material-detail h4{margin:24px 0 12px;font-size:14px;}.material-detail p{font-size:12px;line-height:1.7;}
.material-recipe{border:1px solid #d6dfc8;background:#fffef9;padding:14px;border-radius:12px;margin-bottom:10px;}.material-recipe header{display:flex;justify-content:space-between;gap:10px;}.material-recipe header b{font-size:13px;}.material-recipe small{font-size:11px;color:#859277;}.material-equation{display:flex;align-items:center;gap:9px;margin:14px 0;flex-wrap:wrap;}.material-equation>div{display:flex;align-items:center;flex-wrap:wrap;gap:6px;}.material-equation button,.material-uses button{box-shadow:none;padding:8px 10px;font-size:12px;background:#eaf0df;}.material-equation strong{font-size:13px;}.material-equation>span{color:#a98d4d;}.material-equation button span,.material-uses button span{color:#91a47b;}.material-recipe p{color:#7b896e;margin:5px 0;}
.material-related{background:transparent;box-shadow:none;text-decoration:underline;text-underline-offset:3px;padding:6px 0;font-size:11px;display:block;}.material-uses{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:#78866a;}.material-operations{margin-top:24px;border-top:1px solid #d8e1c9;padding-top:16px;}.material-operations summary{font-size:13px;cursor:pointer;}.material-operations summary small{font-size:11px;display:block;margin:5px 0 0 14px;color:#809274;}.material-operations button{font-size:12px;padding:9px;box-shadow:none;margin-right:5px;}.material-operations>small{display:block;margin-top:6px;}
.materials-dialog>footer{padding:12px 24px;border-top:1px solid #dce3ce;color:#809171;font-size:11px;flex:none;}
.material-tooltip{position:fixed;z-index:120;max-width:min(350px,calc(100vw - 32px));padding:12px 15px;border-radius:10px;background:#183f36;color:#f6f3d9;box-shadow:0 5px 22px #122f3850;white-space:pre-line;font-size:12px;line-height:1.7;pointer-events:none;}
.materials-dialog button:hover{transform:none;}.materials-dialog button:focus-visible,.game-hud button.resource:focus-visible{outline:2px solid #b99b54;outline-offset:2px;}
@media(max-width:600px){.materials-dialog{width:calc(100vw - 16px);height:calc(100dvh - 24px);}.materials-heading{padding:12px 16px;}.materials-body{grid-template-columns:128px minmax(0,1fr);}.materials-library{padding:12px 4px;}.material-detail{padding:12px;}.material-symbol{display:none;}[data-material-list]>button{font-size:12px;padding:10px 5px;gap:3px;}[data-material-list] b{font-size:11px;}.material-title{display:block;margin-top:14px;}.material-title h3{font-size:23px;margin-bottom:8px;}.material-title button{margin-bottom:10px;}.material-history span{display:none;}.material-recipe{padding:10px;}.material-recipe header{flex-wrap:wrap;}.materials-dialog>footer{padding:10px;font-size:10px;}}
.material-recipe-picker{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:#7e8f6f;font-size:12px;}.material-recipe-picker select{max-width:70%;padding:8px;border:1px solid #ced9be;border-radius:8px;color:#28594d;background:#fffef8;font:inherit;}
.game-hud .materials-launch{order:-1;position:sticky;left:0;z-index:2;background:#2b5145;}
.material-filters button{white-space:nowrap;min-width:0;}
@media(max-width:600px){.material-filters button{font-size:11px;padding:7px 1px;}}
/* A business workspace joins the actions of one production chain. */
.business-sections{display:flex;gap:6px;margin:0 0 18px;background:#e7eddb;padding:4px;border-radius:10px;}.business-sections button{flex:1;padding:10px;box-shadow:none;}.business-sections [aria-pressed=true]{background:#356d58;color:#fffde9;}.business-intro{font-size:12px;color:#829173;line-height:1.7;}
.business-machines{display:flex;gap:7px;overflow-x:auto;padding:2px 0 12px;}.business-machines button{display:flex;gap:7px;align-items:center;flex:0 0 155px;padding:10px;box-shadow:none;border:1px solid #d3dec5;background:#fbfcf4;text-align:left;}.business-machines .facility-icon{width:30px;height:30px;flex:none;}.business-machines button>span{font-size:12px;}.business-machines small{display:block;font-size:10px;color:#839474;margin-top:5px;}.business-machines [aria-pressed=true]{border-color:#609877;background:#e7efd9;}
.business-input{border-top:1px solid #dce4ce;margin:0;padding:10px 0;}.business-input summary{display:flex;justify-content:space-between;gap:10px;font-size:12px;cursor:pointer;}.business-input summary>span:last-child{color:#55846b;font-size:11px;}.business-input small{font-size:10px;color:#839474;}.business-input form{display:grid;gap:10px;padding:12px 0 3px;}.business-input label{display:grid;gap:6px;font-size:11px;}.business-input input,.business-input select{width:100%;box-sizing:border-box;padding:9px;background:#fffef8;color:#2c5f4e;border:1px solid #cedbc0;border-radius:7px;}.business-delivery-numbers{display:flex;gap:10px;}.business-delivery-numbers label{flex:1;min-width:0;}.business-route-status{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;}.business-route-status button{padding:5px 9px;font-size:11px;box-shadow:none;}.business-output{display:flex;justify-content:space-between;align-items:center;margin:12px 0;padding:12px;background:#edf2e2;border-radius:8px;font-size:12px;}.business-output small{font-size:10px;}
.business-staff{margin:18px 0;border-top:1px solid #dce4ce;padding-top:12px;}.business-staff h4{display:flex;justify-content:space-between;}.business-staff h4 small{font-size:11px;font-weight:400;}.business-staff>small{display:block;font-size:11px;line-height:1.7;margin-top:10px;}.business-crew-row{display:flex;justify-content:space-between;align-items:center;margin:8px 0;font-size:12px;}.business-crew-row>div{display:flex;align-items:center;gap:12px;}.business-crew-row button{padding:6px 11px;box-shadow:none;}.business-crew-row b{font-size:13px;}.business-blocked{color:#ad7948;}.business-staff details{margin-top:12px;}.business-staff summary{font-size:12px;cursor:pointer;}.business-sell{width:100%;}.game-hud [data-trade-advanced]{padding:12px 0;border-top:1px solid #d5dec7;}.game-hud [data-trade-advanced] summary{font-size:12px;cursor:pointer;margin-bottom:10px;}.game-hud [data-more-customers],.game-hud [data-more-countries]{margin-top:18px;border-top:1px solid #d5dec7;padding-top:12px;}.game-hud [data-more-customers] summary,.game-hud [data-more-countries] summary{font-size:13px;cursor:pointer;}
.game-hud [data-industry-panel] .industry-heading{margin:0;align-items:center;}.game-hud [data-industry-panel] .industry-heading h3{margin:0;font-size:17px;}.game-hud [data-industry-panel] .business-intro{margin:8px 0 12px;}.business-machines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:146px;overflow-y:auto;overflow-x:hidden;}.business-machines button{min-width:0;padding:8px;}.business-machines button>span{min-width:0;}.business-machines small{line-height:1.4;}.game-hud [data-industry-panel] .machine-card{margin-top:2px;}.game-hud [data-industry-panel] .machine-card h4{font-size:13px;margin:16px 0 10px;}

/* Action windows use a single dark palette. Surfaces and their text change
   together; overlays outside this panel retain their own light theme. */
.game-hud .control-panel{
  --panel-ink:#f3f5e9;
  --panel-soft:#d6e2d0;
  --panel-muted:#b1c2af;
  --panel-line:#64806d;
  --panel-card:#304e43;
  --panel-button:#3e6352;
  --panel-warning:#ffc19d;
  --line:var(--panel-line);
  color:var(--panel-ink);
  background:#203e35f7;
  border-color:var(--panel-line);
  box-shadow:0 18px 50px #102c2b66;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  color-scheme:dark;
}
.game-hud .control-panel :is(h2,h3,h4,b,strong,p,span,label,em,li,td,summary){color:inherit;}
.game-hud .control-panel :is(small,.quiet,.eyebrow,.panel-intro,.production-summary,.business-intro,.staffing-hint,.yard-note,.machine-state,.trade-status,.provision-status,.region-stock,.region-status,.production-intro,.pool-level,.pool-hint,.breed-quantity,.tower-slot-cost,.defense-summary,.perimeter-summary,.cost-list,.cost-item,.facility-cost,.facility-flow,.facility-transport,.facility-heading,.defense-subheading,.work-group-empty,.nursery-empty,.crew-empty){color:var(--panel-soft);}
.game-hud .control-panel :is(.cost-shortage,.cost-item.missing,.facility-cost .missing,.business-blocked,.pool-hint.is-blocked,.region-status.is-blocked,.provision-reason,.crab-health.critical,.tower-requirement){color:var(--panel-warning);}
.game-hud .control-panel .trade-shortage{color:var(--panel-warning)!important;}

/* Containers: include the completed facilities and expanded worker rows,
   which used to retain paper backgrounds underneath inherited light text. */
.game-hud .control-panel :is(article,.trade-advice,.voyage-preparation,.voyage-cargo,.voyage-destination,.freight-warehouse,.chart-offer,.sea-weather,.snail-care,.regional-industry,.fleet-summary,.regional-network,.customer-market,.customer-card,.national-market,.country-card,.project-progress,.relay-complete,.far-world-card,.build-card,.perimeter-card,.tower-card,.tower-inspector,.wall-inspector,.robot-panel,.line-card,.system-check,.facility-detail,.work-orders,.guide-sheet,.business-output,.provisions-panel,.growth-panel,.workforce-list,.pool-card,.notice,.camp-complete,.camp-defense-link,.completed-facility,.worker-row,.crew-empty,.machine-card,.trade-offer,.shipment-card,.industry-upgrade,.goal-stop,.tower-slot){
  background:var(--panel-card);
  color:var(--panel-ink);
  border-color:var(--panel-line);
  box-shadow:none;
}
.game-hud .control-panel :is(.facility-detail p,.completed-facility p,.build-card p,.pool-heading p){color:var(--panel-soft);}
.game-hud .control-panel :is(.business-sections,.breed-quantity>div){background:#203c32;border:1px solid var(--panel-line);}
.game-hud .control-panel :is(.slime-work,.tide-challenge,.business-input,.business-staff,.facility-transport,.facility-flow,.pool-metrics,.pool-metrics>div,.pool-expansion,.work-group,.completed-buildings,.completed-facility,.manual-controls,.yard-project,.yard-route,.yard-inventory,.machine-settings,.trade-upgrades,.trade-history,.meal-options article,.ration-pack,.goal-plan,[data-logistics-panel],[data-trade-advanced],[data-more-customers],[data-more-countries]){border-color:var(--panel-line);}
.game-hud .control-panel .crab-loss-notice{background:#554331;color:#ffdbb9;}
.game-hud .control-panel :is(.partner-portrait,.buyer-seal){background:#43624f;color:var(--panel-ink);}
.game-hud .control-panel .meal-buffs span{background:#426249;color:var(--panel-ink);}
.game-hud .control-panel .nursery-progress{background:#1c382e;}
.game-hud .control-panel .nursery-progress i{background:#a9d19b;}
.game-hud .control-panel .pool-metrics>div:nth-child(2) b{color:#f2d292;}
.game-hud .control-panel .pool-metrics>div:last-child b{color:var(--panel-soft);}
.game-hud .control-panel .tower-number{color:#c4dfb5;}

/* One control palette also covers nested button labels, cost labels and
   segmented quantity selectors. Disabled controls stay legible. */
.game-hud .control-panel button{
  color:var(--panel-ink);
  background:var(--panel-button);
  border-color:#829a7f;
  box-shadow:none;
}
.game-hud .control-panel button:hover:not(:disabled){background:#42654f;}
.game-hud .control-panel button:is(.primary,.tower-build-action):not(:disabled),
.game-hud .control-panel .facility-places button:not(:disabled){background:#316e52;color:#fffde9;border-color:#96b587;}
.game-hud .control-panel button:disabled{
  color:var(--panel-muted);
  background:#294438;
  border-color:#607763;
  opacity:1;
  box-shadow:none;
}
.game-hud .control-panel button:disabled .button-title{color:inherit;}
.game-hud .control-panel :is(.facility-choice,.facility-moves button,.business-machines button,.site-list button){background:var(--panel-card);color:var(--panel-ink);border-color:var(--panel-line);}
.game-hud .control-panel :is(.facility-choice.selected,.business-machines [aria-pressed="true"],.business-sections [aria-pressed="true"],.breed-quantity [aria-pressed="true"],.site-list .selected,.goal-stop.selected,.wall-grid .active,.customer-card.is-selected,.country-card.is-selected,.trade-offer:has(input:checked),.chart-island.selected,.sea-weather [aria-pressed="true"]){background:#4a6646;color:#fff7d6;border-color:#d6c88a;box-shadow:inset 0 0 0 1px #d6c88a;}
.game-hud .control-panel .tower-slot.is-selected{background:#3d5944;border-color:#d6c88a;}
.game-hud .control-panel .tower-slot-heading{background:transparent;color:var(--panel-ink);border:0;padding:3px 0;}
.game-hud .control-panel .tower-slot-heading:hover{background:#ffffff0d;}
.game-hud .control-panel .wall-grid button{background:var(--panel-card);color:var(--panel-ink);border-color:var(--panel-line);}
.game-hud .control-panel button.critical{background:#664934;color:#ffe2c0;border-color:#d6a775;}
.game-hud .control-panel .crew-link{background:transparent;color:#d0e7bf;border-color:var(--panel-line);}
.game-hud .control-panel .crew-link:hover{background:#3e6352;}
.game-hud .control-panel .facility-location{color:#d0e7bf!important;text-decoration-color:#b7ceac;}
.game-hud .control-panel .facility-location:hover{color:#fff7d6!important;}
.game-hud .control-panel [data-locate-field]{background:transparent;color:#d0e7bf;}
.game-hud .control-panel :is(input,select){background:#20382f;color:var(--panel-ink);border-color:#829a7f;}
.game-hud .control-panel input::placeholder{color:var(--panel-muted);}
.game-hud .control-panel .work-group[data-supply="shortage"] .job-members summary,
.game-hud .control-panel .work-group[data-supply="unassigned"] .work-group-empty{color:var(--panel-warning);}

.game-hud .control-panel .business-input summary>span:last-child{color:var(--panel-soft);}
.game-hud .control-panel .archipelago-chart{background:#244b44;border-color:var(--panel-line);}
.game-hud .control-panel .tower-slot b{font-size:13px;}
.game-hud .control-panel .tower-slot small{font-size:11px;}
.game-hud .control-panel .tower-slot-actions button{font-size:12px;}
