/* ACI Trainingsbuchung – angelehnt an den Vereins-Stundenplan: rote Zeitblöcke, graue Felder für Freies Training */
:root {
  --bg: #f4f1f0; --surface: #ffffff; --surface-2: #f8f6f5; --ink: #1d1a1a; --muted: #6d6564; --line: #e3dcda;
  --red: #b02a2c; --red-dark: #8f1f22; --red-ink: #ffffff; --red-soft: #f7e4e3;
  --grey-cell: #dcdada; --ok: #2c7a4b; --ok-soft: #e1f1e7; --warn: #9a6300; --warn-soft: #fbefd8;
  --shadow: 0 1px 2px rgba(29, 26, 26, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Narrow", "Roboto Condensed", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141112; --surface: #1f1b1c; --surface-2: #262122; --ink: #f1ecea; --muted: #a79d9b; --line: #352f30;
    --red: #cf3b3c; --red-dark: #e05a5a; --red-ink: #ffffff; --red-soft: #3b2021;
    --grey-cell: #3a3536; --ok: #5cbf86; --ok-soft: #1b3326; --warn: #e3a648; --warn-soft: #3a2c14;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); -webkit-text-size-adjust: 100%; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 0 max(16px, env(safe-area-inset-right, 0px)); }

/* Kopf */
.top { background: var(--red); color: var(--red-ink); padding-top: env(safe-area-inset-top, 0px); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.top img { width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; }
.top h1 { font: 700 1.15rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; margin: 0; flex: 1; min-width: 0; }
.top h1 small { display: block; font: 500 .78rem var(--font); letter-spacing: 0; text-transform: none; opacity: .85; }
.icon-btn { background: transparent; border: 0; color: inherit; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; position: relative; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 4px; right: 4px; background: #fff; color: var(--red); font-size: .7rem; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; }

.demo { background: var(--warn-soft); color: var(--ink); font-size: .85rem; border-bottom: 1px solid var(--line); }
.demo .wrap { display: flex; gap: 8px; align-items: center; padding-block: 5px; }
.demo .wrap > span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo b { font-weight: 600; }
.demo.probe { background: #d6e6fb; border-bottom-color: #2f6fbf; }
.demo.probe button { border-color: #2f6fbf; }
@media (prefers-color-scheme: dark) { .demo.probe { background: #1d3557; } }
.demo button { flex: none; background: transparent; border: 1px solid var(--warn); color: var(--ink); border-radius: 6px; padding: 2px 10px; font-size: .82rem; }

main.wrap { padding-block: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
h2 { font: 700 1.35rem/1.15 var(--display); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 0; }
h3 { font: 700 .82rem var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Navigation unten */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs .wrap { display: flex; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 9px; color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 600; }
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--red); }

/* Segmente und Tage */
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 8px 10px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.seg button.on { background: var(--ink); color: var(--bg); }
.seg.wrapping { flex-wrap: wrap; overflow: visible; }
.seg.wrapping button { flex: 1 1 auto; }
.toolbar { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
@media (max-width: 520px) { .toolbar { grid-template-columns: 1fr 1fr; } .toolbar input { grid-column: 1 / -1; } }
/* Mitglieder: Suchfeld immer in eigener, voller Zeile; darunter Filter, Sortierung und Knopf */
.toolbar.mem-tools { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.toolbar.mem-tools input { grid-column: 1 / -1; }
@media (max-width: 720px) { .toolbar.mem-tools { grid-template-columns: 1fr 1fr; } }
.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.days.seven { grid-template-columns: repeat(7, 1fr); }
.day { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.day b { font: 700 1.05rem var(--display); text-transform: uppercase; letter-spacing: .04em; }
.day small { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day i { width: 6px; height: 6px; border-radius: 50%; margin-top: 2px; background: transparent; }
.day i.mine { background: var(--ok); }
.day i.wait { background: var(--warn); }
.day.on { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.day.on small { color: var(--red-ink); }
.day.on i.mine, .day.on i.wait { background: var(--red-ink); }
.day.today:not(.on) { border-color: var(--red); }

/* Einheit */
.list { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.slot { display: grid; grid-template-columns: 74px 1fr; overflow: hidden; }
.slot.booked { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.slot.waiting { border-color: var(--warn); }
.slot.releasing { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.slot.past { opacity: .6; }
.time { background: var(--red); color: var(--red-ink); font: 700 1.08rem/1.15 var(--display); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 4px; font-variant-numeric: tabular-nums; }
.time span:last-child { opacity: .85; font-size: .92em; }
.slot.frei .time { background: var(--grey-cell); color: var(--ink); }
.slot .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.name { font: 700 1.12rem var(--display); text-transform: uppercase; letter-spacing: .05em; }
.meter { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.meter > span { white-space: nowrap; }
.seats { display: grid; grid-auto-flow: column; grid-auto-columns: 8px; gap: 2px; }
.seats i { height: 9px; border-radius: 2px; background: var(--line); }
.seats i.f { background: var(--ink); }
.seats i.me { background: var(--ok); }
.tag { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.tag.ok { color: var(--ok); background: var(--ok-soft); }
.tag.warn { color: var(--warn); background: var(--warn-soft); }
.tag.red { color: var(--red); background: var(--red-soft); }
.tag.grey { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn { border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; font-weight: 600; font-size: .95rem; background: var(--red); color: var(--red-ink); min-height: 40px; }
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.warn { background: var(--warn); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: .86rem; }
.btn:disabled { background: var(--line); color: var(--muted); border-color: transparent; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.release { background: var(--warn-soft); border-radius: 9px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.release b { font-variant-numeric: tabular-nums; }
.release .btn { margin-left: auto; }

.banner { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; top: calc(56px + env(safe-area-inset-top, 0px) + 8px); z-index: 10; }
.banner .btn.ghost { color: var(--bg); border-color: rgba(255,255,255,.35); margin-left: auto; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.note.unread { border-color: var(--red); background: var(--red-soft); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 1px dashed var(--line); border-radius: 12px; }

/* Trainer */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.people li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people .n { flex: 1; min-width: 0; }
.people .n .sub { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 3px; font-size: .8rem; color: var(--muted); }
.people li > .btn, .people li > .confirm { flex: none; }
.people .pos { width: 22px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.check { width: 22px; height: 22px; accent-color: var(--ok); }
.search { position: relative; }
/* Trefferliste direkt unter dem Feld im normalen Fluss: wird von der Karte nicht abgeschnitten */
.results { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; max-height: 300px; overflow: auto; }
.results button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 12px; border-top: 1px solid var(--line); font-size: 1rem; }
.results button:first-child { border-top: 0; }
.results button:hover { background: var(--surface-2); }

/* Formulare */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); min-width: 0; }
input[type=text], input[type=number], input[type=time], input[type=search], input[type=email], input[type=tel], select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 9px 11px; font-size: 1rem; width: 100%; min-width: 0; color: var(--ink);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .95rem; }
.toggle input { width: 20px; height: 20px; accent-color: var(--red); }
.pad { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.mrow { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); width: 100%; }
.mrow.open { background: var(--surface-2); }
.mrow .mname { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 0; color: var(--ink); font: inherit; }
.mrow .cnts { margin-top: 2px; display: flex; flex-direction: column; align-items: flex-start; }
.mrow .cnt { padding: 3px 0; font-size: .85rem; text-decoration: none; text-align: left; }
.mrow .cnt::after { content: ' ›'; }
.mrow .cnt.on { font-weight: 700; }
.mrow .chips { margin-top: 2px; flex: 0 1 auto; max-width: 38%; justify-content: flex-end; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; position: relative; display: grid; place-items: center; background: var(--line); color: var(--muted); font-weight: 700; font-size: .9rem; border: 0; padding: 0; text-transform: uppercase; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 120px; height: 120px; font-size: 2rem; }
.photo { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.photo .pbody { flex: 1; min-width: 200px; display: grid; gap: 8px; }
label.file { cursor: pointer; display: inline-flex; align-items: center; }
.mpanel { padding: 10px 14px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.mpanel > .pad { padding: 10px 2px; }
.blist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.blist li { display: grid; grid-template-columns: 82px 1fr auto; gap: 8px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line); font-size: .9rem; }
.blist li:first-child { border-top: 0; }
.blist .d { font-weight: 600; font-variant-numeric: tabular-nums; }
.blist .n small { display: block; }
.mrow:first-child { border-top: 0; }
.mrow .n { flex: 1; min-width: 0; }
.mrow .n small { display: block; color: var(--muted); font-size: .8rem; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.copy { display: flex; gap: 6px; }
.copy input { font-size: .82rem; font-family: ui-monospace, Consolas, monospace; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font: 700 1.7rem/1 var(--display); color: var(--red); font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--red); }
.confirm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .88rem; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-size: .93rem; max-width: calc(100% - 32px); z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.toast.err { background: var(--red); color: #fff; }

.login .tag { align-self: center; }
.login { text-align: center; padding: 36px 8px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.login img { width: 140px; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; width: 100%; }
.who button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.who button small { display: block; color: var(--muted); font-size: .78rem; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .day, .seg button { transition: background .15s, color .15s; }
}

/* Trainerplan */
.tbl.plan { min-width: 560px; }
.tbl.plan th, .tbl.plan td { text-align: left; vertical-align: top; }
.tbl.plan td { padding: 6px; min-width: 96px; }
.tbl.plan td.kw { min-width: 70px; white-space: nowrap; }
.tbl.plan td.off { background: var(--surface-2); }
.tbl.plan td.gap { background: var(--red-soft); }
.tbl.plan select { padding: 6px 8px; font-size: .9rem; }
.tbl.plan .cellmeta { display: flex; gap: 8px; margin-top: 3px; }
.tbl.plan .cellmeta .link { font-weight: 500; color: var(--muted); }
.tbl.plan .cellmeta .link + .link { color: var(--warn); font-weight: 600; }
details summary { cursor: pointer; }

/* Meine Trainings */
.mine-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.mine-row .t { font: 700 1.05rem/1.1 var(--display); color: var(--red); display: flex; flex-direction: column; min-width: 52px; font-variant-numeric: tabular-nums; }
.mine-row .t small { font: 500 .78rem var(--font); color: var(--muted); }
.mine-row .n { flex: 1; min-width: 0; }
.mine-row .n small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.mine-row .chev { color: var(--muted); font-size: 1.1rem; }
.mine-row.open { border-color: var(--red); }
.day-row .t { min-width: 58px; }
.day-row .n small .tag { margin-top: 4px; }
.day-units { margin: 6px 0 10px 14px; padding-left: 10px; border-left: 3px solid var(--red); display: grid; gap: 6px; }
.card.exc { border-left: 4px solid var(--warn); padding: 10px 12px; display: grid; gap: 6px; }
.card.exc p { margin: 2px 0 0; }
.mrow small.seen.never { color: var(--warn); }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }

/* Hilfe */
.card.help { overflow: hidden; }
.help details { border-top: 1px solid var(--line); }
.help details:first-child { border-top: 0; }
.help summary { padding: 13px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; color: var(--red); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.help details[open] summary::after { content: "–"; }
.help .ans { padding: 0 16px 14px; line-height: 1.55; }
.help .ans p { margin: 6px 0; }
.help .ans ol, .help .ans ul { margin: 6px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.help .tip { background: var(--surface-2); border-left: 3px solid var(--red); padding: 7px 10px; border-radius: 4px; font-size: .92rem; }
.hb { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 0 7px; font-weight: 600; font-size: .88em; white-space: nowrap; line-height: 1.6; }
.hb.red { background: var(--red); color: var(--red-ink); border-color: var(--red); }
.hb.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.hb.warn { background: var(--warn); color: #fff; border-color: var(--warn); }
.hb.warnsoft { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.hb.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seats.demo { display: inline-grid; vertical-align: middle; }
a.icon-btn { color: inherit; }

/* ---------- 0.11: Freigabe, Sondertermine, Kalender ---------- */
.tag.blue { color: #2f6fbf; background: #dde9f8; }
@media (prefers-color-scheme: dark) { .tag.blue { color: #9cc2f2; background: #1d3557; } }
.slot.extra .time { background: #2f6fbf; }
.days .day.off { opacity: .6; }
.days .day i.extra { background: #2f6fbf; }
.closed-note { border-left: 4px solid var(--muted); }
.release-note { margin: 10px 2px 0; }
.mrow.upcoming { box-shadow: inset 4px 0 0 #2f6fbf; }
.tbl.plan td.closed { background: var(--surface-2); color: var(--muted); text-align: center; }
.cal { padding: 8px; }
.calhead, .calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calhead span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.calday { position: relative; aspect-ratio: 1 / 1; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; font-weight: 600; font-size: .9rem; }
.calday.other { opacity: .35; }
.calday.past { color: var(--muted); }
.calday.train { background: var(--surface-2); }
.calday.train::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: .6; }
.calday.closed { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 4px, var(--line) 4px, var(--line) 6px); }
.calday.closed::after { display: none; }
.calday small { font-size: .62rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.calday.today { border: 2px solid var(--red); }
.calday.on { outline: 3px solid var(--ink); outline-offset: -1px; }
.calday .xdot, .cal-legend .xdot { display: inline-grid; place-items: center; min-width: 14px; height: 14px; border-radius: 7px; background: #2f6fbf; color: #fff; font-size: .6rem; font-style: normal; padding: 0 3px; }
.cal-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; border: 1px solid var(--line); }
.cal-legend .lg.train { background: var(--surface-2); }
.cal-legend .lg.closed { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 3px, var(--line) 3px, var(--line) 5px); }
.calpanel { margin-top: 12px; border-color: var(--red); display: grid; gap: 8px; }
.calpanel h3 { margin-bottom: 0; }
.xrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.xrow small { display: block; color: var(--muted); }
.xeditor { display: grid; gap: 10px; padding: 12px; border: 1px solid #2f6fbf; border-radius: 10px; }
.xeditor .f > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.confirm-box { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--warn); border-radius: 10px; }
.xeditor div.f { display: grid; gap: 6px; }
.xeditor .toggle input[type="number"], .xeditor .toggle input[type="datetime-local"] { min-height: 34px; padding: 4px 8px; }
button.mrow { background: transparent; color: var(--ink); text-align: left; font: inherit; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; }
button.mrow:first-child { border-top: 0; }
button.mrow:hover { background: var(--surface-2); }
.mrow .stags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.app-version { text-align: center; margin: 22px 0 6px; }

/* 0.12.4: Teilnehmerliste für Mitglieder */
.slot.tappable { cursor: pointer; }
.ptoggle { align-self: flex-start; padding: 2px 0; }
.plist { border-top: 1px solid var(--line); padding-top: 8px; }
.plist ol { margin: 4px 0 8px; padding-left: 22px; display: grid; gap: 2px; font-size: .92rem; }
.warn-text { color: var(--warn) !important; }

/* 0.12.5: Trainerplan übersichtlicher, mehr Kontrast */
.tbl.plan { font-size: .95rem; }
.tbl.plan th { color: var(--ink); background: var(--surface-2); border-bottom: 2px solid var(--line); }
.tbl.plan th .small { color: var(--ink); opacity: .8; font-weight: 600; }
.tbl.plan .kw { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.tbl.plan th.kw { background: var(--surface-2); z-index: 2; }
.tbl.plan tbody tr:nth-child(even) td { background: var(--surface-2); }
.tbl.plan tr.now td { background: var(--red-soft) !important; }
.tbl.plan tr.now td.kw { box-shadow: inset 4px 0 0 var(--red), 1px 0 0 var(--line); }
.tbl.plan .nowlbl { color: var(--red); }
.tbl.plan tr.pastw td { opacity: .7; }
.tbl.plan .who { font-weight: 700; color: var(--ink); }
.tbl.plan .who.me { display: inline-block; padding: 1px 8px; margin-left: -8px; border: 2px solid var(--ink); border-radius: 999px; }
.tbl.plan .who.open, .tbl.plan td.gap select { color: var(--red); font-weight: 700; }
.tbl.plan td.gap { box-shadow: inset 0 0 0 2px var(--red); }
.tbl.plan select { font-weight: 700; color: var(--ink); }
.tbl.plan .dlink { text-decoration: none; color: var(--ink); opacity: .75; font-weight: 600; }
.tbl.plan tr.now td.past { opacity: .6; }
.tbl.plan { table-layout: fixed; }
.tbl.plan th.kw { width: 84px; }
.tbl.plan select { width: 100%; }
.tbl.plan .cellmeta { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.tbl.plan .nowlbl { display: block; white-space: normal; line-height: 1.15; }
/* 0.12.6: Namensfeld im Trainerplan dezent einheitlich hinterlegt */
:root { --name-bg: #eef2f7; --name-line: #c9d4e2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --name-bg: #263040; --name-line: #3c4a60; } }
:root[data-theme="dark"] { --name-bg: #263040; --name-line: #3c4a60; }
.tbl.plan .who:not(.open) { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--name-bg); border: 1px solid var(--name-line); }
.tbl.plan .who.me { border: 2px solid var(--ink); margin-left: 0; }
.tbl.plan select { background-color: var(--name-bg); border-color: var(--name-line); }
.tbl.plan td.gap select { background-color: var(--surface); }

/* 0.12.7: Kalender-Abo */
.cal-row .t { font-size: 1.4rem; display: grid; place-items: center; }
.cal-box .cal-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.cal-box .cal-btns .btn { text-decoration: none; }

/* 0.13.2: Meine Trainings hebt sich von Training buchen ab */
body[data-page="meine"] { background: var(--ok-soft); }
.mine-head { display: flex; align-items: center; gap: 12px; background: var(--ok); color: #fff; border-radius: 14px; padding: 14px 16px; margin: 4px 0 6px; }
.mine-head h2 { color: #fff; margin: 0; }
.mine-head p { margin: 4px 0 0; color: #fff; opacity: .92; }
.mine-head .mine-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--ok); font-weight: 800; }
.slot .time.date { background: var(--ok); color: #fff; }
.slot .time.date b { font-size: 1.15rem; }
.tabs a { text-align: center; line-height: 1.15; }
.cal-one { align-self: flex-start; text-decoration: none; padding: 2px 0; }
/* kräftiges Grün mit weißer Schrift, auch im dunklen Modus gut lesbar */
.mine-head, .slot .time.date { background: #2c7a4b; }
.mine-head .mine-ico { color: #2c7a4b; }

/* 0.14: Absage, Vertretung, Mitteilungen */
.slot.off { opacity: .75; }
.slot.off .time { background: var(--surface-2); color: var(--muted); }
.slot.off .name { text-decoration: line-through; }
.off-row { opacity: .8; }
.off-row .n b { text-decoration: line-through; }
.note.news { display: flex; gap: 10px; align-items: flex-start; border-left: 4px solid var(--red); margin: 6px 0; }
.note.news .news-ico { font-size: 1.2rem; line-height: 1.2; }
.note.news .news-text { flex: 1; }
.form-inline { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.form-inline input, .form-inline textarea, .form-inline select { width: 100%; }
.tools { gap: 12px; flex-wrap: wrap; margin: 2px 0; }
.link.danger { color: var(--red); }
.subs { padding: 4px 14px; }
.sub-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sub-row:last-child { border-bottom: 0; }
.sub-row .btn { flex: none; }
.day-units > .tools, .day-units > .form-inline { margin: 4px 2px 8px; }
textarea { font: inherit; }
.tag.dark { background: var(--ink); color: var(--bg); }

/* 0.15: Verwaltung */
dl.ro { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; font-size: .92rem; }
dl.ro dt { color: var(--muted); }
dl.ro dd { margin: 0; }
.note.course-note { border-left: 4px solid var(--ok); margin: 6px 0; }
.temp-btn { margin: 8px 0 0; }
.test-box { border: 2px dashed var(--warn); margin: 10px 0; }
.temp-ok { border: 2px solid var(--ok); }
.form-inline input[type="radio"], .form-inline input[type="checkbox"] { width: auto; }
