/* Homestake 1.6: readable colony controls and decision tools. */
:root{--bg:#0c171b;--panel:#122127;--panel2:#192b30;--ink:#eee8d9;--dim:#a5b9b6;--line:#31484c;--acc:#e9b96f;--acc2:#87d4c8}
#game-header{flex-wrap:wrap;gap:7px 16px;padding:9px 14px 12px;background:#0d1c22}
#game-header h1{font-size:19px;letter-spacing:.12em}
#tag{font-size:11px}#phasechip{font-size:12px}
.save-status{font-size:10px;white-space:nowrap;color:#9cbea9;padding:2px 7px;border:1px solid #365149;border-radius:4px}
.save-status.bad{color:#ffc3aa;border-color:#a45c45;background:#3f2822}
.commandbar{display:grid;grid-template-columns:1.18fr 1.1fr 1fr 1fr;gap:8px;width:100%}
.hud-stat{display:flex;flex-direction:column;min-width:0;background:#1a2c32;border:1px solid #31474c;border-radius:6px;padding:7px 12px}
.hud-stat>span{color:#a7bab8;font-size:9px;letter-spacing:.11em;text-transform:uppercase}
.hud-stat>strong{font-size:21px;line-height:1.3;font-variant-numeric:tabular-nums;font-weight:750;color:#f5e9cc}
.hud-stat>small{font-size:10px;color:#b5c3ba;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hud-stat.hud-cash{background:linear-gradient(120deg,#3d3424,#25312e);border-color:#937b4c}
.hud-cash>strong{color:#ffd38d}.hud-stat.hud-alert{border-color:#a5684d}.hud-alert>small{color:#ffc4a3}
#game-main{grid-template-columns:300px minmax(0,1fr) 330px}
#info,#ctl{padding:10px}
.card{border-radius:6px;border-color:#31494b;background:#182a2f}
.card h3{color:#a9bfbc;font-size:10px}
.card p{margin:7px 0}
.card button{background:#273d42;border-color:#486166}
.card button:hover:not(:disabled){background:#365057;border-color:#b5cbbf}
.card button.primary{background:#d8aa64;border-color:#e5ba7b;color:#15242a}
.card button.primary:hover:not(:disabled){background:#efc78b}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #8ce0d2;outline-offset:3px}
.phase-guide{border-left:3px solid #dcb579;background:#21363a}
.phase-guide strong{display:block;font-size:14px;color:#f3d6a4;margin:2px 0 4px}
.phase-guide p{color:#c0d0c9;font-size:12px;line-height:1.55;margin:0}
.forecast-table{font-size:11px;table-layout:fixed}
.forecast-table td,.forecast-table th{white-space:normal;padding:4px 2px}
.forecast-table td:first-child{width:35%}.forecast-table td:last-child{font-variant-numeric:tabular-nums}
.forecast-power{padding:7px 8px;margin-bottom:6px;border-radius:4px;background:#102328;border-left:3px solid #7fbf9b;font-size:11px}
.forecast-power.warning{border-color:#eb986e;color:#ffd1b6;background:#322922}
.forecast-note{font-size:10px;line-height:1.55;color:#a2b7b3;margin-top:6px}
.reserve-line{font-size:11px;display:flex;justify-content:space-between;gap:8px;margin:4px 0}
.goal-total{font-size:16px;color:#f4d49d;font-weight:700;font-variant-numeric:tabular-nums}
.goal-bar{height:7px;border-radius:4px;background:#0e1e23;overflow:hidden;margin:7px 0}
.goal-bar i{height:100%;display:block;background:linear-gradient(90deg,#549b90,#c4bc75)}
.goal-note{font-size:10px;color:#b1c1b7}
.settler-resources td{padding:0 3px 7px;font-size:10px;color:#a6b9b3;border-bottom:1px solid #344748}
.settler-resources .resource-mini{display:inline-block;margin-right:10px;white-space:nowrap}
#ptab th{font-size:9px}#ptab td{font-size:11px}#ptab .nmc{max-width:98px}
.map-toolbar{position:absolute;top:10px;left:10px;right:10px;z-index:2;display:flex;align-items:center;gap:6px;max-width:480px;padding:6px 8px;background:#0b1b24ef;border:1px solid #52665b;border-radius:6px;box-shadow:0 3px 12px #0003}
.map-toolbar label{white-space:nowrap;font-size:10px;color:#c9d0bd}
.map-toolbar select{width:auto;min-width:0;flex:1;font-size:11px;min-height:28px;background:#1d3035;border-color:#587171}
.map-toolbar button{width:auto;white-space:nowrap;margin:0;min-height:28px;font-size:10px;padding:4px 8px;background:#294147;border-color:#597072}
.map-legend{position:absolute;bottom:10px;left:10px;z-index:1;max-width:calc(100% - 20px);font-size:10px;line-height:1.5;background:#0b1b24ed;color:#d7dbc8;padding:5px 9px;border:1px solid #52665b;border-radius:4px;pointer-events:none}
#toasts{bottom:49px;z-index:5}.toast{background:#183036f5}
.selected-heading{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin-bottom:6px;color:#efd1a1}
.selected-heading b{font-size:12px}.selected-heading span{font-size:10px;color:#adc4be}
.plot-planner{border-color:#8d835d;background:#1b3034}
.planner-resources{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:8px 0}
.planner-resources button{font-size:11px;padding:7px;margin:0;text-align:center}
.planner-resources button.on{background:#355b56;border-color:#9acfc0}
.plan-figures{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:8px 0}
.plan-figures div{padding:6px;background:#10232a;border-radius:4px}
.plan-figures small{display:block;font-size:9px;color:#a7bbb7}
.plan-figures b{font-size:14px;color:#f5d597;font-variant-numeric:tabular-nums}
.plan-reason{font-size:11px;line-height:1.45;color:#b9cbc0}
.plan-reason.bad{color:#ffb395}
.plot-actions{display:flex;flex-wrap:wrap;gap:5px}.plot-actions button{flex:1;min-width:90px;font-size:10px;padding:5px;text-align:center}
.map-tip{font-size:11px;margin:5px 0;color:#b7c8c0}
.recommendations{display:flex;flex-direction:column;gap:4px}.recommendations button{font-size:11px;margin:0}
.trade-presets{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:8px 0}.trade-presets button{font-size:11px;text-align:center}
.trade-preview{font-size:11px;line-height:1.55;border-left:2px solid #75b3a5;background:#102328;padding:6px 8px;margin:7px 0}
.trade-preview.bad{border-color:#c78367;color:#f0b99c}
.auction-clock{font-size:12px;color:#f5d395;font-variant-numeric:tabular-nums}
#modal{z-index:3}
#modal .sheet{max-width:660px;background:#13252b;border-color:#8f8a63}
#modal .sheet h2{font-size:16px}
.cover .cover-backup{display:flex;align-items:center;gap:12px;max-width:512px;margin-top:19px}
.cover .cover-backup button{width:auto;min-height:0;display:inline-block;padding:0 0 3px;border:0;border-bottom:1px solid #849e9b66;border-radius:0;background:none;font-size:11px;color:#d9ded3;font-weight:500;text-align:left;white-space:nowrap}
.cover .cover-backup button:hover{background:none;color:#ffd797;border-color:#ffd797}
.cover .cover-backup span{font-size:9px;color:#a4b6b8}
.cover #restore-status:empty{display:none}.cover #restore-status{margin:7px 0 0;min-height:0}
.restore-panel{max-width:512px;background:#10272def;border:1px solid #799d94;border-radius:5px;padding:15px;margin-top:12px}
.restore-panel h2{font-size:15px;letter-spacing:0;margin:0 0 7px;color:#f2d39c}
.restore-panel p{font-size:11px;color:#c9d4c8;margin:5px 0 12px}
.cover .restore-panel button{font-size:11px;min-height:35px;padding:8px 10px;color:#eae6d6;background:#2e4a4c;border-color:#6c8980;justify-content:center}
.cover #restore-confirm{background:#e7b673;color:#182c2b;border-color:#e7b673}
.cover .restore-panel .row{gap:8px}
@media(min-width:1600px){#game-main{grid-template-columns:315px minmax(0,1fr) 350px}.hud-stat{padding:9px 14px}}
@media(max-width:1100px) and (min-width:981px){#game-main{grid-template-columns:260px minmax(0,1fr) 285px}#ptab .nmc{max-width:67px}.map-toolbar{flex-wrap:wrap}.map-toolbar label{display:none}.map-toolbar button{padding-left:5px;padding-right:5px}.hud-stat{padding:7px 9px}.hud-stat>strong{font-size:18px}.hud-stat>small{font-size:9px}}
@media(max-width:980px){
 #game-header{padding:8px 12px 10px;gap:7px 10px}#game-header h1{font-size:17px}#tag{display:none}#phasechip{font-size:10px}.save-status{font-size:9px}
 .commandbar{gap:6px}.hud-stat{padding:6px 8px}.hud-stat>strong{font-size:17px}.hud-stat>span{font-size:8px}.hud-stat>small{font-size:9px}
 #game-main{display:flex;flex-direction:column}#board{height:56vh;min-height:320px;order:1}#ctl{order:2;padding:12px}#info{order:3;padding:12px}
 #ctl>.card,#phasectl>.card{margin-bottom:10px}#phase-guide{margin-top:0}.map-toolbar{max-width:460px}
 .plot-planner{scroll-margin-top:12px}#modal{padding:10px}#floor{height:240px}
 #info{display:grid;grid-template-columns:1fr 1fr;gap:10px}#info>.card{margin:0;min-width:0}#info .card:last-child{grid-column:1/-1}
}
@media(max-width:560px){
 #game-header{gap:6px}#game-header h1{font-size:16px}#phasechip{margin-left:auto;font-size:9px}.save-status{font-size:8px;padding:2px 5px}
 .commandbar{grid-template-columns:1fr 1fr}.hud-stat{padding:6px 9px}.hud-stat>strong{font-size:18px}.hud-stat>span{font-size:8px}.hud-stat>small{font-size:9px}
 #board{height:54vh;min-height:300px}.map-toolbar{top:8px;left:8px;right:8px;gap:4px;padding:5px}.map-toolbar label{display:none}.map-toolbar select{font-size:10px}.map-toolbar button{font-size:10px;padding:5px 6px;min-height:32px}
 .map-legend{font-size:9px;left:8px;bottom:8px;max-width:calc(100% - 16px)}
 #info{grid-template-columns:1fr}#info .card:last-child{grid-column:auto}#info,#ctl{padding:10px}
 #modal .sheet{padding:12px 9px}#modal td,#modal th{font-size:10px;padding:3px 2px}#modal .sheet h2{font-size:14px}#floor{height:210px}
 .cover .cover-backup{align-items:flex-start;flex-direction:column;gap:5px;margin-top:18px}.cover .cover-backup span{font-size:8px}.cover .cover-backup button{font-size:10px}
}
