/* Verwaltung – Alinas Bewegungsfreude
   Design nach der CI der Website: Asap (Überschriften), Quicksand (Text), Rosa #f6b7c9, Türkis #b2d6d9, Sand #f0d2a1,
   Text #252525, Verlauf 135° Rosa → Weiß → Türkis, runde Karten (25px), weicher Schatten.
   Hell und Dunkel über Tokens. Keine Inline-Styles (CSP). */
@font-face { font-family: "Asap"; src: url("fonts/Asap.ttf") format("truetype"); font-weight: 100 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("fonts/Quicksand.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #fffdfc;
  --surface: #ffffff;
  --surface-2: #f6f3f1;
  --ink: #353535;
  --head: #353535;
  --muted: #5d6470;
  --line: #ece4e2;
  --pink: #f6b7c9;
  --turq: #b2d6d9;
  --sand: #f0d2a1;
  --accent: #2a7f89;           /* Türkis, dunkel genug für Text und Fokus */
  --accent-ink: #1c5258;
  --pink-ink: #8a2f4b;
  --sand-ink: #6b4a10;
  --grad: linear-gradient(135deg, #f6b7c9, #ffffff, #b2d6d9);
  --grad-soft: linear-gradient(135deg, #fde6ed, #ffffff 55%, #e1f0f1);
  --ok-bg: #e0f0f1;  --ok-ink: #1c5258;
  --warn-bg: #fbeed3; --warn-ink: #6b4a10;
  --bad-bg: #fde3eb;  --bad-ink: #8a2f4b;
  --shadow: 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-s: 0 2px 8px rgba(0, 0, 0, .06);
  --radius: 24px;
  --radius-s: 24px;
  --glow-1: color-mix(in srgb, var(--turq) 35%, transparent);   /* Hintergrund-Schimmer aus den Layout-Farben */
  --glow-2: color-mix(in srgb, var(--pink) 28%, transparent);
  --btn-ink: #252525;                                          /* Schrift auf Verlaufs-Knöpfen */
  --on-accent: #ffffff;                                        /* Schrift auf Akzentfläche */
  --side-w: 264px;
  --f-head: "Asap", "Segoe UI", system-ui, sans-serif;
  --f-body: "Quicksand", "Segoe UI", system-ui, sans-serif;
}
/* Das CI ist hell (Weiß, Rosa, Türkis, Sandgold): kein Dunkelmodus. */
:root { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body > svg[aria-hidden="true"]:first-child { position: absolute; width: 0; height: 0; overflow: hidden; }   /* Icon-Sprite aus dem Textfluss: als Inline-Element erzeugte es oben eine leere Zeile (24,8 px Lücke über der Kopfzeile) */
body { margin: 0; background-color: var(--bg); background-image: radial-gradient(900px 500px at 100% 0, var(--glow-1), transparent 70%), radial-gradient(800px 500px at 0 100%, var(--glow-2), transparent 70%); background-attachment: fixed; color: var(--ink); font: 500 16px/1.55 var(--f-body); }
h1, h2, h3 { font-family: var(--f-head); color: var(--head); margin: 0; line-height: 1.2; font-weight: 600; text-wrap: balance; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted, small { color: var(--muted); }
strong { font-weight: 700; }

/* ---------- Icons ---------- */
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }

/* ---------- Gerüst ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.main-col { min-width: 0; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px; gap: 4px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; font: 700 1.125rem/1.2 var(--f-head); text-decoration: none; color: var(--head); }
.logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: var(--btn-ink); box-shadow: var(--shadow-s); flex: none; border: 1px solid var(--line); }
.nav-group { font: 700 .75rem var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 18px 14px 6px; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; transition: background .15s; }
.side a.nav:hover { background: var(--surface-2); }
.side a.nav[aria-current="page"] { background: var(--grad); box-shadow: var(--shadow-s); border: 1px solid var(--line); padding: 10px 13px; }
.side .grow { flex: 1; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); margin-top: 10px; font-size: .875rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font: 700 1rem var(--f-head); color: var(--btn-ink); border: 1px solid var(--line); }
.userbox a { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

.content { min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 100px; max-width: 1180px; width: 100%; margin-inline: auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-bottom: 24px; }
.ph-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); border: 1px solid var(--line); box-shadow: var(--shadow-s); color: var(--head); }
.ph-title { min-width: 0; flex: 1 1 220px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.sub { color: var(--muted); font-size: 1rem; margin-top: 2px; }

.topbar-m, .tabbar { display: none; }
@media (max-width: 900px) {
  .app { display: block; }
  .side { display: none; }
  .content { padding: 20px 16px 120px; }
  .topbar-m { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 12; }
  .topbar-m .brand { padding: 0; }
  .icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); background: var(--surface-2); text-decoration: none; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; background: color-mix(in srgb, var(--surface) 55%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 999px; padding: 6px; box-shadow: 0 10px 30px rgba(53, 53, 53, .12); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; font: 700 .75rem var(--f-head); text-decoration: none; color: var(--muted); border-radius: 999px; }
  .tabbar a .ico { width: 1.45em; height: 1.45em; }
  .tabbar a[aria-current="page"] { color: var(--accent); } .tabbar a[aria-current="page"] .ico { stroke-width: 2.8; }
}

/* ---------- Anmeldung ---------- */
body.auth { background: var(--bg) var(--grad-soft); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 440px); justify-content: center; align-content: center; gap: 22px; padding: 28px 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; font: 700 1.25rem var(--f-head); color: var(--head); }
.auth-card { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); position: relative; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card .sub { margin: 4px 0 8px; }
.auth-card .card { box-shadow: none; border: 0; padding: 0; margin: 14px 0 0; background: transparent; max-width: none; }

/* ---------- Karten, Kacheln ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 16px 0; box-shadow: var(--shadow); position: relative; }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; margin-bottom: 12px; }
.card h2 .ico { color: var(--accent); }
.card.narrow { max-width: 460px; }
h2.sec { font-size: 1.125rem; margin: 28px 0 12px; color: var(--head); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.grid2 .card { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.tile2 { min-width: 0; grid-template-rows: 52px auto auto; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ico title go" "big big big" "sub sub sub"; gap: 6px 12px; align-items: center; margin: 0; padding: 22px; text-decoration: none; color: var(--ink); min-height: 190px; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s; overflow: hidden; }
.tile2::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .9; z-index: 0; }
.tile2 > * { position: relative; z-index: 1; }
.tile2:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 14px 34px rgba(0, 0, 0, .1); }
.tile2 .t-ico { grid-area: ico; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); color: var(--accent-ink); }
.tile2.rosa .t-ico { color: var(--pink-ink); } .tile2.sand .t-ico { color: var(--sand-ink); }
.tile2 .t-title { grid-area: title; font: 700 1.125rem var(--f-head); color: var(--head); }
.tile2 .t-go { grid-area: go; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); transition: transform .2s; }
.tile2:hover .t-go { transform: translateX(4px); }
.tile2 .t-big { grid-area: big; font: 700 clamp(1.5rem, 2.4vw, 1.9rem) var(--f-head); color: var(--head); margin-top: 14px; }
.tile2 .t-sub { grid-area: sub; color: var(--muted); font-weight: 600; }
.foot-note { margin: 22px 2px 0; }

/* ---------- Chips, Hinweise ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font: 700 .875rem var(--f-body); white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.chip .ico { width: 1em; height: 1em; }
.chip:empty { display: none; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); } .chip.warn { background: var(--warn-bg); color: var(--warn-ink); } .chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.flash { display: flex; gap: 10px; align-items: flex-start; background: var(--ok-bg); color: var(--ok-ink); border-radius: var(--radius-s); padding: 13px 16px; margin: 0 0 16px; font-weight: 700; }
.flash.err { background: var(--bad-bg); color: var(--bad-ink); }
.hinweis { display: flex; gap: 8px; align-items: center; background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-s); padding: 10px 14px; font-weight: 700; margin: 10px 0; }
.hinweis[hidden] { display: none; }
.warn-card { border-color: var(--sand); }
ul.list { list-style: none; margin: 0; padding: 0; display: grid; }
ul.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.list li:last-child { border-bottom: 0; }
ul.list .when { margin-left: auto; color: var(--muted); font-weight: 600; }
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 8px 0; font-weight: 600; }
ul.plain { list-style: none; padding: 0; margin: 0; }

/* ---------- Tabellen ---------- */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
main table:not(.matrix):not(.sheet) { border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 700 .75rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tr[hidden] { display: none; }
.matrix th, .matrix td { padding: 9px 11px; white-space: nowrap; font-size: .875rem; }
td.z { text-align: center; }
.z.ok { background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; } .z.offen { background: var(--bad-bg); color: var(--bad-ink); font-weight: 700; }
.z.abw { background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; } .z.leer { background: transparent; }
span.z { padding: 3px 11px; border-radius: 999px; font-size: .875rem; }
.who { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
@media (max-width: 640px) { .hide-s { display: none; } main table:not(.matrix):not(.sheet) { display: block; overflow-x: auto; } }

/* ---------- Formulare, Buttons ---------- */
label { display: block; font: 700 .875rem var(--f-body); margin: 12px 0; color: var(--head); }
input, select, textarea { display: block; width: 100%; padding: 12px 20px; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 999px; font: 500 1rem var(--f-body); background: var(--surface); color: var(--ink); transition: border-color .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--turq); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.search-box input:focus-visible, .relay input:focus-visible, .relay select:focus-visible, .relay textarea:focus-visible { outline: none; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 18px; }
.row { align-items: end; }
.chk { display: flex; gap: 10px; align-items: center; } .chk input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.inline { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; } .inline label, .inline input { margin: 0; }
.num { width: 90px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--grad); color: var(--btn-ink); border: 1px solid color-mix(in srgb, var(--btn-ink) 10%, transparent); padding: 11px 22px; border-radius: 999px; font: 700 1rem var(--f-body); cursor: pointer; text-decoration: none; min-height: 46px; box-shadow: var(--shadow-s); transition: transform .15s cubic-bezier(.34, 1.56, .64, 1), box-shadow .15s; }
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
button:active, .btn:active { transform: translateY(0) scale(.98); }
button.alt, .btn.alt { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
button.alt:hover, .btn.alt:hover { border-color: var(--turq); }
.btn.sm, button.sm { min-height: 38px; padding: 6px 16px; font-size: .875rem; }
.wide { width: 100%; margin-top: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.push { margin-left: auto; }

/* Passwort anzeigen (Auge) */
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 3px; min-height: 40px; width: 40px; padding: 0; border-radius: 50%; background: transparent; border: 0; box-shadow: none; color: var(--muted); }
.pw-toggle:hover { transform: translateY(-50%); box-shadow: none; color: var(--ink); background: var(--surface-2); }
.pw-toggle .ico { position: absolute; transition: opacity .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pw-toggle .ico:nth-child(2) { opacity: 0; transform: scale(.6) rotate(-20deg); }
.pw-toggle[aria-pressed="true"] .ico:nth-child(1) { opacity: 0; transform: scale(.6) rotate(20deg); }
.pw-toggle[aria-pressed="true"] .ico:nth-child(2) { opacity: 1; transform: none; }

/* Fokus-Staffel: ein gemeinsamer Ring springt zwischen den Feldern */
.relay { position: relative; }
.focus-ring { position: absolute; left: 0; top: 0; width: 0; height: 0; border: 2px solid var(--accent); border-radius: 999px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--turq) 35%, transparent); pointer-events: none; opacity: 0; z-index: 2;
  transition: transform .48s cubic-bezier(.34, 1.56, .64, 1), width .48s cubic-bezier(.34, 1.56, .64, 1), height .48s cubic-bezier(.34, 1.56, .64, 1), opacity .2s; }
.focus-ring.on { opacity: 1; }
.relay input:focus, .relay select:focus, .relay textarea:focus { border-color: transparent; }

/* ---------- Suche mit Vorschlägen ---------- */
.gsearch { position: relative; flex: 0 1 380px; min-width: 240px; margin-left: auto; width: 100%; }
.gsearch.k { flex: 1 1 320px; margin-left: 0; }
@media (max-width: 640px) { .gsearch { flex-basis: 100%; margin-left: 0; } }
.search-box { position: relative; display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 6px 0 16px; box-shadow: var(--shadow-s); transition: border-color .15s; }
.search-box:focus-within { border-color: var(--accent); }
.search-box > .ico { color: var(--muted); }
.search-box input { border: 0; outline: 0; background: transparent; margin: 0; padding: 13px 10px; min-width: 0; flex: 1; -webkit-appearance: none; appearance: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.clear { background: var(--surface-2); color: var(--muted); border: 0; border-radius: 50%; min-height: 0; width: 34px; height: 34px; padding: 0; box-shadow: none; }
.clear[hidden] { display: none; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 40px rgba(10, 20, 30, .22); overflow: hidden auto; max-height: 70vh; }
.suggest[hidden] { display: none; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.on { background: var(--surface-2); }
.suggest-text { min-width: 0; flex: 1; } .suggest-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-empty { padding: 16px; color: var(--muted); font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
button.fchip { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; min-height: 38px; padding: 5px 16px; font-size: .875rem; }
button.fchip.on { background: var(--grad); border-color: color-mix(in srgb, var(--btn-ink) 12%, transparent); }

/* ---------- Anwesenheit ---------- */
.att-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); border: 1px solid var(--line); color: var(--head); font: 700 .875rem var(--f-head); flex: none; }
.att-av.sm { width: 34px; height: 34px; font-size: .75rem; } .att-av.lg { width: 60px; height: 60px; font-size: 1.125rem; }
.tabs { display: flex; gap: 6px; margin: 0 0 18px; border-bottom: 1.5px solid var(--line); }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; color: var(--muted); text-decoration: none; font: 700 1rem var(--f-body); border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tab:hover { color: var(--head); }
.tab.on { color: var(--accent); border-bottom-color: var(--pink); }
.tab.on .ico { stroke-width: 2.6; }
.tab.icon-only .ico { width: 1.6em; height: 1.6em; }
.pick-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.course-pick { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); margin: 0; padding: 18px; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.course-pick:hover { transform: translateY(-3px); }
.course-pick .t-ico, .course-head .t-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); border: 1px solid var(--line); color: var(--head); flex: none; }
.cp-main { flex: 1; min-width: 0; } .cp-main strong { display: block; font: 700 1.125rem var(--f-head); color: var(--head); }
.att-head { position: sticky; top: 8px; z-index: 8; }
@media (max-width: 900px) { .att-head { top: 62px; } }
.att-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: center; }
.att-count { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.att-count b { font-variant-numeric: tabular-nums; }
.att-list { display: grid; gap: 10px; margin-top: 8px; }
.att-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-s); transition: background .2s, border-color .2s; }
.att-row.da { background: var(--ok-bg); border-color: var(--turq); }
.att-row.fehlt { background: var(--bad-bg); border-color: var(--pink); }
.att-name { flex: 1; font: 700 1.125rem var(--f-body); min-width: 0; overflow-wrap: anywhere; }
.att-btns { display: flex; gap: 10px; }
.att-btn { width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); color: var(--muted); box-shadow: none; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .2s, color .2s, border-color .2s; }
.att-btn .ico { width: 1.5em; height: 1.5em; stroke-width: 2.6; }
.att-btn.yes:hover { border-color: var(--accent); color: var(--accent); }
.att-btn.no:hover { border-color: var(--pink); color: var(--pink-ink); }
.att-btn[aria-pressed="true"] { transform: scale(1.08); }
.att-btn.yes[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.att-btn.no[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #5a1d33; }

/* Druckliste */
.print-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; overflow-x: auto; }
.print-title { font-size: 1.25rem; margin-bottom: 12px; }
table.sheet { border-collapse: collapse; width: 100%; background: #fff; color: #000; }
table.sheet th, table.sheet td { border: 1px solid #999; padding: 8px 6px; height: 34px; font-size: .875rem; background: #fff; color: #000; text-transform: none; letter-spacing: 0; }
table.sheet th { background: #e3f0f1; font-weight: 700; }
table.sheet .datecol { width: 46px; min-width: 40px; }
table.sheet tbody tr:hover td { background: #fff; }

/* ---------- Probetraining ---------- */
.probe-card { margin: 14px 0; }
.probe-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.probe-name { flex: 1; min-width: 160px; display: grid; } .probe-name strong { font: 700 1.125rem var(--f-head); color: var(--head); }
.probe-forms { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.more-del { margin-top: 12px; } .more-del summary { cursor: pointer; color: var(--muted); font-weight: 700; }

/* ---------- Kursübersicht, Balken ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 18px; }
.course { margin: 0; }
.course-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.course-head > span:nth-child(2) { flex: 1; min-width: 150px; display: grid; }
.course-name { font: 700 1.125rem var(--f-head); color: var(--head); }
.bar { height: 16px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--turq), var(--accent)); }
.bar.fast .bar-fill { background: linear-gradient(90deg, var(--sand), #e0a64b); }
.bar.voll .bar-fill { background: linear-gradient(90deg, var(--pink), #e07a9d); }
.bar-fill.go { animation: settle 2.2s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes settle {   /* überschwingt, dann beruhigt sich der Balken auf den echten Wert */
  0% { width: 0; }
  45% { width: clamp(0%, calc(var(--v) * 1% + 14%), 100%); }
  68% { width: clamp(0%, calc(var(--v) * 1% - 5%), 100%); }
  84% { width: clamp(0%, calc(var(--v) * 1% + 2%), 100%); }
  100% { width: calc(var(--v) * 1%); }
}
.bar-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bar-meta strong { font: 700 1.5rem var(--f-head); font-variant-numeric: tabular-nums; }
details.slide { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
details.slide > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; list-style: none; color: var(--accent-ink); }
details.slide > summary::-webkit-details-marker { display: none; }
details.slide .chev { margin-left: auto; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
details.slide[open] .chev { transform: rotate(180deg); }
.slide-body { display: grid; grid-template-rows: 1fr; overflow: hidden; }
.slide-body > div { min-height: 0; }
details.slide[open] .slide-body { animation: slide-in .38s cubic-bezier(.22, 1, .36, 1); }
@keyframes slide-in { from { grid-template-rows: 0fr; opacity: 0; } to { grid-template-rows: 1fr; opacity: 1; } }
.hero-kid { display: grid; gap: 6px; }
.big-name { font: 700 1.25rem var(--f-head); color: var(--head); }

/* ---------- Mehr-Seite ---------- */
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.more-grid a { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font: 700 1rem var(--f-body); box-shadow: var(--shadow-s); }
.more-grid .t-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); border: 1px solid var(--line); color: var(--head); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.open-row { flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .bar-fill { width: calc(var(--v) * 1%) !important; }
}
@page druck { size: A4 landscape; margin: 10mm; }   /* @page darf nicht in @media stehen, sonst ignoriert der Browser Querformat und Rand */
body:has(.print-sheet) { page: druck; }
@media print {
  .side, .tabbar, .topbar-m, .noprint, .gsearch, .tabs, form, .page-head .ph-icon { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, .scroll, .print-sheet { box-shadow: none !important; border: 0 !important; }
  .print-sheet { padding: 0; overflow: visible; }
  th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.sheet th { background: #e3f0f1 !important; }
}

/* Feinschliff */
.tile2 .t-title, .tile2 .t-sub, .tile2 .t-big { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 901px) { .att-head { position: sticky; top: 8px; z-index: 8; } }
@media (max-width: 900px) {
  .att-head { position: static; padding: 16px; }
  .att-head .actions { margin-top: 10px; gap: 8px; }
  .att-head .actions button, .att-head .actions .btn { min-height: 40px; padding: 6px 14px; font-size: .875rem; }
  .tab { padding: 10px 18px; }
}

/* ---------- Kundenakte (Mini-Dashboard) ---------- */
.kid-hero { display: grid; gap: 14px; background: var(--grad-soft); }
.kid-id { display: flex; align-items: center; gap: 16px; } .kid-id > span:last-child { display: grid; }
.kid-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ptabs { display: flex; gap: 4px; overflow-x: auto; margin: 18px 0 16px; border-bottom: 1.5px solid var(--line); scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); text-decoration: none; font: 700 1rem var(--f-body); white-space: nowrap; flex: none; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.ptab:hover { color: var(--head); }
.ptab.on { color: var(--accent); border-bottom-color: var(--pink); }
.tbadge { font: 700 .75rem var(--f-body); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 8px; }
.tbadge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.ppanel[hidden] { display: none; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.kpi { margin: 0; display: grid; gap: 6px; align-content: start; background: var(--surface); }
.kpi h3 { font: 700 1rem var(--f-head); color: var(--head); }
.kpi .t-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent-ink); }
.kpi p { margin: 0; } .kpi-big { font: 700 1.7rem var(--f-head); color: var(--head); } .kpi-big small { font: 600 .875rem var(--f-body); color: var(--muted); }
.kpi-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--accent-ink); text-decoration: none; margin-top: 4px; }
.mchips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.mchip { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.mchip.ok { background: var(--ok-bg); color: var(--ok-ink); } .mchip.warn { background: var(--warn-bg); color: var(--warn-ink); } .mchip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.adots { display: flex; flex-wrap: wrap; gap: 8px; }
.adot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1.5px dashed var(--line); }
.adot.da { background: var(--ok-bg); color: var(--ok-ink); border: 0; } .adot.fehlt { background: var(--bad-bg); color: var(--bad-ink); border: 0; }
.att-mini { margin: 0 0 14px; }
/* ---------- Gäste und Klärung ---------- */
.chip.rosa { background: var(--bad-bg); color: var(--bad-ink); }
.att-row.gast { border-style: dashed; } .att-row.probe { border-style: dashed; background: var(--surface); }
.guest { margin-top: 18px; } .guest summary { display: flex; align-items: center; gap: 10px; cursor: pointer; font: 700 1.125rem var(--f-head); color: var(--head); list-style: none; }
.guest summary::-webkit-details-marker { display: none; }
.gast-opt { display: grid; gap: 6px; padding: 14px; margin: 10px 0; border: 1.5px solid var(--line); border-radius: 24px; background: var(--surface-2); }
.gast-opt button { justify-self: start; }
button.primary { background: var(--grad); }
.triage { margin: 14px 0; padding: 16px; border-radius: 24px; background: var(--warn-bg); color: var(--warn-ink); }
.triage h3 { display: flex; gap: 8px; align-items: center; font: 700 1.125rem var(--f-head); margin-bottom: 12px; }
.triage-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.triage-grid select { min-width: 200px; margin: 0; }

/* ---------- Kachel-Leisten ---------- */
.kachel { min-height: 150px; cursor: pointer; border: 1.5px solid var(--line); }
.kachel.on { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(178, 214, 217, .55), var(--shadow); }
.kachel .t-big { font-size: 1.45rem; margin-top: 8px; }
.stlabel { font: 700 .875rem var(--f-body); color: var(--head); margin-right: 4px; }
.probe-forms form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hist { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.hist-nr { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font: 700 .875rem var(--f-head); color: var(--head); }
.hist li > span:nth-child(2) { display: grid; line-height: 1.2; flex: 1; min-width: 0; } .hist small { color: var(--muted); font-weight: 600; }

/* ---------- Kacheln mit Panel darunter ---------- */
.kachel-bereich { display: grid; gap: 16px; margin: 4px 0 18px; align-items: start; }
.kachel-bereich.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kachel-bereich.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kachel-bereich .kpanel { grid-column: 1 / -1; grid-row: 2; }
.kpanel[hidden] { display: none; }
.kpanel > .card:first-child { margin-top: 0; }
.vlink { text-decoration: none; background: var(--surface-2); color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  .kachel-bereich.n2, .kachel-bereich.n3, .kachel-bereich.n4 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kachel-bereich .kpanel { grid-row: auto; }
  .kachel { min-height: 0; padding: 16px 18px; }
  .kachel .t-big { margin-top: 2px; font-size: 1.25rem; }
}
.kachel .chev .ico { width: 1.2em; height: 1.2em; stroke-width: 2.4; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.kachel.on .chev .ico { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .kachel .chev .ico { transition: none; } }

/* ---------- Datumsfelder und Kalender ---------- */
.datefield { position: relative; display: block; }
.datefield input.has-cal { padding-right: 52px; }
.cal-btn { position: absolute; right: 6px; bottom: 6px; width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--accent-ink); border: 0; box-shadow: none; cursor: pointer; }
.cal-btn:hover { color: var(--accent); }
.cal { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 48px rgba(53, 53, 53, .22); padding: 14px; animation: cal-in .22s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cal-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cal { animation: none; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.cal-nav { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--head); border: 0; box-shadow: none; }
.cal-title { flex: 1; min-height: 38px; padding: 0 10px; border-radius: 999px; background: transparent; color: var(--head); border: 0; box-shadow: none; font: 700 1.125rem var(--f-head); }
.cal-title:hover { background: var(--surface-2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-wd span { font: 700 .75rem var(--f-head); color: var(--muted); padding: 6px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal-day { aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--ink); border: 0; box-shadow: none; font: 600 1rem var(--f-body); }
.cal-day:hover { background: var(--surface-2); }
.cal-day.heute { box-shadow: inset 0 0 0 1.5px var(--pink); }
.cal-day.on { background: var(--grad); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-year { min-height: 44px; padding: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 0; box-shadow: none; font: 700 1rem var(--f-body); }
.cal-year.on { background: var(--grad); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.cal-link { min-height: 34px; padding: 0 12px; background: transparent; color: var(--accent-ink); border: 0; box-shadow: none; font: 700 .875rem var(--f-body); border-radius: 999px; }
.cal-link:hover { background: var(--surface-2); }

/* Buttons nebeneinander oder untereinander: immer gleicher Abstand */
p:has(> button + .btn), p:has(> button + button), p:has(> .btn + .btn), p:has(> .btn + button), p:has(> a.btn + button) { display: flex; flex-wrap: wrap; gap: 10px; }
.zurueck { margin: 0 0 12px; }

textarea { border-radius: 24px; }

.kid-in-vertrag { margin: 0; display: grid; gap: 8px; align-content: start; }
.kiv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kiv-head strong { font: 700 1.125rem var(--f-head); color: var(--head); }
.kid-in-vertrag p { margin: 0; }
a.chip { text-decoration: none; }

/* ---------- Kurs-Auswahl (mehrere) ---------- */
.kchoices { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.kchoice { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; }
.kchoice input { width: auto; display: inline-block; margin: 0; accent-color: var(--accent); }
.kchoice:has(input:checked) { background: var(--grad); border-color: var(--accent); }
/* Dezentes X zum Abbrechen oben rechts in Formular-Karten */
.card-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); text-decoration: none; opacity: .7; transition: opacity .15s, background .15s; }
.card-x:hover, .card-x:focus-visible { opacity: 1; background: var(--surface-2); color: var(--head); }

/* Nur-Icon-Buttons (rund, gleiche Größe) */
.btn.icon, button.icon { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; }
ul.list li.open-row { display: block; }
li.open-row .actions { flex-wrap: nowrap; margin-top: 10px; }

/* ---------- Zahlungen zuordnen: Karten statt Tabelle ---------- */
.zlist { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.zcard { margin: 0; display: grid; gap: 4px; }
.z-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.z-date { font-weight: 700; color: var(--muted); }
.z-sum { font: 700 1.25rem var(--f-head); color: var(--head); }
.z-who { margin: 0; font-weight: 700; }
.z-zweck { margin: 0; font-size: .875rem; overflow-wrap: anywhere; }
.z-form { display: grid; gap: 4px; margin-top: 8px; }
.z-form label { margin: 6px 0 0; }
.z-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.z-monat { flex: 1 1 130px; margin: 6px 0 0; }
.z-ign { margin: 0; }
.z-save { margin-left: auto; }

/* Kurse in der Vertragsansicht: einfache Zeilen ohne Hintergrund, dürfen umbrechen */
.kid-in-vertrag { min-width: 0; }
.kiv-head { flex-wrap: wrap; }
.kurs-liste { display: grid; gap: 6px; margin: 0; padding: 0; }
.kurs-zeile { display: flex; align-items: flex-start; gap: 10px; list-style: none; font-weight: 600; color: var(--ink); }
.kurs-zeile .ico { margin-top: 3px; color: var(--accent); }
.kurs-zeile small { display: block; color: var(--muted); font-weight: 600; }

/* Einheitliche Schriftgrößen in der Vertragsansicht */
.kid-in-vertrag p.muted { font-size: 1rem; }
.kurs-zeile small { font-size: inherit; font-weight: 500; color: var(--muted); }

/* ---------- Symbolleiste: Hilfe, Einstellungen, Profil ---------- */
.ph-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ph-tools .tool { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.ph-tools .tool .ico { width: 1.5em; height: 1.5em; }
.ph-tools .tool:hover { background: var(--surface-2); color: var(--head); }
.ph-tools .tool[aria-current="page"] { color: var(--accent); }
.ph-tools .tool[aria-current="page"] .ico { stroke-width: 2.6; }
.topbar-m .ph-tools .tool { width: 38px; height: 38px; }
@media (max-width: 900px) { .page-head > .ph-tools { display: none; } }
@media (min-width: 901px) { .topbar-m .ph-tools { display: none; } }
.userlink { color: var(--ink); font-weight: 700; text-decoration: none; }
/* Logo als Bild */
.logo.has-img { background: var(--surface); overflow: hidden; padding: 0; }
.logo.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-vorschau { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.logo-form input[type="file"] { padding: 10px 16px; }
/* Einstellungen */
@media (min-width: 901px) {
  .kachel-bereich.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .kachel-bereich.n4 .kachel { padding: 16px; min-height: 0; grid-template-columns: auto 1fr; grid-template-areas: "ico go" "title title" "big big" "sub sub"; }
  .kachel-bereich.n4 .t-title { font-size: 1.125rem; margin-top: 6px; }
  .kachel-bereich.n4 .t-big { font-size: 1rem; margin-top: 2px; }
  .kachel-bereich.n4 .t-sub { font-size: .875rem; }
}
.einst-liste li, .prof-kurse li { display: flex; align-items: center; gap: 14px; }
.einst-liste li > span:nth-child(2), .prof-kurse li > span:nth-child(2) { display: grid; line-height: 1.3; min-width: 0; }
.einst-liste small, .prof-kurse small { color: var(--muted); }
.einst-liste .t-ico, .prof-kurse .t-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-ink); flex: none; }
.farben { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 14px; margin: 14px 0; }
.farbfeld { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.farbfeld input[type="color"] { width: 52px; height: 52px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.farbfeld input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.farbfeld input[type="color"]::-webkit-color-swatch { border: 2px solid var(--line); border-radius: 50%; }
.farbfeld input[type="color"]::-moz-color-swatch { border: 2px solid var(--line); border-radius: 50%; }
.farbfeld code { background: var(--surface-2); padding: 4px 10px; border-radius: 999px; font-size: .875rem; }

/* ---------- Symbolleiste: Dropdown-Menüs ---------- */
.ph-tools { gap: 0; }
.tool-wrap { position: relative; }
.ph-tools .tool { width: 40px; height: 40px; }
.topbar-m .ph-tools .tool { width: 36px; height: 36px; }
.tool-menu { display: block; visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility 0s linear .35s; position: absolute; right: 0; top: 100%; padding-top: 8px; z-index: 50; min-width: min(250px, 86vw); }   /* verzögertes Ausblenden: das Hover reißt nicht ab, wenn die Maus schräg zur Liste fährt */
.tool-menu-in { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 48px rgba(53, 53, 53, .18); padding: 8px; display: grid; gap: 2px; }
.tool-wrap.open .tool-menu { visibility: visible; opacity: 1; transition-delay: 0s; }
@media (hover: hover) { .tool-wrap:hover .tool-menu { visibility: visible; opacity: 1; transition-delay: 0s; } }
.tool-who { display: grid; padding: 8px 14px 6px; }
.tool-who strong { font: 700 1.125rem var(--f-head); color: var(--head); }
.tool-who small { color: var(--muted); }
.tool-menu-in a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.tool-menu-in a .ico { color: var(--accent-ink); }
.tool-menu-in a:hover, .tool-menu-in a:focus-visible { background: var(--surface-2); }
/* ---------- Einstellungen: Gruppen ---------- */
.einst-h { display: flex; align-items: center; gap: 10px; font: 700 1.125rem var(--f-head); color: var(--head); margin: 6px 0 4px; }
.einst-h .ico { color: var(--accent); }
.einst-trenner { border: 0; border-top: 1px solid var(--line); margin: 22px 0 16px; }
.einst-aktiv { margin: 6px 0 0; }
/* ---------- Kurse bearbeiten ---------- */
.course.has-edit .course-head { padding-right: 44px; }
.course-add { display: grid; place-content: center; justify-items: center; gap: 10px; min-height: 160px; margin: 0; border: 2px dashed var(--line); background: transparent; box-shadow: none; color: var(--accent-ink); text-decoration: none; font-weight: 700; transition: border-color .15s, background .15s; }
.course-add .ico { width: 2.4em; height: 2.4em; }
.course-add:hover, .course-add:focus-visible { border-color: var(--accent); background: var(--grad-soft); }
.flash.fehler { background: var(--bad-bg); color: var(--bad-ink); }
.kchoice input[type="radio"] { width: auto; display: inline-block; margin: 0; accent-color: var(--accent); }

.kid-hero.has-edit .kid-id { padding-right: 44px; }
.kid-hero.relay .cols { margin-top: 6px; }

/* ---------- Logo-Zuschnitt ---------- */
.logo-wahl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.logo-wahl label { margin: 0; cursor: pointer; }
.logo-wahl:focus-within label { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.crop-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(53, 53, 53, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.crop-box { width: min(340px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(53, 53, 53, .3); padding: 20px; display: grid; gap: 10px; justify-items: center; animation: cal-in .2s cubic-bezier(.34, 1.56, .64, 1); }
.crop-box h2 { justify-self: start; font: 700 1.25rem var(--f-head); }
.crop-box p { justify-self: start; margin: 0; }
.crop-canvas { border-radius: 24px; touch-action: none; cursor: grab; background: var(--surface-2); }
.crop-canvas:active { cursor: grabbing; }
.crop-zoom-label { width: 100%; margin: 4px 0 0; }
.crop-zoom { padding: 0; accent-color: var(--accent); }
.crop-box .actions { justify-self: start; margin-top: 4px; }

/* ---------- Vertikaler Rhythmus: nirgends zusammengequetscht ---------- */
main.content > h2:not(.sec), main.content > h3:not(.sec) { margin: 28px 0 12px; }
main.content > :is(.scroll, table) { margin-bottom: 20px; }
main.content > :is(.scroll, table) + :is(h2, h3, p, form, div, ul):not(.sr) { margin-top: 20px; }
main.content > :is(h2, h3) + :is(.scroll, table, .card, form, ul) { margin-top: 12px; }
.einst-h { margin: 6px 0 12px; }
.kchoices { margin-bottom: 12px; }
.mchips { margin-bottom: 16px; }
.actions + .print-sheet { margin-top: 16px; }

/* Filter als Links (Zahlweg) */
a.fchip { display: inline-flex; align-items: center; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); min-height: 38px; padding: 5px 16px; border-radius: 999px; font: 700 .875rem var(--f-body); text-decoration: none; }
a.fchip:hover { border-color: var(--turq); }
a.fchip.on { background: var(--grad); border-color: color-mix(in srgb, var(--btn-ink) 12%, transparent); }
.z-quelle { margin-left: 6px; font-size: .75rem; padding: 2px 10px; vertical-align: middle; }
.z-quelle .ico { width: 1em; height: 1em; }
.cols + .einst-h, .kchoices + .einst-h, label + .einst-h, p + .einst-h { margin-top: 22px; }

/* Zugeklappte Karte (einzeilig) = Pille wie die Zeilen darüber; aufgeklappt wieder große Fläche */
details.card:not([open]) { border-radius: 999px; padding-left: 28px; padding-right: 28px; }

/* Suche über einer Tabelle */
.tabsuche { max-width: 420px; margin: 4px 0 14px; }
.tabsuche .clear { display: grid; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); border: 0; box-shadow: none; }
.tabsuche .clear[hidden] { display: none; }

/* ---------- Notfall-Kontakt und gesperrte Termine ---------- */
.att-sos { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--muted); border: 0; box-shadow: none; flex: none; }
.att-sos:hover, .att-sos:focus-visible { background: var(--surface-2); color: var(--accent-ink); }
.att-row { position: relative; }
.sos-pop { position: absolute; right: 8px; top: calc(100% - 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 48px rgba(53, 53, 53, .2); padding: 14px 16px; display: grid; gap: 8px; min-width: min(260px, 86vw); }
.sos-pop small { color: var(--muted); }
.sos-pop p { margin: 0; }
.att-btn:disabled { opacity: .4; cursor: not-allowed; }
.kchoices.rechte { flex-direction: column; align-items: stretch; }
@media (max-width: 520px) {
  .att-row { gap: 8px; padding: 10px 10px; }
  .att-row .att-av { width: 38px; height: 38px; }
  .att-name { font-size: 1rem; }
  .att-btns { gap: 6px; }
  .att-btn { width: 46px; height: 46px; min-height: 46px; }
  .att-sos { width: 34px; height: 34px; }
}

.user-card .course-head .att-av { font-size: .875rem; }
.card .kid-chips + :is(ul, p, div) { margin-top: 10px; }

/* ---------- Glocke und Benachrichtigungen ---------- */
.tool-wrap > .tool { position: relative; }
.tool-badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pink-ink); color: #fff; font: 700 .75rem var(--f-body); display: grid; place-items: center; line-height: 1; }
.tool-badge[hidden] { display: none; }
.bn-menu { min-width: min(330px, 92vw); }
.bn-liste { display: grid; gap: 4px; max-height: 60vh; overflow-y: auto; }
.bn-item { display: grid; gap: 4px; padding: 10px 14px; border-radius: 20px; }
.bn-item.neu { background: var(--surface-2); }
.bn-item strong { font-weight: 700; }
.bn-item small { color: var(--muted); }
.bn-item .bn-aktionen { display: flex; gap: 8px; margin-top: 4px; }
.bn-leer { margin: 0; padding: 8px 14px; }
.bn-seite { display: grid; gap: 12px; }
.bn-karte { margin: 0; display: flex; align-items: center; gap: 14px; }
.bn-karte.neu { border-color: var(--turq); }
.bn-karte .t-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-ink); flex: none; }
.bn-inhalt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bn-inhalt small { color: var(--ink); }
.bn-inhalt small.muted { color: var(--muted); }
.bn-aktionen { display: flex; gap: 8px; }
/* Am schmalen Fenster steht die Liste über die volle Breite; der durchsichtige Streifen oben verbindet Glocke und Liste, damit das Hover nicht abreißt. */
@media (max-width: 900px) { .bn-menu { position: fixed; left: 12px; right: 12px; top: var(--bn-top, 74px); padding-top: 8px; min-width: 0; } }   /* --bn-top setzt app.js aus der Unterkante der Glocke: gleiche Höhe wie bei Hilfe, Einstellungen und Profil */

.dsgvo-hinweis { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.loesch-liste li { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- Probe-Karten einklappbar ---------- */
details.probe-card > summary { list-style: none; cursor: pointer; }
details.probe-card > summary::-webkit-details-marker { display: none; }
.probe-head .chev { margin-left: auto; color: var(--muted); display: grid; place-items: center; width: 34px; height: 34px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
details.probe-card[open] > summary .chev { transform: rotate(180deg); }
.probe-body { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .probe-head .chev { transition: none; } }

/* ---------- Kinder- und Vertragsliste am Handy: Zeilen als kompakte Karten statt breiter Tabelle ---------- */
@media (max-width: 640px) {
  #ktable thead { display: none; }
  #ktable, #ktable tbody { display: block; width: 100%; }
  #ktable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "sub sub" "extra extra"; gap: 4px 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  #ktable tr[hidden] { display: none; }
  #ktable td { display: block; padding: 0; border: 0; min-width: 0; }
  #ktable td.hide-s { display: none; }
  #ktable td.c-name { grid-area: name; }
  #ktable td.c-status { grid-area: status; justify-self: end; }
  #ktable td.c-sub { grid-area: sub; color: var(--muted); }
  #ktable td.c-extra { grid-area: extra; display: flex; flex-wrap: wrap; gap: 6px; }
}

/* ---------- Popup-Rückmeldung (Toast): grün mit Haken, rot mit Ausrufezeichen ---------- */
.toast-stapel { position: fixed; z-index: 90; top: 74px; left: 12px; right: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: center; pointer-events: none; }
@media (min-width: 901px) { .toast-stapel { top: 20px; left: auto; right: 24px; width: min(440px, calc(100vw - 48px)); justify-items: end; } }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; width: fit-content; max-width: min(460px, 100%); padding: 12px 14px 12px 12px; border-radius: 24px; background: #e6f5ec; color: #1b5e3a; border: 1.5px solid #a8dbbd; box-shadow: 0 14px 36px rgba(53, 53, 53, .18); font-weight: 700; animation: toast-ein .4s cubic-bezier(.34, 1.56, .64, 1); }
.toast.kurz { border-radius: 999px; padding-right: 18px; }
.toast.fehler { background: #fdeaed; color: #9b1c31; border-color: #f2b1bc; }
.toast .t-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #2f9e62; color: #fff; flex: none; }
.toast.fehler .t-ic { background: #d6334f; }
.toast .t-ic .ico { width: 1.1em; height: 1.1em; stroke-width: 3; }
.toast .t-text { flex: 1; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.toast .t-x { width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; color: inherit; border: 0; box-shadow: none; opacity: .6; flex: none; }
.toast .t-x:hover { opacity: 1; background: rgba(53, 53, 53, .08); }
.toast.weg { opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s; }
@keyframes toast-ein { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.bn-item { cursor: pointer; transition: background .15s; }
.bn-item:hover, .bn-item:focus-visible { background: var(--surface-2); }
.bn-karte { scroll-margin-top: 90px; }
.bn-karte:target { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(178, 214, 217, .55), var(--shadow); }

/* ---------- Dropdown (Einstellungen: Aufbewahrungsfrist) ---------- */
.dd-feld { margin: 12px 0; }
.dd-label { display: block; font: 700 .875rem var(--f-body); color: var(--head); }
.dd { position: relative; margin-top: 6px; }
.dd-knopf { width: 100%; justify-content: space-between; padding: 12px 20px; font-weight: 500; text-align: left; min-height: 0; }
.dd-knopf .chev { display: inline-flex; color: var(--muted); }
.dd-knopf .chev .ico { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.dd.open .dd-knopf { border-color: var(--accent); }
.dd.open .dd-knopf .chev .ico { transform: rotate(180deg); }
.dd-liste { display: block; visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility 0s linear .15s; position: absolute; left: 0; right: 0; top: 100%; padding-top: 8px; z-index: 50; }
.dd.open .dd-liste { visibility: visible; opacity: 1; transition-delay: 0s; }
.dd-liste-in { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 48px rgba(53, 53, 53, .18); padding: 8px; display: grid; gap: 2px; }
.dd-liste [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 999px; color: var(--ink); font: 600 1rem var(--f-body); cursor: pointer; }
.dd-liste [role="option"] .ico { visibility: hidden; color: var(--accent-ink); }
.dd-liste [role="option"].on { background: var(--surface-2); font-weight: 700; }
.dd-liste [role="option"].on .ico { visibility: visible; }
.dd-liste [role="option"]:hover, .dd-liste [role="option"].fokus { background: var(--surface-2); }
.dd-liste:focus { outline: none; }
.dd.hoch .dd-liste { top: auto; bottom: 100%; padding-top: 0; padding-bottom: 8px; }
.dd-liste [role="option"].fokus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -3px; }

/* ---------- Farbauswahl: Layout-Farben und eigene Akzentfarben ---------- */
.layouts { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.layout-wahl { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 10px 18px; min-height: 0; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 1rem var(--f-body); box-shadow: none; cursor: pointer; }
.layout-wahl[aria-pressed="true"] { background: var(--grad); border-color: var(--accent); }
.lw-punkte { display: inline-flex; }
.lw-punkte i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.lw-punkte i + i { margin-left: -6px; }
.farben { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px 14px; margin: 6px 0 14px; }
.fw .dd-knopf { gap: 12px; }
.fw-punkt { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); flex: none; }
.fw-hex { flex: 1; font-family: ui-monospace, Consolas, monospace; }
.fw-in { padding: 14px; gap: 12px; }
.fw-raster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; justify-items: center; }
.fw-muster { background-image: none; width: 100%; max-width: 36px; aspect-ratio: 1; min-height: 0; padding: 0; margin: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.fw-muster.on { box-shadow: 0 0 0 2px var(--accent); }
.fw-muster:hover { transform: scale(1.1); }
.fw-eigen { display: grid; gap: 6px; font-weight: 700; font-size: .875rem; color: var(--head); margin: 0; }
.fw-eigen input { font-family: ui-monospace, Consolas, monospace; }
.layouts { margin-bottom: 12px; }
.layouts + .einst-h, .farben + .einst-h { margin-top: 22px; }

/* ---------- Einstellungen: einklappbare Gruppen und Benutzerliste ---------- */
details.einst-gruppe { border-top: 1px solid var(--line); margin-top: 8px; }
details.einst-gruppe:first-of-type { border-top: 0; margin-top: 0; }
details.einst-gruppe > summary { list-style: none; cursor: pointer; border-radius: 999px; }
details.einst-gruppe > summary::-webkit-details-marker { display: none; }
details.einst-gruppe > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
details.einst-gruppe .einst-h { margin: 12px 0; min-height: 28px; }
details.einst-gruppe .einst-h .chev { margin-left: auto; display: inline-flex; color: var(--muted); }
details.einst-gruppe .einst-h .chev .ico { width: 1.1em; height: 1.1em; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
details.einst-gruppe[open] .einst-h .chev .ico { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { details.einst-gruppe .einst-h .chev .ico { transition: none; } }
.nutzer-liste { margin: 8px 0 12px; }
.nutzer-liste li { padding: 0; }
.nutzer-zeile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 0; color: var(--ink); text-decoration: none; }
.nutzer-zeile > span:nth-child(2) { display: grid; line-height: 1.3; min-width: 0; }
.nutzer-zeile strong { overflow-wrap: anywhere; }
.nutzer-zeile .chev { margin-left: auto; display: inline-flex; color: var(--muted); }
.nutzer-zeile:hover strong, .nutzer-zeile:focus-visible strong { color: var(--accent-ink); }
.nutzer-zeile:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 999px; }

/* ---------- Probetraining: ruhigere Karten, Besuch löschen ---------- */
details.card.probe-card:not([open]) { border-radius: 24px; padding: 18px 22px; }
.hist-del { margin: 0 0 0 6px; display: inline-flex; }
.hist-del button.icon { width: 32px; height: 32px; }
.hist-del button.icon .ico { width: 1em; height: 1em; }
.actions .btn.icon { flex: none; }
.sich-liste li { padding: 12px 0; }
.sich-akt { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.sich-akt form { margin: 0; }

/* ---------- Anmeldung: Hilfelink, Einladungslink ---------- */
.login-hilfe { margin: 14px 0 0; text-align: center; }
.login-hilfe a { color: var(--accent-ink); font-weight: 700; }
.link-zeile { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.link-zeile input { margin: 0; flex: 1; min-width: 0; }
.link-zeile button { flex: none; }

/* Verlauf über die ganze Fläche inkl. Rand: sonst kachelt er in den Rand hinein und der Rand wirkt fleckig (bei kontrastreichen Layouts wie Schwarz gut sichtbar) */
.logo, .side a.nav[aria-current="page"], .avatar, .ph-icon, button, .btn, button.fchip.on, a.fchip.on, .att-av, .course-pick .t-ico, .course-head .t-ico, .more-grid .t-ico, button.primary, .hist-nr, .cal-day.on, .cal-year.on, .kchoice:has(input:checked), .layout-wahl[aria-pressed="true"] { background-origin: border-box; }

/* ---------- Druckliste: alle 17 Spalten gleich breit, eine Seite im Querformat ---------- */
table.sheet { table-layout: fixed; min-width: 1020px; }
table.sheet th, table.sheet td, table.sheet .datecol { width: calc(100% / 17); min-width: 0; padding: 8px 4px; overflow-wrap: anywhere; hyphens: auto; }
table.sheet th:nth-child(-n+3), table.sheet td:nth-child(-n+3) { font-size: .75rem; }
@media print {
  body:has(.print-sheet) .page-head { display: none !important; }
  .app { min-height: 0 !important; }   /* 100vh wäre im Druck exakt eine Seite und erzwingt mit dem Rand eine zweite */
  .print-sheet { height: 178mm; display: flex; flex-direction: column; break-inside: avoid; }
  .print-title { margin: 0 0 4mm; font-size: 14pt; }
  table.sheet { flex: 1; min-width: 0; width: 100%; height: 100%; break-inside: avoid; }
  table.sheet tr { break-inside: avoid; }
  table.sheet th, table.sheet td { height: auto; padding: 1mm 1mm; font-size: 8pt; }
  table.sheet th:nth-child(-n+3), table.sheet td:nth-child(-n+3) { font-size: 8pt; }
}
/* Namen sollen in der schmalen, gleich breiten Spalte nicht mitten im Wort umbrechen */
table.sheet { min-width: 1275px; }
table.sheet th, table.sheet td { padding-left: 2px; padding-right: 2px; }
@media print {
  table.sheet th:nth-child(-n+3), table.sheet td:nth-child(-n+3) { font-size: 7pt; padding-left: 0.6mm; padding-right: 0.6mm; }
}
@media print { table.sheet { min-width: 0; } }
label[hidden] { display: none; }

/* ---------- Einklappbare Abschnittsüberschriften (Profil u. a.): Chevron rechts, erst mal zu ---------- */
details.sec-gruppe > summary { list-style: none; cursor: pointer; border-radius: 999px; }
details.sec-gruppe > summary::-webkit-details-marker { display: none; }
details.sec-gruppe > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
details.sec-gruppe > summary h2.sec { display: flex; align-items: center; gap: 8px; }
details.sec-gruppe .chev { margin-left: auto; display: inline-flex; color: var(--muted); }
details.sec-gruppe .chev .ico { width: 1.1em; height: 1.1em; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
details.sec-gruppe[open] .chev .ico { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { details.sec-gruppe .chev .ico { transition: none; } }

/* ---------- QR-Code fürs Probetraining ---------- */
.qr-schritte { margin: 8px 0 16px; padding-left: 22px; display: grid; gap: 4px; }
.qr-box { display: grid; place-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 24px; width: min(100%, 320px); margin: 0 auto 12px; }
#qr-bild { width: 100%; max-width: 280px; aspect-ratio: 1; }
#qr-bild svg { display: block; width: 100%; height: 100%; }
.qr-titel { text-align: center; font: 700 1rem var(--f-body); color: var(--head); margin: 0 0 12px; }
@media print {
  body.qr-druck .kachel, body.qr-druck .page-head, body.qr-druck .flash, body.qr-druck .noprint { display: none !important; }
  body.qr-druck .qr-card { padding: 0; }
  body.qr-druck .qr-card h2 { justify-content: center; font-size: 22pt; margin: 10mm 0 8mm; }
  body.qr-druck .qr-box { width: 130mm; border: 0; padding: 0; }
  body.qr-druck #qr-bild { max-width: 130mm; }
  body.qr-druck .qr-titel { font-size: 16pt; margin-top: 6mm; }
}

/* ---------- Auswahl mit Suche (select[data-suche]) ---------- */
.sd { margin-top: 6px; }
.sd-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; margin: 0; border: 0; }
.sd .dd-knopf { text-align: left; }
.sd .dd-wert { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-suche { margin: 0 0 6px; }
.sd-optionen { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.sd-optionen [role="option"][hidden] { display: none; }
.sd .dd-liste [role="option"] > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.sd .suggest-empty { padding: 10px 14px; }
details.slide + .einst-h, details.slide + .scroll { margin-top: 16px; }

/* Probe-Zeile in der Anwesenheit: Chip darf umbrechen, die Zeile darf schrumpfen (sonst weitet sie die ganze Liste bei 360 px) */
ul.att-list > li { min-width: 0; }
.att-row.probe .att-name .chip { white-space: normal; }
.att-row.probe { flex-wrap: wrap; row-gap: 8px; }

/* ---------- Suchfeld statt Dropdown (select[data-suche]) ---------- */
.sd-feld { position: relative; display: block; }
.sd-eingabe { margin-top: 0; padding-left: 46px; padding-right: 48px; text-overflow: ellipsis; }
.sd-lupe { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); display: inline-flex; pointer-events: none; }
.sd-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--muted); }
.sd-x:hover { background: var(--surface-2); transform: translateY(-50%); }
.sd-x[hidden] { display: none; }

/* ---------- Monatskalender (Barzahlung: Für welche Monate?) ---------- */
.mk-kal { max-width: 360px; margin: 8px 0 4px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.mk-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mk-jahr { font: 700 1.125rem var(--f-head); color: var(--head); }
.mk-kopf button.icon { width: 40px; height: 40px; }
.mk-kopf button:disabled { opacity: .35; cursor: default; }
.mk-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mk-monat { min-height: 44px; padding: 0 4px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: none; color: var(--ink); font: 600 1rem var(--f-body); background-origin: border-box; }
.mk-monat:hover:not(:disabled) { border-color: var(--turq); transform: none; }
.mk-monat.heute { border-color: var(--accent); }
.mk-monat.on { background: var(--grad); border-color: var(--accent); font-weight: 700; }
.mk-monat:disabled { opacity: .35; cursor: default; }
.mk-info { margin: 10px 4px 0; font-size: .875rem; }
.mk .kchoices[hidden] { display: none; }

/* ---------- Ideensammlung ---------- */
.idee-liste { display: grid; gap: 0; }
.idee { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.idee:last-child { border-bottom: 0; }
.idee-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.idee-text { overflow-wrap: anywhere; white-space: pre-wrap; }

/* Anmeldung: „Angemeldet bleiben“ */
.kchoice.bleiben { margin: 4px 0 14px; }
.app-schritte { display: grid; gap: 8px; margin: 8px 0 12px; }
@media (display-mode: standalone) { .topbar-m { padding-top: calc(10px + env(safe-area-inset-top, 0px)); } }
.eintrag-del { margin-top: 14px; }

/* Öffentliche Website (SaaS) */
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 4px 0 8px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }
.site-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 28px 0 8px; font-size: .875rem; }
.site-foot a { color: var(--muted); }
.interval-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.vorformat { white-space: pre-line; }
.auth-wrap.breit { grid-template-columns: minmax(0, 1100px); }
.auth-wrap.breit .auth-card .course-grid .card { background: var(--surface); border: 1px solid var(--line); padding: 22px; margin: 0; }
.auth-wrap.breit .course-grid { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }

/* Mein Abo: Nutzung gegenüber den Limits */
.abo-usage { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.abo-usage li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.abo-usage progress { grid-column: 1 / -1; width: 100%; height: 10px; accent-color: var(--accent); }
.card.abo-pick { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Kacheln (zugeklappt, per Klick öffnen); .rot = Kündigung ---------- */
.kacheln { margin-top: 18px; }
details.kachel { border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); padding: 0 20px; margin: 10px 0; }
details.kachel[open] { border-radius: 24px; padding-bottom: 6px; }
details.kachel > summary { list-style: none; cursor: pointer; border-radius: 999px; }
details.kachel > summary::-webkit-details-marker { display: none; }
details.kachel > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
details.kachel .einst-h { margin: 0; min-height: 48px; display: flex; align-items: center; gap: 10px; }
details.kachel .einst-h .chev { margin-left: auto; display: inline-flex; color: var(--muted); }
details.kachel .einst-h .chev .ico { width: 1.1em; height: 1.1em; transition: transform .25s; }
details.kachel[open] .einst-h .chev .ico { transform: rotate(180deg); }
details.kachel.rot { border-color: #b3261e; }
details.kachel.rot .einst-h, details.kachel.rot .einst-h .chev, details.kachel.rot .einst-h .ico { color: #b3261e; }
details.kachel .kachel-in { padding: 0 0 8px; }
form button.rot { background: #b3261e; border-color: #b3261e; color: #fff; box-shadow: none; }
form button.rot:hover { background: #8f1e18; border-color: #8f1e18; }
