/* Global Rush: Online, Website
   Palette und Anzeigeschrift wie die neue Oberflaeche des Spiels (seit 10.11.2026, Polierphase F4; vorher die classic-
   Palette "Konzernzentrale"): Werte aus web/src/styles/desk-theme.css, Marke aus branding/README.md. Warmes Schwarz
   #1B1A16 als Grund, Creme #F4E7C8 als Schrift, Amber #E0A83C, Kuehl #8FBFD1. Unbounded nur fuer die grossen Titel (h1,
   h2), wie im Spiel fuer Kontostand und Bereichstitel; Fliesstext Barlow, kleinere Titel Barlow Semi Condensed.
   a) Farbe hat je eine Aufgabe. Amber traegt Geld und die eine Hauptaktion, Kuehl Navigation und alles Anklickbare, das
      kein Geld ist. Gruen und Rot nur fuer Bewegung.
   b) Rundung ist Rang: schwebende Tafel 14, Karte darin 8, Chip und Knopf 4, Tabellenzeile 0.
   c) Keine gesperrten Versal-Etiketten.
   d) Schrift mindestens 4,5:1 auf ihrem Grund (WCAG 2), auch auf dem Glas ueber der hellen Tageskarte (Glas ueber Weiss
      gerechnet): Fliesstext 14,2:1 auf --surface, --muted 5,7:1 (auf Karten --surface-light 5,0:1), auf Glas
      --muted-glass 5,6:1, --text-soft 7,0:1, Amber 6,0:1; Schrift auf Amber 8,7:1. --muted erreicht auf Glas nur 4,2:1
      und steht dort deshalb nicht. Einen hellen Modus hat die Website nicht (color-scheme dark). */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-semi-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2"); }
/* Unbounded (The Unbounded Project Authors, SIL Open Font License 1.1, Lizenz in fonts/OFL-Unbounded.txt), lateinischer
   Ausschnitt aus npm @fontsource/unbounded wie im Spiel, Gewicht 600 wie die Bereichstitel (tools/assets.py fonts) */
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url("../fonts/unbounded-600.woff2") format("woff2"); }

:root {
  --backdrop: #11100D;
  --surface-dark: #14130F;
  --surface: #1B1A16;
  --surface-light: #282620;
  --line: rgba(244, 231, 200, 0.08);
  --line-strong: rgba(244, 231, 200, 0.14);
  --line-top: rgba(244, 231, 200, 0.2);
  /* Glas der Tafeln ueber der Karte; dichter als frueher (0,88), naeher an den festen Tafeln des Spiels */
  --glass: rgba(34, 32, 27, 0.92);
  --shade: 8, 6, 3;

  --title: #FBF3E0;
  --text: #F4E7C8;
  --text-soft: #C9BFA8;
  --muted: #9A9384;
  /* Nebentext auf dem Glas ueber der Karte; --muted kaeme dort auf 4,2:1 */
  --muted-glass: #B5AB95;
  /* Wie im Spiel (desk-theme.css ink-faint): eine dunklere Stufe erreicht keine 4,5:1 mehr */
  --quiet: #9A9384;

  --amber: #E0A83C;
  --amber-rgb: 224, 168, 60;
  --amber-hover: #F3C764;
  --amber-pale: #F3DDA8;
  --ink-on-amber: #17130A;
  --cool: #8FBFD1;
  --cool-rgb: 143, 191, 209;
  --cool-light: #C5E0EA;

  --r-panel: 14px;
  --r-card: 8px;
  --r-chip: 4px;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --font-title: "Unbounded", "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 1.125rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.06; text-wrap: balance; }
/* Grosse Titel in Unbounded, breit und rund wie die Wortmarke; enger gesetzt wie dort (Laufweite -3 %) */
h1, h2 { font-family: var(--font-title); line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd, figure { margin: 0; }
a { color: var(--cool-light); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--title); }
:focus-visible { outline: 2px solid var(--cool); outline-offset: 3px; }
button { font: inherit; }

.skip-link {
  position: absolute; z-index: 100; left: 16px; top: -80px;
  padding: 10px 14px; border-radius: var(--r-chip);
  background: var(--amber); color: var(--ink-on-amber); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Knoepfe ------------------------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--r-chip);
  font: 600 1.0625rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--amber); color: var(--ink-on-amber); }
.btn-primary:hover { background: var(--amber-hover); color: var(--ink-on-amber); }
.btn-secondary { background: rgba(244, 231, 200, 0.04); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--cool); color: var(--title); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.9375rem; }

/* Glas wie die schwebenden Tafeln im Spiel */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid var(--line-strong);
  border-top-color: var(--line-top);
  box-shadow: 0 22px 60px rgba(var(--shade), 0.34), 0 2px 8px rgba(var(--shade), 0.22);
}

/* Startseite: Karte ----------------------------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 680px; max-height: 1180px;
  overflow: hidden;
  isolation: isolate;
  background: var(--map-land, #E8EAE3);
}
.hero-stage { position: absolute; inset: 0; }
.hero-poster, .hero-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster { object-fit: cover; object-position: 70% 50%; }
.hero-map { opacity: 0; transition: opacity 0.3s ease; }
.hero-map.is-ready { opacity: 1; }
.hero-chips { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.2s ease; }
.hero-chips.is-hidden { opacity: 0; }

.hero-top {
  position: absolute; z-index: 3; top: 0; right: 0;
  display: flex; gap: 8px;
  padding: 18px var(--gutter);
}
.hero-top a {
  padding: 9px 13px; border-radius: var(--r-chip);
  color: var(--text); font-weight: 500; font-size: 0.9375rem; line-height: 1; text-decoration: none;
}
.hero-top a:hover { color: var(--title); border-color: var(--cool); }

.hero-panel {
  position: absolute; z-index: 2;
  left: clamp(16px, 4.5vw, 80px); top: 50%;
  transform: translateY(-50%);
  width: min(500px, 40vw);
  padding: clamp(26px, 2.6vw, 40px);
  border-radius: var(--r-panel);
}
.hero-lockup { width: min(290px, 74%); margin: 0 0 34px; }
/* Unbounded laeuft rund ein Drittel breiter als Barlow Semi Condensed: kleiner gesetzt, damit "the real world." in die
   Tafel passt (drei Zeilen bei 1440 px, auch bei 390 px ohne Trennung) */
.hero h1 {
  font-size: clamp(1.875rem, 2.9vw, 2.625rem);
  line-height: 1.1;
  color: var(--title);
  margin-bottom: 22px;
}
.hero-lede { font-size: 1.1875rem; line-height: 1.5; color: var(--text-soft); margin-bottom: 30px; }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta-note { font-size: 0.9375rem; color: var(--muted-glass); }
/* Wipe-Zaehler (assets/js/wipe.js): verborgen, bis der Spielserver einen Termin nennt */
.wipe-note { margin-top: 18px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(var(--amber-rgb), 0.45); background: rgba(var(--amber-rgb), 0.1); font-size: 0.9375rem; color: var(--text-soft); }
.wipe-note[hidden] { display: none; }
.wipe-note strong { display: block; color: var(--text); }

.map-legend {
  position: absolute; z-index: 2;
  right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 40px);
  width: 312px;
  padding: 16px 18px 14px;
  border-radius: var(--r-panel);
  font-size: 0.9375rem;
}
.legend-place { font: 600 1.3125rem/1.15 var(--font-display); color: var(--title); }
.legend-meta { color: var(--muted-glass); font-variant-numeric: tabular-nums; line-height: 1.45; }
.legend-meta + .legend-meta { margin-top: 1px; }
.legend-scale { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted-glass); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.legend-scale-bar { width: 90px; height: 7px; border: 2px solid var(--text-soft); border-top: 0; transition: width 0.2s ease; }
.city-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip-btn, .result-btn {
  padding: 7px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-chip);
  background: rgba(244, 231, 200, 0.04); color: var(--text);
  font: 500 0.875rem/1 var(--font); cursor: pointer;
}
.chip-btn:hover, .result-btn:hover { border-color: var(--cool); color: var(--title); }
.chip-btn[aria-pressed="true"] { background: rgba(var(--cool-rgb), 0.18); border-color: var(--cool); color: var(--title); }
.town-search { display: flex; gap: 6px; margin-top: 12px; }
.town-search input {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-chip);
  background: rgba(0, 0, 0, 0.22); color: var(--text); font: 400 0.9375rem var(--font);
}
.town-search input::placeholder { color: var(--muted-glass); }
.town-search button { height: 36px; }
.search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.result-btn { text-align: left; line-height: 1.3; }
.search-status { min-height: 1.3em; margin-top: 6px; color: var(--muted-glass); font-size: 0.8125rem; }
.search-status:empty { display: none; }
.legend-attrib { margin-top: 12px; color: var(--muted-glass); font-size: 0.75rem; }
.legend-attrib a { color: var(--text-soft); }

/* Chips auf der Karte: Geschaeftsart mit dem Bild aus dem Spiel */
.map-chip {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-chip);
  background: var(--glass);
  border: 1px solid var(--line-strong);
  border-top-color: var(--line-top);
  box-shadow: 0 8px 22px rgba(var(--shade), 0.3);
  color: var(--title); font: 600 0.9375rem/1.15 var(--font); white-space: nowrap;
  opacity: 0; transition: opacity 0.35s ease;
}
.map-chip.is-on { opacity: 1; }
.map-chip img { width: 28px; height: 28px; }
.map-chip-text { display: flex; flex-direction: column; }
.map-chip-sub {
  display: block; max-height: 0; overflow: hidden;
  color: var(--amber-pale); font-weight: 500; font-size: 0.8125rem;
  transition: max-height 0.35s ease;
}
.map-chip.is-sold .map-chip-sub { max-height: 1.5em; }

/* Abschnitte -------------------------------------------------------------------------------- */

.section { padding: clamp(80px, 10vw, 136px) var(--gutter); }
.section-dark { background: var(--surface-dark); }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.section-head { max-width: 46rem; margin-bottom: clamp(40px, 5vw, 64px); }
.section h2 { font-size: clamp(1.625rem, 2.6vw, 2.3rem); color: var(--title); margin-bottom: 18px; }
.section-head p { color: var(--text-soft); font-size: 1.1875rem; max-width: 40em; }

/* Der Kreislauf als Linie mit Haltestellen */
.route {
  --route-gap: clamp(20px, 3vw, 44px);
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--route-gap);
  list-style: none; padding: 0;
}
.route::before {
  content: ""; position: absolute; top: 35px; height: 3px;
  left: 36px; right: calc((100% - 3 * var(--route-gap)) / 4 - 36px);
  background: var(--amber); opacity: 0.55;
}
.stop { position: relative; }
.stop-icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 72px; height: 72px;
  border-radius: var(--r-card);
  background: var(--surface-light);
  border: 1px solid var(--line-strong); border-top-color: var(--line-top);
}
.stop-icon img { width: 56px; height: 56px; }
.stop h3 { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 10px; font-size: 1.5rem; color: var(--title); }
.stop-num { color: var(--amber); font-variant-numeric: tabular-nums; }
.stop p { color: var(--muted); font-size: 1.0625rem; }

/* Welt im Browser */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.split h2 { margin-bottom: 0; }
.split p { color: var(--text-soft); font-size: 1.1875rem; }
.panorama { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.panorama img { width: 100%; height: clamp(280px, 34vw, 560px); object-fit: cover; object-position: 50% 45%; }
.caption { margin-top: 12px; color: var(--muted); font-size: 0.875rem; }
.panorama .caption { padding: 0 var(--gutter); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-left: auto; margin-right: auto; }

.light-switch { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(56px, 8vw, 104px); }
.light-frame { position: relative; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 2350 / 950; background: var(--surface-dark); }
.light-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s ease; }
.light-frame img[hidden] { display: block; opacity: 0; }
.light-text h3 { font-size: 1.75rem; color: var(--title); margin-bottom: 12px; }
.light-text p { color: var(--muted); }
.segmented { display: inline-flex; margin-top: 22px; padding: 3px; border-radius: var(--r-chip); background: rgba(244, 231, 200, 0.05); border: 1px solid var(--line-strong); }
.segmented button {
  min-width: 84px; padding: 9px 14px; border: 0; border-radius: 3px;
  background: transparent; color: var(--muted); font: 600 0.9375rem/1 var(--font); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: rgba(var(--cool-rgb), 0.2); color: var(--title); }

/* Handy und Tablet: echte Aufnahmen aus der Touch-Emulation (tools/assets.py) in Geraeterahmen aus CSS.
   Die Rahmen bilden Hardware ab und stehen deshalb ausserhalb der Rundungsrangfolge der Oberflaeche. */
.devices { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(64px, 9vw, 120px); }
.devices-text h3 { font-size: 1.75rem; color: var(--title); margin-bottom: 12px; }
.devices-text p { color: var(--muted); }
.gestures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.gestures dt { color: var(--title); font-weight: 600; font-size: 1rem; line-height: 1.35; }
.gestures dd { color: var(--muted); font-size: 1rem; line-height: 1.4; }
.devices-text .devices-note { margin-top: 22px; font-size: 0.9375rem; color: var(--quiet); }
.device-stage { position: relative; padding-bottom: 12%; }
.device { background: #08090B; border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 var(--line-top), 0 30px 60px -20px rgba(0, 0, 0, 0.65); }
.device img { width: 100%; height: auto; }
.device-tablet { width: 88%; margin-left: auto; padding: clamp(7px, 1.1vw, 14px); border-radius: clamp(16px, 2vw, 28px); }
.device-tablet img { border-radius: clamp(6px, 0.8vw, 12px); }
.device-phone { position: absolute; left: 0; bottom: 0; width: 56%; padding: clamp(5px, 0.6vw, 8px) clamp(10px, 1.4vw, 18px); border-radius: clamp(18px, 2.4vw, 32px); }
.device-phone img { border-radius: clamp(10px, 1.4vw, 20px); }

/* Eine Welt fuer alle */
.shared-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.facts { display: grid; gap: 26px; }
.facts dt { font: 600 1.3125rem/1.2 var(--font-display); color: var(--title); margin-bottom: 6px; }
.facts dd { color: var(--muted); font-size: 1.0625rem; }
.shot { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.shot-stack { display: grid; gap: 20px; }
.shot-stack .caption { margin-top: 10px; }

/* Von s&box */
.notice { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.notice h2 { font-size: clamp(1.375rem, 2.1vw, 1.75rem); margin-bottom: 0; }
.notice p { color: var(--text-soft); }
.notice p + p { margin-top: 12px; }

/* Neuigkeiten */
.updates-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.updates-grid > div > p { color: var(--text-soft); margin-bottom: 22px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.update-card { padding: clamp(22px, 3vw, 32px); border-radius: var(--r-card); background: var(--surface-light); border: 1px solid var(--line-strong); border-top-color: var(--line-top); }
.update-card h3 { font-size: 1.5rem; color: var(--title); margin-bottom: 18px; }
.update-group + .update-group { margin-top: 18px; }
.update-group h4 { font: 600 1rem/1.2 var(--font); color: var(--amber-pale); margin-bottom: 8px; }
.update-group ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.update-group li { color: var(--muted); font-size: 1rem; line-height: 1.45; }
.update-group li b { color: var(--text); font-weight: 600; }
.update-group li .lead-line { display: block; margin-bottom: 2px; }
.area-tag {
  display: inline-block; margin-right: 6px; padding: 2px 6px; border-radius: var(--r-chip);
  background: rgba(var(--cool-rgb), 0.12); color: var(--cool-light); font-size: 0.8125rem; font-weight: 500; vertical-align: 1px;
}

/* Fragen */
.faq { max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq details:first-of-type { border-top: 1px solid var(--line-strong); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font: 600 1.3125rem/1.25 var(--font-display); color: var(--title);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; text-align: center; color: var(--cool); font: 500 1.6rem/1 var(--font); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 22px; color: var(--text-soft); max-width: 44em; }
.faq details p + p { margin-top: -10px; }

/* Schluss */
.closing { text-align: left; }
.closing-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px; }
.closing h2 { font-size: clamp(1.5rem, 2.5vw, 2.125rem); margin: 0; }
.closing .cta { flex-direction: row; align-items: center; flex-wrap: wrap; }

/* Unterseiten: Kopf und Fuss ---------------------------------------------------------------- */

.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface-dark);
}
.site-header .brand img { height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
.site-nav a:not(.btn) { color: var(--text-soft); text-decoration: none; font-weight: 500; font-size: 1rem; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--title); }

.site-footer { background: var(--backdrop); padding: 56px var(--gutter) 40px; border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 4fr) repeat(2, minmax(0, 2fr)); gap: 32px 40px;
}
.footer-lead { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.footer-brand img { height: 34px; width: auto; }
/* Buy me a coffee wie in der Lobby des Spiels: leiser Knopf mit Tasse, Amber nur am Zeichen (Geld). Bis 10.11.2026 das gelbe
   Bild von Buy Me a Coffee, ausserhalb der Palette (Polierphase F4) */
.footer-support { gap: 8px; }
.footer-support svg { flex: none; color: var(--amber); }
.footer-nav ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-nav a { color: var(--text-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--title); text-decoration: underline; }
.footer-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.875rem; }
.footer-note + .footer-note { margin-top: -24px; }
.footer-note a { color: var(--text-soft); }

/* Rechtstexte ------------------------------------------------------------------------------ */

.legal { max-width: 48rem; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 9vw, 120px); }
.legal h1 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); color: var(--title); margin-bottom: 14px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 0.9375rem; margin-bottom: 40px; }
/* Abschnittstitel der Rechtstexte bleiben schmal: lange deutsche Woerter, viele Ebenen */
.legal h2 { font-family: var(--font-display); letter-spacing: 0; line-height: 1.15; font-size: 1.75rem; color: var(--title); margin: 56px 0 14px; scroll-margin-top: 24px; }
.legal h3 { font: 600 1.1875rem/1.3 var(--font); color: var(--title); margin: 30px 0 10px; }
.legal p, .legal li, .legal dd, .legal td, .legal th { color: var(--text-soft); font-size: 1.0625rem; line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul, .legal ol { padding-left: 1.3em; margin: 12px 0; }
.legal li + li { margin-top: 6px; }
.legal address { font-style: normal; color: var(--text); line-height: 1.6; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .lead { font-size: 1.1875rem; color: var(--text); }
.legal-toc { margin: 0 0 8px; padding: 20px 22px; border-radius: var(--r-card); background: var(--surface-dark); border: 1px solid var(--line); }
.legal-toc h2 { font: 600 1rem/1.2 var(--font); letter-spacing: 0; color: var(--muted); margin: 0 0 10px; }
.legal-toc ol { margin: 0; columns: 2; column-gap: 32px; }
.legal-toc li { font-size: 0.9375rem; break-inside: avoid; }
.legal-toc a { color: var(--cool-light); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
.legal table { width: 100%; border-collapse: collapse; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-strong); font-size: 0.9375rem; }
.legal th { color: var(--text); font-weight: 600; }
.legal code { font-size: 0.9em; color: var(--text); background: rgba(244, 231, 200, 0.06); padding: 1px 5px; border-radius: 3px; }
.legal-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; }
.legal-grid dt { color: var(--muted); }
.legal-grid dd { color: var(--text); }

/* Changelog */
.log { max-width: 52rem; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 9vw, 120px); }
.log h1 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); color: var(--title); margin-bottom: 14px; }
.log-intro { color: var(--text-soft); margin-bottom: 28px; }
.log-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 36px; }
.log-day { padding: 28px 0; border-top: 1px solid var(--line-strong); }
.log-day h2 { font-family: var(--font-display); letter-spacing: 0; line-height: 1.15; font-size: 1.625rem; color: var(--title); margin-bottom: 14px; }
.log-day h3 { font: 600 1rem/1.2 var(--font); color: var(--amber-pale); margin: 18px 0 8px; }
.log-day ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.log-day li { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.log-day li b { color: var(--text); font-weight: 600; }
.log-day[hidden], .log-day li[hidden] { display: none; }

/* Roadmap: eine Route von oben nach unten wie die Haltestellen der Startseite. Durchgezogen, was
   ausgeliefert ist, gestrichelt, was geplant ist, ein festes Datum als eckiger Halt; am letzten Halt
   blendet die Linie aus. Inhalt in src/pages/roadmap.mjs. */
.roadmap { max-width: 52rem; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 9vw, 120px); }
.roadmap h1 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); color: var(--title); margin-bottom: 14px; }
.rm-intro { color: var(--text-soft); }
.rm-updated { margin-top: 10px; color: var(--muted); font-size: 0.9375rem; }
.rm-route { list-style: none; padding: 0; margin-top: clamp(36px, 5vw, 52px); }
.rm-stop { position: relative; padding: 0 0 clamp(40px, 6vw, 56px) 46px; }
.rm-stop::before {
  content: ""; position: absolute; left: 10px; top: 14px; bottom: -14px; width: 3px;
  background: var(--amber);
}
.rm-stop.ahead::before { background: repeating-linear-gradient(to bottom, var(--amber) 0 9px, transparent 9px 17px); opacity: 0.75; }
.rm-stop:last-child { padding-bottom: 8px; }
.rm-stop:last-child::before {
  bottom: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.rm-marker {
  position: absolute; z-index: 1; left: 0; top: 2px;
  width: 23px; height: 23px; border-radius: 50%;
  border: 3px solid var(--amber); background: var(--surface);
}
.rm-stop.done .rm-marker { background: var(--amber); }
.rm-stop.now .rm-marker { box-shadow: 0 0 0 6px rgba(var(--amber-rgb), 0.22); }
.rm-stop.now .rm-marker::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--amber); }
.rm-stop.fixed .rm-marker { left: 2px; top: 4px; width: 19px; height: 19px; border-radius: 3px; border-color: var(--text); }
.rm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.rm-head h2 { font-size: clamp(1.3125rem, 2.3vw, 1.625rem); color: var(--title); }
.rm-when { color: var(--amber-pale); font-weight: 500; }
.rm-note { margin-top: 8px; color: var(--text-soft); max-width: 40rem; }
.rm-items { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 12px; max-width: 42rem; }
.rm-items li { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.rm-items b { color: var(--text); font-weight: 600; }
.rm-more { display: inline-block; margin-top: 16px; font-size: 0.9375rem; }
.rm-feature {
  padding: clamp(16px, 3vw, 22px); border-radius: var(--r-card);
  background: var(--surface-light); border: 1px solid var(--line-strong); border-top-color: var(--line-top);
}
.rm-steps { list-style: none; counter-reset: rm-step; padding: 0; margin-top: 14px; display: grid; gap: 8px; }
.rm-steps li { position: relative; padding-left: 26px; counter-increment: rm-step; }
.rm-steps li::before {
  content: counter(rm-step); position: absolute; left: 0; top: 0;
  color: var(--amber); font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums;
}
.rm-feature-note { margin-top: 14px; }
.rm-talk {
  margin-top: clamp(40px, 6vw, 56px); display: grid; gap: 12px; padding: clamp(22px, 4vw, 32px);
  border-radius: var(--r-card); background: var(--surface-light);
  border: 1px solid var(--line-strong); border-top-color: var(--line-top);
}
.rm-talk h2 { font-size: 1.375rem; color: var(--title); }
.rm-talk p { color: var(--text-soft); max-width: 36rem; }
.rm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.rm-month { font: 600 1rem/1.2 var(--font); color: var(--amber-pale); margin: 18px 0 0; }
.rm-fine { margin-top: 28px; color: var(--muted); font-size: 0.875rem; max-width: 40rem; }
.rm-fine a { color: var(--text-soft); }

/* Fehlerseite */
.notfound { max-width: 40rem; margin: 0 auto; padding: 120px var(--gutter); }
.notfound h1 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); color: var(--title); margin-bottom: 14px; }
.notfound p { color: var(--text-soft); margin-bottom: 24px; }

/* Schmale Fenster --------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .route { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .route::before { display: none; }
}

@media (max-width: 880px) {
  .hero { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; background: var(--surface); }
  .hero-stage { position: relative; inset: auto; height: 64vh; height: 64svh; min-height: 400px; max-height: 640px; background: var(--map-land, #E8EAE3); }
  .hero-panel {
    position: relative; left: auto; top: auto; transform: none;
    width: auto; margin: -24px 12px 0;
    padding: 26px 22px 28px;
  }
  .hero-lockup { margin-bottom: 26px; }
  .hero-stage { height: 58vh; height: 58svh; min-height: 380px; }
  .map-legend { left: 12px; right: 12px; bottom: 34px; width: auto; padding: 10px 12px 9px; }
  .legend-place { font-size: 1.0625rem; }
  .legend-meta { font-size: 0.8125rem; }
  .legend-meta[data-coords] { display: none; }
  .legend-attrib { margin-top: 6px; font-size: 0.6875rem; }
  .city-list { margin-top: 8px; }
  .city-list { flex-wrap: nowrap; overflow-x: auto; margin: 10px -14px 0; padding: 0 14px 2px; scrollbar-width: none; }
  .city-list::-webkit-scrollbar { display: none; }
  .chip-btn { flex: none; }
  .hero-top { padding: 12px; }
  .map-chip { font-size: 0.8125rem; padding: 3px 9px 3px 3px; gap: 6px; }
  .map-chip img { width: 22px; height: 22px; }

  .split, .light-switch, .devices, .shared-grid, .notice, .updates-grid { grid-template-columns: minmax(0, 1fr); }
  .split { align-items: start; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-lead { grid-column: 1 / -1; }
  .legal-toc ol { columns: 1; }
  .site-nav a:not(.btn) { display: none; }
}

@media (max-width: 600px) {
  /* Spielknopf im ersten Bildschirm: am Handy (390 x 844) lag er unter dem Rand, nur seine Oberkante war zu sehen
     (Durchlauf 10.11.2026, Polierphase F1). Jetzt direkt unter der Ueberschrift, der Absatz folgt danach. */
  .hero-panel { display: flex; flex-direction: column; }
  .hero-panel > .hero-lockup { order: 1; }
  .hero-panel > h1 { order: 2; }
  .hero-panel > .cta { order: 3; margin-bottom: 24px; }
  .hero-panel > .hero-lede { order: 4; margin-bottom: 0; }
  .hero-panel > .wipe-note { order: 5; }
  .route { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .route::before { display: none; }
  .stop { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; padding-bottom: 36px; }
  .stop:last-child { padding-bottom: 0; }
  /* Linie je Abschnitt von dieser Haltestelle bis zur Mitte der naechsten */
  .stop:not(:last-child)::after { content: ""; position: absolute; left: 35px; top: 36px; bottom: -36px; width: 3px; background: var(--amber); opacity: 0.55; }
  .stop-icon { grid-row: 1 / span 2; }
  .stop h3 { margin: 6px 0 8px; font-size: 1.3125rem; }
  .stop p { grid-column: 2; }
  .legend-scale { display: none; }
  .closing .cta { flex-direction: column; align-items: flex-start; }
  .rm-stop { padding-left: 38px; }
}

/* Vier Eintraege oben auf der Startseite passen erst mit engeren Abstaenden in 360 px */
@media (max-width: 400px) {
  .hero-top { gap: 6px; }
  .hero-top a { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .skip-link, .legal-toc { display: none; }
  .legal p, .legal li, .legal dd, .legal td, .legal th, .legal h1, .legal h2, .legal h3, .legal address, .legal strong { color: #000; }
  .legal a { color: #000; }
}

.legal .legal-part { margin-top: 88px; padding-top: 32px; border-top: 1px solid var(--line-strong); }
.legal ol.alpha { list-style-type: lower-alpha; }
.legal ol ol { margin: 8px 0 4px; }
.legal td code { white-space: nowrap; }
.legal-toc { margin-top: 28px; }
