:root {
  /*
   * Standard-Design "neutral". Die Akzentfarbe lässt sich in config.php mit
   * DESIGN_AKZENTFARBE ('#rrggbb') an die Vereinsfarbe anpassen – alle davon
   * abgeleiteten Töne (dunkler, Flächen, Fokus) berechnen sich per color-mix().
   * Für das Schwarz-Rot-Gold-Design: css/design-deutschland.css.
   */
  --akzent-basis: #2563c7;
  --akzent: var(--akzent-basis);
  --akzent-dunkel: color-mix(in srgb, var(--akzent) 80%, #000);
  --gold: var(--akzent);                                         /* Hervorhebung (z. B. geänderte Felder) */
  --gold-hell: color-mix(in srgb, var(--akzent) 13%, transparent);
  --gold-text: color-mix(in srgb, var(--akzent) 78%, #000);
  --rot-text: #b3261e;
  --gruen-text: #1d7a3a;
  --schwarz: #1d1d1f;
  --gruen: #30b455;
  --gruen-hell: rgba(48, 180, 85, 0.16);
  --rot: #ff3b30;
  --rot-hell: rgba(255, 59, 48, 0.14);
  --grau: #6e6e73;
  --grau-hell: rgba(120, 120, 128, 0.12);
  --rand: rgba(60, 60, 67, 0.15);

  --text: #1d1d1f;
  --text-sekundaer: #5f5f64;

  --glas-bg: rgba(255, 255, 255, 0.66);
  --glas-bg-stark: rgba(255, 255, 255, 0.82);
  --glas-rand: rgba(255, 255, 255, 0.55);
  --glas-blur: blur(24px) saturate(180%);

  --schatten-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
  --schatten-md: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);
  --schatten-lg: 0 24px 60px rgba(0, 0, 0, 0.14), 0 8px 20px rgba(0, 0, 0, 0.06);

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --akzent-verlauf: linear-gradient(135deg,
    color-mix(in srgb, var(--akzent) 88%, #fff) 0%,
    color-mix(in srgb, var(--akzent) 86%, #000) 100%);

  /* Hintergrund, Hover, Fokus */
  --fleck-1: color-mix(in srgb, var(--akzent) 9%, transparent);
  --fleck-2: rgba(120, 120, 128, 0.07);
  --fleck-3: color-mix(in srgb, var(--akzent) 6%, transparent);
  --fleck-4: rgba(120, 120, 128, 0.05);
  --grund-oben: #f6f7f9;
  --grund-unten: #eef0f3;
  --auswahl: color-mix(in srgb, var(--akzent) 28%, transparent);
  --zeile-hover: color-mix(in srgb, var(--akzent) 7%, transparent);
  --hover-rand: color-mix(in srgb, var(--akzent) 45%, transparent);
  --fokus-ring: color-mix(in srgb, var(--akzent) 30%, transparent);
  --streifen: none;

  /* Diagrammfarben (werden von js/app.js gelesen – nur einfache Farbwerte, kein color-mix) */
  --chart-1: #2563c7;
  --chart-2: #1d1d1f;
  --chart-3: #e3962b;
  --chart-4: #8e8e93;
  --chart-5: #2a9d8f;
  --chart-6: #7b5ea7;
  --chart-7: #b5b5ba;
  --chart-8: #c2410c;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --akzent: color-mix(in srgb, var(--akzent-basis) 72%, #fff);
    --akzent-dunkel: var(--akzent-basis);
    --gold-text: color-mix(in srgb, var(--akzent-basis) 55%, #fff);
    --gold-hell: color-mix(in srgb, var(--akzent-basis) 24%, transparent);
    --text: #f5f5f7;
    --text-sekundaer: #a8a8ad;   /* Kontrast ≥ 4,5 : 1 auch auf dem farbigen Verlauf */
    --rand: rgba(255, 255, 255, 0.14);
    --grau-hell: rgba(120, 120, 128, 0.24);
    --rot-text: #ff8a80;
    --gruen-text: #52d273;
    --chart-1: #5b8ff0;
    --chart-2: #f5f5f7;
    --chart-3: #f2b04a;
    --chart-6: #a68bd1;
    --chart-8: #f2783a;

    --glas-bg: rgba(38, 38, 41, 0.6);
    --glas-bg-stark: rgba(44, 44, 47, 0.82);
    --glas-rand: rgba(255, 255, 255, 0.09);

    --schatten-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --schatten-md: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    --schatten-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

    --fleck-1: color-mix(in srgb, var(--akzent-basis) 20%, transparent);
    --fleck-2: rgba(120, 120, 128, 0.12);
    --fleck-3: color-mix(in srgb, var(--akzent-basis) 12%, transparent);
    --fleck-4: rgba(120, 120, 128, 0.08);
    --grund-oben: #1c1c1e;
    --grund-unten: #0b0b0c;

    color-scheme: dark;
  }
}

/* Schrift Inter (SIL Open Font License, fonts/LICENSE-Inter.txt) – lokal ausgeliefert, kein Google-Fonts-Abruf */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: "cv11", "ss03";   /* Inter: einstöckiges a aus, ruhigere Ziffern */
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Weicher, mehrschichtiger Verlaufshintergrund im Stil aktueller macOS-Wallpaper,
   fest hinter dem Inhalt verankert (funktioniert auch zuverlässig auf iOS Safari). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(at 12% 16%, var(--fleck-1) 0, transparent 55%),
    radial-gradient(at 90% 10%, var(--fleck-2) 0, transparent 55%),
    radial-gradient(at 82% 90%, var(--fleck-3) 0, transparent 55%),
    radial-gradient(at 12% 92%, var(--fleck-4) 0, transparent 55%),
    linear-gradient(180deg, var(--grund-oben) 0%, var(--grund-unten) 100%);
}


::selection { background: var(--auswahl); }

/* Farbstreifen ganz oben (nur im Design "deutschland": Schwarz-Rot-Gold) */
body::after {
  content: "";
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  pointer-events: none;
  background: var(--streifen);
}

/* Basis-Linkstil für alle "normalen" Textlinks (z.B. auf Login/Registrieren) –
   spezifischere Regeln weiter unten (Tabellen, Nav, .button, …) überschreiben
   das gezielt für ihre Bereiche. */
a {
  color: var(--akzent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.65; text-decoration: underline; }

header.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border-bottom: 1px solid var(--glas-rand);
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-marke {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-logo { display: block; line-height: 0; }
.app-logo img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

header.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--grau-hell);
  padding: 3px;
  border-radius: var(--radius-pill);
}

header.topbar nav a {
  text-decoration: none;
  color: var(--text-sekundaer);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

header.topbar nav a:hover { color: var(--text); background: rgba(120, 120, 128, 0.14); }

header.topbar nav a.aktiv {
  color: #fff;
  background: var(--akzent-verlauf);
  box-shadow: var(--schatten-sm);
}

header.topbar .user {
  font-size: 13px;
  color: var(--text-sekundaer);
  display: flex;
  align-items: center;
  gap: 6px;
}

header.topbar .user a {
  color: var(--text-sekundaer);
  text-decoration: none;
  transition: color 0.15s ease;
}
header.topbar .user a:first-child { color: var(--text); font-weight: 600; }
header.topbar .user a:hover { color: var(--akzent); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.seiten-logo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin: 4px 0 14px;
  box-shadow: var(--schatten-sm);
}

h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 18px;
  color: var(--text);
}

h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-sekundaer);
  margin: 28px 0 10px;
}
/* Überschrift als Erstes in einer Karte: kein zusätzlicher Abstand nach oben (Karte hat eigenen Innenabstand) */
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.tabelle-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  /* Schatten am Wrapper: den der Tabelle selbst schneidet overflow ab */
  box-shadow: var(--schatten-md);
}
/* In Karten trägt die Karte den Schatten */
.card .tabelle-wrap, .card .matrix-wrap { box-shadow: none; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glas-bg);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--schatten-md);
}

th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rand);
  font-size: 14px;
}

th {
  background: rgba(120, 120, 128, 0.08);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-sekundaer);
}
tr:last-child td { border-bottom: none; }

td a:not(.button) {
  color: var(--akzent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
td a:not(.button):hover { opacity: 0.65; text-decoration: underline; }
tbody tr:hover td, tr:hover td { background: var(--zeile-hover); }

th.sortierbar {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
th.sortierbar:hover { background: var(--gold-hell); color: var(--akzent); }
th.sortierbar::after {
  content: '\2195';
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.35;
}
th.sortierbar.sort-asc::after { content: '\2191'; opacity: 1; }
th.sortierbar.sort-desc::after { content: '\2193'; opacity: 1; }

/* Aktionen in Tabellenzeilen: Bearbeiten = neutral, Löschen = rot getönt, Freischalten = grün getönt.
   Als kleine Pillen, damit sie sich nicht nur durch die Textfarbe unterscheiden. */
.zeilen-aktionen { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.zeilen-aktionen form { display: inline-flex; margin: 0; }
td a.aktion-link, .link-loeschen, .link-freischalten {
  display: inline-block;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
td a.aktion-link { background: var(--grau-hell); color: var(--text); }
td a.aktion-link:hover { background: var(--gold-hell); border-color: var(--hover-rand); opacity: 1; text-decoration: none; }
.link-loeschen { background: var(--rot-hell); color: var(--rot-text); }
.link-loeschen:hover { background: rgba(255, 59, 48, 0.24); border-color: rgba(255, 59, 48, 0.4); text-decoration: none; }
.link-freischalten { background: var(--gruen-hell); color: var(--gruen-text); }
.link-freischalten:hover { background: rgba(48, 180, 85, 0.26); border-color: rgba(48, 180, 85, 0.4); text-decoration: none; }

.badge-ausstehend {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--grau);
  background: var(--grau-hell);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

a.button, button.button, input[type=submit] {
  display: inline-block;
  background: var(--akzent-verlauf);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--schatten-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
a.button:hover, button.button:hover, input[type=submit]:hover {
  filter: brightness(1.06);
  box-shadow: var(--schatten-md);
}
a.button:active, button.button:active, input[type=submit]:active {
  transform: scale(0.97);
  box-shadow: var(--schatten-sm);
}

a.button.secondary, button.button.secondary, input[type=submit].secondary {
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  color: var(--akzent);
  border: 1px solid var(--glas-rand);
  box-shadow: var(--schatten-sm);
}

a.button.gefahr, button.button.gefahr, input[type=submit].gefahr {
  background: var(--rot-hell);
  color: var(--rot);
  border: 1px solid rgba(221, 0, 0, 0.3);
  box-shadow: none;
}

.card {
  background: var(--glas-bg);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--schatten-md);
}

.versionsliste { margin: 10px 0 0; padding-left: 22px; }
.versionsliste li { margin-bottom: 8px; line-height: 1.5; }
.versionsliste li:last-child { margin-bottom: 0; }

label { display: block; margin: 12px 0 5px; font-size: 12.5px; font-weight: 600; color: var(--text-sekundaer); }
input, select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rand);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
@media (prefers-color-scheme: dark) {
  input, select { background: rgba(255, 255, 255, 0.06); }
}
/* iOS Safari: Datums-/Zeitfelder ignorieren sonst width (Mindestbreite des nativen Felds),
   sind höher als Textfelder und zentrieren den Wert */
input[type=date], input[type=time], input[type=datetime-local], input[type=month] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%;
  box-sizing: border-box; min-height: calc(1.25em + 24px); line-height: 1.25;
}
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value,
input[type=datetime-local]::-webkit-date-and-time-value, input[type=month]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input:focus, select:focus {
  outline: none;
  border-color: var(--akzent);
  box-shadow: 0 0 0 4px var(--fokus-ring);
}

.error {
  color: var(--rot-text);
  font-size: 13.5px;
  font-weight: 600;
  margin: 8px 0;
  padding: 10px 14px;
  background: var(--rot-hell);
  border-radius: var(--radius-sm);
}
.hinweis { color: var(--text-sekundaer); font-size: 13.5px; }

/* Live-Erfassung */
.spieler-spalten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .spieler-spalten { grid-template-columns: 1fr; }
}

.spieler-karte {
  background: var(--glas-bg);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--schatten-md);
}

.spieler-karte h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.rpi-anzeige {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 14px;
  background: var(--akzent-verlauf);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--akzent);
}

.aktion-btn {
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--gruen-hell);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.aktion-btn:hover { filter: brightness(0.97); box-shadow: var(--schatten-sm); }
.aktion-btn.negativ { background: var(--rot-hell); }
.aktion-btn:active { transform: scale(0.97); }

.spiel-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.tpi-badge {
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--schatten-sm);
}
.tpi-badge strong {
  font-variant-numeric: tabular-nums;
  color: var(--akzent);
}

.undo {
  margin: 12px 0 20px;
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  color: var(--text-sekundaer);
  border: 1px solid var(--glas-rand);
  box-shadow: var(--schatten-sm);
}

.spieler-karte h4 {
  margin: 6px 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-sekundaer);
}

.erfasst-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--rand);
  border-radius: var(--radius-md);
}

.erfasst-liste li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--rand);
  transition: background 0.15s ease;
}
.erfasst-liste li:hover { background: rgba(120, 120, 128, 0.08); }

.erfasst-liste li:last-child { border-bottom: none; }

.erfasst-liste:empty::after {
  content: "Noch keine Aktionen erfasst.";
  display: block;
  padding: 12px;
  font-size: 13.5px;
  color: var(--text-sekundaer);
}

.loeschen-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: var(--grau-hell);
  color: var(--rot);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}
.loeschen-btn:hover { background: var(--rot-hell); }

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

/* Öffentliche Startseite (home.php) – bewusst eigenständig von .card/main
   gehalten, damit sie großzügiger und "werblicher" wirken kann (angelehnt an
   Apples Produktseiten) als die dichteren App-Ansichten dahinter. */
.oeffentliche-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  padding-top: max(18px, env(safe-area-inset-top));
}

.oeffentliche-nav .wortmarke {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.oeffentliche-nav .wortmarke img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.oeffentliche-nav .aktionen { display: flex; align-items: center; gap: 18px; }
.oeffentliche-nav .aktionen a:not(.button) { color: var(--text-sekundaer); font-weight: 600; }
.oeffentliche-nav .aktionen a:not(.button):hover { color: var(--text); opacity: 1; text-decoration: none; }

/* Auf schmalen Bildschirmen wird die Wortmarke schmaler statt die Aktionen
   (Anmelden/Registrieren) auszublenden – auf start.php gibt es sonst keinen
   anderen Weg zum Login. */
@media (max-width: 520px) {
  .oeffentliche-nav { padding: 14px 16px; gap: 10px; }
  .oeffentliche-nav .wortmarke span { display: none; }
}

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 36px;
  text-align: center;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--akzent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--text);
}

.hero h1 .akzent {
  background: var(--akzent-verlauf);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--akzent);
}

.hero p.lead {
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--text-sekundaer);
  max-width: 500px;
  margin: 0 auto 30px;
}

.hero .cta-reihe {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero .cta-reihe a.button { min-width: 190px; text-align: center; }

.feature-grid {
  max-width: 980px;
  margin: 8px auto 0;
  padding: 20px 24px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-tile {
  background: var(--glas-bg);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--schatten-md);
}

.feature-tile .label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--akzent);
  margin-bottom: 10px;
}

.feature-tile p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }

.cta-band {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 24px 72px;
  text-align: center;
}

.cta-band h2.gross {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
  margin: 0 0 10px;
}

.cta-band p { color: var(--text-sekundaer); font-size: 15.5px; margin: 0 0 24px; }

.oeffentliche-footer {
  text-align: center;
  padding: 20px 24px 32px;
  color: var(--text-sekundaer);
  font-size: 12.5px;
}

.app-footer {
  text-align: center;
  padding: 20px 24px 40px;
  color: var(--text-sekundaer);
  font-size: 12.5px;
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.sichtbar { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Ergänzungen für den Radball Training Manager
   ========================================================================== */

main.breit { max-width: 1200px; }

.wortmarke-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}
.wortmarke-app:hover { text-decoration: none; opacity: 0.8; }
.wortmarke-app .marke-logo { display: block; height: 52px; width: auto; }
.offen-logo { text-align: center; margin: 4px 0 6px; line-height: 0; }
.offen-logo img { width: 200px; max-width: 70%; height: auto; }

textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rand);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  min-height: 90px;
  resize: vertical;
}
@media (prefers-color-scheme: dark) { textarea { background: rgba(255, 255, 255, 0.06); } }
textarea:focus {
  outline: none;
  border-color: var(--akzent);
  box-shadow: 0 0 0 4px var(--fokus-ring);
}

input[type="checkbox"] { width: auto; padding: 0; margin: 0; accent-color: var(--akzent); }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--gold-hell);
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.badge.grau { background: var(--grau-hell); color: var(--text-sekundaer); }
.badge-ok { background: var(--gruen-hell); color: var(--gruen-text); }

.kopf-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.kopf-zeile h1 { margin: 0; }
.aktionen-reihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.kennzahl {
  background: var(--glas-bg);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--schatten-md);
}
.kennzahl .zahl { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.kennzahl .label { font-size: 12.5px; color: var(--text-sekundaer); font-weight: 600; }

.filter-leiste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.filter-leiste label { margin-top: 0; }

.checkbox-liste {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--rand);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  background: var(--glas-bg);
}
.checkbox-liste label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.checkbox-liste small { color: var(--text-sekundaer); }
.checkbox-kopf { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.checkbox-kopf input[type="search"] { flex: 1; }
input[type="search"], input[type="date"], input[type="number"] { width: 100%; }
.checkbox-kopf button, .mini-btn {
  border: 1px solid var(--rand);
  background: var(--glas-bg-stark);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.checkbox-kopf button:hover, .mini-btn:hover { border-color: var(--akzent); color: var(--akzent); }

.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* Ergebnis-Matrix */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); box-shadow: var(--schatten-md); }
table.matrix th, table.matrix td { white-space: nowrap; }
table.matrix td.sportler-name {
  position: sticky;
  left: 0;
  background: var(--glas-bg-stark);
  font-weight: 600;
  z-index: 1;
}
table.matrix input.ergebnis-feld { min-width: 92px; text-align: center; padding: 8px 8px; }
table.matrix input.ergebnis-feld.geaendert { border-color: var(--gold); background: var(--gold-hell); }
table.matrix input.ergebnis-feld.gespeichert { border-color: var(--gruen); background: var(--gruen-hell); }
table.matrix input.ergebnis-feld.fehler { border-color: var(--rot); background: var(--rot-hell); }
.zellen-inhalt { display: flex; align-items: center; gap: 4px; }
.notiz-btn { border: 0; background: transparent; cursor: pointer; opacity: 0.45; font-size: 14px; padding: 2px; }
.notiz-btn.hat-notiz { opacity: 1; }
.notiz-btn:hover { opacity: 1; }
th small { font-weight: 500; opacity: 0.75; }

.fortschritt { height: 8px; border-radius: 999px; background: var(--grau-hell); overflow: hidden; min-width: 70px; }
.fortschritt > div { height: 100%; background: var(--gruen); }
.fortschritt > div.mittel { background: #ffb020; }
.fortschritt > div.niedrig { background: var(--rot); }

.speicher-leiste {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-md);
  box-shadow: var(--schatten-md);
}
.speicher-leiste .status { font-size: 14px; color: var(--text-sekundaer); }

.diagramm-box { position: relative; height: 320px; }
.diagramm-karte .diagramm-box { height: 240px; margin-top: 10px; }
.paginierung { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 18px 0; flex-wrap: wrap; }

.event-karte h3 { margin: 0 0 4px; font-size: 17px; }
.event-karte h3 a { color: var(--text); }
.event-karte .meta { font-size: 13.5px; color: var(--text-sekundaer); margin: 2px 0 8px; }
.event-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 12px 0 20px; }
.event-raster .card { margin: 0; }

/* ==========================================================================
   Filterleiste (includes/filter.php): Suche + Filter-Chips, wirken sofort
   ========================================================================== */
.filter-form { position: relative; z-index: 5; }   /* Zeitraum-Panel über den folgenden Karten */
.filter-kopf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-kopf .filter-suche { flex: 1 1 280px; }
.filter-kopf .filter-chip { height: 46px; }
.filter-suche { position: relative; }
.filter-suche svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-sekundaer); pointer-events: none; }
.filter-suche input { height: 46px; padding-left: 44px; box-sizing: border-box; }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.filter-chips:empty { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; box-sizing: border-box; margin: 0;
  padding: 0 12px 0 14px; border: 1px solid var(--rand); border-radius: var(--radius-pill);
  background: rgba(120, 120, 128, 0.08); color: var(--text); font-size: 14px; font-weight: 400; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.filter-chip:hover { border-color: var(--akzent); }
.filter-chip:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 4px var(--fokus-ring); }
.filter-chip.aktiv { border-color: var(--akzent); background: var(--gold-hell); }
.filter-chip-label { color: var(--text-sekundaer); font-weight: 600; white-space: nowrap; }
.filter-chip select {
  -webkit-appearance: none; appearance: none; width: auto; height: 34px; margin: 0; padding: 0 22px 0 2px;
  border: 0; border-radius: 0; background: transparent no-repeat right 2px center; box-shadow: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  font-size: 14px; color: var(--text); cursor: pointer; text-overflow: ellipsis; max-width: 260px;
}
.filter-chip select option { color: initial; }
.filter-zeitraum { position: relative; }
.filter-zeitraum summary { list-style: none; padding-right: 34px; position: relative; }
.filter-zeitraum summary::-webkit-details-marker { display: none; }
.filter-zeitraum summary::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 12px; height: 8px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;
}
.filter-zeitraum[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.filter-zeitraum-panel {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: 280px; padding: 14px;
  background: #fff; border: 1px solid var(--rand); border-radius: var(--radius-md); box-shadow: var(--schatten-lg);
}
@media (prefers-color-scheme: dark) { .filter-zeitraum-panel { background: #2c2c2e; } }
.filter-zeitraum-panel label { margin: 0 0 10px; }
.filter-zeitraum-panel input { height: 42px; box-sizing: border-box; margin-top: 5px; }
.filter-zeitraum-aktionen { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.filter-zeitraum-aktionen .button { padding: 8px 18px; }
.link-knopf, .filter-zuruecksetzen {
  background: none; border: 0; padding: 0 6px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-sekundaer); text-decoration: none; cursor: pointer;
}
.link-knopf:hover, .filter-zuruecksetzen:hover { color: var(--akzent); }
/* Absende-Knopf nur ohne JavaScript sichtbar (Enter in der Suche reicht sonst) */
.filter-form.js .filter-absenden { display: none; }
.filter-absenden { margin-top: 12px; }
@media (max-width: 600px) {
  .filter-zeitraum-panel { width: min(280px, calc(100vw - 72px)); }
}

/* Schnellsuche (Lupe oben, Strg+K) */
.topbar-rechts { display: flex; align-items: center; gap: 14px; }
.such-knopf {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--rand); border-radius: var(--radius-pill); background: var(--grau-hell);
  color: var(--text-sekundaer); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.such-knopf:hover { border-color: var(--akzent); color: var(--text); }
.such-knopf svg, .such-feld svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0; }
.such-taste { font: inherit; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--rand); background: var(--glas-bg-stark); }
.such-dialog {
  width: min(640px, calc(100vw - 24px)); max-height: min(70vh, 640px); margin: 10vh auto auto; padding: 0;
  border: 1px solid var(--glas-rand); border-radius: var(--radius-lg); background: var(--tabbar-bg, var(--glas-bg-stark));
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); color: var(--text); box-shadow: var(--schatten-lg); overflow: hidden;
}
.such-dialog[open] { display: flex; flex-direction: column; }
.such-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.such-feld { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rand); color: var(--text-sekundaer); }
.such-feld input::-webkit-search-cancel-button { display: none; }
.such-feld input { flex: 1; border: 0; background: none; box-shadow: none !important; padding: 8px 0; font-size: 17px; color: var(--text); }
.such-schliessen { border: 1px solid var(--rand); background: none; color: var(--text-sekundaer); border-radius: 6px; font: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 7px; cursor: pointer; }
.such-ergebnisse { overflow-y: auto; padding: 6px 8px 10px; }
.such-ergebnisse:empty { display: none; }
.such-gruppe { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-sekundaer); padding: 10px 10px 4px; }
.such-treffer { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; min-height: 44px; justify-content: center; }
.such-treffer:hover { opacity: 1; text-decoration: none; background: var(--grau-hell); }
.such-treffer.gewaehlt { background: var(--gold-hell); }
.such-treffer.gewaehlt .such-titel { color: var(--akzent); }
.such-unter { font-size: 12.5px; font-weight: 500; color: var(--text-sekundaer); }
.such-leer { padding: 12px; margin: 0; }
@media (max-width: 760px) {
  .such-knopf { width: 40px; height: 40px; padding: 0; justify-content: center; margin-left: auto; }
  .such-text, .such-taste { display: none; }
  .such-dialog { margin-top: max(12px, env(safe-area-inset-top)); max-height: calc(100vh - 140px); }
}
@media (hover: none) { .such-taste { display: none; } }
@media print { .such-knopf, .such-dialog { display: none !important; } }

/* Leistungsprofil (sportler_detail.php) */
.profil-kopf { align-items: center; margin-bottom: 4px; }
.profil-kopf h2 { margin: 0; }
.profil-gruppe { margin: 0; }
.profil-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 10px; }
.profil-diagramm { position: relative; max-width: 620px; width: 100%; margin: 0 auto; }

/* Sportlerliste: Auswahlmodus zum Archivieren (Checkboxen erst nach „Auswählen“) */
#auswahlStart[hidden] { display: none; }
.liste-kopf { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 10px; }
a.button.klein, button.button.klein { padding: 8px 16px; font-size: 13.5px; }
#sportlerTabelle .auswahl-spalte { display: none; width: 44px; }
body.auswahl-aktiv #sportlerTabelle .auswahl-spalte { display: table-cell; }
body.auswahl-aktiv #sportlerTabelle tr[data-sportler] { cursor: pointer; }
body.auswahl-aktiv #sportlerTabelle .zeilen-aktionen { display: none; }
#sportlerTabelle tr.gewaehlt td { background: color-mix(in srgb, var(--akzent) 8%, transparent); }
input[type=checkbox].auswahl-kreis {
  -webkit-appearance: none; appearance: none; margin: 0; flex-shrink: 0; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--text-sekundaer);
  background: var(--glas-bg-stark); display: inline-grid; place-content: center; transition: background 0.12s ease, border-color 0.12s ease;
}
input.auswahl-kreis:checked, input.auswahl-kreis:indeterminate { background: var(--akzent); border-color: var(--akzent); }
input.auswahl-kreis:checked::after {
  content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg);
}
input.auswahl-kreis:indeterminate::after { content: ""; width: 10px; height: 2.5px; background: #fff; border-radius: 2px; }
.auswahl-leiste {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; width: max-content; max-width: calc(100vw - 24px);
  background: var(--glas-bg-stark); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
  border: 1px solid var(--glas-rand); border-radius: var(--radius-pill); box-shadow: var(--schatten-md);
  font-weight: 600; font-size: 14px;
}
.auswahl-leiste[hidden] { display: none; }
.auswahl-leiste #archivAnzahl { white-space: nowrap; margin-right: auto; }
.auswahl-leiste button.button { white-space: nowrap; }
.auswahl-schliessen {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--grau-hell); color: var(--text);
  font-size: 15px; cursor: pointer; flex-shrink: 0;
}
body.auswahl-aktiv main { padding-bottom: 110px; }

/* Instagram-Kacheln (kachel.php) */
.kachel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 12px 0 18px; }
.kachel-raster .card { margin: 0; }
.kachel-bild { display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 1080 / 1350; border-radius: var(--radius-md); box-shadow: var(--schatten-md); margin: 6px 0 12px; }
.kachel-auswahl { border: 1px solid var(--rand); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.kachel-auswahl legend { font-size: 0.85em; color: var(--text-sekundaer); padding: 0 4px; }
.kachel-auswahl label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
#kachelCaption { width: 100%; font-family: inherit; }


/* ==========================================================================
   Rekorde-Karussell (Startseite)
   ========================================================================== */
.rekorde-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rekorde-kopf h2 { margin-bottom: 18px; }
.karussell-steuerung { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.karussell-zaehler { font-size: 13px; font-weight: 600; color: var(--text-sekundaer); font-variant-numeric: tabular-nums; margin-right: 4px; }
.rund-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glas-rand);
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  color: var(--akzent);
  font-size: 22px;
  line-height: 1;
  padding: 0 0 3px;
  cursor: pointer;
  box-shadow: var(--schatten-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.rund-btn:hover { box-shadow: var(--schatten-md); background: var(--gold-hell); }
.rund-btn:active { transform: scale(0.92); }
.rund-btn:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 4px var(--fokus-ring); }

.rekorde-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .rekorde-raster { grid-template-columns: minmax(0, 1fr); } }
.rekorde-raster.wechsel-vor { animation: rekordeVor 0.28s ease; }
.rekorde-raster.wechsel-zurueck { animation: rekordeZurueck 0.28s ease; }
@keyframes rekordeVor { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes rekordeZurueck { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rekorde-raster.wechsel-vor, .rekorde-raster.wechsel-zurueck { animation: none; } }

.rekord-karte {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glas-rand);
  background:
    radial-gradient(circle at 100% 0, var(--gold-hell) 0, transparent 62%),
    var(--glas-bg);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  box-shadow: var(--schatten-md);
}
.rekord-karte[hidden] { display: none; }
.rekord-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-text);
  background: var(--gold-hell);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.rekord-karte h3 { margin: 10px 0 0; font-size: 17px; line-height: 1.25; }
.rekord-karte h3 a { color: var(--text); }
.rekord-karte h3 a:hover { color: var(--akzent); opacity: 1; }
.rekord-kategorie { font-size: 12.5px; color: var(--text-sekundaer); margin-top: 2px; }
.rekord-wert {
  margin: 10px 0 12px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.rekord-wert small { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--text-sekundaer); margin-left: 6px; }
.rekord-halter { font-size: 14.5px; font-weight: 600; }
.rekord-halter span { color: var(--text-sekundaer); font-weight: 500; }
.rekord-halter .rekord-gleichauf { display: block; font-size: 12.5px; margin-top: 2px; }
.rekord-event { font-size: 13px; color: var(--text-sekundaer); margin-top: 4px; }
.rekord-event a { color: var(--text-sekundaer); font-weight: 500; }
.rekord-event a:hover { color: var(--akzent); opacity: 1; }

.karussell-punkte { display: flex; justify-content: center; gap: 7px; margin-top: 14px; min-height: 8px; }
.karussell-punkte button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--grau);
  opacity: 0.35;
  cursor: pointer;
  transition: opacity 0.15s ease, width 0.2s ease, background 0.15s ease;
}
.karussell-punkte button.aktiv { opacity: 1; width: 22px; border-radius: 999px; background: var(--akzent); }


/* ==========================================================================
   Änderungsprotokoll (nur Admins)
   ========================================================================== */
.aktion-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.aktion-badge.angelegt { background: var(--gruen-hell); color: var(--gruen-text); }
.aktion-badge.geaendert { background: var(--gold-hell); color: var(--gold-text); }
.aktion-badge.geloescht { background: var(--rot-hell); color: var(--rot-text); }
.prot-tabelle td { vertical-align: top; }
.prot-typ { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-sekundaer); }
.prot-verlauf { font-size: 12.5px; }
.prot-liste { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.prot-liste li { margin: 2px 0; }
.prot-alt { color: var(--text-sekundaer); text-decoration: line-through; text-decoration-color: rgba(120, 120, 128, 0.6); }
.prot-neu { font-weight: 600; }
.prot-leer { color: var(--text-sekundaer); }
.prot-details summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--akzent); }
.prot-details[open] summary { margin-bottom: 6px; }


/* ==========================================================================
   Öffentliche Startseite (Lehrgänge, Durchschnittswerte) – Anmelden/
   Registrieren sitzen als Buttons in .oeffentliche-nav oben rechts.
   ========================================================================== */
@media (max-width: 520px) {
  .oeffentliche-nav .wortmarke span,
  .oeffentliche-nav .wortmarke { font-size: 14px; }
  .oeffentliche-nav .aktionen { gap: 10px; }
  .oeffentliche-nav .aktionen a.button { padding: 9px 16px; font-size: 13.5px; }
}


@media (max-width: 600px) {
  .wortmarke-app .marke-logo { height: 42px; }
}

/* Teamvergleich (team_vergleich.php) */
.teamvergleich-team h2 { display: flex; align-items: center; gap: 8px; }
.teamvergleich-team h2::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--chart-1); }
.teamvergleich-team-b h2::before { background: var(--chart-3); }
.team-profil-namen { text-align: center; margin-top: 10px; }
.team-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; background: var(--chart-1); }
.team-punkt-b { background: var(--chart-3); }
.teamvergleich-tabelle td.teamwert { font-weight: 600; }
.teamvergleich-tabelle td.teamwert.vorne { background: var(--gold-hell); color: var(--gold-text); }
.teamvergleich-tabelle td.abstand { white-space: nowrap; }
.teamvergleich-duelle td.sieger, .freie-spiele td.sieger { font-weight: 700; }
.teamvergleich-bilanz { font-size: 1.05rem; }

/* Neuerungen: interne Punkte (nur Haupt-Admin) */
.badge-intern { background: var(--grau-hell); color: var(--text-sekundaer); font-size: 0.75em; vertical-align: 1px; }
.versions-intern { color: var(--text-sekundaer); }

/* Popup „Was ist neu?“ (includes/header.php) */
.neuerungen-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  padding: 24px;
  border: 1px solid var(--glas-rand);
  border-radius: var(--radius-lg);
  background: var(--glas-bg-stark);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  color: var(--text);
  box-shadow: var(--schatten-lg);
  display: none;
  flex-direction: column;
}
.neuerungen-dialog[open] { display: flex; }
.neuerungen-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.neuerungen-dialog h2 { margin: 0 0 4px; font-size: 1.4rem; text-transform: none; letter-spacing: normal; color: var(--text); }
.neuerungen-dialog h3 { margin: 16px 0 6px; font-size: 1rem; }
.neuerungen-dialog h3 .hinweis { font-weight: 400; }
.neuerungen-inhalt { overflow-y: auto; margin: 8px -4px 0; padding: 0 4px; }
.neuerungen-aktionen { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }

@media print {
  /* Druck immer hell und kontrastreich, unabhängig von Design und Dunkelmodus */
  /* !important, damit auch die Dunkelmodus-Werte der Landesdesigns (:root:root) überschrieben werden */
  :root, :root:root {
    --text: #000 !important; --text-sekundaer: #444 !important; --rand: #bbb !important;
    --glas-bg: #fff !important; --glas-bg-stark: #fff !important; --glas-rand: #bbb !important;
    --schatten-sm: none !important; --schatten-md: none !important; --schatten-lg: none !important;
    --zeile-hover: transparent !important;
    color-scheme: light !important;
  }
  th.sortierbar::after { content: none !important; }
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000; }
  header.topbar, .app-footer, .aktionen-reihe, .speicher-leiste, .no-print,
  .karussell-steuerung, .karussell-punkte, .zeilen-btn, .verbund-toggle, .error, .hinweis.no-print { display: none !important; }
  body::before, body::after { display: none; }
  main, main.breit { max-width: none; padding: 0; margin: 0; }
  a { color: #000 !important; text-decoration: none; }
  .card, .kennzahl, .rekord-karte, table { box-shadow: none !important; background: #fff !important; border: 1px solid #bbb;
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  th, td { background: #fff !important; }
  tr, .card, .rekord-karte, .kennzahl { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  /* Karussells: im Druck alle Karten untereinander statt nur der aktuellen Seite */
  .rekord-karte[hidden] { display: block !important; }
  .rekorde-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Teilübungen-Pflege (uebung_form.php) und Verbundübungs-Erfassung
   (verbund_erfassen.php): Kraftzirkel, Zirkel & künftige Verbundübungen.
   ========================================================================== */
.zeilen-btn { border: 0; background: transparent; cursor: pointer; opacity: 0.5; font-size: 13px; padding: 2px 4px; }
.zeilen-btn:hover { opacity: 1; }
.zeilen-steuerung { white-space: nowrap; width: 1%; }
.tabelle-teiluebungen input[type=text] { width: 100%; }
.tabelle-teiluebungen .loeschen-spalte { text-align: center; width: 1%; }
.tabelle-teiluebungen template { display: none; }

.verbund-durchgaenge { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .verbund-durchgaenge { grid-template-columns: 1fr; } }
.verbund-durchgang h3 { margin-top: 0; }
.verbund-durchgang .teiluebung-zeile { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.verbund-durchgang .teiluebung-zeile label { flex: 1; margin: 0; font-weight: 400; }
.verbund-durchgang .teiluebung-zeile small { display: block; color: var(--text-sekundaer); }
.verbund-durchgang .teiluebung-zeile input[type=number] { width: 80px; flex: none; }
.verbund-summe { font-weight: 600; margin-top: 10px; }
.verbund-ergebnis { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(127,127,127,0.25); font-size: 1.1em; }
.verbund-ergebnis strong { font-size: 1.3em; }

.verbund-detail-zeile td { background: rgba(127,127,127,0.06); }
.verbund-detail-tabelle { width: auto; margin: 4px 0; }
.verbund-detail-tabelle th, .verbund-detail-tabelle td { padding: 3px 14px 3px 0; font-size: 13.5px; }

/* Einzelwerte einer Verbundübung (aufgeklappt) */
.verbund-detail-zeile > td { padding-top: 10px; padding-bottom: 14px; }
table.verbund-teilwerte {
  width: 100%;
  max-width: 560px;
  margin: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--schatten-sm);
  background: var(--glas-bg-stark);
  font-size: 14px;
}
table.verbund-teilwerte th, table.verbund-teilwerte td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--rand);
  background: transparent;
}
table.verbund-teilwerte thead th { font-size: 11.5px; padding-top: 9px; padding-bottom: 9px; }
table.verbund-teilwerte tbody tr:hover td { background: var(--zeile-hover); }
table.verbund-teilwerte td small { display: block; font-size: 12px; color: var(--text-sekundaer); margin-top: 1px; }
table.verbund-teilwerte .zahl { text-align: right; font-variant-numeric: tabular-nums; width: 110px; white-space: nowrap; }
table.verbund-teilwerte tfoot td { font-weight: 600; border-bottom: 0; }
table.verbund-teilwerte tfoot tr:first-child td { border-top: 2px solid var(--rand); }
table.verbund-teilwerte .verbund-teilwerte-ergebnis td { color: var(--akzent); background: var(--gold-hell); }
table.verbund-teilwerte .verbund-teilwerte-ergebnis td:first-child { font-weight: 500; color: var(--text); }

.turnier-vs { text-align: center; white-space: nowrap; }
/* Höhere Spezifität als "input[type=number] { width:100% }" nötig, sonst gewinnt die
   generische Regel und die Tore-Eingabefelder würden die ganze Zellbreite einnehmen.
   Die nativen Spinner-Pfeile werden unterdrückt, da sie bei dieser schmalen Breite den
   Ziffernwert optisch verschlucken. */
input.turnier-tore[type=number] {
    width: 56px;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
input.turnier-tore[type=number]::-webkit-outer-spin-button,
input.turnier-tore[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#turnierTeamsTabelle select[multiple] { width: 100%; min-width: 220px; }
.turnier-seed-nr { text-align: right; color: var(--text-sekundaer); white-space: nowrap; }

/* Vorstellungsvideo auf der öffentlichen Startseite (start.php) */
.promo-video { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 18px; }
.promo-video video { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: var(--radius-md); background: #f6efe2; box-shadow: var(--schatten-md); display: block; }
.promo-video > * { min-width: 0; }
.promo-video h2 { margin-top: 0; }
.promo-video .promo-text p { margin: 0 0 14px; }
@media (max-width: 760px) {
  .promo-video { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ==========================================================================
   Handy: Navigation unten, „Mehr“-Menü, Aktionsmenü, Tabellen als Karten,
   größere Tippflächen (ab 760 px Breite bleibt alles wie am Desktop)
   ========================================================================== */
:root { --tabbar-bg: rgba(255, 255, 255, 0.94); }
@media (prefers-color-scheme: dark) { :root { --tabbar-bg: rgba(28, 28, 30, 0.94); } }
.tabbar, button.button.mehr-knopf-aktionen { display: none; }
.mehr-menue {
  border: 1px solid var(--glas-rand); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--glas-bg-stark); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
  color: var(--text); box-shadow: var(--schatten-lg);
  margin: auto 0 0; width: 100%; max-width: 100%; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
}
.mehr-menue::backdrop { background: rgba(0, 0, 0, 0.35); }
.mehr-menue .mehr-griff { width: 40px; height: 5px; border-radius: 3px; background: var(--rand); margin: 4px auto 10px; }
.mehr-menue a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: var(--radius-md); color: var(--text); font-size: 16px; }
.mehr-menue a.aktiv { background: var(--gold-hell); color: var(--akzent); }
.mehr-menue a:hover { text-decoration: none; opacity: 1; background: var(--grau-hell); }
.mehr-menue .mehr-abmelden { color: var(--rot-text); }
.mehr-menue hr { border: 0; border-top: 1px solid var(--rand); margin: 8px 0; }
.mehr-menue .mehr-schliessen { width: 100%; min-height: 46px; margin-top: 10px; }

@media (max-width: 760px) {
  header.topbar { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); flex-wrap: nowrap; }
  header.topbar nav, header.topbar .user { display: none; }
  .topbar-rechts { margin-left: auto; }
  header.topbar .marke-logo { width: 36px; height: auto; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .app-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--tabbar-bg); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
    border-top: 1px solid var(--glas-rand); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  }
  .tabbar .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 50px; border: 0; background: none; border-radius: var(--radius-md);
    color: var(--text-sekundaer); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none;
  }
  .tabbar .tab:hover { opacity: 1; text-decoration: none; }
  .tabbar .tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .tab svg circle { fill: currentColor; stroke: none; }
  .tabbar .tab:first-child svg circle, .tabbar .tab:nth-child(3) svg circle { fill: none; stroke: currentColor; }
  .tabbar .tab.aktiv { color: var(--akzent); }
  .tabbar .tab.aktiv svg { stroke-width: 2.3; }

  /* Aktionsknöpfe im Seitenkopf: Hauptaktion + „Mehr“, der Rest klappt auf (js/app.js) */
  .aktionen-reihe.mobil-menue:not(.offen) > :not(.aktion-haupt):not(.mehr-knopf-aktionen) { display: none; }
  .aktionen-reihe.mobil-menue > button.button.mehr-knopf-aktionen { display: inline-flex; justify-content: center; }
  .aktionen-reihe.mobil-menue.offen { display: grid; grid-template-columns: 1fr; width: 100%; }
  .aktionen-reihe.mobil-menue.offen > * { display: flex; justify-content: center; width: 100%; }
  .aktionen-reihe.mobil-menue.offen > form > button { width: 100%; }

  /* Tabellen mit class="karten": jede Zeile eine Karte, Spaltenname links (data-label, js/app.js) */
  table.karten, table.karten tbody { display: block; overflow: visible; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tabelle-wrap:has(> table.karten) { box-shadow: none; overflow: visible; }
  table.karten tr:first-child:has(th), table.karten thead { display: none; }
  table.karten tr {
    display: block; margin: 0 0 10px; padding: 12px 14px; border-radius: var(--radius-md);
    background: var(--glas-bg); border: 1px solid var(--glas-rand); box-shadow: var(--schatten-sm);
  }
  table.karten td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  table.karten td::before { content: attr(data-label); color: var(--text-sekundaer); font-size: 12.5px; font-weight: 600; text-align: left; flex-shrink: 0; }
  table.karten td.karten-titel { font-size: 16px; font-weight: 700; text-align: left; padding-bottom: 8px; }
  table.karten td.karten-titel::before, table.karten td[data-label=""]::before { content: none; }
  table.karten td[data-label=""] { justify-content: flex-start; }
  table.karten td:empty { display: none; }
  table.karten tr:hover td { background: none; }

  /* Sportlerliste im Auswahlmodus: kompakte Karten (Kreis · Name · Verein), ganze Karte antippbar */
  .auswahl-leiste { bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; width: auto; }
  body.auswahl-aktiv main { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] {
    display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 12px 14px;
    border: 1.5px solid var(--glas-rand); transition: border-color 0.12s ease, background 0.12s ease;
  }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] > td { display: none; }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] > td.auswahl-spalte { display: flex; grid-row: span 2; padding: 0; width: auto; }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] > td.karten-titel { display: block; padding: 0; }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] > td.karten-unter { display: block; padding: 2px 0 0; text-align: left; color: var(--text-sekundaer); font-size: 13.5px; }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] > td.karten-unter::before { content: none; }
  body.auswahl-aktiv #sportlerTabelle tr[data-sportler] a { pointer-events: none; }
  #sportlerTabelle tr.gewaehlt { border-color: var(--akzent) !important; background: color-mix(in srgb, var(--akzent) 7%, var(--glas-bg)); }
  #sportlerTabelle tr.gewaehlt td { background: none; }
}

/* Tippflächen ≥ 44 px auf Touch-Geräten */
@media (pointer: coarse) {
  .aktion-link, td a.aktion-link, .zeilen-aktionen a, .zeilen-aktionen button, .link-loeschen, .mini-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding-left: 14px; padding-right: 14px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  th.sortierbar { padding-top: 14px; padding-bottom: 14px; }
  .filter-chip { height: 44px; }
  .filter-chip select { height: 42px; }
  .rund-btn { min-width: 44px; min-height: 44px; }
  .karussell-punkte button { min-width: 24px; min-height: 24px; }
}

@media print { .tabbar, .mehr-menue, .mehr-knopf-aktionen { display: none !important; } }
