/* ============================================================
   PuttPilot – Grundgestaltung
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0f2a3d;
  --navy-2: #173d57;
  --gruen: #2f9e63;
  --gruen-hell: #e6f5ed;
  --gold: #e8b84a;
  --rot: #c0392b;
  --rot-hell: #fdecea;
  --text: #1c2833;
  --text-2: #5b6b78;
  --linie: #d5dce2;
  --flaeche: #fafbfc;
  --hinter: #e7ebef;
  --eingabe: #ffffff;
  --zeile-hover: #f1f4f6;
  --akzent-text: #0f2a3d;
  --meldung-ok-text: #1d6b42;
  --meldung-ok-rand: #bfe3cf;
  --meldung-fehler-rand: #f5c2bd;
  --etikett-hinter: #fff4d6;
  --etikett-text: #8a6510;
  --radius: 12px;
  color-scheme: light;
}

/* Dunkler Modus: automatisch nach Geräte-Einstellung, außer der Nutzer hat
   oben rechts bewusst „hell“ gewählt – oder manuell per data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gruen: #45b97c; --gruen-hell: #16352a; --rot: #ef7b6b; --rot-hell: #3b1f1c;
    --text: #e3eaf0; --text-2: #9fb0bd; --linie: #2b3c49; --flaeche: #15222c; --hinter: #0c161d;
    --eingabe: #0f1b23; --zeile-hover: #1b2c38; --akzent-text: #d6e3ec;
    --meldung-ok-text: #8fdcb3; --meldung-ok-rand: #24533d; --meldung-fehler-rand: #6b2d26;
    --etikett-hinter: #3d3218; --etikett-text: #f0cd7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --gruen: #45b97c; --gruen-hell: #16352a; --rot: #ef7b6b; --rot-hell: #3b1f1c;
  --text: #e3eaf0; --text-2: #9fb0bd; --linie: #2b3c49; --flaeche: #15222c; --hinter: #0c161d;
  --eingabe: #0f1b23; --zeile-hover: #1b2c38; --akzent-text: #d6e3ec;
  --meldung-ok-text: #8fdcb3; --meldung-ok-rand: #24533d; --meldung-fehler-rand: #6b2d26;
  --etikett-hinter: #3d3218; --etikett-text: #f0cd7a;
  color-scheme: dark;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--hinter);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 28px 16px 48px; }
a { color: var(--gruen); }
h1, h2, h3 { font-family: 'Oswald', sans-serif; font-weight: 600; letter-spacing: .3px; line-height: 1.2; }
h1 { font-size: 30px; margin-bottom: 8px; }
h2 { font-size: 21px; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
p, li { margin: 6px 0; }
ul { padding-left: 22px; }

/* ---------- Kopf / Fuß ---------- */
.kopf {
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  position: sticky; top: 0; z-index: 10;
}
.marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: 'Oswald', sans-serif; font-size: 22px; letter-spacing: .5px; }
.marke b { color: var(--gold); font-weight: 600; }
.marke-text { display: flex; flex-direction: column; line-height: 1.1; }
.marke-slogan { font-size: 11px; color: #bfe9d2; letter-spacing: .4px; white-space: nowrap; margin-top: 2px; }
.kopf-slogan { display: none; font-family: 'Oswald', sans-serif; font-size: 17px; letter-spacing: .8px; color: #bfe9d2; white-space: nowrap; }
.kopf-ende { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* Breite Bildschirme: Slogan mittig. Die beiden Außenspalten teilen sich den Rest,
   so bleibt der Slogan zentriert und kann das Menü rechts nie überdecken. */
@media (min-width: 1300px) {
  .kopf { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); }
  .kopf-slogan { display: block; padding: 0 20px; }
  .kopf-ende { justify-self: end; }
  .marke-slogan { display: none; }
}
@media (max-width: 359px) {
  .marke-slogan { font-size: 9.5px; letter-spacing: .2px; }
}

.kopf-nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.kopf-nav a { color: #d6e3ec; text-decoration: none; padding: 10px 8px; white-space: nowrap; }
.kopf-nav a.knopf { padding: 8px 14px; }
.kopf-nav a:hover { color: #fff; }
.kopf-rechts { display: flex; align-items: center; gap: 8px; }
.kopf-rechts .menue-knopf { display: none; }  /* spezifischer als .rund-knopf, sonst überschreibt dessen display */

/* Handy und Tablet (bis 1049 px): Navigation hinter ☰, klappt als volle Breite unter der Leiste auf,
   große Tippflächen. .kopf-ende löst sich auf, damit Menü und Knöpfe direkte Kinder der Leiste sind. */
@media (max-width: 1049px) {
  .kopf { flex-wrap: wrap; }
  .kopf-ende { display: contents; }
  .kopf-rechts { margin-left: auto; }
  .kopf-rechts .menue-knopf { display: inline-flex; }
  .kopf-nav {
    display: none; order: 3; flex-basis: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 8px -16px -10px; padding: 4px 16px 10px; border-top: 1px solid #24465e; font-size: 16px;
  }
  .kopf-nav.offen { display: flex; }
  .kopf-nav a { padding: 13px 4px; border-bottom: 1px solid #1d3c51; min-height: 48px; }
  .kopf-nav a.knopf { margin-top: 10px; padding: 13px; border-bottom: none; }
}
.fuss {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 18px 16px; font-size: 13px; color: var(--text-2);
  max-width: 960px; width: 100%; margin: 0 auto;
  border-top: 1px solid var(--linie);
}
.fuss a { color: var(--text-2); }

/* ---------- Bausteine ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; }
.karte + .karte { margin-top: 16px; }
.schmal { max-width: 520px; margin: 0 auto; }
.text-2 { color: var(--text-2); }
.klein { font-size: 13px; }

.knopf {
  display: inline-block; border: none; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--gruen); color: #fff !important;
  font-family: 'Oswald', sans-serif; font-size: 16px; letter-spacing: .4px;
  padding: 12px 22px; border-radius: 9px;
}
.knopf:hover { filter: brightness(1.08); }
.knopf:disabled { opacity: .6; cursor: not-allowed; }
.knopf-zweit { background: transparent; color: var(--akzent-text) !important; border: 1.5px solid var(--akzent-text); }
.knopf-rot { background: var(--rot); }
.knopf-klein { padding: 9px 16px; font-size: 15px; min-height: 40px; }
.knopf-breit { width: 100%; }

.meldung { border-radius: 9px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.meldung-fehler { background: var(--rot-hell); color: var(--rot); border: 1px solid var(--meldung-fehler-rand); }
.meldung-ok { background: var(--gruen-hell); color: var(--meldung-ok-text); border: 1px solid var(--meldung-ok-rand); }

/* ---------- Formulare ---------- */
.feld { margin-bottom: 14px; }
.feld label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.feld input, .feld select {
  width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--linie); border-radius: 8px; background: var(--eingabe); color: var(--text);
}
.feld input:focus, .feld select:focus { outline: none; border-color: var(--gruen); }
.feld-hinweis { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.feld-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .feld-zeile { grid-template-columns: 1fr; } }
.feld-zeile.plan-wetter { grid-template-columns: minmax(0, 1fr) minmax(0, 9rem) minmax(0, 1.4fr); }   /* Datum · Temperatur · Wetter in einer Reihe */
@media (max-width: 520px) { .feld-zeile.plan-wetter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .feld-zeile.plan-wetter .feld:last-child { grid-column: 1 / -1; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 16px 0; }
.check input { width: 24px; height: 24px; margin-top: 0; flex-shrink: 0; }
.honig { position: absolute; left: -9999px; }
.benutzername-vorschau { font-family: 'Oswald', sans-serif; font-size: 18px; color: var(--akzent-text); }

/* ---------- Startseite ---------- */
.held {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: 18px; padding: 44px 28px; text-align: center; position: relative; overflow: hidden;
}
.held img { width: 84px; height: 84px; margin-bottom: 14px; }
.held h1 { font-size: 46px; letter-spacing: 1px; margin: 0; }
.held h1 b { color: var(--gold); font-weight: 600; }
.held .slogan { font-family: 'Oswald', sans-serif; font-size: 20px; color: #bfe9d2; margin: 8px 0 26px; letter-spacing: .5px; }
.held .knoepfe { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.held .knopf-zweit { color: #fff !important; border-color: #fff; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); display: block; }
a.kachel:hover { border-color: var(--gruen); }
.kachel .symbol { font-size: 30px; }
.kachel h3 { margin: 8px 0 4px; font-size: 19px; }
.kachel p { font-size: 14px; color: var(--text-2); }
.etikett { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 2px 8px; border-radius: 20px; background: var(--etikett-hinter); color: var(--etikett-text); margin-top: 8px; }

/* ---------- Tabellen ---------- */
.tabelle-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--flaeche); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
th { background: var(--navy); color: #fff; font-weight: 600; font-size: 13px; }
tr:hover td { background: var(--zeile-hover); }
.zahlen { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 20px; }
.zahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 12px 16px; min-width: 130px; }
.zahl b { display: block; font-family: 'Oswald', sans-serif; font-size: 26px; color: var(--akzent-text); }
.zahl span { font-size: 13px; color: var(--text-2); }

/* ---------- Hell/Dunkel-Schalter ---------- */
.rund-knopf {
  background: transparent; border: 1px solid #3b5a70; color: #fff; cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rund-knopf:hover { border-color: #d6e3ec; }

/* ---------- Änderungen ---------- */
.changelog-eintrag h3 { margin: 8px 0 4px; font-size: 18px; }
.changelog-kopf { display: flex; align-items: center; gap: 10px; }
.etikett-version { margin: 0; background: var(--navy); color: #fff; }

/* ---------- Bahnzeichnungen (assets/js/bahnen.js) ---------- */
:root {
  --bahn-belag: #cfe3d5; --bahn-bande: #1c2833; --bahn-hindernis: #a9b4bc; --bahn-hindernis-rand: #3c4a55;
  --bahn-hell: #f4f7f9; --bahn-dunkel: #7d8b96; --bahn-rampe: #e6d3c3; --bahn-abschlag: #9fc4ab;
  --bahn-grenz: #d0362a; --bahn-ablege: #2a6fb3; --bahn-ziel: #f2c94c; --bahn-loch: #0b1116;
  --bahn-beton: #dcd9d2; --bahn-filz: #c9dfe9; --bahn-cobi: #e3dccb; --bahn-stein: #7c8287; --bahn-sand: #ecd9a4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bahn-belag: #23463a; --bahn-bande: #d6e3ec; --bahn-hindernis: #5b6a75; --bahn-hindernis-rand: #c5d2db;
    --bahn-hell: #8c9ba6; --bahn-dunkel: #2c3a44; --bahn-rampe: #7a6656; --bahn-abschlag: #3c6b52;
    --bahn-grenz: #ff6b5c; --bahn-ablege: #6fb2ff; --bahn-ziel: #e0b84a; --bahn-loch: #000;
    --bahn-beton: #4a4944; --bahn-filz: #24414f; --bahn-cobi: #4d4636; --bahn-stein: #9aa1a6; --bahn-sand: #8a7748;
  }
}
:root[data-theme="dark"] {
  --bahn-belag: #23463a; --bahn-bande: #d6e3ec; --bahn-hindernis: #5b6a75; --bahn-hindernis-rand: #c5d2db;
  --bahn-hell: #8c9ba6; --bahn-dunkel: #2c3a44; --bahn-rampe: #7a6656; --bahn-abschlag: #3c6b52;
  --bahn-grenz: #ff6b5c; --bahn-ablege: #6fb2ff; --bahn-ziel: #e0b84a; --bahn-loch: #000;
    --bahn-beton: #4a4944; --bahn-filz: #24414f; --bahn-cobi: #4d4636; --bahn-stein: #9aa1a6; --bahn-sand: #8a7748;
}
.pp-bahn { display: block; width: 100%; height: auto; overflow: visible; }
.pp-bahn * { vector-effect: non-scaling-stroke; }
.pp-belag { fill: var(--bahn-belag); }
.pp-bande { fill: none; stroke: var(--bahn-bande); stroke-width: 2.5; stroke-linejoin: round; }
.pp-abschlag { fill: var(--bahn-abschlag); stroke: var(--bahn-bande); stroke-width: 1; }
.pp-hindernis, .pp-hindernis2, .pp-plateau, .pp-passage, .pp-kegel, .pp-keil, .pp-huegel { stroke: var(--bahn-hindernis-rand); stroke-width: 1.2; }
.pp-hindernis { fill: var(--bahn-hindernis); }
.pp-hindernis2 { fill: var(--bahn-hell); }
.pp-plateau { fill: var(--bahn-dunkel); }
.pp-passage { fill: var(--bahn-hell); }
.pp-rampe { fill: var(--bahn-rampe); stroke: var(--bahn-hindernis-rand); stroke-width: 1.2; }
.pp-steg { fill: #b98b5e; stroke: var(--bahn-hindernis-rand); stroke-width: 1.2; }
.pp-bruecke { fill: var(--bahn-hell); stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
.pp-wand, .pp-rohr { fill: var(--bahn-bande); }
.pp-wandlinie { fill: none; stroke: var(--bahn-bande); stroke-width: 2; }
.pp-labyrinth { fill: none; stroke: var(--bahn-bande); stroke-width: 3.5; stroke-linecap: round; }
.pp-stab { fill: none; stroke: var(--bahn-bande); stroke-width: 4; stroke-linecap: round; }
.pp-kanal { fill: none; stroke: var(--bahn-belag); stroke-width: 7; stroke-linecap: round; }
.pp-tunnel { fill: var(--bahn-belag); stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
.pp-pyramide-licht { fill: var(--bahn-hell); opacity: .55; }
.pp-pyramide-kante { stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
.pp-zielflaeche { fill: var(--bahn-ziel); opacity: .85; stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
.pp-mulde { fill: var(--bahn-loch); }
.pp-netz, .pp-netzring { stroke: var(--bahn-hindernis-rand); stroke-width: 1.2; }
.pp-g-netzgrund { fill: var(--bahn-hell); }
.pp-netzlinie { stroke: var(--bahn-dunkel); stroke-width: .6; }
.pp-loch { fill: var(--bahn-loch); stroke: #fff; stroke-width: 1; }
.pp-grenz { fill: none; stroke: var(--bahn-grenz); stroke-width: 2.5; }
.pp-ablege { fill: none; stroke: var(--bahn-ablege); stroke-width: 1.3; }
.pp-hilf { fill: none; stroke: var(--bahn-bande); stroke-width: 1.2; stroke-dasharray: 4 3; }
.pp-scheitel { fill: none; stroke: var(--bahn-bande); stroke-width: 1.4; stroke-dasharray: 1.5 3; }
.pp-kante { fill: none; stroke: var(--bahn-hindernis-rand); stroke-width: 1; opacity: .7; }
.pp-ticks { stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
/* Beton (S 11): grauer Belag, Steine, Steinfeld mit Durchgang, Bunker, Weitschlag-Schutz */
.pp-sys-beton { --bahn-belag: var(--bahn-beton); }
.system-marke { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #d9eadf; color: #1f5a37; }
.system-marke.system-beton { background: #e4e1da; color: #4a463d; }
:root[data-theme="dark"] .system-marke { background: #23463a; color: #cfe3d5; }
:root[data-theme="dark"] .system-marke.system-beton { background: #4a4944; color: #ece8df; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .system-marke { background: #23463a; color: #cfe3d5; } :root:not([data-theme="light"]) .system-marke.system-beton { background: #4a4944; color: #ece8df; } }
.pp-abschlag-mitte { fill: none; stroke: var(--bahn-bande); stroke-width: 1; }
.pp-stein { fill: var(--bahn-stein); stroke: var(--bahn-hindernis-rand); stroke-width: 1; stroke-linejoin: round; }
.pp-steinfeld { fill: var(--bahn-hindernis); stroke: var(--bahn-hindernis-rand); stroke-width: 1.2; }
.pp-durchgang { fill: var(--bahn-belag); }
.pp-durchgang-rand { fill: none; stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
.pp-bunker { fill: var(--bahn-sand); stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
.pp-zielkreis { fill: none; stroke: var(--bahn-bande); stroke-width: 2; }
.pp-schutz { fill: none; stroke: var(--bahn-hindernis-rand); stroke-width: 6; stroke-linecap: round; opacity: .6; }
/* Filzgolf (S 13): Abschlagplatte, Steigung (leicht abgedunkelt), Graben */
.pp-sys-filz { --bahn-belag: var(--bahn-filz); }
.pp-platte { fill: var(--bahn-hindernis); opacity: .7; }
.pp-steigung { fill: var(--bahn-dunkel); opacity: .13; }
.pp-graben { fill: var(--bahn-loch); opacity: .55; stroke: var(--bahn-hindernis-rand); stroke-width: 1; }
/* Cobigolf (S 15): Tore als Querbalken, Abschlagmarkierungen als Punkte, gestrichelte Ablegelinie */
.pp-sys-cobi { --bahn-belag: var(--bahn-cobi); }
.pp-cobitor { fill: none; stroke: var(--bahn-bande); stroke-width: 3.5; stroke-linecap: round; }
.pp-abschlagpunkt { fill: #000; stroke: #fff; stroke-width: .8; }   /* schwarz wie im Normbild, weißer Rand für den dunklen Modus */
.pp-ablege-strich { fill: none; stroke: var(--bahn-ablege); stroke-width: 1.3; stroke-dasharray: 4 3; }
.pp-g-hell { stop-color: var(--bahn-hell); }
.pp-g-dunkel { stop-color: var(--bahn-dunkel); }
.pp-g-belag { stop-color: var(--bahn-belag); }

/* ---------- Bahnkatalog ---------- */
.system-reiter { display: flex; gap: 8px; margin: 14px 0 18px; flex-wrap: wrap; }
.system-reiter a, .system-reiter span, .system-reiter button { padding: 9px 16px; border-radius: 20px; font-size: 15px; text-decoration: none; border: 1.5px solid var(--linie); color: var(--text); min-height: 40px; display: inline-flex; align-items: center; }
.system-reiter button { background: transparent; font: inherit; font-size: 15px; cursor: pointer; }
.system-reiter .aktiv { background: var(--navy); border-color: var(--navy); color: #fff; }
.system-reiter .bald { color: var(--text-2); }
.bahn-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bahn-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 14px 14px; text-decoration: none; color: var(--text); display: block; }
a.bahn-karte:hover { border-color: var(--gruen); }
.bahn-karte .bahn-titel { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-family: 'Oswald', sans-serif; font-size: 17px; }
.bahn-nr { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 14px; }
.bahn-varianten { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.bahn-karte .pp-bahn { height: 130px; width: 100%; }  /* feste Höhe, damit L-/Z-förmige Bahnen die Karten nicht strecken */

.bahn-detail-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bahn-detail-kopf h1 { margin: 0; }
.bahn-buehne { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.bahn-buehne.hochkant .pp-bahn { max-height: 72vh; width: auto; margin: 0 auto; }
.bahn-schalter { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bahn-schalter button { background: transparent; color: var(--text); border: 1.5px solid var(--linie); border-radius: 20px; padding: 8px 14px; font-size: 14px; min-height: 40px; cursor: pointer; font-family: inherit; }
.bahn-schalter button.aktiv { background: var(--navy); color: #fff; border-color: var(--navy); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); margin-top: 12px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende span[hidden] { display: none; }
.legende i { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.bahn-info dt { font-weight: 600; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.bahn-info dd { margin: 2px 0 0; }
.bahn-blaettern { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.bahn-blaettern a { flex: 1; }

/* ---------- Anlagen ---------- */
.zaehler { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 700; }
.anlagen-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 8px; }
.anlage-karte { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); min-height: 64px; }
.anlage-karte:hover { border-color: var(--gruen); }
.anlage-karte[hidden] { display: none; }
.anlage-name { font-family: 'Oswald', sans-serif; font-size: 18px; }
.anlage-stand { text-align: center; flex-shrink: 0; }
.anlage-stand b { display: block; font-family: 'Oswald', sans-serif; font-size: 20px; color: var(--text-2); }
.anlage-stand.komplett b { color: var(--gruen); }
.anlage-stand span { font-size: 12px; color: var(--text-2); }
.anlage-bahnen { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; align-items: start; }
.anlage-bahn { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 14px 14px; scroll-margin-top: 80px; }
.anlage-bahn .bahn-titel { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-family: 'Oswald', sans-serif; font-size: 17px; }
.anlage-bahn-bild { display: block; margin-bottom: 6px; }
.anlage-bahn-bild .pp-bahn { height: 120px; width: 100%; }
.anlage-bahn .etikett { display: inline-block; }
.bahn-aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.bahn-editor { border: none; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--flaeche); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.bahn-editor::backdrop { background: rgba(8, 20, 30, .55); }
.bahn-editor form { padding: 18px; }
.editor-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.editor-zu { border-color: var(--linie); color: var(--text); }
.editor-vorschau { background: var(--hinter); border-radius: 10px; padding: 10px; }
.editor-vorschau .pp-bahn { max-height: 46vh; width: 100%; }

.vorschlag-liste { display: grid; gap: 14px; margin-top: 16px; }
.vorschlag-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 600px) { .vergleich { grid-template-columns: 1fr; } }
.vg-bild .pp-bahn { height: 110px; width: 100%; }
.vorschlag-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Pistenplan-Editor ---------- */
.plan-varianten { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.plan-varianten button, .plan-werkzeuge button {
  background: var(--flaeche); color: var(--text); border: 1.5px solid var(--linie); border-radius: 20px;
  padding: 8px 14px; font-size: 14px; min-height: 42px; cursor: pointer; font-family: inherit;
}
.plan-varianten button.aktiv, .plan-werkzeuge button.aktiv { background: var(--navy); border-color: var(--navy); color: #fff; }
.plan-werkzeuge { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.plan-werkzeuge#werkzeuge { margin: 10px 0 0; }
.plan-hinweis { font-size: 14px; color: var(--text-2); min-height: 21px; margin-bottom: 8px; }
.plan-buehne { padding: 12px; }
.plan-buehne.hochkant .pp-bahn, .plan-buehne .pp-bahn { max-height: 70vh; }
.plan-svg { width: 100%; user-select: none; -webkit-user-select: none; }
.plan-svg.modus-ablage, .plan-svg.modus-weg, .plan-svg.modus-stift { touch-action: none; cursor: crosshair; }
.plan-stift { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plan-stift-punkt { stroke: rgba(0,0,0,.35); stroke-width: .4; }
.stift-farben button { min-width: 44px; padding: 6px; }
.stift-farben button i { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); vertical-align: middle; }
.stift-farben button.aktiv i { box-shadow: 0 0 0 3px var(--gruen); }
.foto-reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.foto-platz { border: 1px dashed var(--linie); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.foto-titel { font-size: 13px; font-weight: 600; color: var(--text-2); }
.foto-bild img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; display: block; }
.foto-leer { flex: 1; min-height: 90px; border: 0; border-radius: 6px; background: var(--hinter); color: var(--text); font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; }
.foto-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.foto-knoepfe button { flex: 1; min-height: 38px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pd-fotos { display: inline-flex; gap: 6px; vertical-align: top; }
.pd-fotos img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.weg-strich { display: inline-block; width: 16px; height: 0; border-top: 4px solid var(--weg0); margin-right: 6px; vertical-align: middle; }
.weg-strich.w1 { border-top: 4px dashed var(--weg1); } .weg-strich.w2 { border-top: 4px dashed var(--weg2); }
/* Wegfarben: Hauptweg orange, Alternative 1 lila, Alternative 2 türkis */
:root { --weg0: #ff7a1a; --weg1: #8e44ec; --weg2: #00a3a3; }
.plan-weg { fill: none; stroke: var(--weg0); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.plan-weg.alternativ { stroke-width: 3; stroke-dasharray: 9 5; }
.plan-weg.w1, .plan-punkt.w1 { stroke: var(--weg1); }
.plan-weg.w2, .plan-punkt.w2 { stroke: var(--weg2); }
.plan-pfeil { fill: var(--weg0); }
.plan-pfeil.w1 { fill: var(--weg1); }
.plan-pfeil.w2 { fill: var(--weg2); }
.plan-punkt { fill: #fff; stroke: var(--weg0); stroke-width: 2; }
.plan-punkt.letzter { fill: var(--weg0); }
.plan-punkt.w1.letzter { fill: var(--weg1); }
.plan-punkt.w2.letzter { fill: var(--weg2); }
/* Ausgang eines Hindernisses (Weg geht nach einer Unterbrechung hier weiter) */
.plan-punkt.ausgang { fill: #fff; stroke-width: 3; }
.plan-wegwahl[hidden], .werkzeug-gruppe[hidden], .plan-legende[hidden], #poett-leiste[hidden], .plan-werkzeuge [hidden] { display: none; }
.plan-vorschau { stroke-dasharray: 5 4; stroke-linecap: butt; stroke-width: 2; opacity: .85; }
/* Pöttplan: 10 Farben (Inline-Style je Punkt) + Nummer im Punkt, Ablagelinien kräftiger zum Treffen */
.poett-weg { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.poett-punkt circle { stroke: #fff; stroke-width: 1.5; }
.poett-punkt.aktiv circle { stroke: var(--text); stroke-width: 2.5; }
.poett-punkt text { font: 700 4.6px 'Inter', sans-serif; fill: #fff; }
.poett-punkt text.dunkel { fill: #111; }
svg.poett-ansicht { overflow: hidden; }
.poett-ansicht .pp-ablege, .poett-ansicht .pp-ablege-strich { stroke-width: 3; }
#poett-punkte button i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 0; }
/* Lupe beim Zeichnen des Laufwegs: zeigt den Bereich unter dem Finger vergrößert */
.plan-lupe {
  position: fixed; z-index: 60; width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
  border: 3px solid #fff; box-shadow: 0 6px 22px rgba(0,0,0,.45); background: var(--bahn-belag); pointer-events: none;
}
.plan-lupe[hidden] { display: none; }
.plan-lupe svg { width: 100%; height: 100%; display: block; }
.plan-lupe::before, .plan-lupe::after { content: ''; position: absolute; background: #d0362a; }
.plan-lupe::before { left: 50%; top: 22%; bottom: 22%; width: 2px; margin-left: -1px; }
.plan-lupe::after { top: 50%; left: 22%; right: 22%; height: 2px; margin-top: -1px; }
.werkzeug-gruppe { display: contents; }
.plan-wegwahl button i, .plan-legende i { display: inline-block; width: 18px; height: 0; border-top: 4px solid var(--weg0); margin-right: 7px; vertical-align: middle; }
.plan-wegwahl button.w1 i, .plan-legende i.w1 { border-top: 4px dashed var(--weg1); }
.plan-wegwahl button.w2 i, .plan-legende i.w2 { border-top: 4px dashed var(--weg2); }
.plan-legende { margin-top: 8px; }
.plan-ball { fill: #fff; stroke: #111; stroke-width: 1.5; }
.plan-ball.w1 { fill: var(--weg1); stroke: #fff; }   /* eigener Ablagepunkt Alternative 1 */
.plan-ball.w2 { fill: var(--weg2); stroke: #fff; }   /* eigener Ablagepunkt Alternative 2 */
.plan-felder { margin-top: 14px; }
.plan-felder textarea { width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit; border: 1.5px solid var(--linie); border-radius: 8px; background: var(--eingabe); color: var(--text); resize: vertical; }
.plan-felder input[type=range] { width: 100%; padding: 0; border: none; accent-color: var(--gruen); height: 36px; background: transparent; }
.plan-speichern {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 10px 0; margin-top: 10px; background: linear-gradient(transparent, var(--hinter) 30%);
}
.plan-liste { display: grid; gap: 10px; margin-top: 12px; }
.plan-eintrag { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--text); min-height: 56px; }
.plan-eintrag:hover { border-color: var(--gruen); }
.plan-ball { flex: 1; min-width: 0; text-align: center; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {   /* Handy: Ball in eigene Zeile unter dem Bahnnamen */
  .plan-eintrag { flex-wrap: wrap; }
  .plan-ball { order: 3; flex-basis: 100%; text-align: left; }
}

/* ---------- Meine Pistenpläne: aufklappbar je Anlage ---------- */
.plan-anlage { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); margin-top: 12px; }
.plan-anlage > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; min-height: 56px; font-family: 'Oswald', sans-serif; font-size: 20px;
}
.plan-anlage > summary::-webkit-details-marker { display: none; }
.plan-anlage > summary::after { content: '▾'; font-size: 18px; color: var(--text-2); transition: transform .2s; }
.plan-anlage[open] > summary::after { transform: rotate(180deg); }
.plan-anlage > summary .text-2 { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 400; margin-left: auto; }
.plan-anlage-inhalt { padding: 0 14px 14px; }
.plan-anlage-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Druckversion (A4 quer, 3 × 3 Bahnen) ---------- */
.druck-optionen { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.druck-optionen .feld select { min-width: 220px; }
.druckseite { background: #fff; color: #1c2833; border: 1px solid var(--linie); border-radius: 6px; padding: 14px; margin-top: 18px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.druck-kopf { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; border-bottom: 2px solid #0f2a3d; padding-bottom: 6px; margin-bottom: 10px; }
.druck-raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }   /* wie auf dem Blatt: 2 Spalten */
@media screen and (max-width: 899px) { .druck-raster { grid-template-columns: 1fr; } }
.druck-bahn { border: 1px solid #c8d0d6; border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; font-size: 12px; line-height: 1.35; break-inside: avoid; }
.druck-titel { font-family: 'Oswald', sans-serif; font-size: 14px; }
.druck-titel b { display: inline-block; min-width: 22px; text-align: center; background: #0f2a3d; color: #fff; border-radius: 4px; margin-right: 4px; }
.druck-hinweis { font-family: 'Inter', sans-serif; font-size: 10px; background: #fff4d6; color: #8a6510; border-radius: 8px; padding: 0 6px; }
.druck-bild .pp-bahn { height: 110px; width: 100%; }
.druck-daten > div { margin: 1px 0; }
.druck-daten span:first-child { font-weight: 600; color: #5b6b78; }
.druck-daten span i { display: inline-block; width: 10px; height: 0; border-top: 3px dashed var(--weg1); margin-right: 4px; vertical-align: middle; }
.druck-daten span i.w2 { border-top-color: var(--weg2); }
.druck-notiz { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.druck-wege i { display: inline-block; width: 14px; height: 0; border-top: 3px solid var(--weg0); margin: 0 4px 0 6px; vertical-align: middle; }
.druck-wege i.w1 { border-top: 3px dashed var(--weg1); }
.druck-wege i.w2 { border-top: 3px dashed var(--weg2); }
.schreiblinie { display: inline-block; width: 70%; border-bottom: 1px solid #9aa5ad; height: 12px; vertical-align: bottom; }
.druck-notiz .schreiblinie { display: block; width: 100%; height: 14px; }
.druck-haken { display: flex; align-items: center; gap: 6px; font-size: 14px; min-height: 44px; }
.druck-haken[hidden] { display: none; }
.druck-poett-inhalt { display: flex; gap: 8px; align-items: flex-start; flex: 1; min-height: 0; }
.druck-poett .druck-bild { flex: 0 0 42%; }
.druck-poett .druck-bild .pp-bahn { height: 150px; }
.druck-poett .druck-daten { flex: 1; min-width: 0; }
.druck-poett .druck-daten > div { padding-left: 1.6em; text-indent: -1.6em; }
.druck-daten span i.pd-punkt { width: 9px; height: 9px; border: 0; border-radius: 50%; vertical-align: 0; }

@media print {
  @page { size: A4 portrait; margin: 7mm; }
  html, body { background: #fff !important; min-height: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kopf, .fuss, .nicht-drucken, .umzug-hinweis, .offline-leiste { display: none !important; }   /* Hinweisleisten nicht mitdrucken – sie verschieben sonst das Raster auf eine Zusatzseite */
  main { padding: 0; max-width: none; }
  /* A4 hochkant, 6 Bahnen pro Blatt: 2 Spalten × 3 Reihen */
  .druckseite {
    width: 196mm; height: 283mm; overflow: hidden; margin: 0; padding: 0; border: none; border-radius: 0; box-shadow: none;
    display: flex; flex-direction: column; break-after: page; page-break-after: always;
  }
  .druckseite:last-child { break-after: auto; page-break-after: auto; }
  .druck-kopf { font-size: 9pt; margin-bottom: 3mm; padding-bottom: 1.5mm; }
  /* minmax(0, …): Reihen dürfen nicht über ein Drittel wachsen – sonst rutscht die 3. Reihe auf die nächste Seite */
  .druck-raster { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 3mm; min-height: 0; }
  .druck-bahn { padding: 2.5mm 3mm; font-size: 8.5pt; line-height: 1.35; gap: 1mm; border-color: #9aa5ad; min-height: 0; }
  .druck-titel { font-size: 11pt; }
  .druck-bild { flex: 0 0 auto; }
  .druck-bild .pp-bahn { height: 30mm; }
  .druck-notiz { -webkit-line-clamp: 6; }
  .schreiblinie { height: 4mm; }
  .druck-notiz .schreiblinie { height: 5mm; }
  .druck-poett .druck-bild .pp-bahn { height: 62mm; }
}

/* ---------- Turnier-Scoreboard ---------- */
/* DMV-Farben einer Miniaturgolf-Runde: Blau 18–19, Grün 20–24, Rot 25–29, Schwarz ab 30 */
.runden-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 1px 7px; border-radius: 6px; font-weight: 700; font-size: 13px; background: var(--hinter); color: var(--text); border: 1px solid var(--linie); }
.runden-chip.blau { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.runden-chip.gruen { background: #2f9e63; color: #fff; border-color: #2f9e63; }
.runden-chip.rot { background: #c0392b; color: #fff; border-color: #c0392b; }
.runden-chip.schwarz { background: #111; color: #fff; border-color: #111; }
.runden-chip.gross { font-family: 'Oswald', sans-serif; font-size: 22px; min-width: 48px; padding: 2px 10px; margin-right: 8px; }
.runden-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.turnier-eintrag { align-items: flex-start; }
.turnier-gesamt { text-align: right; flex-shrink: 0; }
.turnier-gesamt b { display: block; font-family: 'Oswald', sans-serif; font-size: 24px; }
.turnier-gesamt span { font-size: 13px; color: var(--text-2); }
.runden-reiter button { display: inline-flex; align-items: center; gap: 6px; }
/* Mehrspieler-Scoreboard: Tabelle wie ein Spielbericht */
.mt-teilnahme { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.mt-teilnahme button { border: 1.5px solid var(--linie); background: var(--flaeche); color: var(--text); border-radius: 16px; padding: 4px 12px; min-height: 36px; font: inherit; font-size: 14px; cursor: pointer; }
.mt-teilnahme button.aktiv { border-color: var(--gruen); background: var(--gruen); color: #fff; }
.mt-wrap { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); }
table.mt { border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.mt th, table.mt td { padding: 2px; text-align: center; border-bottom: 1px solid var(--linie); }
table.mt thead th { font-weight: 600; color: #fff; padding: 6px 2px; text-align: center; }
table.mt tbody th.mt-name { color: var(--text); font-size: 15px; }   /* allgemeine th-Regel (dunkel, weiße Schrift) hier aufheben */
table.mt thead th.mt-name { background: var(--navy); color: #fff; }
.score-liste.mehr { display: block; }   /* Mehrspieler: Haken und Tabelle untereinander, nicht im Bahnraster */
table.mt .mt-name { position: sticky; left: 0; z-index: 1; background: var(--flaeche); text-align: left; padding: 4px 8px; white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--linie); }
table.mt td button { width: 34px; height: 38px; border: 1px solid var(--linie); border-radius: 6px; background: var(--hinter); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
table.mt td button.ass { background: var(--gold); color: #1c2833; border-color: var(--gold); }
table.mt td button.gew { box-shadow: inset 0 -4px 0 #2e9c5a; }
table.mt td button.verl { box-shadow: inset 0 -4px 0 #d0362a; }
table.mt td button.gewaehlt { outline: 3px solid var(--gruen); outline-offset: 1px; }
.mt-bahn { border: 0; background: transparent; color: #8fe0b4; font: inherit; font-weight: 700; cursor: pointer; padding: 2px; }
.mt-bahn i { font-style: normal; font-size: 10px; display: block; }
.mt-summe { padding: 2px 8px !important; }
.mt-legende { padding: 0 4px; border-bottom: 3px solid; }
.mt-legende.gew { border-color: #2e9c5a; } .mt-legende.verl { border-color: #d0362a; }
.mt-eingabe { width: 100%; }
.mt-eingabe .score-knoepfe { margin-top: 6px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.mt-rang .mt-gew { color: #2e9c5a; font-weight: 700; } .mt-rang .mt-verl { color: #d0362a; font-weight: 700; }
.spieler-zeile { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.spieler-knoepfe { display: flex; gap: 4px; }
/* Verknüpfung mit PuttPilot-Konto (S3): eigene Zeile unter Name/Mannschaft */
.spieler-konto { grid-column: 1 / -1; order: 5; display: flex; gap: 8px; align-items: center; margin: -2px 0 4px; }
.spieler-konto select { flex: 0 1 320px; min-width: 0; padding: 6px 8px; font-size: 14px; }
.vk-status { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.vk-status.ok { color: var(--gruen); }
.spieler-knoepfe button, .spieler-ich { min-width: 36px; min-height: 40px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.spieler-ich { border: 0; cursor: default; }
@media (max-width: 420px) { .spieler-zeile { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .spieler-knoepfe { grid-column: 1 / -1; justify-content: flex-end; } }

/* Datum, Temperatur und Wetter der gewählten Runde (Scoreboard) */
.runden-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9rem) minmax(0, 1.4fr); gap: 10px; margin: 4px 0 12px; }
.runden-info .feld { margin: 0; }
.ri-temp { display: flex; align-items: center; gap: 6px; }
.ri-temp input { min-width: 0; }
.score-tabelle .runden-wetter td { white-space: nowrap; font-weight: 400; }
@media (max-width: 560px) { .runden-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .runden-info .feld:last-child { grid-column: 1 / -1; } }

.score-liste { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 1000px) { .score-liste { grid-template-columns: 1fr 1fr; } }
.score-bahn { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 12px; scroll-margin: 90px 0 120px; }
.score-bahn.erledigt { border-color: color-mix(in srgb, var(--gruen) 45%, var(--linie)); }
.score-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 32px; }
.score-name { font-family: 'Oswald', sans-serif; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-plan { background: transparent; border: 1.5px solid var(--linie); border-radius: 16px; padding: 6px 10px; font-size: 13px; color: var(--text); cursor: pointer; min-height: 36px; font-family: inherit; }
.score-wert { font-family: 'Oswald', sans-serif; font-size: 24px; min-width: 26px; text-align: right; color: var(--navy); }
:root[data-theme="dark"] .score-wert { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .score-wert { color: var(--gold); } }
.score-wert.ass { color: var(--gold); }
.score-knoepfe { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.score-knoepfe button {
  min-height: 46px; border-radius: 10px; border: 1.5px solid var(--linie); background: var(--eingabe); color: var(--text);
  font-family: 'Oswald', sans-serif; font-size: 20px; cursor: pointer; touch-action: manipulation;
}
.score-knoepfe button.ass { border-color: var(--gold); }
.score-knoepfe button.aktiv { background: var(--navy); border-color: var(--navy); color: #fff; }
.score-knoepfe button.ass.aktiv { background: var(--gold); border-color: var(--gold); color: var(--navy); }
/* Ball und Plan-Variante je Bahn (Statistik S2): kleine Zeile unter den Knöpfen, Vorschlag blasser */
.score-ball { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 6px; padding: 4px 2px; min-height: 32px; background: none; border: 0; border-top: 1px dashed var(--linie); color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.score-ball > span { margin-left: auto; color: var(--text-2); }
.score-ball.vorschlag { color: var(--text-2); font-style: italic; }
.mt-eingabe .score-ball { border-top: 0; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-chips button { border: 1.5px solid var(--linie); background: var(--flaeche); color: var(--text); border-radius: 16px; padding: 4px 12px; min-height: 36px; font: inherit; font-size: 14px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bd-chips button.aktiv { border-color: var(--navy); background: var(--navy); color: #fff; }
.score-leiste { position: sticky; bottom: 0; z-index: 6; margin-top: 14px; padding: 10px 0 8px; background: linear-gradient(transparent, var(--hinter) 25%); }
.score-leiste-inhalt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 -4px 18px rgba(0,0,0,.08); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.score-leiste-inhalt > div:first-child { display: flex; align-items: center; font-size: 14px; }
.sync.ok { color: var(--gruen); }
.sync.offline { color: var(--rot); font-weight: 600; }
.score-tabelle td, .score-tabelle th { text-align: center; padding: 6px 8px; }
.score-tabelle td:first-child, .score-tabelle th:first-child { text-align: left; }
.score-tabelle td.ass { color: #8a6510; font-weight: 700; background: #fff4d6; }
.score-tabelle tr.summe td { border-top: 2px solid var(--navy); font-weight: 700; }
.pd-daten { margin-top: 10px; font-size: 15px; }
.karte > summary { min-height: 44px; display: flex; align-items: center; }
.pd-daten span { font-weight: 600; color: var(--text-2); }
.pd-punkt { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
#pd-poett-bild .pp-bahn { max-height: 55vh; }

/* ---------- Statistik ---------- */
/* Datenfarbe: Blau, mit dem Dataviz-Validator gegen beide Hintergründe geprüft (hell #2a78d6, dunkel #3987e5) */
:root { --viz-serie: #2a78d6; --viz-gitter: #e3e8ec; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-serie: #3987e5; --viz-gitter: #24333e; } }
:root[data-theme="dark"] { --viz-serie: #3987e5; --viz-gitter: #24333e; }
.stat-filter { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: flex-end; margin-top: 14px; }
.stat-filter .feld { margin: 0; min-width: 150px; flex: 1 1 150px; max-width: 260px; }
.stat-kacheln { margin-top: 16px; }
.stat-kacheln .zahl { flex: 1 1 120px; }
.stat-karte { margin-top: 16px; }
.stat-titel { margin: 0 0 2px; font-size: 20px; }
.diagramm { margin-top: 12px; width: 100%; overflow: hidden; }
.stat-svg { display: block; max-width: 100%; height: auto; font-family: 'Inter', sans-serif; }
.stat-gitter { stroke: var(--viz-gitter); stroke-width: 1; }
.stat-achse { fill: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.stat-bahnname { font-variant-numeric: normal; }
.stat-wert { fill: var(--text); font-size: 12px; font-weight: 600; }
.stat-linie { fill: none; stroke: var(--viz-serie); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.stat-punkt { fill: var(--viz-serie); stroke: var(--flaeche); stroke-width: 2; }
.stat-punkt.aktiv { stroke-width: 3; }
.stat-kreuz { stroke: var(--text-2); stroke-width: 1; opacity: .6; }
.stat-balken { fill: var(--viz-serie); }
.stat-punkt-roh { opacity: .38; stroke-width: 1; }   /* einzelne Turniere blass, die Formkurve kräftig */
.stat-wenig { opacity: .45; }                        /* weniger als 3 Runden: wenig aussagekräftig */
.stat-null { stroke: var(--text-2); stroke-width: 1.5; }   /* Nulllinie bei Abweichungen (Ball- und Plan-Erfolg) */
.stat-tipps { margin: 8px 0 0; padding-left: 20px; }
.stat-tipps li { margin-bottom: 4px; }
.stat-legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.stat-legende i { display: inline-block; margin-right: 6px; vertical-align: middle; }
.stat-legende i.punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--viz-serie); opacity: .38; }
.stat-legende i.linie { width: 20px; height: 0; border-top: 2px solid var(--viz-serie); }
.stat-untertitel { margin: 12px 0 2px; font-size: 15px; }
.stat-sprung { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.stat-sprung a { padding: 6px 12px; border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); color: var(--text); text-decoration: none; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }
.stat-sprung a:hover { border-color: var(--gruen); }
.stat-karte { scroll-margin-top: 80px; }
.stat-zeile:focus { outline: none; }
.stat-zeile:focus-visible { stroke: var(--viz-serie); stroke-width: 1.5; }
.stat-tooltip {
  position: fixed; z-index: 70; pointer-events: none; max-width: 260px;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.stat-tooltip b { display: block; font-size: 16px; }
.stat-tooltip div { color: var(--text-2); }
.stat-tooltip[hidden] { display: none; }
.stat-tabelle { margin-top: 10px; }
.stat-tabelle > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--text-2); font-size: 14px; }
/* Ziele und Meilensteine (S4) */
.ziele-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 12px; }
.ziel { border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; background: var(--flaeche); min-width: 0; }
.ziel-kopf { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: space-between; align-items: flex-start; }
.ziel-titel { flex: 1 1 11em; overflow-wrap: anywhere; }   /* schmal: Status rutscht unter den Titel */
.ziel-status { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--hinter); color: var(--text-2); }
.ziel-erreicht { border-color: var(--meldung-ok-rand); }
.ziel-erreicht .ziel-status { background: var(--gruen-hell); color: var(--meldung-ok-text); }
.ziel-abgelaufen { opacity: .7; }
.ziel-zeile { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.ziel-balken { flex: 1; height: 10px; border-radius: 5px; background: var(--viz-gitter); overflow: hidden; }
.ziel-fuellung { height: 100%; border-radius: 5px; background: var(--viz-serie); }
.ziel-erreicht .ziel-fuellung { background: var(--gruen); }
.ziel-prozent { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.ziel-werte { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.ziel-weg { margin-top: 8px; text-align: right; }
.ziel-neu { margin-top: 12px; }
.ziel-neu > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--akzent-text); }
.ziel-neu form { margin-top: 8px; }
.ziel-neu .feld-zeile { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.meilensteine { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; margin-top: 8px; }
.meilenstein { border: 1px solid var(--meldung-ok-rand); background: var(--gruen-hell); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meilenstein b { font-size: 14px; color: var(--text); }
.meilenstein-symbol { font-size: 20px; line-height: 1.2; }
.meilenstein-offen { background: var(--flaeche); border: 1px dashed var(--linie); }
.meilenstein-offen .meilenstein-symbol, .meilenstein-offen b { opacity: .55; }

/* ---------- Rechtstexte ---------- */
.rechtstext h2 { border-bottom: 2px solid var(--linie); padding-bottom: 6px; }
.rechtstext p, .rechtstext li { font-size: 15px; }

/* ---------- Teilen: Freunde & Gruppen, Teilen-Fenster, geteilte Ansicht ---------- */
.karte-titel { margin: 0 0 10px; font-size: 20px; }
.haken-zeile { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; min-height: 32px; cursor: pointer; }
.haken-zeile input[type=checkbox], .haken-zeile input[type=radio] { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; }
.teilen-zeile { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.teilen-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
@media (max-width: 699px) { .teilen-zwei { grid-template-columns: 1fr; } }
.teilen-eintrag { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.teilen-eintrag form { display: flex; gap: 6px; margin: 0; }
.teilen-gruppe { border-top: 1px solid var(--linie); padding: 10px 0; }
.teilen-gruppe summary { cursor: pointer; min-height: 32px; }
.teilen-code { font-family: monospace; font-size: 17px; letter-spacing: 2px; margin-right: 8px; }
.teilen-link-feld { width: 100%; font-family: monospace; font-size: 13px; margin: 8px 0; }
.teilen-dialog .feld > label:first-child { font-weight: 600; }
.geteilt-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; margin-top: 14px; }
.geteilt-bahn .bahn-titel { margin-bottom: 4px; }
.geteilt-variante { border-top: 1px solid var(--linie); padding-top: 8px; margin-top: 8px; }
.geteilt-variante h4 { margin: 0 0 6px; font-family: 'Oswald', sans-serif; font-weight: 600; }
.geteilt-variante .pp-bahn { max-height: 46vh; }
.geteilt-poett summary { cursor: pointer; margin-top: 8px; font-weight: 600; min-height: 32px; }
.geteilt-kopieren { margin-top: 10px; }

.feld .haken-zeile, .teilen-dialog .haken-zeile { font-size: 15px; font-weight: 400; color: var(--text); text-transform: none; letter-spacing: 0; }
.geteilt-bahn .bahn-titel { display: flex; align-items: center; gap: 8px; }
.registrieren-teilen { border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; margin: 14px 0; background: var(--flaeche); }
.registrieren-teilen .check[hidden] { display: none; }

/* ---------- App / iPhone: Ränder für Notch und Home-Leiste (viewport-fit=cover) ---------- */
.kopf { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.fuss { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }


/* ---------- Balldatenbank ---------- */
.ball-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-top: 10px; }
.ball-karte { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ball-karte p { margin: 4px 0; }
.ball-mein { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--gold); background: var(--flaeche); border-radius: 4px; }
.ball-freunde { list-style: none; padding: 0; margin: 6px 0 0; }
.ball-freunde li { padding: 4px 10px; border-left: 3px solid var(--gruen); margin-top: 4px; font-size: 14px; }
.ball-tabelle td, .ball-tabelle th { vertical-align: top; }
.plan-ballwahl { margin-top: 10px; padding: 10px 14px; }
.vorschlag-gruppe { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; padding-top: 10px; border-top: 2px solid var(--linie); grid-column: 1 / -1; }
.vorschlag-gruppe form { margin: 0; }

.bahn-editor textarea, .karte .feld textarea { width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit; border: 1.5px solid var(--linie); border-radius: 8px; background: var(--eingabe); color: var(--text); resize: vertical; }
.ball-karte[hidden] { display: none; }
.ball-werte .feld { min-width: 0; }

/* ---------- Filter National/International/Bundesland ---------- */
.anlagen-filter .system-reiter { margin: 8px 0; }
.anlagen-filter .system-reiter[hidden] { display: none; }
.anlagen-filter button { font-size: 14px; padding: 7px 12px; min-height: 36px; }
.bundesland-reiter { padding-left: 10px; border-left: 3px solid var(--gruen); }
.filter-zahl { font-size: 11px; opacity: .7; margin-left: 2px; }
.lage-marke { display: inline-block; font-size: 11px; color: var(--text-2); margin-left: 6px; }
.lage-marke::before { content: '📍'; margin-right: 2px; }
[data-filter-anlage][hidden] { display: none !important; }
#a-bl-feld[hidden] { display: none; }
.lage-aendern { display: inline-block; margin-left: 6px; }
.lage-aendern summary { cursor: pointer; color: var(--gruen); text-decoration: underline; display: inline; }
.lage-aendern[open] { display: block; margin: 8px 0; }

/* ---------- Offline-Betrieb ---------- */
.offline-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 16px max(8px, env(safe-area-inset-bottom));
  background: #6b4e00; color: #fff; font-size: 14px; text-align: center; box-shadow: 0 -2px 10px rgba(0,0,0,.25); }
.offline-leiste[hidden] { display: none; }
.offline-knopf-zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.plan-speichern, .score-leiste { bottom: var(--offline-hoehe, 0px); }
body { padding-bottom: var(--offline-hoehe, 0px); }

/* ---------- Hinweis Domainumzug ---------- */
.umzug-hinweis { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px 16px; background: #e8b84a; color: #1c2833; font-size: 14px; }
.umzug-hinweis[hidden] { display: none; }
.umzug-hinweis button { background: transparent; border: 0; font-size: 18px; cursor: pointer; min-width: 36px; min-height: 36px; color: inherit; }


/* ---------- Anleitung und ⓘ-Kurzhilfen (core/hilfe.php) ---------- */
.hilfe-i { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gruen);
  color: var(--gruen); background: transparent; font: italic 700 15px/1 Georgia, 'Times New Roman', serif; vertical-align: middle; cursor: pointer; padding: 0; margin-left: 4px; }
.hilfe-i:hover, .hilfe-i:focus-visible { background: var(--gruen); color: #fff; }
.hilfe-i-text { width: 20px; height: 20px; font-size: 12px; cursor: default; }
h1 .hilfe-i { position: relative; top: -3px; }
.hilfe-dialog { max-width: min(520px, calc(100vw - 32px)); border: 0; border-radius: var(--radius); padding: 20px 22px; background: var(--flaeche); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.hilfe-dialog::backdrop { background: rgba(10, 20, 30, .45); }
.hilfe-dialog h2 { margin: 0 36px 10px 0; font-size: 22px; }
.hilfe-dialog ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; }
.hilfe-zu { position: absolute; top: 12px; right: 12px; }
.anleitung-inhalt { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin: 14px 0 18px; }
.anleitung-kachel { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); color: var(--text); text-decoration: none; }
a.anleitung-kachel:hover { border-color: var(--gruen); }
.anleitung-kachel .symbol { font-size: 22px; }
.anleitung-kachel ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.anleitung-kachel ul a { color: var(--text-2); }
.anleitung-abschnitt { scroll-margin-top: 80px; margin-top: 14px; }
.anleitung-abschnitt h2 { margin-top: 0; }
.anleitung-abschnitt h3 { margin: 14px 0 4px; }
.anleitung-abschnitt ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.start-anleitung { margin-top: 26px; }

/* Nutzer & Rollen (verwaltung/nutzer.php) */
.nutzer-rolle, .nutzer-aktionen form { display: flex; gap: 6px; align-items: center; margin: 0; }
.nutzer-rolle select { min-width: 150px; padding: 6px 8px; }
.nutzer-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.nutzer-tabelle td { vertical-align: middle; }

/* Mitspieler-Verknüpfung (S3): Anfragen und „Von Mitspielern eingetragen“ */
.vk-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--linie); }
.vk-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.vk-eintrag > a { color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.vk-eintrag .turnier-gesamt form { margin-top: 6px; }

/* Startseite: Kasten „Deine Ziele“ (S4) */
.start-ziele { display: block; margin-top: 14px; color: inherit; text-decoration: none; }
.start-ziele:hover { border-color: var(--akzent-text); }
.start-ziel { margin-top: 10px; }
.start-ziel-titel { display: block; overflow-wrap: anywhere; }
.start-ziel.ziel-erreicht .start-ziel-titel { font-weight: 600; color: var(--meldung-ok-text); }
.start-ziel .ziel-zeile { margin: 4px 0 0; }
.start-ziele > .klein { display: block; margin-top: 10px; }

/* ---------- Statistik: Export-Knöpfe und Drucken / PDF (S5) ---------- */
.stat-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.druck-nur { display: none; }
@media print {
  /* immer hell drucken – auch wenn am Bildschirm der dunkle Modus an ist (3 × :root schlägt die Dunkel-Regeln) */
  :root:root:root {
    --text: #1c2833; --text-2: #5b6b78; --linie: #d5dce2; --flaeche: #ffffff; --hinter: #e7ebef; --eingabe: #fff;
    --gruen: #2f9e63; --gruen-hell: #e6f5ed; --akzent-text: #0f2a3d; --meldung-ok-text: #1d6b42; --meldung-ok-rand: #bfe3cf;
    --viz-serie: #2a78d6; --viz-gitter: #e3e8ec;
  }
  body { color: var(--text); }
  .druck-nur { display: block; }
  .stat-aktionen, .stat-sprung, .stat-filter, .ziel-neu, .ziel-weg, .stat-tooltip, .stat-tabelle > summary, .hilfe-i, .meldung { display: none !important; }
  .stat-tabelle:not([open]) { display: none; }
  .stat-karte, .zahl, .ziel, .meilenstein { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
  .stat-karte { margin-top: 4mm; }
}

/* Testseite (C:\inetpub\test\puttpilot): unübersehbare Leiste oben */
.test-leiste { background: #b3261e; color: #fff; text-align: center; font-weight: 700; font-size: 14px; padding: 6px 12px; }
@media print { .test-leiste { display: none; } }
