/* ============================================
   GoraBike — Natural Theme
   Forest × Desert × Mountain
   ============================================ */

/* Schriften (Felix 2026-09-25, mit „Tageslicht" gekommen, mit „Wald" geblieben): Bricolage Grotesque
   für Überschriften, Figtree für alles andere. Beide variabel (400–800), frei
   (SIL OFL), lokal ausgeliefert — die App braucht dafür kein Netz. Je Familie
   zwei Teile wie bei Google Fonts: latin und latin-ext (Ortsnamen mit ł, ő, ș …). */
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/BricolageGrotesque-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/BricolageGrotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/Figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/Figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ═══ Farbwelt „Wald“ (Felix 2026-09-25, zweite Runde: „wald ist gut“) ══════
     Creme als Schrift, Gelb für die Knöpfe, Grün für Start — auf GRAU.
     🚨 DER GRUND IST TINTENGRAU, NICHT WALDGRÜN (Felix, am selben Abend:
     „dieses off grün was wir jetzt haben sieht aus wie ein defektes altes lcd
     screen — wir müssen da wieder auf ein grau gehen“). Das Grau ist das
     Tintengrau #18222C, das er an den dunklen Kartenknöpfen gesehen und
     „grau“ genannt hatte; der erste Stand hatte #0E2317 als Grund.
     ⚠️ Der Grund liegt damit nah an GoraAdvs #080D14 (ΔE 5,2) — getrennt
     halten beide Apps jetzt Akzent, Schrift, Symbole und Start-Grün.
     Löst „Tageslicht“
     (Papier, Blau) vom selben Tag ab („irgendwie gefällt mir das neue
     farbkonzept nicht“). Vorgelegt mit echten Simulator-Bildern auf
     https://claude.ai/artifact/7J1WPJagp9cQjRaeP1RonD — gemessen: Schrift
     14,0 : 1, Akzent als Schrift 10,8 : 1, Knopfschrift 11,3 : 1; Abstand zu
     GoraAdv Grund ΔE 15,8, Akzent ΔE 24,8.
     ⚠️ Das Gelb ist bewusst heller als das Senf im App-Symbol: Senf läge mit
     ΔE 8,3 am Schotter-Ocker der Karte (#D49A2A) — dieses hat 14,8.
     ⚠️ Eine andere Farbwelt ist NUR dieser Block. Seit dem 2026-09-25 läuft
     jede Farbe im CSS über diese Tokens (54fa0c6); Karte, Roadbook und
     Kartenmarker behalten feste Farben. */
  --bg:           #181F25;
  --bg-surface:   #22282F;
  --bg-elevated:  #2C323A;
  --bg-input:     #12181E;

  --text-primary:   #F5ECD7;
  --text-secondary: #C1BDB5;
  /* BIKE-93 (2026-10-07, wie ADV-17): war #918D86 — auf Grund/Fläche/Karte 5,0 / 4,5 / 3,9 : 1.
     #9C9891 ist die kleinste Aufhellung im selben Farbton, die überall 4,5 : 1 schafft
     (5,8 / 5,2 / 4,5); klar unter --text-secondary (6,9 auf der Karte). */
  --text-muted:     #9C9891;

  --accent:       #EECF65;
  --accent-hover: #F1DB7F;
  --accent-dim:   rgba(var(--akzent-rgb), 0.13);
  --accent-glow:  rgba(var(--akzent-rgb), 0.25);

  /* Nature palette */
  --forest:       #2F6B47;
  --forest-dark:  #234F35;
  --sage:         rgb(110, 148, 100);
  --sand:         rgb(190, 158, 104);
  --stone:        rgb(118, 128, 120);
  --earth:        rgb(80, 55, 30);

  --border:       #363D44;
  --border-focus: var(--accent);

  /* Gradients */
  --grad-accent:  linear-gradient(135deg, #EECF65, #EFD777);
  --grad-nature:  linear-gradient(135deg, #EECF65, #EFD777);
  --grad-bg:      linear-gradient(160deg, #1D242A 0%, #181F25 55%, #141A21 100%);

  /* Feedback */
  --success: #4CAF50;
  --error:   #DC503C;
  --warning: #D4A028;

  /* Tier colors — route display */
  --tier-t1: #5C3317;
  --tier-t2: #C8763A;
  --tier-t3: #C4A040;
  --tier-t4: #6A7A6A;
  --tier-t5: #3A6B42;

  /* ═══ App-Palette (2026-08-15) ═══════════════════════════════════════════
     Die App hatte ihre eigenen Farben — sie hatten nur keine Namen und
     standen deshalb 60× von Hand im CSS. Die Feedback-Tokens darueber
     (--success/--error/--warning) benutzt sie NICHT und hat es nie: gemessen
     var(--success) 0×, var(--error) 2×, var(--warning) 1×.
     ⚠️ Ob die zwei Feedback-Paletten zu EINER werden sollen, ist eine
     Design-Entscheidung und keine Aufraeumung — sie bleibt offen. */
  --ok:          #5DC47E;   /* Route, Erfolg, Aufzeichnung gespeichert  (22×) */
  --app-text-2:  #C1BDB5;   /* zweitrangiger Text in der App           (17×) */
  --destructive: #D64236;   /* scharfgestellter Loeschknopf            (12×) */
  --recording:   #e02020;   /* Aufnahme laeuft                          (6×) */
  --attention:   #FBBF24;   /* „hier wird eine Antwort gebraucht"       (5×) */
  --danger-text: #F4877E;   /* Gefahr als Text oder Rahmen              (5×) */

  /* ═══ Farbkanäle und benannte Einzeltöne (seit 2026-09-25) ════════════════
     Farben MIT Deckkraft stehen als Kanal: rgba(var(--ueber-rgb), 0.08) statt
     rgba(255,255,255,0.08). --ueber-rgb ist die Farbe von Linien und Schleiern
     AUF Flächen (auf dunkel Creme, auf hell Tinte), --glas-rgb der Grund
     durchscheinender Tafeln über der Karte.
     ⚠️ --auf-akzent ist DUNKEL, weil der Akzent hell ist. Jeder Knopf mit
     gefülltem Akzent nimmt es — fest getipptes Weiß wäre auf dem Gelb
     unlesbar (14 solche Stellen am 2026-09-25 umgestellt). */
  /* Schriften: Überschriften / alles andere */
  --font-titel: 'Bricolage Grotesque', 'Figtree', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-text:  'Figtree', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ueber-rgb:        245, 236, 215;
  --glas-rgb:         24, 31, 37;
  --glas-planer-rgb:  29, 36, 42;
  --text-rgb:         245, 236, 215;
  --akzent-rgb:       238, 207, 101;
  --akzent-2:         #EECF65;     /* Gruppenfahrt-Knöpfe */
  --akzent-2-rgb:     238, 207, 101;
  /* Navigation bleibt BLAU wie Abbiegepfeil und Rahmen (Felix 2026-09-13) —
     eine eigene Welt über dem Roadbook, nicht Teil der Farbwelt. */
  --nav-akzent:       #1A5FD1;     /* Navigation: Ende, Angebote, Karten */
  --nav-akzent-rgb:   26, 95, 209;
  --gefahr:           #E0483E;
  --gefahr-rgb:       224, 72, 62;
  --gefahr-glas-rgb:  57, 25, 23;
  --info-rgb:         96, 165, 250;
  --achtung-rgb:      251, 191, 36;    /* „hier wird eine Antwort gebraucht" mit Deckkraft */
  --info-text:        #7DB6FB;
  --ok-rgb:           93, 196, 126;
  --ok-text:          #ACE0B6;
  --wald-rgb:         47, 107, 71;
  --rand-rgb:         54, 61, 68;
  --border-hover:     #495158;
  --auf-akzent:       #0B1F14;     /* Schrift auf gefüllten Farbknöpfen */
  --auf-akzent-2:     #0B1F14;     /* Schrift auf den Gruppenfahrt-Knöpfen */
  /* 🚨 START IST IMMER GRÜN (Felix 2026-09-25: „start nav - immer grün“) —
     auf der Karte (▶ Start) wie im Routenblatt (Start navigation), in jeder
     Farbwelt. Dasselbe Grün wie der Ring seiner Netz- und Ladesymbole
     (ΔE 3,9), dunkle Schrift 6,5 : 1. */
  --los:              #3AB54A;     /* „Start“-Knöpfe */
  --los-hover:        #4BC25A;
  --auf-los:          #0B1F14;
  /* Kartenknöpfe: Knöpfe und Chips ÜBER DER KARTE, im Planer und in der
     Navigation. Immer dunkel (Felix 2026-09-25, nach „Tageslicht“: „die
     buttons im planer und nav screen müssen auf jeden fall wieder dunkel
     werden“) — die Karte ist hell, ein heller Knopf verschwindet darauf,
     gleich ob Menü und Blätter hell oder dunkel sind. Angewendet über EINE
     Regel in app-mobile.css („KARTENKNÖPFE SIND DUNKEL“). */
  --knopf-rgb:        23, 31, 39;  /* Grund */
  --symbol:           #F5ECD7;     /* Schrift und Zeichen darauf */
  --knopf-an:         #5FD39A;     /* „an“: die Karte folgt dem Fahrer (↻) */
  --hervor-text:      #A7E2B2;     /* hervorgehobener Text: Codes, Hinweise */
  --fuss-1:           #0E141B;
  --fuss-2:           #080E14;

  /* ═══ Eckenradien — VIER Werte ═══════════════════════════════════════════
     Vorher 15 verschiedene, alle innerhalb von 2px zueinander. Kein Mensch
     unterscheidet 9 von 10 px; die Vielfalt war Tippgeschichte, keine
     Entscheidung.
     ⚠️ NICHT Teil der Skala und absichtlich unangetastet:
       • Pillen  — 999px, 50px, 31px, 20px, 18px: dort ist der Radius >= halbe
                   Hoehe, das ist eine FORM und kein Eckenmass.
       • Kreise  — 50%.
       • Haarlinien — 1px und 2px auf 3-4px hohen Balken (Hamburger-Striche,
                   Terrain-Balken, Ziehgriff). Auf 4px gerundet waeren sie rund
                   statt kantig; das waere eine sichtbare Aenderung. */
  --r-sm: 4px;
  --r:    8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow:    0 2px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 36px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* overscroll-behavior: none was here — removed because it kills trackpad back/forward swipe in Chromium browsers */
}

body {
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overscroll-behavior-y: none; /* suppress vertical rubber-band on iOS only, keeps horizontal swipe-to-navigate */
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ---- Navbar ---- */
.navbar {
  background: rgba(var(--glas-rgb), 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 1.5rem;
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid rgba(var(--akzent-rgb), 0.2);
  box-shadow: 0 1px 0 rgba(var(--akzent-rgb), 0.12), 0 4px 24px rgba(0,0,0,0.4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-brand img {
  height: 58px;
  width: auto;
  padding-bottom: 6px;
}

/* Nav links — flex-centered between brand and right group */
.navbar-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  list-style: none;
}

.navbar-nav li {
  display: flex;
}

/* Nav links — tactical uppercase */
.navbar-nav a {
  display: flex;
  align-items: center;
  font-family: var(--font-titel);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.52);
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  cursor: pointer;
}

.navbar-nav a:hover {
  color: var(--text-primary);
  background: rgba(var(--text-rgb), 0.05);
}

.navbar-nav a.active {
  color: var(--text-primary);
  font-weight: 700;
}

/* Primary CTA — orange */
.navbar-nav a.nav-planner {
  background: var(--accent);
  color: var(--auf-akzent) !important;
  font-family: var(--font-titel);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border-radius: var(--r-sm);
  margin-right: 0.3rem;
}
.navbar-nav a.nav-planner:hover {
  background: var(--accent-hover);
  color: var(--auf-akzent) !important;
}

/* Upload GPX — orange dashed */
.navbar-nav a.nav-upload {
  font-family: var(--font-titel);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px dashed rgba(var(--akzent-rgb), 0.5);
  background: rgba(var(--akzent-rgb), 0.06);
  color: var(--accent) !important;
  border-radius: var(--r-sm);
  margin-right: 0.3rem;
}
.navbar-nav a.nav-upload:hover {
  background: rgba(var(--akzent-rgb), 0.14);
  border-color: var(--accent);
  color: var(--text-primary) !important;
}

/* Mobile menu — orange accents */
.nav-mobile-menu {
  background: rgba(var(--glas-rgb), 0.98);
  border-top: 1px solid rgba(var(--akzent-rgb), 0.2);
}
.nav-mobile-menu a {
  font-family: var(--font-titel);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.55);
  border-left: 3px solid rgba(var(--akzent-rgb), 0.25);
}
.nav-mobile-menu a.nav-planner {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 700;
}
.nav-mobile-menu a.nav-upload {
  color: var(--accent);
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  background: rgba(var(--akzent-rgb), 0.08);
  border-left-color: var(--accent, var(--ok));
  color: var(--text-primary);
}

/* Right group: support + auth */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-auth a,
.navbar-auth button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


/* ---- Beta Badge ---- */
.navbar-beta {
  height: 24px;
  max-height: 24px;
  width: auto;
  max-width: 72px;
  aspect-ratio: 4725 / 1772;  /* Force ratio — Safari/iPad fallback for SVGs without intrinsic dims */
  margin-right: 0.25rem;
  align-self: center;
  flex-shrink: 0;
  opacity: 0.85;
  display: block;
}

/* ---- PRO lock overlay ---- */
/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-accent);
  color: var(--auf-akzent);
  box-shadow: 0 2px 12px rgba(var(--akzent-rgb), 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  color: var(--auf-akzent);
  box-shadow: 0 4px 18px rgba(var(--akzent-rgb), 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-elevated);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: 1.25rem;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ---- Loading Spinner ---- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(var(--ueber-rgb), 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
/* Toasts. The two offsets are variables because "the right edge" is not one
   place: in the app the toast has to clear the button stack, and in landscape
   the physical right edge is the ROADBOOK — the one thing that must never be
   covered while navigating. app-mobile.css sets the three values; the defaults
   here are the website's. */
.toast-container {
  position: fixed;
  bottom: var(--toast-bottom, 5rem);
  right: var(--toast-right, 1.5rem);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0.75rem 1.1rem;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  animation: toastIn 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
  max-width: 300px;
  border: 1px solid var(--border);
}
/* Set by toast()/showToast() shortly before the element is removed, so it
   leaves the way it arrived instead of fading on the spot. */
.toast.toast-out { animation: toastOut 0.22s ease forwards; }

.toast.success { border-left: 3px solid var(--forest); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.info    { border-left: 3px solid var(--accent); }
/* `warn` had NO rule at all until 2026-08-03 — every warning (all the "nothing
   found" results, the fuel-range hints, the quota notices) rendered with no
   coloured edge and read as a plain info toast. */
.toast.warn    { border-left: 3px solid var(--warning); }

/* In and out through the right screen edge (Felix 2026-08-03). The travel
   distance includes the container's own offset, so the toast is fully clear of
   the edge before it fades — at 20px it used to "appear" rather than arrive. */
@keyframes toastIn {
  from { transform: translateX(calc(100% + var(--toast-right, 1.5rem))); opacity: 0; }
  to   { transform: translateX(0);                                       opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0);                                       opacity: 1; }
  to   { transform: translateX(calc(100% + var(--toast-right, 1.5rem))); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.toast-out { animation-duration: 0.01ms; }
}

/* ---- Donation Button ---- */
/* ---- Misc ---- */
.d-flex { display: flex; }
/* ============================================
   Mobile — Hamburger Button
   ============================================ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.15s;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--text-primary);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--text-primary);
}

/* Mobile nav dropdown */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0; right: 0;
  background: rgba(var(--glas-planer-rgb), 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  z-index: 990;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  padding-bottom: 0.75rem;
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-menu a {
  display: block;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(var(--rand-rgb), 0.6);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-mobile-menu a:last-of-type {
  border-bottom: none;
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  color: var(--text-primary);
  background: rgba(var(--akzent-rgb), 0.07);
}

.nav-mobile-auth-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.nav-mobile-auth-row .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.85rem;
  text-align: center;
}

/* .nav-mobile-menu a wins on specificity (class+element) over .btn-primary (class only).
   Re-assert white text on the primary button explicitly. */
.nav-mobile-auth-row .btn-primary,
.nav-mobile-auth-row .btn-primary:hover {
  color: var(--auf-akzent);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Tablet — tighten nav, hide kofi  */
/* Navigationspunkte kompakter, sobald es eng wird. 2026-07-30 von 900px auf
   1100px angehoben: in voller Groesse braucht die Leiste 1011px, kompakt nur
   947px. Ohne diese Anhebung liefe sie im Band 1001-1010px ueber, direkt
   oberhalb des Hamburger-Breakpoints. */
@media (max-width: 1100px) {
  .navbar-nav a {
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
  }
}

/* Hamburger-Modus — 2026-07-30 von 768px auf 950px angehoben.
   Grund: die volle Leiste braucht 947px (Logo 147 + Navigation 543 +
   BETA/Login/Register 209 + 48 Padding). Der Hamburger sprang aber erst bei
   768px ein, also lief die Leiste im gesamten Band 769-946px ueber und der
   REGISTER-KNOPF stand ausserhalb des Sichtbereichs — betroffen war vor allem
   das Handy im Querformat (844-932px), das die Media-Queries faelschlich als
   Desktop behandeln. Die Zahl ist gemessen, nicht geraten; bei Aenderungen an
   der Navigation neu nachmessen. */
@media (max-width: 1000px) {
  .navbar-nav  { display: none !important; }
  .navbar-right { display: none !important; }
  .nav-hamburger { display: flex; }
}

/* Echte Mobilgeraete — bleibt bewusst bei 768px.
   Diese Regel gehoert NICHT zum Navigations-Umbruch: sie faengt den iOS-Safari-
   Autozoom auf fokussierte Eingabefelder ab. Auf 950px angehoben wuerde sie
   Formulare auf kleinen Laptops veraendern, wo es das Problem gar nicht gibt. */
@media (max-width: 768px) {
  /* iOS Safari auto-zooms any focused input with font-size < 16px.
     Force 16px globally on mobile — prevents the jump-and-stay-zoomed bug. */
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Tablet tweaks — prevent BETA badge from overflowing */
@media (max-width: 1024px) {
  .navbar-beta {
    height: 18px;
    max-height: 18px;
    max-width: 54px;
    position: static;
  }
}

/* Small phone tweaks */
@media (max-width: 480px) {
  .navbar-brand img { height: 48px; }
  .navbar-beta { display: none; }
}


/* ── Footer (global) ────────────────────────────────────────────────────── */
/* 2026-05-25: background switched from olive-green --bg-surface (rgb(17,22,13))
   to a blue-dark gradient matching the rest of the site. The page bg is a
   165deg gradient from #131822 → #020306; the footer picks up at #060810
   and fades into #020306, so it reads as the continuation of the page rather
   than a separate olive panel that clashed with the surrounding blue tones
   (Felix 2026-05-25 screenshot review). */
footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--fuss-1) 0%, var(--fuss-2) 100%);
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
}
footer a { color: var(--text-secondary); }
footer a:hover { color: var(--text-primary); }

/* ── Kontextueller Guide-Hinweis auf Länder-/Staatenseiten ──────────────────
   2026-07-30. Sitzt direkt über dem "Ride nearby"-Raster und führt von einer
   Länderseite zum passenden Routennetz-Guide (TET in Europa, BDR in den USA).
   Bewusst EINE Zeile statt einer Karte: der Hinweis soll den Lesefluss zum
   Nachbarländer-Raster nicht unterbrechen. CSS liegt hier statt inline auf
   19 Seiten, damit es eine Quelle gibt. */
.related-guide {
  max-width: 860px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}
.related-guide a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.95rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.related-guide a:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-primary);
}
.related-guide .rg-label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}
.related-guide .rg-arrow { margin-left: auto; flex-shrink: 0; color: var(--accent); }
@media (max-width: 560px) {
  .related-guide a { flex-wrap: wrap; gap: 0.35rem 0.7rem; }
  .related-guide .rg-arrow { margin-left: 0; }
}

/* Abschnittsueberschriften auf Laender-/Info-Seiten sind seit 2026-07-30 <h2>
   statt <p> — vorher trug jede Laenderseite sechs schlagwortstarke Zeilen als
   Fliesstext. margin-top MUSS hier stehen: die Inline-Regel .section-label
   setzt nur margin-bottom, ein h2 braechte vom Browser 0.83em oben mit und
   wuerde jeden Abschnitt nach unten schieben. h2.section-label schlaegt die
   Inline-Regel ueber die Spezifitaet, unabhaengig von der Reihenfolge. */
h2.section-label { margin-top: 0; }

/* 🚨 Die vier Kennzahlen der Featured Route (km · Offroad · Ride time · Peak).
   Das HTML von 45 Laenderseiten sagt class="route-stats-grid", die Regel dafuer
   hiess aber ueberall .route-stats — die Namen haben NIE zusammengepasst, schon
   in der Sicherung vom 2026-08-03 nicht. Ohne display:grid sind die vier
   Kacheln normale Bloecke und stapeln sich untereinander statt nebeneinander zu
   stehen; Felix hat es am 2026-08-17 auf california.html gemeldet.
   Die Regel steht hier und nicht in den Seiten, weil main.css von jeder
   Laenderseite geladen wird — eine Regel statt 45 Einfuegungen.
   ⚠️ inspiration.html benutzt als EINZIGE Seite class="route-stats" und hat die
   passende Inline-Regel; die bleibt unberuehrt. Die 17 verwaisten
   .route-stats-Regeln in den Laenderseiten schaden nicht und bleiben liegen. */
.route-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}
@media (max-width: 480px) {
  .route-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
