/* =====================================================
   DART-TURNIER – Design für Handy, Tablet und PC
   Aufbau: zuerst Handy (schmal), weiter unten @media-Regeln
   für größere Bildschirme.
   ===================================================== */

/* ===== 1) Farben und Grundwerte ===== */
:root {
  --rot: #c8102e;          /* Feuerwehr-Rot (auch Startgeld im Diagramm) */
  --rot-dunkel: #a30d25;
  --rot-hell: #fdf2f3;
  --blau: #2a78d6;         /* Spende / Vorauszahlung */
  --blau-text: #1d5aa6;
  --blau-hell: #e8f1fc;
  --gruen-text: #1d7a43;
  --gruen-hell: #e3f6e8;
  --orange-text: #a84a00;
  --orange-hell: #fff1e0;
  --text: #222;
  --text-leise: #666;
  --linie: #ddd;
  --flaeche: #fafafa;
  --karte: #fff;
  --gold: #fff4c2;
  --silber: #eef0f2;
  --bronze: #f6e2d3;
  --radius: 10px;
  --knopf-hoehe: 44px;
}

* { box-sizing: border-box; }

/* Das HTML-Attribut "hidden" soll immer gewinnen */
[hidden] { display: none !important; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--flaeche);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }

a { color: var(--rot); }

.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.hinweis { color: var(--text-leise); font-size: 0.9rem; }
.klein { font-size: 0.85rem; color: var(--text-leise); }
.leer { color: var(--text-leise); text-align: center; padding: 1rem; }

/* Sichtbarer Rahmen für Tastatur-Bedienung */
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }


/* ===== 2) Kopf, Reiter, Umschalter ===== */
.kopf {
  background: var(--rot);
  color: white;
  text-align: center;
  padding: 1rem 1rem 0.75rem;
}
.kopf h1 { margin: 0; font-size: 1.6rem; }
.untertitel { margin: 0.25rem 0 0; opacity: 0.9; }

.reiter {
  display: flex;
  background: var(--rot);
  padding: 0 0.5rem;
  gap: 0.25rem;
}
.reiter button {
  flex: 1;
  min-height: var(--knopf-hoehe);
  border: none;
  background: transparent;
  color: white;
  font: inherit;
  font-weight: bold;
  opacity: 0.8;
  border-bottom: 4px solid transparent;
  cursor: pointer;
}
.reiter button[aria-selected="true"] {
  opacity: 1;
  border-bottom-color: white;
}

/* Gesamt | Frauen */
.umschalter {
  display: flex;
  background: #eee;
  border-radius: 999px;
  padding: 4px;
  margin: 0 0 0.75rem;
}
.umschalter button {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-weight: bold;
  color: var(--text-leise);
  cursor: pointer;
}
.umschalter button[aria-pressed="true"] {
  background: white;
  color: var(--rot);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}


/* ===== 3) Seite, Karten, Meldungen ===== */
.seite, .inhalt {
  padding: 0.75rem;
  max-width: 1400px;
  margin: 0 auto;
}

.karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.meldung:empty { display: none; }
.meldung {
  text-align: center;
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
}
.meldung.fehler { color: var(--rot-dunkel); background: #fde8eb; border: 1px solid var(--rot); }
.meldung.erfolg { color: var(--gruen-text); background: var(--gruen-hell); border: 1px solid #2e9e55; }

.fuss { text-align: center; padding: 1.5rem 0 2rem; }
.fuss a { font-size: 0.85rem; color: var(--text-leise); }

.abzeichen {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: bold;
  background: var(--rot);
  color: white;
  vertical-align: middle;
}
.abzeichen.grau { background: #888; }


/* ===== 4) Tabellen ===== */
table { width: 100%; border-collapse: collapse; background: white; font-size: 1.05rem; }
th, td { padding: 0.65rem 0.5rem; text-align: left; border-bottom: 1px solid var(--linie); }
th { background: var(--text); color: white; font-size: 0.8rem; text-transform: uppercase; }
th.zahl, td.zahl { text-align: right; }
tbody tr:nth-child(even) { background: var(--rot-hell); }
tr.platz-1 { background: var(--gold) !important; font-weight: bold; }
tr.platz-2 { background: var(--silber) !important; }
tr.platz-3 { background: var(--bronze) !important; }
tr.heute { font-weight: bold; }
td.name { word-break: break-word; }
.erklaerung { font-size: 0.85rem; color: var(--text-leise); margin: 0.5rem 0 0; }

/* Ranglisten: am Handy eine sichtbar (Umschalter), breit beide nebeneinander */
.ranglisten[data-zeige="gesamt"] .rl-frauen { display: none; }
.ranglisten[data-zeige="frauen"] .rl-gesamt { display: none; }
.ranglisten .karte { padding: 0; overflow: hidden; }
.ranglisten h2 { padding: 0.75rem 1rem 0; }
.rangliste-karte { padding: 0; overflow: hidden; }

/* Suche in der Rangliste: Lupe rechts im Kartentitel, Suchzeile darunter */
.karten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 1rem; }
.karten-kopf h2 { margin: 0; padding: 0 !important; }
.such-lupe, .such-schliessen { min-width: 44px; min-height: 44px; font-size: 1.1rem; }
.such-lupe[aria-expanded="true"] { background: var(--rot-hell); border-radius: 8px; }
.such-zeile { display: flex; align-items: center; gap: 0.25rem; padding: 0 0.5rem 0.5rem 1rem; }
.such-zeile input { flex: 1; }
.such-zeile input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* eigenes ✕ reicht */
tr.such-leer td { font-style: italic; }


/* ===== 5) Knöpfe und Formulare ===== */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--knopf-hoehe);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 2px solid var(--rot);
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}
.knopf-haupt { background: var(--rot); color: white; }
.knopf-zweit { background: white; color: var(--rot); }
.knopf-gefahr { background: white; color: var(--rot-dunkel); border-color: var(--rot-dunkel); }
.knopf-breit { width: 100%; }
.knopf:disabled { opacity: 0.55; cursor: not-allowed; }

.knopf-link {
  background: none;
  border: none;
  color: var(--rot);
  font: inherit;
  font-weight: bold;
  padding: 0.5rem 0;
  min-height: var(--knopf-hoehe);
  cursor: pointer;
}

.knopf-icon {
  min-width: var(--knopf-hoehe);
  min-height: var(--knopf-hoehe);
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 8px;
  color: inherit;
}

label { display: block; margin: 0.75rem 0 0.25rem; font-weight: bold; }

/* 16px Schrift: sonst zoomt das iPhone beim Antippen hinein */
input[type="text"], input[type="search"], input[type="password"], input[type="email"], select {
  width: 100%;
  min-height: var(--knopf-hoehe);
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #999;
  border-radius: 8px;
  font-family: inherit;
  background: white;
}

/* Großes Punktefeld */
.punktefeld {
  font-size: 2.2rem !important;
  text-align: center;
  font-weight: bold;
  min-height: 72px !important;
  letter-spacing: 0.05em;
}

.auswahl-paar { display: flex; gap: 0.5rem; }
.auswahl-paar label {
  flex: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--knopf-hoehe);
  border: 2px solid var(--linie);
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.auswahl-paar input { width: 1.2rem; height: 1.2rem; accent-color: var(--rot); }
.auswahl-paar label:has(input:checked) { border-color: var(--rot); background: var(--rot-hell); }

.vorschlaege {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: white;
  max-height: 50vh;
  overflow-y: auto;
}
.vorschlag {
  width: 100%;
  min-height: var(--knopf-hoehe);
  text-align: left;
  border: none;
  border-bottom: 1px solid #eee;
  background: white;
  font: inherit;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.knopf-reihe { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.knopf-reihe .knopf { flex: 1; }


/* ===== 6) Login ===== */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--rot);
}
.login-karte {
  background: white;
  border-radius: 14px;
  padding: 1.5rem;
  width: 100%;
  max-width: 440px;
}
.login-karte h1 { margin: 0 0 0.5rem; text-align: center; color: var(--rot); }
.login-karte .knopf { width: 100%; margin-top: 1rem; }
.login .zurueck { margin-top: 1rem; }
.login .zurueck a { color: white; }
#code { font-size: 1.6rem; text-align: center; letter-spacing: 0.3em; }


/* ===== 7) Admin: obere Leiste und Menü ===== */
.leiste {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--rot);
  color: white;
  padding: 0.25rem 0.5rem;
  min-height: 56px;
}
.leiste h1 { margin: 0; font-size: 1.2rem; }
.leiste .knopf-icon { color: white; font-size: 1.6rem; }

.menue-hintergrund {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 30;
}
.menue {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(300px, 85vw);
  background: white;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
  visibility: hidden;
}
.menue.offen { transform: translateX(0); visibility: visible; }
.menue-wer {
  margin: 0;
  padding: 1.25rem 1rem;
  background: var(--rot);
  color: white;
}
.menue-punkt {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 1rem;
  border: none;
  border-bottom: 1px solid #eee;
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.menue-punkt[aria-current="page"] { color: var(--rot); background: var(--rot-hell); }
.menue-unten { margin-top: auto; border-top: 1px solid var(--linie); }


/* ===== 8) Tagesliste und Spieler-Seite ===== */
.spalten { display: block; }

/* Am Handy: entweder Tagesliste ODER Spieler-Seite */
body:not(.zeigt-spieler) #ansicht-spieler { display: none; }
body.zeigt-spieler #ansicht-tagesliste { display: none; }

.sieger-karte { display: flex; flex-direction: column; gap: 0.2rem; background: var(--gold); border-color: #e9d27a; }
.sieger-karte strong { font-size: 1.15rem; }

.tl-kopf, .tl-zeile {
  display: grid;
  grid-template-columns: 1fr 4.5rem 4.5rem;
  gap: 0.5rem;
  align-items: center;
}
.tl-kopf {
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: white;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tagesliste { list-style: none; margin: 0 0 5rem; padding: 0; background: white; border: 1px solid var(--linie); border-top: none; }
.tl-zeile {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem 0.75rem;
  border: none;
  border-bottom: 1px solid #eee;
  background: white;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.tl-zeile.gewaehlt { background: var(--rot-hell); box-shadow: inset 4px 0 0 var(--rot); }
.tl-name strong { display: block; font-size: 1.05rem; }
.tl-zeile .zahl { font-size: 1.15rem; font-weight: bold; }

/* Bezahlstatus */
.status { display: inline-block; font-size: 0.85rem; font-weight: bold; margin-top: 0.15rem; }
.status-bezahlt { color: var(--gruen-text); }
.status-offen   { color: var(--orange-text); }
.status-voraus  { color: var(--blau-text); }
.status-leer    { color: var(--text-leise); }

.knopf-rund {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--rot);
  color: white;
  font-size: 2.2rem;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 10;
}

.hinweis-box {
  background: var(--blau-hell);
  border: 1px solid var(--blau);
  color: var(--blau-text);
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: bold;
}

.platzhalter { color: var(--text-leise); text-align: center; padding: 3rem 1rem; }

.sp-name { display: flex; align-items: center; gap: 0.25rem; font-size: 1.5rem; margin: 0.25rem 0; }
.sp-name .knopf-icon { color: var(--rot); font-size: 1.3rem; }

.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.75rem 0; }
.kachel {
  background: white;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.kachel .klein { display: block; }
.kachel strong { display: block; font-size: 1.6rem; margin-top: 0.2rem; }
.kachel .unter { display: block; font-size: 0.8rem; font-weight: bold; margin-top: 0.15rem; }
.kachel.status-offen  { background: var(--orange-hell); }
.kachel.status-voraus { background: var(--blau-hell); }
.kachel.status-bezahlt { background: var(--gruen-hell); }

.sp-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sp-knoepfe .knopf { min-height: 56px; font-size: 1.1rem; }

.spielliste { list-style: none; margin: 0; padding: 0; background: white; border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.spiel-zeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0.5rem 1rem;
  border: none;
  border-bottom: 1px solid #eee;
  background: white;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.spiel-zeile strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

.liste-einfach { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.liste-einfach li { padding: 0.5rem 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }


/* ===== 9) Fenster (Dialoge) – am Handy von unten ===== */
dialog.fenster {
  border: none;
  padding: 0;
  width: 100%;
  max-width: 100%;
  max-height: 92vh;
  margin: auto 0 0 0;               /* unten am Bildschirm */
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}
dialog.fenster::backdrop { background: rgba(0, 0, 0, 0.45); }
.fenster-inhalt { padding: 1.25rem; }
.fenster-inhalt h2 { margin-top: 0; }
.fenster .meldung { margin-top: 0.75rem; }

.zaehler { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.zaehler button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--rot);
  background: white;
  color: var(--rot);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}
.zaehler output { font-size: 2.5rem; font-weight: bold; min-width: 4ch; text-align: center; font-variant-numeric: tabular-nums; }
.betrag-live { text-align: center; font-size: 1.3rem; font-weight: bold; margin: 0; }


/* ===== 10) Rückgängig-Leiste ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #222;
  color: white;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  font-weight: bold;
  max-width: calc(100% - 2rem);
}
.toast .knopf-link { color: #ffb3bf; padding: 0 0.75rem; }


/* ===== 11) Tag abschließen ===== */
.kasse-soll { text-align: center; margin: 1rem 0; }
.kasse-soll strong { display: block; font-size: 2.6rem; color: var(--rot); }
.diff { text-align: center; font-weight: bold; font-size: 1.2rem; padding: 0.75rem; border-radius: 8px; margin: 0.75rem 0; }
.diff:empty { display: none; }
.diff-spende { color: var(--blau-text); background: var(--blau-hell); }
.diff-fehl   { color: var(--rot-dunkel); background: #fde8eb; }
.diff-genau  { color: var(--gruen-text); background: var(--gruen-hell); }
.offen-box { background: var(--orange-hell); border: 1px solid #e8a35c; border-radius: 8px; padding: 0.75rem 1rem; margin: 1rem 0; }
.offen-box h3 { margin-top: 0; color: var(--orange-text); }
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.kennzahl { background: white; border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.75rem 0.5rem; text-align: center; font: inherit; color: inherit; }
.kennzahl strong { display: block; font-size: 1.4rem; margin-top: 0.2rem; }
button.kennzahl { cursor: pointer; border-color: var(--rot); }
button.kennzahl .klein::after { content: " ›"; }


/* ===== 12) Statistik ===== */
.geld { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.donut-huelle { width: 180px; flex: none; margin: 0 auto; }
.donut { width: 100%; height: auto; display: block; }
.donut-teil { cursor: help; }
.donut-klein { font-size: 7px; fill: var(--text-leise); }
.donut-gross { font-size: 13px; font-weight: bold; fill: var(--text); }
.legende { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 200px; }
.legende li { display: grid; grid-template-columns: 14px 1fr auto 3.5rem; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid #eee; }
.legende-punkt { width: 14px; height: 14px; border-radius: 4px; }
.legende-wert, .legende-prozent { text-align: right; font-variant-numeric: tabular-nums; }
.legende-prozent { color: var(--text-leise); }
.fehlbetrag-zeile { color: var(--rot-dunkel); font-weight: bold; margin: 0.75rem 0 0; }

/* Statistik eines Tages */
.kassen-zeile { margin: 0.75rem 0 0; font-weight: bold; }
.kassen-zeile .spende { color: #1f5fae; }
.kassen-zeile .fehl { color: var(--rot-dunkel); }
.schreiber-zeit { color: var(--text-leise); font-variant-numeric: tabular-nums; }
.schreiber-zeit.laeuft { color: #1d7a3a; font-weight: bold; }

/* Tabellenzeilen zum Antippen (Beste Tage) */
.tabelle-antippbar tbody tr { cursor: pointer; }
.tabelle-antippbar tbody tr:focus-visible { outline: 3px solid var(--rot); outline-offset: -3px; }
.tabelle-antippbar td.tag { color: var(--rot); font-weight: bold; text-decoration: underline; text-underline-offset: 3px; }

/* Chef: anderen Tag wählen */
.tag-wahl { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: white; border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.25rem; margin-bottom: 0.75rem; }
.tag-wahl strong { flex: 1; text-align: center; font-size: 1.05rem; }
.tag-wahl .knopf-icon { min-width: 48px; min-height: 44px; font-size: 1.1rem; color: var(--rot); }
.tag-wahl .knopf-icon:disabled { color: #bbb; cursor: default; }
.nicht-heute { background: #f28c00; color: #1a1a1a; font-weight: bold; border-radius: var(--radius);
  padding: 0.6rem 0.9rem; margin-bottom: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  justify-content: space-between; align-items: center; }
.nicht-heute .knopf-link { color: #1a1a1a; text-decoration: underline; }
#tag-zu p { margin: 0; }
.kasse-veraltet { margin-top: 0.5rem !important; font-weight: bold; color: var(--rot-dunkel); }
#knopf-kasse-neu { margin-top: 0.75rem; width: 100%; }

/* ===== Gruppen ===== */
.gruppen-liste { list-style: none; margin: 0 0 1rem; padding: 0; background: white;
  border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.gruppen-liste > li + li { border-top: 1px solid #eee; }
.gruppe-zeile { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem; min-height: 56px; background: none; border: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; }
.gruppe-name { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.gruppe-name strong { overflow-wrap: anywhere; }
.abzeichen { display: inline-block; font-size: 0.75rem; font-weight: bold; padding: 0.1rem 0.5rem;
  border-radius: 999px; vertical-align: middle; }
.abzeichen-dauerhaft { background: #e3eefb; color: #1f5fae; }
.abzeichen-heute { background: #fff1d6; color: #8a5300; }
.gruppe-neu-knopf { width: 100%; }
/* Gruppen nicht über die volle PC-Breite ziehen */
#gruppe-ansicht, #ansicht-gruppe { max-width: 760px; margin-left: auto; margin-right: auto; }
.gruppe-titel { margin: 0.75rem 0 0.25rem; overflow-wrap: anywhere; }
tr.ohne-spiel td { color: var(--text-leise); }
td.hinweis-zelle { font-style: italic; text-align: right; }
.gruppe-knoepfe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.gruppe-knoepfe .knopf { flex: 1 1 12rem; }

/* Häkchen-Liste (Spieler auswählen) */
.auswahl-liste { list-style: none; margin: 0.25rem 0 0.5rem; padding: 0; max-height: 40vh; overflow-y: auto;
  border: 1px solid var(--linie); border-radius: var(--radius); background: white; }
.auswahl-liste > li + li { border-top: 1px solid #eee; }
.auswahl-zeile { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.8rem; min-height: 48px;
  cursor: pointer; margin: 0; font-weight: normal; }
.auswahl-zeile input { width: 1.3rem; height: 1.3rem; margin: 0; flex: none; accent-color: var(--rot); }
.haekchen { display: flex; align-items: center; gap: 0.6rem; margin: 0.75rem 0; font-weight: bold; }
.haekchen input { width: 1.3rem; height: 1.3rem; accent-color: var(--rot); }

/* Mitglieder ändern */
.mitglieder-liste { list-style: none; margin: 0.5rem 0 1rem; padding: 0; }
.mitglieder-liste li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0; border-bottom: 1px solid #eee; }
.mitglieder-liste .knopf-icon { min-width: 44px; min-height: 44px; color: var(--rot-dunkel); }

/* Umschalter: am Handy "Gesamt | Frauen | Gruppen" */
.umschalter .text-breit { display: none; }

/* Einladung 2. Schreiber (QR-Code) */
.qr-huelle { background: white; padding: 12px; border: 1px solid var(--linie); border-radius: var(--radius);
  width: min(320px, 100%); margin: 0.75rem auto; box-sizing: border-box; }
.qr-huelle svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; image-rendering: pixelated; }
.qr-huelle.abgelaufen { opacity: 0.15; }
.ei-link { font-size: 0.8rem; color: var(--text-leise); overflow-wrap: anywhere; text-align: center; margin: 0.25rem 0; user-select: all; }
.ei-countdown { text-align: center; font-weight: bold; font-variant-numeric: tabular-nums; margin: 0.25rem 0 0; }
.besetzt-einladung { font-weight: bold; }
#menue-zweiter { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* eigene Zeile im Menü */
#menue-zweiter[hidden] { display: none; }
.besetzt-einladung:empty { display: none; }

/* Login: Platz besetzt */
#besetzt h2 { margin-top: 0.5rem; }
.besetzt-text { font-size: 1.1rem; line-height: 1.45; }
#besetzt .knopf { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }

.offen-eintrag { padding: 0.75rem 0; border-bottom: 1px solid #eee; }
.offen-eintrag .oben { display: flex; justify-content: space-between; font-weight: bold; }
.offen-summe { font-size: 2rem; font-weight: bold; color: var(--orange-text); margin: 0.25rem 0 0; }


/* =====================================================
   TABLET und größer (ab 700 px): alles größer, fingerfreundlich
   ===================================================== */
@media (min-width: 700px) {
  html { font-size: 18px; }
  :root { --knopf-hoehe: 52px; }
  .punktefeld { font-size: 3rem !important; min-height: 96px !important; }
  .kopf h1 { font-size: 2.2rem; }
  .seite { padding: 1rem 1.5rem; }
  .tl-kopf, .tl-zeile { grid-template-columns: 1fr 6rem 6rem; }
  .tl-zeile { min-height: 68px; }
  .donut-huelle { width: 220px; }
}

/* =====================================================
   TABLET QUER und PC (ab 900 px, Querformat): zwei Spalten
   ===================================================== */
@media (min-width: 900px) and (orientation: landscape) {
  .inhalt { padding: 1rem 1.5rem; }

  /* Tagesliste links, Spieler rechts – kein Seitenwechsel */
  .spalten {
    display: grid;
    grid-template-columns: minmax(360px, 5fr) 6fr;
    gap: 1.5rem;
    align-items: start;
  }
  /* gleiche Stärke wie die Handy-Regeln oben, steht später -> gewinnt */
  body:not(.zeigt-spieler) #ansicht-spieler,
  body.zeigt-spieler #ansicht-tagesliste { display: block; }
  #ansicht-spieler {
    position: sticky;
    top: 72px;
    background: white;
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 1rem 1.25rem 1.25rem;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .nur-schmal { display: none !important; }
  .tagesliste { margin-bottom: 1rem; }

  /* Fenster mittig statt von unten */
  dialog.fenster {
    width: min(540px, calc(100% - 2rem));
    margin: auto;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  }

  /* Ranglisten und Statistik nebeneinander */
  .ranglisten { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
  .ranglisten .rl-gesamt, .ranglisten .rl-frauen { display: block !important; }
  /* Breit stehen Gesamt und Frauen nebeneinander: "Gesamt + Frauen | Gruppen" */
  .ranglisten-umschalter .knopf-schmal { display: none; }
  .ranglisten-umschalter .text-schmal { display: none; }
  .ranglisten-umschalter .text-breit { display: inline; }
  .ranglisten-umschalter[data-gewaehlt="frauen"] button[data-zeige="gesamt"] {
    background: white; color: var(--rot); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
  .statistik-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
  .heute-raster { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; align-items: start; }
}

/* =====================================================
   Maus vorhanden (PC): Hover-Effekte
   ===================================================== */
@media (hover: hover) {
  .tabelle-antippbar tbody tr:hover { background: var(--rot-hell); }
  .gruppe-zeile:hover, .auswahl-zeile:hover { background: #f3f3f3; }
  .knopf-haupt:hover:not(:disabled) { background: var(--rot-dunkel); border-color: var(--rot-dunkel); }
  .knopf-zweit:hover:not(:disabled), .knopf-gefahr:hover:not(:disabled) { background: var(--rot-hell); }
  .knopf-link:hover { text-decoration: underline; }
  .knopf-icon:hover { background: rgba(0, 0, 0, 0.08); }
  .leiste .knopf-icon:hover { background: rgba(255, 255, 255, 0.15); }
  .tl-zeile:hover, .spiel-zeile:hover, .vorschlag:hover, .menue-punkt:hover { background: #f3f3f3; }
  .tl-zeile.gewaehlt:hover { background: var(--rot-hell); }
  .reiter button:hover { opacity: 1; }
  .knopf-rund:hover { background: var(--rot-dunkel); }
  .zaehler button:hover { background: var(--rot-hell); }
  button.kennzahl:hover { background: var(--rot-hell); }
  .auswahl-paar label:hover { border-color: var(--rot); }
}

/* Weniger Bewegung, wenn im System so eingestellt */
@media (prefers-reduced-motion: reduce) {
  .menue { transition: none; }
}

/* Versteckter Zugang für Schreiber: die Dartscheibe im Titel */
.dartscheibe { color: inherit; text-decoration: none; cursor: default; -webkit-tap-highlight-color: transparent; }
