/* The look: a NodeGX-style panel (dark, quiet, labelled) beside a 3D view. The panel is the seam a NodeGX app would fill. */
:root {
  --bg: #0e1013;
  --panel: #16191f;
  --panel-2: #1c2027;
  --panel-3: #232833;
  --line: #2b313b;
  --text: #e6e9ee;
  --muted: #8a93a3;
  --accent: #58b0ff;
  --accent-2: #b48cff;
  --good: #39d27a;
  --warn: #ffb347;
  --bad: #ff5540;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --panel-w: 380px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font); overflow: hidden; }
button { font: inherit; color: var(--text); background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #06121f; border-color: var(--accent); font-weight: 600; }
button:disabled { opacity: 0.45; cursor: default; }
button.small { padding: 3px 8px; font-size: 12px; }
.muted { color: var(--muted); }
#layout { display: grid; grid-template-columns: 1fr var(--panel-w); height: 100%; }
#stage { position: relative; min-width: 0; background: #000; }
#view, #hud { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; }
#prompt { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); background: rgba(10, 12, 16, 0.85); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-family: var(--mono); font-size: 13px; pointer-events: none; white-space: nowrap; }
#prompt b { color: var(--accent); background: #0b1420; border: 1px solid var(--accent); border-radius: 4px; padding: 0 6px; margin-right: 8px; }
#banner { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); background: rgba(10, 12, 16, 0.85); border: 1px solid var(--line); border-radius: 8px; padding: 10px 18px; font-family: var(--mono); font-size: 15px; letter-spacing: 0.06em; pointer-events: none; text-align: center; }
#banner.bad { color: var(--bad); border-color: var(--bad); }
#banner.good { color: var(--good); border-color: var(--good); }
#banner.warn { color: var(--warn); border-color: var(--warn); }
/* The suit's visor (s6): the helmet's rim and a faint tint while you look out of it. */
#visor { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(ellipse 78% 72% at 50% 48%, transparent 62%, rgba(20, 30, 44, 0.55) 80%, rgba(6, 9, 14, 0.95) 100%), linear-gradient(rgba(120, 170, 220, 0.05), rgba(120, 170, 220, 0.02)); }
#visor.on { opacity: 1; }
#fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.35s; }
#fade.on { opacity: 1; }
.screen { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #121a2a 0%, #05070c 70%); }
.screen[hidden] { display: none; }
.screen .card { max-width: 560px; padding: 32px 36px; background: rgba(14, 16, 19, 0.9); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.screen h1 { font-family: var(--mono); letter-spacing: 0.35em; font-weight: 500; margin: 0 0 8px; font-size: 28px; color: var(--accent); }
.screen .sub { color: var(--muted); margin: 0 0 20px; }
.screen .row { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; }
.screen .keys { font-size: 11px; color: var(--muted); line-height: 1.8; }
.screen .keys b { color: var(--text); font-weight: 500; }

#panel { display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); min-height: 0; }
#panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--mono); letter-spacing: 0.08em; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.credits { font-family: var(--mono); color: var(--warn); }
#tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
#tabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 6px 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
#tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
#tabs button .n { display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: var(--panel-3); color: var(--text); font-size: 10px; text-align: center; }
#panel-body { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
#panel-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
#phase-name { color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
#help-line { text-align: right; }

.sec { margin-bottom: 14px; }
.sec h3 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.sec h3 .right { color: var(--text); font-family: var(--mono); font-weight: 400; text-transform: none; letter-spacing: 0; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.card.on { border-color: var(--accent); }
.card.dim { opacity: 0.6; }
.card .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .t b { font-weight: 600; }
.card .d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card .a { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.bar { height: 6px; background: var(--panel-3); border-radius: 3px; overflow: hidden; margin: 3px 0 6px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.good i { background: var(--good); }
.bar.warn i { background: var(--warn); }
.bar.bad i { background: var(--bad); }
.bar.purple i { background: var(--accent-2); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-family: var(--mono); font-size: 12px; }
.kv span:nth-child(even) { text-align: right; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-family: var(--mono); background: var(--panel-3); border: 1px solid var(--line); margin-right: 4px; }
.chip.good { color: var(--good); border-color: var(--good); }
.chip.bad { color: var(--bad); border-color: var(--bad); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chip.accent { color: var(--accent); border-color: var(--accent); }
.log { font-family: var(--mono); font-size: 11px; color: var(--muted); max-height: 160px; overflow-y: auto; }
.log div { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.log .good { color: var(--good); }
.log .bad { color: var(--bad); }
.log .warn { color: var(--warn); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; }
select { font: inherit; background: var(--panel-3); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.map { position: relative; height: 170px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.map svg { width: 100%; height: 100%; }
.hint { font-size: 12px; color: var(--muted); font-style: italic; }
.price { font-family: var(--mono); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* The command map's card: a battle menu over the bottom left of the view (command.mjs). */
#cmdcard { position: absolute; left: 14px; bottom: 34px; width: min(560px, calc(100% - 28px)); max-height: calc(100% - 90px); overflow-y: auto; background: rgba(10, 13, 18, 0.94); border: 2px solid #3a4a5e; border-radius: 10px; box-shadow: 0 0 0 4px rgba(10, 13, 18, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5); padding: 10px 12px; font-family: var(--mono); font-size: 12px; }
#cmdcard[hidden] { display: none; }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.cc-head b { font-size: 14px; letter-spacing: 0.06em; color: var(--text); }
.cc-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.cc-time { display: flex; gap: 6px; }
.cc-actors { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.cc-ask { background: #e8ecf2; color: #10141a; border-radius: 6px; padding: 7px 10px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 8px; border: 2px solid #8a9ab0; }
.cc-verbs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.cc-verb { text-align: left; font-family: var(--mono); font-size: 12px; padding: 8px 10px; background: var(--panel-2); border: 2px solid var(--line); text-transform: uppercase; letter-spacing: 0.04em; display: flex; flex-direction: column; position: relative; padding-left: 24px; }
.cc-verb.on { border-color: var(--good); color: var(--good); }
.cc-verb i { text-transform: none; letter-spacing: 0; font-size: 10px; color: var(--muted); font-style: italic; }
.cc-cur { position: absolute; left: 8px; top: 8px; color: var(--good); }
.cc-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.cc-row > i { color: var(--warn); font-size: 11px; }
.cc-lbl { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; margin-right: 4px; }
.cc-plan { border-top: 1px solid var(--line); padding-top: 6px; }
.cc-now { color: var(--good); margin: 3px 0 4px; }
.cc-step { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; color: var(--text); border-bottom: 1px dashed var(--line); }
.cc-step.on { color: var(--good); }
.cc-prize { background: rgba(255, 179, 71, 0.08); border: 1px solid var(--warn); border-radius: 6px; padding: 6px; }
.card.warnc { border-color: var(--warn); }
.stats { display: grid; grid-template-columns: 82px 1fr 18px; gap: 1px 8px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 6px 0 2px; }
.stats .bar { margin: 0; height: 5px; }
.stats .bar i { background: #5a6474; }
.stats .bar.good i { background: var(--good); }
.stats span.on { color: var(--good); }
.stats span:nth-child(3n) { text-align: right; }
.card .d.fx { color: #b7c3d3; font-style: normal; }
.face { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 2px; border: 1px solid #ffffff44; }
.card .t { flex-wrap: wrap; }
.look-row { margin-bottom: 8px; }
.look-row .d { margin-bottom: 4px; }
.row.wrap { flex-wrap: wrap; gap: 4px; }
input.name { font: inherit; width: 100%; background: var(--panel-3); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }

/* --- drop-in missions (mission.mjs) --- */
#mclock { position: absolute; left: 14px; top: 10px; display: flex; gap: 10px; align-items: center; background: rgba(10, 12, 16, 0.85); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; pointer-events: none; white-space: nowrap; }
#mclock[hidden], #hailbox[hidden] { display: none; }
#mclock b { font-size: 18px; color: var(--text); }
#mclock span { color: var(--muted); }
#mclock .bad { color: var(--bad); }
#mclock .warn { color: var(--warn); }
#mclock .good { color: var(--good); }
#hailbox { position: absolute; right: 14px; top: 54px; width: min(380px, calc(100% - 28px)); background: rgba(10, 13, 18, 0.94); border: 1px solid #3a4a5e; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; cursor: pointer; }
#hailbox b { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; margin-bottom: 4px; }
#loading .steps { font-family: var(--mono); color: var(--text); min-height: 1.5em; }
#debrief { overflow-y: auto; place-items: start center; padding: 24px 0; }
#debrief .card { max-width: 640px; width: calc(100% - 48px); text-align: left; }
#debrief h1 { letter-spacing: 0.18em; font-size: 22px; }
#debrief .card.good h1 { color: var(--good); }
#debrief .card.bad h1 { color: var(--bad); }
#debrief .sub { color: var(--text); margin-bottom: 14px; }
#debrief h3 { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
#debrief .grade { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); margin-bottom: 10px; }
#debrief .grade b { font-size: 44px; line-height: 1; color: var(--accent); }
#debrief .lines div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
#debrief .lines i { color: var(--muted); font-style: normal; }
#debrief .lines b { font-family: var(--mono); color: var(--good); }
#debrief .lines .bad b { color: var(--bad); }
#debrief .timeline div { color: var(--muted); font-size: 12px; padding: 2px 0; }
#debrief .timeline span { font-family: var(--mono); color: var(--text); margin-right: 8px; }
#debrief .report p { margin: 0; line-height: 1.55; }
#debrief .row { justify-content: flex-start; margin: 16px 0 0; }
.brief { color: var(--text) !important; line-height: 1.5; margin-top: 6px !important; }
.brief.bad { color: var(--bad) !important; }
.ways div { margin-bottom: 4px; }
.ways b { color: var(--text); }
.chans .n { display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: #1a1206; font-size: 10px; text-align: center; }
.radio { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; height: 260px; overflow-y: auto; margin-bottom: 8px; }
.radio .ln { margin-bottom: 8px; line-height: 1.45; }
.radio .ln b { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.radio .ln.you { color: var(--text); padding-left: 18px; }
.radio .ln.you b { color: var(--accent); }
.radio .ln.aside { color: var(--warn); font-style: italic; }
.radio .ln.note, .radio .ln.wait { color: var(--muted); }
.sugg { margin-bottom: 8px; }
.sugg button { text-align: left; white-space: normal; }
#hail-text { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; margin-bottom: 6px; }
#hail-text:focus { outline: none; border-color: var(--accent); }
#tabs.tight button { padding: 6px 6px; letter-spacing: 0.03em; }
