/* MIQA parents' area – design system (ADR 0029, design "Elternportal" 2026-10-16).
   Light by default like the design; a dark variant keeps the theme switch. No framework, no inline script.
   Class vocabulary: see services/parents/CLAUDE.md ("Design-System"). */

@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("../fonts/figtree-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("../fonts/figtree-500.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("../fonts/figtree-600.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("../fonts/figtree-700.woff2") format("woff2"); }

:root {
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --page: #E1DFEA; --frame: #ECEBF1; --frame-edge: rgba(255, 255, 255, .85);
  --card: #FFFFFF; --pill: rgba(255, 255, 255, .85); --field: #FBF8F7; --soft: #F6F3F2;
  --ink: #1C1C22; --muted: #6E6B76; --body2: #4D4A55; --on-ink: #FFFFFF;
  --line: #ECE6E6; --line-2: #F0EBEB; --line-dash: #CFCAD6;
  --hl: #DCE49B; --lav: #B7AEE4; --green: #B9E3A9; --green-2: #C5E5B6; --blue: #CFE0F5; --gauge: #A9CCF5;
  --neg: #F3C9C0; --pos: #2F7A3D; --danger: #B3261E; --warn-bg: #FFF3D6; --ok-bg: #F5F9EE; --ok-line: #DDEBCF;
  --hatch-a: #D2D0D8; --hatch-b: #FFFFFF;
  --t-math: #E6DDF6; --t-lang: #D9EFD0; --t-german: #F7E0D6; --t-sci: #DCEBFB; --t-chem: #EEF1C9;
  --t-rose: #F3E3EE; --t-latin: #EDE6DA; --t-history: #F2E6D8; --t-default: #EEE9F5;
  --shadow-frame: 0 30px 80px rgba(70, 50, 140, .18); --shadow-pop: 0 16px 40px rgba(40, 20, 80, .16);
  --r-card: 28px; --r-card-sm: 24px; --r-field: 16px; --r-frame: 40px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #0F0E13; --frame: #17161C; --frame-edge: rgba(255, 255, 255, .06);
  --card: #222128; --pill: rgba(34, 33, 40, .92); --field: #1C1B21; --soft: #2A2930;
  --ink: #F2F0F6; --muted: #A9A6B2; --body2: #C9C6D0; --on-ink: #1C1C22;
  --line: #34323B; --line-2: #2E2C35; --line-dash: #4A4852;
  --hatch-a: #3A3842; --hatch-b: #222128; --warn-bg: #3A3218; --ok-bg: #1E2A1F; --ok-line: #2F4A30;
  --t-math: #3A3352; --t-lang: #2C3F2A; --t-german: #4A3229; --t-sci: #29384A; --t-chem: #3D3F26;
  --t-rose: #43303C; --t-latin: #3F3A30; --t-history: #43392C; --t-default: #34303D;
  --shadow-frame: 0 30px 80px rgba(0, 0, 0, .45); --shadow-pop: 0 16px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.5 var(--font); }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; font-weight: 400; letter-spacing: -.8px; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 500; }
h3 { font-size: 16px; line-height: 1.35; font-weight: 600; }
a { color: inherit; text-decoration: none; }
a:hover { color: #5A3FB0; }
:root[data-theme="dark"] a:hover { color: #C9BEF5; }
p a, .prose a, .link { text-decoration: underline; text-underline-offset: 2px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #7C66D8; outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 999px; }
.skip-link:focus { top: 12px; }

/* ---------- layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--gap, 20px); grid-template-columns: repeat(auto-fit, minmax(var(--min, 280px), 1fr)); }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .main-col { flex: 2.6 1 560px; min-width: 0; }
.cols > .side-col { flex: 1 1 300px; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.big-num { font-size: 34px; font-weight: 400; line-height: 1.1; letter-spacing: -.4px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.hatch { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 8px); }
.hatch-hl { background: repeating-linear-gradient(135deg, var(--hl) 0 3px, var(--hatch-b) 3px 8px); }

/* ---------- page frame (signed in) ---------- */
/* One surface, no folder around it (owner, 2026-10-16): the whole page has the frame tone. */
.page { min-height: 100vh; padding: 28px 16px; background: var(--frame); }
.frame { max-width: 1360px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; gap: 32px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head .lead { margin-top: 10px; font-size: 16px; color: var(--muted); }
main:focus { outline: none; }

/* header */
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-word { font-size: 22px; font-weight: 600; letter-spacing: 1px; }
/* The logo blinks now and then, like on the landing page. */
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.logo-mark .eye { animation: blink 5s infinite; transform-origin: center; transform-box: fill-box; }
@media (prefers-reduced-motion: reduce) { .logo-mark .eye { animation: none; } }
.nav-pills { display: flex; gap: 2px; background: var(--pill); border-radius: 999px; padding: 5px; flex-wrap: wrap; }
.nav-pills a { height: 44px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.nav-pills a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.nav-burger { display: none; }
.nav-current { height: 44px; padding: 0 14px 0 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; background: var(--ink); color: var(--on-ink); white-space: nowrap; }
.nav-burger .menu-panel { left: 0; right: auto; min-width: 240px; }
.tool-pill { display: flex; align-items: center; gap: 6px; background: var(--pill); border-radius: 999px; padding: 5px; }
/* The header fits itself to its content (app.js measures it, no fixed breakpoints): when the pills do not fit in
   one line, only the current section stays and opens the menu ("collapsed"); then only its symbol ("iconic");
   then the brand text goes and the gaps get smaller ("tight"). Without JS a generous width rule collapses. */
.app-head.collapsed .nav-pills { flex-wrap: nowrap; align-items: center; }
.app-head.collapsed .nav-pills > a { display: none; }
.app-head.collapsed .nav-burger { display: block; }
.app-head.tight { gap: 8px; flex-wrap: nowrap; }
.app-head.tight .brand-word { display: none; }
.app-head.tight .nav-pills a { padding: 0 14px; }
/* Phone ("iconic"): only the section's symbol as a round button – no title that pushes the bar aside. */
.app-head.iconic .nav-current { width: 44px; padding: 0; justify-content: center; }
.app-head.iconic .nav-current-label { display: none; }
.app-head.iconic .nav-pills { padding: 4px; }
.app-head.tight .tool-pill { gap: 0; }
.app-head.tight .tool-pill .icon-btn { width: 38px; }
@media (max-width: 1240px) {
  html:not(.js) .nav-pills { flex-wrap: nowrap; align-items: center; }
  html:not(.js) .nav-pills > a { display: none; }
  html:not(.js) .nav-burger { display: block; }
}
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); position: relative; }
.icon-btn:hover { background: var(--soft); }
.dot-badge { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #D9534F; }

/* menus without JS: <details class="menu"> */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 200px; background: var(--card); border-radius: 18px;
  padding: 6px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 2px; }
.menu-panel.up { top: auto; bottom: calc(100% + 8px); }
.menu-item { min-height: 42px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; display: flex; align-items: center; gap: 10px; font-size: 14px; text-align: left; width: 100%; }
.menu-item:hover, .menu-item[aria-current="true"] { background: var(--soft); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-head { padding: 8px 12px 6px; }
.lang-pill { height: 42px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.lang-pill:hover { background: var(--soft); }

/* avatars */
.avatar { width: 42px; height: 42px; border-radius: 50%; background: #E9D5CC; color: #1C1C22; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.avatar.c1 { background: #F7E0D6; } .avatar.c2 { background: #DCEBFB; } .avatar.c3 { background: #E6DDF6; }
.avatar.c4 { background: #D9EFD0; } .avatar.c5 { background: #EEF1C9; } .avatar.c6 { background: #F3E3EE; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.sm { border-radius: var(--r-card-sm); padding: 18px 20px; }
.card.dark { background: #1C1C22; color: #E8E6EE; }
.card.dark .muted { color: #B9B5C2; }
.card.flat { background: transparent; padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 19px; }
.card-foot { border-top: 1px solid var(--line-2); padding-top: 14px; }
.tip-box { border-radius: var(--r-card-sm); padding: 18px 20px; font-size: 14px; line-height: 1.5; }
.list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.list-row + .list-row { border-top: 1px solid var(--line-2); padding-top: 10px; }
.kv { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.empty { border: 1.5px dashed var(--line-dash); border-radius: var(--r-card-sm); padding: 24px; text-align: center; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { height: 50px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn:hover { color: var(--ink); background: var(--soft); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { color: var(--on-ink); opacity: .9; background: var(--ink); }
.btn.hl { background: var(--hl); border-color: var(--hl); color: #1C1C22; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
.btn.danger-ghost { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { height: 42px; padding: 0 16px; font-weight: 500; }
.btn.block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .55; cursor: default; }
.round { width: 48px; height: 48px; border-radius: 50%; padding: 0; border: 0; background: var(--ink); color: var(--on-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.round.sm { width: 36px; height: 36px; }
.round.light { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.link-btn { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; font-size: 13px; color: inherit; }
form.inline { display: inline; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; }
.field .hint { font-weight: 400; font-size: 12px; }
.field .error-text { color: var(--danger); font-weight: 500; font-size: 12px; }
.input, .select, .textarea { height: 54px; border-radius: var(--r-field); border: 1px solid var(--line); background: var(--card); padding: 0 16px; font-size: 15px; color: var(--ink); min-width: 0; width: 100%; }
.textarea { height: auto; min-height: 110px; padding: 12px 16px; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: transparent; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap { display: flex; align-items: center; height: 54px; border-radius: var(--r-field); border: 1px solid var(--line); background: var(--card); padding: 0 6px 0 16px; }
.input-wrap .input { border: 0; height: 52px; padding: 0; outline: none; }
/* Saved passwords: browsers paint autofilled fields light blue/yellow – keep the field colour of the design. */
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px var(--card) inset; caret-color: var(--ink); transition: background-color 9999s ease-out 0s; }
.input:autofill { box-shadow: 0 0 0 1000px var(--card) inset; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(var(--min, 170px), 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; inset: 0; }
.chip-toggle span { height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip-toggle input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip-toggle input:focus-visible + span { outline: 3px solid #7C66D8; outline-offset: 2px; }
.seg { display: inline-flex; gap: 2px; background: var(--pill); border-radius: 999px; padding: 4px; }
.seg a, .seg button, .seg label span { height: 42px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.seg [aria-current="page"], .seg [aria-pressed="true"], .seg input:checked + span { background: var(--ink); color: var(--on-ink); }
.seg label { position: relative; } .seg label input { position: absolute; opacity: 0; inset: 0; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .val { min-width: 54px; text-align: center; font-weight: 600; }
.pw-meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pw-meter span { height: 8px; border-radius: 999px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 6px); }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: #F3C9C0; }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: #EEF1C9; }
.pw-meter[data-level="3"] span:nth-child(-n+3) { background: #B9E3A9; }
.pw-meter[data-level="4"] span { background: #8FCF7C; }

/* ---------- chips, badges, notices ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.hl { background: var(--hl); border-color: var(--hl); color: #1C1C22; }
.chip.ok { background: var(--green-2); border-color: var(--green-2); color: #1C1C22; }
.chip.blue { background: var(--blue); border-color: var(--blue); color: #1C1C22; }
.chip.neg { background: var(--neg); border-color: var(--neg); color: #1C1C22; }
.chip.dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip.outline { background: transparent; }
.delta-up { color: var(--pos); font-weight: 600; }
.notice { border-radius: 20px; padding: 14px 18px; display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; background: var(--card); }
.notice.success { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.notice.warning { background: var(--warn-bg); }
.notice.danger { background: #FBE4E0; color: #6B1A14; }
:root[data-theme="dark"] .notice.danger { background: #47201C; color: #FFD9D3; }
.notice.info { background: var(--card); }
.notice .grow { flex: 1 1 auto; }

/* ---------- bars and charts (no library) ---------- */
.bar { height: 10px; border-radius: 999px; overflow: hidden; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 7px); }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--lav); }
.bar.green > span { background: var(--green); }
.bar.hl > span { background: var(--hl); }
.bar.thick { height: 26px; }
.week-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; min-height: 160px; }
.week-bars .day { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.week-bars .col { width: 100%; max-width: 62px; border-radius: 14px; background: var(--lav); min-height: 6px; }
.week-bars .col.zero { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 8px); }
.week-bars .col.today { background: repeating-linear-gradient(135deg, var(--hl) 0 3px, var(--hatch-b) 3px 8px); }
.week-bars .col.future { background: transparent; border: 1.5px dashed var(--line-dash); height: 16px; }
.stacked { display: flex; height: 18px; border-radius: 999px; overflow: hidden; gap: 3px; }
.stacked > span { display: block; height: 100%; }

/* subjects */
.subj { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--t-default); color: var(--ink); font-size: 13px; font-weight: 700; }
.subj.sm { width: 32px; height: 32px; font-size: 11px; }
.t-math, .t-sky { background: var(--t-math); } .t-lang, .t-mint, .t-lilac { background: var(--t-lang); } .t-german, .t-peach { background: var(--t-german); }
.t-sci { background: var(--t-sci); } .t-chem, .t-sun { background: var(--t-chem); } .t-rose { background: var(--t-rose); }
.t-latin { background: var(--t-latin); } .t-history { background: var(--t-history); } .t-primary, .t-default { background: var(--t-default); }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 12px; }
.table td, .table tbody th { padding: 12px; background: var(--field); text-align: left; font-weight: 400; color: var(--ink); }
.table td:first-child, .table tbody th:first-child { border-radius: 14px 0 0 14px; }
.table td:last-child { border-radius: 0 14px 14px 0; }

/* accordions */
details.fold { border: 1px solid var(--line-2); border-radius: 18px; background: var(--card); overflow: hidden; }
details.fold > summary { min-height: 52px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(225deg); }
details.fold > .fold-body { padding: 0 16px 16px; }

/* dialogs */
dialog.modal { border: 0; padding: 0; border-radius: 32px; max-width: min(680px, calc(100vw - 32px)); width: 100%; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(40, 20, 80, .25); }
dialog.modal::backdrop { background: rgba(28, 28, 34, .32); backdrop-filter: blur(6px); }
.modal-body { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* ---------- auth (signed out) ---------- */
.auth { min-height: 100vh; padding: 16px; background: var(--frame); display: flex; flex-wrap: wrap; gap: 16px; }
.auth-art { flex: 1 1 480px; min-width: 0; min-height: 320px; border-radius: 32px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #F3DCD6 0%, #EDD3E4 55%, #D9D5F2 100%); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 24px; color: #1C1C22; }
:root[data-theme="dark"] .auth-art { background: linear-gradient(160deg, #3A2C35 0%, #33283B 55%, #272540 100%); color: #F2F0F6; }
.auth-badge { position: relative; z-index: 2; align-self: flex-start; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 8px 16px 8px 10px; color: #1C1C22; }
.auth-badge .brand-word { font-size: 18px; }
.auth-illu { position: relative; z-index: 0; flex: 1 1 0; height: 0; min-height: 260px; width: 100%; object-fit: contain; object-position: center bottom; margin-bottom: -48px; transform: scale(1.2); transform-origin: center 70%; }
.auth-points { position: relative; display: flex; flex-direction: column; gap: 10px; max-width: 440px; list-style: none; padding: 0; }
.auth-points li { background: rgba(255, 255, 255, .82); color: #1C1C22; border-radius: 22px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.auth-points .pt { width: 40px; height: 40px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.auth-main { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; padding: 24px clamp(16px, 5vw, 72px); }
.auth-top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.auth-box { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 36px 0; }
.auth-box .lead { font-size: 15px; color: var(--muted); }
.auth-foot { display: flex; justify-content: center; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.auth-foot a { color: var(--muted); }
.steps-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.steps-bar span.step { height: 8px; width: 44px; border-radius: 999px; background: repeating-linear-gradient(135deg, #CFCBD6 0 2px, var(--hatch-b) 2px 6px); border: 1px solid var(--line); }
.steps-bar span.step.now { background: var(--ink); border-color: var(--ink); }
.steps-bar span.step.done { background: var(--green); border-color: var(--green); }
.icon-tile { width: 56px; height: 56px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }

/* footer */
.app-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 12px; color: var(--muted); padding: 4px 0 0; }
.app-foot a { color: var(--muted); }

/* ---------- responsive ---------- */
/* ---- learning pages ---- */
/* ---------- learning pages (dashboard, lesson report, progress) – group "learning" ---------- */

/* child chooser: pill chips with an avatar (partials/child_switch.html, dashboard) */
.child-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.child-chips a { height: 48px; padding: 0 18px 0 5px; border-radius: 999px; background: var(--pill); display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.child-chips a[aria-current="true"], .child-chips a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.child-chips .avatar { width: 38px; height: 38px; font-size: 13px; }
.child-chips .avatar.plain { background: var(--soft); color: var(--ink); }

/* the subject choice submits itself with JS; without JS its "Anzeigen" button stays */
form.is-enhanced .subject-submit { display: none; }
.select.sm { height: 42px; border-radius: 999px; padding: 0 14px; font-size: 14px; width: auto; }

/* level and outcome fills (models.learning.LEVEL_TONE, learning time) */
.fill-spark, .bar > .fill-spark, .stacked > .fill-spark { background: #8FCF7C; }
.fill-sky, .bar > .fill-sky, .stacked > .fill-sky { background: var(--gauge); }
.fill-peach, .bar > .fill-peach, .stacked > .fill-peach { background: #F0B7A8; }
.fill-lilac, .bar > .fill-lilac, .stacked > .fill-lilac { background: var(--lav); }
.fill-rose, .bar > .fill-rose, .stacked > .fill-rose { background: var(--danger); }
.fill-sun, .bar > .fill-sun, .stacked > .fill-sun { background: var(--hl); }
.fill-line, .fill-muted, .bar > .fill-line, .bar > .fill-muted { background: var(--hatch-a); }
.t-line { background: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .cells i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; }
.cells { display: flex; flex-wrap: wrap; gap: 4px; }
.cells.lg i { width: 16px; height: 16px; border-radius: 5px; }
.card.dark .legend { color: #B9B5C2; }

/* KPI cards */
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-val { font-size: 26px; line-height: 1.15; letter-spacing: -.3px; }
.kpi.help { background: var(--warn-bg); }

/* live: a child is learning right now */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pos); flex: none; margin-top: 6px; box-shadow: 0 0 0 4px var(--ok-line); }

/* week bars in a child card: lower */
.week-bars.compact { min-height: 0; gap: 6px; }
.week-bars .val { font-weight: 600; color: var(--ink); }

/* worksheet examples */
.example-img { max-width: 100%; max-height: 180px; border-radius: 14px; border: 1px solid var(--line); object-fit: contain; background: var(--field); }
.paper { display: inline-block; padding: 14px 18px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); font-size: 20px; font-variant-numeric: tabular-nums; }
.task-thumb { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; }

/* lesson report */
.phase-flow { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.phase-flow li { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 500; }
.phase-flow small { color: var(--muted); font-size: 12px; }
.timeline { list-style: none; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 12px; border-left: 2px solid var(--line); }
.timeline li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--lav); }
.timeline span { color: var(--muted); }
.source-list { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.source-list a { display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; text-underline-offset: 2px; }
.bullets { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* progress: subject tiles are links */
a.card.subj-tile:hover { color: inherit; box-shadow: var(--shadow-pop); }
a.card.subj-tile[aria-current="true"] { outline: 2px solid var(--ink); outline-offset: -2px; }

/* level names inside translated texts ("<span class="tag t-mint">sicher</span>", progress page) */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); }

/* ---- family pages ---- */
/* ---------- family pages (children, devices, goals, learning plan, download, error) – group "family" ---------- */

/* links inside field hints and short notes read as links */
.hint a, .hint-links a { text-decoration: underline; text-underline-offset: 2px; }

/* device kind cards and platform cards are links/cards: keep their own colour on hover */
a.card { border: 1.5px solid transparent; }
a.card:hover { color: var(--ink); border-color: var(--line-dash); }
a.card.dark:hover { color: #E8E6EE; }

/* the section tabs under the page title wrap on small screens */
.page-head .seg { flex-wrap: wrap; }

/* ---- billing pages ---- */
/* ---------- billing: pricing, payments, account (group "billing") ---------- */
.pricing-head { align-items: center; max-width: 720px; margin: 0 auto; }
.pricing-head .lead { font-size: 16px; }
.plan-card .plan-price.is-open { font-size: 24px; }
.plan-features { gap: 8px; font-size: 14px; }
.plan-features li { display: flex; align-items: flex-start; gap: 10px; }
.plan-features li .ic { margin-top: 2px; color: var(--pos); }
.card.dark .plan-features li .ic { color: var(--hl); }
.card.dark.plan-card .btn:not(.hl) { background: transparent; color: #E8E6EE; border-color: rgba(255, 255, 255, .25); }
.ticks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ticks li { display: flex; align-items: flex-start; gap: 10px; }
.ticks li .ic { margin-top: 2px; }
.card.danger-zone { border: 1.5px solid var(--neg); }
.card.danger-zone h2 { color: var(--danger); }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); align-items: start; }
.account-who { display: flex; align-items: center; gap: 14px; }
.account-children { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.account-children li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.account-children small { display: block; color: var(--muted); font-size: 12px; }
.account-children .avatar { width: 32px; height: 32px; font-size: 12px; }
.input[readonly] { background: var(--soft); color: var(--muted); }
.next-charge { font-size: 18px; color: #B9B5C2; }
.next-charge b { display: block; font-size: 34px; font-weight: 400; line-height: 1.1; letter-spacing: -.4px; color: #E8E6EE; font-variant-numeric: tabular-nums; }

/* ---------- overview (draft 2026-10-16: "Eltern-Übersicht") ---------- */
.ov { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.08fr) minmax(0, 1fr); grid-template-rows: 48px 150px 300px 350px; column-gap: 24px; }
.ov-head { grid-column: 1 / 3; grid-row: 1 / 3; align-self: start; position: relative; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 480px; }
.ov-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ov-tariff { height: 30px; padding: 0 12px; font-size: 12px; font-weight: 600; }
.ov-title { margin: 0; font-size: 44px; line-height: 1.1; font-weight: 400; letter-spacing: -.8px; }
.ov-lead { margin: 0; font-size: 16px; color: var(--muted); }
.ov-kids-row { margin-top: 6px; flex-wrap: wrap; }
.pill-group { display: flex; gap: 2px; background: var(--pill); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.pill-group .pill { height: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; }
.pill-group .pill.on { background: var(--ink); color: var(--on-ink); }
.ov-head .round { box-shadow: 0 6px 16px rgba(28, 28, 34, .18); }
.ov-subj-menu { left: 0; right: auto; top: calc(100% + 12px); width: 340px; max-width: 90vw; padding: 10px; border-radius: 22px; gap: 4px; }
.ov-subj-menu-head { padding: 4px 6px 8px; }
.ov-subj-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; border: 1px solid transparent; }
.ov-subj-item[aria-current="true"] { border: 1.5px solid var(--ink); background: var(--field); }
.ov-sym { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #1C1C22; background: var(--t-default); }
.ov-sym.lg { width: 44px; height: 44px; }
.ov-sym.t-math { background: var(--t-math); } .ov-sym.t-lang { background: var(--t-lang); } .ov-sym.t-german { background: var(--t-german); }
:root[data-theme="dark"] .ov-sym { color: var(--ink); }
.filter-chip { height: 40px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, .12); background: var(--hl); color: #1C1C22; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.filter-chip > span { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .7); display: inline-flex; align-items: center; justify-content: center; }
.ov-art { grid-column: 2 / 3; grid-row: 2 / 4; display: flex; justify-content: center; align-items: flex-end; position: relative; top: 56px; left: 48px; z-index: 2; min-height: 0; pointer-events: none; }
.ov-art img { width: 104%; max-width: none; height: 100%; flex: none; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 14px rgba(60, 40, 90, .12)); }
.ov-left { grid-column: 1 / 2; grid-row: 3 / 5; display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 1; }
.ov-kpi { flex: 1; justify-content: space-between; gap: 10px; }
.ov-h { margin: 0; font-size: 19px; font-weight: 500; }
.ov-h.lg { font-size: 20px; }
.ov-num { font-size: 30px; font-weight: 400; line-height: 1.2; }
.ov-num.md { font-size: 26px; }
.ov-num.lg { font-size: 32px; }
.ov-kpi-foot { align-items: flex-end; gap: 8px; flex-wrap: nowrap; }
.ov-kpi-foot > .stack { min-width: 0; }
.mini-select { height: 32px; padding: 0 10px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.mini-select.lg { height: 38px; padding: 0 14px; font-size: 13px; gap: 8px; }
.ov-kpi .menu-panel { min-width: 170px; border-radius: 16px; }
.ov-gauge { position: relative; width: 124px; height: 70px; }
.ov-gauge-pct { position: absolute; right: 0; bottom: 0; font-size: 12px; font-weight: 600; }
.ov-streak { display: flex; align-items: flex-end; gap: 7px; height: 74px; }
.ov-streak span { width: 20px; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 7px); border: 1px solid var(--line); }
.ov-streak span.on { background: var(--green); border-color: var(--green); }
.ov-days { grid-column: 2 / 3; grid-row: 4 / 5; position: relative; z-index: 1; gap: 10px; min-height: 0; padding: 20px 24px; }
.ov-up { color: var(--pos); }
.ov-bars { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; align-items: end; }
.ov-bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.ov-bar { width: 100%; max-width: 64px; border-radius: 14px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 8px); }
.ov-bar.today { background: repeating-linear-gradient(135deg, var(--hl) 0 3px, var(--hatch-b) 3px 8px); }
.ov-bar.future { background: none; border: 1px dashed var(--line-dash); border-radius: 12px; }
.ov-tip { font-size: 12px; font-weight: 600; background: var(--hl); color: #1C1C22; border: 1px solid rgba(0, 0, 0, .12); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.ov-bar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.ov-bar-days .strong { color: var(--ink); }
.ov-right { grid-column: 3 / 4; grid-row: 2 / 5; display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 3; min-height: 0; }
.ov-right > .card.sm:first-child { padding: 16px 18px; }
.ov-dev-avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--t-default); color: #1C1C22; }
.ov-dev-avatar.t-german { background: var(--t-german); }
.ov-dev-avatar.t-sci { background: var(--t-sci); }
.ov-state { flex: none; font-size: 10px; font-weight: 600; border-radius: 999px; padding: 3px 8px; }
.ov-state.on { background: var(--green-2); color: #1C1C22; }
.ov-state.off { border: 1px solid var(--line-dash); }
.ov-state.wait { background: var(--hl); color: #1C1C22; }
.ov-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ov-split > div { display: flex; flex-direction: column; gap: 6px; border-left: 1px dashed var(--line-dash); padding-left: 6px; }
.ov-split b { font-size: 13px; font-weight: 600; }
.ov-split-bar { height: 26px; border-radius: 8px; }
.ov-split-bar.done { background: repeating-linear-gradient(135deg, #C9D9B8 0 2px, var(--hatch-b) 2px 7px); border: 1px solid #E3ECD9; }
.ov-split-bar.open { background: var(--blue); }
.ov-split-bar.photos { background: var(--green-2); }
.ov-plan { flex: 1; min-height: 0; overflow: hidden; }
.ov-plan-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.ov-plan-tabs > span { padding-bottom: 8px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ov-plan-tabs > span.on { border-bottom: 2px solid var(--ink); font-weight: 600; color: var(--ink); }
.ov-count { font-size: 10px; border: 1px solid var(--line-dash); border-radius: 999px; padding: 1px 6px; }
.ov-plan-item { display: flex; gap: 12px; align-items: stretch; }
.ov-plan-time { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ov-time { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 4px 9px; border: 1px solid var(--line-dash); }
.ov-time.now { background: var(--hl); border-color: var(--hl); color: #1C1C22; }
.ov-line { flex: 1; width: 1px; background: var(--line-dash); }
.ov-plan-box { flex: 1; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ov-hatch { flex: 1; min-height: 40px; border-radius: 14px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 8px); }
.ov-bottom { display: flex; flex-wrap: wrap; gap: 24px; }
.ov-bottom > .card { flex: 1 1 320px; }
.ov-progress { height: 14px; border-radius: 999px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 7px); border: 1px solid var(--line); overflow: hidden; }
.ov-progress > div { height: 100%; border-radius: 999px; background: var(--lav); }
.ov-pct { font-size: 18px; width: 48px; text-align: right; }
.ov-tag { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 10px; margin-top: 1px; color: #1C1C22; }
.ov-tag.green { background: var(--green-2); }
.ov-tag.blue { background: var(--blue); }
.ov-tag.hl { background: var(--hl); }
.ov-tag.chem { background: #EEF1C9; }
.ov-tag.lang { background: #D9EFD0; }
.ov-note { display: flex; gap: 10px; align-items: flex-start; }
.ov-activity { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 18px; padding: 10px 12px; font-size: 14px; }
@media (max-width: 1000px) {
  .ov { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: 20px; }
  .ov > * { grid-column: auto !important; grid-row: auto !important; }
  .ov-art { top: 0; left: 0; height: 240px; }
  .ov-days { min-height: 300px; }
}

/* ---------- overview, variant 1 (owner's review 2026-10-16) ---------- */
.ov1-variants { flex-wrap: wrap; }
.pill-group .pill { gap: 6px; }
.ov-live { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 9px; background: var(--hl); color: #1C1C22; }
.ov-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2F7A3D; animation: ov-pulse 1.6s ease-in-out infinite; }
@keyframes ov-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ov-live::before { animation: none; } }
.ov1-streak { display: flex; align-items: flex-end; gap: 5px; height: 84px; }
.ov1-streak-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ov1-streak-col > span:first-child { width: 14px; border-radius: 5px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 6px); border: 1px solid var(--line); }
.ov1-streak-col > span.on { background: var(--green); border-color: var(--green); }
.ov1-streak-col > span.future { background: none; border-style: dashed; border-color: var(--line-dash); }
.ov1-streak-day { font-size: 10px; color: var(--muted); }
.ov1-prep { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px dashed var(--line-dash); }
.ov1-prep.done { background: var(--green); border: 0; color: #1C1C22; }
.ov1-week { position: relative; z-index: 3; background: var(--card); display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 0 4px; border-radius: 999px; border: 1px solid var(--line); }
.ov1-week .icon-btn { width: 30px; height: 30px; }
.ov1-week [aria-disabled="true"] { opacity: .35; }
.ov1-plan-bar { display: flex; gap: 4px; }
.ov1-plan-bar span { flex: 1; height: 10px; border-radius: 999px; background: var(--blue); }
.ov1-plan-bar span.done { background: repeating-linear-gradient(135deg, #9FC48A 0 2px, #C9E3B8 2px 6px); }
.ov1-bottom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ov1-focus, .ov1-activity { grid-column: span 2; }
.ov1-subject { display: flex; align-items: center; gap: 14px; border-radius: 16px; margin: -6px; padding: 6px; }
.ov1-subject:hover { background: var(--field); }
.ov1-levels { display: flex; height: 14px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); background: var(--hatch-b); }
.ov1-levels span.sure, .ov1-legend i.sure { background: var(--green); }
.ov1-levels span.practising, .ov1-legend i.practising { background: var(--lav); }
.ov1-levels span.new, .ov1-legend i.new { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 6px); }
.ov1-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.ov1-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ov1-legend i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line); }
.ov1-focus-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 20px; align-items: start; }
.ov1-task { display: inline-flex; flex-direction: column; gap: 4px; align-self: flex-start; padding: 12px 16px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); }
.ov1-task-wrong { font-size: 18px; font-variant-numeric: tabular-nums; text-decoration: line-through; text-decoration-color: #D9534F; text-decoration-thickness: 2px; }
.ov1-task-right { font-size: 13px; font-weight: 600; color: var(--pos); }
.ov1-trend { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; }
.ov1-trend-bar { height: 10px; border-radius: 999px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 6px); border: 1px solid var(--line); overflow: hidden; }
.ov1-trend-bar span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.ov1-help { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--hl); color: #1C1C22; }
.ov1-activity .ov-activity { color: inherit; }
.ov1-activity .ov-activity:hover { background: var(--field); }
.ov-dev-avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.ov1-family-head { max-width: none; margin-bottom: 8px; }
.ov1-family { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 24px; align-items: start; }
.ov1-family-side { display: flex; flex-direction: column; gap: 24px; }
.ov1-family-side .ov-kpi { min-height: 180px; }
.ov1-kid { gap: 18px; }
.ov1-kid-grid .ov-num { font-size: 22px; white-space: nowrap; }
.ov1-kid-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 0; border-block: 1px dashed var(--line-dash); }
.ov1-mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 50px; margin-top: 6px; }
.ov1-mini-bars span { width: 10px; border-radius: 4px; background: var(--lav); }
.ov1-mini-bars span.future { background: none; border: 1px dashed var(--line-dash); }
.ov1-kid-foot { display: flex; align-items: center; gap: 10px; }
.ov1-empty { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.ov1-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
.ov1-step { flex-direction: row; align-items: center; gap: 16px; }
.ov1-step > .stack { flex: 1; }
.ov1-step.now { outline: 2px solid var(--ink); }
.ov1-step:not(.now):not(.done) { opacity: .6; }
.ov1-step-n { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 6px); }
.ov1-step.now .ov1-step-n { background: var(--ink); color: var(--on-ink); }
.ov1-step.done .ov1-step-n { background: var(--green); color: #1C1C22; }
.ov1-code { display: flex; flex-direction: column; align-items: flex-end; }
.ov1-code > span:first-child { font-size: 28px; font-weight: 300; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.ov1-empty-art img { width: 100%; max-height: 420px; object-fit: contain; }
.ov1-skeleton { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ov1-skeleton span { height: 160px; border-radius: var(--r-card); background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 9px); opacity: .6; }
@media (max-width: 1000px) {
  .ov1-bottom, .ov1-family, .ov1-empty, .ov1-skeleton { grid-template-columns: minmax(0, 1fr); }
  .ov1-focus, .ov1-activity { grid-column: auto; }
  .ov1-focus-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- dialogs of the dashboard (ADR 0029): server-rendered, work without JS ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(28, 28, 34, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 96px 16px 24px; overflow-y: auto; }
.app-head { position: relative; z-index: 60; }
.dialog { width: 100%; max-width: 680px; background: var(--card); color: var(--ink); border-radius: 32px; padding: 28px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 30px 80px rgba(40, 20, 80, .25); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dialog.narrow { max-width: 480px; }
.dialog-title { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: -.5px; }
.dialog-sub { font-size: 20px; font-weight: 500; }
.dialog-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.dialog-legend { width: 100%; font-size: 16px; font-weight: 500; padding: 0; margin-bottom: 10px; gap: 12px; }
.dialog-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dialog-card { border: 1px solid var(--line-2); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin: 0; min-width: 0; }
.dialog-card legend { padding: 0; float: left; width: 100%; margin-bottom: 10px; }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px dashed var(--line-dash); padding-top: 18px; }
.input.soft, .select.soft { background: var(--field); height: 52px; }
.stepper-input { max-width: 120px; font-size: 22px; text-align: center; }
.chip-toggle.hl input:checked + span { background: var(--hl); color: #1C1C22; border-color: rgba(0, 0, 0, .12); font-weight: 600; }
.track-field { display: none; }
form:has(select[name="school_type"] option[value="berufliche_schule"]:checked) .track-field,
.track-field:has(input:not([value=""])) { display: flex; }
.device-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.device-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); cursor: pointer; min-width: 0; }
.device-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.device-option:has(input:checked) { border: 1.5px solid var(--ink); background: var(--field); }
.device-option:has(input:focus-visible) { outline: 3px solid #7C66D8; outline-offset: 2px; }
.device-option-icon { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 2px; background: var(--soft); }
.device-option:has(input:checked) .device-option-icon { background: var(--hl); color: #1C1C22; }
.connect-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.connect-qr { flex: none; border-radius: 24px; padding: 14px; background: repeating-linear-gradient(135deg, #E4E0E8 0 2px, #FFFFFF 2px 9px); border: 1px solid var(--line); }
.connect-qr .qr { display: block; width: 170px; height: 170px; background: #FFFFFF; border-radius: 16px; padding: 10px; }
.connect-qr .qr path { fill: #1C1C22; }
.connect-code { font-size: 44px; font-weight: 300; letter-spacing: 5px; font-variant-numeric: tabular-nums; }
.connect-steps { margin: 0; padding: 12px 0 0 18px; border-top: 1px dashed var(--line-dash); display: flex; flex-direction: column; gap: 6px; }
.connect-done { display: flex; align-items: center; gap: 16px; border-radius: 24px; padding: 20px; background: var(--ok-bg); border: 1px solid var(--ok-line); }
.connect-done-icon { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--green); color: #1C1C22; display: inline-flex; align-items: center; justify-content: center; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #1C1C22; display: inline-block; }
.pill-group.soft { background: var(--soft); }
.pill-group button.pill { border: 0; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; }
.pill-group button.pill.on { background: var(--ink); color: var(--on-ink); }
.ov-bar.zero { height: 8px; }
.connect-public { max-width: 560px; margin: 40px auto; }
.round.light.sm { width: 40px; height: 40px; }
html.js [data-no-js] { display: none; }
@media (max-width: 560px) {
  .dialog { padding: 20px; border-radius: 26px; }
  .dialog-backdrop { padding: 80px 8px 16px; }
  .connect-code { font-size: 34px; }
}

/* ---------- bell, search, status popup (ADR 0029) ---------- */
.tool-menu > summary { position: relative; }
.bell-count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #D9534F; color: #FFFFFF; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--card); }
.bell-panel { width: 360px; max-width: calc(100vw - 32px); padding: 8px; gap: 2px; max-height: 70vh; overflow-y: auto; }
.bell-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.bell-note { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; }
.bell-note:hover { background: var(--soft); }
.bell-note.unread { background: var(--field); }
.bell-note.unread .bell-icon { background: var(--hl); color: #1C1C22; }
.bell-icon { width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; }
.bell-empty { padding: 10px; }
.search-panel { width: 340px; max-width: calc(100vw - 32px); padding: 10px; }
.search-panel .input { height: 44px; }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-form .input-wrap { flex: 1 1 320px; max-width: 520px; gap: 8px; }
.search-hit { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; }
.search-hit:hover { background: var(--field); }
.flash-backdrop { z-index: 70; align-items: center; padding-top: 24px; }
.flash-dialog { max-width: 440px; align-items: center; text-align: center; gap: 14px; padding: 32px 28px 28px; }
.flash-title { font-size: 24px; }
.flash-text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body2); }
.flash-icon { width: 60px; height: 60px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #1C1C22; background: var(--blue); }
.flash-icon.success { background: var(--green); }
.flash-icon.danger { background: var(--neg); }
.flash-icon.warning { background: var(--hl); }
.flash-ok { min-width: 140px; justify-content: center; margin-top: 6px; }

/* ---------- Kinder & Fächer (ADR 0029, draft "Eltern-Kinder") ---------- */
.kids { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.kids-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
.kids-main { flex: 2.6 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.kids-art { position: absolute; bottom: 0; right: -44px; height: 560px; width: auto; z-index: 2; pointer-events: none; transform: scaleX(-1); filter: drop-shadow(-8px 10px 14px rgba(60, 40, 90, .14)); }
.kids-list { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 3; }
.kid-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 24px; background: var(--card); border: 1.5px solid transparent; }
.kid-card.on { border-color: var(--ink); }
.kid-card:hover { border-color: var(--line-dash); }
.kid-card.on:hover { border-color: var(--ink); }
.kid-name { font-size: 18px; font-weight: 500; }
/* play minutes per day on a phone (play.py) */
.dev-play { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.stepper { display: flex; align-items: center; gap: 10px; flex: none; }
.stepper .round[disabled] { opacity: .4; cursor: default; }
/* teacher personalities (ADR 0030): one card each, the chosen one framed */
.teacher-grid { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.teacher { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: var(--soft); border: 1.5px solid transparent; cursor: pointer; }
.teacher:hover { border-color: var(--line-dash); }
.teacher:has(input:checked) { border-color: var(--ink); background: var(--card); }
.teacher:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.teacher input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.teacher-face { flex: none; }
.teacher-miqa { width: 56px; height: 56px; flex: none; }
.teacher-sample { width: 100%; height: 36px; }
.kid-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #B8B4BE; }
.kid-dot.on { background: #3E9B52; }
.kids-tip { border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--frame) 2px 9px); border: 1px solid var(--line); color: var(--body2); position: relative; z-index: 1; }
.kid-profile { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.kid-title { font-size: 26px; font-weight: 400; }
.subject-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 20px; padding: 12px 14px; }
.subject-row .ov-progress { height: 8px; }
.units-stepper { display: flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 999px; padding: 4px; }
.step-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); font-size: 16px; cursor: pointer; }
.step-btn.dark { background: var(--ink); color: var(--on-ink); }
.step-btn:disabled { opacity: .35; cursor: default; }
.units-count { font-size: 13px; font-weight: 600; min-width: 72px; text-align: center; }
.add-subjects { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--line-dash); padding-top: 14px; }
.add-chip { height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px dashed var(--line-dash); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.add-chip:hover { border-style: solid; border-color: var(--ink); }
.kids-week { margin-top: 0; }
.kids-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.kids-top > .kid-profile { flex: 1.6 1 380px; }
.kids-top > .kid-exams { flex: 1 1 260px; }
.subject-time { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 600; color: var(--body2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.week-scroll { overflow-x: auto; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(54px, 1fr)); gap: 6px; min-width: 420px; }
.week-head { font-size: 12px; font-weight: 600; text-align: center; padding: 6px 0; border-radius: 999px; color: var(--muted); }
.week-head.today { background: var(--hl); color: #1C1C22; }
.week-col { min-height: 150px; border-radius: 16px; padding: 6px; display: flex; flex-direction: column; gap: 6px; background: var(--field); }
.week-col.empty { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 8px); }
.week-unit { display: flex; flex-direction: column; align-items: center; gap: 1px; border-radius: 10px; padding: 7px 4px; text-align: center; font-size: 11px; color: #1C1C22; background: var(--t-default); }
.week-unit b { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-unit.t-math { background: var(--t-math); } .week-unit.t-lang { background: var(--t-lang); } .week-unit.t-german { background: var(--t-german); }
.week-unit.t-sci { background: var(--t-sci); } .week-unit.t-chem { background: var(--t-chem); } .week-unit.t-latin { background: var(--t-latin); }
.week-unit.t-history { background: var(--t-history); } .week-unit.t-rose { background: var(--t-rose); }
.unit-panel { width: 260px; left: 0; right: auto; padding: 14px; }
/* opened: fixed above the unit (app.js), so the week's scroll box neither cuts it nor grows a scrollbar */
.unit-panel.floating { position: fixed; right: auto; bottom: auto; z-index: 60; }
/* week plan: a unit is dragged to another day (app.js); the column under the pointer is marked */
.week-unit-menu > summary.week-unit { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.week-unit-menu.dragging { opacity: .35; }
.week-col.drop { outline: 2px dashed var(--ink); outline-offset: -2px; }
.week-ghost { position: fixed; z-index: 1000; pointer-events: none; cursor: grabbing; transform: rotate(-3deg); box-shadow: 0 12px 30px rgba(40, 20, 80, .25); list-style: none; }
.exam-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 18px; padding: 10px 12px; }
.exam-left { flex: none; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 5px 10px; border: 1px solid var(--line-dash); }
.exam-left.soon { background: var(--hl); border-color: var(--hl); color: #1C1C22; }
.danger-fold { border-top: 1px dashed var(--line-dash); padding-top: 14px; }
.danger-fold summary { color: var(--danger); cursor: pointer; }
@media (max-width: 1000px) {
  .kids-art { display: none; }
}

/* ---------- Geräte (ADR 0029, draft "Eltern-Geräte"): reuses the layout of "Kinder & Fächer" ---------- */
.dev-icon { width: 52px; height: 52px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #1C1C22; background: var(--t-sci); }
.dev-icon.t-math { background: var(--t-math); } .dev-icon.t-lang { background: var(--t-lang); }
.dev-icon.lg { width: 64px; height: 64px; }
:root[data-theme="dark"] .dev-icon { color: var(--ink); }
.dev-add { position: relative; flex: 1; min-height: 360px; border-radius: var(--r-card); padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: #1C1C22; background: linear-gradient(160deg, #E9E2F8, #DCE8F7); }
:root[data-theme="dark"] .dev-add { color: var(--ink); background: linear-gradient(160deg, #2E2840, #232D3D); }
.dev-add > * { position: relative; z-index: 3; max-width: 210px; }
.dev-add .small { line-height: 1.5; color: inherit; opacity: .85; }
.dev-add form { margin-top: 6px; }
.dev-add-title { font-size: 20px; font-weight: 500; }
.dev-add > .dev-add-art { position: absolute; right: -44px; bottom: -10px; z-index: 2; height: 330px; width: auto; max-width: none; pointer-events: none; filter: drop-shadow(-8px 10px 14px rgba(60, 40, 90, .14)); }
.kids-top > .dev-usage { flex: 1.4 1 380px; }
.kid-profile > .dev-parts { flex: 1 1 100%; display: flex; flex-direction: column; gap: 16px; border-top: 1px dashed var(--line-dash); padding-top: 14px; }
.kids-top > .dev-kids { flex: 1 1 300px; }
.dev-bars { flex: none; height: 190px; }
.dev-bar:not(.zero):not(.future):not(.today) { background: var(--lav); border-color: var(--lav); }
.dev-bar.today:not(.zero) { background: var(--lav); border: 2px solid var(--ink); }
.kid-toggle { position: relative; }
.kid-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kid-toggle > span { height: 46px; padding: 0 16px 0 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; background: var(--card); border: 1.5px dashed var(--line-dash); opacity: .7; cursor: pointer; }
.kid-toggle > span .avatar { width: 34px; height: 34px; font-size: 13px; }
.kid-toggle input:checked + span { border: 1.5px solid var(--ink); opacity: 1; }
.kid-toggle input:focus-visible + span { outline: 3px solid #7C66D8; outline-offset: 2px; }
.dev-last { margin-top: auto; border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: var(--body2); border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--field) 2px 9px); }
.dev-last .strong { color: var(--ink); }
.dev-rule { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line-2); border-radius: 20px; padding: 12px 14px; }
.dev-rule-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #1C1C22; }
.dev-rule-icon.t-sci { background: var(--t-sci); } .dev-rule-icon.t-german { background: var(--t-german); } .dev-rule-icon.t-rose { background: var(--t-rose); }
:root[data-theme="dark"] .dev-rule-icon { color: var(--ink); }
@media (max-width: 1000px) {
  .dev-add { min-height: 0; }
  .dev-add > .dev-add-art { display: none; }
}

/* ---------- Lernfortschritte (ADR 0029, draft "Eltern-Berichte") ---------- */
/* Level and outcome chips in the draft's tones: sure green, practising blue, open dashed (models.learning.LEVEL_TONE). */
.chip.t-mint, .tag.t-mint { background: var(--green-2); border-color: var(--green-2); color: #1C1C22; }
.chip.t-sky, .tag.t-sky { background: var(--blue); border-color: var(--blue); color: #1C1C22; }
.chip.t-peach, .tag.t-peach { background: #F7E0D6; border-color: #F7E0D6; color: #1C1C22; }
.chip.t-lilac, .tag.t-lilac { background: #E6DDF6; border-color: #E6DDF6; color: #1C1C22; }
.chip.t-sun, .tag.t-sun { background: var(--hl); border-color: var(--hl); color: #1C1C22; }
.chip.t-rose { background: #F3E3EE; border-color: #F3E3EE; color: #1C1C22; }
.chip.t-line { background: transparent; border: 1px dashed var(--line-dash); }
a.chip:hover { border-color: var(--ink); color: inherit; }
a.chip.t-mint:hover, a.chip.t-sky:hover, a.chip.t-lilac:hover, a.chip.t-peach:hover { color: #1C1C22; }
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.rep-kpi { gap: 18px; color: #1C1C22; }
/* each key figure its own tone (palette of the draft); light in both themes, so the text stays dark */
.rep-kpi:nth-child(1) { background: var(--hl); }
.rep-kpi:nth-child(2) { background: #E9E2F8; }
.rep-kpi:nth-child(3) { background: #D9EFD0; }
.rep-kpi:nth-child(4) { background: #DCEBFB; }
.rep-kpi .muted { color: #4D4A55; }
.rep-kpi .chip { background: rgba(255, 255, 255, .75); border-color: transparent; color: #1C1C22; }
.rep-kpi .chip.t-mint { background: var(--green-2); } .rep-kpi .chip.neg { background: var(--neg); }
.rep-kpi .ov-h { font-size: 17px; }
.rep-kpi > .row-between { min-height: 28px; }
.rep-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.rep-wide { flex: 2 1 520px; }
.rep-side { flex: 1 1 300px; }
.rep-bars { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 12px; align-items: end; height: 230px; }
.rep-bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; color: inherit; }
.rep-bar-col:hover { color: inherit; }
.rep-bar-col:hover .rep-bar { border-color: var(--ink); }
.rep-bar { width: 100%; max-width: 60px; border-radius: 14px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 8px); }
.rep-bar.on { background: repeating-linear-gradient(135deg, var(--hl) 0 3px, var(--hatch-b) 3px 8px); }
.rep-bar-label { max-width: 100%; font-size: 12px; color: var(--muted); }
.rep-bar-label.strong { color: var(--ink); }
.rep-seg { background: var(--t-default); }
.rep-seg.t-math { background: var(--lav); } .rep-seg.t-lang, .rep-seg.t-mint { background: var(--green); } .rep-seg.t-german, .rep-seg.t-peach { background: #F0C3B0; }
.rep-seg.t-sci { background: var(--gauge); } .rep-seg.t-chem, .rep-seg.t-sun { background: var(--hl); } .rep-seg.t-rose { background: #E4BFD6; }
.rep-seg.t-lilac { background: #CFC6EE; } .rep-seg.t-history, .rep-seg.t-latin { background: #E3CFB4; }
.rep-side .ov-pct { width: auto; min-width: 48px; white-space: nowrap; }
.rep-seg.no-time { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 7px); }
.rep-split-row.no-time .ov-sym { background: var(--soft); color: var(--muted); }
.rep-split-row.no-time .ov-pct, .rep-split-row.no-time .strong { color: var(--muted); }
.rep-split-row.dummy .ov-sym { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, var(--hatch-b) 2px 7px); }
.rep-dummy-line { height: 12px; border-radius: 999px; background: var(--soft); }
.rep-dummy-line.short { width: 56px; flex: none; }
.rep-accordion { display: flex; flex-direction: column; gap: 10px; }
.rep-fold { border: 1px solid var(--line-2); border-radius: 20px; background: var(--card); }
.rep-fold[open] { border-color: var(--line-dash); }
.rep-fold > summary { display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; list-style: none; border-radius: 20px; }
.rep-fold > summary::-webkit-details-marker { display: none; }
.rep-fold > summary:hover { background: var(--field); }
.rep-fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 0 6px 4px 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.rep-fold[open] > summary::after { transform: rotate(225deg); margin-bottom: -4px; }
.rep-fold > .rep-topics { padding: 4px 14px 14px; }
.rep-counts { display: flex; gap: 4px; flex: none; }
.rep-counts .chip { height: 26px; min-width: 32px; justify-content: center; padding: 0 9px; }
/* The boy stands next to "Fächer im Lernplan", level with its top, and leans on it (he overlaps the gap and its
   right edge). */
.rep-art-col { display: flex; flex-direction: column; }
.rep-row:has(.rep-art-col) { align-items: flex-start; }
.rep-art { height: 900px; width: auto; max-width: none; margin-left: -40px; align-self: flex-start; position: relative; z-index: 2; pointer-events: none; filter: drop-shadow(-6px 10px 14px rgba(60, 40, 90, .14)); }
@media (max-width: 1000px) { .rep-art-col { display: none; } }
.rep-how { border-top: 1px dashed var(--line-dash); padding-top: 12px; }
.rep-how > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.rep-how[open] > summary { margin-bottom: 10px; }
.rep-how .bullets { font-size: 13px; color: var(--body2); }
.rep-topics { gap: 8px; }
.rep-topic { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line-2); border-radius: 20px; padding: 12px 14px; }
@media (max-width: 560px) {
  .rep-bars { gap: 6px; height: 190px; }
}

/* multi-select dropdown (subjects in "Kind anlegen"): a details menu with checkboxes, works without JS */
.multi-select { width: 100%; }
.multi-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; color: var(--ink); font-weight: 500; }
.multi-summary .truncate { min-width: 0; }
.multi-panel { left: 0; right: auto; width: 100%; min-width: 220px; max-height: 280px; overflow-y: auto; padding: 6px; }
.multi-option { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; }
.multi-option:hover { background: var(--soft); }
.multi-option input { width: 18px; height: 18px; margin: 0; accent-color: #1C1C22; }

/* "Kind anlegen": one row per chosen subject – units a week, length, time */
.plan-table { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line-2); border-radius: 22px; padding: 14px 16px; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.1fr); gap: 10px; align-items: center; }
.plan-row[hidden] { display: none; }
.plan-head { font-size: 12px; font-weight: 500; color: var(--muted); padding-bottom: 2px; }
.plan-row .input, .plan-row .select { height: 44px; border-radius: 14px; }
.plan-units { text-align: center; font-size: 16px; }
@media (max-width: 560px) {
  .plan-row { grid-template-columns: minmax(0, 1fr) 64px; }
  .plan-row > label:nth-of-type(2), .plan-row > label:nth-of-type(3) { grid-column: span 1; }
  .plan-head span:nth-child(n+3) { display: none; }
}

@media (max-width: 1000px) {
  .frame { padding: 0 8px; gap: 24px; }
}
@media (max-width: 560px) {
  .page { padding: 12px 8px; }
  .frame { padding: 0; }
  .card { padding: 18px; }
  .btn { height: 48px; }
}
@media print {
  body { background: #FFFFFF; } .frame { box-shadow: none; border: 0; } .app-head, .app-foot, .no-print { display: none !important; }
}
