/* Navigation console — full-window holographic plot with a left-hand
   tabbed navigator sidebar. Loaded only by the landing pages. */

.console-page,
body.console-page { height: 100vh; overflow: hidden; }

/* The [hidden] attribute must beat the component display rules below —
   otherwise hidden panels (fallback, loader) keep rendering and the
   fallback overlay swallows every pointer event. */
[hidden] { display: none !important; }

.console { position: fixed; inset: 0; z-index: 0; }
#holo-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* header floats top-right over the hologram */
.site-header--over {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 6;
  justify-content: flex-end;
  border-bottom: none;
  pointer-events: none;
}
.site-header--over a,
.site-header--over button { pointer-events: auto; }

/* ---- boot + fallback ---- */
.holo-loading {
  position: fixed; left: 0; right: 0; bottom: 26px;
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-mute);
}
.holo-loading::after {
  content: ""; margin-left: 12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: holo-blink 1.1s var(--ease) infinite;
}
@keyframes holo-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

.holo-fallback {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; z-index: 4; padding: 32px; text-align: center;
}
.holo-fallback .kicker, .holo-fallback .cta-row { justify-content: center; }

/* ---- HUD ---- */
.hud {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
  opacity: 0; transition: opacity 1.1s var(--ease) 0.3s;
}
.holo-ready .hud { opacity: 1; }
.hud-br {
  position: absolute; bottom: 26px; right: 34px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ============================================================
   INSTRUMENT SPINE + DRAWER
   A slim left gutter of the three facets (spine); the roster/detail slides out
   into a content-sized drawer only when a facet is live. No header, no footer —
   the scene breathes where the old floor-to-ceiling console used to sit.
   ============================================================ */
.nav-spine {
  position: fixed;
  left: 22px; top: 74px; bottom: 22px;
  width: 64px;
  z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(1, 5, 13, 0.74), rgba(1, 5, 13, 0.52));
  border: 1px solid var(--line);
  border-radius: 5px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.9s var(--ease) 0.4s, transform 0.9s var(--ease) 0.4s;
}
.holo-ready .nav-spine { opacity: 1; transform: translateX(0); }

/* ---- facet nodes (vertical) ---- */
.nav-spine .sb-tabs {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  width: 100%; border: none;
}
.sb-tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px;
  background: none; border: none; border-radius: 4px;
  cursor: pointer;
}
.sb-tab .sp-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-bright);
  font-size: 15px; color: var(--accent-dim);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.sb-tab .sp-name {
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.25s var(--ease);
}
.sb-tab:hover .sp-glyph { color: var(--accent); border-color: var(--accent-deep); }
.sb-tab:hover .sp-name { color: var(--ink-soft); }
.sb-tab.is-active .sp-glyph {
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(236, 202, 140, 0.05), 0 0 15px rgba(236, 202, 140, 0.18);
}
.sb-tab.is-active .sp-name { color: var(--accent); }
/* transponder ping on the Vessel node while underway (applyVesselChrome).
   Two-class selector to beat the base `.sb-signal { position: relative }`. */
.sb-tab .sp-signal { position: absolute; top: 7px; right: 12px; display: none; }
.sb-tab.is-underway .sp-signal { display: block; }

/* ---- captain avatar, pinned to the foot of the spine ---- */
.sb-avatar {
  margin-top: auto;
  flex: 0 0 42px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 17px; letter-spacing: 0.02em;
  color: var(--accent);
  background: radial-gradient(circle at 50% 34%, rgba(236, 202, 140, 0.16), rgba(236, 202, 140, 0.03));
  border: 1px solid var(--accent-deep);
  box-shadow: 0 0 0 4px rgba(236, 202, 140, 0.035);
  cursor: default;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.sb-avatar.is-linked { cursor: pointer; }
.sb-avatar.is-linked:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(236, 202, 140, 0.07); }

/* ---- slide-out drawer (roster / detail) ---- */
.nav-drawer {
  position: fixed;
  left: 98px; top: 74px;
  width: 340px; max-width: calc(100vw - 122px);
  max-height: calc(100vh - 96px);
  z-index: 5;
  background: #01050d;
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateX(-14px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.45s;
}
.holo-ready .nav-drawer.is-open {
  opacity: 1; visibility: visible; transform: translateX(0);
  transition: opacity 0.45s var(--ease) 0.1s, transform 0.45s var(--ease) 0.1s;
}

/* ---- content body ---- */
.sb-body { flex: 1; overflow-y: auto; padding: 22px 22px 26px; }
.sb-body p { font-size: 13.5px; color: var(--ink-soft); }

.sb-hint {
  font-family: var(--font-mono);
  font-size: 10.5px; line-height: 1.7; letter-spacing: 0.02em;
  color: var(--ink-mute); margin: 0 0 18px;
}

/* ---- tab roster: clickable items that fly the camera + open an overlay ---- */
.sb-list { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }

/* fleet grouping — "Your fleet" (by voyage state) and "The Expanse" (the pool) */
.sb-group-head {
  margin: 16px 0 2px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-dim);
}
.sb-group-head:first-child { margin-top: 2px; }
.sb-sub-head {
  margin: 8px 0 -2px;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute);
}
.sb-fleet-empty { margin: 6px 0 2px; line-height: 1.6; text-transform: none; letter-spacing: 0.02em; }
/* the vessel currently loaded in the viewport */
.sb-item.is-here { border-color: var(--accent-deep); }
.sb-item.is-here .sb-item-glyph { color: var(--accent); border-color: var(--accent-deep); }

/* approval inbox (captain) — a compact envelope node atop the spine */
.sb-inbox-entry {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  width: 38px; height: 38px; margin: 0 0 8px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--accent-dim);
  background: rgba(236, 202, 140, 0.05);
  border: 1px solid var(--accent-deep); border-radius: 50%; cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.sb-inbox-entry:hover { color: var(--ink); background: rgba(236, 202, 140, 0.1); }
.sb-inbox-n { font-size: 9px; letter-spacing: 0; color: var(--accent); }
.sb-inbox-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sb-inbox-acts { display: flex; gap: 6px; margin-left: auto; }
.sb-inbox-acts .ed-btn { padding: 5px 10px; font-size: 11px; }
.ov-onboard { margin: 4px 0 14px; }
.ov-onboard-btn { width: 100%; justify-content: center; }
.ov-crew-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--accent-dim); padding: 6px 12px; border: 1px solid var(--line-bright); border-radius: 2px;
}
.sb-item {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  padding: 14px;
  background: rgba(236, 202, 140, 0.04);
  border: 1px solid var(--line-bright); border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.sb-item:hover { border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.08); }
.sb-item.is-active { border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.09); }
.sb-item-glyph {
  flex: 0 0 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--accent-dim);
  border: 1px solid var(--line-bright); border-radius: 50%;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.sb-item:hover .sb-item-glyph,
.sb-item.is-active .sb-item-glyph { color: var(--accent); border-color: var(--accent-deep); }
/* place rows trade the diamond for the city's real silhouette (loadContour) —
   the circular frame stays; the outline sits inside it, inheriting the glyph
   colour so it brightens on hover with everything else. */
.sb-item-glyph .sb-glyph-map {
  width: 100%; height: 100%;
  padding: 5px; box-sizing: border-box;
  overflow: visible;
}
.sb-item-glyph .sb-glyph-map path {
  fill: rgba(236, 202, 140, 0.09);
  stroke: currentColor;
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;   /* crisp hairline regardless of city scale */
  stroke-linejoin: round;
}
.sb-item-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sb-item-name { font-size: 15px; color: var(--ink); }
.sb-item-meta {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ongoing-voyage marker — a gold "signal" that pings like a transponder.
   Gated on data-status="ongoing"; past vessels render no badge. */
.sb-item-status {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
.sb-item:not([data-status="ongoing"]) .sb-item-status { display: none; }
.sb-signal { position: relative; flex: 0 0 7px; width: 7px; height: 7px; }
.sb-signal::before,
.sb-signal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.sb-signal::before {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(236, 202, 140, 0.7);
}
.sb-signal::after {
  border: 1px solid var(--accent);
  animation: sb-signal-ping 1.9s var(--ease) infinite;
  will-change: transform, opacity;
}
@keyframes sb-signal-ping {
  0%        { transform: scale(1);   opacity: 0.65; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-signal::after { animation: none; }
}

.sb-back {
  display: inline-flex; align-items: center;
  background: none; border: none; padding: 0;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-soft); cursor: pointer;
  transition: color 0.3s var(--ease);
}
.sb-back:hover { color: var(--accent); }

.sb-kicker {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-dim); margin: 0 0 12px;
}
.sb-title {
  font-size: 22px; font-weight: 300; line-height: 1.2;
  letter-spacing: -0.015em; margin: 0 0 14px;
}
/* The lone tab-console heading — golden, shimmering, glistening: a bright sheen
   sweeps across a gold gradient clipped to the letterforms, with a soft glow. */
.sb-tab-title {
  font-family: var(--font-display);
  font-size: 22px; line-height: 1.15; letter-spacing: 0.01em;
  margin: 0 0 16px;
  background-image: linear-gradient(100deg,
    var(--accent-deep) 0%, var(--accent-dim) 22%, var(--accent) 40%,
    #fff7e6 50%, var(--accent) 60%, var(--accent-dim) 78%, var(--accent-deep) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 6px rgba(236, 202, 140, 0.28));
  animation: sb-title-shimmer 5.5s linear infinite;
}
@keyframes sb-title-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-tab-title { animation: none; background-position: 50% 0; }
}
.sb-lede { font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0 0 14px; }

.sb-readout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin: 20px 0 8px;
  background: var(--line); border: 1px solid var(--line);
}
.sb-readout > div { background: var(--bg-raised); padding: 11px 13px; }
.sb-readout dt {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 5px;
}
.sb-readout dd {
  margin: 0; font-family: var(--font-mono);
  font-size: 13.5px; color: var(--accent-dim);
}

.sb-section {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-soft);
  margin: 30px 0 6px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.sb-count { color: var(--accent-dim); float: right; }
.sb-empty, .sb-loading {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-mute); padding: 16px 0;
}

.sb-links { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }
.sb-links .cta { text-align: center; }

/* ---- destination: place card ---- */
.sb-place {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  padding: 14px;   /* match .sb-item so the Origin row matches the Destination row */
  background: rgba(236, 202, 140, 0.04);
  border: 1px solid var(--line-bright); border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.sb-place:hover { border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.08); }
.sb-place-glyph {
  flex: 0 0 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--accent-dim);
  border: 1px solid var(--line-bright); border-radius: 50%;
}
.sb-place:hover .sb-place-glyph { color: var(--accent); border-color: var(--accent-deep); }
.sb-place-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sb-place-name { font-size: 15px; color: var(--ink); }
.sb-place-meta {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* remove control — a quiet ✕ that surfaces on row hover. The vessel item is a
   <button>, so it's wrapped in .sb-row to give the absolute ✕ a positioned host. */
.sb-row { position: relative; width: 100%; }
.sb-remove {
  position: absolute; top: 7px; right: 7px; z-index: 3;
  width: 22px; height: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1;
  color: var(--ink-mute); background: var(--bg);
  border: 1px solid var(--line-bright); border-radius: 50%;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sb-place:hover .sb-remove, .sb-row:hover .sb-remove, .sb-remove:focus-visible {
  opacity: 1; pointer-events: auto;
}
.sb-remove:hover { color: var(--ink); border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.1); }
.sb-remove:disabled { opacity: 0.4; cursor: default; }

/* ---- destination: itinerary ---- */
.itin { list-style: none; padding: 0; margin: 18px 0 8px; }
.itin li {
  display: flex; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.itin li:last-child { border-bottom: none; }
.itin-date {
  flex: 0 0 62px;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--accent-dim);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.itin-what { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* ---- crew manifest ---- */
.crew {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.crew:last-child { border-bottom: none; }
.crew-top { display: flex; align-items: center; gap: 10px; }
.crew-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; }
.crew-name { font-family: var(--font-mono); font-size: 14px; color: var(--ink); flex: 1; }
.crew-role {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line-bright); border-radius: 2px;
  padding: 2px 7px;
}
.crew-sig { margin-top: 11px; }
.crew-sig-head {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.crew-pct { color: var(--accent-dim); }
.crew-bar { height: 3px; background: var(--line); overflow: hidden; }
.crew-bar i {
  display: block; height: 100%;
  background: var(--accent-dim);
  transition: width 0.7s var(--ease);
}

/* ============================================================
   IN-SPACE CONTENT OVERLAY
   Track mode (Seoul / Istanbul): a small card pinned to the body
   with a leader line. Fixed mode (Vessel): a taller docked card.
   ============================================================ */
.holo-overlay {
  position: fixed; inset: 0; z-index: 7;
  pointer-events: none;
}
/* when the planet rotates behind the camera, fade the leader line + anchor
   but keep the card itself visible so the user can keep reading */
.holo-overlay.ov-offscreen .ov-anchor,
.holo-overlay.ov-offscreen .ov-link { opacity: 0; }

.ov-anchor {
  position: absolute; left: 0; top: 0;
  width: 12px; height: 12px; margin: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(236, 202, 140, 0.12);
  box-shadow: 0 0 12px rgba(236, 202, 140, 0.55);
  transition: opacity 0.3s var(--ease);
}
.ov-anchor::after {
  content: ""; position: absolute; inset: 3.5px;
  border-radius: 50%; background: var(--accent);
}
.ov-link {
  position: absolute; left: 0; top: 0;
  height: 1px; transform-origin: 0 0;
  background: linear-gradient(90deg, var(--accent), rgba(236, 202, 140, 0.15));
  opacity: 0.7;
  transition: opacity 0.3s var(--ease);
}

.ov-card {
  position: absolute;
  width: 320px; max-width: calc(100vw - 32px);
  max-height: 64vh;
  display: flex; flex-direction: column;
  background: rgba(12, 17, 26, 0.72);
  -webkit-backdrop-filter: blur(11px);
          backdrop-filter: blur(11px);
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  overflow: hidden;
  animation: ov-in 0.4s var(--ease);
  transition: opacity 0.3s var(--ease);
}
.ov-card.is-dragging { transition: none; }
@keyframes ov-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.holo-overlay.is-fixed .ov-anchor,
.holo-overlay.is-fixed .ov-link { display: none; }
.holo-overlay.is-fixed .ov-card {
  top: 74px; right: 22px; left: auto !important;
  /* wide enough to read a map and a comfortable text measure side by side */
  width: 460px; max-height: calc(100vh - 120px);
  animation-name: ov-in-fixed;
}
@keyframes ov-in-fixed { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

.ov-bar {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px 13px 20px;
  border-bottom: 1px solid var(--line);
  touch-action: none;
}
.holo-overlay.is-track .ov-bar { cursor: move; }
.ov-card.is-dragging .ov-bar { cursor: grabbing; }
.ov-title {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-dim);
}
.ov-close {
  flex: 0 0 auto;
  background: none; border: 1px solid var(--line-bright);
  color: var(--ink-soft);
  width: 28px; height: 28px; border-radius: 2px;
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.ov-close:hover { border-color: var(--accent-deep); color: var(--ink); }
/* generous side margins — the card should read like a book page */
.ov-body { flex: 1; overflow-y: auto; padding: 22px 32px 30px; }
.ov-body p { font-size: 13.5px; color: var(--ink-soft); }
.ov-body > :first-child { margin-top: 0; }

/* data-driven block container (markdown text blocks for now;
   image + map blocks land in later phases) */
.ov-blocks { display: contents; }
.ov-text p { margin: 0 0 10px; }
.ov-text p:last-child { margin-bottom: 0; }
.ov-text ul, .ov-text ol {
  margin: 4px 0 12px;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.ov-text li { margin: 4px 0; line-height: 1.55; }
.ov-text strong { color: var(--ink); font-weight: 600; }
.ov-text em { font-style: italic; color: var(--ink-soft); }

/* "on sail" telemetry inside the Vessel card: a pinging transponder dot, the
   status word, and a gold pulse sweeping a transmission line — reads as a
   live, underway signal. */
.ov-underway {
  display: flex; align-items: center; gap: 11px;
  margin: 2px 0 18px;
}
.ov-underway-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.ov-uplink {
  position: relative; flex: 1; height: 1px;
  background: var(--line-bright);
  overflow: hidden;
}
.ov-uplink::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 38%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: ov-uplink-sweep 2.6s var(--ease) infinite;
  will-change: transform;
}
@keyframes ov-uplink-sweep {
  0%   { transform: translateX(-130%); }
  100% { transform: translateX(330%); }
}
@media (prefers-reduced-motion: reduce) {
  .ov-uplink::after { animation: none; left: 31%; }
}

/* ============================================================
   WIDE IN-GALAXY PANEL — timeline / training / journal
   ============================================================ */
.gx-scrim {
  position: fixed; top: 0; bottom: 0; right: 0;
  left: 98px;
  z-index: 8;
  background: rgba(5, 7, 11, 0.42);
  -webkit-backdrop-filter: blur(1.5px);
          backdrop-filter: blur(1.5px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
body.panel-open .gx-scrim { opacity: 1; pointer-events: auto; }

.gx-panel {
  position: fixed;
  top: 74px; right: 22px; bottom: 22px;
  left: 98px;
  z-index: 9;
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.62);
  animation: gx-in 0.42s var(--ease);
}
@keyframes gx-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.gx-panel-bar {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
.gx-panel-title {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-dim);
}
.gx-panel-close {
  background: none; border: 1px solid var(--line-bright);
  color: var(--ink-soft);
  width: 30px; height: 30px; border-radius: 2px;
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.gx-panel-close:hover { border-color: var(--accent-deep); color: var(--ink); }
.gx-panel-body { flex: 1; overflow: auto; }
.gx-content { padding: 30px 34px 46px; }
.gx-content[data-content="training"],
.gx-content[data-content="journal"] { max-width: 720px; margin: 0 auto; }
.gx-content .timeline-container { margin-top: 4px; }

@media (max-width: 760px) {
  .site-header--over { padding: 12px 18px; }
  /* spine becomes a horizontal instrument row up top; the drawer a bottom sheet */
  .nav-spine {
    left: 12px; right: auto; top: 44px; bottom: auto;
    width: auto; height: auto;
    flex-direction: row; align-items: center;
    padding: 5px 8px;
  }
  .nav-spine .sb-tabs { flex-direction: row; gap: 2px; }
  .sb-tab { padding: 6px 9px; }
  .sb-avatar { margin-top: 0; margin-left: 8px; }
  .nav-drawer {
    left: 12px; right: 12px; bottom: 12px; top: auto;
    width: auto; max-width: none; max-height: 56vh;
    transform: translateY(16px);
  }
  .holo-ready .nav-drawer.is-open { transform: translateY(0); }
  .hud-br { bottom: calc(56vh + 20px); right: 16px; }
  .holo-loading { bottom: calc(56vh + 20px); }
  .gx-scrim { left: 0; }
  .gx-panel {
    top: 44px; left: 10px; right: 10px; bottom: calc(56vh + 16px);
  }
  .gx-content { padding: 22px 16px 32px; }

  /* overlay is forced to fixed mode on narrow screens — dock it above the sheet */
  .holo-overlay.is-fixed .ov-card {
    top: 44px; left: 10px !important; right: 10px;
    width: auto; max-height: calc(40vh - 60px);
  }
}

/* ============================================================
   EPIC reading mode — the journey as chapters. The console hides;
   a top identity bar + a bottom reading card frame the traversal.
   ============================================================ */
body.epic-on #nav-sidebar,
body.epic-on #nav-drawer,
body.epic-on #holo-overlay,
body.epic-on #gx-panel { display: none; }

.epic-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 22px;
  background: linear-gradient(to bottom, rgba(4, 6, 16, 0.85), transparent);
}
.epic-kicker {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent);
}
.epic-vessel { font-size: 14px; color: var(--ink-soft); letter-spacing: 0.04em; }
/* the way out — always a clear, labeled target (no keyboard on touch) */
.epic-close {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  line-height: 1; color: var(--ink-soft);
  background: rgba(12, 17, 24, 0.7);
  border: 1px solid var(--line-bright); border-radius: 999px;
  cursor: pointer; padding: 8px 14px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.epic-close:hover { color: var(--ink); border-color: var(--accent-deep); background: rgba(20, 27, 38, 0.9); }
.epic-close-x { font-size: 17px; line-height: 0; }

.epic-card {
  position: fixed; z-index: 80;
  left: 50%; bottom: 26px; transform: translateX(-50%);
  width: min(580px, calc(100vw - 32px));
  max-height: 46vh; overflow-y: auto;
  padding: 20px 30px 16px;
  background: rgba(12, 17, 24, 0.93);
  border: 1px solid var(--line-bright); border-radius: 3px;
  opacity: 0; translate: 0 10px;
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
}
.epic-card.is-in { opacity: 1; translate: 0 0; }
.epic-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
}
.epic-ch-kicker {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--accent-dim);
}
.epic-ch-date {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 10.5px; color: var(--ink-mute);
}
.epic-ch-title { margin: 0 0 10px; font-size: 21px; letter-spacing: 0.02em; color: var(--ink); }
.epic-ch-body { display: flex; flex-direction: column; gap: 10px; }
.epic-empty { margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.epic-telemetry {
  display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; margin: 2px 0 4px;
}
.epic-telemetry dt {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute); align-self: center;
}
.epic-telemetry dd {
  margin: 0; font-size: 14px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.epic-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.epic-prev, .epic-next {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--accent-dim); background: none;
  border: 1px solid var(--line-bright); border-radius: 2px;
  padding: 4px 12px; cursor: pointer;
}
.epic-prev:hover:not(:disabled), .epic-next:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-deep); }
.epic-prev:disabled, .epic-next:disabled { opacity: 0.3; cursor: default; }
.epic-dots { display: flex; gap: 8px; }
.epic-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-bright); border: 0; padding: 0; cursor: pointer;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.epic-dot.is-now { background: var(--accent); transform: scale(1.25); }
/* the epic is the headline act of a vessel overlay — a full-width CTA that
   reads as the primary call, set apart from the subdued admin buttons below */
.ov-epic-btn {
  display: block; width: 100%;
  margin: 4px 0 18px;
  padding: 13px 16px;
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: 0.04em; text-align: center;
  color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px;
  cursor: pointer;
  transition: filter 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.ov-epic-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 22px -8px var(--accent);
}

/* ============================================================
   MILESTONE RAIL — the journey as a straight knotwork band, a
   separate piece floating left of the vessel overlay.
   ============================================================ */
.ms-rail {
  position: fixed;
  z-index: 8;                 /* above the scene (overlay sits at 7) */
  pointer-events: auto;
}
@media (max-width: 760px) { .ms-rail { display: none; } }
.ms-rail canvas { width: 100%; height: 100%; display: block; }
.ms-pop {
  position: absolute;
  right: calc(100% + 2px);
  transform: translateY(-50%);
  display: flex; align-items: center; gap: 10px;
  max-width: 240px;
  padding: 9px 12px;
  background: rgba(9, 12, 18, 0.96);
  border: 1px solid var(--line-bright); border-left: 2px solid var(--accent-deep);
  border-radius: 2px;
  pointer-events: none;
  z-index: 5;
}
.ms-pop img {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: 2px; flex: 0 0 52px;
}
.ms-pop-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ms-pop-date {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 9.5px; letter-spacing: 0.16em; color: var(--accent-dim);
}
.ms-pop-title { font-size: 12.5px; color: var(--ink); line-height: 1.4; }

/* bead / signal hover tip — follows the cursor over the 3D scene */
.bead-tip {
  position: fixed; z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 11px; max-width: 240px;
  background: rgba(9, 12, 18, 0.95);
  border: 1px solid var(--line-bright); border-left: 2px solid var(--accent-deep);
  border-radius: 2px;
  pointer-events: none;
}
.bead-tip-date {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 9px; letter-spacing: 0.16em; color: var(--accent-dim);
}
.bead-tip-title { font-size: 12px; color: var(--ink); line-height: 1.4; }

/* ============================================================
   ORIGIN — hierarchical place chips + the common-ground detail.
   An origin is country/region/district/locality. The chip group shows the
   most-specific level; broader tiers reveal on hover/focus. Opening a place
   docks a map the chips fly, plus the roster of people who share each level.
   ============================================================ */
.oc {
  display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap;
  vertical-align: middle;
}
.oc-chip {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.01em; line-height: 1;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line-bright); background: transparent;
  color: var(--accent-dim); cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease), max-width 0.35s var(--ease),
              opacity 0.3s var(--ease), padding 0.3s var(--ease), margin 0.3s var(--ease);
}
/* the default chip wins over the per-tier color below (district is now primary) */
.oc-chip.oc-now { color: var(--ink); border-color: var(--accent-deep); }
/* broader tiers progressively quieter, and tucked away until hover */
.oc-tier-district { color: var(--ink-soft); }
.oc-tier-region   { color: var(--ink-soft); }
.oc-tier-country  { color: var(--ink-mute); }
.oc-rest {
  max-width: 0; padding-left: 0; padding-right: 0; margin: 0 -3px;
  opacity: 0; overflow: hidden; white-space: nowrap; pointer-events: none;
  border-color: transparent;
}
.oc:hover .oc-rest, .oc:focus-within .oc-rest {
  max-width: 240px; padding-left: 8px; padding-right: 8px; margin: 0;
  opacity: 1; pointer-events: auto; border-color: var(--line-bright);
}
/* grouped origin (roster): all levels are .oc-rest, so the row drives the
   reveal — the chip group itself has no width to hover when collapsed */
.sb-place:hover .oc-grouped .oc-rest,
.sb-place:focus-within .oc-grouped .oc-rest {
  max-width: 240px; padding-left: 8px; padding-right: 8px; margin: 0;
  opacity: 1; pointer-events: auto; border-color: var(--line-bright);
}
button.oc-chip:hover { color: var(--accent); border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.08); }
.oc-chip.oc-active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* public extent: filled tiers are shown publicly; dashed tiers are private
   detail the owner can promote by clicking */
.oc-chip.is-public {
  color: var(--ink); border-color: var(--accent-deep);
  background: rgba(236, 202, 140, 0.10);
}
.oc-chip.is-private {
  color: var(--ink-mute); border-style: dashed; border-color: var(--line-bright);
}
button.oc-chip.is-private:hover { color: var(--accent); border-style: solid; border-color: var(--accent-deep); }

/* origin headline: most-specific public level (large) + the city (small) */
.oc-head { display: inline-flex; align-items: baseline; gap: 0.4em; flex-wrap: wrap; }
.oc-head-sub {
  font-size: 0.66em; color: var(--ink-mute);
  letter-spacing: 0.04em; font-variant-numeric: normal;
}

.sb-item.is-clickable { cursor: pointer; }

/* origin detail (docked overlay body) */
.od { display: flex; flex-direction: column; gap: 12px; }
.od-chips { display: flex; }
.od-hint {
  margin: -4px 0 0; font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.04em; color: var(--ink-mute);
}
.od-map {
  width: 100%; height: clamp(180px, 32vh, 300px);
  border: 1px solid var(--line-bright); border-radius: 3px; overflow: hidden;
  background: #0b0e14;
}
.od-map .geo-map-canvas, .od-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.od-empty {
  margin: 0; padding: 16px; font-size: 12px; color: var(--ink-mute); text-align: center;
}

/* --- origin: city name + dossier + note ------------------------------- */
.od-title {
  margin: 2px 0 0; font-family: var(--font-display);
  font-size: 22px; line-height: 1.15; letter-spacing: 0.01em; color: var(--ink);
}
.od-dossier-wrap, .od-desc-wrap { display: flex; flex-direction: column; gap: 6px; }
.od-dossier-head { display: flex; align-items: center; justify-content: space-between; }
.od-dossier-title {
  font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--ink-mute);
}
.od-dossier {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.od-dossier-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 6px 1px; border-bottom: 1px solid var(--line);
}
.od-dossier-k {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-mute); white-space: nowrap;
}
.od-dossier-v {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink);
  text-align: right; font-variant-numeric: tabular-nums;
}
.od-dossier-v.od-clock { color: var(--accent); letter-spacing: 0.02em; }
.od-dossier-empty { padding: 8px 0; text-align: left; }

/* --- port traffic: inbound / outbound vessels through this city -------- */
.od-traffic { display: flex; flex-direction: column; gap: 4px; }
.od-traffic:empty { display: none; }
.od-tr-group { display: flex; flex-direction: column; }
.od-tr-dir {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-dim);
  padding: 6px 1px 2px; border-bottom: 1px solid var(--line);
}
.od-tr-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 7px 1px; margin: 0;
  font: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
}
button.od-tr-row { cursor: pointer; }
button.od-tr-row:hover .od-tr-name { color: var(--accent); }
.od-tr-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.od-tr-name {
  font-size: 12.5px; color: var(--ink); line-height: 1.3;
  transition: color 0.2s var(--ease);
}
.od-tr-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.od-tr-status {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--ink-mute);
}
.od-tr-status.is-underway { color: var(--accent); }
.od-tr-status.is-arrived  { color: var(--ink-soft); }
.od-tr-empty { padding: 6px 1px 8px; font-size: 11px; text-align: left; }

.od-mini-btn {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--ink-mute); background: none; border: 0; padding: 2px 4px; cursor: pointer;
  transition: color 0.2s var(--ease);
}
.od-mini-btn:hover { color: var(--accent); }
.od-fetch-btn { align-self: flex-start; }

.od-desc {
  margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft);
  white-space: pre-wrap;
}
.od-desc-edit { align-self: flex-start; }

/* dossier / note editors */
.od-dossier-edit { display: flex; flex-direction: column; gap: 6px; }
.od-edit-row { display: flex; align-items: center; gap: 8px; }
.od-edit-k {
  flex: 0 0 84px; font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute);
}
.od-dossier-edit input, .od-desc-input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink);
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line-bright);
  border-radius: 2px; padding: 5px 7px;
}
.od-dossier-edit input.od-edit-half { flex-basis: 0; }
.od-dossier-edit input:focus, .od-desc-input:focus { outline: none; border-color: var(--accent-deep); }
.od-desc-input { width: 100%; resize: vertical; line-height: 1.5; }
.od-edit-acts { display: flex; gap: 8px; margin-top: 2px; }

.od-kin { display: flex; flex-direction: column; gap: 8px; }
.od-kin-body { display: flex; flex-direction: column; gap: 12px; }
.od-kin-tier {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.od-kin-tier.is-active { border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.05); }
.od-kin-tier-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 0 0 8px;
}
.od-kin-tier-name { font-family: var(--font-display); font-size: 14px; color: var(--ink); }
.od-kin-tier-meta {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-dim); white-space: nowrap;
}
.od-kin-people { display: flex; flex-wrap: wrap; gap: 6px; }
.od-kin-person {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 3px; border-radius: 999px;
  border: 1px solid var(--line-bright); background: rgba(12, 17, 24, 0.6);
}
.od-kin-ava {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}
.od-kin-ava img { width: 100%; height: 100%; object-fit: cover; }
.od-kin-ava-blank {
  background: var(--line-bright); color: var(--ink-soft);
  font-family: var(--font-display); font-size: 10px; text-transform: uppercase;
}
.od-kin-name { font-size: 12px; color: var(--ink-soft); }
/* a person chip is a doorway to their record */
button.od-kin-person { font: inherit; cursor: pointer; transition: border-color 0.25s var(--ease), background 0.25s var(--ease); }
button.od-kin-person:hover { border-color: var(--accent-deep); background: rgba(236, 202, 140, 0.08); }
button.od-kin-person:hover .od-kin-name { color: var(--ink); }

/* Origin galaxy scope switcher (mine / crew / everyone) */
.sb-scope {
  display: flex; gap: 4px; margin: 0 0 14px;
  padding: 3px; border: 1px solid var(--line-bright); border-radius: 999px;
}
.sb-scope-btn {
  flex: 1; padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); background: none; border: 0; border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.sb-scope-btn:hover { color: var(--ink-soft); }
.sb-scope-btn.is-active { color: var(--bg); background: var(--accent); }

/* scope switcher docked over the viewport — it drives the whole galaxy, so it
   lives above the scene, centered at the top, not inside the console roster */
.scope-dock {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 6; pointer-events: none;
}
.scope-dock .sb-scope {
  margin: 0; pointer-events: auto;
  background: rgba(4, 6, 16, 0.72);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.8);
}
@media (max-width: 760px) {
  .scope-dock { top: 64px; }   /* clear the header on narrow viewports */
}

/* domain (journey-theme) filter bar — hidden until something is tagged */
.sb-domains { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.sb-domains:empty { display: none; }
.sb-domain-btn {
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); background: none;
  border: 1px solid var(--line-bright); border-radius: 999px; cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.sb-domain-btn:hover { color: var(--ink-soft); border-color: var(--accent-deep); }
.sb-domain-btn.is-active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
