/* Cup der guten Hoffnung: Zuschauerseite
   Umsetzung der Canva-Vorlage "CdgHCup-Website-2025" im Stil der Instagram-Posts.

   SYSTEM
   Farben     Verlauf (Hintergrund, Karten) + Weiß. Türkis-tief nur als Schrift auf Weiß.
   Schrift    Stable = Titel, Zwischentitel, Anzeige (Spielstand, Namen groß, Navigation)
              Bebas Neue = alles in Karten und Knöpfen
   Größen     eine Skala, wächst mit der Breite (--t-*); Abstände in Stufen (--s-*)
   Karte      Post-Karte: Verlauf aus den Posts, Rundung --k-radius, Schatten nur nach unten
   Knopf      .knopf--hell (weiß, Hauptaktion) und .knopf--zart (weiß durchscheinend, Nebenaktion)
   Bewegung   nur drei Dauern und zwei Kurven:
              --d-kurz  Farbe/Deckkraft    --d-mittel  Anheben/Pfeil    --d-lang  Daten-Aufblitzen
              --kurve   für alles          --feder     nur für Tor/Spielstand
              Hover nur auf Klickbarem: 2 px anheben, Schatten wächst, Pfeil rückt 3 px.
              Daten, die sich ändern, blitzen kurz hell auf. Live = ein gemeinsamer Puls.
              Scrollen: Lenis (sanft, nur Mausrad; Touch bleibt nativ). Tiefe: Fotos und Wasserzeichen
              laufen leicht versetzt mit (Parallaxe). Abschnitte erscheinen einmal beim Hineinscrollen,
              Karten kurz nacheinander. Startseite: Foto-Zoom und Logo beim Laden.
              prefers-reduced-motion schaltet alles ab. */

@font-face {
  font-family: 'Stable';
  src: url('../schriften/stable.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('../schriften/bebas-neue-400.woff2') format('woff2');
  font-display: swap;
}

:root {
  /* Farben */
  --tuerkis: #30AF98;     /* Mitte des Post-Verlaufs, Grundfarbe ohne Bild */
  --gruen: #38B54C;
  --auf-weiss: #249ABE;   /* nur Schrift auf Weiß (Buttons, Live-Karten, Leitung): Türkis mit Zug ins Blaue, Farbton 194° (Kontrast 3,3). Leon 26.11.: vorher #1F9AA0 (183°), Neongrün getestet und verworfen */
  --weiss: #FFFFFF;
  --weiss-2: rgba(255, 255, 255, .8);
  --weiss-zart: rgba(255, 255, 255, .16);

  /* Abstände (wachsen leicht mit) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --s-liste: clamp(12px, .45rem + .5vw, 20px);              /* zwischen Karten */
  --s-block: clamp(40px, 1.5rem + 3vw, 88px);               /* zwischen Blöcken */
  --s-abschnitt: clamp(64px, 2.5rem + 5.5vw, 160px);        /* Abschnitt oben/unten */

  /* Volle Breite */
  --rand: clamp(16px, 4.6vw, 104px);
  --breite: 1840px;
  --kopf-h: clamp(56px, 2.6rem + 1.4vw, 84px);

  --f-titel: 'Stable', 'Arial Black', sans-serif;
  --f-text: 'Bebas Neue', 'Arial Narrow', sans-serif;

  /* Schriftskala */
  --t-titel: clamp(2.5rem, 1.1rem + 3.9vw, 5.75rem);
  /* Abschnittstitel: eine Größe für alle, so groß, dass das längste Wort (PLATZIERUNGEN)
     in die rechte Spalte passt. Wie in der Vorlage stehen dadurch alle Titel einer Zeile bündig. */
  --raster-gap: clamp(48px, 5.5vw, 128px);
  --t-sektion: min(var(--t-titel), calc((min(100vw, var(--breite)) - 2 * var(--rand) - var(--raster-gap)) * .47 * .104));
  --t-zwischen: clamp(1.25rem, .9rem + .9vw, 2rem);
  --t-nav: clamp(1.0625rem, .78rem + .55vw, 1.5rem);
  --t-gross: clamp(1.5rem, .95rem + 1.35vw, 2.5rem);        /* Startkarten, Kontakt-Name */
  --t-zeile: clamp(1.25rem, .95rem + .6vw, 1.875rem);       /* Spielplan, Tabellen */
  --t-knopf: clamp(1.25rem, .98rem + .5vw, 1.75rem);
  --t-klein: clamp(1rem, .82rem + .3vw, 1.3125rem);         /* Spaltenköpfe, Hinweise */
  --t-stand: clamp(3rem, 1.4rem + 4.2vw, 6.75rem);          /* großer Spielstand */

  /* Karte wie in den Posts */
  --k-radius: clamp(12px, .5rem + .35vw, 16px);
  --k-schatten: 0 18px 24px -8px rgba(0, 0, 0, .34);
  --k-text-schatten: 0 1px 3px rgba(0, 50, 30, .22);
  --titel-schatten: 0 6px 18px rgba(0, 40, 30, .24);

  /* Knopf */
  --knopf-schatten: 0 10px 20px -8px rgba(0, 0, 0, .32);
  --knopf-schatten-hover: 0 16px 26px -10px rgba(0, 0, 0, .38);

  /* Bewegung */
  --d-kurz: 160ms;
  --d-mittel: 280ms;
  --d-lang: 1200ms;
  --kurve: cubic-bezier(.22, 1, .36, 1);
  --feder: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--kopf-h) + 12px); }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--tuerkis);
  color: var(--weiss);
  font-family: var(--f-text);
  font-size: var(--t-zeile);
  letter-spacing: .02em;
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* clip statt hidden: sonst wird body bei gesperrtem Scrollen zum Scrollbereich und der Kopf haftet nicht mehr */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--weiss); outline-offset: 4px; border-radius: 6px; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- Fester Hintergrund (jeder Bildschirm wie ein Post) ---------- */
.grund, .kopf::before {
  background: var(--tuerkis) url('../bilder/grund-quer.webp') center / cover no-repeat;
}
@media (orientation: portrait) {
  .grund, .kopf::before { background-image: url('../bilder/grund-hoch.webp'); }
}
.grund, .kopf::before { transform: translate3d(0, var(--drift, 0px), 0); will-change: transform; }
.grund { position: fixed; top: 0; left: 0; width: 100%; height: calc(100lvh + 140px); z-index: -2; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 30;
  clip-path: inset(0);   /* zeigt den festen Hintergrund, Inhalt läuft darunter durch */
  margin-bottom: calc(-1 * var(--kopf-h));   /* Startbereich rutscht unter den Kopf: oben liegt die Navigation frei über dem Foto */
}
.kopf::before {
  content: ''; position: fixed; top: 0; left: 0; width: 100%; height: calc(100lvh + 140px); z-index: -1;
  opacity: 0; transition: opacity var(--d-mittel) var(--kurve);
}
/* oben durchsichtig, beim Runterscrollen (oder mit offenem Menü) mit Hintergrund */
.kopf.ist-gescrollt::before, .kopf.ist-offen::before { opacity: 1; }
.kopf__innen {
  max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand);
  height: var(--kopf-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
}
.kopf__pokal { display: block; transition: transform var(--d-mittel) var(--kurve); }
.kopf__pokal:hover { transform: translateY(-2px); }
.kopf__pokal img { height: clamp(32px, 1.4rem + 1vw, 50px); width: auto; filter: drop-shadow(0 2px 6px rgba(0, 40, 30, .25)); }
.kopf__nav { display: flex; gap: clamp(24px, 3.6vw, 72px); }
.kopf__nav a, .kopf__knopf {
  position: relative;
  font-family: var(--f-titel);
  font-size: var(--t-nav);
  text-shadow: var(--titel-schatten);
  opacity: .86;
  padding: var(--s2) 0;
  transition: opacity var(--d-kurz) var(--kurve), transform var(--d-mittel) var(--kurve);
}
.kopf__nav a:hover, .kopf__knopf:hover { opacity: 1; transform: translateY(-2px); }
/* aktiver Bereich: kleiner Punkt, gleiche Form wie der Live-Punkt */
.kopf__nav a::after {
  content: ''; position: absolute; left: 50%; bottom: -4px;
  width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--weiss); transform: scale(0);
  transition: transform var(--d-mittel) var(--kurve);
}
.kopf__nav a[aria-current="true"] { opacity: 1; }
.kopf__nav a[aria-current="true"]::after { transform: scale(1); }
.kopf__knopf, .menue { display: none; }

/* ---------- Titel ---------- */
.titel {
  font-family: var(--f-titel);
  font-weight: 400;
  font-size: var(--t-sektion);
  line-height: 1;
  text-shadow: var(--titel-schatten);
  margin-bottom: clamp(24px, .8rem + 1.4vw, 48px);
}
.titel--mitte { text-align: center; }

/* ---------- Karte (Instagram-Stil) ---------- */
.karte {
  position: relative;
  border-radius: var(--k-radius);
  color: var(--weiss);
  background: #3BC57E url('../bilder/karte.webp') 50% var(--k-y, 50%) / 100% 260% no-repeat;
  box-shadow: var(--k-schatten);
  text-shadow: var(--k-text-schatten);
}
/* jede Karte zeigt einen etwas anderen Ausschnitt des Verlaufs, wie in Canva */
.liste > :nth-child(3n + 1) .karte, .liste > .karte:nth-child(3n + 1), .home__karten > .karte:nth-child(3n + 1) { --k-y: 22%; }
.liste > :nth-child(3n + 2) .karte, .liste > .karte:nth-child(3n + 2), .home__karten > .karte:nth-child(3n + 2) { --k-y: 74%; }
.liste > :nth-child(3n) .karte, .liste > .karte:nth-child(3n), .home__karten > .karte:nth-child(3n) { --k-y: 48%; }

.karte.ist-live { background: var(--weiss); color: var(--auf-weiss); text-shadow: none; }
/* dunkle Schrift auf Weiß wirkt dünner als weiße Schrift mit Schatten: feiner Rand gleicht die Stärke an */
.karte.ist-live, .knopf--hell { -webkit-text-stroke: .032em currentColor; paint-order: stroke fill; }

/* Daten haben sich geändert: kurzes helles Aufblitzen */
.karte::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--weiss); opacity: 0; pointer-events: none;
}
.karte.ist-neu::after { animation: blitz var(--d-lang) var(--kurve); }
.karte.ist-live.ist-neu::after { background: var(--tuerkis); }
@keyframes blitz { 0% { opacity: .42; } 100% { opacity: 0; } }

/* ein gemeinsamer Live-Puls */
.live-punkt, .spielt {
  display: inline-block; border-radius: 50%; background: currentColor;
  animation: puls 1.6s ease-in-out infinite;
}
.live-punkt { width: .5em; height: .5em; margin-right: .45em; vertical-align: .12em; }
.spielt { width: .42em; height: .42em; margin-left: .5em; vertical-align: .18em; background: var(--weiss); }
@keyframes puls { 50% { opacity: .3; transform: scale(.8); } }

/* ---------- Knöpfe ---------- */
.knopfreihe { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.knopf {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--f-text); font-size: var(--t-knopf); letter-spacing: .05em; line-height: 1;
  padding: .74em 1.1em .7em;
  border: 0;                 /* als <button> sonst mit schwarzem Browser-Rahmen */
  border-radius: var(--k-radius);
  text-shadow: none;
  cursor: pointer;
  transition: transform var(--d-mittel) var(--kurve), box-shadow var(--d-mittel) var(--kurve), background-color var(--d-kurz) var(--kurve);
}
.knopf__icon, .knopf__pfeil { width: 1em; height: 1em; flex: none; }
.knopf__pfeil { margin-left: .1em; transition: transform var(--d-mittel) var(--kurve); }
.knopf--hell { background: var(--weiss); color: var(--auf-weiss); box-shadow: var(--knopf-schatten); }
.knopf--zart { background: var(--weiss-zart); color: var(--weiss); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
@media (hover: hover) {
  .knopf:hover, a:hover > .knopf { transform: translateY(-2px); }
  .knopf--hell:hover, a:hover > .knopf--hell { box-shadow: var(--knopf-schatten-hover); }
  .knopf--zart:hover { background: rgba(255, 255, 255, .26); }
  .knopf:hover .knopf__pfeil, a:hover > .knopf .knopf__pfeil { transform: translateX(3px); }
}
.knopf:active, a:active > .knopf { transform: translateY(0) scale(.98); transition-duration: 80ms; }

/* ---------- Home ---------- */
.home { position: relative; isolation: isolate; }
.home__foto {
  position: absolute; z-index: -1; inset: 0 0 auto 0; height: 100%;
  overflow: hidden; will-change: transform;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .5) 45%, transparent 92%);
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .5) 45%, transparent 92%);
}
.home__foto::before {
  content: ''; position: absolute; inset: 0;
  background: url('../bilder/buehne.webp') 70% 30% / cover no-repeat;
  animation: kino 2.6s var(--kurve) both;
}
@keyframes kino { from { transform: scale(1.1); opacity: 0; } 30% { opacity: 1; } }
.home__logo img { animation: logo-rein 1s var(--kurve) 120ms both; }
@keyframes logo-rein { from { opacity: 0; transform: scale(.92) translateY(10px); } }
.home__innen {
  max-width: var(--breite); margin: 0 auto;
  padding: calc(var(--kopf-h) + clamp(40px, 1rem + 3vw, 96px)) var(--rand) var(--s-abschnitt);
  min-height: min(100svh, calc(1000px + var(--kopf-h)));
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  align-items: center; gap: clamp(48px, 6vw, 140px);
}
.home__logo { display: flex; justify-content: center; }
.home__logo img { width: clamp(220px, 25vw, 500px); filter: drop-shadow(0 10px 26px rgba(0, 40, 30, .3)); }
.home__karten { display: grid; gap: clamp(16px, .6rem + .7vw, 28px); }
.home__karten .karte {
  min-height: 2.4em; padding: .45em 1em;
  display: flex; align-items: center; justify-content: center; gap: var(--s3);
  text-align: center; text-wrap: balance;
  font-size: var(--t-gross); letter-spacing: .03em;
}
/* Text in den Startkarten optisch mittig: Box reicht von der Oberkante der Großbuchstaben bis zur Grundlinie */
.home__karten .karte__inhalt, .tafel__team, .tafel__stand { text-box: trim-both cap alphabetic; }
.home__karten .karte--tafel .karte__inhalt { width: 100%; }

/* Startkarten erscheinen beim Laden und bei jedem Zustandswechsel kurz nacheinander */
.home__karten.ist-wechsel > .karte { animation: auftritt 520ms var(--kurve) both; }
.home__karten.ist-wechsel > .karte:nth-child(2) { animation-delay: 60ms; }
.home__karten.ist-wechsel > .karte:nth-child(3) { animation-delay: 120ms; }
.home__karten.ist-wechsel > .karte:nth-child(4) { animation-delay: 180ms; }
@keyframes auftritt { from { opacity: 0; transform: translateY(12px); } }
@keyframes menue-rein { from { opacity: 0; } }

/* großer Spielstand */
.home__karten .karte--tafel { min-height: 4.1em; }
.tafel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(22px, .8rem + 2.2vw, 64px); width: 100%; }
.tafel__team { line-height: 1.12; text-wrap: balance; }
.tafel__team--heim { text-align: right; }
.tafel__team--gast { text-align: left; }
.tafel__stand { font-family: var(--f-titel); font-size: var(--t-stand); line-height: 1; white-space: nowrap; }
.tafel__stand span { display: inline-block; }
.tafel__stand .tor { animation: tor 700ms var(--feder); }
@keyframes tor { 35% { transform: scale(1.3); } }
.uhr { font-variant-numeric: tabular-nums; }
.uhr:empty { display: none; }
.gross-name { display: block; font-family: var(--f-titel); font-size: clamp(1.75rem, 1rem + 2.4vw, 3.5rem); line-height: 1.05; text-wrap: balance; text-box: trim-both cap alphabetic; }

/* Zweiteilige Karten (Bezeichnung + Inhalt): am PC eine Zeile mit Trenner, auf dem Handy zwei Zeilen (siehe unten) */
.teil, .trenn { display: inline; }
.menue__karte .teil .live-punkt { margin-right: .4em; }

/* Bebas reserviert unten Platz für Unterlängen, die es nicht hat: Zeilen-Inhalte von der Oberkante der
   Großbuchstaben bis zur Grundlinie zuschneiden, dann sitzt der Text exakt mittig in der Karte */
.spiel__zeit, .spiel__gr, .spiel__paar, .spiel__erg, .zeile > span, .tab__kopf > span, .platz > span { text-box: trim-both cap alphabetic; }

/* ---------- Abschnitte ---------- */
.abschnitt { padding: var(--s-abschnitt) 0; }
.abschnitt + .abschnitt { padding-top: calc(var(--s-abschnitt) * .5); }
.home + .abschnitt { padding-top: var(--s5); }
.raster {
  max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand);
  display: grid; grid-template-columns: minmax(0, 53fr) minmax(0, 47fr); gap: var(--raster-gap);
  align-items: start;
}
.liste { display: grid; gap: var(--s-liste); }

/* Spielplan */
.spiel {
  display: grid; grid-template-columns: 4.2em 1.1em minmax(0, 1fr) 2.9em;
  align-items: center; column-gap: .6em;
  min-height: 2.45em; padding: .35em 1em;
  font-size: var(--t-zeile);
}
.spiel__gr { text-align: center; }
.spiel__paar { min-width: 0; }
.spiel__team { display: inline; }
.spiel__tore, .spiel__grklein { display: none; }
.spiel__erg { text-align: right; white-space: nowrap; }
.spiel__erg .offen, .spiel .ist-offen { opacity: .62; }

/* Endrunde */
.ko__titel { font-family: var(--f-titel); font-size: var(--t-zwischen); line-height: 1; text-shadow: var(--titel-schatten); margin: 0 0 var(--s3) .4em; }
.liste--ko { gap: clamp(20px, .8rem + .8vw, 32px); }
.liste--ko .spiel { grid-template-columns: 4.2em minmax(0, 1fr) 4.4em; }

/* Tabellen */
.gruppe + .gruppe { margin-top: var(--s-block); }
.tab__kopf, .zeile {
  display: grid; grid-template-columns: 2em minmax(0, 1fr) 2.2em 2.8em 2.4em;
  align-items: center; column-gap: .4em;
}
.tab__kopf { padding: 0 1em .4em; font-size: var(--t-klein); letter-spacing: .1em; color: var(--weiss-2); text-shadow: var(--titel-schatten); }
.tab__kopf span, .zeile span { text-align: center; }
.tab__kopf span:nth-child(2), .zeile .zeile__name { text-align: left; }
.zeile { min-height: 2.6em; padding: .35em 1em; font-size: var(--t-zeile); }
.zeile__name { min-width: 0; line-height: 1.05; overflow-wrap: anywhere; }   /* lange Namen brechen um, nie abschneiden */
.hinweis { margin: var(--s5) .4em 0; font-size: var(--t-klein); letter-spacing: .05em; color: var(--weiss-2); text-shadow: var(--titel-schatten); }

/* Platzierungen */
.platz { display: grid; grid-template-columns: 2em minmax(0, 1fr) 2em; align-items: center; min-height: 2.6em; padding: .35em 1em; font-size: var(--t-zeile); }
.platz span { text-align: center; }
.platz .offen { opacity: .62; }

/* ---------- Kontakt: Countdown bis zum Anpfiff (wie der Post "30 Tage bis zum Start") ---------- */
.kontakt { position: relative; isolation: isolate; padding: var(--s-abschnitt) 0; }
/* Hallenfoto hinter dem Countdown: läuft oben und unten weich in den Verlauf aus, wandert beim Scrollen leicht mit */
.kontakt__foto {
  position: absolute; z-index: -1; inset: -70px 0;
  background: url('../bilder/halle.webp') center 30% / cover no-repeat;
  will-change: transform;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .8) 16%, rgba(0, 0, 0, .55) 52%, transparent 86%);
          mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .8) 16%, rgba(0, 0, 0, .55) 52%, transparent 86%);
}
.kontakt__innen { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); }
.countdown { padding: clamp(24px, 1rem + 2.4vw, 56px) clamp(16px, 1rem + 2vw, 56px); text-align: center; }
.countdown__teile { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.countdown__zahl {
  display: block; font-family: var(--f-titel); font-size: clamp(3.5rem, 1.5rem + 6vw, 8.5rem); line-height: 1;
  text-box: trim-both cap alphabetic;
}
.countdown__wort { display: block; margin-top: clamp(14px, .5rem + .7vw, 24px); font-size: var(--t-gross); letter-spacing: .08em; opacity: .9; text-box: trim-both cap alphabetic; }
.countdown__text { font-family: var(--f-titel); font-size: clamp(2rem, 1rem + 3vw, 4.5rem); line-height: 1.05; text-wrap: balance; text-box: trim-both cap alphabetic; padding: .25em 0; }
.countdown__text .live-punkt { width: .4em; height: .4em; vertical-align: .14em; }
.kontakt__wann { margin-top: var(--s6); text-align: center; font-size: var(--t-gross); letter-spacing: .04em; line-height: 1.2; text-wrap: balance; text-shadow: var(--titel-schatten); }
.kontakt__adresse { margin-top: var(--s2); text-align: center; text-wrap: balance; font-size: var(--t-zeile); letter-spacing: .04em; opacity: .85; text-shadow: var(--titel-schatten); }
/* Text direkt auf dem Hallenfoto: etwas kräftigerer Schatten für sichere Lesbarkeit */
.kontakt__wann, .kontakt__adresse { text-shadow: 0 2px 12px rgba(0, 30, 25, .5); }
.knopfreihe--mitte { justify-content: center; }
.kontakt .knopfreihe { margin-top: var(--s6); }

/* ---------- Fuß ---------- */
.fuss__innen {
  max-width: var(--breite); margin: 0 auto;
  padding: var(--s-abschnitt) var(--rand) calc(var(--s8) + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7);
  align-items: start;
}
.fuss__marke { display: grid; gap: var(--s5); justify-items: start; }
.fuss__logo { width: clamp(260px, 24vw, 460px); filter: drop-shadow(0 4px 14px rgba(0, 40, 30, .25)); }
.fuss__text { max-width: 30ch; font-size: var(--t-zeile); line-height: 1.25; letter-spacing: .04em; opacity: .9; text-shadow: var(--titel-schatten); }
.fuss__spalte { display: grid; gap: var(--s2); justify-items: start; }
.fuss__titel { font-family: var(--f-titel); font-size: var(--t-zwischen); text-shadow: var(--titel-schatten); margin-bottom: var(--s2); }
.fuss__spalte a, .menue__recht a {
  font-size: var(--t-zeile); letter-spacing: .05em; opacity: .86; text-shadow: var(--titel-schatten);
  transition: opacity var(--d-kurz) var(--kurve), transform var(--d-mittel) var(--kurve);
}
.fuss__spalte a:hover { opacity: 1; transform: translateX(3px); }

/* ---------- PC: linke Abschnittstitel etwas größer, Oberkanten bündig mit den rechten ----------
   text-box schneidet die Titelbox auf Oberkante der Großbuchstaben bis Grundlinie zu: verschieden große Titel
   in einer Zeile beginnen so exakt auf derselben Höhe. GRUPPENPHASE ist knapp 9-mal so breit wie die Schriftgröße,
   deshalb höchstens 10,6 % der Spaltenbreite. */
@media (min-width: 860px) {
  .raster__links { container-type: inline-size; }
  .raster .titel { text-box: trim-both cap alphabetic; margin-bottom: clamp(32px, 1rem + 1.6vw, 56px); }
  .raster__links > .titel { font-size: min(calc(var(--t-sektion) * 1.2), 10.6cqi); }
}

/* ---------- Mittlere Breiten (auch Laptops mit 150-175 % Skalierung) ---------- */
@media (max-width: 1279px) and (min-width: 860px) {
  .tab__kopf, .zeile { grid-template-columns: 1.7em minmax(0, 1fr) 1.9em 2.5em 2.1em; column-gap: .3em; }
  .zeile, .tab__kopf, .platz { padding-left: .8em; padding-right: .8em; }
}

/* ---------- Handy und Tablet hochkant: eine Spalte, mittig wie die Posts ---------- */
@media (max-width: 859px) {
  /* Menüknopf: rund wie ein zarter Knopf, zwei Striche drehen sich zum X */
  .kopf__knopf {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: var(--weiss-zart); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); opacity: 1;
    transition: background-color var(--d-kurz) var(--kurve), transform var(--d-mittel) var(--kurve);
  }
  .kopf__knopf:hover { transform: none; background: rgba(255, 255, 255, .26); }
  .kopf__knopf:active { transform: scale(.94); }
  .kopf__striche { position: relative; width: 18px; height: 12px; }
  .kopf__striche span {
    position: absolute; left: 0; width: 100%; height: 2.5px; border-radius: 2px; background: var(--weiss);
    transition: transform var(--d-mittel) var(--kurve), top var(--d-mittel) var(--kurve);
  }
  .kopf__striche span:first-child { top: 1px; }
  .kopf__striche span:last-child { top: 8.5px; }
  .kopf.ist-offen .kopf__striche span:first-child { top: 4.75px; transform: rotate(45deg); }
  .kopf.ist-offen .kopf__striche span:last-child { top: 4.75px; transform: rotate(-45deg); }
  .kopf__nav { display: none; }
  /* Menü offen: Kopf gibt den festen Hintergrund über den ganzen Bildschirm frei */
  .kopf.ist-offen { clip-path: none; }
  /* Scrollsperre nur am Wurzelelement: sperrt man body zusätzlich, verliert der haftende Kopf seinen Halt */
  html.menue-offen { overflow: hidden; }

  /* Handy-Menü */
  .menue.ist-offen {
    display: block; position: fixed; inset: var(--kopf-h) 0 0 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 var(--rand) env(safe-area-inset-bottom);
    animation: menue-rein 240ms var(--kurve) both;
  }
  /* Rahmen wie ein eigener Bildschirm: oben Kopf (Logo, X), unten gleich hohe Leiste (Impressum, Datenschutz).
     Der Block dazwischen sitzt optisch mittig, also leicht über der Mitte: freier Raum oben zu unten 2 zu 3. */
  .menue__innen { min-height: 100%; display: flex; flex-direction: column; }
  .menue__innen::before { content: ''; flex: 2 1 var(--s4); }
  .menue__mitte { flex: 3 1 auto; display: flex; flex-direction: column; gap: var(--s6); padding-bottom: var(--s5); }
  .menue__recht {
    flex: none; height: var(--kopf-h);
    display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  }
  .menue__recht a { display: flex; align-items: center; min-height: 44px; }
  .menue__recht a:hover { opacity: 1; }
  .menue__status:empty { display: none; }
  .menue__karte {
    display: flex; align-items: center; justify-content: center; gap: .45em;
    min-height: 56px; padding: .6em 1em; text-align: center; text-wrap: balance;
    font-size: 1.25rem; letter-spacing: .03em; line-height: 1.15;
  }
  .menue__karte .live-punkt { flex: none; margin-right: 0; }
  .menue__nav { display: grid; gap: var(--s3); }
  .menue__link {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    min-height: 64px; padding: .5em 1em;
    font-family: var(--f-titel); font-size: clamp(1.5rem, 1rem + 2.6vw, 2rem); line-height: 1;
  }
  .menue__link > span { text-box: trim-both cap alphabetic; }
  .menue__link:nth-child(1) { --k-y: 22%; } .menue__link:nth-child(2) { --k-y: 74%; }
  .menue__link:nth-child(3) { --k-y: 48%; } .menue__link:nth-child(4) { --k-y: 22%; }
  .menue__pfeil { width: .75em; height: .75em; flex: none; }
  .menue__link:active { transform: scale(.985); }
  /* aktueller Bereich: derselbe kleine Punkt wie in der PC-Navigation */
  .menue__link[aria-current="true"] > span::after {
    content: ''; display: inline-block; width: .22em; height: .22em; margin-left: .35em;
    border-radius: 50%; background: var(--weiss); vertical-align: .15em;
  }
  .menue__fuss { display: flex; justify-content: center; gap: var(--s3); flex-wrap: wrap; }
  .menue__fuss .knopf { font-size: 1.125rem; }
  /* Einblenden: Status, Karten und Knöpfe kurz nacheinander */
  .menue.ist-offen .menue__status, .menue.ist-offen .menue__link, .menue.ist-offen .menue__fuss { animation: auftritt 420ms var(--kurve) both; }
  .menue.ist-offen .menue__link:nth-child(1) { animation-delay: 50ms; }
  .menue.ist-offen .menue__link:nth-child(2) { animation-delay: 90ms; }
  .menue.ist-offen .menue__link:nth-child(3) { animation-delay: 130ms; }
  .menue.ist-offen .menue__link:nth-child(4) { animation-delay: 170ms; }
  .menue.ist-offen .menue__fuss { animation-delay: 220ms; }

  .home__innen { grid-template-columns: 1fr; min-height: 0; gap: var(--s7); padding-top: calc(var(--kopf-h) + var(--s6)); }
  .home__logo img { width: min(46vw, 220px); }

  :root { --t-sektion: min(var(--t-titel), calc((100vw - 2 * var(--rand)) * .104)); }
  .raster { grid-template-columns: 1fr; gap: var(--s-abschnitt); }
  .titel { text-align: center; }
  .hinweis { text-align: center; }
  .ko__titel { text-align: center; margin-left: 0; }

  .countdown__teile { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s6); }
  .kontakt__wann > span, .kontakt__adresse > span { display: block; }   /* Datum oben, Uhrzeit und Halle darunter; Straße oben, Ort darunter */
  .kontakt__wann .kontakt__trenn, .kontakt__adresse .kontakt__trenn { display: none; }
  .kontakt .titel { text-align: center; }
  .knopfreihe { justify-content: center; }
  /* Fuß: alles mittig untereinander (Logo, Satz, Quick Links, Rechtliches) */
  .fuss__innen { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: var(--s7); padding-top: var(--s8); }
  .fuss__marke { justify-items: center; gap: var(--s5); }
  .fuss__logo { width: min(74vw, 300px); }
  .fuss__text { max-width: 26ch; }
  .fuss__spalte { justify-items: center; gap: var(--s2); }
  .fuss__titel { margin-bottom: var(--s1); }
  .fuss__spalte a:hover { transform: none; }
}

/* ---------- Handy: Spielplan zweizeilig (jedes Team mit seinen Toren) ---------- */
@media (max-width: 599px) {
  .spiel, .liste--ko .spiel { grid-template-columns: 3.1em minmax(0, 1fr); column-gap: .8em; padding: .5em .8em; }
  .spiel__zeit { display: grid; gap: 2px; align-self: center; text-align: center; }
  .spiel__uhrwort, .spiel__gr, .spiel__erg, .spiel__trenn { display: none; }
  .spiel__zeit .spiel__grklein { display: block; font-size: .8em; opacity: .8; }
  .spiel__paar { display: grid; gap: 2px; }
  .spiel__team { display: flex; justify-content: space-between; gap: var(--s3); }
  .spiel__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Name ist auf Großbuchstaben-Höhe zugeschnitten: unsichtbarer Spielraum oben/unten, sonst schneidet die Kürzung die Umlaut-Punkte ab */
  .spiel__name { padding-block: .3em; margin-block: -.3em; }
  .spiel__tore { display: block; min-width: 1.2em; text-align: right; }
  .zeile, .tab__kopf, .platz { padding-left: .8em; padding-right: .8em; }
  .tab__kopf, .zeile { grid-template-columns: 1.6em minmax(0, 1fr) 1.8em 2.5em 2em; column-gap: var(--s1); }
  .zeile { font-size: 1.125rem; }
  .tab__kopf { font-size: .9375rem; }
  .home__karten .karte--tafel { min-height: 4.4em; padding-top: .85em; padding-bottom: .85em; }

  /* Spielstand-Karte gestapelt: Heim oben, Spielstand/Anstoß groß in der Mitte, Gast unten.
     Nebeneinander reicht auf dem Handy der Platz für lange Namen nicht (sie liefen unter die Zahl). */
  .home__karten .tafel { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: .5em; }
  .home__karten .tafel__team--heim, .home__karten .tafel__team--gast { text-align: center; }
  .home__karten .tafel__stand { font-size: clamp(3.25rem, 15vw, 4.5rem); }

  /* zweiteilige Karten: Bezeichnung klein oben, Inhalt darunter, kein Trenner am Zeilenrand */
  .home__karten .teil, .menue__karte .teil { display: block; }
  .home__karten .trenn, .menue__karte .trenn { display: none; }
  .home__karten .teil--klein, .menue__karte .teil--klein { font-size: .74em; letter-spacing: .08em; opacity: .85; margin-bottom: .45em; }
  .menue__karte-text { display: block; }

  /* Spielplan zweizeilig: hier sind Zeit-Spalte und Teams Raster, deshalb die einzelnen Zeilen zuschneiden */
  .spiel__zeit, .spiel__paar { text-box: none; }
  .spiel__uhr, .spiel__zeit .spiel__grklein, .spiel__name, .spiel__tore { text-box: trim-both cap alphabetic; }
  .spiel__zeit, .spiel__paar { gap: .42em; }

  /* Kontakt: Route planen und Instagram gleich breit untereinander, wenn sie nebeneinander nicht passen */
  .kontakt .knopfreihe { justify-content: center; }
}
@media (max-width: 400px) {
  .kontakt .knopfreihe { flex-direction: column; align-items: stretch; width: min(100%, 300px); margin-left: auto; margin-right: auto; }
  .kontakt .knopfreihe .knopf { justify-content: center; }
}

/* ---------- Rechtliches (impressum.html, datenschutz.html) ----------
   Raster wie die Abschnitte: links Titel und Post-Karten (am PC haftend), rechts der Text.
   Fließtext in der Systemschrift: Bebas hat nur Großbuchstaben und ist für lange Absätze zu schwer lesbar. */
:root {
  --f-lesen: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --t-lesen: clamp(1rem, .94rem + .22vw, 1.125rem);
}
.recht { padding: calc(var(--kopf-h) + clamp(40px, 1rem + 3vw, 96px)) 0 var(--s-abschnitt); }
.recht__unter { font-size: var(--t-zwischen); letter-spacing: .06em; opacity: .85; text-shadow: var(--titel-schatten); margin-bottom: var(--s4); }
.recht__karte {
  display: grid; gap: .45em; justify-items: center;
  padding: .8em 1em; text-align: center; text-wrap: balance;
  font-size: var(--t-gross); letter-spacing: .03em; line-height: 1.1;
}
.recht__karte > span { text-box: trim-both cap alphabetic; }
.recht__klein { font-size: .56em; letter-spacing: .1em; opacity: .85; }
a.recht__karte { transition: transform var(--d-mittel) var(--kurve), box-shadow var(--d-mittel) var(--kurve); }
@media (hover: hover) { a.recht__karte:hover { transform: translateY(-2px); box-shadow: 0 24px 30px -10px rgba(0, 0, 0, .4); } }
a.recht__karte:active { transform: scale(.985); transition-duration: 80ms; }
.recht__text {
  max-width: 64ch;
  font-family: var(--f-lesen); font-size: var(--t-lesen); line-height: 1.6; letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 40, 30, .35);
}
.recht__text h2 {
  font-family: var(--f-text); font-weight: 400; font-size: var(--t-zwischen); letter-spacing: .05em; line-height: 1.1;
  text-shadow: var(--titel-schatten); margin-bottom: var(--s3);
}
.recht__text section + section { margin-top: var(--s7); }
.recht__text p + p, .recht__text p + ul, .recht__text ul + p { margin-top: var(--s3); }
.recht__text ul { display: grid; gap: var(--s1); }
.recht__text li { position: relative; padding-left: 1.1em; }
.recht__text li::before { content: ''; position: absolute; left: .15em; top: .68em; width: .36em; height: .36em; border-radius: 50%; background: currentColor; }
.recht__text a { font-weight: 600; transition: opacity var(--d-kurz) var(--kurve); }
.recht__text a:hover { opacity: .75; }
.fuss__spalte a[aria-current="page"], .menue__recht a[aria-current="page"] { opacity: 1; }
@media (min-width: 860px) {
  .recht__text h2 { text-box: trim-both cap alphabetic; margin-bottom: var(--s4); }
}
@media (min-width: 860px) and (min-height: 700px) {
  .recht .raster__links { position: sticky; top: calc(var(--kopf-h) + var(--s5)); }
}
@media (max-width: 859px) {
  .recht .raster { gap: var(--s-block); }
  .recht__unter { text-align: center; }
  .recht__text { margin: 0 auto; }
}

/* ---------- Auftritt beim Hineinscrollen (nur mit JS, einmalig) ---------- */
.js-auftritt [data-auftritt] { transition: opacity 700ms var(--kurve), transform 700ms var(--kurve); }
.js-auftritt [data-auftritt]:not(.ist-da) { opacity: 0; transform: translateY(28px); }
/* Karten in Listen kommen kurz nacheinander, danach (ist-fertig) nie wieder */
.js-auftritt [data-auftritt]:not(.ist-fertig) .liste > * { animation: auftritt 600ms var(--kurve) both; animation-play-state: paused; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }
.js-auftritt [data-auftritt].ist-da:not(.ist-fertig) .liste > * { animation-play-state: running; }
.liste > :nth-child(2) { --i: 1; } .liste > :nth-child(3) { --i: 2; } .liste > :nth-child(4) { --i: 3; }
.liste > :nth-child(5) { --i: 4; } .liste > :nth-child(6) { --i: 5; } .liste > :nth-child(7) { --i: 6; }
.liste > :nth-child(8) { --i: 7; } .liste > :nth-child(9) { --i: 8; } .liste > :nth-child(10) { --i: 9; }
.liste > :nth-child(n + 11) { --i: 10; }

/* ---------- Muster-Leiste (nur im Muster) ---------- */
.muster {
  position: fixed; z-index: 50; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; gap: 4px; padding: 4px; max-width: calc(100% - 16px); overflow-x: auto;
  background: rgba(7, 30, 28, .9); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.muster button {
  font-family: var(--f-text); font-size: 1rem; letter-spacing: .06em;
  border: 0; border-radius: 9px; cursor: pointer;
  padding: 8px 12px; background: transparent; color: rgba(255, 255, 255, .8);
  white-space: nowrap;
  transition: background-color var(--d-kurz) var(--kurve), color var(--d-kurz) var(--kurve);
}
.muster button:hover { color: var(--weiss); }
html.menue-offen .muster { display: none; }
.muster button[aria-pressed="true"] { background: var(--weiss); color: var(--auf-weiss); }

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* keine Übergänge und Animationen: alles steht sofort im Endzustand */
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .grund, .kopf::before, .home__foto, .kontakt__foto { transform: none !important; }
}
