/* RallyX Finals 2026 · Estering — PWA Styles
   Design-Tokens aus Programmheft-Design-Handoff.md */

:root {
  --red: #d61f26;
  --bg: #050302;
  --bg-2: #0a0807;
  --headline: #f6f0e6;
  --body: #ece3d7;
  --muted: #cdbcab;
  --meta: #8c7a6a;
  --badge-text: #120607;
  --pad-x: 22px;
}

@font-face {
  font-family: 'Norwester RX';
  src: url('../assets/fonts/Norwester-RX.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* ---------- Sprachumschaltung (DE / EN) ----------
   Nur die INAKTIVE Sprache ausblenden — die aktive behaelt das display ihrer
   Komponente (z.B. block aus .badge > span). !important noetig, weil
   Komponenten-Regeln spezifischer sind als der Attribut-Selektor. */
html[lang="de"] [data-lang-en] { display: none !important; }
html[lang="en"] [data-lang-de] { display: none !important; }

/* ---------- Einstiegs-Auswahl (Sprache -> Interaktiv/PDF) ---------- */
.intro-gate { display: none; }
html.show-gate .intro-gate {
  display: flex; flex-direction: column;
  position: fixed; inset: 0; z-index: 200;
  overflow: hidden; background: var(--bg);
  transition: opacity .4s ease;
}
html.show-gate body { overflow: hidden; }
.intro-gate.gate-out { opacity: 0; pointer-events: none; }
.gate-inner {
  position: relative; z-index: 4; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--pad-x); text-align: center;
  perspective: 900px;
}
.gate-logo { width: 78%; max-width: 320px; height: auto; filter: drop-shadow(0 6px 20px rgba(0,0,0,.7)); }
.gate-sub {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 19px; color: var(--headline); text-transform: uppercase;
  margin: 14px 0 40px; text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.gate-label {
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px; line-height: 1.9;
}
.gate-estering { width: 236px; height: auto; margin-top: 38px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
.gate-step { transform-origin: 50% 0; }
.gate-step.flip {
  transition: transform .42s ease-in, opacity .42s ease-in;
  transform: rotateX(-92deg); opacity: 0;
}
.gate-flag {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  width: 250px; margin: 0 auto 16px;
  transform: skewX(-7deg);
  background: rgba(10,8,7,.75);
  border: 1px solid rgba(214,31,38,.55);
  padding: 14px 20px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.flag-box { width: 58px; height: 30px; flex: none; overflow: hidden; }
.flag-box svg { width: 100%; height: 100%; display: block; }
.flag-de { background: linear-gradient(180deg, #161616 0 33.33%, #d61f26 33.33% 66.66%, #ffce00 66.66% 100%); }
.gate-flag-text {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 24px; color: var(--headline); text-transform: uppercase;
}
.gate-step2 { opacity: 0; transform: rotateX(90deg); transform-origin: 50% 100%; }
.gate-step2.in { transition: transform .42s ease-out, opacity .42s ease-out; transform: rotateX(0); opacity: 1; }
.gate-choice {
  display: block; width: 250px; margin: 0 auto 16px;
  transform: skewX(-7deg);
  background: var(--red); border: none; cursor: pointer;
  padding: 16px 20px; text-decoration: none;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 24px; color: var(--badge-text); text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.gate-choice-pdf { background: rgba(10,8,7,.75); border: 1px solid rgba(214,31,38,.55); color: var(--headline); }
.gate-choice small {
  display: block; font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 9px; letter-spacing: .18em; margin: 2px 0;
  color: rgba(18,6,7,.75);
}
.gate-choice-pdf small { color: var(--muted); }
.gate-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px var(--pad-x) 16px; border-top: 1px solid rgba(214,31,38,.25);
  background: linear-gradient(to top, rgba(10,8,7,.95), rgba(10,8,7,.85));
}
.gate-partner-logos {
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
}
.gate-partner-logos a {
  display: inline-block; width: 44px; height: 44px; opacity: 0.85;
  transition: opacity .2s ease;
}
.gate-partner-logos a:active { opacity: 1; }
.gate-partner-logos img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Visual Vandalist Logo (im Impressum, ueber dem Bg-Bild) ---------- */
.vv-footer {
  display: block; width: 22.5vw; margin: 32px auto 4px; line-height: 0;
}
.vv-logo { display: block; width: 100%; height: auto; opacity: 0.05; }

/* ---------- Karo-Band (Zielflagge) ---------- */
.checker {
  height: 14px;
  background-image: repeating-conic-gradient(#efe8dc 0% 25%, #120c08 0% 50%);
  background-size: 14px 14px;
  opacity: .3;
}

/* ---------- Sticky Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(5,3,2,.97) 0%, rgba(5,3,2,.92) 100%);
  border-bottom: 1px solid rgba(214,31,38,.35);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px var(--pad-x);
}
.topbar-logos { display: flex; align-items: center; gap: 12px; margin-right: auto; }
/* Bedien-Buttons als eigene Gruppe rechts, enger zusammen */
.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topbar-actions .lang-toggle { margin-left: 0; }
.topbar-actions .lang-flag { order: 1; }  /* Sprach-Flagge ganz rechts aussen */
.topbar-logos a { display: flex; }
.topbar-logos img { height: 26px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.topbar-logos img.logo-estering { height: 32px; }

.lang-toggle {
  margin-left: auto;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--headline);
  background: none;
  border: 1px solid rgba(214,31,38,.55);
  padding: 6px 10px;
  cursor: pointer;
}
.lang-toggle .active { color: var(--red); }

/* Sprachschalter als Flaggen-Knopf — gleiche Aussengroesse wie Brille/Download,
   aber die Flagge fuellt den roten Rahmen randlos aus.
   Gezeigt wird die Flagge der ANDEREN Sprache (das Umschalt-Ziel). */
.lang-flag { margin-left: auto; display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.lang-flag .flag { width: 36px; height: 28px; display: block; }
html[lang="de"] #langToggle .flag-de { display: none; }  /* DE aktiv -> UK-Flagge zeigen */
html[lang="en"] #langToggle .flag-uk { display: none; }  /* EN aktiv -> DE-Flagge zeigen */

/* Lesbarkeits-Knopf (Brille) */
.a11y-toggle { margin-left: 8px; display: flex; align-items: center; padding: 6px 8px; }
.a11y-toggle svg { width: 20px; height: 16px; }
html.a11y .a11y-toggle { color: var(--red); border-color: var(--red); background: rgba(214,31,38,.15); }

/* Download-Knopf (Programmheft-PDF) — exakt gleicher Kasten wie die Brille */
.dl-toggle { margin-left: 8px; display: flex; align-items: center; padding: 6px 8px; color: var(--headline); text-decoration: none; }
.dl-toggle svg { width: 20px; height: 16px; }

/* ---------- Lesbarkeits-Modus: groessere, einfachere Schrift ---------- */
html.a11y body { font-size: 20px; line-height: 1.65; }
html.a11y .prose p, html.a11y .qa .a, html.a11y .qa .q,
html.a11y .tt-label, html.a11y .rule .rule-text,
html.a11y .stat .stat-text, html.a11y .hero-meta {
  font-family: 'Segoe UI', Arial, sans-serif;
  text-align: left;
  color: #fff;
}
html.a11y .prose p { font-size: 20px; }
html.a11y .qa .q { font-size: 20px; font-weight: 700; }
html.a11y .qa .a { font-size: 20px; }
html.a11y .tt-label { font-size: 20px; }
html.a11y .tt-sub { font-size: 16px; }
html.a11y table.rx { font-size: 18px; }
html.a11y #starterliste table.rx { font-size: 16px; }
html.a11y .rule .rule-text { font-size: 18px; }
html.a11y .stat .stat-text { font-size: 16px; color: #fff; }
html.a11y .kicker > span:not(.line) { font-size: 15px; letter-spacing: .08em; }
html.a11y .hero-kicker { font-size: 16px; font-family: 'Segoe UI', Arial, sans-serif; letter-spacing: .1em; }
html.a11y .hero-meta { font-size: 18px; }
html.a11y .filter-bar select, html.a11y .filter-bar input { font-size: 19px; }
html.a11y .starter-count { font-size: 15px; }
html.a11y .gallery figure figcaption { font-size: 15px; font-family: 'Segoe UI', Arial, sans-serif; color: #fff; }
html.a11y .social-label { font-size: 14px; }
html.a11y .driver-meta { font-size: 14px; letter-spacing: .1em; }

/* Lesbarkeits-Modus: keine rote (oder gruene) Schrift — alles neutral weiss.
   Links bleiben durch Unterstreichung erkennbar. */
html.a11y .accent,
html.a11y .prose .accent,
html.a11y .section.green .prose .accent,
html.a11y .prose strong.sub-head,
html.a11y .qa .q,
html.a11y .section h2 span[style*="color"],
html.a11y .who-is .who-name,
html.a11y .handle-link,
html.a11y .kicker > span:not(.line),
html.a11y .tt-row.highlight .tt-time,
html.a11y .tt-time,
html.a11y .stat .stat-label,
html.a11y .eco-panel .eco-title,
html.a11y .eco-panel li::before,
html.a11y .hero-sub span[style*="color"],
html.a11y .jumpnav a.current { color: #fff !important; }
html.a11y .handle-link { text-decoration: underline; }

/* Lesbarkeits-Modus: komplett schwarzer Hintergrund — nur das Titelbild behaelt sein Foto */
html.a11y body, html.a11y #sections { background: #000; }
html.a11y .section:not(#hero) { background: #000; }
html.a11y .section:not(#hero) .section-bg { display: none; }
html.a11y .ad-section { background: #000; }
html.a11y .bottombar { background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.92) 22%, #000 60%); }
html.a11y .topbar { background: #000; }

/* Sprungmarken — nur redaktionelle Sections */
.jumpnav-wrap { position: relative; }
.nav-arrow {
  position: absolute; top: 0; bottom: 8px; width: 26px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; z-index: 2;
  font-family: 'Anton', sans-serif; font-size: 20px; line-height: 1;
  color: var(--red); padding: 0;
}
.nav-arrow.left { left: 0; background: linear-gradient(90deg, rgba(5,3,2,1) 55%, rgba(5,3,2,0)); }
.nav-arrow.right { right: 0; background: linear-gradient(270deg, rgba(5,3,2,1) 55%, rgba(5,3,2,0)); }
.jumpnav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 26px 8px;
}
.jumpnav::-webkit-scrollbar { display: none; }
.jumpnav a {
  flex: none;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
}
.jumpnav a.current { color: var(--red); }

/* ---------- Sections allgemein ---------- */
.section {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  scroll-margin-top: 106px;
}
.section-bg { position: absolute; inset: 0; z-index: 0; }
/* Weiche Kanten: jede Section blendet oben/unten in den Seitengrund — keine harten Uebergaenge */
.section-bg::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(5,3,2,0) 16%, rgba(5,3,2,0) 84%, var(--bg) 100%);
}
.section-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 46%;
  filter: contrast(1.06) saturate(.92) brightness(.9);
}
/* Grade-Stack wie im Heft: multiply-Rotbraun + soft-light-Rot + Scrim + Grain */
.grade-multiply {
  position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: multiply;
  background: linear-gradient(180deg, #6a5a52 0%, #7a4038 40%, #3a1815 78%, #1a0c09 100%);
}
.grade-red {
  position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: soft-light;
  background: radial-gradient(80% 70% at 50% 30%, rgba(214,31,38,.42) 0%, rgba(214,31,38,0) 62%);
}
.grade-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,5,4,.74) 0%, rgba(9,7,6,.52) 28%, rgba(9,7,6,.5) 55%, rgba(9,7,6,.64) 82%, rgba(6,4,3,.92) 100%);
}
.grade-grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-content {
  position: relative;
  z-index: 4;
  padding: 34px var(--pad-x) 44px;
}
/* Platz fuer die fixe Bottom-Bar am Seitenende */
#sections { padding-bottom: 92px; background: var(--bg); }

/* Kicker-Zeile: Label + auslaufende Linie */
.kicker {
  display: flex; align-items: center; gap: 14px;
  margin: 10px 0 22px;
}
.kicker > span:not(.line) {
  font-family: 'Archivo', sans-serif;
  font-weight: 900; font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--red);
}
.kicker .line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(214,31,38,.55), rgba(255,255,255,0));
}

h1, h2 {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-weight: normal;
  color: var(--headline);
  text-transform: uppercase;
  line-height: .85;
  text-shadow: 0 4px 18px rgba(0,0,0,.72);
}
/* Live-Uhr (Berlin) rechts in der Timetable-Kickerzeile.
   Ueberschreibt die rote/kleine Kicker-Span-Formatierung. */
.tt-kicker .tt-clock {
  flex: none; white-space: nowrap;
  font-family: 'Norwester RX', 'Anton', sans-serif !important;
  font-size: 20px !important; font-weight: normal !important;
  letter-spacing: .02em !important; text-transform: none !important;
  color: var(--headline) !important;   /* Stunden:Minuten + Suffix weiss */
  /* Feste Ziffernbreite -> Uhr wackelt nicht sekuendlich */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.tt-kicker .tt-clock .sec { color: var(--red); }   /* :Sekunden rot */
.tt-kicker .tt-clock .suffix { font-size: 14px; }
.tt-kicker .tt-clock .d { display: inline-block; width: .6em; text-align: center; }
.headline-sub {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}

/* Schräges rotes Badge */
.badge {
  display: inline-block;
  transform: skewX(-7deg);
  background: var(--red);
  padding: 9px 18px 7px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.badge > span {
  display: block;
  /* Kein Gegen-Skew: Text lehnt mit dem Kasten nach rechts (rechtskursiv) */
  transform: none;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 24px;
  line-height: 1;
  color: var(--badge-text);
  text-transform: uppercase;
  letter-spacing: .01em;
}

/* ---------- Hero ---------- */
#hero { min-height: 100dvh; display: flex; flex-direction: column; }
#hero .section-content {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 10dvh;
  padding-bottom: 100px;
}
.hero-kicker {
  font-family: 'Archivo', sans-serif;
  font-weight: 900; font-size: 12px;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.gate-version {
  display: none;
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 7.3px; letter-spacing: .04em;
  color: var(--muted); opacity: .195;
  text-align: center; margin: 4px 0 2px;
}
/* Nur am zweiten Gate (Interaktiv/Download) sichtbar */
#gateStep2:not([hidden]) ~ .gate-version { display: block; }
.hero-title { font-size: clamp(74px, 24vw, 120px); letter-spacing: -.005em; }
.hero-title .x { color: var(--red); }
.hero-badge { margin: 14px 0 14px 6px; }
.hero-sub {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: clamp(30px, 9.4vw, 46px);
  color: var(--headline);
  text-transform: uppercase;
  line-height: .85;
  text-shadow: 0 4px 18px rgba(0,0,0,.72);
}
.hero-meta {
  /* Ganz oben im Hero, direkt unter der Header-Leiste */
  position: absolute; top: 12px; left: var(--pad-x); right: var(--pad-x);
  font-family: 'Oswald', sans-serif; font-weight: 300;
  font-size: 14px; color: var(--body);
  text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.hero-meta strong { font-weight: 600; color: var(--headline); }
.scroll-hint {
  margin: 34px auto 18px;
  width: 22px; height: 34px;
  border: 1px solid rgba(236,227,215,.5);
  border-radius: 12px;
  position: relative;
}
.scroll-hint::after {
  content: '';
  position: absolute; left: 50%; top: 7px;
  width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px;
  background: var(--red);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(10px); opacity: .2; } }

/* ---------- Timetable ---------- */
.day-card { margin-bottom: 34px; }
.day-badge { display: block; width: fit-content; margin: 0 0 16px auto; }
.day-badge > span { font-size: 21px; }

.tt-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0 9px;
  border-bottom: 1px solid rgba(205,188,171,.16);
}
.tt-row.highlight { border-bottom-color: rgba(214,31,38,.45); }
.tt-time {
  flex: none; width: 58px;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 21px;
  color: var(--headline);
  white-space: nowrap;
}
/* EN: "8:00 am" braucht mehr Platz, damit am/pm hinter der Zeit bleibt */
html[lang="en"] .tt-time { width: 82px; }
.tt-row.highlight .tt-time { color: var(--red); }
.tt-label { flex: 1; font-size: 15px; }
.tt-row.highlight .tt-label { font-weight: 700; color: var(--headline); text-transform: uppercase; letter-spacing: .04em; }
.tt-info {
  flex: none;
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--meta);
}
.tt-sub { display: block; font-size: 12.5px; color: var(--meta); }
/* Navi-Links im Timetable: Wort (im Label) wie umgebender Text, Adressen (Info-Spalte) rot */
.tt-nav { color: inherit; text-decoration: none; }
.tt-info .tt-nav { color: var(--red); }

.tt-row.party { border-bottom: none; }
.tt-row.party .tt-label { color: var(--headline); }

/* Läuft-jetzt-Marker */
.tt-row.now {
  background: linear-gradient(90deg, rgba(214,31,38,.18), rgba(214,31,38,0) 80%);
  border-left: 3px solid var(--red);
  padding-left: 11px;
  margin-left: -14px;
}
.now-chip {
  display: inline-block;
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--badge-text);
  background: var(--red);
  padding: 3px 7px 2px;
  margin-left: 8px;
  vertical-align: 2px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- Fixe Bottom-Bar: Partner / Social Media, wischbar (2 Rastpositionen) ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(5,3,2,0) 0%, rgba(5,3,2,.9) 22%, #050302 60%);
  padding-top: 14px;
}
.bottombar-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.bottombar-track::-webkit-scrollbar { display: none; }
.bottombar-page {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 0 var(--pad-x) 6px;
}
.bottombar-dots { display: flex; justify-content: center; gap: 6px; padding: 2px 0 7px; }
.bottombar-dots .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(205,188,171,.35);
}
.bottombar-dots .dot.on { background: var(--red); }

.strip-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.strip-head span {
  font-family: 'Archivo', sans-serif;
  font-weight: 900; font-size: 10px;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted);
}
.strip-head .line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(214,31,38,.55), rgba(255,255,255,0));
}

.social-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.social-item { display: flex; align-items: center; gap: 5px; text-decoration: none; min-width: 0; }
.social-ico {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  border: 1px solid rgba(214,31,38,.4);
  display: flex; align-items: center; justify-content: center;
}
.social-ico svg { width: 13px; height: 13px; }
.social-label {
  font-family: 'Oswald', sans-serif; font-weight: 300;
  font-size: 10.5px; color: var(--body); white-space: nowrap;
}
.partner-logos {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.partner-logos a, .partner-logos span { flex: none; display: flex; }
.partner-logos img { height: 16px; width: auto; object-fit: contain; }
.partner-logos img[data-partner="acn"] { height: 27px; }
.partner-logos img[data-partner="sparkasse"] { height: 20px; border-radius: 2px; }
.partner-logos .whitebox { background: #fff; border-radius: 4px; padding: 3px 5px; }
.partner-logos .whitebox img { height: 15px; }

/* ---------- Anzeigen-Sections (datengetrieben aus ads.json) ---------- */
/* "Anzeige"-Kennzeichnung: immer OBERHALB der Anzeige, nie auf dem Motiv */
.ad-tag {
  align-self: flex-end;
  margin: 0 10px 5px 0;
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--meta);
}
/* Bildunterschrift unter einer Anzeige (Norwester, zentriert, zweizeilig rot/weiss) */
.ad-caption {
  margin: 12px var(--pad-x) 2px; text-align: right; line-height: 1.15;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 22px; text-transform: uppercase; letter-spacing: .02em;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.ad-caption .cap-w { color: var(--headline); }
.ad-caption .cap-r { color: var(--red); }
/* Umlautpunkte in der Caption naeher ans Wort */
.ad-caption .uml::after { top: .05em; }

/* ---------- Inhalts-Bausteine (alle Sections) ---------- */
.prose { max-width: 620px; }

/* Auf breiten Screens alle Inhalts-Medien so breit wie der Textcontainer (620px),
   links buendig wie das Saison-Bild. Mobil (randlose Galerien) bleibt unveraendert. */
@media (min-width: 700px) {
  .section-content > .photo,
  .section-content > .gallery,
  .section-content > .carousel,
  .section-content > .map-wrap,
  .section-content > figure,
  .section-content > img {
    max-width: 620px;
    margin-left: 0;
    margin-right: auto;
  }
}
.prose p { margin: 0 0 14px; text-align: justify; text-wrap: pretty; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.prose strong { font-weight: 600; color: var(--headline); }
.prose strong.sub-head { color: var(--red); }
/* Zwischenueberschrift dicht an ihrem Absatz: mehr Luft davor, wenig danach */
.prose p:has(> strong.sub-head:only-child) { margin: 20px 0 3px; }
.prose p:has(> strong.sub-head:only-child):first-child { margin-top: 0; }
/* Zwischenueberschriften (Rules + Season): Norwester, zweifarbig, rechtsbuendig,
   mit rotem Unterstrich (DE + EN) */
#rallyx-erklaert .prose p:has(> strong:only-child),
#saison .prose p:has(> strong:only-child),
#grenzenlos .prose p:has(> strong:only-child) { margin: 22px 0 4px; text-align: right; }
#rallyx-erklaert .prose p > strong,
#saison .prose p > strong,
#grenzenlos .prose p > strong {
  display: inline-block; font-family: 'Norwester RX', 'Anton', sans-serif;
  font-weight: normal; font-size: 22px; line-height: 1.05;
  letter-spacing: .01em; text-transform: uppercase;
  color: var(--headline); text-shadow: 0 2px 8px rgba(0,0,0,.7);
}
#rallyx-erklaert .prose strong .hl,
#saison .prose strong .hl,
#grenzenlos .prose strong .hl { color: var(--red); }
#rallyx-erklaert .prose strong .hl.hl-green,
#saison .prose strong .hl.hl-green,
#grenzenlos .prose strong .hl.hl-green { color: #46b35a; }
/* roten Unterstrich gruen faerben, wenn die Ueberschrift ein gruenes Wort hat */
#rallyx-erklaert .prose p > strong:has(.hl-green)::after,
#saison .prose p > strong:has(.hl-green)::after,
#grenzenlos .prose p > strong:has(.hl-green)::after { background: #46b35a; }
#rallyx-erklaert .prose p > strong::after,
#saison .prose p > strong::after,
#grenzenlos .prose p > strong::after {
  content: ''; display: block; width: 42px; height: 2px;
  background: var(--red); margin: 5px 0 0 auto;
}

.prose p.who-is-p { text-align: right; }
.who-is {
  display: block;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-weight: normal;
  font-size: 30px !important; line-height: .9;
  color: var(--headline) !important;
  text-transform: uppercase;
  text-align: right;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.who-is .who-name { color: var(--red); }
.prose .accent { color: var(--red); font-weight: 500; }

.sig { display: block; margin: 18px 0 6px; }
.sig::before { content: ''; display: block; width: 34px; height: 2px; background: var(--red); margin-bottom: 8px; }
.sig .sig-name, .sig .sig-role { display: block; }
.sig .sig-name {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 21px; color: var(--headline); text-transform: uppercase;
}
.sig .sig-role { font-size: 13px; color: var(--meta); }

/* Foto mit weichem Rand */
.photo {
  position: relative; margin: 18px 0;
  border-radius: 3px; overflow: hidden;
  border: 1px solid rgba(214,31,38,.35);
  box-shadow: 0 14px 32px rgba(0,0,0,.6);
}
.photo img { display: block; width: 100%; height: auto; }
.photo figcaption {
  padding: 8px 12px; font-size: 12px; color: var(--muted);
  background: rgba(5,3,2,.8);
}
.name-tag {
  position: absolute; bottom: 8px; font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--red); text-shadow: 0 2px 4px rgba(0,0,0,.85);
}
.name-tag.left { left: 12px; }
.name-tag.right { right: 12px; }
/* Quellenangabe unten links im Bild */
.img-credit {
  position: absolute; left: 8px; bottom: 7px; z-index: 2;
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 9px; letter-spacing: .04em; color: rgba(246,240,230,.82);
  background: rgba(5,3,2,.5); padding: 2px 6px; border-radius: 3px;
  pointer-events: none;
}

/* Zahlen & Fakten */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin: 22px 0; }
.stat { border-left: 2px solid var(--red); padding-left: 12px; }
.stat .stat-num {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 38px; line-height: .9; color: var(--headline);
}
.stat .stat-label {
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin: 4px 0 6px;
}
.stat .stat-text { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* Tabellen (Klassenvergleich, Entry Lists) */
.table-scroll { overflow-x: auto; margin: 18px calc(-1 * var(--pad-x)); padding: 0 var(--pad-x); }
table.rx {
  border-collapse: collapse; width: 100%; min-width: 460px;
  font-size: 13px;
}
table.rx th {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 8px 10px 6px;
  border-bottom: 1px solid rgba(214,31,38,.5);
}
table.rx td { padding: 9px 10px 7px; border-bottom: 1px solid rgba(205,188,171,.14); vertical-align: top; }
table.rx td.num {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 17px; color: var(--red); white-space: nowrap;
}
table.rx tr.champ td { color: var(--headline); }
/* Noch nicht bestätigte Starter (TBA): rotes Fragezeichen als Flagge, Name kursiv */
.nat-tba { color: var(--red); font-weight: 700; }
#starterliste table.rx tr.tba td:nth-child(2) { font-style: italic; color: var(--muted); }

/* Fahrertalk-Kicker gespiegelt: Linie links, Text rechts */
section[id^="fahrertalk-"] .kicker { flex-direction: row-reverse; }
section[id^="fahrertalk-"] .kicker .line {
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(214,31,38,.55));
}

/* Fahrertalk / Interviews */
.driver-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.driver-num {
  display: inline-block; transform: skewX(-7deg); background: var(--red);
  padding: 6px 12px 4px;
}
.driver-num span {
  display: block; transform: none;
  font-family: 'Norwester RX', 'Anton', sans-serif; font-size: 24px; color: var(--badge-text);
}
.driver-meta {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.qa { margin: 0 0 16px; }
.qa .q {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14.5px;
  color: var(--red); margin-bottom: 4px; text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.qa .a { font-size: 14.5px; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.qa .a strong { font-weight: 600; color: var(--headline); }

/* Zwei Signaturen nebeneinander: Bjoern links, Marco rechts */
.sig-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 18px 0; }
.sig-row .sig { margin: 0; }
.sig-row .sig-right { text-align: right; }
.sig-row .sig-right::before { margin-left: auto; }  /* rote Linie rechts */

/* Hausordnung */
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
/* Regeln ohne Schild: volle Breite unter dem 2x2-Schilder-Block */
.rule:not(:has(img)) { grid-column: 1 / -1; }
.rule {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: rgba(10,8,7,.55); border: 1px solid rgba(205,188,171,.18);
  border-radius: 4px; padding: 12px;
  text-align: center;
}
.rule img { width: 44px; height: 44px; flex: none; }
.rule .rule-text { font-size: 12.5px; line-height: 1.35; }
/* Grossgeschriebene Regel-Titel immer in eigener Zeile */
.rule .rule-text strong { display: block; margin-bottom: 3px; }
.rule .rule-text em { display: block; font-style: normal; color: var(--meta); font-size: 11.5px; }

/* Umwelt-Seite (gruener Akzent statt Rot) */
.section.green .kicker > span:not(.line) { color: #46b35a; }
.section.green .kicker .line { background: linear-gradient(90deg, rgba(70,179,90,.55), rgba(255,255,255,0)); }
.section.green h2 span[style*="color"] { color: #46b35a !important; }
.section.green .prose .accent { color: #7bd08c; }
.section.green .badge { background: #46b35a; }
.section.green .grade-multiply {
  background: linear-gradient(180deg, #55665c 0%, #3b5a42 40%, #16301c 78%, #0a150c 100%);
}
.section.green .grade-red {
  background: radial-gradient(80% 70% at 50% 30%, rgba(70,179,90,.42) 0%, rgba(70,179,90,0) 62%);
}
.eco-panel {
  background: rgba(40,90,52,.5); border: 1px solid rgba(70,179,90,.4);
  border-radius: 4px; padding: 16px 16px 10px; margin: 18px 0;
}
.eco-panel .eco-title {
  font-family: 'Norwester RX', 'Anton', sans-serif; font-size: 20px;
  color: #7bd08c; text-transform: uppercase; margin-bottom: 10px;
}
.eco-panel ul { list-style: none; }
.eco-panel li { padding: 5px 0 5px 22px; position: relative; font-size: 14px; }
.eco-panel li::before { content: '✓'; position: absolute; left: 0; color: #46b35a; font-weight: 600; }

/* Starterliste (interaktiv) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.filter-bar select, .filter-bar input {
  background: rgba(10,8,7,.8); color: var(--body);
  border: 1px solid rgba(205,188,171,.35); border-radius: 3px;
  font-family: 'Oswald', sans-serif; font-weight: 300; font-size: 14px;
  padding: 8px 10px;
}
.filter-bar input { flex: 1; min-width: 130px; }
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--red); }
.starter-count { font-size: 12px; color: var(--meta); margin-bottom: 8px; }
/* Organisations-Tabellen: 2 Spalten passen ohne Seitwaerts-Scrollen */
#organisation table.rx { min-width: 0; width: 100%; table-layout: fixed; }
#organisation table.rx td { white-space: normal; overflow-wrap: break-word; padding: 7px 8px 6px; }
#organisation table.rx td:first-child { width: 52%; }

/* Starter-Tabelle kompakt */
#starterliste table.rx { font-size: 12.5px; min-width: 400px; }
#starterliste table.rx td { padding: 5px 8px 4px; }
#starterliste table.rx th { padding: 6px 8px 4px; font-size: 9px; }
#starterliste table.rx td.num { font-size: 15px; }

/* Foto-Galerie (horizontal scrollbar) */
.gallery {
  display: flex; gap: 12px; overflow-x: auto;
  margin: 18px calc(-1 * var(--pad-x)); padding: 4px var(--pad-x) 12px;
  scroll-snap-type: x mandatory;
}
.gallery img {
  height: 200px; width: auto; flex: none; border-radius: 3px;
  border: 1px solid rgba(214,31,38,.3); scroll-snap-align: center;
}
/* Karussell-Modus: genau EIN Bild sichtbar, rote Pfeile als Scroll-Hinweis */
.carousel { position: relative; margin: 18px calc(-1 * var(--pad-x)); }
.carousel .gallery { margin: 0; padding: 0 0 4px; scroll-snap-type: x mandatory; gap: 0; }
.carousel .gallery > * { flex: 0 0 100%; width: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
/* Einheitliches 4:3-Format, fuellt den Rahmen komplett; die Bilddateien sind
   passend zugeschnitten, damit das Hauptmotiv nicht beschnitten wird */
.carousel .gallery img {
  width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover;
  border-radius: 0; border: none;
}
.carousel .gallery figure { position: relative; }
.thing-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 6px 12px 5px; }
.thing-badge > span { font-size: 14px; letter-spacing: .05em; }
.carousel .gallery figure figcaption { padding: 0 var(--pad-x); }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(214,31,38,.55); background: rgba(5,3,2,.65);
  color: var(--red); font-family: 'Anton', sans-serif; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0 0 2px;
}
.car-arrow.left { left: 10px; }
.car-arrow.right { right: 10px; }

/* Kuenstliche Umlaut-Punkte — Norwester RX hat keine Umlaute (siehe Design-Handoff §2) */
.uml-word { white-space: nowrap; }  /* Umlaut-Wort nie trennen */
.uml { position: relative; display: inline-block; }
.uml::after {
  content: ''; position: absolute; left: 50%; top: -.08em;
  width: .13em; height: .13em; border-radius: 50%;
  background: currentColor;
  box-shadow: .24em 0 0 currentColor;
  transform: translateX(-.185em);
}
/* Schwedisches Å: Ring statt Punkte */
.uml.uml-ring::after {
  width: .18em; height: .18em;
  background: none; border: .045em solid currentColor;
  box-shadow: none;
  transform: translateX(-50%);
}

.gallery figure { flex: none; margin: 0; scroll-snap-align: center; }
.gallery figure img { height: 200px; width: auto; }
.gallery figure figcaption {
  margin-top: 6px; font-size: 11.5px; color: var(--muted);
  font-family: 'Oswald', sans-serif; font-weight: 300; max-width: 280px;
}

/* Streckenplan */
.map-wrap {
  margin: 18px 0; border: 1px solid rgba(214,31,38,.35); border-radius: 4px;
  overflow: hidden; background: #0d0a08;
}
.map-wrap svg, .map-wrap img { display: block; width: 100%; height: auto; }

/* Zoombare/schiebbare Karte */
.map-zoom { position: relative; touch-action: none; height: 64vw; max-height: 420px; }
.map-zoom img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: contain;
  transform-origin: 0 0; will-change: transform;
  user-select: none; -webkit-user-drag: none;
  cursor: grab;
}
.map-zoom.dragging img { cursor: grabbing; }
.map-controls {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  display: flex; flex-direction: column; gap: 6px;
}
.map-controls button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(214,31,38,.55); background: rgba(5,3,2,.7);
  color: var(--red); font-family: 'Anton', sans-serif; font-size: 19px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.map-hint {
  position: absolute; left: 10px; bottom: 8px; z-index: 3;
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(246,240,230,.7);
  background: rgba(5,3,2,.55); padding: 3px 7px 2px; border-radius: 3px;
  pointer-events: none;
}
/* Hinweis unterhalb der Karte statt im Feld */
.map-hint-below {
  position: static; display: block; margin: 8px 0 0;
  background: none; padding: 0; color: var(--meta);
}

/* Anzeigen: ganze Heft-Anzeige immer komplett sichtbar (contain, nie beschnitten) */
.ad-section {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; justify-content: center;
  background: var(--bg); padding: 14px 0 18px;
}
.ad-section a, .ad-section .ad-frame { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; }
.ad-section img { width: 100%; height: auto; max-height: 92dvh; object-fit: contain; }

/* Rotes RallyX-X als Zeichen (statt Gedankenstrich) */
.rx-x { height: 1em; width: auto; vertical-align: -.12em; }

/* Download-Buttons (ACN: Mitgliedsantrag / Satzung) */
.dl-btn {
  display: inline-block; transform: skewX(-7deg);
  background: var(--red); color: #000;
  font-family: 'Norwester RX', 'Anton', sans-serif; font-size: 18px;
  text-transform: uppercase; text-decoration: none; letter-spacing: .02em;
  padding: 12px 22px 10px; margin: 4px 8px 4px 0;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.dl-btn.small {
  background: none; border: 1px solid rgba(214,31,38,.55);
  color: var(--headline); font-size: 13px;
  padding: 8px 16px 6px; box-shadow: none;
}
/* Live-Timing: pulsierender Punkt */
.live-dot {
  display: inline-block; width: 9px; height: 9px; margin-right: 9px;
  border-radius: 50%; background: #35e06a; vertical-align: middle;
  transform: skewX(7deg);
  box-shadow: 0 0 0 0 rgba(53,224,106,.7); animation: livePulse 1.6s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(53,224,106,.6); }
  70% { box-shadow: 0 0 0 8px rgba(53,224,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,224,106,0); }
}

/* @handle-Links (Instagram) */
.handle-link { color: var(--red); text-decoration: none; font-weight: 500; }

/* ---------- Reveal beim Reinscrollen ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint::after, .now-chip { animation: none; }
}
