/* Brick Space Program — the administration's paint locker.
   Same family as the parent game: dark panels, gold stencils, warm copy.
   Everything is overlay chrome on one WebGL canvas. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #05070c;
  font-family: "Courier New", monospace; color: #cfd6e0; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hidden { display: none !important; }
.dim { color: #6b7686; font-size: 0.8em; }
.gold { color: #e8c05a; }

.screen { position: fixed; inset: 0; z-index: 10; display: flex;
  align-items: center; justify-content: center; }

/* ── Join ── */
#join-screen { background: radial-gradient(ellipse at 50% 30%, #0d1420 0%, #05070c 70%); }
.join-card { text-align: center; max-width: 520px; padding: 32px;
  background: rgba(10, 14, 22, 0.85); border: 1px solid #2a3648; }
.join-card h1 { color: #e8c05a; letter-spacing: 6px; font-size: 28px; }
.join-card .tagline { color: #6b7686; letter-spacing: 3px; margin: 6px 0 18px; }
.join-card .brief { font-size: 13px; line-height: 1.6; color: #9aa5b5; margin-bottom: 20px; }
#callsign { display: block; width: 100%; padding: 10px; margin-bottom: 12px;
  background: #0a0e16; border: 1px solid #2a3648; color: #e8c05a;
  font-family: inherit; font-size: 16px; text-align: center; letter-spacing: 2px; }
#join-status { margin-top: 10px; color: #b4552a; font-size: 12px; min-height: 16px; }

button { padding: 10px 18px; background: #141b28; border: 1px solid #3a4a62;
  color: #cfd6e0; font-family: inherit; font-size: 13px; letter-spacing: 2px;
  cursor: pointer; }
button:hover { background: #1d2738; border-color: #e8c05a; }
button.gold { border-color: #8a6d24; color: #e8c05a; }
button:disabled { opacity: 0.4; cursor: default; }

/* ── Hub ── */
#hub-screen { flex-direction: column; gap: 22px; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,12,0.25) 0%, rgba(5,7,12,0.8) 100%); }
#hub-screen > * { pointer-events: auto; }
.hub-top { text-align: center; }
.hub-title { font-size: 24px; color: #e8c05a; letter-spacing: 4px; }
.hub-science { margin-top: 6px; color: #9aa5b5; letter-spacing: 2px; }
.hub-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hub-milestones { max-width: 640px; max-height: 30vh; overflow-y: auto;
  font-size: 12px; color: #7d8898; background: rgba(10,14,22,0.7);
  border: 1px solid #222c3c; padding: 12px 16px; }
.hub-milestones .got { color: #7fae72; }

/* ── Shed ── */
#shed-screen { background: rgba(5, 7, 12, 0.92); }
.shed-wrap { display: flex; gap: 20px; width: min(960px, 96vw); height: 84vh; }
.shed-col { flex: 1; background: #0a0e16; border: 1px solid #2a3648;
  padding: 16px; overflow-y: auto; display: flex; flex-direction: column; }
.shed-col h2 { color: #e8c05a; font-size: 15px; letter-spacing: 3px; margin-bottom: 12px; }
#catalog-list .part, #stack-list .part { padding: 7px 9px; margin-bottom: 5px;
  border: 1px solid #222c3c; cursor: pointer; font-size: 12px; }
#catalog-list .part:hover, #stack-list .part:hover { border-color: #e8c05a; }
#catalog-list .part .pname, #stack-list .part .pname { color: #cfd6e0; }
#catalog-list .part .pblurb { color: #6b7686; font-size: 11px; margin-top: 2px; }
#catalog-list .part .pstats { color: #8a6d24; font-size: 11px; }
#stack-list { min-height: 120px; flex: 1; }
#stack-stats { border-top: 1px solid #222c3c; padding-top: 8px;
  font-size: 12px; color: #9aa5b5; white-space: pre; line-height: 1.7; }
.shed-actions { display: flex; gap: 8px; margin-top: 10px; }
#shed-error { color: #b4552a; font-size: 12px; margin-top: 8px; min-height: 16px; }

/* ── Drawing Board ── */
#board-screen { background: rgba(5, 7, 12, 0.92); }
.board-wrap { width: min(720px, 94vw); max-height: 86vh; overflow-y: auto;
  background: #0a0e16; border: 1px solid #2a3648; padding: 22px; }
.board-wrap h2 { color: #e8c05a; letter-spacing: 3px; margin-bottom: 8px; }
#board-science { color: #9aa5b5; margin-bottom: 16px; letter-spacing: 1px; }
.node { border: 1px solid #222c3c; padding: 12px; margin-bottom: 10px; }
.node.unlocked { border-color: #3d5a3a; }
.node h3 { font-size: 14px; color: #cfd6e0; letter-spacing: 2px; }
.node .nparts { font-size: 11px; color: #6b7686; margin: 6px 0; line-height: 1.5; }
.node button { margin-top: 4px; font-size: 12px; padding: 6px 12px; }
.node .got { color: #7fae72; font-size: 12px; letter-spacing: 2px; }

/* ── Galaxy chart ── */
#chart-screen { background: #04060a; display: block; }
#chart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-info { position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  color: #e8c05a; letter-spacing: 3px; font-size: 15px; text-align: center; }
.chart-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #6b7686; font-size: 11px; letter-spacing: 1px; }
#chart-close { position: absolute; top: 16px; right: 16px; }

/* ── Flight HUD ── */
#flight-hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#flight-hud button { pointer-events: auto; }
.hud-row { position: absolute; display: flex; gap: 8px; }
.hud-top { top: 10px; left: 50%; transform: translateX(-50%); flex-wrap: wrap;
  justify-content: center; max-width: 96vw; }
.chip { background: rgba(10, 14, 22, 0.8); border: 1px solid #2a3648;
  padding: 5px 10px; font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.chip.gold { border-color: #8a6d24; }
.chip.warn { border-color: #b4552a; color: #e8956b; }

#hud-warn { position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
  color: #e8956b; font-size: 14px; letter-spacing: 2px; text-align: center;
  text-shadow: 0 0 8px #000; }
#hud-banner { position: absolute; top: 22vh; left: 50%; transform: translateX(-50%);
  color: #e8c05a; font-size: 22px; letter-spacing: 4px; text-align: center;
  text-shadow: 0 0 12px #000; transition: opacity 0.4s; opacity: 0; }

.hud-left { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 10px; align-items: stretch; }
#sas-panel { display: flex; flex-direction: column; gap: 5px; }
#sas-panel button { font-size: 10px; padding: 5px 8px; letter-spacing: 1px; }
#sas-panel button.on { border-color: #e8c05a; color: #e8c05a; }
#throttle-panel { width: 26px; background: rgba(10,14,22,0.8); border: 1px solid #2a3648;
  position: relative; min-height: 160px; }
#throttle-panel span { position: absolute; bottom: -18px; left: 0; right: 0;
  text-align: center; font-size: 9px; color: #6b7686; }
#throttle-fill { position: absolute; bottom: 0; left: 0; right: 0;
  background: #e8c05a; height: 0%; }

.hud-right { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; }
#exp-panel, #act-panel { display: flex; flex-direction: column; gap: 5px; }
#exp-panel button, #act-panel button { font-size: 10px; padding: 5px 8px; }

.hud-bottom { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; align-items: center; }
#stage-panel { font-size: 11px; color: #9aa5b5; letter-spacing: 1px;
  background: rgba(10,14,22,0.8); border: 1px solid #2a3648; padding: 5px 10px; }
#fuel-panel, #hp-panel { width: 160px; height: 14px; background: rgba(10,14,22,0.8);
  border: 1px solid #2a3648; position: relative; }
#fuel-panel span, #hp-panel span { position: absolute; inset: 0; text-align: center;
  font-size: 9px; line-height: 14px; color: #05070c; mix-blend-mode: screen;
  color: #cfd6e0; letter-spacing: 2px; }
#fuel-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #7fae72; width: 100%; }
#hp-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #b4552a; width: 100%; }

#hud-help { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: #4a5566; letter-spacing: 1px; white-space: nowrap; }

#map-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 8;
  background: rgba(4, 6, 10, 0.96); }

/* ── Toasts ── */
#toasts { position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; flex-direction: column; gap: 6px; align-items: center;
  pointer-events: none; }
.toast { background: rgba(10, 14, 22, 0.92); border: 1px solid #2a3648;
  padding: 8px 16px; font-size: 13px; letter-spacing: 1px; color: #cfd6e0;
  animation: toastIn 0.25s ease-out; max-width: 80vw; text-align: center; }
.toast.milestone { border-color: #8a6d24; color: #e8c05a; font-size: 15px; }
.toast.science { border-color: #3d5a3a; color: #9fd18f; }
.toast.bad { border-color: #7a3a22; color: #e8956b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; } }
