:root {
  /* Markenfarben von donai.de */
  --brand-blue: #1b263b;
  --brand-white: #fbfbfb;

  --bg: var(--brand-blue);
  --card: #233149;
  --card-2: #2b3a56;
  --text: var(--brand-white);
  --muted: #b3bccb;
  --line: #36476a;
  --accent: var(--brand-white);      /* Hauptknöpfe, Markierungen: weiß */
  --accent-ink: var(--brand-blue);   /* Schrift auf weißen Flächen: blau */
  --accent-soft: #33446a;
  --ok: #34d399;
  --ok-soft: #1c4040;
  --warn: #f59e0b;
  --bad: #fb7185;
  --bad-soft: #4a2a3d;
  --violet: #c4b5fd;
  --amber: #fbbf24;
  --nav-h: 62px;
  --radius: 18px;
  --shadow: none;
  color-scheme: dark;

  /* Farbverläufe: alles aus dem Marken-Blau, aufgehellt Richtung Stahlblau */
  --blue-hi: #3b5b86;
  --grad-card: linear-gradient(160deg, #283a5c 0%, #212f4a 55%, #1f2c45 100%);
  --grad-panel: radial-gradient(120% 80% at 100% 0%, rgba(110, 150, 205, .38) 0%, rgba(110, 150, 205, 0) 55%),
                linear-gradient(165deg, #2d4468 0%, #22324f 50%, #1d2a42 100%);
  --grad-block: radial-gradient(90% 120% at 0% 0%, rgba(120, 160, 215, .30) 0%, rgba(120, 160, 215, 0) 60%),
                linear-gradient(150deg, #2a4064 0%, #1f2d47 70%);
  --grad-session: linear-gradient(135deg, rgba(10, 16, 28, .55) 0%, rgba(10, 16, 28, .25) 100%);
  --grad-text: linear-gradient(90deg, #fbfbfb 0%, #c9d8ee 60%, #9fb7da 100%);
}

/* Schriften: lokal gehostet (DSGVO, keine Anfragen an Google), Lizenz in fonts/OFL.txt */
/* Anton: Schrift des Titels auf donai.de (SIL Open Font License, Copyright The Anton Project Authors) */
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/anton-regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations"), url(fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* Anton: Schrift des Titels auf donai.de (SIL Open Font License, Copyright The Anton Project Authors) */
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/anton-regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"), url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(fonts/space-grotesk-latin-wght-normal.woff2) format("woff2-variations"), url(fonts/space-grotesk-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(fonts/space-grotesk-latin-ext-wght-normal.woff2) format("woff2-variations"), url(fonts/space-grotesk-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
  --fs-title: 30px;   /* Haupttitel */
  --fs-section: 22px; /* Abschnittstitel */
  --fs-body: 16px;    /* Fließtext */
  --fs-small: 14px;   /* kleine Zusatzinfos */
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  background:
    radial-gradient(90% 50% at 100% 0%, rgba(90, 130, 190, .22) 0%, rgba(90, 130, 190, 0) 60%),
    radial-gradient(70% 40% at 0% 100%, rgba(70, 105, 160, .16) 0%, rgba(70, 105, 160, 0) 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  font-family: var(--font-body); font-size: var(--fs-body); font-weight: 400; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, .topbar .title, .timer-title { font-family: var(--font-head); font-weight: 600; }
h1 { font-size: var(--fs-title); line-height: 1.15; margin: 4px 0 0; letter-spacing: -.02em; }
h2 { font-size: var(--fs-section); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h3 { font-size: 17px; line-height: 1.3; margin: 0; }
button, input, select, textarea { font-family: var(--font-body); }
.btn, .tabbar a, .seg button, .filters button, .q-chip, .chip-opt { font-family: var(--font-body); font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 10px; }
.section-title h2 { font-size: var(--fs-section); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#view {
  max-width: 640px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
}
body.has-footer #view { padding-bottom: calc(var(--nav-h) + 110px + env(safe-area-inset-bottom)); }
body.has-composer #view { padding-bottom: calc(var(--nav-h) + 150px + env(safe-area-inset-bottom)); }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a.active { color: var(--accent); }
.tabbar svg { width: 24px; height: 24px; }

/* ---------- Kopfzeilen ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 8px 2px 18px; }
.topbar { display: flex; align-items: center; gap: 8px; margin: 0 -6px 12px; min-height: 44px; }
.topbar .title { flex: 1; font-size: 18px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--text);
  display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: var(--card-2); }
.icon-btn.danger { color: var(--bad); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 2px 16px; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px;
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }

.client-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); max-width: 200px;
}
.client-switch select { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; padding: 0 4px; min-width: 0; outline: none; }

/* ---------- Karten / Buttons ---------- */
.card { background: var(--grad-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
a.card { display: block; }
a.card.row { display: flex; }
a.card:active, .tap:active { transform: scale(.99); }
.card-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.card-accent .muted { color: color-mix(in srgb, var(--accent-ink) 72%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { opacity: .85; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* Knöpfe auf der weißen Hervorhebungs-Karte: blau gefüllt bzw. blau umrandet */
.btn-white { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--brand-white); }
.card-accent .btn-white:first-child { background: transparent; color: var(--brand-blue); border-color: color-mix(in srgb, var(--brand-blue) 35%, transparent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-danger { color: var(--bad); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 17px; padding: 0 22px; border-radius: 14px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-muted { background: var(--card-2); color: var(--muted); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: grid; gap: 14px; justify-items: center; }

/* ---------- Formulare ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 2px 6px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--card-2); border: 1px solid transparent; border-radius: 12px;
  padding: 11px 12px; width: 100%; outline: none; font-size: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--card); }
textarea { resize: vertical; min-height: 80px; }
.seg { display: flex; background: var(--card-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 42px; height: 24px; appearance: none; -webkit-appearance: none; background: var(--line); border-radius: 999px; position: relative; padding: 0; border: 0; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); background: var(--brand-blue); }

/* ---------- Home ---------- */
.today-card h2 { font-size: var(--fs-section); margin: 2px 0 6px; }
.today-meta { display: flex; gap: 14px; margin: 10px 0 16px; font-size: 14px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wk-day { display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.wk-day span { font-size: 11px; color: var(--muted); font-weight: 600; }
.wk-day b { font-size: 16px; }
.wk-day.today { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wk-day.today span { color: color-mix(in srgb, var(--accent-ink) 75%, transparent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; display: block; }
.dot.planned { background: var(--accent); }
.dot.done { background: var(--ok); }
.dot.missed { background: var(--bad); }
.dot.active { background: var(--amber); }
.wk-day.today .dot.planned { background: var(--accent-ink); }
.metrics-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.metric-mini { background: var(--card-2); border-radius: 12px; padding: 8px 6px; text-align: center; }
.metric-mini b { display: block; font-size: 20px; }
.metric-mini span { font-size: 11px; color: var(--muted); font-weight: 600; }
.client-card .row + .metrics-mini { margin-top: 12px; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h2 { text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal button {
  aspect-ratio: 1 / 1; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-size: 15px;
  display: grid; place-items: center; align-content: center; gap: 3px; cursor: pointer; position: relative;
}
.cal button.out { color: var(--muted); opacity: .45; }
.cal button.today { color: var(--accent); font-weight: 800; }
.cal button.sel { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cal button.sel .dot.planned { background: var(--accent-ink); }
.cal .dots { display: flex; gap: 3px; height: 6px; }

/* ---------- Training ---------- */
.wk-card { display: flex; align-items: center; gap: 12px; }
.wk-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.wk-icon svg { width: 24px; height: 24px; }
.wk-icon.ok { background: var(--ok-soft); color: var(--ok); }

.block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; box-shadow: var(--shadow); }
.block + .block { margin-top: 10px; }
.block.ss { border-left: 4px solid var(--accent); }
.ss-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 0; }
.ex-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.ex-line + .ex-line { border-top: 1px solid var(--line); }
.lab { min-width: 34px; height: 28px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--card-2); color: var(--text); flex: none; }
.ss .lab { background: var(--accent-soft); color: var(--accent); }
.ex-name { font-weight: 600; }
.ex-meta { font-size: 14px; color: var(--muted); }
.ex-log { font-size: 13px; color: var(--ok); margin-top: 2px; }

/* Run */
.progressbar { height: 6px; border-radius: 999px; background: var(--card-2); overflow: hidden; margin: 4px 0 14px; }
.progressbar > i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .3s; }
.block-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.block-tabs::-webkit-scrollbar { display: none; }
.block-tabs button {
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 14px;
  min-width: 44px; height: 36px; border-radius: 10px; cursor: pointer; padding: 0 10px; flex: none;
}
.block-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.block-tabs button.complete:not(.on) { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ss-banner { background: var(--accent-soft); color: var(--accent); border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.ex-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.ex-card + .ex-card { margin-top: 12px; }
.ex-card-head { display: flex; align-items: center; gap: 10px; }
.cue { font-size: 14px; color: var(--muted); margin-top: 8px; }
.coach-note { font-size: 14px; background: var(--card-2); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.video-wrap { margin-top: 12px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.round-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.round-ex { font-size: 14px; font-weight: 600; margin-top: 8px; display: flex; gap: 8px; align-items: center; }

.set-head, .set-row { display: grid; grid-template-columns: 30px 1fr auto 44px; gap: 8px; align-items: center; }
.set-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 4px; }
.set-row { padding: 6px 0; border-radius: 12px; transition: background .2s; }
.set-row.done { background: var(--ok-soft); }
.set-n { font-weight: 700; text-align: center; color: var(--muted); }
.set-target { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-inputs { display: flex; gap: 6px; align-items: center; }
.set-inputs label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.in-sm { width: 58px; padding: 8px 6px; text-align: center; font-weight: 700; border-radius: 10px; font-size: 16px; }
.check {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: transparent;
  display: grid; place-items: center; cursor: pointer; justify-self: end; padding: 0;
}
.check svg { width: 20px; height: 20px; }
.set-row.done .check { background: var(--ok); border-color: var(--ok); color: var(--brand-blue); }
.timer-btn { width: 40px; height: 38px; border-radius: 10px; border: 0; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.timer-btn svg { width: 20px; height: 20px; }

.run-footer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 25;
  padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.run-footer .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.run-footer .inner > :last-child { flex: 1; }

/* Editor */
.ed-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.ed-block + .ed-block { margin-top: 12px; }
.ed-block.ss { border-left: 4px solid var(--accent); }
.ed-block-head { display: flex; align-items: center; gap: 6px; }
.ed-block-head h3 { flex: 1; white-space: nowrap; }
.ed-block-head .switch { font-size: 13px; }
.ed-item { background: var(--card-2); border-radius: 14px; padding: 10px; margin-top: 10px; }
.ed-item-head { display: flex; gap: 8px; align-items: center; }
.ed-item-head select { flex: 1; min-width: 0; background: var(--card); }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ed-grid input, .ed-grid select { background: var(--card); padding: 9px 10px; }
.ed-sets { margin-top: 8px; display: grid; gap: 6px; }
.ed-set { display: grid; grid-template-columns: 26px 1fr 1fr 36px; gap: 6px; align-items: center; }
.ed-set.time { grid-template-columns: 26px 1fr 36px; }
.ed-set input { background: var(--card); padding: 8px; text-align: center; }
.ed-set .n { text-align: center; font-weight: 700; color: var(--muted); font-size: 14px; }
.ed-set-head { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.mini-label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; display: block; margin: 0 2px 4px; }

/* ---------- Bibliothek ---------- */
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search input { padding-left: 38px; background: var(--card); border-color: var(--line); }
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px; padding: 0 16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; white-space: nowrap; cursor: pointer; }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.lib-item { display: flex; gap: 12px; align-items: center; padding: 10px; }
.lib-item + .lib-item { margin-top: 8px; }
.thumb { width: 84px; height: 52px; border-radius: 10px; background: var(--card-2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); flex: none; position: relative; overflow: hidden; }
.thumb svg { width: 22px; height: 22px; }
.thumb.has { color: #fff; }
.thumb.has::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.thumb.has svg { position: relative; z-index: 1; }

/* ---------- Fortschritt ---------- */
.slider-row + .slider-row { margin-top: 16px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.slider-top b { font-size: 22px; min-width: 28px; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; padding: 0; height: 32px; border: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--c) 0 var(--p), var(--card-2) var(--p) 100%); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-white); border: 2px solid var(--c); margin-top: -9px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--card-2); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--c); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-white); border: 2px solid var(--c); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat b { font-size: 24px; display: block; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.chart-card h3 { display: flex; justify-content: space-between; align-items: baseline; }
.chart-card h3 small { font-weight: 600; color: var(--muted); font-size: 13px; }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 9px; font-family: inherit; }
.ci-item { padding: 12px 0; }
.ci-item + .ci-item { border-top: 1px solid var(--line); }
.ci-vals { display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin-top: 2px; flex-wrap: wrap; }
.ci-vals b { color: var(--text); }

/* ---------- Chat ---------- */
.chat-list { display: flex; flex-direction: column; gap: 6px; }
.day-sep { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: transparent; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.bubble time { display: block; font-size: 11px; opacity: .65; margin-top: 2px; text-align: right; }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 25;
  padding: 10px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.composer form { max-width: 640px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 140px; border-radius: 22px; padding: 11px 16px; background: var(--card); border-color: var(--line); resize: none; }
.send-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.send-btn svg { width: 20px; height: 20px; }
.send-btn:disabled { opacity: .4; }

/* ---------- Einstellungen ---------- */
.list-card { padding: 4px 16px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 52px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row input { background: var(--card-2); }

/* ---------- Fragebogen (Kunde) ---------- */
.q-card { margin-top: 12px; }
.q-card.q-missing { border-color: var(--bad); }
.q-label { margin-bottom: 10px; }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip { border: 1px solid var(--line); background: var(--card-2); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.q-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.q-card .seg button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- Anmeldung ---------- */
body.no-nav .tabbar { display: none; }
body.no-nav #view { padding-bottom: 40px; }
.auth { max-width: 420px; margin: 0 auto; padding-top: 8vh; }
.auth h1 { text-align: center; }
.auth > .muted { text-align: center; margin: 6px 0 20px; }
.auth-logo { display: grid; place-items: center; margin-bottom: 14px; }
.auth-logo img { border-radius: 14px; }
/* Schriftzug statt Logo – wie der Titel auf donai.de */
.wordmark { font-family: "Anton", "Impact", "Arial Narrow", sans-serif; font-weight: 400; letter-spacing: .02em; line-height: 1; color: var(--brand-white); text-transform: uppercase; }
.auth-logo .wordmark { font-size: 52px; }
.form-error { color: var(--bad); font-size: 14px; font-weight: 600; min-height: 1em; margin-top: 10px; }
.auth form .switch { display: flex; }
.auth form > label.field + label.field { margin-top: 12px; }
code { font-size: .9em; background: var(--card-2); padding: 1px 5px; border-radius: 6px; }

/* ---------- Sheet / Timer / Toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sheet-backdrop.open { background: rgba(0,0,0,.38); }
.sheet {
  width: 100%; max-width: 640px; background: var(--card); border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .22s ease-out;
  max-height: 90vh; overflow-y: auto;
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet-handle { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 14px; }
.timer { text-align: center; }
.timer-kind { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.timer-rest .timer-kind { color: var(--amber); }
.timer-title { font-size: 19px; margin-top: 4px; }
.timer-ring { position: relative; width: 220px; height: 220px; margin: 18px auto; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--card-2); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .2s linear; }
.timer-rest .ring-fg { stroke: var(--amber); }
.timer.done .ring-fg { stroke: var(--ok); }
.timer-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.timer.done .timer-num { color: var(--ok); }
.timer-btns { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 8px; }
.timer-btns .btn-lg { min-width: 140px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; width: max-content; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* Offline-Hinweis */
.netbar { position: sticky; top: 0; z-index: 30; background: var(--warn); color: var(--brand-blue); font-size: var(--fs-small); font-weight: 600;
  line-height: 1.4; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; text-align: center; }

/* Rechtliches & Einwilligung */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.45; margin: 4px 0; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 0; }
.consent a, .legal a { color: var(--accent); text-decoration: underline; }
.legal h2 { font-size: 18px; margin: 18px 0 6px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { font-size: 15px; line-height: 1.55; }
.legal ul { padding-left: 18px; margin: 6px 0; }
.legal-missing { background: #fde68a; color: #7c2d12; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.link-btn { border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; padding: 0; cursor: pointer; }
.video-consent { display: grid; justify-items: center; gap: 8px; text-align: center; background: var(--card-2); border-radius: 14px; padding: 18px 16px; margin-top: 10px; color: var(--muted); }
.video-consent svg { width: 28px; height: 28px; }
.video-consent p { font-size: 13px; margin: 0; line-height: 1.45; }
.video-consent a { color: var(--accent); text-decoration: underline; }
.video-consent label { display: flex; gap: 6px; align-items: center; }
.install-hint { display: flex; gap: 12px; align-items: flex-start; }
.install-hint svg { width: 22px; height: 22px; flex: none; color: var(--accent); }


/* ===================== Startseite „Training“ (Mitglied) ===================== */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.display, .display-xl, .prog-title { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.02; }
.display { font-size: 26px; margin: 4px 0 0; }
.display-xl { font-size: 38px; margin: 2px 0 12px; }
.train-top { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.train-label { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.badge-wrap { position: relative; }
.badge-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.prog-head { margin: 6px 2px 16px; }
.prog-title { font-size: 34px; margin: 0 0 4px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.week-nav { display: flex; align-items: center; gap: 2px; margin: 0 0 10px; }
.week-nav > span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 0 4px; }
.week-nav .icon-btn { width: 34px; height: 34px; }
.btn-ghost-sm { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px; border-radius: 18px; background: rgba(8, 14, 26, .35); border: 1px solid var(--line); margin-bottom: 14px; }
.ds-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border: 0; border-radius: 13px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.ds-day span { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ds-day b { font-family: var(--font-head); font-size: 18px; line-height: 1.1; }
.ds-day i { display: grid; place-items: center; height: 14px; }
.ds-check svg { width: 14px; height: 14px; color: var(--ok); stroke-width: 3; }
.ds-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.ds-day.today:not(.sel) b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.ds-day.sel { background: var(--brand-white); color: var(--brand-blue); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.ds-day.sel span { color: color-mix(in srgb, var(--brand-blue) 70%, transparent); }
.ds-day.sel .ds-check svg { color: #0f8a5f; }

.today-panel { position: relative; padding: 18px 16px 14px; border-radius: 24px; background: var(--grad-panel); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; }
.session { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px; border-radius: 18px; background: var(--grad-session); border: 1px solid rgba(255, 255, 255, .06); }
.session + .session { margin-top: 10px; }
.session.rest { grid-template-columns: 1fr; }
.session-art { border-radius: 14px; display: grid; place-items: center; min-height: 110px; color: rgba(251, 251, 251, .85);
  background: radial-gradient(80% 80% at 30% 20%, rgba(150, 185, 235, .45) 0%, rgba(150, 185, 235, 0) 70%), linear-gradient(160deg, #3b5b86 0%, #22324f 100%); }
.session-art svg { width: 40px; height: 40px; }
.session-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.session-title { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 20px; line-height: 1.05; margin: 2px 0 0; overflow-wrap: anywhere; }
.btn-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 26px; border-radius: 999px; background: var(--brand-white); color: var(--brand-blue); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; width: 100%; }
.btn-pill svg { width: 15px; height: 15px; fill: currentColor; }
.session-more { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 2px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; align-self: center; }
.session-more .chev svg { width: 14px; height: 14px; transition: transform .15s; }
.session-more .chev.up svg { transform: rotate(180deg); }
.session-list { grid-column: 1 / -1; margin: 2px 0 0; padding: 10px 12px 4px 30px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.session-list li { padding: 3px 0; }
.session-list .session-plan { list-style: none; margin: 6px 0 0 -18px; font-weight: 600; }
.chip-done { background: var(--ok-soft); color: var(--ok); }
.team-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(8, 14, 26, .35); border: 1px solid rgba(255, 255, 255, .06); }
.team-row .grow { display: flex; flex-direction: column; min-width: 0; }
.team-av { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(145deg, #4a6d9c, #263a5c); box-shadow: 0 0 0 2px rgba(251, 251, 251, .85); }
.team-av i { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-white); color: var(--brand-blue); }
.team-av i svg { width: 12px; height: 12px; }

.coaching-card { width: 100%; margin-top: 12px; display: flex; gap: 14px; align-items: center; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.coaching-thumb { position: relative; flex: none; width: 96px; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #3b5b86, #1f2d47); }
.coaching-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 251, 251, .92); color: var(--brand-blue); }
.play-badge svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }
.coaching-card b { display: block; margin: 2px 0; }

.block-card { margin-top: 14px; background: var(--grad-block); border-color: rgba(255, 255, 255, .08); }
.segs { display: flex; gap: 8px; margin: 14px 0 6px; }
.seg-group { flex: 1; display: flex; gap: 3px; }
.seg-group i { flex: 1; height: 6px; border-radius: 3px; background: rgba(251, 251, 251, .16); }
.seg-group i.past { background: rgba(251, 251, 251, .55); }
.seg-group i.now { background: var(--brand-white); box-shadow: 0 0 10px rgba(251, 251, 251, .5); }
.phase-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.phase-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--muted); font-size: 14px; }
.phase-list li b { color: inherit; font-weight: 600; flex: 1; min-width: 0; }
.phase-list .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(251, 251, 251, .1); flex: none; }
.phase-list .when { font-size: 12px; text-align: right; }
.phase-list li.now { color: var(--text); background: linear-gradient(90deg, rgba(251, 251, 251, .16), rgba(251, 251, 251, .05)); }
.phase-list li.now .num { background: var(--brand-white); color: var(--brand-blue); }
.phase-list li.past { opacity: .7; }

/* ===================== Chat & Forum ===================== */
.chat-head { display: flex; align-items: flex-start; gap: 12px; margin: 6px 2px 10px; }
.chat-title { font-size: 28px; line-height: 1.1; margin: 2px 0; }
.feed { display: flex; flex-direction: column; }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-sep span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.msg { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 8px 2px; }
.msg.pending { opacity: .6; }
.msg-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700;
  background: linear-gradient(145deg, #3e5f8c, #24365a); color: var(--brand-white); }
.msg-av.coach { background: var(--brand-white); color: var(--brand-blue); box-shadow: 0 0 0 2px rgba(251, 251, 251, .25); }
.msg-body { min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-head b { font-size: 15px; }
.msg-head time { font-size: 12px; color: var(--muted); }
.msg-badge { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--brand-white); color: var(--brand-blue); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 1px; }
.msg.mine .msg-text { color: var(--text); }
.msg-quote { margin: 4px 0 4px; padding: 6px 10px; border-left: 3px solid rgba(251, 251, 251, .5); border-radius: 4px 10px 10px 4px; background: rgba(8, 14, 26, .35); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; }
.msg-quote b { color: var(--text); font-size: 12px; }
.msg-quote span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.react { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.react span { font-size: 12px; font-weight: 700; }
.react.on { border-color: rgba(251, 251, 251, .7); background: rgba(251, 251, 251, .16); }
.react.add { color: var(--muted); padding: 0 7px; }
.react.add svg { width: 16px; height: 16px; }
.msg-link { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 2px; }
.msg-link.danger { color: var(--bad); }
.emoji-pick { display: inline-flex; gap: 2px; margin-top: 6px; padding: 4px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.emoji-pick[hidden] { display: none; }
.emoji-pick button { border: 0; background: none; font-size: 20px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.emoji-pick button:active { background: rgba(255, 255, 255, .1); }
.reply-bar { max-width: 640px; margin: 0 auto 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 4px 6px 12px; border-left: 3px solid var(--brand-white); background: rgba(8, 14, 26, .35); border-radius: 4px 10px 10px 4px; }
.reply-bar[hidden] { display: none; }
.reply-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .icon-btn { width: 30px; height: 30px; }
.hero-card { text-align: left; background: var(--grad-panel); }
.hero-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-white); color: var(--brand-blue); }
.hero-icon svg { width: 26px; height: 26px; }
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.pre { white-space: pre-wrap; }

/* ===================== Demo-Knopf (Übungsvideo in der App) ===================== */
.btn-demo { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 6px; margin-top: 10px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #fbfbfb 0%, #d9e4f3 100%); color: var(--brand-blue); font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.btn-demo svg { width: 26px; height: 26px; padding: 7px; border-radius: 50%; background: var(--brand-blue); color: var(--brand-white); fill: currentColor; }
.btn-demo.on { background: rgba(251, 251, 251, .14); color: var(--text); box-shadow: inset 0 0 0 1px rgba(251, 251, 251, .4); }
.btn-demo.on svg { background: var(--brand-white); color: var(--brand-blue); }
.btn-demo.sm { height: 32px; margin: 0; padding: 0 12px 0 4px; font-size: 11px; flex: none; align-self: center; }
.btn-demo.sm svg { width: 24px; height: 24px; padding: 6px; }
.video-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.video-slot:empty { display: none; }
.ex-line + .video-slot { margin: 0 0 8px; }
.video-slot + .ex-line { border-top: 1px solid var(--line); }

/* Kästchen und Optionsfelder im Markenstil (iOS zeigt sonst schwarze Kreise) */
:where(input[type=checkbox], input[type=radio]) {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0 6px 0 0; flex: none; vertical-align: -4px;
  border: 2px solid rgba(251, 251, 251, .75); border-radius: 6px; background: transparent; cursor: pointer;
  display: inline-grid; place-content: center; transition: background .12s, border-color .12s;
}
:where(input[type=radio]) { border-radius: 50%; }
:where(input[type=checkbox])::before { content: ""; width: 11px; height: 6px; border: solid var(--brand-blue); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .12s; }
:where(input[type=radio])::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-blue); transform: scale(0); transition: transform .12s; }
:where(input[type=checkbox], input[type=radio]):checked { background: var(--brand-white); border-color: var(--brand-white); }
:where(input[type=checkbox]):checked::before { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
:where(input[type=radio]):checked::before { transform: scale(1); }
:where(input[type=checkbox], input[type=radio]):focus-visible { outline: 2px solid var(--brand-white); outline-offset: 2px; }
.switch input::before { content: none; }
.switch input { display: inline-block; margin: 0; }

/* Auswertung einer Einheit + Anstrengungs-Skala beim Abschließen */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.stat-grid > div { display: flex; flex-direction: column; gap: 2px; }
.stat-grid b { font-size: 1.15rem; }
.stat-grid span { font-size: .78rem; opacity: .75; }
.rpe-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0 4px; }
.rpe-scale button { min-height: 40px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.25)); background: transparent; color: inherit; font: inherit; font-weight: 700; }
.rpe-scale button.on { background: var(--brand-white); color: var(--brand-blue); border-color: var(--brand-white); }

/* Fortschritt: Zeitraum wählen, Tageswerte */
.period-seg { margin-bottom: 8px; }
.period-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.period-row b { flex: 1; text-align: center; }
.period-row .icon-btn[disabled] { opacity: .3; }
.health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.health-grid > div { display: flex; flex-direction: column; gap: 2px; }
.health-grid b { font-size: 22px; }
.health-grid span { font-size: 12px; color: var(--muted); font-weight: 600; }
