/* Kurs-App – Atelier Susan Schöne */
:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r: 14px;
  --nav-h: 62px;
}
:root[data-mode="dark"] { color-scheme: dark; }
:root[data-mode="light"] { color-scheme: light; }
/* ===== Farbschemata (erzeugt) ===== */
:root {
  --bg: #f9edda;
  --card: #fffdf9;
  --line: #e7d2b6;
  --ink: #2a2420;
  --muted: #75685d;
  --accent: #b2471f;
  --accent-soft: #fbd2be;
  --on-accent: #ffffff;
  --ok: #48774b;
  --ok-soft: #e3eedf;
  --warn: #a8701a;
  --warn-soft: #f8ecd3;
  --danger: #a23b2a;
  --chip: #f0dfc5;
}

@media (prefers-color-scheme: dark) {
:root:not([data-mode="light"]) {
  --bg: #201b17;
  --card: #2b251f;
  --line: #42382e;
  --ink: #f1ebe3;
  --muted: #ab9d8e;
  --accent: #ef845d;
  --accent-soft: #4f2e1e;
  --on-accent: #1d1a17;
  --ok: #8fbf8c;
  --ok-soft: #26352a;
  --warn: #e2b062;
  --warn-soft: #3a2f1d;
  --danger: #e07a69;
  --chip: #3b3229;
}
}
:root[data-mode="dark"] {
  --bg: #201b17;
  --card: #2b251f;
  --line: #42382e;
  --ink: #f1ebe3;
  --muted: #ab9d8e;
  --accent: #ef845d;
  --accent-soft: #4f2e1e;
  --on-accent: #1d1a17;
  --ok: #8fbf8c;
  --ok-soft: #26352a;
  --warn: #e2b062;
  --warn-soft: #3a2f1d;
  --danger: #e07a69;
  --chip: #3b3229;
}

:root[data-scheme="rose"] {
  --bg: #fde4e7;
  --card: #fffbfb;
  --line: #eec7ce;
  --ink: #3a2a2f;
  --muted: #856b73;
  --accent: #af4464;
  --accent-soft: #fec6d5;
  --on-accent: #ffffff;
  --ok: #457957;
  --ok-soft: #e4f0e7;
  --warn: #a8701a;
  --warn-soft: #f8ecd3;
  --danger: #a63a4a;
  --chip: #f5d2da;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="rose"]:not([data-mode="light"]) {
  --bg: #221a1d;
  --card: #2e2428;
  --line: #45363d;
  --ink: #f6edf0;
  --muted: #b6a0a8;
  --accent: #f3a9bf;
  --accent-soft: #543041;
  --on-accent: #2a1a20;
  --ok: #9cc8a6;
  --ok-soft: #25352a;
  --warn: #e4b46a;
  --warn-soft: #3b301e;
  --danger: #ee8d98;
  --chip: #3f2e36;
}
}
:root[data-scheme="rose"][data-mode="dark"] {
  --bg: #221a1d;
  --card: #2e2428;
  --line: #45363d;
  --ink: #f6edf0;
  --muted: #b6a0a8;
  --accent: #f3a9bf;
  --accent-soft: #543041;
  --on-accent: #2a1a20;
  --ok: #9cc8a6;
  --ok-soft: #25352a;
  --warn: #e4b46a;
  --warn-soft: #3b301e;
  --danger: #ee8d98;
  --chip: #3f2e36;
}

:root[data-scheme="lavendel"] {
  --bg: #efe6fb;
  --card: #fdfcff;
  --line: #d6c4ef;
  --ink: #2e2838;
  --muted: #706682;
  --accent: #724ba2;
  --accent-soft: #dfcaf9;
  --on-accent: #ffffff;
  --ok: #3f775c;
  --ok-soft: #e1efe7;
  --warn: #a06c1c;
  --warn-soft: #f7ecd6;
  --danger: #a83d5c;
  --chip: #e2d3f7;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="lavendel"]:not([data-mode="light"]) {
  --bg: #1b1826;
  --card: #262233;
  --line: #3c3449;
  --ink: #f1edf7;
  --muted: #a99eba;
  --accent: #ceb1f3;
  --accent-soft: #3b2a58;
  --on-accent: #1f1729;
  --ok: #9ccab2;
  --ok-soft: #23332b;
  --warn: #e2b46c;
  --warn-soft: #393020;
  --danger: #ee8ca4;
  --chip: #342b43;
}
}
:root[data-scheme="lavendel"][data-mode="dark"] {
  --bg: #1b1826;
  --card: #262233;
  --line: #3c3449;
  --ink: #f1edf7;
  --muted: #a99eba;
  --accent: #ceb1f3;
  --accent-soft: #3b2a58;
  --on-accent: #1f1729;
  --ok: #9ccab2;
  --ok-soft: #23332b;
  --warn: #e2b46c;
  --warn-soft: #393020;
  --danger: #ee8ca4;
  --chip: #342b43;
}

:root[data-scheme="pfirsich"] {
  --bg: #ffede0;
  --card: #fffbf8;
  --line: #f7d2b6;
  --ink: #3a2b24;
  --muted: #846e61;
  --accent: #ad4b2b;
  --accent-soft: #ffd5bd;
  --on-accent: #ffffff;
  --ok: #4b7a45;
  --ok-soft: #e6f0df;
  --warn: #a36d17;
  --warn-soft: #f9edd3;
  --danger: #ae3a2f;
  --chip: #ffdec4;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="pfirsich"]:not([data-mode="light"]) {
  --bg: #221a15;
  --card: #2e241e;
  --line: #47372d;
  --ink: #f7eee8;
  --muted: #b9a295;
  --accent: #fdae89;
  --accent-soft: #5b3619;
  --on-accent: #2a1a12;
  --ok: #a3c999;
  --ok-soft: #27352a;
  --warn: #e8b766;
  --warn-soft: #3c301c;
  --danger: #ef8d80;
  --chip: #423126;
}
}
:root[data-scheme="pfirsich"][data-mode="dark"] {
  --bg: #221a15;
  --card: #2e241e;
  --line: #47372d;
  --ink: #f7eee8;
  --muted: #b9a295;
  --accent: #fdae89;
  --accent-soft: #5b3619;
  --on-accent: #2a1a12;
  --ok: #a3c999;
  --ok-soft: #27352a;
  --warn: #e8b766;
  --warn-soft: #3c301c;
  --danger: #ef8d80;
  --chip: #423126;
}

:root[data-scheme="sand"] {
  --bg: #f9ebd6;
  --card: #fffcf7;
  --line: #e8d2b2;
  --ink: #2f2922;
  --muted: #716355;
  --accent: #805b33;
  --accent-soft: #f3d9b5;
  --on-accent: #ffffff;
  --ok: #517038;
  --ok-soft: #e6edda;
  --warn: #9b6a16;
  --warn-soft: #f6ebd2;
  --danger: #a2432f;
  --chip: #efddbf;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="sand"]:not([data-mode="light"]) {
  --bg: #1f1c17;
  --card: #2a2620;
  --line: #423a2e;
  --ink: #f3ede4;
  --muted: #af9f8c;
  --accent: #e2c098;
  --accent-soft: #4a3726;
  --on-accent: #211a12;
  --ok: #a9c58f;
  --ok-soft: #283222;
  --warn: #e2b56a;
  --warn-soft: #3a301d;
  --danger: #e8907c;
  --chip: #3c3227;
}
}
:root[data-scheme="sand"][data-mode="dark"] {
  --bg: #1f1c17;
  --card: #2a2620;
  --line: #423a2e;
  --ink: #f3ede4;
  --muted: #af9f8c;
  --accent: #e2c098;
  --accent-soft: #4a3726;
  --on-accent: #211a12;
  --ok: #a9c58f;
  --ok-soft: #283222;
  --warn: #e2b56a;
  --warn-soft: #3a301d;
  --danger: #e8907c;
  --chip: #3c3227;
}

:root[data-scheme="olive"] {
  --bg: #f3f1e0;
  --card: #fefdf6;
  --line: #dbd7bb;
  --ink: #2a2b22;
  --muted: #6a6956;
  --accent: #5e692f;
  --accent-soft: #e1e7c3;
  --on-accent: #ffffff;
  --ok: #356e61;
  --ok-soft: #deede9;
  --warn: #9a6918;
  --warn-soft: #f5ecd4;
  --danger: #a4453a;
  --chip: #eae6ca;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="olive"]:not([data-mode="light"]) {
  --bg: #1d1f17;
  --card: #282920;
  --line: #3d3f30;
  --ink: #efefe6;
  --muted: #a8a893;
  --accent: #cfd997;
  --accent-soft: #343a22;
  --on-accent: #1b1e10;
  --ok: #8fc4b6;
  --ok-soft: #21322e;
  --warn: #e0b46a;
  --warn-soft: #38301e;
  --danger: #e8907f;
  --chip: #35382a;
}
}
:root[data-scheme="olive"][data-mode="dark"] {
  --bg: #1d1f17;
  --card: #282920;
  --line: #3d3f30;
  --ink: #efefe6;
  --muted: #a8a893;
  --accent: #cfd997;
  --accent-soft: #343a22;
  --on-accent: #1b1e10;
  --ok: #8fc4b6;
  --ok-soft: #21322e;
  --warn: #e0b46a;
  --warn-soft: #38301e;
  --danger: #e8907f;
  --chip: #35382a;
}

:root[data-scheme="petrol"] {
  --bg: #e9f2f1;
  --card: #fbfefd;
  --line: #c6dcd9;
  --ink: #132c2b;
  --muted: #4f6e6b;
  --accent: #0b6a6b;
  --accent-soft: #c9e6e3;
  --on-accent: #ffffff;
  --ok: #2f7a4f;
  --ok-soft: #dcefe3;
  --warn: #a8661a;
  --warn-soft: #f8e9cf;
  --danger: #b23a2e;
  --chip: #d6e9e7;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="petrol"]:not([data-mode="light"]) {
  --bg: #0d1b1b;
  --card: #142827;
  --line: #21413f;
  --ink: #e4f2f0;
  --muted: #8fb3af;
  --accent: #3fc6c2;
  --accent-soft: #123c3a;
  --on-accent: #06201f;
  --ok: #86d0a2;
  --ok-soft: #183527;
  --warn: #eab565;
  --warn-soft: #3a2e18;
  --danger: #f08b7e;
  --chip: #1a3533;
}
}
:root[data-scheme="petrol"][data-mode="dark"] {
  --bg: #0d1b1b;
  --card: #142827;
  --line: #21413f;
  --ink: #e4f2f0;
  --muted: #8fb3af;
  --accent: #3fc6c2;
  --accent-soft: #123c3a;
  --on-accent: #06201f;
  --ok: #86d0a2;
  --ok-soft: #183527;
  --warn: #eab565;
  --warn-soft: #3a2e18;
  --danger: #f08b7e;
  --chip: #1a3533;
}

:root[data-scheme="beere"] {
  --bg: #f6ecf2;
  --card: #fffbfd;
  --line: #e7cbdb;
  --ink: #2e1624;
  --muted: #7c566c;
  --accent: #9c1a5c;
  --accent-soft: #f3d2e3;
  --on-accent: #ffffff;
  --ok: #3b7552;
  --ok-soft: #dfeee4;
  --warn: #a8661a;
  --warn-soft: #f8e9cf;
  --danger: #b3302e;
  --chip: #eedbe6;
}

@media (prefers-color-scheme: dark) {
:root[data-scheme="beere"]:not([data-mode="light"]) {
  --bg: #1c1018;
  --card: #2a1823;
  --line: #47263b;
  --ink: #f7e8f0;
  --muted: #c597b1;
  --accent: #f475b3;
  --accent-soft: #4d1c38;
  --on-accent: #2b0a1c;
  --ok: #93cfa9;
  --ok-soft: #1f3427;
  --warn: #eab565;
  --warn-soft: #3a2e18;
  --danger: #f48a88;
  --chip: #3a1f30;
}
}
:root[data-scheme="beere"][data-mode="dark"] {
  --bg: #1c1018;
  --card: #2a1823;
  --line: #47263b;
  --ink: #f7e8f0;
  --muted: #c597b1;
  --accent: #f475b3;
  --accent-soft: #4d1c38;
  --on-accent: #2b0a1c;
  --ok: #93cfa9;
  --ok-soft: #1f3427;
  --warn: #eab565;
  --warn-soft: #3a2e18;
  --danger: #f48a88;
  --chip: #3a1f30;
}

/* ===== Ende Farbschemata ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: 1em; }
p { margin: .4em 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.warn-text { color: var(--warn); }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Kopf und Navigation */
header.top { position: sticky; top: 0; z-index: 20; background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.top h1 { font-size: 1.25rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .back, .top .gear { display: flex; color: var(--ink); padding: 6px; margin: -6px; border-radius: 10px; }
.top .gear.on { color: var(--accent); }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs-inner { max-width: 860px; margin: 0 auto; display: flex; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted); font-size: .68rem; font-weight: 500; }
.tabs a.on { color: var(--accent); }
.tabs a.on .ic { stroke-width: 2.1; }
main.wrap { max-width: 860px; margin: 0 auto; padding: 14px 16px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  nav.tabs { position: sticky; top: 53px; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); background: var(--bg); padding: 0; }
  .tabs a { flex-direction: row; justify-content: center; gap: 6px; font-size: .9rem; padding: 10px 0; }
  .tabs a .ic { width: 18px; height: 18px; }
  main.wrap { padding-bottom: 40px; }
}
.foot { margin-top: 30px; text-align: center; color: var(--muted); font-size: .8rem; }

/* Karten und Listen */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 14px; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.fold > summary { display: flex; align-items: center; gap: 8px; }
details.fold > summary h2 { margin: 0; flex: 1; }
details.fold > summary::after { content: ''; width: 8px; height: 8px; margin: 0 4px 4px 0; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
details.fold:not([open]) > summary::after { transform: rotate(-45deg); margin-bottom: 0; }
details.fold[open] > summary { margin-bottom: .6em; }
.stack > * + * { margin-top: 10px; }
.stack > h2 { margin-top: 6px; }
.grid2, .grid3 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: 1fr 1fr 1fr; }
.grid2 > *, .grid3 > * { min-width: 0; }
input[type=date], input[type=time] { min-width: 0; display: block; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid2 .grid2 { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0 0 14px; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card .list { border: 0; border-radius: 0; margin: 0 -16px; background: transparent; }
.list > li { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list > li:first-child { border-top: 0; }
.list > li > a { display: flex; align-items: center; gap: 10px; flex: 1; color: inherit; min-width: 0; }
.list.compact > li { padding: 9px 16px; }
.li-main { flex: 1; min-width: 0; }
.li-main b { font-weight: 600; }
.li-main .amount { white-space: nowrap; margin-left: 4px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.section-title { font-size: 1.05rem; margin: 18px 2px 8px; cursor: pointer; }

.kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.big-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.type { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
dl.facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 10px 0 12px; }
dl.facts dt { color: var(--muted); font-size: .88rem; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: 6px; } }

/* Tags und Chips */
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.tag.ok, .tag.stamm { background: var(--ok-soft); color: var(--ok); }
.tag.accent, .tag.gast { background: var(--accent-soft); color: var(--accent); }
.tag.warn, .tag.warte { background: var(--warn-soft); color: var(--warn); }
.tag.muted, .tag.archiv { opacity: .8; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-block; padding: 7px 13px; border-radius: 20px; background: var(--chip); color: var(--ink); font-size: .88rem; border: 0; font-family: inherit; cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); }
.chip b { font-weight: 600; opacity: .7; margin-left: 2px; }
.ph { display: flex; flex-wrap: wrap; gap: 5px; }
.ph .chip { font-size: .78rem; padding: 4px 9px; font-family: ui-monospace, Menlo, monospace; }

/* Knöpfe und Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 500 .82rem var(--sans); cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.btn .ic { width: 16px; height: 16px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.small { padding: 5px 11px; font-size: .8rem; }
.btn.mid { padding: 8px 14px; font-size: .88rem; }
.btn.big { width: 100%; padding: 11px 14px; font-size: .95rem; }
.btn[disabled] { opacity: .5; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; width: 100%; }
.list > li > .btnrow, .list > li > form.btnrow { width: 100%; margin: 2px 0 0; }
section.card > .btn, section.card > a.btn, .card.stack > a.btn { margin-right: 6px; }
.card.stack > .btn, .card.stack > form > .btn { justify-content: flex-start; }
.field { display: block; }
.field > span, .label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 16px var(--sans); -webkit-appearance: none; appearance: none; min-height: 44px;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.45; }
input.short { width: auto; flex: 1; min-width: 120px; }
.btnrow select { width: auto; flex: 1; min-width: 150px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
details > summary { cursor: pointer; }
details > summary.btn { list-style: none; display: inline-flex; margin-top: 8px; }
details > summary.btn::-webkit-details-marker { display: none; }
details.inline { display: inline-block; }
.pop { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 8px; }
.seg { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; }
.seg label { flex: 1; text-align: center; padding: 8px; border-radius: 10px; cursor: pointer; font-size: .92rem; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.search input { font-size: 17px; border-radius: 24px; padding-left: 16px; margin-bottom: 10px; }
.filters .field { margin-bottom: 8px; }

/* Hinweise */
.flash { padding: 11px 14px; border-radius: 12px; margin: 0 0 12px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.flash.err { background: color-mix(in srgb, var(--danger) 14%, var(--card)); color: var(--danger); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: .93rem; }
.note .ic { color: var(--accent); }
.welcome ol.steps { padding-left: 20px; margin: 0; }
.welcome li { margin: 6px 0; }
.welcome li.done { color: var(--muted); text-decoration: line-through; }

/* Heute */
h2.day { font-size: 1.6rem; margin: 6px 2px 12px; }
h2.day small { font-family: var(--sans); font-size: .9rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.lesson-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.time { font-size: .85rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.lesson-title { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.topic { margin: 12px 0 4px; padding: 12px 14px; background: var(--bg); border-radius: 12px; }
.topic-title { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.material { margin-top: 6px; font-size: .93rem; }
.material .label { display: inline; margin-right: 6px; }
.count { font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.attend { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.att { display: flex; align-items: center; gap: 8px; padding: 12px; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 500 1rem var(--sans); cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.att .ic { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); padding: 2px; stroke: transparent; }
.att.on { background: var(--ok-soft); border-color: var(--ok); }
.att.on .ic { background: var(--ok); border-color: var(--ok); stroke: var(--card); stroke-width: 3; }
.phones { margin-top: 14px; }
.phones summary { font-weight: 600; font-size: .95rem; padding: 6px 0; }
.plist { list-style: none; padding: 0; margin: 4px 0 0; }
.plist li { padding: 8px 0; border-top: 1px solid var(--line); }
.pname { color: var(--ink); font-weight: 600; }
.pcontact { font-size: .9rem; color: var(--muted); }
a.tel { font-weight: 600; white-space: nowrap; }
.paylist { list-style: none; padding: 0; margin: 0; }
.paylist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Kurse */
.block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; color: inherit; }
.block-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.course-rows { list-style: none; margin: 10px -16px -14px; padding: 0; }
.course-rows li a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink); flex-wrap: wrap; }
.free { color: var(--accent); }
.preview-group { padding: 10px 0; border-top: 1px solid var(--line); }
.sessions li.cancelled .li-main b { text-decoration: line-through; color: var(--muted); }
.sessions li.today { background: var(--accent-soft); }
.offer-row, .offer-box { background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: .92rem; }
.wl .wl-name { font-family: var(--serif); font-size: 1.1rem; }
.events ul { margin: 6px 0 0; padding-left: 18px; font-size: .86rem; }

/* Finanzen */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stats span { display: block; font-size: .78rem; color: var(--muted); }
.stats b { font-size: 1.05rem; }
.stats .warn b { color: var(--warn); }
.paylist-full li.paid { background: var(--ok-soft); }
.copyrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: end; padding: 8px 0; border-top: 1px solid var(--line); }
.copyrow .label { grid-column: 1 / -1; margin: 0; }
.copyrow pre { margin: 0; font: .95rem/1.4 var(--sans); white-space: pre-wrap; }
.tablewrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.tbl { border-collapse: collapse; font-size: .86rem; width: 100%; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl select, .tbl input { min-height: 36px; padding: 6px 8px; font-size: 14px; }

/* Mails */
.recips { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; }
.recips li { border-top: 1px solid var(--line); padding: 4px 0; }
.preview { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; background: var(--card); }
.prev-subject { font-weight: 600; margin: 4px 0 10px; }
pre.mailbody { white-space: pre-wrap; font: .95rem/1.5 var(--sans); background: var(--bg); padding: 12px; border-radius: 10px; }
.progress { height: 8px; background: var(--chip); border-radius: 8px; overflow: hidden; margin: 10px 0; }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
code { font-size: .82rem; overflow-wrap: anywhere; }

/* Einfache Seiten (Login, Einrichtung, Eltern-Antwort) */
body.simple { display: flex; justify-content: center; }
.simple-main { width: 100%; max-width: 480px; padding: calc(30px + env(safe-area-inset-top)) 16px 40px; }
.brand { font-family: var(--serif); color: var(--accent); font-size: .95rem; letter-spacing: .04em; margin-bottom: 18px; }
.simple-main h1 { font-size: 1.7rem; }
ul.checks { list-style: none; padding: 0; }
ul.checks li.ok { color: var(--ok); }
ul.checks li.bad { color: var(--danger); font-weight: 600; }
.contact-edit { padding: 10px 0; border-top: 1px solid var(--line); }

/* Suche */
.suggest-wrap { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 48px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.sg { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.sg:first-child { border-top: 0; }
.sg.on, .sg:hover { background: var(--accent-soft); }
.sg-l { font-weight: 600; }
.sg-s { font-size: .82rem; color: var(--muted); }
.maillist .snippet { color: var(--muted); margin-top: 3px; }
mark { background: var(--warn-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.dir { display: inline-block; width: 1.1em; font-weight: 700; }
.dir.in { color: var(--ok); }
.dir.out { color: var(--accent); }
.lesson.bday { border-left: 4px solid var(--accent); }

/* Karteikarte */
.profile-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font: 600 1.4rem var(--serif); flex: none; }
.profile-title { flex: 1; min-width: 0; }
.course-chips, .sib-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.sib-row .label { margin: 0 4px 0 0; }
.cchip { display: inline-block; padding: 5px 11px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); font-size: .84rem; font-weight: 500; }
.cchip.marked { background: var(--warn-soft); color: var(--warn); }
.sib-row .cchip { background: var(--chip); color: var(--ink); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick .ic { width: 16px; height: 16px; }
.note-box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); font-size: .93rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.person { padding: 10px 0; border-top: 1px solid var(--line); }
.card-head + .person { border-top: 0; padding-top: 4px; }
.person-name { font-weight: 600; margin-bottom: 2px; }
.person-name .role { display: inline-block; min-width: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-right: 4px; }
.person-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink); overflow-wrap: anywhere; }
.person-line .ic { width: 17px; height: 17px; color: var(--accent); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.info-grid .label { margin-bottom: 2px; }
.yes { color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.yes .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.no { color: var(--danger); font-weight: 600; }
@media (max-width: 380px) { .info-grid { grid-template-columns: 1fr; } }
.course-line { color: var(--ok); margin-top: 1px; }
/* Anwesenheit: Vor- und Nachname */
.att-n { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.att-n b { font-weight: 600; }
.att-n small { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-preview { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }

/* Kinderliste: jede Familie ein Rahmen */
.fam-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.fam-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); overflow: hidden; }
.fam-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--accent-soft); color: inherit; }
.fam-head svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.fam-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fam-title b { font-weight: 600; }
.fam-title small { color: var(--muted); font-size: .8rem; }
.fam-head .chev { color: var(--accent); font-size: 1.4rem; line-height: 1; }
.fam-kids { list-style: none; margin: 0; padding: 0; }
.fam-kids > li { border-top: 1px solid var(--line); }
.fam-kids > li:first-child { border-top: 0; }
.fam-kids > li > a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: inherit; }
.kid-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.type-line { display: block; margin-bottom: 2px; }

/* Termine beim Blockanlegen an- und abwählen */
.dchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.dchip { position: relative; cursor: pointer; }
.dchip input { position: absolute; opacity: 0; pointer-events: none; }
.dchip span { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--ok); background: var(--ok-soft); color: var(--ink); line-height: 1.15; }
.dchip span b { font-weight: 600; font-size: .92rem; }
.dchip span small { font-size: .66rem; color: var(--muted); max-width: 110px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dchip input:not(:checked) + span { border: 1.5px dashed var(--line); background: transparent; color: var(--muted); }
.dchip input:not(:checked) + span b { text-decoration: line-through; font-weight: 500; }
.dchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.fam-ref { border-left: 4px solid var(--accent); }
.hint-box { margin: 0; padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); font-size: .9rem; }
.grid-zip { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; }
.contact-edit .grid-name { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-box { padding: 10px 14px; border-radius: var(--r); background: var(--warn-soft, #fbeedd); font-size: .9rem; }
.check-box pre { margin: 6px 0 0; font: inherit; white-space: pre-wrap; }
.addr { white-space: pre-line; }
.parent-box { padding-top: 6px; border-top: 1px solid var(--line); }
.other-last summary { cursor: pointer; list-style: none; }
.other-last summary::-webkit-details-marker { display: none; }
.other-last[open] summary { margin-bottom: 6px; }

/* Aussehen: Hell/Dunkel und Farbschemata */
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg3 label { position: relative; }
.seg3 input, .scheme input { position: absolute; opacity: 0; pointer-events: none; }
.seg3 span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); font-size: .88rem; cursor: pointer; }
.seg3 span svg { width: 22px; height: 22px; }
.seg3 input:checked + span, .scheme input:checked + .scheme-card { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--accent); }
.schemes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scheme { position: relative; cursor: pointer; }
.scheme-card { display: block; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.scheme-prev { display: flex; height: 54px; }
.scheme-prev i { flex: 1; }
.scheme-card b { display: block; padding: 7px 10px 0; font-size: .92rem; }
.scheme-card small { display: block; padding: 0 10px 8px; color: var(--muted); font-size: .76rem; line-height: 1.25; }
.top .mode-btn { background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; }
.top .mode-btn svg { width: 22px; height: 22px; }

/* Fotos zu Kurstagen und Ideen */
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos .ph, .ph-add span, .pool-photos .ph { width: 76px; height: 76px; border-radius: 10px; }
.ph { padding: 0; border: 1px solid var(--line); background: var(--chip); overflow: hidden; cursor: zoom-in; display: block; flex: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.loading { display: grid; place-items: center; }
.ph.loading i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ph-add { position: relative; cursor: pointer; }
.ph-add input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.ph-add span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1.5px dashed var(--accent); color: var(--accent); background: var(--accent-soft); }
.ph-add span svg { width: 24px; height: 24px; }
.ph-add small { font-size: .7rem; }
.topic .photos { margin-top: 10px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15, 12, 10, .97); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.lightbox img { max-width: 100%; max-height: calc(100% - 80px); object-fit: contain; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 14px; color: #fff; }
.lb-bar button { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.lb-bar .lb-prev, .lb-bar .lb-next { font-size: 1.4rem; line-height: 1; padding: 6px 14px; }
.lb-bar .lb-del { background: rgba(220, 80, 70, .35); }
.lb-count { min-width: 48px; text-align: center; font-size: .9rem; opacity: .8; }

/* Ideen-Pool */
.pool { display: flex; flex-direction: column; gap: 12px; }
.pool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.pool-card h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 1.15rem; }
.pool-meta { color: var(--muted); font-size: .84rem; }
.pool-photos { display: flex; gap: 6px; overflow-x: auto; margin: 10px -2px 4px; padding: 0 2px; scrollbar-width: none; }
.pool-photos .ph { width: 88px; height: 88px; }
.pool-mat { font-size: .9rem; margin-top: 6px; }
.pool-mat .label { margin-right: 6px; }
.pool-dates { margin: 8px 0 0; padding: 0; list-style: none; font-size: .84rem; color: var(--muted); }
.pool-dates li { display: inline; }
.pool-dates li + li::before { content: " · "; }
.pool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag.idee { background: var(--warn-soft); color: var(--warn); }
.tag.geplant { background: var(--chip); color: var(--muted); }
.pick-banner { padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); font-size: .92rem; }
.pool-mat .label { display: inline; }
.small-chips { align-items: center; margin-top: -4px; } .small-chips .chip { font-size: .8rem; padding: 4px 10px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: -6px; }
.field-head .label { margin: 0; }
.field-head a svg, .idea-chip svg { width: 15px; height: 15px; vertical-align: -2px; }
.sg-head { padding: 7px 14px 5px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--chip); }
.similar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); font-size: .86rem; }
.similar span { flex: 1; min-width: 180px; }

/* Kontakte-Import */
.import-card.off .import-body { display: none; }
.import-card.off { opacity: .6; }
.import-head .check { width: 100%; align-items: center; }
.import-head .check span { display: flex; flex-direction: column; line-height: 1.25; }
.import-head .check small { color: var(--muted); font-size: .8rem; }
.import-body { padding: 12px 14px 14px; }
.imp-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.imp-kid, .imp-ct { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--bg); }
.imp-new { opacity: .75; border: 1px dashed var(--line); background: transparent; }
.warn-line { padding: 7px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--ink); font-size: .86rem; }
.raw-note pre { white-space: pre-wrap; font: inherit; font-size: .85rem; background: var(--bg); padding: 10px; border-radius: 8px; margin: 6px 0 0; }
.import-global select { flex: 1; min-width: 0; }
.imp-kid-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.imp-kid-row select { width: 100%; }
.imp-summary { color: var(--ink); line-height: 1.5; padding: 2px 2px 0; }
.imp-details summary { cursor: pointer; color: var(--accent); }
.import-global select { width: 100%; }
.cleanup-log { margin: 8px 0 0; padding-left: 18px; line-height: 1.5; } h2.sub { font-family: var(--serif); font-size: 1.1rem; margin: 18px 0 6px; }
.fam-kids li.hit { background: var(--accent-soft); } .live-info { margin: -4px 0 10px; color: var(--muted); }
.wl-pos { flex: none; min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; font-size: .78rem; font-weight: 600; background: var(--card); color: var(--accent); }
.wl-card .fam-head { flex-wrap: wrap; }
.wl-status { width: auto; padding: 6px 28px 6px 10px; font-size: .85rem; min-height: 0; }
.wl-card.off .import-body { display: none; }
.wl-wishes .grid3 select { width: 100%; }
.chip-n { opacity: .7; font-weight: 400; }

/* Heute: Überschrift, Kacheln mit Kontakt */
h2.day { font-size: 1.35rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-chip { font-family: var(--sans); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.kid-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; grid-auto-flow: dense; }
.kid-tile { display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.kid-tile.open { border-color: var(--accent); background: var(--accent-soft); }
.kid-tile .nofoto svg { width: 18px; height: 18px; color: var(--muted); }
.kid-panel { grid-column: 1 / -1; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.kp-person b { display: block; font-weight: 600; }
.kp-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.kp-line svg { width: 17px; height: 17px; }
.kp-note { font-size: .88rem; }
.kp-note .label { display: inline; margin-right: 6px; }

/* Karteikarte: Status wählen, Kurse antippen */
.status-pick { position: relative; }
.status-pick > summary { list-style: none; cursor: pointer; }
.status-pick > summary::-webkit-details-marker { display: none; }
.status-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.status-menu button { border: 0; cursor: pointer; text-align: left; font: inherit; font-size: .8rem; }
.status-menu button.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.qe-label { margin-top: 10px; }
.qe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.qe { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.qe b { font-weight: 600; font-size: .92rem; }
.qe small { color: var(--muted); font-size: .76rem; }
.qe.fits { border-color: var(--ok); }
.qe.full { opacity: .65; }

/* Kurs: mehrere Kinder eintragen */
.enroll-many > summary { list-style: none; }
.enroll-many > summary::-webkit-details-marker { display: none; }
.pick-head { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.pick-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.pick-row:has(input:checked) { background: var(--accent-soft); }
.pick-main { flex: 1; min-width: 0; }
.pick-bar { position: sticky; bottom: calc(var(--nav-h) + 8px); background: var(--card); padding: 8px 0; display: flex; gap: 8px; align-items: center; }
.note-group > summary { list-style: none; cursor: pointer; }
.note-group > summary::-webkit-details-marker { display: none; }
.note-group[open] > summary { margin-bottom: 6px; }
.note.sub { margin-left: 28px; font-size: .88rem; padding-top: 7px; padding-bottom: 7px; }

/* Hilfe */
.top .help-btn { display: flex; color: var(--muted); padding: 6px; margin: -6px 0; border-radius: 10px; }
.top .help-btn.on { color: var(--accent); }
.top .help-btn svg { width: 23px; height: 23px; }
.help-hint { margin: -2px 4px 14px; line-height: 1.45; }
.help-h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 8px; font-weight: 600; }
.help-hits li.best { background: var(--accent-soft); }
.hh-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hh-t small { color: var(--muted); font-size: .78rem; margin-top: 1px; }
.help-area { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 10px; overflow: hidden; }
.help-area > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.help-area > summary::-webkit-details-marker { display: none; }
.help-area > summary::after { content: '›'; float: right; color: var(--muted); transition: transform .15s; }
.help-area[open] > summary::after { transform: rotate(90deg); }
.help-area .list { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; }
.help-art { padding-bottom: 10px; }
.help-crumb { color: var(--accent); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 4px 2px 2px; }
.help-art h2 { margin: 0 2px 8px; font-size: 1.45rem; }
.help-intro { font-size: 1.05rem; margin: 0 2px 14px; }
.help-steps { list-style: none; counter-reset: st; margin: 0 0 16px; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.help-steps li { counter-increment: st; position: relative; padding: 12px 16px 12px 52px; border-top: 1px solid var(--line); line-height: 1.5; }
.help-steps li:first-child { border-top: 0; }
.help-steps li::before { content: counter(st); position: absolute; left: 14px; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .9rem; display: grid; place-items: center; }
.help-tips { background: var(--accent-soft); border-radius: var(--r); padding: 12px 16px; margin: 0 0 16px; line-height: 1.5; }
.help-tips ul { margin: 6px 0 0; padding-left: 18px; }
.help-tips li + li { margin-top: 4px; }
.shot { margin: 0 0 16px; }
.shot button { display: block; width: 100%; max-width: 420px; margin: 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); cursor: zoom-in; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 6px; }
.help-go { margin: 6px 0 4px; }
.help-more { margin: 18px 2px 0; }
.help-q { display: inline-flex; vertical-align: middle; color: var(--muted); margin-left: 4px; }
.help-q svg { width: 18px; height: 18px; }
.help-q span { font-size: .82rem; margin-left: 3px; }
.ph .help-q { align-self: center; text-decoration: none; }
h2 .help-q { margin-left: 2px; }
[data-help-all] .list a > span:first-child, .help-art .list a > span:first-child { flex: 1; }

/* Freeform-Import */
.ff-board h2 { margin-bottom: 4px; }
.ff-slot { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.ff-slot.done { opacity: .6; }
.ff-slot.off .ff-body { opacity: .35; pointer-events: none; }
.ff-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ff-head select { margin-left: auto; width: auto; max-width: 100%; font-size: .85rem; padding: 6px 28px 6px 10px; }
.ff-topic { margin-bottom: 6px; }
.ff-trow { display: flex; gap: 6px; align-items: center; }
.ff-trow input { flex: 1; min-width: 0; }
.ff-topic input, .ff-note { font-size: .95rem; padding: 8px 10px; }
.ff-mat { margin-top: 4px; width: 100%; font-size: .88rem !important; }
.ff-more { display: flex; gap: 14px; margin: 0 0 6px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 2px 0; color: var(--accent); font: 500 .85rem var(--sans); cursor: pointer; }
.ff-note { width: 100%; margin-bottom: 8px; }
.tag.vorschlag { background: var(--warn-soft, #fbefd5); color: var(--warn, #9a6a00); }
.ff-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.ff-img { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid var(--accent); }
.ff-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ff-img input { position: absolute; opacity: 0; }
.ff-img i { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-style: normal; display: grid; place-items: center; font-size: 13px; }
.ff-img i::after { content: '✓'; }
.ff-img:not(:has(input:checked)) { border-color: var(--line); }
.ff-img:not(:has(input:checked)) img { opacity: .35; filter: grayscale(1); }
.ff-img:not(:has(input:checked)) i { background: var(--chip); }
.ff-img:not(:has(input:checked)) i::after { content: ''; }
.ff-img small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .62rem; text-align: center; padding: 1px 0; }
.sticky-save { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 5; }

/* Finanzen: aufgeräumte Zeilen */
.paylist-full > li { display: block; padding: 12px 16px; }
.pay-head { display: flex; align-items: baseline; gap: 10px; }
.pay-head a { flex: 1; min-width: 0; color: inherit; }
.pay-head a b { color: var(--accent); }
.pay-kids { color: var(--muted); font-weight: 400; }
.pay-head .amount { white-space: nowrap; font-weight: 600; }
.pay-info { margin-top: 2px; }
.pay-act { margin-top: 8px; }
/* Zahlungsdatum */
.paydate { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 20px; background: var(--chip); color: var(--muted); font-size: .84rem; cursor: pointer; white-space: nowrap; flex: none !important; }
.paydate::before { content: ''; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.paydate.changed { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.paydate input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
button.link.small { font-size: .84rem; }

/* Kinder aus anderem Block übernehmen */
.tk-group { margin-bottom: 6px; }
.tk-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tk-row.off { opacity: .55; }
.tk-row select { width: auto; max-width: 55%; font-size: .85rem; padding: 6px 28px 6px 10px; }

/* Foto drehen */
.ph { position: relative; }
.ph-rot { position: absolute; right: 3px; bottom: 3px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.88); color: #333; font-size: 15px; line-height: 24px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; }
.ph.turning img { opacity: .4; }
.ph.turning .ph-rot { animation: spin .8s linear infinite; }

/* Übersicht: weitere Tage */
.day-later { margin: 0 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.day-later > summary { list-style: none; cursor: pointer; padding: 12px 16px 8px; }
.day-later > summary::-webkit-details-marker { display: none; }
.day-later-head { display: flex; align-items: center; gap: 6px; font-family: var(--serif, Georgia, serif); font-size: 1.08rem; font-weight: 600; }
.day-later-head::after { content: '›'; margin-left: auto; color: var(--muted); transition: transform .15s; font-family: var(--sans); }
.day-later[open] .day-later-head::after { transform: rotate(90deg); }
.day-later[open] > summary .day-lines { display: none; }
.day-later > .card { margin: 0 10px 10px; }
.day-lines { list-style: none; margin: 6px 0 0; padding: 0; }
.day-lines.solo { margin: 0 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px; }
.day-line { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.day-line:first-child { border-top: 0; }
.dl-time { color: var(--accent); font-weight: 600; min-width: 42px; }
.dl-main { flex: 1; min-width: 0; }
.dl-main small { display: block; color: var(--muted); }
.dl-meta { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.day-line.cancelled b { text-decoration: line-through; color: var(--muted); }
h2.day.later { margin-top: 22px; }
.top .fin-btn { display: flex; color: var(--muted); padding: 6px; margin: -6px 0; border-radius: 10px; }
.top .fin-btn.on { color: var(--accent); }
.top .fin-btn svg { width: 23px; height: 23px; }

/* Thema & Fotos auf Kurs-/Geburtstagsseiten */
.tc-day + .tc-day { border-top: 1px solid var(--line); padding-top: 12px; }
.tc-date { font-weight: 600; margin-bottom: 6px; }
.tc-form { margin-bottom: 8px; }

/* Knöpfe klar von Eingabefeldern unterscheiden */
.btn:not(.primary):not(.danger) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--ink); font-weight: 600; }
.btn:not(.primary):not(.danger):hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }
details[open] > summary.btn { background: var(--chip); }

/* Desktop: breiter und Formulare mehrspaltig */
@media (min-width: 960px) {
  .top-inner, .tabs-inner, main.wrap { max-width: 1040px; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: end; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > * { grid-column: 1 / -1; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > .field { grid-column: span 2; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > .field:has(textarea) { grid-column: 1 / -1; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > :is(.grid2, .grid-zip) { display: contents; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > :is(.grid2, .grid-zip) > * { grid-column: span 1; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > .btn, :is(.stack, .contact-edit):has(> .field, > .grid2) > button { justify-self: start; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > .btn.big { justify-self: stretch; }
  :is(.stack, .contact-edit):has(> .field, > .grid2) > .check { grid-column: span 2; align-self: center; }
}

.dates-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.field-dates { display: block; }
.pool-card h3 a { color: inherit; } .pool-card h3 a:hover { color: var(--accent); }

/* ---- Warteliste (1.17) ---- */
.card.wl { padding-bottom: 8px; }
.card.wl > div { margin-top: 3px; }
.wl-pos { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; margin-right: 8px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 700; vertical-align: 1px; }
.wl-name { font-size: 1.02rem; }
.card.wl .btnrow { margin-top: 8px; }
.wl-more { margin-top: 6px; }
.wl-more > summary { list-style: none; display: inline-block; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; color: var(--muted); font-weight: 700; letter-spacing: 2px; line-height: 24px; cursor: pointer; }
.wl-more > summary::-webkit-details-marker { display: none; }
.wl-more[open] > summary { border-color: var(--accent); color: var(--accent); }
.wl-events { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: .84rem; }
.wl-events li { padding: 2px 0; }
.wl-reply.wl-bleibt { border-left: 4px solid var(--ok); }
.wl-reply.wl-streichen { border-left: 4px solid var(--warn); }
.wl-reply.wl-unklar { border-left: 4px solid var(--line); }
.wl-mail blockquote { margin: 4px 0; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: .93rem; }
pre.wl-full { white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; background: var(--bg); padding: 10px 12px; border-radius: 10px; font: .84rem/1.4 ui-monospace, Menlo, monospace; }
.wl-choice span { padding: 9px 6px; }
.wl-reply .kopf { flex-wrap: wrap; }
.wl-reply .kopf > div { flex: 1 1 180px; }
.card.wl .btnrow select { flex: 0 1 380px; max-width: 100%; }
.wl-wishes { display: grid; gap: 6px; }
.wl-wishes .label { display: flex; align-items: center; gap: 8px; }
.wl-wish-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 760px) { .wl-wish-grid { grid-template-columns: repeat(3, 1fr); } }
.wl-wish { display: flex; align-items: center; gap: 8px; }
.wl-wish > span { flex: 0 0 auto; width: 1.4em; color: var(--muted); font-weight: 600; }
.wl-wish select { flex: 1 1 auto; min-width: 0; }
.wl-wish.changed select { border-color: var(--warn); background-color: var(--warn-soft); }
.wl-answer { display: grid; gap: 6px; }
.wl-answer textarea { min-height: 76px; }
.wl-apply { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.wl-all { display: flex; justify-content: center; margin: 6px 0 4px; }
.wl-reply.wl-done { padding-top: 12px; padding-bottom: 12px; border-left: 4px solid var(--ok); }
.ok-text { color: var(--ok); font-weight: 700; }
.wl-diag { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wl-diag li { padding: 8px 12px 8px 34px; border-radius: 10px; background: var(--bg); position: relative; font-size: .93rem; }
.wl-diag li::before { position: absolute; left: 12px; top: 8px; font-weight: 700; }
.wl-diag li.ok::before { content: '✓'; color: var(--ok); }
.wl-diag li.warn { background: var(--warn-soft); }
.wl-diag li.warn::before { content: '!'; color: var(--warn); }
.wl-diag li.info::before { content: 'i'; color: var(--muted); }
.wl-diag form { margin-top: 6px; }
.offer-data .hint { margin: -4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
.offer-yes > summary { list-style: none; display: block; text-align: center; }
.offer-yes > summary::-webkit-details-marker { display: none; }
.offer-yes[open] > summary { display: none; }
/* Finanzen: alle Vorgänge (1.22) */
.fin-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px 8px; margin: 0 0 12px; }
.fin-sec > summary { list-style: none; display: flex; align-items: baseline; gap: 8px; padding: 10px 0; cursor: pointer; font-family: var(--serif, Georgia, serif); font-size: 1.15rem; font-weight: 700; }
.fin-sec > summary::-webkit-details-marker { display: none; }
.fin-sec > summary::before { content: '▸'; font-size: .9rem; color: var(--muted); transition: transform .15s; display: inline-block; }
.fin-sec[open] > summary::before { transform: rotate(90deg); }
.fin-n { font-family: var(--sans, system-ui, sans-serif); font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 1px 8px; }
.fin-sum { margin-left: auto; font-size: 1rem; font-family: var(--sans, system-ui, sans-serif); }
.fin-over { border-color: var(--warn); }
.fin-over > summary .fin-title, .fin-over > summary .fin-sum { color: var(--warn); }
.fin-done > summary .fin-title { color: var(--muted); }
/* (3.8) „kommt noch“: angemeldet, aber noch nicht abgerechnet – leiser als offen */
.stats .soon { background: transparent; border-style: dashed; }
.stats .soon b { color: var(--muted); font-weight: 600; }
.fin-pending { border-style: dashed; }
.fin-pending > summary .fin-title, .fin-pending > summary .fin-sum { color: var(--muted); }
.pay-meta { color: var(--muted); margin-top: 2px; }
.pay-meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); }
.fin-empty { margin: 0 0 8px; }
/* Umsatz & Monate (1.23) */
.rev-mini { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 10px 14px; margin: 0 0 10px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; text-decoration: none; }
.rev-mini b { color: var(--ink); font-size: 1rem; margin-left: 4px; }
.rev-mini .rev-go { margin-left: auto; color: var(--accent); }
.rev-months { padding: 6px 14px; }
.rev-row { border-bottom: 1px solid var(--line); }
.rev-row:last-child { border-bottom: 0; }
.rev-row > summary, .rev-row.empty { list-style: none; display: grid; grid-template-columns: 6.2em 1fr auto; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; }
.rev-row.empty { cursor: default; color: var(--muted); }
.rev-row > summary::-webkit-details-marker { display: none; }
.rev-m { font-size: .95rem; }
.rev-row.now .rev-m { font-weight: 700; }
.rev-bar { height: 10px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.rev-bar i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.rev-row.planned .rev-bar i { opacity: .45; }
.rev-v { font-variant-numeric: tabular-nums; min-width: 6.5em; text-align: right; }
.rev-items { list-style: none; margin: 0 0 10px; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: .9rem; }
.rev-items li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.rev-items b { font-variant-numeric: tabular-nums; font-weight: 600; }
.rev-row.empty, .rev-row > summary { text-align: left; }
/* Bereiche (2.0) */
.title-block { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.title-block h1 { flex: none; }
.area-switch { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin: -2px 0 1px; padding: 1px 8px 1px 0; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-radius: 8px; }
.top .area-switch svg { width: 14px; height: 14px; opacity: .75; }
.area-switch:hover span, .area-switch:focus-visible span { text-decoration: underline; }
.area-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; background: var(--chip); color: var(--muted); vertical-align: 2px; }
.soon { text-align: center; padding: 28px 18px; }
.soon .soon-icon { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.soon .soon-icon svg { width: 28px; height: 28px; }
.soon ul { text-align: left; display: inline-block; margin: 8px auto 0; color: var(--muted); }
.shared-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .85rem; margin: 0 0 10px; }
/* Frei in Farbe (2.1) */
:root { --fif: #5f6b32; --fif-soft: #e9ecd8; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) { --fif: #c6cf92; --fif-soft: #2f3324; } }
:root[data-mode="dark"] { --fif: #c6cf92; --fif-soft: #2f3324; }
.area-tag.fif { background: var(--fif-soft); color: var(--fif); }
.fif-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 10px 12px; margin-bottom: 10px; }
.fif-card.cancelled { opacity: .6; }
.fif-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--chip); }
.fif-thumb.empty { display: grid; place-items: center; color: var(--muted); }
.fif-thumb.empty svg { width: 24px; height: 24px; }
.fif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fif-title { font-family: var(--serif); font-size: 1.08rem; }
.fif-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fif-desc p { margin: 0 0 .7em; line-height: 1.55; }
.fif-cover .photos { max-width: 260px; }
.fif-cover .ph, .fif-cover .ph-add { width: 220px; height: 150px; }
.fif-lesson { border-left: 4px solid var(--area-fif, var(--fif)); }
.day-line.fif .dl-main b { color: var(--area-fif, var(--fif)); }
.fif-bookings li { flex-wrap: wrap; }
.fif-bookings .pay-row { flex-wrap: wrap; }
.import-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 12px 14px; margin-bottom: 8px; }
.import-row > input { margin-top: 4px; flex: none; }
.import-row .li-main { display: flex; flex-direction: column; gap: 3px; }
.import-row.known { opacity: .75; }
.fif-import .fif-thumb { flex-basis: 72px; width: 72px; height: 72px; }
.fif-excerpt { color: var(--muted); }
.import-row .tag { width: fit-content; align-self: flex-start; justify-self: start; }

/* Mail-Vorschau im Fenster (2.1.1) */
.mp-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(20, 16, 12, .45); display: flex; align-items: flex-end; justify-content: center; padding: env(safe-area-inset-top) 0 0; }
.mp-overlay[hidden] { display: none; }
html.mp-open, html.mp-open body { overflow: hidden; }
.mp-sheet { background: var(--bg); width: 100%; max-width: 680px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .mp-overlay { align-items: center; } .mp-sheet { border-radius: 18px; max-height: 86vh; } }
.mp-bar { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; z-index: 1; }
.mp-head { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; }
.mp-head > div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.mp-head span { color: var(--muted); }
.mp-head b { font-weight: 600; word-break: break-word; }
.mp-note { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.mp-body { background: #fff; color: #2b2622; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; }
.mp-body a { pointer-events: auto; }
.chip.mp-chip { display: inline-flex; align-items: center; gap: 4px; }
.chip.mp-chip svg { width: 15px; height: 15px; }

/* Beide Bereiche in Finanzen und Übersicht (2.2) */
/* Farben --area-kinder / --area-fif setzt layout.php aus den Farbschemata der Bereiche */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.ac-kinder .dot, .as-kinder .dot, .ri-kinder .dot { background: var(--area-kinder); }
.ac-fif .dot, .as-fif .dot, .ri-fif .dot { background: var(--area-fif); }
.area-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.area-sums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
.area-sums > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; row-gap: 1px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: .85rem; }
.area-sums > div > span:first-of-type { color: var(--muted); }
.area-sums b { grid-column: 1 / -1; font-size: 1rem; }
.area-sums .small { grid-column: 1 / -1; }
.as-kinder { border-left: 4px solid var(--area-kinder) !important; }
.as-fif { border-left: 4px solid var(--area-fif) !important; }
.rev-key { display: flex; justify-content: center; gap: 16px; }
.rev-key span { display: inline-flex; align-items: center; gap: 6px; border: 0 !important; }
.paylist-full.marked > li { border-left: 4px solid transparent; padding-left: 10px; }
.paylist-full.marked > li.area-kinder { border-left-color: var(--area-kinder); }
.paylist-full.marked > li.area-fif { border-left-color: var(--area-fif); }
.rev-bar { display: flex; }
.rev-bar i { flex: none; border-radius: 0; }
.rev-bar i:last-child { border-radius: 0 4px 4px 0; }
.rev-bar i.b-kinder { background: var(--area-kinder); }
.rev-bar i.b-fif { background: var(--area-fif); }
.rev-items li span { display: inline-flex; align-items: center; gap: 7px; }
.area-tag.fif { background: var(--area-fif-soft); color: var(--area-fif); }
.lesson.area-kinder { border-left: 4px solid var(--area-kinder); }
.day-line.kinder .dl-time { color: var(--area-kinder); }
.day-line.fif .dl-time { color: var(--area-fif); }
.area-chips { margin-bottom: 12px; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }
.fif-req .kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.scan-row { align-items: center; margin-bottom: 10px; }
.reg-course { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin: 8px 0 14px; }
.reg-course b { font-size: 1.05rem; }
.reg-form .check span { line-height: 1.4; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 2.6.1 Warteliste: Kind | Familie | Eltern gleichberechtigt */
.wl-head { display: flex; align-items: flex-start; gap: 0; }
.wl-head .wl-pos { margin-top: 1px; }
.wl-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; font-size: .98rem; line-height: 1.35; }
.wl-who .who-seg { white-space: nowrap; padding: 0 10px; border-left: 1px solid var(--line); }
.wl-who .who-seg:first-child { padding-left: 0; border-left: 0; }
.wl-who .who-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 2px; }
.wl-who .who-seg { font-weight: 500; } .wl-who b { font-weight: inherit; }
.wl-who a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.wl-sub { margin-top: 3px; }
@media (max-width: 560px) {
  .wl-who { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 1px; }
  .wl-who .who-seg { display: contents; }
  .wl-who .who-label { align-self: baseline; margin: 0; }
}

/* Rechnungen (3.0) */
.inv-li .inv-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.inv-li .pay-act { width: 100%; margin-top: 2px; }
.inv-li.paid { background: var(--ok-soft); }
.inv-items { display: flex; flex-direction: column; gap: 10px; }
.inv-item { display: grid; grid-template-columns: 70px 110px 1fr 120px 36px; grid-template-areas: "qty unit title price del" "detail detail detail detail ."; gap: 6px 8px; align-items: end;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.inv-item label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-item label span { font-size: .75rem; color: var(--muted); }
.inv-item input { width: 100%; min-width: 0; }
.inv-qty { grid-area: qty; } .inv-unit { grid-area: unit; } .inv-title { grid-area: title; } .inv-detail { grid-area: detail; } .inv-price { grid-area: price; }
.inv-del { grid-area: del; padding: 6px 0; }
.inv-qty input, .inv-price input { text-align: right; }
@media (max-width: 620px) {
  .inv-item { grid-template-columns: 64px 1fr 110px 36px; grid-template-areas: "title title title title" "detail detail detail detail" "qty unit price del"; }
}
.inv-no { margin: 2px 0 6px; }
.inv-pos li { align-items: flex-start; }
.inv-dact { display: flex; flex: none; margin: -4px -8px 0 0; }
.pick-list li { flex-wrap: wrap; }

/* Erinnerungen (3.1) */
.note.rem { padding: 0; }
.note.rem > a { display: flex; align-items: center; gap: 10px; padding: 11px 6px 11px 14px; flex: 1; color: inherit; text-decoration: none; min-width: 0; }
.rem-done { flex: none; width: 40px; height: 40px; margin-right: 6px; border: 0; border-radius: 50%; background: transparent; color: var(--accent); font-size: 1.1rem; cursor: pointer; }
.rem-done:hover { background: var(--card); }
.copy-url code { display: block; word-break: break-all; font-size: .82rem; padding: 8px 10px; border-radius: 8px; background: var(--chip); }
ol.steps { margin: 0; padding-left: 20px; }
ol.steps li { margin: 3px 0; }

/* Auswahl-Fenster Kursliste (3.1) */
dialog.kl-dialog { border: 0; border-radius: var(--r); padding: 18px 18px 14px; width: min(92vw, 420px); background: var(--card); color: var(--ink); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog.kl-dialog::backdrop { background: rgba(30, 24, 20, .45); }
.kl-fields { display: flex; flex-direction: column; gap: 6px; }
.kl-fields .check { padding: 4px 0; }

/* ===== Ruhigere Seiten (3.2): Symbol-Knöpfe, „⋯“-Menü, Stift, „+“-Zeilen ===== */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--accent); cursor: pointer; flex: none; text-decoration: none; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover, .menu[open] > .icon-btn { background: var(--accent-soft); }
.icon-btn .ic { width: 20px; height: 20px; }
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 230px; max-width: 86vw; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 32px rgba(30, 20, 10, .2); padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.menu-pop.up { top: auto; bottom: calc(100% + 4px); }
.menu-pop.left { right: auto; left: 0; }
/* Karten mit abgerundeten Ecken schneiden sonst das offene Menü ab */
:is(.list, .fam-card, .day-later, .help-area, .card):has(details.menu[open]) { overflow: visible; }
:is(.list, .card) > li:has(details.menu[open]) { position: relative; z-index: 5; }
.menu-pop form { margin: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 500 .92rem var(--sans); text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--chip); }
.menu-item .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-pop .menu-form { padding: 6px 8px 8px; }
.menu-pop .menu-form .field span { font-size: .8rem; }
.card-head { display: flex; align-items: center; gap: 4px; margin-bottom: .4em; }
.card-head h2 { flex: 1; margin: 0; min-width: 0; }
.card-acts { display: flex; align-items: center; gap: 0; margin: -6px -8px -6px 0; }
.editable { color: inherit; text-decoration: none; }
.editable .ic { width: 15px; height: 15px; color: var(--muted); margin-left: 6px; vertical-align: -1px; opacity: .75; }
.editable:hover .ic { color: var(--accent); opacity: 1; }
.add-row { display: flex; align-items: center; gap: 8px; padding: 10px 0 2px; color: var(--accent); font: 600 .9rem var(--sans); text-decoration: none; cursor: pointer; list-style: none; }
button.add-row { border: 0; background: none; padding-left: 0; padding-right: 0; }
.add-row::-webkit-details-marker { display: none; }
.add-row .ic { width: 18px; height: 18px; }
details.add-panel[open] > .add-row { margin-bottom: 8px; }
.list > li > .menu { margin-right: -8px; }
.add-chip { display: inline-flex; align-items: center; gap: 4px; }

.profile-head { align-items: flex-start; }
.profile-head .card-acts { margin-top: -4px; }
.profile-title .status-pick { display: inline-block; margin-top: 6px; }
a.plain { color: inherit; text-decoration: none; }
a.plain .ic { width: 16px; height: 16px; color: var(--muted); vertical-align: -2px; }
.cchip.add-chip { background: transparent; color: var(--accent); border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); padding: 3px 10px; }
.cchip.add-chip .ic { width: 14px; height: 14px; }
.kopf-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.kopf-right .card-acts { margin: 0 -8px 0 0; }
details.edit-panel > summary { display: none; }
details.edit-panel[open] { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.actions > .menu { margin-left: auto; }
.menu-note { padding: 4px 10px 6px; margin: 0; max-width: 300px; }
.menu > summary.btn { list-style: none; }
.menu > summary.btn::-webkit-details-marker { display: none; }
.lesson-head > .icon-btn { margin: -4px -8px 0 0; }
.pay-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pay-act > .menu:not(.paypick) { margin-left: auto; }
.menu-pop:has(.menu-form .grid2) { min-width: min(320px, 86vw); }
details.offer-pick { margin-top: 8px; }
details.offer-pick > summary { list-style: none; }
details.offer-pick > summary::-webkit-details-marker { display: none; }
details.offer-pick[open] > summary { display: none; }
.wl-more > summary { letter-spacing: 0; font-weight: 500; font-size: .8rem; border: 0; padding: 0; line-height: 1.6; }
.wl-more > summary::before { content: '▸ '; }
.wl-more[open] > summary::before { content: '▾ '; }
.card.wl .kopf-right .card-acts { margin-top: -2px; }
.fif-bookings > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fif-bookings > li > .li-main { flex: 1 1 100%; }
.fif-bookings > li > .pay-row, .fif-bookings > li > .tag { flex: 0 1 auto; margin: 0; }
.fif-bookings > li > .menu { margin-left: auto; }
.kopf > div:first-child { min-width: 0; flex: 1 1 auto; }
.kopf-right { flex: none; }
.wl-who .who-seg { white-space: normal; }
.list.fif-bookings > li > form.pay-row { width: auto; flex: 0 1 auto; margin: 0; }

/* „bezahlt ▾“ (3.2): klappt wie das ⋯ ein kleines Menü auf; nochmal antippen oder daneben schließt es */
details.paypick > summary .ic { width: 14px; height: 14px; margin-left: 2px; transition: transform .15s; }
details.paypick[open] > summary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
details.paypick[open] > summary .ic { transform: rotate(180deg); }
.paybtns { min-width: 220px; }
.paypop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 8px; color: var(--muted); font-size: .85rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
/* Menüs nehmen ihre natürliche Breite (am Mac sonst schmal und abgeschnitten) */
.menu-pop { width: max-content; max-width: min(360px, 88vw); }
.menu-pop:has(.menu-form) { width: min(320px, 88vw); }
.menu-pop .menu-form input, .menu-pop .menu-form select { width: 100%; box-sizing: border-box; }
/* antippbare Zeilen bekommen überall ein „›“ */
.list > li > a::after, .fam-kids > li > a::after { content: ''; flex: none; width: 15px; height: 15px; margin-left: 2px; background: var(--muted); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Mail-Verläufe bei Familie und Teilnehmer (3.2) */
.mail-threads > li { display: block; padding: 0; }
.mthread > summary { display: flex; align-items: flex-start; gap: 8px; padding: 11px 16px; cursor: pointer; list-style: none; }
.mthread > summary::-webkit-details-marker { display: none; }
.mthread > summary::after { content: ''; flex: none; width: 15px; height: 15px; margin: 3px 0 0 auto; background: var(--muted); opacity: .55; transition: transform .15s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.mthread[open] > summary::after { transform: rotate(180deg); }
.mthread-subj { font-weight: 600; overflow-wrap: anywhere; }
.mthread .count { display: inline-block; min-width: 1.5em; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: 700 .75rem/1.6 var(--sans); text-align: center; align-self: flex-start; }
.mthread-main { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 2px; min-width: 0; }
.mthread-main > .muted { flex-basis: 100%; }
.mthread-msgs { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.mmsg { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.mmsg > summary { cursor: pointer; font-size: .85rem; color: var(--muted); padding: 2px 0; }
.mmsg[open] > summary { margin-bottom: 6px; }
.mthread-msgs .mailbody { margin: 0; font-size: .9rem; max-height: 420px; overflow: auto; }
.mmsg-link { display: inline-block; margin-top: 4px; }
.menu-pop .menu-form > .field, .menu-pop .menu-form > .grid2 { justify-self: stretch; width: 100%; }
details.paypick[open] > summary.btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lesson-head > .icon-btn:not(:hover) { background: transparent; }
.menu-pop form.menu-form { display: block; }
@media (min-width: 700px) { .kopf-right { flex-direction: row; align-items: center; gap: 8px; } .kopf-right .card-acts { margin: -4px -8px -4px 0; } }
.list > li > a.small::after { content: none; }

/* Einstellungen (3.3): Abschnitte eines Reiters zum Aufklappen */
details.set-sec { margin: 0 0 4px; }
details.set-sec > summary { padding: 12px 4px 10px; border-bottom: 1px solid var(--line); cursor: pointer; list-style: none; }
details.set-sec > summary::-webkit-details-marker { display: none; }
details.set-sec > summary h2 { font-size: 1.12rem; }
details.set-sec[open] > summary { margin-bottom: 12px; border-bottom-color: transparent; }
details.set-sec[open] { margin-bottom: 18px; }
.tpl-rubric { margin: 18px 4px 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
a.set-link { display: flex; align-items: baseline; gap: 10px; padding: 12px 4px 10px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
a.set-link h2 { font-size: 1.12rem; margin: 0; }
a.set-link::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 1.3rem; line-height: 1; }

/* Formular „Angaben ergänzen“ (3.4) */
.reg-choice, .reg-extra { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; }
.reg-choice legend, .reg-extra legend { font-weight: 600; padding: 0 4px; }
.reg-extra .reg-sep { display: none; margin-top: 8px; }
.reg-extra:has(input[value=ja]:checked) .reg-sep { display: block; }
/* (3.7) Storno einer bezahlten Rechnung: Datum und Weg nur bei „zurückgezahlt“ */
.inv-geld .inv-refund { display: none; margin-top: 8px; }
.inv-geld:has(input[value=zurueck]:checked) .inv-refund { display: grid; }
/* (3.11) Anfrage von der Homepage übernehmen: Felder für neue Familie bzw. neues Kind nur, wenn gewählt */
form[data-kr-take] .kr-newfam, form[data-kr-take] .kr-newkid { display: none; }
form[data-kr-take]:has(input[name=family][value=neu]:checked) .kr-newfam, form[data-kr-take]:has(input[name=child][value=neu]:checked) .kr-newkid { display: block; }
.kr-box .list > li { display: block; }
.kr-acts { margin-top: 6px; }
.btnrow select.places-pick { flex: none; min-width: 0; width: auto; padding: 5px 8px; }
.bk-state { margin-top: 4px; }
