/* Shared interface colors; resource and colony colors retain their gameplay meaning. */
:root{--bg:#140d0a;--surface:#2a1b15;--accent:#f4a275;--text:#fff0df;--muted:#c5ad9d;--mint:var(--accent);--panel:#2a1b15ee;--line:color-mix(in srgb,var(--accent) 20%,transparent)}
body{background:var(--bg);color:var(--text)}
body .vignette,body.orbit-mode .vignette{background:linear-gradient(90deg,color-mix(in srgb,var(--bg) 75%,transparent),transparent 40%,transparent 64%,color-mix(in srgb,var(--bg) 55%,transparent)),linear-gradient(0deg,var(--bg),transparent 35%,transparent 70%,color-mix(in srgb,var(--bg) 70%,transparent))}
#loading{background:var(--bg)}
body :is(.modal,.treaty-card,.construction-console,.construction-controls,.construction-menu,.construction-rail,#walkthrough,.mission-card,.colony-card,.destination-card,.orbit-alerts,#orbit-freight,#operations-open,.rail-live,#toast,.map-marker,.facility-label,.mission-stats,.mission-tip,.surface-activity){background:linear-gradient(145deg,color-mix(in srgb,var(--surface) 96%,transparent),color-mix(in srgb,var(--bg) 95%,transparent));border-color:var(--line);color:var(--text)}
body :is(.colony-card.selected,.destination-card.selected,.destination-card[aria-checked="true"]){background:linear-gradient(130deg,color-mix(in srgb,var(--accent) 15%,var(--surface)),var(--bg))}
body :is(.primary,.land-button,.tutorial-actions button,#theme-done){background:var(--accent);color:var(--bg)}
body :is(.primary:hover,.land-button:hover){background:color-mix(in srgb,var(--accent) 85%,white)}
body :is(.secondary,.production-btn,.module-option,.plot-picker,.small-action,.build-tabs button,.construction-tabs button,.response-options button,.relief-depots button,.modal-box,#orbit-home #orbit-tools button,.construction-camera button){background:color-mix(in srgb,var(--surface) 85%,transparent);color:var(--text);border-color:var(--line)}
body :is(.build-tabs button.active,.construction-tabs button.active,.module-option.selected,.select-grid button.active){background:color-mix(in srgb,var(--accent) 18%,var(--surface));color:var(--accent);border-color:var(--accent)}
body :is(.orbit-hero h1,.orbit-hero h1 em,.orbit-kicker,.orbit-treaty strong,.orbit-alerts b,.orbit-alerts>span,.walkthrough-top,#walkthrough h2,.tutorial-delivery b){color:var(--accent)}
body :is(.orbit-hero>p,.orbit-secondary button,.planet-prompt,.destinations-heading,.orbit-treaty small,.orbit-alerts small,#walkthrough p,.tutorial-actions small,.tutorial-delivery small,.modal p,.modal-note,.construction-hint,.construction-footer,.production-status){color:var(--muted)}
body :is(.route-progress i,.tutorial-dots i.done){background:var(--accent)}
body .tutorial-target{outline-color:var(--accent)!important;box-shadow:0 0 20px color-mix(in srgb,var(--accent) 30%,transparent)!important}
body.in-tutorial .modal :is(#simulate,#sign){outline-color:var(--accent)}
body .topbar{border-color:var(--line)}
#theme-toggle{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 10px;border:1px solid var(--line);border-radius:22px;font-size:10px;color:var(--text);background:var(--surface);white-space:nowrap}
.palette-icon{font-size:23px;line-height:1;color:var(--accent)}
body :is(.build-dock,.dock-tabs,.rail-live,.settlement-switch,.mission-bottom){background:color-mix(in srgb,var(--surface) 95%,transparent);border-color:var(--line)}
body :is(.dock-tabs button,.dock-copy,.dock-footer,.surface-activity,.cost-line,.output-strip){color:var(--muted)}
body .dock-tabs button.active{background:color-mix(in srgb,var(--accent) 15%,var(--surface));color:var(--accent)}
#theme-picker{position:fixed;inset:90px 20px auto auto;margin:0;width:370px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 110px);padding:21px;border:1px solid color-mix(in srgb,var(--accent) 45%,transparent);border-radius:18px;background:var(--bg);color:var(--text);box-shadow:0 20px 90px #0009;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--accent) var(--surface)}
#theme-picker::backdrop{background:#0003}
#theme-picker header{display:flex;align-items:start;justify-content:space-between;gap:10px}
#theme-picker header small{font-size:8px;letter-spacing:2px;color:var(--accent)}
#theme-picker h2{font:500 29px/1.1 'Barlow Condensed',sans-serif;margin:7px 0 0}
#theme-close{flex-shrink:0;width:44px;height:44px;font-size:24px;border:1px solid var(--line);border-radius:50%}
.theme-intro{font-size:11px;line-height:1.5;color:var(--muted);margin:9px 0 17px}
.theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.theme-option{text-align:left;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);min-height:86px}
.theme-option[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.theme-swatches{display:flex;overflow:hidden;height:23px;border-radius:5px;border:1px solid #ffffff22;margin-bottom:9px}
.theme-swatches i{flex:1}.theme-name{display:flex;justify-content:space-between;font-size:11px;font-weight:600;gap:3px}.theme-name b{visibility:hidden;color:var(--accent)}.theme-option[aria-pressed="true"] b{visibility:visible}.theme-option small{display:block;margin-top:4px;font-size:8px;line-height:1.4;color:var(--muted)}
#theme-picker footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px}#theme-status{font-size:9px;line-height:1.5;color:var(--muted);max-width:150px}#theme-done{border-radius:7px;min-height:44px;padding:10px 12px;font-size:10px;font-weight:600}
@media(max-width:779px){#theme-toggle{padding:0 7px;gap:4px}.top-right{gap:5px}.top-right .demo{display:none}#theme-picker{inset:auto 12px max(12px,env(safe-area-inset-bottom)) 12px;width:auto;max-height:76dvh;padding:17px}.theme-option{min-height:80px}.theme-swatches{height:19px}body.orbit-mode .orbit-treaty{background:color-mix(in srgb,var(--bg) 85%,transparent)}}
@media(max-width:360px){#theme-toggle{padding:0 6px;font-size:9px}.top-right{gap:2px}}

body.constructing .resources{background:color-mix(in srgb,var(--bg) 85%,transparent)}
@media(max-width:779px){body .topbar nav{background:color-mix(in srgb,var(--bg) 85%,transparent)}}
