:root{--paper:#e5e5db;--muted:#99a5a8;--gold:#d2ab64;--panel:#242d32;--line:#414e52;--green:#a9c1ad}
body{background:#151c21;color:var(--paper);font-family:system-ui,-apple-system,sans-serif}header{background:#1c252b;border-bottom:1px solid #485153;padding:15px 24px}header h1{font-size:23px}.eyebrow,.micro{color:#92a1a5;letter-spacing:1.4px}h1 span{color:#dab97d}button{background:#2e3b40;border-color:#4c5a5f;border-radius:3px;color:#d9dfdf}button:hover{background:#415056}button:disabled{opacity:.42;cursor:not-allowed}button.active{background:#c7a46a;color:#202a2f;border-color:#edc887}.layout{max-width:1800px;grid-template-columns:minmax(0,1fr) 250px;gap:16px;padding:18px 24px}.board{border-radius:3px;border-color:#6c766a;box-shadow:0 8px 32px #0003}.card{background:#202a30;border:1px solid #3c494e;border-radius:4px;padding:14px}.combat-bar{background:#202b31;border-color:#485557;border-radius:4px}.combat-bar .micro{color:#9cafb4}.toolbar{gap:5px}.toolbar button{background:#29353c;border:1px solid #435158;border-radius:3px;min-width:74px;padding:8px;font-size:11px;flex:1}.toolbar button.active{background:#b99a64;color:#1b2529}.toolbar button>svg{width:24px;height:24px;float:left;margin:0 5px 0 0}.toolbar small{font-size:8px;line-height:1.4;white-space:normal;max-width:120px}.toolbar .locked{filter:grayscale(1)}.resource{background:#182228;border-color:#39484e}.inventory{gap:5px}.resource b{font-size:17px}.resource svg{width:23px;height:23px}.status{color:#d6bd8a;font-size:12px}.help{line-height:1.9}.progression-card h2{font-size:17px;line-height:1.3}.progression-card p{font-size:11px;line-height:1.7}.progression-card button{width:100%;font-size:10px;margin-top:8px}.power-status,.research-status{font:10px ui-monospace,monospace;line-height:1.6;padding:7px 0;border-top:1px solid #3c4c51;color:#a8c3cc}.world-card{padding:12px}.world-card canvas{border-color:#526166}.world-size{display:grid;grid-template-columns:1fr 1fr;gap:10px}.world-settings input{background:#172329;border-color:#53636a}.world-dialog,.backpack,.industry-dialog{background:#202b31;color:#e2e2d4;border-color:#667276}.pack-header,.pack-footer{background:#1b252a;border-color:#465458}.pack-header h2{color:#e4e6df}.pack-footer span:first-child{color:#cbb98d}.industry-dialog{width:min(1040px,96vw);max-height:94vh;padding:0;border:1px solid #59696f;border-radius:5px;box-shadow:0 25px 100px #0009}.industry-dialog::backdrop{background:#091016cf;backdrop-filter:blur(5px)}#industryBody{padding:24px}.research-intro{display:grid;grid-template-columns:240px 1fr;gap:24px;border-bottom:1px solid #425158;padding-bottom:18px;margin-bottom:20px}.research-intro b{font-size:20px;line-height:1.5;font-weight:500;color:#e3d1a4}.research-intro p{margin:0;color:#a7b9c0;line-height:1.8}.tech-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tech-card{background:#28363d;border:1px solid #49585e;border-radius:4px;padding:16px;display:flex;flex-direction:column}.tech-card h3{font-size:17px;margin:13px 0 8px;font-weight:600}.tech-card p{font-size:11px;min-height:50px;color:#b3c0c2}.tech-number{font:14px ui-monospace,monospace;color:#d6b77c;display:flex;align-items:center;justify-content:space-between}.tech-number span{font-size:8px;letter-spacing:.6px;color:#a2b6b9}.tech-card small{font-size:9px;line-height:1.6;color:#a1afb2;margin:8px 0 12px}.tech-card button{font-size:11px;margin-top:auto}.tech-card.current{border-color:#d7b776;box-shadow:inset 0 3px #d7b776}.tech-card.complete{border-color:#6f9987}.tech-card.locked{background:#202b31}.tech-cost{display:flex;align-items:center;gap:7px;font:12px ui-monospace,monospace;margin:10px 0}.tech-cost svg{width:24px;height:24px}.tech-card progress{height:4px}.launch-goal{padding:18px 0 0;margin-top:20px;border-top:1px solid #425158}.launch-goal strong{font-size:14px;color:#d9c38f}.launch-goal p{font-size:11px;color:#a7b9c0}#industryMessage{margin:0;padding:0 24px 20px;font-size:12px;color:#d9c28e}.machine-layout{display:grid;grid-template-columns:220px 1fr;gap:28px}.machine-overview{border-right:1px solid #425158;padding-right:24px}.machine-overview>svg{width:100px;height:100px;display:block;margin:auto}.machine-overview h3{font-size:20px}.machine-overview p{font-size:11px;color:#afc0c5}.machine-overview button{display:block;width:100%;margin-top:10px;font-size:10px}.machine-recipes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.machine-recipes button{text-align:left;padding:12px;display:grid;grid-template-columns:32px 1fr;gap:4px 10px}.machine-recipes svg{width:32px;height:32px;grid-row:1/4}.machine-recipes b{font-size:12px}.machine-recipes span,.machine-recipes small{font-size:9px;line-height:1.5;color:#b9c5c6}.machine-recipes .selected{border-color:#d6b67c;background:#4b493c}.machine-stocks{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.machine-stocks section{background:#17232a;padding:12px;border-radius:3px}.machine-stocks h4{margin:0 0 10px;font-size:11px;color:#91a9b2}.machine-stocks span{display:flex;align-items:center;gap:7px;font-size:11px;padding:3px}.machine-stocks svg{width:24px;height:24px}.machine-detail .muted{font-size:10px;color:#92a6ae}.machine-empty{padding:25px}.launch-button{background:#b49763;color:#18242a}.world-settings p{color:#afbec3}.pack-storage,.crafting,.equipment{border-color:#47585e}.recipe,.inventory-slot{background:#263840;border-color:#4d646b}.slot-description,.transfer-panel{border-color:#4c5d61}
@media(max-width:1050px){.layout{grid-template-columns:1fr;padding:12px}aside{display:grid;grid-template-columns:repeat(3,1fr)}.world-card{max-width:none}.world-card canvas{max-width:200px;margin:auto}.tech-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){header{padding:12px;flex-wrap:wrap}header h1{font-size:20px}.research-intro,.machine-layout{grid-template-columns:1fr;gap:12px}.research-intro b{font-size:17px}.machine-overview{border:0;border-bottom:1px solid #425158;padding:0 0 15px}.machine-overview>svg{width:65px;height:65px}.tech-grid{grid-template-columns:1fr}.machine-recipes{grid-template-columns:1fr}#industryBody{padding:15px}.industry-dialog .pack-header{padding:15px}aside{grid-template-columns:1fr 1fr}.progression-card{grid-column:1/-1}.toolbar button{min-width:80px}.machine-overview h3{margin:8px 0}.world-size{gap:6px}}


/* Desktop game screen: a readable two-row toolbar and an independently scrolling sidebar. */
@media(min-width:1051px){.layout{align-items:start}aside{max-height:calc(100dvh - 115px);overflow-y:auto;scrollbar-width:thin;padding-right:3px}.toolbar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.toolbar button{min-width:0;min-height:57px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px}.toolbar button>svg{display:none}.toolbar small{font-size:8px;max-width:none;margin:0}.board{width:min(100%,calc((100dvh - 375px)*1.5));margin-inline:auto}.combat-bar{padding:12px 16px}.layout>section{min-width:0}.status{font-size:11px;padding:8px 0;min-height:28px}.progression-card p{line-height:1.5}}
@media(min-width:651px) and (max-width:1050px){.toolbar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.toolbar button{min-width:0}.toolbar button>svg{display:none}}
.map-legend .copper{background:#df9561}
.layout>section,aside,.card,.combat-bar>div{min-width:0}.combat-bar #waveInfo{white-space:normal;overflow-wrap:anywhere}
@media(max-width:650px){.layout{grid-template-columns:minmax(0,1fr)}aside{grid-template-columns:repeat(2,minmax(0,1fr))}.world-card canvas{max-width:100%}.toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar button{min-width:0;font-size:10px}.toolbar button>svg{display:none}.toolbar small{font-size:7px;overflow-wrap:anywhere}.combat-bar{grid-template-columns:70px 80px minmax(0,1fr)}.combat-bar .threat b{font-size:10px}.resource span{min-width:0;overflow-wrap:anywhere}}
.world-body canvas{width:auto;height:auto;max-width:100%;max-height:65vh;margin-inline:auto}.world-card canvas{width:auto;height:auto;max-width:100%;max-height:260px;margin-inline:auto}
@media(max-width:650px){.card:has(#inventory){grid-column:1/-1}#inventory{grid-template-columns:repeat(2,minmax(0,1fr))}.resource b{white-space:nowrap}}
