:root {
  /* cold rolled steel, from the floor plate up */
  --steel-950: #12161a;
  --steel-900: #181d22;
  --steel-850: #1e242a;
  --steel-800: #232a30;
  --steel-700: #2e363d;
  --steel-600: #404952;
  --steel-500: #5b6570;
  --bone: #ece7da;
  --bone-dim: #b0aa9e;
  --bone-faint: #a09b90;
  --hazard: #f2c230;
  --hazard-deep: #c99a14;
  --hazard-ink: #1a1d20;
  --accent-text: #f2c230;
  --lift: 255, 255, 255;
  --well: 18, 22, 26;
  --edge: 46, 54, 61;
  --sink: 0, 0, 0;
  --chart-grid: #313840;
  --chart-ink: #a09b90;
  --chart-text: #e8e3d6;
  --chart-dot: #252b31;
  --danger: #ef6a54;
  --ok: #6fbf73;
  --info: #6aa8e8;
  --radius-s: 4px;
  --radius-m: 8px;
  /* a raised steel plate: faint top light, darker foot, soft drop */
  --plate: linear-gradient(180deg, #262d34 0%, #222930 100%);
  --plate-edge: inset 0 1px 0 rgba(255,255,255,.05);
  --plate-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 0 rgba(0,0,0,.35), 0 10px 28px -16px rgba(0,0,0,.6);
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, rgba(242,194,48,.035), transparent 60%), var(--steel-900);
  background-attachment: fixed;
  color: var(--bone);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(242,194,48,.35); color: var(--bone); }
a { color: var(--accent-text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 2px; border-radius: 2px; }
.num, .timer, td.num { font-variant-numeric: tabular-nums; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, var(--steel-950) 0%, var(--steel-950) 100%);
  border-right: 1px solid var(--steel-800);
  box-shadow: inset -1px 0 0 rgba(var(--lift),.02);
  padding: 20px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}
.brand { font: 700 28px/1 var(--font-display); letter-spacing: .01em; padding: 0 8px; }
.brand span { color: var(--accent-text); }
.brand small { display: block; font: 500 12px var(--font-body); color: var(--bone-faint); margin-top: 6px; letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav h4 { font: 600 12.5px var(--font-body); color: var(--bone-faint); margin: 16px 10px 5px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 6px;
  color: var(--bone-dim); text-decoration: none; font-weight: 500;
  transition: background .12s, color .12s;
}
.nav a:hover { background: rgba(var(--lift),.035); color: var(--bone); }
.nav a.active { background: linear-gradient(90deg, rgba(242,194,48,.13), rgba(242,194,48,.03)); color: var(--bone); box-shadow: inset 3px 0 0 var(--hazard); }
.side .who { margin-top: auto; font-size: 13px; color: var(--bone-faint); padding: 0 8px; }
.side .who b { color: var(--bone-dim); font-weight: 600; }
.side .who button { background: none; border: 0; color: var(--bone-dim); text-decoration: underline; cursor: pointer; padding: 0; }

main { min-width: 0; }
.page { padding: 28px 32px 120px; max-width: 1320px; }
.page > h1 { font: 700 42px/1.02 var(--font-display); margin: 0 0 6px; letter-spacing: .005em; }
.page > .lede { color: var(--bone-dim); margin: 0 0 24px; max-width: 68ch; font-size: 15.5px; }
h2 { font: 700 22px/1.15 var(--font-display); margin: 0 0 12px; letter-spacing: .01em; }
h3 { font: 600 15px/1.3 var(--font-body); margin: 0 0 8px; }

/* ---------- phase strip (the signature element) */
.strip {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(36,43,49,.97), rgba(29,35,40,.97));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--steel-700);
  box-shadow: 0 1px 0 rgba(0,0,0,.4), 0 12px 24px -18px rgba(0,0,0,.8);
  display: grid; grid-template-columns: minmax(200px, 1.1fr) 2fr auto; gap: 26px; align-items: center;
  padding: 14px 32px;
}
.strip.paused { background-image: repeating-linear-gradient(-45deg, rgba(242,194,48,.16) 0 14px, transparent 14px 28px); }
.strip.offline { filter: saturate(.3); }
.strip .title { min-width: 0; }
.strip .title .event { color: var(--bone-faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .title .phase { font: 700 30px/1.02 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .title .status { display: inline-flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.track { display: flex; gap: 4px; height: 40px; align-items: stretch; }
.track .seg {
  flex: 1 1 0; min-width: 18px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--steel-700), var(--steel-700)); border-radius: 3px; border: 0; padding: 0; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(var(--lift),.05), inset 0 -1px 0 rgba(0,0,0,.25);
}
.track .seg:hover:not(:disabled) { background: linear-gradient(180deg, var(--steel-600), var(--steel-700)); }
.track .seg span {
  position: absolute; inset: 0; padding: 0 9px; display: flex; align-items: center;
  font: 600 14px var(--font-display); letter-spacing: .02em; color: var(--bone-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track .seg.done { background: repeating-linear-gradient(-45deg, var(--steel-700) 0 6px, var(--steel-800) 6px 12px); box-shadow: none; }
.track .seg.done span { color: var(--bone-faint); }
.track .seg.current { background: linear-gradient(180deg, var(--steel-600), var(--steel-700)); box-shadow: inset 0 -3px 0 var(--hazard), 0 0 0 1px rgba(242,194,48,.35); }
.track .seg.current .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(242,194,48,.18), rgba(242,194,48,.38)); }
.track .seg.current span { color: var(--bone); z-index: 1; }
.track .seg:disabled { cursor: default; }
.track-empty { color: var(--bone-faint); font-size: 13px; }
.clock { display: flex; align-items: center; gap: 14px; }
.timer { font: 700 60px/0.88 var(--font-display); letter-spacing: 0; min-width: 4.2ch; text-align: right; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.timer.low { color: var(--danger); }
.flow { display: flex; flex-direction: column; gap: 6px; }

/* ---------- chips / badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--font-body); padding: 4px 8px; border-radius: 999px;
  background: var(--steel-700); color: var(--bone-dim); white-space: nowrap;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.chip.on { color: var(--ok); background: rgba(111,191,115,.12); }
.chip.off { color: var(--danger); background: rgba(224,83,61,.12); }
.chip.warn { color: var(--accent-text); background: rgba(242,194,48,.12); }
.chip.info { color: var(--info); background: rgba(106,168,232,.12); }
.swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; flex: none; }

/* ---------- buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--steel-600); border-bottom-color: var(--steel-700); background: linear-gradient(180deg, var(--steel-700), var(--steel-700));
  box-shadow: inset 0 1px 0 rgba(var(--lift),.06);
  padding: 7px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px;
  white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: linear-gradient(180deg, var(--steel-600), var(--steel-700)); border-color: #4d5761; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #f7cd45, #ebb823); border-color: #f2c230; border-bottom-color: var(--hazard-deep); color: var(--hazard-ink); box-shadow: inset 0 1px 0 rgba(var(--lift),.35), 0 4px 14px -8px rgba(242,194,48,.7); }
.btn.primary:hover { background: linear-gradient(180deg, #ffd65a, #f2c230); }
.btn.danger { background: transparent; border-color: rgba(224,83,61,.7); color: var(--danger); box-shadow: none; }
.btn.danger:hover { background: rgba(224,83,61,.15); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--bone-dim); box-shadow: none; }
.btn.ghost:hover { background: var(--steel-700); color: var(--bone); }
.btn.sm { padding: 4px 10px; font-size: 13px; border-radius: 5px; }
.btn.big { padding: 10px 18px; font: 700 18px var(--font-display); letter-spacing: .03em; }
.seg-btns { display: inline-flex; border: 1px solid var(--steel-600); border-radius: 6px; overflow: hidden; background: var(--steel-950); }
.seg-btns button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--bone-dim); }
.seg-btns button + button { border-left: 1px solid var(--steel-600); }
.seg-btns button:hover:not(.sel) { color: var(--bone); background: rgba(var(--lift),.04); }
.seg-btns button.sel { background: var(--bone); color: var(--steel-900); }

input[type=text], input[type=number], input[type=password], input[type=search], select, textarea {
  background: var(--steel-950); border: 1px solid var(--steel-600); border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
  padding: 7px 10px; width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--bone-faint); opacity: 1; }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--steel-600); background: var(--steel-950); border-radius: var(--radius-s); }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-text); outline: none; box-shadow: inset 0 1px 2px rgba(0,0,0,.35), 0 0 0 3px rgba(242,194,48,.16); }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent-text); }

.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--bone-dim); }
.field > small { color: var(--bone-faint); font-size: 12.5px; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- sections */
.section { border-top: 1px solid var(--steel-700); padding: 24px 0 8px; }
.section:first-of-type { border-top: 0; padding-top: 4px; }
.section > header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section > header h2 { margin: 0; }
.section > header p { margin: 0; color: var(--bone-faint); font-size: 13.5px; max-width: 70ch; }
.panel { background: var(--plate); border: 1px solid var(--steel-700); border-radius: var(--radius-m); padding: 18px; box-shadow: var(--plate-shadow); }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--steel-700); border-radius: var(--radius-m); background: rgba(var(--well),.35); box-shadow: var(--plate-edge); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--bone-faint); font-size: 12.5px; padding: 9px 12px; background: var(--steel-850); position: sticky; top: 0; border-bottom: 1px solid var(--steel-700); }
td { padding: 8px 12px; border-top: 1px solid rgba(var(--edge),.7); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tr:hover td { background: rgba(242,194,48,.025); }
td.num, th.num { text-align: right; white-space: nowrap; }
th { white-space: nowrap; }
td .muted, .muted { color: var(--bone-faint); }
td input, td select { padding: 4px 7px; }
.empty { padding: 28px; text-align: center; color: var(--bone-faint); }
.demo-bar { background: var(--plate); border: 1px solid var(--steel-600); border-left: 4px solid var(--hazard); border-radius: 6px; padding: 9px 14px; margin-bottom: 14px; font-size: 14px; color: var(--bone-dim); }
.demo-bar b { color: var(--bone); }
.empty b { display: block; color: var(--bone-dim); font-size: 16px; margin-bottom: 4px; }

/* ---------- dashboard bits */
.standings { display: flex; flex-direction: column; gap: 8px; }
.standing { display: grid; grid-template-columns: 26px minmax(110px, 180px) 1fr 64px; gap: 10px; align-items: center; }
.standing .rank { font: 700 20px var(--font-display); color: var(--bone-faint); text-align: right; }
.standing .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standing .name small { display: block; color: var(--bone-faint); font-weight: 400; font-size: 12px; }
.bar { height: 18px; background: var(--steel-950); border-radius: 0 4px 4px 0; position: relative; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.bar > div { height: 100%; border-radius: 0 4px 4px 0; min-width: 3px; box-shadow: inset 0 1px 0 rgba(var(--lift),.18); }
.standing .pts { font: 700 24px var(--font-display); text-align: right; }

.feed { display: flex; flex-direction: column; }
.kill { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--steel-700); font-size: 14px; }
.kill:first-child { border-top: 0; }
.kill time { color: var(--bone-faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.kill .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kill .who b { font-weight: 600; }
.kill .who .swatch { width: 9px; height: 9px; margin-right: 5px; vertical-align: 0; }
.kill .tier { font: 700 12px var(--font-display); padding: 1px 5px; border-radius: 2px; margin: 0 4px; color: #12161a; }
.kill .pts { font: 700 18px var(--font-display); }
.kill .pts.zero { font: 500 12.5px var(--font-body); color: var(--bone-faint); }
.kill.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: rgba(242,194,48,.18); } to { background: transparent; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0; border: 1px solid var(--steel-700); border-radius: var(--radius-m); margin-bottom: 24px; background: var(--plate); box-shadow: var(--plate-shadow); overflow: hidden; }
.kpi { padding: 14px 18px 12px; border-left: 1px solid var(--steel-700); }
.kpi:first-child { border-left: 0; }
.kpi b { display: block; font: 700 38px/1 var(--font-display); margin-bottom: 4px; }
.kpi span { color: var(--bone-faint); font-size: 13px; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--steel-950); border: 1px solid var(--steel-600);
  border-radius: var(--radius-s); padding: 6px 9px; font-size: 13px; white-space: nowrap; display: none; z-index: 2;
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--bone-dim); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- team rows */
.team { border: 1px solid var(--steel-700); border-radius: var(--radius-m); background: var(--plate); box-shadow: var(--plate-shadow); margin-bottom: 12px; overflow: hidden; }
.team > header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-left: 5px solid var(--c); }
.team > header .name { font: 700 22px var(--font-display); }
.team > header .pts { font: 700 26px var(--font-display); margin-left: auto; }
.team .body { padding: 10px 14px 14px 19px; border-top: 1px solid var(--steel-700); display: flex; flex-direction: column; gap: 10px; }
.members { display: flex; flex-wrap: wrap; gap: 6px; }
.member { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--steel-700); font-size: 13.5px; }
.member.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.member button { border: 0; background: transparent; cursor: pointer; color: var(--bone-faint); padding: 0 6px; font-size: 15px; line-height: 1; }
.member button:hover { color: var(--bone); }

/* ---------- editors */
.list-editor { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--steel-700); border-radius: var(--radius-m); background: var(--plate); box-shadow: var(--plate-edge); }
.item > summary:hover { background: rgba(var(--lift),.02); }
.item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.item > summary::-webkit-details-marker { display: none; }
.item > summary .t { font-weight: 600; }
.item > summary .meta { color: var(--bone-faint); font-size: 13px; }
.item[open] > summary { border-bottom: 1px solid var(--steel-700); }
.item .inner { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.order { font: 700 18px var(--font-display); color: var(--bone-faint); min-width: 22px; }
.sub-details { border: 1px dashed var(--steel-600); border-radius: var(--radius-m); padding: 10px 12px; }
.sub-details > summary { cursor: pointer; font-weight: 600; color: var(--bone); }
.sub-details[open] > summary { margin-bottom: 2px; }

.hud-preview { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(180deg, var(--steel-600) 0%, #6d6a55 60%, var(--steel-600) 100%); border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--steel-600); }
.hud-preview .box { position: absolute; background: rgba(11,15,20,.72); border-top: 2px solid var(--hazard); color: var(--bone); font: 600 11px var(--font-display); padding: 3px 6px; overflow: hidden; }

.savebar {
  position: fixed; left: 216px; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: rgba(var(--well),.94); backdrop-filter: blur(8px); border-top: 2px solid var(--hazard); box-shadow: 0 -12px 30px -18px rgba(0,0,0,.8);
  transform: translateY(100%); visibility: hidden; transition: transform .18s ease-out, visibility .18s;
}
.savebar.show { transform: none; visibility: visible; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.savebar.show ~ .toasts { bottom: 78px; }
.toast { background: var(--plate); border: 1px solid var(--steel-600); border-left: 4px solid var(--info); padding: 11px 15px; border-radius: 6px; font-size: 14px; box-shadow: var(--plate-edge), 0 12px 28px rgba(0,0,0,.45); animation: toast-in .18s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--accent-text); }

.modal-back { position: fixed; inset: 0; background: rgba(8,10,12,.72); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--plate); border: 1px solid var(--steel-600); border-radius: 10px; box-shadow: var(--plate-edge), 0 24px 60px rgba(0,0,0,.55); width: min(520px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: repeating-linear-gradient(-45deg, rgba(242,194,48,.05) 0 22px, transparent 22px 44px), var(--steel-900); }
.auth > form, .auth > .auth-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; background: var(--plate); border: 1px solid var(--steel-700); border-top: 3px solid var(--hazard); padding: 28px; border-radius: 10px; box-shadow: var(--plate-edge), 0 30px 70px -20px rgba(0,0,0,.75); }
.auth .brand { padding: 0; font-size: 40px; }
/* two-factor setup: QR code on white (scanners need the contrast), the key and the recovery codes in monospace */
.totp-qr { display: block; width: 200px; height: 200px; padding: 8px; background: #fff; border-radius: 6px; image-rendering: pixelated; }
.totp-secret { display: block; font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: 15px; letter-spacing: .06em; word-break: break-all; user-select: all; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; margin: 0; padding-left: 26px; font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: 14px; }
@media (max-width: 420px) { .recovery-codes { grid-template-columns: 1fr; } }
.error { color: var(--danger); font-size: 14px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--steel-950); border: 1px solid var(--steel-700); border-radius: var(--radius-s); padding: 10px 12px; white-space: pre; overflow-x: auto; }
.banner { padding: 11px 15px; border-radius: 6px; background: rgba(242,194,48,.1); border: 1px solid rgba(242,194,48,.35); color: var(--bone); margin-bottom: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.err { background: rgba(224,83,61,.1); border-color: rgba(224,83,61,.4); }

/* ---------- live map */
.page.page-map { max-width: none; padding-bottom: 24px; }
.cutscene-box { border: 1px solid var(--steel-700); border-radius: var(--radius-m); background: var(--steel-850); padding: 12px; margin-bottom: 12px; max-width: 520px; }
.cutscene-box[hidden] { display: none; }
.cut-screen { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.cut-video, .cut-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.cut-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(48px, 9vw, 96px); font-weight: 800; color: #facc15; text-shadow: 0 2px 12px rgba(0,0,0,.6); background: rgba(var(--sink),.45); }
.map-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; height: calc(100vh - 230px); min-height: 460px; }
.map-view { position: relative; overflow: hidden; background: #2e4a5a; border: 1px solid var(--steel-700); border-radius: var(--radius-m); cursor: grab; touch-action: none; user-select: none; }
.map-view:active { cursor: grabbing; }
.map-view img, .map-view .map-placeholder { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; max-width: none; }
.map-overlay { position: absolute; inset: 0; }
.map-overlay .grid line { stroke: rgba(0,0,0,.28); stroke-width: 1; }
.map-overlay .grid text { fill: rgba(0,0,0,.55); font: 600 10px var(--font-body); }
.map-overlay .mon { fill: #fff; font: 600 11px var(--font-body); paint-order: stroke; stroke: rgba(0,0,0,.65); stroke-width: 3px; }
.map-overlay .shape-label, .map-overlay .pname { fill: #fff; font: 600 12px var(--font-body); paint-order: stroke; stroke: var(--steel-850); stroke-width: 3px; }
.map-overlay .pl { cursor: pointer; }
.map-overlay .pl .down { fill: #fff; font: 700 10px var(--font-body); }
.map-overlay .pl.sel circle { stroke: var(--hazard); stroke-width: 3; }
.map-overlay .pl:focus { outline: none; }
.map-overlay .pl:focus circle { stroke: var(--hazard); stroke-width: 3; }
.map-view .tip { position: absolute; display: none; pointer-events: none; background: var(--steel-950); border: 1px solid var(--steel-600); border-radius: var(--radius-s); padding: 6px 9px; font-size: 13px; z-index: 2; white-space: nowrap; }
.map-side { overflow-y: auto; border: 1px solid var(--steel-700); border-radius: var(--radius-m); background: var(--steel-850); padding: 12px; }
.map-team { margin-bottom: 12px; }
.map-team > label { margin-bottom: 4px; }
.map-pl { display: flex; justify-content: space-between; width: 100%; border: 0; background: transparent; padding: 4px 6px 4px 26px; border-radius: var(--radius-s); cursor: pointer; font-size: 14px; text-align: left; }
.map-pl:hover { background: var(--steel-700); }
.map-pl.sel { background: var(--steel-700); box-shadow: inset 3px 0 0 var(--hazard); }
.map-pl .st-downed { color: var(--danger); }

@media (max-width: 1100px) {
  .cols, .cols.even { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr auto; }
  .strip .track { grid-column: 1 / -1; order: 3; }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-view { height: 70vh; }
  .map-side { max-height: 320px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; gap: 10px; }
  .side .nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .side .nav h4 { display: none; }
  .side .who { margin-top: 0; }
  .page { padding: 18px 16px 110px; }
  .strip { padding: 10px 16px; position: static; }
  .timer { font-size: 40px; }
  .savebar { left: 0; padding: 10px 16px; }
  .standing { grid-template-columns: 22px 1fr 56px; }
  .standing .bar { grid-column: 2 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* inline forms: inputs sit side by side instead of stretching */
.row > input[type=text], .row > input[type=number], .row > select { width: auto; flex: 0 1 220px; }

/* ---------- searchable picker */
.ico { width: 22px; height: 22px; object-fit: contain; flex: none; }
.picker-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; text-align: left;
  background: var(--steel-950); border: 1px solid var(--steel-600); border-radius: 6px; padding: 5px 10px; cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}
.picker-btn:hover:not(:disabled) { border-color: var(--bone-faint); }
.picker-btn:disabled { cursor: default; opacity: .8; }
.picker-btn .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn .sub { color: var(--bone-faint); font-size: 12px; white-space: nowrap; }
.picker-btn .caret { color: var(--bone-faint); }
.picker-pop {
  position: fixed; z-index: 70; background: var(--steel-850); border: 1px solid var(--steel-500); border-radius: var(--radius-m);
  box-shadow: 0 12px 32px rgba(0,0,0,.45); display: flex; flex-direction: column; max-height: 360px;
}
.picker-pop > input { margin: 8px; width: auto; }
.picker-list { list-style: none; margin: 0; padding: 0 0 6px; overflow-y: auto; }
.picker-list li.opt { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.picker-list li.opt .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-list li.opt .sub { color: var(--bone-faint); font-size: 12px; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.picker-list li.opt.cur { background: var(--steel-700); }
.picker-list li.opt.on .lbl { color: var(--accent-text); }
.picker-list li.opt .chk { color: var(--accent-text); font-weight: 700; }
.picker-list li.grp { padding: 8px 12px 3px; font-size: 12px; font-weight: 600; color: var(--bone-faint); position: sticky; top: 0; background: var(--steel-850); }
.picker-list li.none { padding: 14px 12px; color: var(--bone-faint); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .member .ico { width: 18px; height: 18px; }

/* ---------- tier board */
.tier-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.tier-col { background: var(--plate); box-shadow: var(--plate-shadow); border: 1px solid var(--steel-700); border-top: 4px solid var(--tc); border-radius: var(--radius-m); min-height: 140px; transition: background .12s; }
.tier-col.over { background: var(--steel-700); outline: 2px dashed var(--tc); outline-offset: -4px; }
.tier-col > header { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 10px 4px; }
.tier-col > header b { font: 700 18px var(--font-display); }
.tier-col > header span { color: var(--bone-faint); font-size: 13px; }
.tsec { padding: 4px 10px 10px; }
.tsec h4 { margin: 4px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--bone-faint); }
.tchips { display: flex; flex-wrap: wrap; gap: 5px; }
.tchip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 4px; border-radius: var(--radius-s); background: var(--steel-700); font-size: 13px; cursor: grab; }
.tchip .ico { width: 20px; height: 20px; }
.tchip button { border: 0; background: transparent; color: var(--bone-faint); cursor: pointer; padding: 0 4px; font-size: 14px; }
.tchip button:hover { color: var(--bone); }
.tchip:active { cursor: grabbing; }
td select { min-width: 110px; }
td input[type=number] { min-width: 72px; }

/* ---------- navigation with icons */
.nav a { justify-content: flex-start; gap: 10px; }
.ico-nav { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav a.active .ico-nav { opacity: 1; color: var(--accent-text); }

/* ---------- tabs inside a page */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--steel-700); margin: 0 0 20px; overflow-x: auto; }
.tabs a {
  padding: 9px 14px; color: var(--bone-dim); text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--bone); }
.tabs a.active { color: var(--bone); border-bottom-color: var(--accent-text); border-bottom-width: 3px; }
.page > h1 + .tabs { margin-top: 14px; }
.tab-body > .lede:first-child { margin-top: 0; }

/* ---------- cards in the side column (Control page) */
.cols > .stack > section.card { background: var(--plate); box-shadow: var(--plate-shadow); border: 1px solid var(--steel-700); border-radius: var(--radius-m); padding: 16px 18px 14px; }
.cols > .stack > section.card > header { margin-bottom: 10px; }
.cols > .stack > section.card > header h2 { font-size: 18px; }
.cols > .stack > section.section:first-child { border-top: 0; padding-top: 4px; }
.cols .seg-btns { flex-wrap: wrap; }

/* ---------- loading feedback */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; flex: none; }
.btn.busy, .seg-btns button.busy, .seg button.busy { position: relative; cursor: progress; opacity: 1; }
.btn.busy::after, .seg-btns button.busy::after {
  content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  display: inline-block; animation: spin .8s linear infinite; margin-left: 4px;
}
.track .seg.busy { outline: 2px solid var(--hazard); outline-offset: -2px; }
#busybar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--hazard); z-index: 90; opacity: 0; transition: opacity .2s; }
#busybar.on { opacity: 1; width: 100%; animation: busy 1.2s ease-in-out infinite; transform-origin: left; }
@keyframes busy { 0% { transform: scaleX(0); } 60% { transform: scaleX(.8); } 100% { transform: scaleX(1); opacity: .3; } }
.pending-card {
  position: fixed; left: 232px; bottom: 18px; z-index: 55; width: min(340px, calc(100vw - 32px));
  background: var(--steel-850); border: 1px solid var(--steel-600); border-left: 4px solid var(--hazard); border-radius: var(--radius-s);
  padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); font-size: 14px;
}
.savebar.show ~ .pending-card { bottom: 78px; }
.pending-card .pc-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent-text); margin-bottom: 6px; }
.pending-card ul { list-style: none; margin: 0 0 6px; padding: 0; }
.pending-card li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.page-loading { display: flex; align-items: center; gap: 10px; color: var(--bone-dim); padding: 28px 0; }

@media (max-width: 760px) {
  .pending-card { left: 16px; }
  .side .nav a span { display: none; }
  .side .nav a { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .spin, .btn.busy::after { animation-duration: 2.4s !important; }
}

/* ---------- map editor: its own styles live in /map-editor/styles/map-editor.css; only the page frame is here */
.page.page-editor { max-width: none; padding-bottom: 16px; }
.btn.on { border-color: var(--accent-text); color: var(--accent-text); }
.warn-text { color: var(--accent-text); font-size: 12.5px; line-height: 1.4; }

/* ---------- loot: containers you can open */
.loot-switch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--radius-m);
  background: var(--plate); border: 1px solid var(--steel-700); border-left: 4px solid var(--steel-500); box-shadow: var(--plate-shadow); }
.loot-switch.on { border-left-color: var(--ok); }
.loot-switch .field { gap: 2px; }
.loot-group { margin: 6px 0 10px; font: 700 18px var(--font-display); color: var(--bone-dim); }
.loot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.loot-card { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 12px 14px; border-radius: var(--radius-m); cursor: pointer;
  background: var(--plate); border: 1px solid var(--steel-700); box-shadow: var(--plate-shadow); transition: border-color .12s, transform .06s; }
.loot-card:hover { border-color: var(--steel-500); }
.loot-card:active { transform: translateY(1px); }
.loot-card.mod { border-left: 3px solid var(--hazard); }
.lc-name { font: 700 19px/1.1 var(--font-display); }
.lc-icons { display: flex; gap: 4px; min-height: 30px; align-items: center; }
.lc-icons .ico { width: 30px; height: 30px; padding: 2px; border-radius: 4px; background: rgba(var(--sink),.25); }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }

/* the opened container, laid out like Rust's loot window */
.loot-window { border: 1px solid var(--steel-700); border-radius: 10px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, var(--steel-850), var(--steel-900)); box-shadow: var(--plate-shadow); }
.lw-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.lw-head h3 { margin: 0; font: 700 28px/1.05 var(--font-display); }
.lw-at { color: var(--accent-text); font-weight: 600; }
.lw-modes { align-self: flex-start; flex-wrap: wrap; }
.lw-modes button { padding: 8px 14px; font-size: 14px; }
.lw-help { margin: -4px 0 0; font-size: 13.5px; }
.loot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.slot { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px 6px 8px;
  border-radius: 6px; border: 1px solid var(--steel-700); background: radial-gradient(circle at 50% 38%, var(--steel-700) 0%, var(--steel-850) 70%); box-shadow: inset 0 1px 0 rgba(var(--lift),.04);
  color: var(--bone); text-align: center; font: inherit; }
button.slot { cursor: pointer; }
button.slot:hover { border-color: var(--steel-500); }
.slot .ico { width: 46px; height: 46px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.slot .nm { font-size: 12px; line-height: 1.15; max-height: 2.35em; overflow: hidden; color: var(--bone-dim); }
.slot .pct { position: absolute; top: 4px; left: 6px; font: 700 14px var(--font-display); color: var(--accent-text); }
.slot .amt { position: absolute; top: 4px; right: 6px; font: 600 13px var(--font-display); color: var(--bone); }
.slot .bp { position: absolute; bottom: 4px; right: 5px; font: 700 10px var(--font-display); padding: 0 4px; border-radius: 3px; background: #3a6ea8; color: #fff; }
.slot .plus { font: 700 34px/1 var(--font-display); color: var(--bone-faint); }
.slot.fixed { opacity: .85; }
.slot.extra { border-color: rgba(242,194,48,.55); background: radial-gradient(circle at 50% 38%, var(--steel-700) 0%, var(--steel-850) 72%); }
.slot.sel { outline: 2px solid var(--hazard); outline-offset: 1px; }
.slot.add { border-style: dashed; background: transparent; }
.slot.add:hover { border-color: var(--accent-text); }
.slot.add:hover .plus { color: var(--accent-text); }
.slot.removed { opacity: .38; }
.slot.removed::after { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--danger); transform: rotate(-35deg); }
.slot-edit { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-m);
  background: rgba(242,194,48,.06); border: 1px solid rgba(242,194,48,.3); }
.slot-edit .field { flex: 1 1 90px; }
.lw-foot { align-items: flex-end; }
.lw-where { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 10px; border-top: 1px solid var(--steel-700); }
.adv-rules { margin-top: 22px; }

/* monuments: list on the left, the chosen one on the right */
.mon-browse { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.mon-list { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 110px; max-height: calc(100vh - 140px); overflow-y: auto; padding-right: 4px; }
.mon-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; color: var(--bone-dim); }
.mon-item:hover { background: rgba(var(--lift),.035); color: var(--bone); }
.mon-item.sel { background: var(--plate); border-color: var(--steel-700); color: var(--bone); box-shadow: inset 3px 0 0 var(--hazard), var(--plate-edge); }
.mi-name { font-weight: 600; display: flex; align-items: center; gap: 7px; }
.mi-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.mi-meta { font-size: 12px; color: var(--bone-faint); }
.mon-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mon-block { padding: 16px 18px; border-radius: var(--radius-m); background: var(--plate); border: 1px solid var(--steel-700); box-shadow: var(--plate-shadow); }
.mon-block > h3 { font: 700 20px var(--font-display); margin: 0 0 12px; }
@media (max-width: 900px) {
  .mon-browse { grid-template-columns: 1fr; }
  .mon-list { position: static; max-height: 260px; }
}
.slot.adjusted { border-color: rgba(106,168,232,.7); box-shadow: inset 0 0 0 1px rgba(106,168,232,.3); }
.slot.adjusted .pct { color: var(--info); }
.im-head { display: flex; align-items: center; gap: 14px; }
.im-head b { font: 700 24px/1.1 var(--font-display); }
.im-pic { width: 72px; height: 72px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--steel-700); background: radial-gradient(circle at 50% 38%, var(--steel-700) 0%, var(--steel-850) 70%); }
.im-pic .ico { width: 58px; height: 58px; }
.im-pic .plus { font: 700 34px/1 var(--font-display); color: var(--bone-faint); }
.im-fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.modal .row.end .spacer { flex: 1; }
.pic-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; margin: -8px 0 16px; }
.loot-how { margin-bottom: 18px; }
.loot-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 78ch; }

/* ---------- loot tree (advanced) */
.lw-tree { padding-top: 10px; border-top: 1px solid var(--steel-700); }
.tree-view { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tn-root { display: flex; flex-direction: column; gap: 6px; }
.tn-rootlabel { font: 700 15px var(--font-display); color: var(--bone-dim); }
.tn-node { background: rgba(var(--well),.45); }
.tn-node > summary { padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
.tn-node > summary .t { font-weight: 600; }
.tn-body { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.tn-body:empty { display: none; }
.tn-branch { display: grid; grid-template-columns: 260px 1fr; gap: 10px; align-items: start; padding-left: 10px; border-left: 2px solid var(--steel-700); }
.tn-branch.tmod { border-left-color: var(--accent-text); }
.tn-branch.off { opacity: .45; }
.tn-weights { display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 12.5px; color: var(--bone-faint); }
.tn-weights label { display: flex; align-items: center; gap: 4px; }
.tn-weights input { width: 60px; padding: 3px 6px; }
.tn-pick { font: 700 15px var(--font-display); color: var(--accent-text); min-width: 46px; }
.tn-items { display: flex; flex-direction: column; gap: 4px; }
.tn-item { display: grid; grid-template-columns: 28px minmax(140px, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 4px 8px; border-radius: 6px; background: rgba(var(--lift),.02); }
.tn-item .ico { width: 26px; height: 26px; }
.tn-item.tmod { box-shadow: inset 3px 0 0 var(--info); }
.tn-item.added { box-shadow: inset 3px 0 0 var(--hazard); }
.tn-item.removed { opacity: .45; text-decoration: line-through; }
.tn-name { display: flex; align-items: center; gap: 6px; }
.bp-tag { font: 700 10px var(--font-display); padding: 0 4px; border-radius: 3px; background: #3a6ea8; color: #fff; }
.tn-amt { display: flex; align-items: center; gap: 4px; }
.tn-amt input, .tn-add input { width: 74px; padding: 3px 6px; }
.tn-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.tn-note { margin: 0; font-size: 12.5px; }
.tn-new { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
.tn-new + .tn-items { padding: 0 12px 10px; }
@media (max-width: 760px) { .tn-branch { grid-template-columns: 1fr; } .tn-item { grid-template-columns: 26px 1fr; } }
.loot-explain { max-width: 80ch; }
.loot-explain p { margin: 0; }
.loot-explain h4 { margin: 6px 0 0; font: 700 17px var(--font-display); }
.pic-failed summary { cursor: pointer; }
.pic-failed ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; max-height: 220px; overflow-y: auto; }

/* ---------- metal detector & missions */
.dig-rows { display: flex; flex-direction: column; gap: 3px; }
.dig-row { display: grid; grid-template-columns: 28px minmax(150px, 1fr) 64px 84px auto 70px; gap: 10px; align-items: center; padding: 4px 8px; border-radius: 6px; background: rgba(var(--lift),.02); }
.dig-row .ico { width: 26px; height: 26px; }
.dig-row input[type=number] { padding: 3px 6px; }
.dig-headrow { background: transparent; font-size: 12px; font-weight: 600; }
.dig-row.tmod { box-shadow: inset 3px 0 0 var(--info); }
.dig-row.added { box-shadow: inset 3px 0 0 var(--hazard); }
.dig-row.removed { opacity: .45; }
.dig-row.removed > span:nth-child(2) { text-decoration: line-through; }
.mis-choice { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--radius-m); border: 1px solid var(--steel-700); background: rgba(var(--well),.4); }
.mis-choice.tmod { border-left: 3px solid var(--hazard); }
.rw-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rw { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--steel-700); font-size: 13.5px; }
.rw .ico { width: 22px; height: 22px; }
.rw b { font-family: var(--font-display); }
.rw-other { padding: 3px 10px; color: var(--bone-dim); font-style: italic; }
.mis-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mis-row input[type=number] { width: 90px; padding: 4px 7px; }
@media (max-width: 760px) { .dig-row { grid-template-columns: 26px 1fr 60px; } }

.pk-img { width: 40px; height: 40px; flex: none; border-radius: 6px; background: var(--steel-900); border: 1px solid var(--steel-700); image-rendering: auto; }
.rock-preview { display: flex; gap: 10px; align-items: center; }
.rock-preview img { width: 96px; height: 96px; border-radius: 8px; background: var(--steel-900); border: 1px solid var(--steel-700); }

/* server health (dashboard) */
.health { margin-bottom: 24px; display: flex; flex-direction: column; gap: 14px; }
.health .seg { display: flex; gap: 4px; }
.hstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.hstat { display: flex; flex-direction: column; gap: 2px; }
.hstat b { font-size: 1.35rem; }
.hstat span { color: var(--bone-dim); font-size: 13px; }
.hstat small { color: var(--bone-faint); font-size: 12px; }
.hcharts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.hchart { position: relative; min-width: 0; }
.hchart svg { width: 100%; height: auto; display: block; }
.hlegend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; color: var(--bone-dim); margin-bottom: 4px; }
.hlegend b { color: var(--bone); }
.hlegend i, .htip i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.htip { position: absolute; top: 24px; background: var(--steel-900); border: 1px solid var(--steel-600); border-radius: var(--radius-s); padding: 6px 8px; font-size: 12px; pointer-events: none; min-width: 140px; }
.houtages summary { cursor: pointer; color: var(--bone-dim); }
.houtages table { margin-top: 8px; }
.houtages .down { color: var(--danger); }

/* server console */
.console-out { background: var(--steel-950); border: 1px solid var(--steel-700); border-radius: var(--radius-m) var(--radius-m) 0 0; height: calc(100vh - 330px); min-height: 280px; overflow: auto; padding: 8px 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.45; }
.console-out .cl { display: grid; grid-template-columns: 66px 64px 1fr; gap: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-out .cl time { color: var(--bone-faint); }
.console-out .cl i { font-style: normal; color: var(--bone-faint); }
.console-out .cl b { color: var(--info); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.console-out .cl.warning span, .console-out .cl.warning i { color: var(--accent-text); }
.console-out .cl.error span, .console-out .cl.error i { color: var(--danger); }
.console-out .cl.chat span { color: var(--ok); }
.console-out .cl.cmd span { color: var(--bone); font-weight: 600; }
.console-out .cl.result span { color: var(--bone-dim); }
.console-bar { display: flex; align-items: center; gap: 8px; border: 1px solid var(--steel-700); border-top: 0; border-radius: 0 0 var(--radius-m) var(--radius-m); background: var(--steel-900); padding: 6px 10px; }
.console-bar .prompt { color: var(--accent-text); font-family: ui-monospace, Consolas, monospace; }
.console-in { flex: 1; background: transparent; border: 0; color: var(--bone); font-family: ui-monospace, Consolas, monospace; font-size: 13px; outline: none; }
.banner.inline { padding: 2px 8px; margin: 0; }
.hstat.bad b { color: var(--danger); }

/* setup wizard */
.wiz { max-width: 640px; }
.wiz-step h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.wiz-step p { margin: 0 0 8px; }
.wiz-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hazard); color: var(--hazard-ink); font-size: 13px; font-weight: 700; }
.wiz-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.wiz-row small { color: var(--bone-dim); }
.wiz-row.ok b { color: var(--ok); } .wiz-row.bad b { color: var(--danger); } .wiz-row.wait b { color: var(--bone-dim); }


