/* FamCom – Grundstil. Keine Inline-Styles (Content-Security-Policy), alles hier. */

@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans.woff") format("woff"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito.woff") format("woff"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #F2F4F1; --surface: #FFFFFF; --ink: #17201C; --muted: #5B665F; --line: #DDE2DD; --line-strong: #CED5CF;
  --accent: #1E6B52; --accent-dark: #14503D; --accent-soft: #E3EFE9;
  --warn: #8A3D0E; --warn-soft: #FBEBDD; --danger: #A3261B; --danger-soft: #FBE4E1;
  --radius: 20px; --radius-sm: 12px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Nunito", var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--font-brand); font-weight: 900; font-size: 24px; letter-spacing: -0.03em; }
.brand-lg .brand-word { font-size: 40px; }
.logo-mark { display: block; flex: none; }

/* App-Rahmen */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 110px; }
.main-wide { max-width: 1100px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 10; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; min-height: 48px; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tabbar svg { width: 24px; height: 24px; }

.family-switch select { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 32px 8px 14px; font: inherit; font-weight: 700; font-size: 14px; background: var(--surface); color: var(--ink); max-width: 210px; }

/* Einfaches Layout (Anmelden, Einrichtung, Rechtstexte) */
.plain { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 16px 24px; }
.plain-inner { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 20px; }
.plain-wide { max-width: 760px; }
.plain-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.footer-links { margin-top: auto; padding-top: 32px; display: flex; gap: 16px; justify-content: center; font-size: 13px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

/* Karten & Listen */
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 0; }
.card-accent { background: var(--accent-soft); }
.card-warn { background: var(--warn-soft); }
.card-danger { background: var(--danger-soft); }
.card-dark { background: var(--ink); color: #fff; }
.card-dark .muted { color: #C9D3CD; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list-title { font-weight: 700; display: block; }
.list-sub { font-size: 13px; color: var(--muted); display: block; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin: 8px 0 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border-radius: 16px; padding: 14px; }
.stat strong { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

/* Avatare (Farben mit ausreichendem Kontrast zu Weiß) */
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.avatar-xl { width: 120px; height: 120px; font-size: 52px; }
.c1 { background: #24508F; } .c2 { background: #A84E12; } .c3 { background: #6A47B8; } .c4 { background: #85620A; }
.c5 { background: #1E6B52; } .c6 { background: #A33A6B; } .c7 { background: #3D5A66; } .c8 { background: #8A3D0E; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* Formulare */
form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > span, .label { font-size: 13px; font-weight: 700; color: #2B3A33; }
.req { color: var(--danger); margin-left: 2px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number], input[type=tel], input[type=file], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
}
textarea { min-height: 360px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #7FB8A3; outline-offset: 1px; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin: 0; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid #7FB8A3; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-size: 13px; font-weight: 700; color: #2B3A33; padding: 0; margin-bottom: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { color: var(--ink); background: #F7F8F6; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #E7B6B0; }
.btn-link { background: none; border: 0; color: var(--accent); padding: 0 6px; min-height: 44px; font-weight: 700; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }

/* Meldungen */
.flash { border-radius: 14px; padding: 12px 16px; font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.flash-ok { background: var(--accent-soft); color: var(--accent-dark); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: #E6ECF6; color: #24508F; }
.alert { border-radius: 14px; padding: 12px 16px; font-size: 14px; margin-bottom: 14px; background: var(--danger-soft); color: var(--danger); font-weight: 600; }

/* Checkliste Einrichtung */
.checks { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.checks li { display: flex; gap: 8px; padding: 4px 0; }
.checks .ok::before { content: "✓"; color: var(--accent); font-weight: 800; }
.checks .fail::before { content: "✕"; color: var(--danger); font-weight: 800; }
.checks .warn::before { content: "!"; color: var(--warn); font-weight: 800; width: 10px; text-align: center; }

/* QR & Links */
.qr { width: 220px; height: 220px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.codebox { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 16px; font-weight: 700; }
.codes span { background: var(--bg); border-radius: 8px; padding: 8px; text-align: center; letter-spacing: 0.05em; }

/* Rechtstexte */
.legal h1 { margin-bottom: 16px; }
.legal h2 { font-size: 20px; margin-top: 24px; }
.legal h3 { font-size: 16px; margin-top: 18px; }
.legal ol, .legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* Admin */
.admin-nav { display: flex; gap: 4px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 12px; }
.admin-nav a { padding: 14px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; }
.admin-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* Kinderansicht */
.kid { min-height: 100vh; background: #FFF8EC; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; text-align: center; font-family: var(--font-brand); }
.kid h1 { font-size: 44px; font-weight: 900; }
.kid-sun { width: 120px; height: 120px; }
.kid-tile { background: #fff; border-radius: 28px; padding: 24px; max-width: 420px; font-size: 20px; font-weight: 800; }

/* Landingpage */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 30em; }
.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row .grow, .grow { flex: 1; min-width: 0; }
.center-row { justify-content: center; }
pre.codebox { white-space: pre-wrap; margin: 0; font-family: ui-monospace, Menlo, monospace; }
a.card { text-decoration: none; color: var(--ink); display: flex; }
.topbar .badge { max-width: 48vw; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Aufgaben ---------- */
.tasks > li.task { gap: 10px; }
.tick { width: 44px; height: 44px; flex: none; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tick::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #8E9A92; box-sizing: border-box; }
.tick-on::before { display: none; }
.tick-on svg { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); padding: 4px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tick-off::before { border-style: dashed; border-color: var(--line-strong); }
.task-done .list-title { text-decoration: line-through; color: var(--muted); }
.task-overdue .tick::before { border-color: var(--danger); }
.overdue { color: var(--danger); font-weight: 700; }
.task-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); }
.cat-kueche .task-icon, .task-icon.cat-kueche { background: #FBEBDD; color: #8A3D0E; }
.task-icon.cat-waesche { background: #E6ECF6; color: #24508F; }
.task-icon.cat-einkauf { background: #E3EFE9; color: #14503D; }
.task-icon.cat-muell { background: #ECE7F6; color: #4E3492; }
.task-icon.cat-putzen { background: #E3F1F3; color: #1F5F68; }
.task-icon.cat-sonstiges { background: var(--bg); color: var(--ink); }
.points { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.points-today { font-size: 13px; font-weight: 700; color: var(--accent); }
progress.bar { width: 100%; height: 10px; border: 0; border-radius: 5px; background: #E3E7E3; overflow: hidden; appearance: none; }
progress.bar::-webkit-progress-bar { background: #E3E7E3; border-radius: 5px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 5px; }
.task-more { position: relative; }
.task-more summary { list-style: none; cursor: pointer; width: 36px; height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); border-radius: 10px; }
.task-more summary::-webkit-details-marker { display: none; }
.task-menu { position: absolute; right: 0; top: 44px; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; width: 260px; box-shadow: 0 8px 24px rgba(23,32,28,.12); display: flex; flex-direction: column; gap: 6px; }
.task-menu select { min-height: 40px; padding: 6px 10px; font-size: 14px; flex: 1; }
.section-title.row { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.sub { margin-top: 14px; }
textarea.short { min-height: 80px; font-family: var(--font); font-size: 15px; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.icon-pick label { position: relative; }
.icon-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icon-pick label > span { display: flex; align-items: center; justify-content: center; height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; color: var(--ink); }
.icon-pick input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-pick input:focus-visible + span { outline: 3px solid #7FB8A3; }

/* Woche */
.legend { margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; font-weight: 600; }
.avatar-xs { width: 22px; height: 22px; font-size: 11px; }
.week-card { padding: 10px 6px; overflow-x: auto; }
.week-grid { min-width: 340px; }
.wg-row { display: grid; grid-template-columns: minmax(96px, 1.6fr) repeat(7, minmax(30px, 1fr)); align-items: center; border-bottom: 1px solid #ECEFEC; min-height: 46px; }
.wg-row:last-child { border-bottom: 0; }
.wg-head { min-height: 0; padding-bottom: 6px; }
.wg-task { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; line-height: 1.2; padding-right: 4px; }
.wg-task .task-icon { width: 24px; height: 24px; border-radius: 7px; }
.wg-day { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; border-radius: 10px; margin: 0 1px; }
.wg-day b { font-size: 13px; }
.wg-head .wg-today { background: var(--ink); color: #fff; }
.wg-cell { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; justify-content: center; align-self: stretch; margin: 0 1px; padding: 4px 0; }
.wg-cell.wg-today { background: var(--bg); }
.wg-dot { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wg-dot.c-open { background: #fff; color: var(--ink); border: 2px dashed #8E9A92; }
.wg-dot.is-done { opacity: .45; text-decoration: line-through; }
.wg-dot.is-skipped { opacity: .25; }
.wg-empty { color: #B7C0B9; }

/* Fairness */
.fair-row { display: flex; flex-direction: column; gap: 8px; }
.big-num { font-size: 18px; color: var(--ink); }
.fair-bar { position: relative; height: 14px; border-radius: 7px; background: #E3E7E3; }
.fair-bar > span { position: absolute; top: 0; height: 14px; border-radius: 7px; }
.fair-plan, .fair-done { left: 0; }
.fair-plan { background: #C9D3CD; }
.fair-target { width: 3px !important; top: -4px !important; height: 22px !important; background: var(--ink); border-radius: 2px !important; }

/* Kinderansicht mit Bildern */
.kid { justify-content: flex-start; gap: 18px; }
.kid-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.kid-head h1 { font-size: 40px; margin: 0; }
.kid-list { list-style: none; padding: 0; margin: 0; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.kid-task { background: #fff; border-radius: 28px; padding: 16px; display: flex; align-items: center; gap: 14px; text-align: left; }
.kid-icon { width: 104px; height: 104px; flex: none; border-radius: 24px; display: flex; align-items: center; justify-content: center; background: #FBEBDD; color: #8A3D0E; }
.kid-task.cat-waesche .kid-icon { background: #E6ECF6; color: #24508F; }
.kid-task.cat-einkauf .kid-icon { background: #E3EFE9; color: #14503D; }
.kid-task.cat-muell .kid-icon { background: #ECE7F6; color: #4E3492; }
.kid-task.cat-putzen .kid-icon { background: #E3F1F3; color: #1F5F68; }
.kid-task.cat-sonstiges .kid-icon { background: #F2F4F1; color: var(--ink); }
.kid-title { flex: 1; font-size: 20px; font-weight: 800; line-height: 1.2; }
.kid-title small { display: block; font-size: 15px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.kid-done { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.kid-done svg { width: 52px; height: 52px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.kid-star svg, .kid-cheer svg { width: 72px; height: 72px; fill: #F2B233; }
.kid-task.is-done { opacity: .7; }
.kid-task.is-done .kid-title { text-decoration: line-through; }
.kid-cheer { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 6px 22px 6px 8px; font-size: 24px; font-weight: 900; animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kid-cheer { animation: none; } }
.kid-free p { margin: 8px 0 0; }
.kid-count { display: flex; gap: 8px; justify-content: center; }
.kid-pip { width: 18px; height: 18px; border-radius: 50%; background: #E8DCC6; }
.kid-pip.on { background: #F2B233; }

/* Balkenbreiten 0–100 % */
.w-0{width:0%} .l-0{left:calc(0% - 1px)}
.w-1{width:1%} .l-1{left:calc(1% - 1px)}
.w-2{width:2%} .l-2{left:calc(2% - 1px)}
.w-3{width:3%} .l-3{left:calc(3% - 1px)}
.w-4{width:4%} .l-4{left:calc(4% - 1px)}
.w-5{width:5%} .l-5{left:calc(5% - 1px)}
.w-6{width:6%} .l-6{left:calc(6% - 1px)}
.w-7{width:7%} .l-7{left:calc(7% - 1px)}
.w-8{width:8%} .l-8{left:calc(8% - 1px)}
.w-9{width:9%} .l-9{left:calc(9% - 1px)}
.w-10{width:10%} .l-10{left:calc(10% - 1px)}
.w-11{width:11%} .l-11{left:calc(11% - 1px)}
.w-12{width:12%} .l-12{left:calc(12% - 1px)}
.w-13{width:13%} .l-13{left:calc(13% - 1px)}
.w-14{width:14%} .l-14{left:calc(14% - 1px)}
.w-15{width:15%} .l-15{left:calc(15% - 1px)}
.w-16{width:16%} .l-16{left:calc(16% - 1px)}
.w-17{width:17%} .l-17{left:calc(17% - 1px)}
.w-18{width:18%} .l-18{left:calc(18% - 1px)}
.w-19{width:19%} .l-19{left:calc(19% - 1px)}
.w-20{width:20%} .l-20{left:calc(20% - 1px)}
.w-21{width:21%} .l-21{left:calc(21% - 1px)}
.w-22{width:22%} .l-22{left:calc(22% - 1px)}
.w-23{width:23%} .l-23{left:calc(23% - 1px)}
.w-24{width:24%} .l-24{left:calc(24% - 1px)}
.w-25{width:25%} .l-25{left:calc(25% - 1px)}
.w-26{width:26%} .l-26{left:calc(26% - 1px)}
.w-27{width:27%} .l-27{left:calc(27% - 1px)}
.w-28{width:28%} .l-28{left:calc(28% - 1px)}
.w-29{width:29%} .l-29{left:calc(29% - 1px)}
.w-30{width:30%} .l-30{left:calc(30% - 1px)}
.w-31{width:31%} .l-31{left:calc(31% - 1px)}
.w-32{width:32%} .l-32{left:calc(32% - 1px)}
.w-33{width:33%} .l-33{left:calc(33% - 1px)}
.w-34{width:34%} .l-34{left:calc(34% - 1px)}
.w-35{width:35%} .l-35{left:calc(35% - 1px)}
.w-36{width:36%} .l-36{left:calc(36% - 1px)}
.w-37{width:37%} .l-37{left:calc(37% - 1px)}
.w-38{width:38%} .l-38{left:calc(38% - 1px)}
.w-39{width:39%} .l-39{left:calc(39% - 1px)}
.w-40{width:40%} .l-40{left:calc(40% - 1px)}
.w-41{width:41%} .l-41{left:calc(41% - 1px)}
.w-42{width:42%} .l-42{left:calc(42% - 1px)}
.w-43{width:43%} .l-43{left:calc(43% - 1px)}
.w-44{width:44%} .l-44{left:calc(44% - 1px)}
.w-45{width:45%} .l-45{left:calc(45% - 1px)}
.w-46{width:46%} .l-46{left:calc(46% - 1px)}
.w-47{width:47%} .l-47{left:calc(47% - 1px)}
.w-48{width:48%} .l-48{left:calc(48% - 1px)}
.w-49{width:49%} .l-49{left:calc(49% - 1px)}
.w-50{width:50%} .l-50{left:calc(50% - 1px)}
.w-51{width:51%} .l-51{left:calc(51% - 1px)}
.w-52{width:52%} .l-52{left:calc(52% - 1px)}
.w-53{width:53%} .l-53{left:calc(53% - 1px)}
.w-54{width:54%} .l-54{left:calc(54% - 1px)}
.w-55{width:55%} .l-55{left:calc(55% - 1px)}
.w-56{width:56%} .l-56{left:calc(56% - 1px)}
.w-57{width:57%} .l-57{left:calc(57% - 1px)}
.w-58{width:58%} .l-58{left:calc(58% - 1px)}
.w-59{width:59%} .l-59{left:calc(59% - 1px)}
.w-60{width:60%} .l-60{left:calc(60% - 1px)}
.w-61{width:61%} .l-61{left:calc(61% - 1px)}
.w-62{width:62%} .l-62{left:calc(62% - 1px)}
.w-63{width:63%} .l-63{left:calc(63% - 1px)}
.w-64{width:64%} .l-64{left:calc(64% - 1px)}
.w-65{width:65%} .l-65{left:calc(65% - 1px)}
.w-66{width:66%} .l-66{left:calc(66% - 1px)}
.w-67{width:67%} .l-67{left:calc(67% - 1px)}
.w-68{width:68%} .l-68{left:calc(68% - 1px)}
.w-69{width:69%} .l-69{left:calc(69% - 1px)}
.w-70{width:70%} .l-70{left:calc(70% - 1px)}
.w-71{width:71%} .l-71{left:calc(71% - 1px)}
.w-72{width:72%} .l-72{left:calc(72% - 1px)}
.w-73{width:73%} .l-73{left:calc(73% - 1px)}
.w-74{width:74%} .l-74{left:calc(74% - 1px)}
.w-75{width:75%} .l-75{left:calc(75% - 1px)}
.w-76{width:76%} .l-76{left:calc(76% - 1px)}
.w-77{width:77%} .l-77{left:calc(77% - 1px)}
.w-78{width:78%} .l-78{left:calc(78% - 1px)}
.w-79{width:79%} .l-79{left:calc(79% - 1px)}
.w-80{width:80%} .l-80{left:calc(80% - 1px)}
.w-81{width:81%} .l-81{left:calc(81% - 1px)}
.w-82{width:82%} .l-82{left:calc(82% - 1px)}
.w-83{width:83%} .l-83{left:calc(83% - 1px)}
.w-84{width:84%} .l-84{left:calc(84% - 1px)}
.w-85{width:85%} .l-85{left:calc(85% - 1px)}
.w-86{width:86%} .l-86{left:calc(86% - 1px)}
.w-87{width:87%} .l-87{left:calc(87% - 1px)}
.w-88{width:88%} .l-88{left:calc(88% - 1px)}
.w-89{width:89%} .l-89{left:calc(89% - 1px)}
.w-90{width:90%} .l-90{left:calc(90% - 1px)}
.w-91{width:91%} .l-91{left:calc(91% - 1px)}
.w-92{width:92%} .l-92{left:calc(92% - 1px)}
.w-93{width:93%} .l-93{left:calc(93% - 1px)}
.w-94{width:94%} .l-94{left:calc(94% - 1px)}
.w-95{width:95%} .l-95{left:calc(95% - 1px)}
.w-96{width:96%} .l-96{left:calc(96% - 1px)}
.w-97{width:97%} .l-97{left:calc(97% - 1px)}
.w-98{width:98%} .l-98{left:calc(98% - 1px)}
.w-99{width:99%} .l-99{left:calc(99% - 1px)}
.w-100{width:100%} .l-100{left:calc(100% - 1px)}


/* =====================================================================
   Version 1.2 – Darstellung, Profilmenü, erhabene Buttons, Avatare
   ===================================================================== */

/* Akzentfarben */
.accent-blau   { --accent: #24508F; --accent-dark: #183A6B; --accent-soft: #E6ECF6; }
.accent-lila   { --accent: #6A47B8; --accent-dark: #4E3492; --accent-soft: #ECE7F6; }
.accent-orange { --accent: #A84E12; --accent-dark: #7E3A0D; --accent-soft: #FBEBDD; }
.accent-rosa   { --accent: #A33A6B; --accent-dark: #7A2B50; --accent-soft: #F7E4EE; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; }
.dot-gruen { background: #1E6B52; } .dot-blau { background: #24508F; } .dot-lila { background: #6A47B8; }
.dot-orange { background: #A84E12; } .dot-rosa { background: #A33A6B; }

/* Große Schrift */
.text-lg body { zoom: 1.12; }

/* Dunkles Design */
.theme-dark {
  --bg: #0F1412; --surface: #1A221F; --ink: #E7EEEA; --muted: #A6B3AB; --line: #2A3430; --line-strong: #3A4741;
  --accent-soft: color-mix(in srgb, var(--accent) 28%, #1A221F);
  --warn-soft: #3A2A1C; --danger-soft: #3B1F1C; --danger: #FF9A8F; --warn: #F2B98A;
  --link: color-mix(in srgb, var(--accent) 45%, #FFFFFF);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  .theme-auto {
    --bg: #0F1412; --surface: #1A221F; --ink: #E7EEEA; --muted: #A6B3AB; --line: #2A3430; --line-strong: #3A4741;
    --accent-soft: color-mix(in srgb, var(--accent) 28%, #1A221F);
    --warn-soft: #3A2A1C; --danger-soft: #3B1F1C; --danger: #FF9A8F; --warn: #F2B98A;
    --link: color-mix(in srgb, var(--accent) 45%, #FFFFFF);
    color-scheme: dark;
  }
}
a, .btn-link { color: var(--link, var(--accent)); }
.tabbar a[aria-current="page"] { color: var(--link, var(--accent)); }
.field > span, .label, legend { color: var(--ink); }
.card-accent, .card-warn { color: var(--ink); }
.flash-ok { color: var(--ink); }
.theme-dark progress.bar, .theme-dark .fair-bar { background: #2A3430; }
.theme-dark .fair-plan { background: #4A5852; }
.theme-dark .flash-info { background: #1C2840; color: #B9CCF2; }
.theme-dark .task-menu { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.theme-dark .tick::before { border-color: #6F7D75; }
@media (prefers-color-scheme: dark) {
  .theme-auto progress.bar, .theme-auto .fair-bar { background: #2A3430; }
  .theme-auto .fair-plan { background: #4A5852; }
  .theme-auto .flash-info { background: #1C2840; color: #B9CCF2; }
  .theme-auto .tick::before { border-color: #6F7D75; }
}

/* ---------- Erhabene, drückbare Buttons ---------- */
.btn {
  --edge: rgba(0,0,0,.25);
  border: 0; position: relative;
  box-shadow: 0 4px 0 var(--edge), 0 6px 14px rgba(23,32,28,.16), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .07s ease, box-shadow .07s ease, filter .15s ease;
  margin-bottom: 4px; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { filter: brightness(1.04); }
.btn:active, .btn.is-pressed { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), 0 2px 4px rgba(23,32,28,.16), inset 0 1px 0 rgba(255,255,255,.2); }
.btn:disabled, .btn[aria-disabled="true"] { filter: grayscale(.6) opacity(.55); cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #FFFFFF) 0%, var(--accent) 100%); --edge: var(--accent-dark); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.18); }
.btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 72%, #FFFFFF) 0%, var(--accent) 100%); color: #fff; }
.btn-secondary { background: linear-gradient(180deg, #FFFFFF 0%, #E9EEEA 100%); --edge: #BCC7C0; color: var(--ink); }
.btn-secondary:hover { background: linear-gradient(180deg, #FFFFFF 0%, #E2E9E4 100%); color: #17201C; }
.btn-dark { background: linear-gradient(180deg, #3A4640 0%, #17201C 100%); --edge: #000; color: #fff; }
.btn-danger { background: linear-gradient(180deg, #FFF3F1 0%, #F9DCD7 100%); --edge: #E2ADA6; color: #A3261B; }
.btn-danger:hover { color: #A3261B; }
.btn-link { box-shadow: none !important; margin-bottom: 0; transform: none !important; }
.btn-sm { box-shadow: 0 3px 0 var(--edge), 0 4px 10px rgba(23,32,28,.14), inset 0 1px 0 rgba(255,255,255,.28); }
.btn-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge), 0 1px 3px rgba(23,32,28,.14); }
.btn-xl { min-height: 64px; font-size: 22px; border-radius: 20px; }
.theme-dark .btn-secondary { background: linear-gradient(180deg, #34403A 0%, #26302B 100%); --edge: #0B0F0D; color: var(--ink); }
.theme-dark .btn-danger { background: linear-gradient(180deg, #4A2622 0%, #3A1C19 100%); --edge: #1A0B0A; color: #FFB4AA; }
@media (prefers-color-scheme: dark) {
  .theme-auto .btn-secondary { background: linear-gradient(180deg, #34403A 0%, #26302B 100%); --edge: #0B0F0D; color: var(--ink); }
  .theme-auto .btn-danger { background: linear-gradient(180deg, #4A2622 0%, #3A1C19 100%); --edge: #1A0B0A; color: #FFB4AA; }
}

/* Auswahl-Knöpfe (Chips) ebenfalls als drückbare Buttons */
.choice span {
  border: 0; background: linear-gradient(180deg, #FFFFFF 0%, #E9EEEA 100%);
  box-shadow: 0 3px 0 #BCC7C0, 0 4px 8px rgba(23,32,28,.10); margin-bottom: 3px; transition: transform .07s, box-shadow .07s;
}
.choice span:active { transform: translateY(2px); box-shadow: 0 1px 0 #BCC7C0; }
.choice input:checked + span { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #FFFFFF), var(--accent)); color: #fff; box-shadow: 0 3px 0 var(--accent-dark), 0 4px 8px rgba(23,32,28,.14); }
.icon-pick label > span { border: 0; background: linear-gradient(180deg, #FFFFFF, #E9EEEA); box-shadow: 0 3px 0 #BCC7C0; margin-bottom: 3px; }
.icon-pick input:checked + span { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #FFFFFF), var(--accent)); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
.theme-dark .choice span, .theme-dark .icon-pick label > span { background: linear-gradient(180deg, #34403A, #26302B); box-shadow: 0 3px 0 #0B0F0D; color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .theme-auto .choice span, .theme-auto .icon-pick label > span { background: linear-gradient(180deg, #34403A, #26302B); box-shadow: 0 3px 0 #0B0F0D; color: var(--ink); }
}
.theme-dark .choice input:checked + span, .theme-dark .icon-pick input:checked + span { background: var(--accent); color: #fff; }

/* Abhak-Kreis als runder Knopf */
.tick::before { background: var(--surface); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.tick:active::before { transform: translateY(1px); }

/* ---------- Topbar & Profilmenü ---------- */
.topbar { gap: 8px; }
.topbar-brand { margin-right: auto; }
.topbar .badge { max-width: 38vw; }
.profile-menu { position: relative; }
.profile-menu > summary { list-style: none; cursor: pointer; border-radius: 50%; display: block; box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary .avatar { width: 42px; height: 42px; outline: 2px solid var(--surface); }
.profile-menu[open] > summary { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.pm-panel { position: absolute; right: 0; top: 52px; width: 270px; background: var(--surface); border-radius: 18px; padding: 8px; z-index: 30;
  box-shadow: 0 14px 40px rgba(23,32,28,.22), 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.pm-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pm-head > span { display: flex; flex-direction: column; min-width: 0; }
.pm-head .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 0; background: none;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.pm-item:hover, .pm-item:focus-visible { background: var(--bg); color: var(--ink); }
.pm-item svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pm-item svg .fill { fill: currentColor; }
.pm-logout { color: var(--danger); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.pm-logout:hover { color: var(--danger); }

/* ---------- Avatare ---------- */
.avatar-pic { overflow: hidden; background: var(--bg); padding: 0; }
.avatar-pic svg, .avatar-pic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-xl.avatar-pic, .avatar-lg.avatar-pic { box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--line); border-radius: 16px; padding: 4px; margin: 16px 0; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; font-weight: 700; cursor: pointer; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.segmented input:focus-visible + span { outline: 3px solid #7FB8A3; }
.av-stage { position: sticky; top: 70px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); border-radius: 20px; }
.av-preview { width: 160px; height: 160px; border-radius: 50%; box-shadow: 0 4px 0 rgba(0,0,0,.14), 0 10px 24px rgba(23,32,28,.18); background: var(--surface); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches label, .parts label { position: relative; }
.swatches input, .parts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { display: block; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 3px 0 rgba(0,0,0,.18); }
.swatches input:checked + .sw { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent); }
.swatches input:focus-visible + .sw, .parts input:focus-visible + .part { outline: 3px solid #7FB8A3; outline-offset: 2px; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.part { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, #FFFFFF, #EEF2EF); box-shadow: 0 3px 0 #BCC7C0; }
.part svg { width: 56px; height: 56px; border-radius: 50%; }
.part-label { font-size: 12px; font-weight: 700; color: #2B3A33; }
.parts input:checked + .part { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #FFFFFF), var(--accent)); box-shadow: 0 3px 0 var(--accent-dark); }
.parts input:checked + .part .part-label { color: #fff; }
.avatar-builder fieldset { margin-bottom: 18px; }
.avatar-builder fieldset:last-child { margin-bottom: 0; }
.file-btn { cursor: pointer; }
.comic-stage canvas { width: 100%; max-width: 320px; aspect-ratio: 1; display: block; margin: 0 auto 12px; border-radius: 50%; box-shadow: 0 4px 0 rgba(0,0,0,.14); }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }

/* Kinder: eigenes Bild */
.kid-me { position: relative; display: inline-block; text-decoration: none; }
.kid-edit { position: absolute; right: -2px; bottom: 4px; width: 40px; height: 40px; border-radius: 50%; background: #F2B233; color: #17201C;
  display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 3px 0 #B9851F; }
.kid-builder { text-align: left; }
.kid-builder .avatar-builder { width: 100%; max-width: 560px; }
.kid-builder .sw { width: 56px; height: 56px; }
.kid-builder .parts { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.kid-builder .part svg { width: 72px; height: 72px; }
.kid-builder legend { font-size: 18px; }
.kid-head { position: relative; width: 100%; max-width: 560px; }
.kid-back { position: absolute; left: 0; top: 4px; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: #17201C; text-decoration: none;
  font-size: 34px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #D9CDB6; }
.kid-done { box-shadow: 0 5px 0 var(--accent-dark), 0 8px 16px rgba(23,32,28,.18); transition: transform .07s, box-shadow .07s; }
.kid-done:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-dark); }

/* Farbfelder des Baukastens */
.sw-bg-0{background:#24508F}
.sw-bg-1{background:#A84E12}
.sw-bg-2{background:#6A47B8}
.sw-bg-3{background:#85620A}
.sw-bg-4{background:#1E6B52}
.sw-bg-5{background:#A33A6B}
.sw-bg-6{background:#3D5A66}
.sw-bg-7{background:#8A3D0E}
.sw-bg-8{background:#F2B233}
.sw-bg-9{background:#7FD1AE}
.sw-skin-0{background:#FFE0C7}
.sw-skin-1{background:#F5C6A0}
.sw-skin-2{background:#E0A878}
.sw-skin-3{background:#C68650}
.sw-skin-4{background:#8D5524}
.sw-skin-5{background:#5C3A1E}
.sw-hairc-0{background:#1F1A17}
.sw-hairc-1{background:#4A2C1A}
.sw-hairc-2{background:#7B4A26}
.sw-hairc-3{background:#D9A441}
.sw-hairc-4{background:#B5462A}
.sw-hairc-5{background:#9AA0A6}
.sw-hairc-6{background:#3D6FD8}
.sw-hairc-7{background:#E46BA8}
.sw-shirt-0{background:#FFFFFF}
.sw-shirt-1{background:#F2B233}
.sw-shirt-2{background:#E46BA8}
.sw-shirt-3{background:#3D6FD8}
.sw-shirt-4{background:#1E6B52}
.sw-shirt-5{background:#17201C}
.sw-shirt-6{background:#B5462A}
.topbar .btn { white-space: nowrap; }
@media (max-width: 420px) { .topbar .brand .badge-dark { display: none; } }

/* Vorlagen & neue Kategorien */
.task-icon.cat-garten, .kid-task.cat-garten .kid-icon { background: #E8F2DC; color: #3E6B1E; }
.task-icon.cat-tiere, .kid-task.cat-tiere .kid-icon { background: #F7E4EE; color: #7A2B50; }
.tpl-list > li { padding: 0; }
.tpl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; cursor: pointer; }
.tpl-row input { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.tpl-row.is-have { opacity: .6; cursor: default; }
.sticky-action { position: sticky; bottom: 84px; z-index: 5; padding-top: 6px; }
@media (min-width: 1100px) and (pointer: fine) { .sticky-action { bottom: 12px; } }

/* =====================================================================
   Version 1.4 – Verfügbarkeit, Banner, Wischgesten, Responsive
   ===================================================================== */
.mt { margin-top: 28px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.warn-text { color: var(--warn); font-weight: 600; margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .grid-3 { grid-template-columns: 1fr; } }
.unit { position: relative; display: block; }
.unit input { padding-right: 34px; }
.unit i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 14px; pointer-events: none; }
.avail { background: var(--bg); border-radius: 16px; padding: 14px; margin: 6px 0 16px; }
.avail legend { display: flex; align-items: center; gap: 8px; float: left; width: 100%; margin-bottom: 10px; }
.avail legend + * { clear: both; }
.calc-out { margin: 4px 0 0; font-weight: 700; color: var(--accent-dark); font-size: 14px; }
.theme-dark .calc-out { color: var(--link); }
.share-row { display: flex; flex-direction: column; gap: 6px; }

/* „?“-Hilfe */
.help { display: inline-block; position: relative; vertical-align: middle; text-transform: none; letter-spacing: 0; font-weight: 400; }
.help > summary { list-style: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.help > summary::-webkit-details-marker { display: none; }
.help[open] > p, .help[open] > div { position: absolute; z-index: 20; left: -8px; top: 32px; width: min(320px, 80vw); background: var(--surface); color: var(--ink);
  padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; box-shadow: 0 10px 30px rgba(23,32,28,.2), 0 0 0 1px var(--line); margin: 0; }

/* Profil-Banner */
.banner { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.banner-head { display: flex; gap: 12px; align-items: flex-start; color: var(--accent-dark); }
.banner-head h2 { margin: 0 0 4px; color: var(--ink); }
.banner-head p { margin: 0; color: var(--ink); }
.theme-dark .banner-head { color: var(--link); }

/* Wischgesten */
.list > li.swipe { display: block; padding: 0; position: relative; }
.swipe-content { display: flex; align-items: center; gap: 10px; padding: 12px 0; background: var(--surface); position: relative; z-index: 1; touch-action: pan-y; will-change: transform; }
.list.tasks > li.swipe .swipe-content { gap: 10px; }
.swipe-bg { position: absolute; inset: 0; display: none; align-items: center; gap: 8px; padding: 0 20px; color: #fff; font-weight: 800; font-size: 15px; border-radius: 12px; cursor: pointer; }
.swipe-bg svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.swipe-bg-left svg circle { fill: #fff; stroke: none; }
.swipe-bg-right { justify-content: flex-start; background: #1E7A4E; }
.swipe-bg-left { justify-content: flex-end; background: #5B665F; }
.swipe-edit { background: #2F6BD8; }
.swipe-delete { background: #C0392B; }
li.swipe.swiping { overflow: hidden; }
li.swipe.show-right .swipe-bg-right, li.swipe.show-left .swipe-bg-left { display: flex; }
li.swipe.armed .swipe-bg span { transform: scale(1.08); }
li.swipe.armed .swipe-bg-right { filter: brightness(1.1); }
li.swipe.is-done-pending .list-title { text-decoration: line-through; color: var(--muted); }
li.swipe.is-done-pending .tick::before { background: var(--accent); border-color: var(--accent); }
li.swipe.is-removed { display: none; }
/* Maus/Tastatur: Menü sichtbar; Touch: Menü über Wischen */
@media (pointer: coarse) { .pointer-only > summary { display: none; } .task-more > summary { display: none; } }
@media (pointer: fine) { .touch-only { display: none; } }

/* Rückgängig-Leiste */
.undo-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 150%); opacity: 0;
  width: min(520px, calc(100vw - 24px)); background: #17201C; color: #fff; border-radius: 16px; padding: 12px 10px 12px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35); z-index: 50; transition: transform .25s ease, opacity .25s ease; overflow: hidden; }
.undo-toast.show { transform: translate(-50%, 0); opacity: 1; }
.undo-msg { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-btn { border: 0; background: #F2B233; color: #17201C; font: inherit; font-weight: 800; font-size: 14px; border-radius: 10px; min-height: 40px; padding: 0 14px; cursor: pointer; box-shadow: 0 3px 0 #B9851F; }
.undo-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #B9851F; }
.undo-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: #F2B233; transform-origin: left; }
.undo-bar.run { animation: undo 5s linear forwards; }
@keyframes undo { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .undo-toast { transition: none; } }

/* ---------- Responsive ---------- */
.today-cols, .cat-grid { display: grid; gap: 16px; }
.cat-grid > section { min-width: 0; }
h1 { font-size: clamp(26px, 2.2vw + 18px, 34px); }

/* Tablet: ganze Fläche nutzen */
@media (min-width: 768px) {
  .main { max-width: 1180px; padding-left: 24px; padding-right: 24px; }
  .today-cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kid-list { max-width: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .kid-head { max-width: none; }
  .undo-toast { bottom: 96px; }
  .tabbar a { flex-direction: row; justify-content: center; gap: 8px; font-size: 14px; }
}
/* Fire HD & große Tablets quer, kleine Laptops */
@media (min-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .today-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* PC: Seitenleiste statt Leiste unten */
@media (min-width: 1100px) and (pointer: fine) {
  .app.app-tabs, .app.app-admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  .app > .topbar { grid-column: 1 / -1; }
  .app > .main { grid-column: 2; grid-row: 2; padding-bottom: 32px; }
  .app-tabs > .tabbar, .app-admin > .admin-nav { grid-column: 1; grid-row: 2; position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; gap: 4px;
    max-width: none; margin: 24px 0 0 16px; padding: 10px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); overflow: visible; }
  .app-tabs > .tabbar a, .app-admin > .admin-nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; min-height: 48px; border-bottom: 0; }
  .app-tabs > .tabbar a[aria-current="page"], .app-admin > .admin-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
  .undo-toast { bottom: 24px; }
}
}
.doc code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: var(--bg); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.doc h2:first-child { margin-top: 4px; }
/* Wisch-Knöpfe: Symbol über kurzer Beschriftung, damit sie auch halb geöffnet vollständig lesbar sind */
.swipe-bg { flex-direction: column; justify-content: center; gap: 2px; font-size: 12px; padding: 0 18px; }
.swipe-bg-right { align-items: flex-start; }
.swipe-bg-left { align-items: flex-end; }
.swipe-bg-left span { order: 2; }
.swipe-bg svg { width: 26px; height: 26px; }
@media (min-width: 1100px) and (pointer: fine) { .main .btn-block { max-width: 520px; } .main .sticky-action .btn-block { max-width: none; } }

/* 1.4.1: Menüs liegen immer über den Zeilen; Verwaltungs-Reiter brechen um statt zu scrollen */
.swipe-content { z-index: auto; will-change: auto; }
li.swipe:has(details[open]), li:has(> details[open]), li:has(.swipe-content > details[open]) { z-index: 20; }
.list > li { position: relative; }
.task-menu { z-index: 30; }
.admin-nav { flex-wrap: wrap; overflow-x: visible; padding: 4px 12px; gap: 0 4px; }
.admin-nav a { padding: 12px 10px; }

/* 1.4.1: Menü klappt nach oben auf, wenn unten kein Platz ist */
.task-menu.up { top: auto; bottom: 44px; }

/* ---------- 1.5: Detailansicht, Tauschbörse, Benachrichtigungen, Kalender ---------- */
.task-link { text-decoration: none; color: inherit; min-width: 0; }
.task-link:hover .list-title { color: var(--accent); }
.chev { font-size: 22px; min-width: 32px; text-decoration: none; color: var(--muted); }
.badge-swap { background: #E6ECF6; color: #24508F; text-decoration: none; }
.tabbar a { position: relative; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C2410C; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.task-menu .menu-title { margin: 0; font-weight: 800; font-size: 14px; }
.menu-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.swap-form { display: flex; flex-direction: column; gap: 8px; }
.swap-form input[type=text] { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.seg-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--line); border-radius: 12px; padding: 3px; }
.seg-mini label { position: relative; }
.seg-mini input { position: absolute; opacity: 0; }
.seg-mini span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 38px; padding: 2px 6px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; line-height: 1.15; }
.seg-mini input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.seg-mini input:focus-visible + span { outline: 3px solid #7FB8A3; }
.swap-teaser h2 { margin: 0; }
.swap-teaser .list a.grow { text-decoration: none; color: inherit; min-width: 0; }
.list > li.offer a.grow { text-decoration: none; color: inherit; min-width: 0; }
.list > li.offer .list-sub .badge { margin-right: 4px; }
.list > li > a.grow { text-decoration: none; color: inherit; }
.task-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.task-hero h1 { margin: 0; }
.task-hero p { margin: 0; }
.task-icon-lg { width: 64px; height: 64px; border-radius: 18px; }
.detail-cols { display: grid; gap: 16px; align-items: start; }
@media (min-width: 760px) { .detail-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }
.pre-line { white-space: pre-line; margin: 0; }
.quote { margin: 6px 0 0; font-style: italic; color: var(--muted); }
.avatar-open { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); color: var(--muted); font-weight: 800; flex: none; }
.choice-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.choice-list legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.msg-own { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: var(--bg); border-radius: 16px 16px 16px 4px; padding: 8px 12px; min-width: 0; overflow-wrap: anywhere; }
.msg-own .bubble { background: var(--accent-soft); border-radius: 16px 16px 4px 16px; }
.bubble p { margin: 2px 0; }
.chat-form { display: flex; gap: 8px; margin-top: 6px; }
.chat-form input { flex: 1; min-width: 0; }
.push-state { font-weight: 700; margin: 0; }
code.break { word-break: break-all; font-size: 13px; }
/* Kinder-Tablet */
.kid-head { position: relative; width: 100%; max-width: 560px; }
.kid-bell { position: absolute; right: 0; top: 0; width: 64px; height: 64px; border-radius: 50%; border: 0; background: #F2B233; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 #C98F12; }
.kid-bell[hidden] { display: none; }
.kid-bell svg { width: 36px; height: 36px; fill: none; stroke: #17201C; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kid-bell.kid-bell-no { opacity: .4; }
.kid-news { display: flex; align-items: center; gap: 12px; background: #1E6B52; color: #fff; border-radius: 28px; padding: 14px 22px; font-size: 26px; font-weight: 900; cursor: pointer; animation: pop .6s ease-out; max-width: 560px; width: 100%; justify-content: center; }
.kid-news[hidden] { display: none; }
.kid-news-icons { font-size: 34px; letter-spacing: 4px; }
.kid-news svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kid-help { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.kid-help h2 { font-size: 28px; font-weight: 900; display: flex; align-items: center; gap: 10px; margin: 0; }
.kid-help h2 svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kid-offer { border: 3px dashed #F2B233; }
.kid-offer .kid-title small { display: flex; align-items: center; gap: 6px; color: #C98F12; }
.kid-take { min-width: 110px; min-height: 84px; border-radius: 28px; border: 0; background: #F2B233; color: #17201C; font-family: var(--font-brand); font-size: 22px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #C98F12; padding: 0 14px; }
.kid-take:active { transform: translateY(3px); box-shadow: 0 1px 0 #C98F12; }
@media (max-width: 420px) { .kid-offer { flex-wrap: wrap; } .kid-offer form { width: 100%; } .kid-take { width: 100%; min-height: 64px; } }
.theme-dark .badge-swap { background: #22324A; color: #B9CCEB; }
.theme-dark .bubble { background: #26302B; }
@media (prefers-color-scheme: dark) { .theme-auto .badge-swap { background: #22324A; color: #B9CCEB; } .theme-auto .bubble { background: #26302B; } }
.task-link, .list > li > a.grow, .list > li.offer a.grow, .swap-teaser .list a.grow { color: var(--ink); }
