/* Glass Earth – Styles
   Schriften lokal gehostet (DSGVO: keine Verbindung zu Google Fonts). */
@font-face { font-family: "Michroma"; src: url("../fonts/michroma-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Bewusst nur ein (dunkles) Theme: Weltraum-Szene */
:root {
  color-scheme: dark;
  --space: #04060c;
  --glass: rgba(7, 12, 22, 0.66);
  --glass-hi: rgba(10, 17, 31, 0.84);
  --line: rgba(146, 190, 240, 0.16);
  --line-hi: rgba(146, 200, 255, 0.34);
  --ink: #e8f0fb;
  --ink-2: #9db0cc;
  --ink-3: #62748f;
  --ice: #7be6ff;
  --pink: #ff6fd8;
  --amber: #ffc56a;
  --warn: #ffb35c;
  --pcol: #6fd8ff;
  --scol: #ff72c8;
  --grad-border: linear-gradient(140deg, rgba(123, 230, 255, 0.5), rgba(255, 111, 216, 0.22) 45%, rgba(123, 230, 255, 0.08) 75%, rgba(255, 111, 216, 0.3));
  --font-display: "Michroma", "Eurostile", "Microgramma", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gap: 16px;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  height: 100%;
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font: 400 14px/1.45 var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

/* Glas-Panels mit Farbverlauf-Rand */
.dock, .card, .feed {
  background:
    linear-gradient(180deg, rgba(14, 24, 42, 0.78), rgba(6, 10, 19, 0.7)) padding-box,
    var(--grad-border) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---------- Kopfzeile ---------- */
.hud {
  position: fixed;
  top: calc(var(--st) + 14px);
  left: calc(var(--sl) + var(--gap));
  right: calc(var(--sr) + var(--gap));
  display: grid;
  gap: 4px;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}
.toprow { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.hud .back { font: 400 12px/1 var(--font-mono); color: var(--ink-2); text-decoration: none; pointer-events: auto; }
.hud .back:hover, .hud .back:focus-visible { color: var(--ink); }
.lang {
  display: inline-flex; gap: 2px; padding: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(8, 13, 23, 0.55);
  pointer-events: auto; text-shadow: none;
}
.lang button { border: 0; background: transparent; border-radius: 999px; padding: 5px 10px; font: 500 11px/1 var(--font-mono); color: var(--ink-2); }
.lang button[aria-pressed="true"] { background: rgba(123, 230, 255, 0.18); color: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font: 400 15px/1 var(--font-display); letter-spacing: 0.22em; color: var(--ink); text-shadow: 0 0 18px rgba(123, 230, 255, 0.35); }
.mark {
  width: 20px; height: 20px; border-radius: 50%; flex: none; position: relative;
  background:
    radial-gradient(circle at 50% 50%, #ffd27a 0 14%, transparent 15%),
    radial-gradient(circle at 50% 50%, rgba(255, 130, 70, 0.55) 0 32%, transparent 33%),
    radial-gradient(circle at 35% 30%, rgba(190, 240, 255, 0.5), rgba(60, 130, 200, 0.18) 60%, rgba(20, 50, 90, 0.4));
  border: 1.5px solid var(--ice);
  box-shadow: 0 0 14px rgba(123, 230, 255, 0.35), inset 0 0 8px rgba(123, 230, 255, 0.3);
}
.mark::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px dashed rgba(123, 230, 255, 0.35);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.livebadge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; color: #ff8aa0;
  padding: 4px 8px 4px 7px; border-radius: 999px;
  border: 1px solid rgba(255, 110, 140, 0.4); background: rgba(255, 90, 120, 0.1);
  text-shadow: none;
}
.livebadge i { width: 6px; height: 6px; border-radius: 50%; background: #ff5c7c; box-shadow: 0 0 8px #ff5c7c; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.clock, .meta { font: 400 12px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-2); letter-spacing: 0.02em; }
.clock b { font-weight: 500; color: var(--ink); }
.meta.warn { color: var(--warn); }

/* ---------- Beschriftungen in der Szene ---------- */
.labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lb {
  position: absolute; left: 0; top: 0;
  font: 500 11px/1.2 var(--font-mono);
  color: var(--ink);
  padding: 3px 7px; border-radius: 6px;
  background: rgba(5, 8, 14, 0.58);
  border: 1px solid var(--line);
  white-space: nowrap;
  will-change: transform;
}
.lb small { display: block; font: 400 10px/1.2 var(--font-mono); color: var(--ink-2); }
.lb.layer { background: none; border: 0; padding: 0; color: rgba(210, 228, 250, 0.92); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.lb.layer::before { content: ""; position: absolute; left: -22px; top: 50%; width: 18px; border-top: 1px solid rgba(180, 215, 255, 0.4); }
.lb.layer.flip { text-align: right; }
.lb.layer.flip::before { left: auto; right: -22px; }
.lb.you { border-color: rgba(123, 230, 255, 0.6); color: var(--ice); }
.lb.sel { border-color: var(--line-hi); background: rgba(14, 21, 36, 0.9); }

.hints {
  position: fixed; left: 50%; top: calc(var(--st) + 84px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  font: 400 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; pointer-events: none;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(8, 13, 23, 0.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: hintin 0.8s 1.6s both, hintout 1.2s 11s forwards;
}
.hints i { width: 3px; height: 3px; border-radius: 50%; background: var(--ice); }
@keyframes hintin { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hintout { to { opacity: 0; visibility: hidden; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--sb) + 18px); transform: translateX(-50%);
  max-width: min(90vw, 520px);
  font: 500 12px/1.3 var(--font-mono); color: var(--ink);
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid rgba(255, 197, 106, 0.45); background: rgba(24, 16, 6, 0.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 30px rgba(255, 197, 106, 0.15);
  z-index: 5; pointer-events: none;
}

/* ---------- Knopfleiste „Tiefe lesen“ (Schnitt, Durchsicht, Überhöhung, Drehen) ---------- */
.viewbar {
  position: fixed; z-index: 2;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--sb) + var(--dock-h, 220px) + 18px);
  display: flex; gap: 4px; padding: 4px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.72), rgba(6, 10, 19, 0.66)) padding-box, var(--grad-border) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.viewbar button {
  display: grid; justify-items: center; align-content: center; gap: 3px;
  width: 64px; min-height: 48px; padding: 6px 2px 5px;
  border: 1px solid transparent; border-radius: 12px; background: transparent;
  color: var(--ink-2); font: 500 10px/1.1 var(--font-mono); letter-spacing: 0.03em; white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.viewbar button:hover { color: var(--ink); background: rgba(123, 230, 255, 0.07); }
.viewbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.viewbar .fill { fill: currentColor; stroke: none; opacity: 0.38; }
.viewbar .core { fill: currentColor; stroke: none; opacity: var(--core, 0.5); transition: opacity 0.3s; }
.viewbar button[aria-pressed="true"], .viewbar button.on {
  color: var(--ink); background: rgba(123, 230, 255, 0.13); border-color: rgba(123, 230, 255, 0.42);
  box-shadow: inset 0 0 14px rgba(123, 230, 255, 0.14);
}
.viewbar button.amber { color: var(--amber); background: rgba(255, 197, 106, 0.1); border-color: rgba(255, 197, 106, 0.5); box-shadow: inset 0 0 14px rgba(255, 197, 106, 0.12); }
.lb.tick { background: none; border: 0; padding: 0; font: 500 10px/1 var(--font-mono); color: rgba(220, 235, 255, 0.9); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95); }

/* ---------- Steuer-Dock ---------- */
.dock {
  position: fixed;
  left: calc(var(--sl) + 10px);
  right: calc(var(--sr) + 10px);
  bottom: calc(var(--sb) + 10px);
  max-height: calc(100% - var(--st) - var(--sb) - 120px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 20px;
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(146, 190, 240, 0.25) transparent;
}
.dock > *, .drawer > * { min-width: 0; }
.handle { display: none; }
.player, .arrival, .tour, .legend, .drawer, .archive, .events, .arrival-rows, .real dl { grid-template-columns: minmax(0, 1fr); }
.lbl {
  font: 400 9.5px/1 var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.lbl.alt { color: var(--ink-3); }
.fine { margin: 0; font: 400 11.5px/1.45 var(--font-mono); color: var(--ink-2); }

/* Erzählpanel */
.tour { display: grid; gap: 8px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: inline-flex; gap: 6px; }
.dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--line-hi); background: transparent; transition: all 0.2s; }
.dots button[aria-selected="true"] { background: var(--ice); border-color: var(--ice); box-shadow: 0 0 10px rgba(123, 230, 255, 0.7); width: 20px; border-radius: 6px; }
.tour h2 { margin: 0; font: 600 17px/1.25 var(--font-ui); letter-spacing: 0.005em; }
.tour p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.tour-nav { display: flex; gap: 8px; }
.tour-nav .btn { flex: 1; }

.btn {
  border: 1px solid var(--line-hi); background: rgba(123, 230, 255, 0.08);
  border-radius: 999px; padding: 8px 14px; font-size: 12.5px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: rgba(123, 230, 255, 0.16); }
.btn[aria-pressed="true"] { background: rgba(123, 230, 255, 0.24); border-color: var(--ice); }
.btn.primary { background: linear-gradient(135deg, rgba(123, 230, 255, 0.22), rgba(255, 111, 216, 0.2)); border-color: rgba(190, 220, 255, 0.5); }
.btn.primary:hover { background: linear-gradient(135deg, rgba(123, 230, 255, 0.34), rgba(255, 111, 216, 0.32)); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn:disabled { opacity: 0.35; cursor: default; }
.linkbtn { border: 0; background: none; padding: 0; font: 400 11.5px/1 var(--font-mono); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.02); }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; font: 500 12px/1 var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.seg button.on { background: rgba(123, 230, 255, 0.18); color: var(--ink); }
.seg.mini button { padding: 4px 8px; font-size: 11px; }

/* Wiedergabe */
.player { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.player-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.evname { font: 500 12px/1.3 var(--font-mono); color: var(--ink); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transport { display: flex; align-items: center; gap: 12px; }
.play {
  flex: none; width: 42px; height: 42px; border-radius: 50%; padding: 0 0 0 3px;
  border: 1px solid rgba(190, 220, 255, 0.55);
  background: radial-gradient(circle at 35% 30%, rgba(123, 230, 255, 0.4), rgba(255, 111, 216, 0.22));
  font-size: 15px; line-height: 1;
  box-shadow: 0 0 22px rgba(123, 230, 255, 0.25);
}
.play.playing { padding: 0; font-size: 13px; letter-spacing: -1px; }
.scrub { position: relative; flex: 1; min-width: 0; }
.scrub-marks { position: absolute; left: 0; right: 0; top: 4px; height: 6px; pointer-events: none; }
.scrub-marks i { position: absolute; top: 0; width: 2px; height: 6px; border-radius: 1px; transform: translateX(-1px); }
.scrub-marks i.p { background: var(--pcol); box-shadow: 0 0 6px var(--pcol); }
.scrub-marks i.s { background: var(--scol); box-shadow: 0 0 6px var(--scol); }
.tnow { flex: none; font: 500 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); min-width: 74px; text-align: right; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ice) var(--fill, 0%), rgba(146, 176, 228, 0.18) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(146, 176, 228, 0.18); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ice); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%;
  background: #0b1220; border: 2px solid var(--ice);
  box-shadow: 0 0 0 4px rgba(123, 230, 255, 0.14), 0 0 16px rgba(123, 230, 255, 0.35);
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #0b1220; border: 2px solid var(--ice); box-shadow: 0 0 0 4px rgba(123, 230, 255, 0.14); }

.phases { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phase { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.phase i { width: 9px; height: 9px; border-radius: 50%; grid-row: span 2; }
.phase.p i { background: var(--pcol); box-shadow: 0 0 10px var(--pcol); }
.phase.s i { background: var(--scol); box-shadow: 0 0 10px var(--scol); }
.phase b { font: 600 12px/1.2 var(--font-ui); }
.phase span { font: 400 11px/1.3 var(--font-mono); color: var(--ink-2); grid-column: 2; }

.arrival { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(123, 230, 255, 0.03); }
.arrival-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.noplace { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.arrival-rows { display: grid; gap: 6px; }
.dist { font: 400 11.5px/1.4 var(--font-mono); color: var(--ink-2); }
.arow { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; align-items: baseline; }
.arow b { font: 600 14px/1 var(--font-mono); }
.arow.p b { color: var(--pcol); }
.arow.s b { color: var(--scol); }
.arow span { font: 500 17px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.arow span.done { color: var(--ink-2); font-size: 13px; }
.arow span.none { color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.arow em { grid-column: 2; font: 400 11px/1.3 var(--font-mono); color: var(--ink-3); font-style: normal; }
.place-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.place-btns .btn { padding: 6px 12px; font-size: 12px; }

/* Legende */
.legend { display: grid; gap: 6px; }
.legend-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.legend-top .lbl { letter-spacing: 0.1em; font-size: 9px; white-space: nowrap; }
.legend-bar { display: grid; grid-template-columns: 70fr 230fr 400fr; gap: 3px; }
.legend-bar button { height: 14px; border: 0; padding: 0; border-radius: 4px; position: relative; transition: opacity 0.2s, filter 0.2s; }
.legend-bar button[aria-pressed="false"] { opacity: 0.22; filter: grayscale(0.8); }
.legend-bar button:focus-visible { outline-offset: 3px; }
.legend-scale { display: grid; grid-template-columns: 70fr 230fr 400fr; font: 400 10px/1 var(--font-mono); color: var(--ink-3); }
.legend-scale span:nth-child(1) { text-align: left; }
.legend-scale span:nth-child(4) { position: absolute; }
.legend-scale { position: relative; }
.legend-scale span:last-child { right: 0; position: absolute; }
.legend-scale span:nth-child(2), .legend-scale span:nth-child(3) { text-align: left; }

.dock-row { justify-content: space-between; }
.speedhint { font: 400 11px/1.35 var(--font-mono); color: var(--ink-3); flex: 1; min-width: 0; }
.more { margin-left: auto; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--ink); }
.more[aria-expanded="true"] { border-color: var(--line-hi); background: rgba(255, 255, 255, 0.04); }

.drawer { display: grid; gap: 14px; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; cursor: pointer; user-select: none; line-height: 1.25; }
.toggle input { flex: none; appearance: none; -webkit-appearance: none; margin: 0; width: 30px; height: 18px; border-radius: 999px; background: rgba(146, 176, 228, 0.2); position: relative; transition: background 0.2s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-2); transition: transform 0.2s, background 0.2s; }
.toggle input:checked { background: rgba(123, 230, 255, 0.38); }
.toggle input:checked::after { transform: translateX(12px); background: var(--ink); }

.archive { display: grid; gap: 8px; }
.arc-info { font: 400 11.5px/1.4 var(--font-mono); color: var(--ink-2); }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider-head output { font: 500 12px/1 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }

.events { display: grid; gap: 8px; }
.events h3 { margin: 0; }
.chips { display: grid; grid-template-columns: 1fr; gap: 6px; }
.chip {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.025); padding: 7px 10px;
  font-size: 12.5px; line-height: 1.25; transition: border-color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--line-hi); background: rgba(123, 230, 255, 0.08); }
.chip .m { flex: none; font: 600 12px/1 var(--font-mono); padding: 5px 7px; border-radius: 8px; color: #0a0f1a; min-width: 42px; text-align: center; }
.chip .t { flex: 1; min-width: 0; }
.chip .t b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .t small { color: var(--ink-3); font: 400 11px/1.2 var(--font-mono); }
.chip h4 { margin: 4px 0 0; }
.subhead { margin: 6px 0 0; font: 400 9px/1 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }

.real { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: rgba(255, 255, 255, 0.02); }
.real summary { cursor: pointer; font-size: 12.5px; color: var(--ink); }
.real dl { margin: 8px 0 0; display: grid; gap: 8px; }
.real dt { font: 400 9px/1 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ice); margin-bottom: 3px; }
.real dd { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.credits { margin: 0; font-size: 11px; line-height: 1.5; color: var(--ink-3); }
.credits a { color: var(--ink-2); }

/* ---------- Seitenleiste (Karte + Liste) ---------- */
.side { position: fixed; display: grid; gap: 12px; pointer-events: none; }
.side > * { pointer-events: auto; }

.card {
  max-height: 46vh; overflow: auto; border-radius: 18px; padding: 12px 14px; display: grid; gap: 10px;
  position: fixed; top: calc(var(--st) + 22px + var(--hud-h, 62px)); left: calc(var(--sl) + 10px); right: calc(var(--sr) + 10px);
}
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head > div { flex: 1; min-width: 0; }
.card-head h2 { margin: 0; font: 600 15px/1.25 var(--font-ui); overflow-wrap: anywhere; }
.card-head .sub { font: 400 11.5px/1.3 var(--font-mono); color: var(--ink-2); }
.mag {
  flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font: 600 18px/1 var(--font-mono); color: #0a0f1a; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 22px var(--mc, rgba(255, 180, 90, 0.4));
  background: var(--mc, #ffb35c);
}
.x { border: 0; background: transparent; color: var(--ink-2); font-size: 22px; line-height: 1; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.x:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.depthbar { position: relative; height: 18px; border-radius: 9px; background: linear-gradient(90deg, var(--dg)); border: 1px solid var(--line); overflow: hidden; }
.depthbar i { position: absolute; top: -1px; bottom: -1px; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 10px #fff; }
.depthbar span { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font: 500 10px/1 var(--font-mono); color: rgba(10, 15, 26, 0.85); mix-blend-mode: normal; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.grid div { min-width: 0; }
.grid .wide { grid-column: span 2; }
.grid .full { grid-column: 1 / -1; }
.grid dt { font: 400 9px/1.2 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.grid dd { margin: 0; font: 500 12.5px/1.25 var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.feed { display: none; border-radius: 18px; padding: 12px 12px 6px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.feed-head h3 { margin: 0; font: 400 9.5px/1.3 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.feed-list { list-style: none; margin: 0; padding: 0 0 6px; display: grid; gap: 3px; max-height: 300px; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(146, 190, 240, 0.25) transparent; }
.feed-list button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 5px 6px; }
.feed-list button:hover, .feed-list button:focus-visible, .feed-list li.sel button { background: rgba(123, 230, 255, 0.1); }
.feed-list .m { flex: none; font: 600 11.5px/1 var(--font-mono); padding: 5px 0; border-radius: 7px; color: #0a0f1a; width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.feed-list .t { flex: 1; min-width: 0; }
.feed-list .t b { display: block; font: 400 12.5px/1.25 var(--font-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-list .t small { font: 400 10.5px/1.2 var(--font-mono); color: var(--ink-3); }
.feed-list li.fresh .m { box-shadow: 0 0 12px var(--mc); }
.feed-empty { padding: 10px 6px 14px; font: 400 12px/1.4 var(--font-mono); color: var(--ink-3); }

/* ---------- Handy ---------- */
@media (max-width: 859px) {
  .dock { max-height: 52vh; }
  .tour p { max-height: 18vh; overflow: auto; font-size: 12.5px; }
  .clock { display: none; }
  .meta { font-size: 11px; }
  .hints { top: auto; bottom: calc(var(--sb) + 84px + var(--dock-h, 220px)); font-size: 10px; padding: 6px 10px; gap: 7px; animation-duration: 0.8s, 1.2s; }
  .viewbar button { width: 60px; min-height: 44px; font-size: 9.5px; }
  .card { max-height: 38vh; }
  body.card-open .meta { display: none; }
  body.card-open .hud { gap: 2px; }
  body.dock-folded .tour, body.dock-folded .legend, body.dock-folded .phases, body.dock-folded .arrival, body.dock-folded .dock-row { display: none; }
  body.dock-folded .player { border-top: 0; padding-top: 0; }
  .handle { display: block; width: 100%; height: 20px; margin: -10px 0 -6px; padding: 0; border: 0; background: none; }
  .handle i { display: block; width: 44px; height: 4px; border-radius: 2px; background: rgba(200, 225, 255, 0.38); margin: 0 auto; }
  .card { padding: 10px 12px; gap: 8px; max-height: 30vh; }
  .card .mag { width: 42px; height: 42px; font-size: 16px; border-radius: 12px; }
  .card .depthbar, .card .grid > div:nth-child(n+3):not(:nth-child(5)) { display: none; }
  .card .grid { grid-template-columns: 1fr 1fr; }
  .card .grid .wide { grid-column: auto; }
  .grid dd { font-size: 12px; }
  .feed { display: block; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; padding: 0; }
  .feed-list { max-height: 220px; }
}

/* ---------- Ladebildschirm ---------- */
.loader {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 45%, rgba(4, 6, 12, 0.5), rgba(4, 6, 12, 0.96));
  transition: opacity 0.9s ease, visibility 0.9s;
  padding: 0 24px;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { width: min(360px, 100%); display: grid; gap: 16px; text-align: center; justify-items: center; }
.loader .word { font: 400 20px/1 var(--font-display); letter-spacing: 0.3em; padding-left: 0.3em; text-shadow: 0 0 24px rgba(123, 230, 255, 0.4); }
.orb { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid rgba(123, 230, 255, 0.55); box-shadow: 0 0 30px rgba(123, 230, 255, 0.25), inset 0 0 18px rgba(123, 230, 255, 0.2); }
.orb i { position: absolute; inset: 8px; border-radius: 50%; border: 1px solid rgba(255, 111, 216, 0.5); animation: orbit 3.6s linear infinite; }
.orb i:nth-child(2) { inset: 18px; border-color: rgba(255, 197, 106, 0.6); animation-duration: 2.4s; animation-direction: reverse; }
.orb i:nth-child(3) { inset: 26px; background: radial-gradient(circle, #ffd27a, rgba(255, 130, 70, 0.4) 60%, transparent 70%); border: 0; animation: none; }
.orb i:nth-child(1) { transform: rotateX(65deg); }
@keyframes orbit { from { transform: rotateX(65deg) rotateZ(0); } to { transform: rotateX(65deg) rotateZ(360deg); } }
.orb i:nth-child(2) { animation-name: orbit2; }
@keyframes orbit2 { from { transform: rotateY(65deg) rotateZ(0); } to { transform: rotateY(65deg) rotateZ(-360deg); } }
.bar { width: 100%; height: 2px; background: rgba(146, 176, 228, 0.16); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), var(--pink)); box-shadow: 0 0 12px var(--ice); transition: width 0.25s ease; }
.loader p { margin: 0; font: 400 12px/1.5 var(--font-mono); color: var(--ink-2); }
.loader p.err { color: var(--warn); }

/* ---------- Desktop ---------- */
@media (min-width: 860px) {
  .hud { left: calc(var(--sl) + 24px); top: calc(var(--st) + 22px); right: auto; }
  .toprow { justify-content: flex-start; }
  .brand h1 { font-size: 17px; }
  .dock { left: calc(var(--sl) + 20px); right: auto; bottom: calc(var(--sb) + 20px); width: 396px; max-height: calc(100% - var(--st) - var(--sb) - 150px); }
  .side { right: calc(var(--sr) + 20px); top: calc(var(--st) + 20px); width: 372px; max-height: calc(100% - 40px); grid-template-rows: auto minmax(0, 1fr); align-content: start; }
  .card { position: static; max-height: none; width: auto; }
  .feed { display: block; }
  .feed-list { max-height: min(46vh, 420px); }
  .hints { top: auto; bottom: calc(var(--sb) + 22px); }
  .toast { left: calc(50% + 10px); }
  /* senkrecht am rechten Rand der freien Fläche, neben der Seitenleiste */
  .viewbar { left: auto; transform: none; bottom: auto; top: calc(var(--st) + 20px); right: calc(var(--sr) + 20px + 372px + 12px); flex-direction: column; }
}

/* Titelbild-Modus (?cover=1): nur der Globus */
body.cover .hud, body.cover .dock, body.cover .side, body.cover .hints, body.cover .labels, body.cover .toast, body.cover .viewbar { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .loader, .bar i, .chip, .toggle input, .toggle input::after, .dots button, .legend-bar button, .viewbar button, .viewbar .core { transition: none; }
  .mark::after, .livebadge i, .orb i, .hints { animation: none; }
  .hints { opacity: 1; }
}
