/* ---------- Farben: dunkel (Standard) ---------- */
:root {
  --bg: #111113;
  --surface: #1b1b1f;
  --surface-2: #24242a;
  --surface-hover: #202026;
  --line: #34343c;
  --line-strong: #55555f;
  --text: #f3f3f5;
  --muted: #9a9aa6;
  --accent: #ffb703;
  --accent-ink: #1a1300;
  --ok: #30a46c;
  --ok-bg: rgba(48, 164, 108, .16);
  --bad: #e5484d;
  --bad-bg: rgba(229, 72, 77, .16);
  --neutral-bg: rgba(255, 255, 255, .06);
  --tabs-bg: rgba(17, 17, 19, .92);
  --saison-bg: rgba(255, 183, 3, .15);
  --saison-fg: #ffb703;
  --violet-bg: rgba(120, 140, 255, .16);
  --violet-fg: #aab4ff;
  --sky-bg: rgba(80, 160, 255, .16);
  --sky-fg: #8cc4ff;
  --award-g: #2f9e5b;
  --award-g-row: rgba(48, 164, 108, .34);
  --award-h: #9be3b4;
  --award-h-row: rgba(48, 164, 108, .13);
  --award-h-tag-bg: rgba(155, 227, 180, .2);
  --award-h-tag-fg: #9be3b4;
  --past-bg: #2c2c32;
  --past-date-bg: #3a3a42;
  --probe-fg: #7ea2ff;
  --auftritt-fg: #8fdcff;
  --backdrop: rgba(0, 0, 0, .6);
  --radius: 12px;
  color-scheme: dark;
}

/* ---------- Farben: hell ---------- */
:root[data-theme="light"] {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #efeff3;
  --surface-hover: #f7f7fa;
  --line: #dcdce3;
  --line-strong: #b9b9c4;
  --text: #18181b;
  --muted: #62626e;
  --accent: #f0a500;
  --accent-ink: #1a1300;
  --ok: #1f8a52;
  --ok-bg: rgba(31, 138, 82, .12);
  --bad: #c62f35;
  --bad-bg: rgba(198, 47, 53, .10);
  --neutral-bg: rgba(0, 0, 0, .05);
  --tabs-bg: rgba(244, 244, 246, .92);
  --saison-bg: rgba(240, 165, 0, .16);
  --saison-fg: #8a5a00;
  --violet-bg: rgba(57, 73, 171, .10);
  --violet-fg: #3949ab;
  --sky-bg: rgba(11, 98, 181, .10);
  --sky-fg: #0b62b5;
  --award-g: #2f9e5b;
  --award-g-row: rgba(47, 158, 91, .28);
  --award-h: #8fd3a6;
  --award-h-row: rgba(47, 158, 91, .10);
  --award-h-tag-bg: rgba(47, 158, 91, .14);
  --award-h-tag-fg: #1f6b3d;
  --past-bg: #e3e3e8;
  --past-date-bg: #d3d3da;
  --probe-fg: #1a3f8f;
  --auftritt-fg: #1e9be9;
  --backdrop: rgba(0, 0, 0, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #f4f4f6;
    --surface: #ffffff;
    --surface-2: #efeff3;
    --surface-hover: #f7f7fa;
    --line: #dcdce3;
    --line-strong: #b9b9c4;
    --text: #18181b;
    --muted: #62626e;
    --accent: #f0a500;
    --accent-ink: #1a1300;
    --ok: #1f8a52;
    --ok-bg: rgba(31, 138, 82, .12);
    --bad: #c62f35;
    --bad-bg: rgba(198, 47, 53, .10);
    --neutral-bg: rgba(0, 0, 0, .05);
    --tabs-bg: rgba(244, 244, 246, .92);
    --saison-bg: rgba(240, 165, 0, .16);
    --saison-fg: #8a5a00;
    --violet-bg: rgba(57, 73, 171, .10);
    --violet-fg: #3949ab;
    --sky-bg: rgba(11, 98, 181, .10);
    --sky-fg: #0b62b5;
    --award-g: #2f9e5b;
    --award-g-row: rgba(47, 158, 91, .28);
    --award-h: #8fd3a6;
    --award-h-row: rgba(47, 158, 91, .10);
    --award-h-tag-bg: rgba(47, 158, 91, .14);
    --award-h-tag-fg: #1f6b3d;
    --past-bg: #e3e3e8;
    --past-date-bg: #d3d3da;
    --probe-fg: #1a3f8f;
    --auftritt-fg: #1e9be9;
    --backdrop: rgba(0, 0, 0, .35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* kein Doppeltipp-Zoom; Schrift skaliert mit der Einstellung "Schriftgrösse" (html font-size) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: .9375rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; color: var(--muted); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0; }
.error { color: var(--bad); font-weight: 600; }
.count { display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .8rem; text-align: center; vertical-align: middle; }

/* ---------- Kopfzeile ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 16px 10px; max-width: 1100px; margin: 0 auto; }
.brand-logo { width: 64px; height: 64px; object-fit: contain; flex: none; }
.brand-text { flex: 1; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: .01em; }
.brand-sub { color: var(--muted); font-size: .9rem; }
.sync { flex: none; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sync.saving::before { background: var(--accent); }
.sync.error { color: var(--bad); }
.sync.error::before { background: var(--bad); }
.sync[hidden] { display: none; }

.tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px; overflow-x: auto;
  padding: 8px 16px; background: var(--tabs-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs[hidden] { display: none; }
.tabs button { flex: none; border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 99px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button:hover { color: var(--text); background: var(--surface); }
.tabs button.active { background: var(--accent); color: var(--accent-ink); }
@media (min-width: 1132px) { .tabs { padding-left: calc((100vw - 1100px) / 2 + 16px); } }

main { max-width: 1100px; margin: 0 auto; padding: 8px 16px 80px; }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--line-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.big { padding: 12px 18px; font-size: 1rem; }

input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: .95rem; }
textarea { width: 100%; min-height: 180px; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--neutral-bg); color: var(--muted); }
.badge.zaehlt { background: var(--ok-bg); color: var(--ok); }
.badge.zaehlt-nicht { background: var(--saison-bg); color: var(--saison-fg); }
.badge.art { background: var(--violet-bg); color: var(--violet-fg); }
.badge.auftritt { background: var(--sky-bg); color: var(--sky-fg); }

/* ---------- Terminliste ---------- */
.cards { display: grid; gap: 8px; }
.probe-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; color: inherit; font: inherit; cursor: pointer;
}
/* Hover nur mit Maus – auf dem Handy bleibt die Markierung sonst nach dem Antippen "hängen" */
@media (hover: hover) {
  .probe-card:hover { border-color: var(--line-strong); background: var(--surface-hover); }
  .probe-card.past:hover { background: var(--past-bg); border-color: var(--line-strong); }
}
.probe-card:active { border-color: var(--line-strong); }
/* vergangene Termine grau hinterlegt */
.probe-card.past { background: var(--past-bg); }
.probe-card.past .pc-date { background: var(--past-date-bg); }
.probe-card.past .pc-info { color: var(--muted); }
/* Terminart: Proben dunkelblau, Auftritte hellblau (fett) */
.titel-probe { color: var(--probe-fg); font-weight: 700; }
.titel-auftritt { color: var(--auftritt-fg); font-weight: 700; }
.pc-date { flex: none; width: 52px; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.pc-date span { display: block; }
.pc-day, .pc-mon { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.pc-num { font-size: 1.35rem; font-weight: 800; }
.pc-body { flex: 1; min-width: 0; }
.pc-title { font-weight: 700; }
.pc-meta { color: var(--muted); font-size: .88rem; }
.pc-info { font-size: .9rem; font-weight: 600; margin-top: 2px; }
.pc-stat { flex: none; text-align: right; font-size: .95rem; }
.pc-stat b { font-size: 1.2rem; }

/* ---------- Anwesenheit erfassen ---------- */
.summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.sum { padding: 4px 10px; border-radius: 99px; font-weight: 700; font-size: .85rem; }
.st-a.sum { background: var(--ok-bg); color: var(--ok); }
.st-u.sum { background: var(--bad-bg); color: var(--bad); }
.st-b.sum, .st-o.sum { background: var(--neutral-bg); color: var(--muted); }

.checkin-list { display: grid; gap: 6px; }
.checkin-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px;
}
.checkin-row.has-a { border-left-color: var(--ok); }
.checkin-row.has-u { border-left-color: var(--bad); }
.checkin-row.has-b { border-left-color: var(--line-strong); opacity: .7; }
.ci-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: flex; gap: 4px; flex: none; }
.seg-btn { width: 48px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on.st-a { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg-btn.on.st-u { background: var(--bad); border-color: var(--bad); color: #fff; }
.seg-btn.on.st-b { background: var(--line-strong); border-color: var(--line-strong); color: #fff; }

/* ---------- Statistik ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 10px 0; }
.pick-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.probe-pick { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pick-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-2); }
/* "Proben: 11 von 21 [▼] [Alle] [Keine]" – Pfeil-Knopf klappt die Liste auf (▼) bzw. zu (▲) */
.pick-title-head { flex: 1; white-space: nowrap; font-size: .92rem; }
.pick-head { gap: 6px; padding: 8px 10px; }
/* Pfeil, Alle und Keine: drei gleich grosse, kompakte Kästchen */
.pick-head .btn.small { justify-content: center; min-width: 40px; height: 28px; padding: 2px 6px; font-size: .8rem; }
/* kleine Überschrift über dem Umschalter (wie "Saison") */
.typ-wahl { margin: 10px 0; }
.field-label { font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
/* Jahresstatistik: Farbwahl + Anzahl Fehl nebeneinander */
.farb-stufe { display: flex; gap: 8px; align-items: center; }
.farb-stufe input[type=color] { width: 44px; height: 38px; padding: 3px; cursor: pointer; flex: none; }
.pick-toggle svg { transition: transform .15s; }
.pick-toggle.open svg { transform: rotate(180deg); }
/* Zeitraum: Saison über die ganze Breite, darunter Von und Bis gleich breit nebeneinander */
/* (gleiche Breite wie der Umschalter Proben/Auftritte; minmax(0,…) + appearance verhindern, dass die Datumsfelder überlappen) */
.zeitraum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; width: 100%; max-width: 420px; margin: 10px 0; }
.zeitraum label { min-width: 0; }
.zeitraum .zr-saison { grid-column: 1 / -1; }
/* Einstellungen: Saisonname nur zur Anzeige (ergibt sich aus Von/Bis) */
.zeitraum input.readonly { background: var(--surface-2); font-weight: 700; pointer-events: none; }
.zeitraum select, .zeitraum input { display: block; width: 100%; min-width: 0; max-width: 100%; }
.zeitraum input[type=date] { -webkit-appearance: none; appearance: none; min-height: 38px; text-align: left; }
.pick-list { max-height: 320px; overflow-y: auto; }
.pick {
  display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; row-gap: 1px; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--line); color: var(--text); font-size: .9rem; cursor: pointer;
}
.pick:hover { background: var(--surface-2); }
/* untereinander neben dem Häkchen: Probenart/Bezeichnung (fett) · Datum · Info */
.pick > span { grid-column: 2; }
.pick .pick-title { font-weight: 600; }
.pick .reg { color: var(--muted); font-size: .8rem; }
.pick.future { opacity: .6; }
.pick.off { color: var(--muted); }

.rules { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.threshold input { width: 90px; font-size: 1.1rem; font-weight: 700; text-align: center; }
/* Excel- und PDF-Knopf bleiben immer zusammen auf einer Zeile */
/* Raster für gleich grosse Kästchen (Statistik: 40 % · Excel · PDF; Jahresstatistik: Excel · PDF und
   darüber in "2." die Farben). --cols = Anzahl Spalten; darunter zentrierte Notizen (Legende). */
.result-actions { display: grid; grid-template-columns: repeat(var(--cols, 2), 110px); gap: 8px; flex: none; }
.result-actions > .btn { width: 100%; height: 42px; justify-content: center; padding: 6px 8px; }
.rt-note { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.rt-note.rt-wide { grid-column: 1 / -1; gap: 4px 14px; }
.rt-note i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.rt-note .bad { color: var(--bad); }
.farb-grid { margin-top: 4px; }
.farb-grid .field-label { margin-bottom: -4px; }
.farb-box { padding: 4px; cursor: pointer; }
.thr-box.fehl-box { gap: 3px; }
.thr-box.fehl-box input { width: 1.7em; }
/* Mindestanwesenheit als Kästchen wie die Knöpfe: "40 %" */
.thr-box { flex-direction: row; gap: 2px; font-size: inherit; color: var(--text); cursor: text; }
.thr-box input { width: 2.4em; padding: 0; border: 0; background: transparent; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.thr-box input::-webkit-outer-spin-button, .thr-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.thr-box input:focus { outline: 0; }
.thr-box:focus-within { outline: 2px solid var(--accent); }
.result-head .legend { margin-top: 0; }
.result-sort { margin-top: 12px; }
.pick-label { margin-top: 10px; }
.pick-label + .pick-cols { margin-top: 0; }
.small-input input { width: 80px; }
.result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.result-head h2 { margin: 0; flex: 1; }
.kpi { font-weight: 700; }
.kpi .bad { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: .88rem; color: var(--muted); margin-top: 10px; }
.legend i, .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: center; }
.sub { font-size: .75rem; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
tr.below td { background: var(--bad-bg); }
tr.below td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
tr.none td { color: var(--muted); }
tr.award-g td { background: var(--award-g-row); }
tr.award-h td { background: var(--award-h-row); }
tr.award-g td:first-child { box-shadow: inset 4px 0 0 var(--award-g); }
tr.award-h td:first-child { box-shadow: inset 4px 0 0 var(--award-h); }
.pct { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar { flex: 1; height: 6px; background: var(--surface-2); border-radius: 99px; position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--ok); border-radius: 99px; }
tr.below .bar i { background: var(--bad); }
.pct b { width: 3.2em; text-align: right; }
.pct b.pct-ok { color: var(--ok); }
.pct b.pct-bad { color: var(--bad); }
/* Statistik 3. Resultat: fette, etwas grössere Überschriften. Der Name steht immer auf einer Zeile und ist
   genau so breit wie nötig; den restlichen Platz teilen sich die 4 Zahlenspalten gleichmässig (je 15 %, mittig). */
.stats-res th { font-weight: 700; color: var(--text); font-size: .95rem; letter-spacing: 0; }
.stats-res th.col-ok { color: var(--ok); }
.stats-res th.col-bad { color: var(--bad); }
.stats-res th, .stats-res td { text-align: center; }
.stats-res th:first-child, .stats-res td:first-child { text-align: left; white-space: nowrap; }
.stats-res th:not(:first-child) { width: 15%; }
.stats-res .pct { justify-content: center; min-width: 0; }
.stats-res .bar { max-width: 90px; }
/* Statistik: kurze Beschriftung nur auf schmalen Bildschirmen (siehe @media unten) */
.kurz { display: none; }
.tag { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.g { background: var(--award-g); color: #fff; }
.tag.h { background: var(--award-h-tag-bg); color: var(--award-h-tag-fg); }

/* ---------- Mitglieder / Einstellungen ---------- */
.member-row { cursor: pointer; }
.member-row:hover td { background: var(--surface-2); }
.member-row.inactive td { color: var(--muted); }
.edit-list { display: grid; gap: 8px; }
.edit-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.edit-row input[type=text] { flex: 1; min-width: 140px; }
.logo-preview { width: 96px; height: 96px; object-fit: contain; background: var(--bg); border-radius: 10px; border: 1px solid var(--line); padding: 6px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented button { border: 0; background: var(--surface-2); color: var(--text); padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button.on { background: var(--accent); color: var(--accent-ink); }
.segmented { max-width: 100%; }
.segmented button { min-width: 0; }
/* Auswahl Proben / Auftritte / Beides: ganze Breite, gleich breite Knöpfe */
.segmented.full { display: flex; width: 100%; max-width: 420px; }
.segmented.full button { flex: 1 1 0; }

/* Termine: Knopf + Filter */
.termine-bar { justify-content: space-between; }
.list-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.welcome { text-align: center; padding: 32px 16px; }
.welcome img { width: 160px; max-width: 50%; }
.welcome .toolbar { justify-content: center; }

/* ---------- Login ---------- */
.login { max-width: 380px; margin: 24px auto; text-align: center; }
.login img { width: 140px; max-width: 45%; }
.login form { display: grid; gap: 12px; text-align: left; margin-top: 16px; }
.login .btn { justify-content: center; }

/* ---------- Dialog ---------- */
dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 0; }
dialog::backdrop { background: var(--backdrop); }
dialog form { padding: 20px; display: grid; gap: 12px; }
dialog h2 { margin: 0 0 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
legend { color: var(--muted); font-size: .88rem; padding: 0 6px; }
.reg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.reg-col { display: grid; gap: 6px; align-content: start; }
.reg-col b { font-size: .85rem; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.modal-actions .left { margin-right: auto; }
.choose-list { display: grid; gap: 8px; }
.choose-list .btn { justify-content: flex-start; width: 100%; gap: 8px; }
[data-nur-probe][hidden], [data-nur-auftritt][hidden] { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3); max-width: calc(100vw - 32px);
}

@media (max-width: 560px) {
  .brand-logo { width: 48px; height: 48px; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { display: none; }
  .seg-btn { width: 44px; }
  .checkin-row { padding-left: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  /* iPhone zoomt bei Eingabefeldern unter 16px automatisch hinein -> mindestens 16px */
  input, select, textarea { font-size: max(1rem, 16px); }
  .segmented button { padding: 8px 10px; }
  .pc-stat { font-size: .85rem; }
  /* Reiter etwas schmaler, damit mehr davon sichtbar ist; Scrollbalken ausblenden */
  .tabs { padding: 8px 12px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { padding: 8px 12px; }
  /* Termine: Knopf über die ganze Breite, Filter als Raster (2 + 1) */
  .termine-bar > .btn { width: 100%; justify-content: center; }
  .list-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .list-filter select { width: 100%; }
  .list-filter select:last-child { grid-column: 1 / -1; }
  /* Anwesenheit erfassen: "Zurück" oben, darunter 3 gleich breite Knöpfe */
  .checkin-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .checkin-bar > :first-child { grid-column: 1 / -1; justify-self: start; }
  .checkin-bar .spacer { display: none; }
  .checkin-bar .btn:not(:first-child) { justify-content: center; padding: 8px 4px; font-size: .875rem; min-width: 0; overflow: hidden; }
  .rest-bar { display: grid; grid-template-columns: 1fr; }
  .rest-bar .btn { justify-content: center; }
  /* Terminkarte: etwas kompakter */
  .probe-card { gap: 10px; padding: 10px 12px; }
  .pc-date { width: 46px; }
  /* Statistik-Resultat: passt ohne seitliches Scrollen aufs Handy */
  .stats-table th, .stats-table td { padding: 7px 4px; }
  .stats-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
  .stats-table .bar { display: none; }
  .stats-table .pct { min-width: 0; }
  .stats-table .pct b { width: auto; }
  .stats-table .tag { padding: 2px 6px; }
  .stats-table .lang { display: none; }
  .stats-table .kurz { display: inline; }
  .stats-res td:first-child { white-space: nowrap; overflow-wrap: normal; }
  /* Knopfzeile im Resultat: ganze Breite, Kästchen gleich breit */
  .result-actions { width: 100%; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
}

@media print {
  .tabs, .toolbar, .btn, .probe-pick, .filters, .sync { display: none !important; }
  body { background: #fff; color: #000; }
}
