/*
 * Galactic Atlas: interface styling.
 *
 * The layout follows the Real Universe Explorer: floating panels over a
 * full-screen 3D view, a browser on the left, an info card on the right
 * and a status bar below. The look is an Imperial cogitator: near-black
 * void, brass rules, Cinzel capitals for names and monospaced readouts.
 *
 * Colour carries meaning in one place: badges. Estimated values are amber,
 * generated values violet, schematic values blue, and unrecorded values
 * dimmed and italic.
 */

:root {
  --void:        #030409;
  --panel:       rgba(10, 11, 16, 0.88);
  --panel-solid: #0d0e14;
  --edge:        rgba(201, 162, 79, 0.2);
  --edge-bright: rgba(227, 191, 106, 0.6);

  --text:        #e6dfcf;
  --text-dim:    #a59d8b;
  --text-faint:  #6d6758;

  --accent:      #e3bf6a;
  --accent-dim:  rgba(227, 191, 106, 0.13);
  --blood:       #b8312f;
  --blue:        #6aa6d8;
  --violet:      #b49af0;
  --amber:       #f0b860;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 2px;
  --hud-gap: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--void); color: var(--text);
  font-family: var(--sans); font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Canvas and overlays -------------------------------------------------- */

#scene-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
#label-layer { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }

.space-label {
  position: absolute; top: 0; left: 0; pointer-events: auto;
  padding: 1px 6px;
  background: rgba(5, 6, 10, 0.55);
  border: 0; border-left: 1px solid var(--edge);
  border-radius: 1px;
  color: var(--text-dim);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em;
  white-space: nowrap; cursor: pointer;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.space-label:hover { color: var(--accent); border-left-color: var(--accent); background: rgba(5, 6, 10, 0.9); }
.space-label.is-static { pointer-events: none; }
.space-label.is-major { color: var(--text); border-left-color: rgba(227, 191, 106, 0.6); font-size: 11px; }
.space-label.is-minor, .space-label.is-generated { color: var(--text-faint); font-size: 9.5px; }
.space-label.is-generated { font-style: italic; border-left-style: dashed; }
.space-label.is-documented { color: var(--text); border-left-color: rgba(227, 191, 106, 0.55); }
.space-label.is-moon { font-size: 9.5px; }
.space-label.is-star { color: #f2dfae; border-left: 0; background: none; font-size: 10px; }
.space-label.is-selected { color: var(--void); background: var(--accent); border-left-color: var(--accent); }
.space-label.is-segmentum {
  background: none; border: 0; font-family: var(--display); font-size: 15px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: rgba(227, 191, 106, 0.62);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
}
.space-label.is-segmentum:hover { color: var(--accent); }
.space-label.is-region {
  background: none; border: 0; font-family: var(--display); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(190, 200, 220, 0.45); font-style: normal;
}
.space-label.is-era {
  background: none; border: 0; font-family: var(--display); font-size: 13px; letter-spacing: 0.28em;
  text-transform: uppercase; color: rgba(225, 150, 230, 0.6);
}
.space-label.is-warp {
  background: rgba(30, 6, 30, 0.5); border: 0; border-bottom: 1px solid rgba(214, 90, 220, 0.5);
  font-family: var(--display); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #e9a6f0;
}
.space-label.is-sector {
  background: none; border: 0; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(159, 183, 208, 0.62);
}

#transition-veil {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(227, 191, 106, 0.12), var(--void) 62%);
  opacity: 0; transition: opacity 0.38s ease-in;
}
#transition-veil.is-active { opacity: 1; transition: opacity 0.36s ease-out; }

/* --- HUD panels ----------------------------------------------------------- */

.hud {
  position: fixed; z-index: 10;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hud-top {
  top: var(--hud-gap); left: var(--hud-gap); right: var(--hud-gap);
  height: 48px; display: flex; align-items: center; gap: 16px; padding: 0 12px;
}

.brand {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  background: none; border: 0; cursor: pointer; padding: 4px 2px;
}
.brand-mark {
  width: 14px; height: 14px; transform: rotate(45deg);
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 10px rgba(227, 191, 106, 0.5), inset 0 0 0 3px var(--void), inset 0 0 0 7px var(--accent);
}
.brand-text {
  font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
}
.brand:hover .brand-text { color: #fff0c8; }

.breadcrumbs { flex: 1; display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.breadcrumbs::-webkit-scrollbar { display: none; }
.crumb {
  background: none; border: 0; padding: 3px 2px; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); white-space: nowrap;
  border-bottom: 1px solid transparent;
}
button.crumb:hover { color: var(--accent); border-bottom-color: var(--edge-bright); }
.crumb.is-current { color: var(--text); }
.crumb-separator { color: var(--text-faint); }

.era-switch { display: flex; border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.era-button {
  background: none; border: 0; padding: 6px 11px; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-dim);
}
.era-button + .era-button { border-left: 1px solid var(--edge); }
.era-button:hover { color: var(--accent); }
.era-button.is-active { background: var(--accent); color: var(--void); font-weight: 600; }

.top-actions { display: flex; gap: 7px; flex-shrink: 0; }
.ghost-button {
  background: rgba(227, 191, 106, 0.05); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 6px 11px; color: var(--text-dim); cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.ghost-button:hover { color: var(--accent); border-color: var(--edge-bright); background: var(--accent-dim); }

/* --- Left browser --------------------------------------------------------- */

.hud-left {
  top: 76px; left: var(--hud-gap); bottom: 62px; width: 320px;
  display: flex; flex-direction: column; overflow: hidden;
}

.search-block { padding: 12px; border-bottom: 1px solid var(--edge); position: relative; }
#search-input {
  width: 100%; background: rgba(3, 4, 9, 0.85); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 9px 11px; color: var(--text); font-family: var(--mono); font-size: 12px; outline: none;
}
#search-input:focus { border-color: var(--edge-bright); box-shadow: 0 0 0 3px rgba(227, 191, 106, 0.08); }
#search-input::placeholder { color: var(--text-faint); }

.search-results { margin-top: 8px; max-height: 320px; overflow-y: auto; display: none; }
.search-results.has-results { display: block; }
.result {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px;
  width: 100%; background: none; border: 0; border-left: 2px solid transparent;
  padding: 6px 8px; text-align: left; cursor: pointer;
}
.result:hover { background: rgba(227, 191, 106, 0.07); border-left-color: var(--accent); }
.result-kind {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid var(--edge); border-radius: 1px; padding: 2px 0; text-align: center;
}
.kind-w { color: var(--accent); border-color: rgba(227, 191, 106, 0.4); }
.kind-u { color: var(--violet); border-color: rgba(180, 154, 240, 0.35); }
.kind-s { color: #f2dfae; }
.kind-c { color: #9fb7d0; border-color: rgba(159, 183, 208, 0.35); }
.kind-g { color: var(--accent); }
.kind-f { color: #e9a6f0; border-color: rgba(214, 90, 220, 0.4); }
.kind-p { color: #e48c74; border-color: rgba(228, 140, 116, 0.4); }
.result-name { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-secondary { font-family: var(--mono); font-size: 9.5px; color: var(--text-faint); white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; border-bottom: 1px solid var(--edge); flex-shrink: 0; }
.tab-button {
  flex: 1; background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 4px; cursor: pointer;
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint);
}
.tab-button:hover { color: var(--text-dim); }
.tab-button.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; flex: 1; overflow-y: auto; padding: 12px; }
.tab-panel.is-active { display: block; }

.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.count { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }

.mini-select, .field select, .field input {
  background: rgba(3, 4, 9, 0.85); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 5px 7px; color: var(--text-dim); font-family: var(--mono); font-size: 10.5px; outline: none; min-width: 0;
}
.mini-select:focus, .field input:focus, .field select:focus { border-color: var(--edge-bright); color: var(--text); }

.world-list { display: flex; flex-direction: column; gap: 1px; }
.world-row {
  display: flex; gap: 10px; align-items: center;
  background: none; border: 0; border-left: 2px solid transparent;
  padding: 6px 8px; text-align: left; cursor: pointer;
}
.world-row:hover { background: rgba(227, 191, 106, 0.06); border-left-color: var(--accent); }
.world-row.is-selected { background: rgba(227, 191, 106, 0.11); border-left-color: var(--accent); }
.world-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.world-row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.world-row-name { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-row.is-generated .world-row-name { color: var(--text-dim); font-style: italic; }
.world-row-meta { display: flex; gap: 5px; min-width: 0; }
.chip {
  font-family: var(--mono); font-size: 9.5px; color: var(--text-faint);
  background: rgba(227, 191, 106, 0.06); border-radius: 1px; padding: 1px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.world-row.is-generated .chip-where { color: var(--violet); }

.list-note, .hint {
  font-size: 10.5px; color: var(--text-faint); line-height: 1.55;
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--edge);
}

.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.field-wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 11.5px; color: var(--text-dim); }
.check input { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.layer-heading {
  margin: 14px 0 4px; font-family: var(--display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint);
}
.layer-heading:first-child { margin-top: 0; }
.time-block { margin-top: 8px; }
#orbit-speed { width: 100%; accent-color: var(--accent); }
.legend { margin-top: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-dim); padding: 2px 0; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }

/* --- Right info card ------------------------------------------------------ */

.hud-right {
  top: 76px; right: var(--hud-gap); bottom: 62px; width: 372px;
  overflow-y: auto; padding: 0; display: none;
}
.hud-right.is-open { display: block; }

.inspector-header {
  --card-accent: var(--accent);
  padding: 18px 44px 14px 18px; border-bottom: 1px solid var(--edge);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-accent) 10%, transparent), transparent);
  border-top: 2px solid var(--card-accent);
}
.inspector-kind {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--card-accent); margin-bottom: 7px;
}
.inspector-header h2 {
  margin: 0; font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: 0.03em; line-height: 1.2;
}
.inspector-subtitle { margin: 7px 0 0; font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; padding: 2px 7px;
  border: 1px solid var(--edge); border-radius: 1px; color: var(--text-dim);
}
.tag-faction { color: var(--card-accent); border-color: color-mix(in srgb, var(--card-accent) 45%, transparent); }
.tag-good { color: #9fd49a; border-color: rgba(159, 212, 154, 0.35); }
.tag-muted { color: var(--text-faint); }
.tag-generated { color: var(--violet); border-color: rgba(180, 154, 240, 0.4); }

.inspector-close {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px;
  background: none; border: 1px solid var(--edge); border-radius: var(--radius);
  color: var(--text-faint); font-size: 15px; line-height: 1; cursor: pointer;
}
.inspector-close:hover { color: var(--accent); border-color: var(--edge-bright); }

.banner { margin: 12px 18px 0; padding: 10px 12px; font-size: 11px; line-height: 1.55; border-radius: var(--radius); }
.banner-generated { color: #d9cdf7; background: rgba(180, 154, 240, 0.08); border: 1px solid rgba(180, 154, 240, 0.3); }

.inspector-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--edge); }
.action {
  background: rgba(227, 191, 106, 0.05); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 7px 11px; cursor: pointer; text-decoration: none;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-dim);
  transition: all 0.14s;
}
.action:hover { color: var(--accent); border-color: var(--edge-bright); background: var(--accent-dim); }
.action.is-primary { color: var(--void); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.action.is-primary:hover { background: #f4d690; color: var(--void); }

.planet-preview { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--edge); }
.planet-orb {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset -14px -10px 30px rgba(0, 0, 0, 0.6), 0 0 18px -6px rgba(227, 191, 106, 0.3);
}
.planet-preview-caption { font-size: 10.5px; color: var(--text-faint); line-height: 1.55; font-style: italic; }

.panel-section { padding: 14px 18px; border-bottom: 1px solid var(--edge); }
.panel-section h3 {
  margin: 0 0 10px; font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.section-note { margin: 0 0 10px; font-size: 11px; line-height: 1.6; color: var(--text-dim); }

.fact { display: grid; grid-template-columns: minmax(96px, 0.8fr) 1.4fr; gap: 4px 12px; padding: 5px 0; align-items: baseline; }
.fact + .fact { border-top: 1px dashed rgba(201, 162, 79, 0.08); }
.fact.is-wide { grid-template-columns: 1fr; gap: 3px; }
.fact-label { font-size: 10px; font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); }
.fact-value { font-size: 12px; color: var(--text); line-height: 1.5; }
.fact:not(.is-wide) .fact-value { text-align: right; }
.fact-value.is-unknown { color: var(--text-faint); font-style: italic; }
.fact-note {
  grid-column: 1 / -1; font-size: 10.5px; line-height: 1.55; color: var(--text-faint);
  border-left: 1px solid var(--edge); padding-left: 8px; margin-top: 2px; word-break: break-word;
}
.inline-link {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent);
  border-bottom: 1px dotted rgba(227, 191, 106, 0.5); font: inherit; text-align: inherit;
}
.inline-link:hover { color: #fff0c8; }

.badge {
  display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 1px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase;
  vertical-align: middle; font-style: normal;
}
.badge-estimated { color: var(--amber); background: rgba(240, 184, 96, 0.12); border: 1px solid rgba(240, 184, 96, 0.3); }
.badge-generated { color: var(--violet); background: rgba(180, 154, 240, 0.12); border: 1px solid rgba(180, 154, 240, 0.3); }
.badge-schematic { color: var(--blue); background: rgba(106, 166, 216, 0.12); border: 1px solid rgba(106, 166, 216, 0.3); }

.era-list { display: flex; flex-direction: column; gap: 6px; }
.era-item { padding: 8px 10px; border: 1px solid var(--edge); border-radius: var(--radius); }
.era-item.is-current { border-color: var(--edge-bright); background: var(--accent-dim); }
.era-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }
.era-item.is-current .era-label { color: var(--accent); }
.era-status { font-size: 11.5px; color: var(--text); line-height: 1.5; }
.era-status.is-unknown { color: var(--text-faint); font-style: italic; }
.era-event { font-size: 11.5px; color: #f0d9a8; margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--blood); line-height: 1.5; }

.world-strip { display: flex; flex-wrap: wrap; gap: 5px; }
.world-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(227, 191, 106, 0.05); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 4px 8px; cursor: pointer; font-family: var(--mono); font-size: 10.5px; color: var(--text-dim);
}
.world-chip:hover { color: var(--accent); border-color: var(--edge-bright); background: var(--accent-dim); }
.world-chip.is-generated { border-style: dashed; color: var(--text-faint); font-style: italic; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.source-list { margin: 0; padding: 0 0 0 16px; font-size: 10.5px; line-height: 1.7; word-break: break-all; }
.source-list a { color: var(--text-dim); }
.source-list a:hover { color: var(--accent); }

.inspector-footer { padding: 12px 18px 20px; font-family: var(--mono); font-size: 9.5px; color: var(--text-faint); }

/* --- Status bar ----------------------------------------------------------- */

.hud-bottom {
  left: var(--hud-gap); right: var(--hud-gap); bottom: var(--hud-gap);
  height: 36px; display: flex; align-items: center; gap: 22px; padding: 0 16px; overflow: hidden;
}
.status-item { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.status-grow { flex: 1; }
.status-key { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); flex-shrink: 0; }
.status-value { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-note { font-size: 10px; color: var(--text-faint); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 36%; }

/* --- Loading and toast ---------------------------------------------------- */

.loading {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #14110a, var(--void) 70%);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-inner { text-align: center; max-width: 400px; padding: 24px; }
.loading-mark {
  width: 34px; height: 34px; margin: 0 auto 22px; transform: rotate(45deg);
  border: 2px solid var(--accent); box-shadow: inset 0 0 0 6px var(--void), inset 0 0 0 14px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.loading-title { font-family: var(--display); font-size: 18px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.loading-message { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 14px; }
.loading-track { height: 1px; background: var(--edge); overflow: hidden; }
.loading-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; box-shadow: 0 0 8px var(--accent); }
.loading-note { margin-top: 20px; font-size: 10px; color: var(--text-faint); line-height: 1.6; }

.toast {
  position: fixed; bottom: 66px; left: 50%; transform: translateX(-50%) translateY(8px); z-index: 50;
  background: var(--panel-solid); border: 1px solid var(--edge-bright); border-radius: var(--radius);
  padding: 9px 16px; font-family: var(--mono); font-size: 11px; color: var(--text);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; max-width: 70vw; text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201, 162, 79, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201, 162, 79, 0.35); }

/* --- Narrow screens ------------------------------------------------------- */

@media (max-width: 1180px) {
  .hud-left { width: 272px; }
  .hud-right { width: 320px; }
  .status-note { display: none; }
}

@media (max-width: 860px) {
  :root { --hud-gap: 8px; }
  .hud-top { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .breadcrumbs { order: 3; width: 100%; flex-basis: 100%; }
  .brand-text { font-size: 11px; }
  .hud-left { top: auto; bottom: 52px; left: var(--hud-gap); right: var(--hud-gap); width: auto; max-height: 42vh; }
  /* The card slides over the browser rather than competing with it. */
  .hud-right { top: auto; bottom: 52px; left: var(--hud-gap); right: var(--hud-gap); width: auto; max-height: 58vh; z-index: 12; }
  .hud-bottom { gap: 12px; }
  .status-item:not(.status-grow) { display: none; }
}
