:root {
  /* Typo-Skala (Runde 4): elf Stufen statt 26 Einzelwerte */
  --fs-2xs: .75rem; --fs-xs: .8125rem; --fs-sm: .875rem; --fs-base: .9375rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.25rem; --fs-xl2: 1.375rem; --fs-2xl: 1.5rem; --fs-3xl: 1.75rem; --fs-4xl: 2.25rem;
  /* Eckenradien: fünf Stufen plus Pille */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
}
/* SoL-Plattform. Freundlich und klar für Schüler:innen von 10 bis 18, ruhiger für Lehrkräfte.
   Farben als Tokens, hell und dunkel. Schrift: Plus Jakarta Sans (OFL, lokal eingebunden). */
@font-face {
  font-family: "Jakarta";
  src: url("/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  /* Ohne Bindestrich (U+002D): der ist in dieser Schrift sehr breit und sieht wie ein Gedankenstrich aus.
     Er kommt aus der Systemschrift, damit "ABCD-EFGH" und "Check-in" eindeutig bleiben. */
  unicode-range: U+0000-002C, U+002E-FFFF;
}
:root {
  --bg: #f5f4fa;
  --surface: #ffffff;
  --surface-2: #f0eef7;
  --surface-3: #e7e4f2;
  --text: #1b1930;
  --muted: #646079;
  --line: #e3e0ee;
  --field-line: #85819e;
  --accent: #5a44dc;
  --accent-2: #7b5cf0;
  --accent-soft: #edeafd;
  --accent-text: #ffffff;
  --accent-ink: #5a44dc;
  --danger: #c93636;
  --danger-soft: #fdeceb;
  --danger-text: #ffffff;
  --ok: #0b6e37;
  --ok-bright: #12803f;
  --ok-on: #ffffff;
  --ok-soft: #e1f6ea;
  --warn: #9a5b00;
  --warn-soft: #fff1d6;
  --violet: #6b4bb8;
  --violet-soft: #efeafb;
  --sun: #ffc533;
  --radius: var(--r-lg);
  --radius-sm: var(--r-md);
  --shadow: 0 1px 2px rgba(27, 25, 48, .05), 0 4px 16px rgba(27, 25, 48, .06);
  --shadow-lg: 0 10px 30px rgba(50, 35, 120, .14);
  --sidebar: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --danger: #ff8f86;
    --danger-text: #2a0a0e;
    --ok: #6fdc9b;
    --ok-bright: #3fcf7c;
    --ok-on: #0b2a18;
    --warn: #f3c46a;
    --violet: #b9a2ff;
    color-scheme: dark;
  }
}

/* Farbwelten je Fach. --c Hauptfarbe und --c2 Verlauf (Farbton verschoben, beide mit Schrift --on-c >= 4,5:1), --c-deco0/--c-deco leuchtend für reine Deko ohne Text (Streifen, Punkte, Balken, Kopfbilder), --cs zarte Fläche, --ci Schrift auf zarter Fläche */
:root { --on-c: #fff; --on-c-rgb: 255,255,255; --on-chip: rgba(0,0,0,.12); --on-ring: rgba(255,255,255,.35); }
.theme-0 { --c: #5a44dc; --c2: #8c51f1; --c-deco0: #5a44dc; --c-deco: #8b5cf6; --cs: #edeafd; --ci: #4330b8; --cw: #4330b8;  }
.theme-1 { --c: #d93912; --c2: #cb4b00; --c-deco0: #d9482b; --c-deco: #f27a3c; --cs: #fdebe4; --ci: #b13a20; --cw: #b13a20;  }
.theme-2 { --c: #078473; --c2: #0b865d; --c-deco0: #0b8478; --c-deco: #17b3a0; --cs: #def5f1; --ci: #08695f; --cw: #08695f;  }
.theme-3 { --c: #2563c9; --c2: #1f6dd8; --c-deco0: #2563c9; --c-deco: #3e8cf0; --cs: #e3eefd; --ci: #1d4f9f; --cw: #1d4f9f;  }
.theme-4 { --c: #c42f6e; --c2: #dc1f7e; --c-deco0: #c42f6e; --c-deco: #ec5a96; --cs: #fce6ef; --ci: #a2245a; --cw: #a2245a;  }
.theme-5 { --c: #1c8640; --c2: #0b865d; --c-deco0: #2b8a46; --c-deco: #46b864; --cs: #e2f5e7; --ci: #216b36; --cw: #216b36;  }
@media (prefers-color-scheme: dark) {
  .theme-0 { --ci: #c0b4ff; }
  .theme-1 { --ci: #ffb39e; }
  .theme-2 { --ci: #7fe0d3; }
  .theme-3 { --ci: #9cc3ff; }
  .theme-4 { --ci: #ffa6c9; }
  .theme-5 { --ci: #94e2aa; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 1rem/1.55 "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Sprunglink, Fokus nach Seitenwechsel */
.skip-link { position: fixed; left: 12px; top: 8px; z-index: 1000; padding: 12px 18px; border-radius: var(--r-md); background: var(--accent); color: var(--accent-text); font-weight: 800; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; outline: 3px solid var(--text); outline-offset: 2px; }
main:focus, #main h1[tabindex="-1"]:focus { outline: 0; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: -4px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; vertical-align: -3px; }
.icon.lg { width: 28px; height: 28px; }

/* ---------- Grundgerüst ---------- */
.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: var(--fs-lg); color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--accent), #e0569a); display: grid; place-items: center; color: #fff; box-shadow: 0 4px 10px rgba(90, 68, 220, .3); }
.brand-mark .icon { width: 19px; height: 19px; stroke-width: 2.4; }
.school { color: var(--muted); font-size: var(--fs-sm); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #ffd166, #ff8a5b); color: #3b1a00; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); }
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: var(--r-md); border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.demo-banner { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 4px 16px; font-size: var(--fs-sm); font-weight: 600; }

.layout { display: flex; }
.sidebar {
  position: sticky; top: 60px; height: calc(100vh - 60px); width: var(--sidebar); flex: 0 0 var(--sidebar);
  padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto;
}
.sidebar .group-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin: 20px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: var(--fs-base); font-weight: 600;
}
.nav-link .icon { color: var(--muted); }
.nav-link:hover { background: var(--surface-2); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-ink); }
.nav-link.active .icon { color: var(--accent-ink); }
main { flex: 1; min-width: 0; padding: 28px 40px 96px; }
main.wide { max-width: none; }
.bottom-nav { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  main { padding: 18px 16px 110px; }
  .topbar { padding: 0 14px; height: 56px; }
  .sidebar { top: 56px; }
  .user-chip .name { display: none; }
  .bottom-nav {
    display: flex; position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border: 1px solid var(--line); border-radius: var(--r-xl); padding: 6px; box-shadow: var(--shadow-lg);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
    font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-decoration: none; padding: 7px 2px 6px; border-radius: var(--r-lg);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .bottom-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .bottom-nav a.active { color: var(--accent-ink); background: var(--accent-soft); }
  .bottom-nav .icon { width: 23px; height: 23px; }
}

/* Schüler:innen: Navigation als Leiste oben (Desktop) bzw. unten (Handy), keine Seitenleiste */
body.is-student main { margin: 0 auto; }
@media (min-width: 861px) {
  body.is-student .bottom-nav {
    display: flex; position: static; gap: 4px; padding: 4px; border-radius: var(--r-lg); background: var(--surface-2);
    order: 0; margin: 0 auto;
  }
  body.is-student .bottom-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-md); color: var(--muted); text-decoration: none; font-weight: 700; font-size: var(--fs-base); }
  body.is-student .bottom-nav a:hover { color: var(--text); }
  body.is-student .bottom-nav a.active { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow); }
  body.is-student .topbar .school { flex: 0 1 auto; }
}

/* ---------- Typografie und Grundbausteine ---------- */
h1 { font-size: var(--fs-3xl); line-height: 1.2; margin: 0 0 6px; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: var(--fs-xl); margin: 0 0 12px; letter-spacing: -.015em; font-weight: 800; }
h3 { font-size: var(--fs-md); margin: 0; letter-spacing: -.01em; font-weight: 750; }
@media (max-width: 600px) { h1 { font-size: var(--fs-2xl); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; margin-bottom: 10px; padding: 6px 10px 6px 4px; border-radius: var(--r-sm); }
.back:hover { background: var(--surface-2); }
.card { background: var(--surface); border: 1px solid var(--line); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.narrow { max-width: 440px; margin: 40px auto; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .grow { flex: 1; min-width: 160px; }
.spacer { flex: 1; }
.empty { text-align: center; padding: 44px 18px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; stroke-width: 1.5; margin-bottom: 8px; color: var(--accent-ink); }

label, .label { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin: 0 0 5px; }
.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--field-line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-base); font-weight: 500; color: var(--text); margin: 0 12px 0 0; cursor: pointer; }
input.title-input { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; border-color: var(--field-line); padding: 4px 8px; margin-left: -8px; background: transparent; }
input.title-input:hover { border-color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-md); border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; font-size: var(--fs-base);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--surface); color: var(--accent-ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-ink); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: transparent; border-color: var(--line); color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.small { padding: 7px 12px; font-size: var(--fs-sm); border-radius: var(--r-md); }
.btn.big { padding: 15px 22px; font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 700; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--accent-ink); border-bottom-color: var(--accent); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.meta { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--fs-sm); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.tile { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; margin: 0; }
a.tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile h3 { margin-bottom: 6px; }

.progress { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--ok-bright), #7be3a6); border-radius: var(--r-pill); transition: width .4s; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: var(--fs-sm); }
tr:last-child td { border-bottom: 0; }
td select { width: auto; padding: 5px 9px; }
.status-create { color: var(--ok); }
.status-error { color: var(--danger); }
.error { color: var(--danger); margin: 10px 0 0; font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: var(--r-md); font-weight: 700; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (max-width: 860px) { .toast { bottom: 100px; } }
.qr { width: 180px; height: 180px; background: #fff; padding: 6px; border-radius: var(--r-sm); }
.code { font: 700 1.375rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; }
.secret { font: 0.9375rem ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }

dialog { border: 0; border-radius: var(--r-xl); padding: 0; width: min(560px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20, 16, 40, .5); backdrop-filter: blur(2px); }
dialog .dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
dialog .dlg-body { padding: 22px; max-height: 70vh; overflow-y: auto; }
dialog .dlg-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; }
.menu-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-base); font-weight: 600; text-align: left; border-radius: var(--r-sm); cursor: pointer; }
.menu-list button:hover { background: var(--surface-2); }
.menu-list button.danger { color: var(--danger); }

/* ---------- Lehrkräfte: Start und Lernpfad-Liste ---------- */
.staff-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 28px; margin-bottom: 22px; color: #fff; }
.staff-hero h1 { color: #fff; }
.staff-hero p { margin: 0; }
.staff-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.staff-hero::before { content: ""; position: absolute; right: 90px; bottom: -70px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,209,102,.22); }
.tile.soon { opacity: .75; }
.path-tile { position: relative; overflow: hidden; padding-top: 26px; }
.path-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--c-deco0, var(--accent)), var(--c-deco, var(--accent-2))); }

/* ---------- Lernpfad-Editor ---------- */
.editor-head { display: grid; gap: 8px; margin-bottom: 20px; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-card { padding: 0; }
.section-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.section-head input { font-weight: 800; font-size: var(--fs-md); background: transparent; border-color: var(--field-line); padding: 4px 6px; }
.section-head input:hover { border-color: var(--muted); }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row { border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-summary { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; }
.task-summary:hover { background: var(--surface-2); }
.task-summary .title { flex: 1; min-width: 0; font-weight: 700; }
.task-summary .meta { flex: 0 0 auto; }
.task-edit { padding: 4px 16px 16px; background: var(--surface); }
.task-edit .grid-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.task-edit .grid-form .span-all { grid-column: 1 / -1; }
@media (max-width: 700px) { .task-edit .grid-form { grid-template-columns: 1fr 1fr; } }
.levels { display: flex; gap: 6px; flex-wrap: wrap; }
.level-toggle { display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer; }
.level-toggle.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.materials { list-style: none; padding: 0; margin: 0 0 8px; }
.materials li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-base); }
.materials li:last-child { border-bottom: 0; }
.materials li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subpanel { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-top: 12px; }
.subpanel h4 { margin: 0 0 8px; font-size: var(--fs-sm); }
.add-task { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.add-task input { flex: 1; }
.preview-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--violet-soft); color: var(--violet); margin-bottom: 16px; font-weight: 700; }
.preview-bar select { width: auto; }
.empty-hint { padding: 14px 16px; margin: 0; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 600px) {
  .task-summary { flex-wrap: wrap; row-gap: 6px; }
  .task-summary .title { order: -1; flex-basis: 100%; white-space: normal; }
  .section-head input { min-width: 0; }
}

/* ---------- Schüler: gemeinsame Bausteine ---------- */
.ring { position: relative; width: var(--size); height: var(--size); flex: 0 0 auto; display: grid; place-items: center; }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-track { stroke: var(--surface-2); }
.ring-bar { stroke: var(--c, var(--accent)); transition: stroke-dashoffset .6s cubic-bezier(.3,.7,.3,1); }
.ring-num { position: relative; font-weight: 800; font-size: calc(var(--size) * .24); letter-spacing: -.02em; }
.on-color .ring-track { stroke: rgba(var(--on-c-rgb), .28); }
.on-color .ring-bar { stroke: var(--on-c); }

.due { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.due.soon { background: var(--warn-soft); color: var(--warn); }
.due.late { background: var(--danger-soft); color: var(--danger); }
.on-color .due { background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); color: var(--on-c); }
.on-color .due.late { background: #fff; color: #b3261e; }

.subject-tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 800; color: var(--ci, var(--accent)); }
.subject-tag::before { content: ""; width: 9px; height: 9px; border-radius: var(--r-xs); background: var(--c, var(--accent)); }
.on-color .subject-tag { color: var(--on-c); }
.on-color .subject-tag::before { background: rgba(var(--on-c-rgb), .8); }

.section-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 30px 0 12px; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); }

/* ---------- Schüler: Lernplaner ---------- */
.hello { margin: 6px 0 22px; }
.hello h1 { font-size: var(--fs-4xl); }
.hello p { margin: 0; color: var(--muted); font-size: var(--fs-md); }
@media (max-width: 600px) { .hello h1 { font-size: var(--fs-3xl); } .hello p { font-size: var(--fs-md); } }

.next-up { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 24px; border-radius: var(--r-xl); color: var(--on-c); text-decoration: none; margin-bottom: 26px;
  background: radial-gradient(120% 140% at 100% 0%, var(--c2) 0%, var(--c) 60%);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 35%, transparent);
  transition: transform .15s;
}
.next-up:hover { transform: translateY(-2px); }
.next-up::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(var(--on-c-rgb), .1); pointer-events: none; }
.next-up .eyebrow { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.next-up h2 { color: var(--on-c); font-size: var(--fs-2xl); margin: 6px 0 4px; line-height: 1.2; }
.next-up .from { font-weight: 600; font-size: var(--fs-base); }
.next-up .btn.hero { margin-top: 16px; }
.next-up .ring-num { color: var(--on-c); }
@media (max-width: 600px) { .next-up { padding: 20px; } .next-up h2 { font-size: var(--fs-xl); } }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: var(--fs-2xl); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.stat.ok b { color: var(--ok); }
.stat.warn b { color: var(--warn); }
.stat.late b { color: var(--danger); }
@media (max-width: 600px) { .stat b { font-size: var(--fs-xl2); } }

.path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.path-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center;
  padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.path-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--c-deco0), var(--c-deco)); }
.path-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.path-card h3 { font-size: var(--fs-lg); margin: 6px 0 10px; line-height: 1.25; }
.path-card .counts { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; margin-top: 10px; }
.path-card.finished .ring-bar { stroke: var(--ok-bright); }

/* ---------- Schüler: Lernpfad als Weg ---------- */
.path-hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px; margin-bottom: 8px; color: var(--on-c);
  background: radial-gradient(130% 160% at 100% 0%, var(--c2) 0%, var(--c) 62%);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 30%, transparent);
}
.path-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(var(--on-c-rgb), .1); pointer-events: none; }
.path-hero .top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.path-hero h1 { color: var(--on-c); font-size: var(--fs-4xl); max-width: 26ch; }
.path-hero .prose { max-width: 60ch; }
.path-hero .row-progress { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.path-hero .row-progress .label-big { font-weight: 800; font-size: var(--fs-md); }
.path-hero .row-progress .label-small { font-size: var(--fs-sm); }
.path-hero .ring-num { color: var(--on-c); }

.stage { margin-top: 26px; }
.stage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.stage-num { width: 34px; height: 34px; border-radius: var(--r-md); display: grid; place-items: center; font-weight: 800; background: var(--cs); color: var(--ci); }
.stage-head h2 { margin: 0; font-size: var(--fs-lg); }
.stage-head .count { margin-left: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.stage.complete .stage-num { background: var(--ok-bright); color: var(--ok-on); }

.trail { list-style: none; margin: 0; padding: 0; position: relative; }
.trail::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; border-radius: var(--r-xs); background: repeating-linear-gradient(180deg, var(--surface-3) 0 8px, transparent 8px 14px); }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; margin-bottom: 12px; }
.node {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface-3); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: transparent; margin-top: 10px; padding: 0;
  transition: background .2s, border-color .2s, transform .15s;
}
.node:hover { border-color: var(--ok-bright); color: color-mix(in srgb, var(--ok-bright) 45%, transparent); }
.node .icon { width: 22px; height: 22px; stroke-width: 3; }
.node.on { background: var(--ok-bright); border-color: var(--ok-bright); color: var(--ok-on); }
.node.info { cursor: default; border-style: dashed; color: var(--muted); }
.node.info .icon { stroke-width: 2; }
.step.current .node:not(.on) { border-color: var(--c); box-shadow: 0 0 0 6px var(--cs); }
@keyframes pop { 40% { transform: scale(1.18); } }

.task {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden;
  transition: border-color .2s, opacity .2s;
}
.step.current .task { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.task > summary { list-style: none; cursor: pointer; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.task > summary::-webkit-details-marker { display: none; }
.task > summary h3 { font-size: var(--fs-md); line-height: 1.3; }
.task > summary .chev { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); transition: transform .2s; }
.task[open] > summary .chev { transform: rotate(180deg); }
.task .tmeta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.task .tmeta span { display: inline-flex; align-items: center; gap: 4px; }
.task-content { padding: 0 18px 18px; }
.task-content > * + * { margin-top: 12px; }
.step.done .task h3 { text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--ok-bright) 70%, transparent); }

.ttype { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 800; padding: 2px 8px; border-radius: var(--r-sm); text-transform: uppercase; letter-spacing: .04em; }
.ttype.extra { background: #fff3cf; color: #8a5a00; }
.ttype.diagnosis { background: #e6f0ff; color: #2456a6; }
@media (prefers-color-scheme: dark) {
  .ttype.extra { background: #3a3018; color: #f3c46a; }
  .ttype.diagnosis { background: #182a46; color: #9cc3ff; }
}

.mark-done { display: flex; justify-content: flex-start; padding-top: 4px; }
.prose p { margin: 0 0 8px; }
.prose ul, .prose ol { margin: 0 0 8px; padding-left: 22px; }
.prose li + li { margin-top: 2px; }
.prose p:last-child { margin-bottom: 0; }
.mat-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.mat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--text); background: var(--surface); font-weight: 600; }
.mat:hover { border-color: var(--c, var(--accent)); }
.mat > .icon:first-child { color: var(--c, var(--accent)); background: var(--cs, var(--accent-soft)); width: 34px; height: 34px; padding: 7px; border-radius: var(--r-sm); }
.mat .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mat-img { max-width: 100%; max-height: 360px; border-radius: var(--r-md); border: 1px solid var(--line); display: block; }
audio, video.mat-video { width: 100%; max-width: 640px; }
details.solution { border: 1.5px dashed color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); border-radius: var(--r-md); padding: 10px 14px; }
details.solution summary { cursor: pointer; font-weight: 800; color: var(--ok); }
details.solution[open] summary { margin-bottom: 8px; }

.cheer { display: flex; align-items: center; font-weight: 700; margin-top: 18px; }
.cheer .icon { width: 30px; height: 30px; }

.coming { text-align: center; padding: 40px 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.coming .bubble { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: var(--r-xl); display: grid; place-items: center; color: #fff; background: radial-gradient(120% 120% at 100% 0%, var(--c2), var(--c)); transform: rotate(-6deg); }
.coming .bubble .icon { width: 40px; height: 40px; }
.coming p { color: var(--muted); max-width: 40ch; margin: 8px auto 0; }

/* Konfetti */
.burst { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.burst .bit { position: absolute; border-radius: var(--r-xs); animation: bit .8s cubic-bezier(.2,.7,.3,1) forwards; }
.burst .c0 { background: #ffc533; } .burst .c1 { background: #ff6b6b; } .burst .c2 { background: #4dd4ac; } .burst .c3 { background: #7b5cf0; } .burst .c4 { background: #3e8cf0; }
@keyframes bit { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Anmeldung ---------- */
.login-wrap { min-height: calc(100vh - 60px); display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(0deg, rgba(40,20,90,.5), transparent 55%), radial-gradient(80% 70% at 100% 100%, #ff8a5b 0%, transparent 60%), radial-gradient(80% 80% at 100% 0%, #e0569a 0%, transparent 55%), linear-gradient(140deg, #4b36c9, #7b5cf0);
}
.login-art h2 { font-size: var(--fs-4xl); line-height: 1.05; letter-spacing: -.035em; color: #fff; margin: 0 0 12px; max-width: 12ch; }
.login-art p { font-size: var(--fs-lg); margin: 0; max-width: 32ch; }
.login-art .shape { position: absolute; border-radius: var(--r-xl); background: rgba(255,255,255,.14); }
.login-art .s1 { width: 160px; height: 160px; transform: rotate(18deg); }
.login-art .s2 { width: 90px; height: 90px; border-radius: 50%; background: rgba(255,209,102,.55); }
.login-art .s3 { width: 60px; height: 60px; top: 120px; left: 60px; border-radius: var(--r-lg); background: rgba(77,212,172,.6); transform: rotate(-12deg); }
.login-side { display: grid; place-items: center; padding: 32px 20px; }
.login-box { width: 100%; max-width: 420px; }
.login-box h1 { font-size: var(--fs-4xl); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: var(--r-lg); padding: 5px; margin: 20px 0 22px; }
.seg a { text-align: center; padding: 10px 8px; border-radius: var(--r-md); text-decoration: none; color: var(--muted); font-weight: 700; font-size: var(--fs-base); }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
input.code-input { font: 800 1.625rem/1.2 "Jakarta", system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .14em; text-align: center; padding: 14px; text-transform: uppercase; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; min-height: 0; }
  .login-art .s3 { display: none; }
  .login-side { padding: 22px 16px 40px; place-items: start center; }
}
body.no-chrome main { max-width: none; padding: 0; }

/* Anmeldekarten zum Ausdrucken */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.login-card { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 12px; text-align: center; background: var(--surface); break-inside: avoid; }
.login-card img { width: 120px; height: 120px; background: #fff; }
.login-card .name { font-weight: 700; }

@media print {
  .topbar, .sidebar, .bottom-nav, .demo-banner, .no-print, .toast { display: none !important; }
  body, .login-card, .card { background: #fff; color: #000; box-shadow: none; }
  main { max-width: none; padding: 0; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 6mm; }
  .login-card { border-color: #999; }
}
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.m0 { margin: 0; }
.grow { flex: 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Vorschau der Lehrkräfte nutzt die Schüleransicht */

/* ===== Iteration 2 ===== */
/* Handy: weniger Kopf, mehr Inhalt */
@media (max-width: 860px) {
  body.is-student .topbar .school { visibility: hidden; }
  .demo-banner { font-size: var(--fs-xs); padding: 2px 12px; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* sanfter Übergang hinter der schwebenden Leiste */
  body.is-student::after, body:has(.bottom-nav:not([hidden]))::after {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 19; pointer-events: none;
    background: linear-gradient(180deg, transparent, var(--bg) 70%);
  }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.bottom-nav .ic { display: inline-flex; }
.bottom-nav a.soon:not(.active) { color: color-mix(in srgb, var(--muted) 75%, transparent); }
@media (min-width: 861px) {
  body.is-student .bottom-nav .lbl { order: 1; }
}

/* Dunkelmodus: Knopf auf Farbfläche bleibt lesbar */

/* Startseite Stat-Kacheln mit Icon */
.stat { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.stat i { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.stat.ok i { background: var(--ok-soft); color: var(--ok); }
.stat.warn i { background: var(--warn-soft); color: var(--warn); }
.stat.late i { background: var(--danger-soft); color: var(--danger); }
.stat.info i { background: var(--accent-soft); color: var(--accent-ink); }
.stat.info b { color: var(--accent-ink); }
@media (max-width: 600px) {
  .stats { gap: 8px; }
  .stat { grid-template-columns: 1fr; text-align: left; padding: 12px; }
  .stat i { grid-row: auto; width: 30px; height: 30px; border-radius: var(--r-sm); margin-bottom: 6px; }
  .stat i .icon { width: 17px; height: 17px; }
}
.path-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.path-card .counts { grid-column: 1 / -1; }

/* Lernpfad-Kopf kompakter, Beschreibung aufklappbar */
.path-hero h1 { margin: 10px 0 0; }
.path-hero .row-progress { margin-top: 16px; }
.path-hero details.about { position: relative; z-index: 1; margin-top: 16px; background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); border-radius: var(--r-md); padding: 10px 14px; }
.path-hero details.about summary { cursor: pointer; font-weight: 800; display: flex; align-items: center; gap: 6px; list-style: none; }
.path-hero details.about summary::-webkit-details-marker { display: none; }
.path-hero details.about[open] summary { margin-bottom: 8px; }
@media (max-width: 600px) { .path-hero .ring { --size: 64px !important; } }

.path-sticky {
  position: fixed; left: 0; right: 0; top: 56px; z-index: 18; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 8px 16px 10px; background: linear-gradient(90deg, var(--c), var(--c2)); color: var(--on-c); font-weight: 800; font-size: var(--fs-sm);
  transform: translateY(-120%); transition: transform .25s; box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.path-sticky.show { transform: none; }
.path-sticky .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.path-sticky .bar { grid-column: 1 / -1; height: 6px; border-radius: var(--r-sm); background: rgba(var(--on-c-rgb), .3); overflow: hidden; }
.path-sticky .bar > div { height: 100%; background: var(--on-c); border-radius: var(--r-sm); transition: width .5s; }
@media (min-width: 861px) { .path-sticky { top: 60px; } }

/* Aufgabe: Kopf in einer Zeile, Pfeil rechts oben */
.task > summary { display: block; position: relative; padding: 14px 48px 14px 18px; }
.task > summary .chev { position: absolute; right: 14px; top: 16px; }
.task > summary .tmeta { margin-top: 8px; }
.now-label { display: none; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ci); margin-bottom: 2px; }
.step.current .now-label { display: block; }
.step.current .task { border-width: 2px; }
.step.done .task h3 { text-decoration: none; }
.step.just-done .task { animation: glow 1.1s ease-out; }
@keyframes glow { 0% { background: var(--ok-soft); border-color: var(--ok-bright); } 100% { background: var(--surface); } }
.node.on { animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }
.node:not(.info):not(.on)::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2px dashed transparent; }
.stage-num .icon { display: none; }
.stage.complete .stage-num .num { display: none; }
.stage.complete .stage-num .icon { display: block; width: 18px; height: 18px; stroke-width: 3; }
.stage.complete .stage-head .count { color: var(--ok); }

/* Typ-Abzeichen auch ohne Fachfarbe (Editor) */
.ttype .icon { width: 13px; height: 13px; stroke-width: 2.4; }

/* Anmeldung: Illustration, Formen hinter dem Text */
.login-art .art-text { position: relative; z-index: 1; }
.login-art .shape { z-index: 0; }
.demo-card {
  position: absolute; z-index: 1; top: 18%; left: 50%; transform: translateX(-50%) rotate(-3deg); width: min(340px, 70%);
  background: #fff; color: #1b1930; border-radius: var(--r-xl); padding: 18px; box-shadow: 0 24px 60px rgba(20,10,60,.35);
}
.dc-head { display: flex; justify-content: space-between; align-items: center; }
.dc-tag { font-size: var(--fs-xs); font-weight: 800; color: #0b8478; }
.dc-ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; border: 5px solid #17b3a0; border-left-color: #e3f5f1; }
.dc-title { font-size: var(--fs-lg); font-weight: 800; margin: 2px 0 12px; letter-spacing: -.02em; }
.dc-step { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 600; padding: 7px 0; color: #4b4863; }
.dc-step i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid #e3e0ee; flex: 0 0 auto; }
.dc-step.done i { background: #1fb565; border-color: #1fb565; color: #fff; }
.dc-step.done i .icon { width: 13px; height: 13px; stroke-width: 3.2; }
.dc-step.now { color: #1b1930; font-weight: 800; }
.dc-step.now i { border-color: #0b8478; box-shadow: 0 0 0 4px #def5f1; }
.login-art .s1 { top: 40px; right: 40px; }
.login-art .s2 { top: auto; bottom: 200px; right: 60px; }
@media (max-width: 860px) {
  .demo-card { display: none; }
  .login-art { min-height: 0; padding: 22px 20px 20px; border-radius: 0 0 26px 26px; }
  .login-art h2 { font-size: var(--fs-2xl); max-width: none; margin-bottom: 4px; }
  .login-art p { font-size: var(--fs-base); }
  .login-art .s1 { width: 80px; height: 80px; top: -20px; right: -10px; }
  .login-art .s2 { width: 40px; height: 40px; top: 18px; bottom: auto; right: 84px; }
  .login-box h1 { font-size: var(--fs-xl2); }
  .login-side { padding-top: 18px; }
  .seg { margin: 14px 0 16px; }
  body.no-chrome .topbar { display: none; }
}

/* Selects einheitlich */
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646079' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
td select { padding-right: 30px; background-position: right 8px center; }

/* Lehrkräfte */
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: rgba(0,0,0,.3); font-size: var(--fs-xs); font-weight: 800; }
@media (min-width: 861px) {
  .layout:has(.sidebar:not([hidden])) { background: linear-gradient(90deg, var(--surface) calc(var(--sidebar) - 1px), var(--line) calc(var(--sidebar) - 1px), var(--line) var(--sidebar), transparent var(--sidebar)); }
}
.staff-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.staff-hero > * { position: relative; z-index: 1; }
.btn.hero { background: #fff; color: var(--cw, #4b36c9); border-color: #fff; min-height: 44px; box-sizing: border-box; font-weight: 800; }
.section-title .more { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); text-decoration: none; }
.class-tile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; }
.class-tile h3 { margin: 0; }
.class-badge { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); }
.path-tile .subject-tag { font-size: var(--fs-xs); }

/* Feinschliff Iteration 2 */
.login-art .s2 { display: none; }
@media (max-width: 860px) {
  .stat { grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; padding: 12px; }
  .stat i { grid-row: auto; margin: 0; width: 28px; height: 28px; }
  .stat span { grid-column: 1 / -1; font-size: var(--fs-xs); line-height: 1.3; }
}
.path-sticky .t, .path-sticky .n { transition: opacity .2s; }
.path-sticky .msg { display: none; }
.path-sticky.cheering .t { display: none; }
.path-sticky.cheering .msg { display: block; }
.bottom-nav a span.ic { overflow: visible; max-width: none; }

/* ===== Iteration 3 ===== */
/* Nicht fertige Bereiche: gedämpft statt "neu"-Punkt */
@media (max-width: 860px) {
  .bottom-nav a.soon:not(.active) { opacity: .55; }
}

/* Demo-Hinweis am Handy als kleines Etikett neben dem Logo */
@media (max-width: 860px) {
  .demo-banner { display: none !important; }
  body.is-demo .brand::after { font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); }
}

/* Anmeldung */
input.code-input::placeholder { color: var(--muted); font-weight: 600; letter-spacing: .1em; }
.school-known { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-base); }
.school-known span { flex: 1; }
.school-known .icon { color: var(--accent-ink); }
.art-brand { display: none; }
@media (max-width: 860px) {
  .art-brand { display: flex; position: relative; z-index: 1; align-items: center; gap: 8px; font-weight: 800; font-size: var(--fs-md); margin-bottom: 12px; }
  .art-brand .brand-mark { width: 28px; height: 28px; background: rgba(255,255,255,.2); box-shadow: none; }
  .art-brand .brand-mark .icon { width: 16px; height: 16px; }
}

/* Rückmeldung in der Leiste: ohne seitliches Einschieben */
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } }
.path-sticky.cheering .msg { animation: msg-in .25s ease-out; }
.path-sticky { padding-inline: 16px; }

/* Lernpfad-Kopf am Handy kompakt */
@media (max-width: 600px) {
  .back { margin-bottom: 4px; padding-block: 2px; }
  .path-hero { padding: 16px 16px 14px; border-radius: var(--r-xl); }
  .path-hero .top { gap: 6px; }
  .path-hero .top .due, .path-hero .top .subject-tag { font-size: var(--fs-xs); }
  .path-hero h1 { margin-top: 8px; }
  .path-hero .row-progress { gap: 12px; }
  .path-hero .ring { --size: 56px !important; }
  .path-hero .row-progress .label-big { font-size: var(--fs-base); }
  .path-hero .row-progress .label-small { font-size: var(--fs-sm); }
  .path-hero details.about { margin-top: 12px; padding: 7px 12px; font-size: var(--fs-sm); }
  .path-hero details.about summary { font-size: var(--fs-sm); }
  .stage { margin-top: 20px; }
}

/* Erledigt-Knopf: groß, grün, nie unter der Leiste */
.mark-done .btn:not(.secondary) { background: var(--ok-bright); border-color: var(--ok-bright); color: var(--ok-on); }
@media (max-width: 860px) {
  .mark-done .btn { width: 100%; padding-block: 14px; font-size: var(--fs-md); }
  .mark-done .btn.secondary { padding-block: 10px; font-size: var(--fs-sm); }
  .step { scroll-margin-top: 130px; scroll-margin-bottom: 120px; }
}
.mark-done .btn .icon { width: 20px; height: 20px; stroke-width: 2.8; }

/* Pflicht hat überall dieselbe Farbe */
.ttype.required { background: var(--accent-soft); color: var(--accent-ink); }

/* Konfetti etwas größer, runde Teile */
.burst .bit { width: 10px; height: 10px; animation-duration: 1s; }
.burst .bit.round { border-radius: 50%; width: 8px; height: 8px; }

/* Abschnitt fertig */
.stage.just-complete .stage-num { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }

/* Pflicht geschafft */
.cheer { gap: 16px; padding: 20px; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--ok-bright), var(--ok-bright)); color: var(--ok-on); box-shadow: 0 12px 30px color-mix(in srgb, var(--ok-bright) 30%, transparent); }
.cheer strong { font-size: var(--fs-lg); }
.cheer p { margin: 4px 0 0; font-weight: 500; }
.cheer .medal { width: 56px; height: 56px; flex: 0 0 auto; border-radius: var(--r-lg); background: rgba(255,255,255,.22); display: grid; place-items: center; transform: rotate(-6deg); }
.cheer .medal .icon { width: 30px; height: 30px; }
.cheer:not([hidden]) { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }

/* Wochenspur */
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 8px; }
.week-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; font-size: var(--fs-base); }
.due.ok { background: var(--ok-soft); color: var(--ok); }
.week-days { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.week-days li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week-days .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); background: var(--surface-2); color: var(--muted); border: 2px solid transparent; }
.week-days li.on .dot { background: var(--ok-bright); color: var(--ok-on); }
.week-days li.today .dot { border-color: var(--accent); }
.week-days .wd { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.week-days li.today .wd { color: var(--accent-ink); }
@media (max-width: 400px) { .week-days .dot { width: 34px; height: 34px; } }

/* Ein Lernpfad nimmt am Laptop die volle Breite */
.path-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

/* Lehrkräfte */
.section-head .muted.small { white-space: nowrap; }
.btn.ghost-light { background: rgba(255,255,255,.95); color: #4b36c9; border-color: #fff; }
.card details > summary.label { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.card details > summary.label::before { content: "▸"; font-size: var(--fs-xs); transition: transform .15s; }
.card details[open] > summary.label::before { transform: rotate(90deg); }
@media (prefers-color-scheme: dark) { .node.info { color: var(--text); border-color: var(--muted); } }

.path-hero details.about:not([open]) { display: inline-block; }
/* ===== Nach Prüfung 3 ===== */
.ttype.training { background: #dff4f7; color: #0b6e7a; }
@media (prefers-color-scheme: dark) { .ttype.training { background: #123338; color: #7fd7e2; } }
.week-days li:not(.on):not(.today):not(.future) .dot { transform: scale(.45); }
.week-days li.future .dot { opacity: 1; background: transparent; border: 2px dashed var(--line); }
.week-days li.today:not(.on) .dot { border: 2px dashed var(--accent); background: var(--accent-soft); }
.week-days li.today.on .dot { border-color: transparent; box-shadow: 0 0 0 3px var(--accent-soft); }
.week-head { margin-bottom: 10px; }
@media (min-width: 861px) { .path-sticky { padding-inline: max(16px, calc((100vw - 980px) / 2 + 36px)); } }
.next-up .due { margin-top: 2px; }

/* ===== Iteration 4: Lernniveau und Freiheitsgrad ===== */
.openness { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.ttype .sub { font-weight: 700; }
.ttype.extra, .ttype.training { border: 1.5px dashed currentColor; padding: 1px 7px; }
.level-chip { display: inline-flex; align-items: center; font-size: var(--fs-sm); font-weight: 800; border-radius: var(--r-pill); background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); color: var(--on-c); white-space: nowrap; }
.steps { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.steps i { width: 4px; border-radius: var(--r-xs); background: rgba(255,255,255,.4); }
.steps i:nth-child(1) { height: 5px; } .steps i:nth-child(2) { height: 8px; } .steps i:nth-child(3) { height: 11px; } .steps i:nth-child(n+4) { height: 14px; }
.steps i.on { background: #fff; }
.legend { margin-top: 10px; display: grid; gap: 8px; font-size: var(--fs-sm); }
/* Kann-Aufgaben etwas leichter */
.step.kann .task { border-style: dashed; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Hinweistext unter einem Feld */
.field-hint { margin: 6px 2px 0; font-size: var(--fs-xs); color: var(--muted); }

/* ===== Iteration 5: klare Zeichen, antippbare Erklärungen, ruhigere Karten ===== */
/* Muss/Kann: eine Farbe je Art, Untertyp nur als Text */
.ttype.muss { background: var(--accent-soft); color: var(--accent-ink); border: 1.5px solid transparent; padding: 1px 7px; }
.ttype.kann { background: #fff3cf; color: #8a5a00; border: 1.5px dashed currentColor; padding: 1px 7px; }
.ttype.info { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) { .ttype.kann { background: #3a3018; color: #f3c46a; } }
/* Freiheitsgrad: eigenes Symbol je Stufe, Petrol statt Füllbalken */
.openness { color: #0b6e66; background: #e0f4f1; padding: 2px 8px 2px 6px; border-radius: var(--r-sm); font-size: var(--fs-xs); }
.openness .icon { width: 14px; height: 14px; stroke-width: 2.3; }
@media (prefers-color-scheme: dark) { .openness { color: #7fe0d2; background: #143a36; } }
.on-color .openness { background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); color: var(--on-c); }
/* Lernniveau: neutrales Zahlenabzeichen */
.level-chip { gap: 8px; padding: 3px 12px 3px 3px; }
.level-chip .lv { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--ci, var(--accent)); font-size: var(--fs-xs); font-weight: 800; }
.level-chip.soft, .explain .level-chip { background: var(--cs, var(--accent-soft)); color: var(--ci, var(--accent)); }
.level-chip.soft .lv, .explain .level-chip .lv { background: var(--ci, var(--accent)); color: var(--surface); }
/* Antippbar */
button.tap { all: unset; display: inline-flex; cursor: pointer; border-radius: var(--r-sm); -webkit-tap-highlight-color: transparent; }
button.tap:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.tap > * { transition: transform .12s ease, filter .12s ease; }
button.tap:hover > * { filter: brightness(.96); }
button.tap:active > * { transform: scale(.95); }
.on-color button.tap .level-chip { box-shadow: inset 0 0 0 1.5px var(--on-ring); }
/* Kopf des Lernpfads */
.hero-actions { position: relative; z-index: 1; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.hero-actions details.about { margin-top: 0 !important; }
.about-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); border-radius: var(--r-md); padding: 10px 14px; color: var(--on-c); }
.about-btn:hover { background: rgba(0,0,0,.2); }
.about-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* Erklärung als Blatt */
.explain { display: grid; gap: 14px; }
.explain-part { padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.explain-part.focus { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.explain-part h3 { font-size: var(--fs-md); margin: 0 0 8px; }
.explain-part p { margin: 6px 0; line-height: 1.5; }
.explain-part p .ttype, .explain-part p .level-chip { margin-right: 4px; vertical-align: 1px; }
.ladders-disc { margin-top: 14px; }
.three-ladders { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.three-ladders li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-base); line-height: 1.5; }
.three-ladders li.focus { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.three-ladders .tl-ic { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 800; }
.three-ladders li.focus .tl-ic { background: var(--accent); color: var(--accent-text); }
.explain-open { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.explain-open .openness { min-width: 110px; }
@media (max-width: 600px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet .dlg-body { max-height: 72vh; }
}
/* Aufgabenkarten: zugeklappt nur das Wichtigste */
.task-content .tmeta.more { margin: 0 0 12px; }
.step.done .task { opacity: 1; background: color-mix(in srgb, var(--ok-bright) 6%, var(--surface)); }
.step.done .task h3 { color: var(--text); }
.step.done .task:not([open]) > summary { padding-block: 12px; }
/* Startseite: Als Nächstes und Woche nebeneinander am großen Bildschirm */
.path-card .chips { margin-top: 2px; }
/* Lehrkräfte: Differenzierung auf einen Blick */
.levels-used { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 10px; border-radius: var(--r-pill); }
/* Ohne untere Leiste kein Platzhalter dafür */
body.no-nav main { padding-bottom: 48px; }
body.no-nav::after { display: none !important; }
.topbar .user-chip { margin-left: auto; }
.about-btn .qm { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; font-size: var(--fs-xs); font-weight: 800; line-height: 1; }
.hero-actions details.about { flex: 1 1 auto; }
.hero-actions details.about[open] { flex-basis: 100%; }

/* ===== Iteration 6: Feinschliff ===== */
/* Freiheitsgrad: Punkte von eng nach frei */
.openness .odots { display: inline-flex; }
.openness .odots i { border-radius: 50%; }
/* Zeilen in der Aufgabenkarte: Abzeichen, dann Zeit und Arbeitsform */
.task > summary .tmeta2 { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.task > summary .tmeta2 span { display: inline-flex; align-items: center; gap: 4px; }
.task:not([open]) .tmeta2 .when-open { display: none; }
.done-tag { display: none !important; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 800; color: var(--ok); background: color-mix(in srgb, var(--ok-bright) 16%, transparent); padding: 2px 9px 2px 7px; border-radius: var(--r-pill); }
.done-tag .icon { width: 13px; height: 13px; stroke-width: 3; }
@media (prefers-color-scheme: dark) { .done-tag { color: #6fdc9b; } }
.step.done .done-tag { display: inline-flex !important; }
.step.done .task:not([open]) .tmeta button.tap, .step.done .task:not([open]) .tmeta2 { opacity: .6; }
.step.done .task:not([open]) .tmeta2 { display: none; }
/* Lernniveau-Leiter in der Erklärung */
.level-ladder { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 6px; }
.level-ladder li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-md); font-weight: 600; color: var(--muted); }
.level-ladder .lv { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3, var(--line)); color: var(--text); font-size: var(--fs-sm); font-weight: 800; }
.level-ladder li.me { background: var(--surface); color: var(--text); font-weight: 800; box-shadow: var(--shadow); }
.level-ladder li.me .lv { background: var(--accent); color: var(--accent-text); }
.level-ladder em { margin-left: auto; font-style: normal; font-size: var(--fs-xs); font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 8px; border-radius: var(--r-pill); }
/* Hilfe-Knöpfe nebeneinander */
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
.hero-actions > * { min-width: 0; }
/* Aufgeklappt über die volle Breite, aber an seinem Platz: der Knopf springt nicht weg */
.hero-actions details.about[open] { grid-column: 1 / -1; }
.hero-actions:has(> details.about[open]) > .about-btn { grid-column: 1 / -1; }
.about-btn { justify-content: flex-start; }
.hero-actions:has(> :only-child) { grid-template-columns: auto; justify-content: start; }
/* Lernniveau-Ziffer im Dunkelmodus gut lesbar */
@media (prefers-color-scheme: dark) { .on-color .level-chip .lv { color: #2b1236; } }
/* Sprungziele nicht unter der mitlaufenden Leiste */
.stage, .step { scroll-margin-top: 96px; }
/* Woche: Wochenende abgesetzt */
.week-days li.weekend { border-left: 2px dashed var(--line); }
.week-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.week-stats span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; background: var(--surface-2); color: var(--text); padding: 6px 12px; border-radius: var(--r-md); }
.week-stats b { color: var(--accent-ink); }
/* Editor: Niveaus wie bei Schüler:innen, Pfeile nur bei Bedarf, Titel nicht abschneiden */
.lv-set { display: inline-flex; gap: 3px; align-items: center; }
.lv-set .lv { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 800; }
.lv-set.all { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 0 8px; }
.task-summary .title { white-space: normal; overflow: visible; text-overflow: clip; }
.task-summary .move { display: inline-flex; flex-direction: column; }
.task-summary .move .icon-btn { width: 26px; height: 20px; padding: 0; }
@media (hover: hover) {
  .task-summary .move { opacity: 0; transition: opacity .15s; }
  .task-row:hover .move, .task-summary:focus-within .move { opacity: 1; }
}
.done-tag { margin-left: 0; }
.step.done .task > summary .tmeta { width: auto; }
.hero-actions { align-items: stretch; }
.about-btn, .hero-actions details.about summary { white-space: nowrap; }
.about-btn { box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .about-btn, .hero-actions details.about summary { font-size: var(--fs-base); } }

/* ===== Nachbesserung nach Runde 6 ===== */
/* Erledigt: Haken links reicht, Abzeichen bleiben gut lesbar in einer Zeile */
.step.done .done-tag { display: none !important; }
.step.done .task:not([open]) .tmeta button.tap { opacity: .8; }
.step.done .task:not([open]) h3 { color: color-mix(in srgb, var(--text) 75%, var(--surface)); }
/* Freiheitsgrad-Punkte: leer mit Umriss, gut sichtbar */
.openness .odots { gap: 3px; margin-left: 3px; }
.openness .odots i { width: 6px; height: 6px; background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .7; }
.openness.o1 .odots i:nth-child(-n+1), .openness.o2 .odots i:nth-child(-n+2), .openness.o3 .odots i:nth-child(-n+3) { background: currentColor; opacity: 1; }
/* Kopf am Handy kompakter */
.about-btn, .hero-actions details.about summary { font-size: var(--fs-base); }
.about-btn, .hero-actions details.about { padding: 8px 12px; }
.hero-actions { margin-top: 12px; }
@media (max-width: 600px) { .path-hero h1 { font-size: var(--fs-2xl); } .path-hero .row-progress { margin-top: 10px; } }
/* Wochenkarte */
.week-stats span.kann b { color: #8a5a00; }
@media (prefers-color-scheme: dark) { .week-stats span.kann b { color: #f3c46a; } }
/* Editor: Niveau-Kennzeichen beschriftet */
.lv-set .lv-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-right: 2px; }
.open-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.open-choice .oc { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); }
.open-choice .oc:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.open-choice .oc.on { border-color: var(--accent); background: var(--accent-soft); }
.open-choice .oc:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.open-choice .oc .openness { justify-self: start; }
.open-choice .oc-hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }
.open-choice .oc[disabled] { cursor: default; opacity: .7; }

/* ===== Selbstständigkeit (Autonomie-Stufe) ===== */
.ac-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); }
.autonomy-sheet { display: grid; gap: 16px; }
.autonomy-sheet h3 { display: flex; align-items: center; gap: 6px; font-size: var(--fs-md); margin: 0 0 8px; }
.stage-list { list-style: none; margin: 0; padding: 0; }
.stage-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); color: var(--muted); font-weight: 600; }
.stage-list .lv { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); font-weight: 800; }
.stage-list li.past .lv { background: var(--accent-soft); color: var(--accent-ink); }
.stage-list li.me { background: var(--accent-soft); color: var(--text); font-weight: 800; }
.stage-list li.me .lv { background: var(--accent); color: var(--accent-text); }
.stage-list em { margin-left: auto; font-style: normal; font-size: var(--fs-xs); font-weight: 800; color: var(--accent-ink); background: var(--surface); padding: 1px 8px; border-radius: var(--r-pill); }
.repeat-note { background: var(--warn-soft); color: var(--text); border-radius: var(--r-md); padding: 12px 14px; }
.repeat-note p { margin: 4px 0 0; }
.rd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rd-list li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.rd-list li .icon { flex: none; margin-top: 3px; }
.rd-list.rights li .icon { color: var(--ok-bright); }
.rd-list.duties li .icon { color: var(--accent-ink); }
.rd-list.soft li { color: var(--muted); }
.next-stage { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }
.next-stage p { margin: 0 0 6px; }
.au-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.au-history li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.au-history .when { color: var(--muted); font-weight: 600; }
.au-history .why { display: block; color: var(--muted); }
.au-history li.demote strong { color: var(--warn); }
/* Lehrkräfte: Stufe in der Klassenliste */
.th-select { margin-top: 4px; font-size: var(--fs-xs); padding: 3px 26px 3px 8px; min-height: 0; height: auto; font-weight: 600; }

/* ===== Check-out mit Freigabe ===== */
.status-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 800; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); }
.status-tag[hidden] { display: none; }
.status-tag .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.status-tag.lock { background: var(--surface-2); color: var(--muted); }
.status-tag.wait { background: #e6f0ff; color: #2456a6; }
.status-tag.back { background: var(--warn-soft); color: var(--warn); }
.status-tag.ok { background: color-mix(in srgb, var(--ok-bright) 16%, transparent); color: var(--ok); }
@media (prefers-color-scheme: dark) { .status-tag.wait { background: #182a46; color: #9cc3ff; } .status-tag.ok { color: #6fdc9b; } }
.review-box { display: block; border-radius: var(--r-md); padding: 10px 14px; margin: 4px 0 12px; }
.review-box > * { display: block; }
.review-box[hidden] { display: none; }
.review-box p { margin: 4px 0; }
.review-box .by { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.review-box p.rb-next, .review-box p.rb-cal, .fb-note + .fb-next, .fb-next { display: flex; gap: 8px; align-items: flex-start; }
.review-box p.rb-next { margin: 8px 0 4px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--text); font-size: var(--fs-base); line-height: 1.4; }
.review-box p.rb-next .icon, .fb-next .icon { flex: none; margin-top: 2px; stroke: var(--accent); }
.review-box p.rb-cal { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.review-box p.rb-cal .icon { flex: none; margin-top: 2px; }
.fb-next { margin: 6px 0 0; font-size: var(--fs-base); line-height: 1.4; }
.review-box.back { background: var(--warn-soft); }
.review-box.ok { background: color-mix(in srgb, var(--ok-bright) 10%, var(--surface)); }
.stage-note { display: flex; gap: 8px; align-items: center; margin: -4px 0 12px 54px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.stage-note .icon { flex: none; }
.stage.checkout.is-locked .stage-note { color: var(--text); }
.step.locked .task { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.step.locked .task h3 { color: var(--muted); }
.step.locked .node { border-style: dashed; color: var(--muted); background: var(--surface-2); }
.step.submitted .node { background: #e6f0ff; border-color: #2456a6; color: #2456a6; }
@media (prefers-color-scheme: dark) { .step.submitted .node { background: #182a46; border-color: #9cc3ff; color: #9cc3ff; } }
.step.returned .node { border-color: var(--warn); color: var(--warn); }
.btn.submit { background: #2456a6; color: #fff; }
.btn.submit:hover { background: #1d4789; }
.mark-done .btn:disabled { opacity: 1; cursor: default; }
.step.nope .task { animation: nope .35s ease; }
@keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .step.nope .task { animation: none; } }
/* Lehrkräfte: Zur Freigabe */
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 800; margin-left: 8px; }
.checkout-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); padding: 4px 10px; border-radius: var(--r-pill); border: 1.5px solid var(--line); cursor: pointer; white-space: nowrap; }
.checkout-toggle input { margin: 0; accent-color: var(--accent); }
.checkout-toggle.on { color: #2456a6; border-color: #2456a6; background: #e6f0ff; }
@media (prefers-color-scheme: dark) { .checkout-toggle.on { color: #9cc3ff; border-color: #9cc3ff; background: #182a46; } }

/* ---------- Lernjahr, Elternansicht, Lerncoach ---------- */
.chip.info { background: #e6f0ff; color: #2456a6; }
.chip.late { background: var(--danger-soft); color: var(--danger); }
.chip.soft { background: var(--surface-2); color: var(--muted); }
.chip.due-chip.late { background: var(--danger-soft); color: var(--danger); }
.chip.due-chip.soon { background: var(--warn-soft); color: var(--warn); }
.chip.on { background: rgba(255,255,255,.2); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.info { background: #182a46; color: #9cc3ff; } }
.count-pill.soft { background: var(--surface-3); color: var(--text); }
.center { text-align: center; }
.small { font-size: var(--fs-sm); }

/* Die drei Etappen eines Lernpfads */
.etappen { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.etappen li { display: grid; gap: 5px; min-width: 0; }
.etappen .et-bar { display: block; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.etappen .et-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c, var(--accent)); }
.etappen li.full .et-bar i { background: var(--ok-bright); }
.etappen li.locked .et-bar { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 5px, var(--surface-3) 5px 10px); }
.etappen .et-label { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etappen .et-label em { font-style: normal; font-weight: 600; margin-left: auto; padding-left: 4px; }
.etappen li.full .et-label { color: var(--ok); }
.etappen .et-label .icon { flex: none; }

/* Lernniveau als Stufen */
.niveau-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.niveau-steps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.niveau-steps li b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: var(--fs-xs); }
.niveau-steps li.below b { background: var(--cs, var(--accent-soft)); color: var(--ci, var(--accent)); }
.niveau-steps li.me { background: var(--c, var(--accent)); color: var(--on-c); }
.niveau-steps li.me b { background: var(--on-c); color: var(--c, var(--accent)); }
.niveau-steps li em { font-style: normal; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.niveau-steps li:not(.me) span { display: none; }

/* Fach im Lernjahr */
.subject-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px 18px 8px; margin-bottom: 16px; box-shadow: var(--shadow); border-top: 5px solid var(--c); }
.subject-block > header { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.subject-block h2 { margin: 0; font-size: var(--fs-xl); color: var(--ci); }
.sb-level { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.stations { display: grid; position: relative; }
.station { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.station:first-child { border-top: 0; }
a.station:hover .st-title { color: var(--ci); }
.st-node { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.st-node.done { background: var(--ok-bright); color: var(--ok-on); }
.st-node.planned { border: 2px dashed var(--line); color: var(--muted); background: var(--surface); }
.st-node.active .ring-num { font-size: var(--fs-xs); }
.st-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.st-title { font-size: var(--fs-md); line-height: 1.3; }
.st-sub { margin: 3px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.station .chips { margin-top: 8px; }
.st-go { align-self: center; color: var(--muted); }
.station.planned .st-title { color: var(--muted); font-weight: 700; }
.station.done .st-title { color: var(--muted); }
.station.overdue .st-node.active .ring-bar { stroke: var(--danger); }
.station:not(a) { grid-template-columns: 44px minmax(0, 1fr); }

.year-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 24px; border-radius: var(--r-xl); color: var(--on-c); margin-bottom: 10px;
  background: radial-gradient(120% 140% at 100% 0%, var(--c2) 0%, var(--c) 60%); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 30%, transparent); }
.year-hero h1 { color: var(--on-c); margin: 4px 0 6px; font-size: var(--fs-3xl); }
.year-hero p { margin: 0 0 12px; font-size: var(--fs-md); }
.year-hero .eyebrow { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.year-hero .ring-num { color: var(--on-c); }
@media (max-width: 600px) {
  .year-hero { padding: 20px; grid-template-columns: minmax(0, 1fr); } .year-hero .ring { display: none; } .year-hero h1 { font-size: var(--fs-2xl); }
  .subject-block { padding: 14px 14px 4px; border-radius: var(--r-lg); }
  .station { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; } .station:not(a) { grid-template-columns: 40px minmax(0, 1fr); }
  .st-node { width: 40px; height: 40px; }
}

/* Kennzahlen */

.autonomy-panel .ap-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.autonomy-panel.repeat .ac-icon { background: var(--warn-soft); color: var(--warn); }
.ap-why { background: var(--warn-soft); border-radius: var(--r-md); padding: 10px 12px; margin: 12px 0 0; font-size: var(--fs-base); }
.ap-more { margin-top: 12px; }
.ap-more summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); }
.ap-more h4 { margin: 14px 0 6px; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.ap-cols .rd-list li .icon { color: var(--accent-ink); }
@media (max-width: 520px) { .ap-cols { grid-template-columns: 1fr; } }

.coach-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.coach-card > .icon { width: 44px; height: 44px; padding: 11px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); box-sizing: border-box; }
.card.hint { display: flex; gap: 12px; align-items: flex-start; }
.card.hint.warn { background: var(--warn-soft); border-color: transparent; }
.card.hint.warn > .icon { color: var(--warn); flex: none; margin-top: 2px; }

.recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.recent li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.recent .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.recent .r-what { display: grid; min-width: 0; }
.recent .r-what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .r-when { white-space: nowrap; }
.recent h3 { margin-top: 0; }

/* Eltern */
.parent-head { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; }
.kid-switch { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: var(--r-pill); }
.kid-switch button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; border-radius: var(--r-pill); font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.avatar.sm { width: 28px; height: 28px; font-size: var(--fs-xs); }
.avatar.lg { width: 64px; height: 64px; font-size: var(--fs-xl2); flex: none; }

/* Lerncoach */
.coachee { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.coachee:hover { border-color: var(--accent); }
.coachee .who { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; }
@media (max-width: 760px) { .coachee { grid-template-columns: 42px minmax(0, 1fr) auto; } }
.student-head { display: flex; gap: 16px; align-items: center; margin: 4px 0 6px; }
button.back { border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }

.tl { margin-top: 10px; }
.tl summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); color: var(--accent-ink); }
.tl ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.tl-sec { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 2px; }
.tl-task { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 5px 8px; border-radius: var(--r-sm); font-size: var(--fs-base); }
.tl-task:nth-child(even) { background: var(--surface-2); }
.tl-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); }
.tl-task.ok .tl-ic { background: var(--ok-bright); border-color: var(--ok-bright); color: var(--ok-on); }
.tl-task.info .tl-ic { border-color: #2456a6; color: #2456a6; }
.tl-task.warn .tl-ic { border-color: var(--warn); color: var(--warn); }
.tl-title .muss { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-left: 6px; }
.tl-note { display: block; color: var(--warn); font-size: var(--fs-sm); }
.tl-st { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.tl-task.ok .tl-st { color: var(--ok); }

/* Lernjahr-Editor */
.year-items { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.yi-subject { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 0 0; }
.yi { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 130px auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); }
.yi-n { font-weight: 800; color: var(--muted); text-align: center; }
.yi-title { font-weight: 700; text-decoration: none; color: inherit; }
.yi-period { padding: 6px 8px !important; }
.yi-acts { display: flex; gap: 2px; }
@media (max-width: 640px) { .yi { grid-template-columns: 26px minmax(0, 1fr) auto; } .yi-period { grid-column: 2; } .yi-acts { grid-column: 3; } }
@media (max-width: 600px) {
  .etappen .et-label { font-size: var(--fs-xs); }
  .etappen .et-label em { display: none; }
}
@media (max-width: 600px) {
  .niveau-steps li em { display: none; }
  .niveau-steps li { padding: 3px 9px 3px 3px; }
  .etappen { gap: 4px; }
  .etappen .et-label { gap: 2px; }
}

/* ---------- Abgaben und Freigabe ---------- */
.mt4 { margin-top: 4px; }

.submission { display: grid; gap: 10px; }
.submission .sub-text { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin: 0; white-space: pre-wrap; }
.submission .sub-text .prose > :first-child { margin-top: 0; } .submission .sub-text .prose > :last-child { margin-bottom: 0; }
.sub-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.sub-imgs img { width: 100%; max-height: 360px; object-fit: contain; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); display: block; }
.submission.compact .sub-imgs { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.submission.compact .sub-imgs img { height: 90px; object-fit: cover; }
.submission.compact .sub-text { font-size: var(--fs-base); max-height: 6.5em; overflow: hidden; }
.my-sub { display: grid; gap: 8px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin: 4px 0 12px; }
.my-sub[hidden] { display: none; }
.my-sub > strong { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.my-sub .chip.sub-conf { justify-self: start; }
.my-sub .by { margin-left: auto; font-weight: 600; color: var(--muted); font-size: var(--fs-xs); }

.submit-sheet { display: grid; gap: 10px; }
.submit-sheet p { margin: 0; }
.submit-sheet textarea { width: 100%; }
/* Sicherheitsfrage beim Abgeben: drei große Flächen in einer Zeile */
.sub-sure { display: grid; gap: 8px; }
.sub-sure.missing { border-radius: var(--r-md); outline: 2px solid var(--danger); outline-offset: 6px; }
.sub-sure .picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sub-sure .pk { flex-direction: column; justify-content: flex-start; padding-top: 14px; gap: 6px; min-height: 72px; padding-inline: 6px; text-align: center; line-height: 1.2; font-size: var(--fs-sm); }
.chip.sub-conf { display: inline-flex; align-items: center; gap: 6px; }
.pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-files { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: var(--fs-sm); max-width: 100%; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.sub-link summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); font-size: var(--fs-sm); }
.sub-link input { margin-top: 6px; width: 100%; }

.review-top { display: flex; align-items: center; }
.review-top .back { margin: 0; }
.review-top .btn { margin-left: auto; }
.review-head { display: flex; gap: 16px; align-items: center; }
.review-head h1 { font-size: var(--fs-2xl); }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.review-grid > .card { margin: 0; }
.review-task { border-top: 5px solid var(--c); }
.rt-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.review-task .chips { margin-bottom: 8px; }
.attempt { display: grid; gap: 10px; }
.attempt-head { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 10px; }
.attempt .review-box { margin: 0; }
.older { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.older summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); }
.older .attempt { margin-top: 12px; }
.decide-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-lg); display: grid; gap: 8px; }
.decide-bar label { font-weight: 800; font-size: var(--fs-sm); }
.decide-bar textarea { width: 100%; min-height: 64px; }
.decide-bar textarea.need { border-color: var(--danger); }
.decide-bar .btn-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.decide-bar .error { margin: 0; }
@media (max-width: 860px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .decide-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } .review-head h1 { font-size: var(--fs-xl2); } }

.card.hint.info { background: #e6f0ff; border-color: transparent; }
.card.hint.info > .icon { color: #2456a6; flex: none; margin-top: 2px; }
@media (prefers-color-scheme: dark) { .card.hint.info { background: #182a46; } .card.hint.info > .icon { color: #9cc3ff; } }
.pending-list { margin: 6px 0 0; padding-left: 18px; }
.pending-list a { font-weight: 700; }
.sb-level-select { width: auto; max-width: 100%; min-width: 0; font-size: var(--fs-sm); padding: 4px 8px !important; }
.tl-go { margin-left: 8px; }
.tl-st { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.qr-img { width: 220px; height: 220px; image-rendering: pixelated; }
.code-big { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: .12em; margin: 8px 0 4px; }

/* ---------- Neue Rückmeldungen für Schüler:innen ---------- */
@keyframes ring-bell { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-4deg); } }
.fb-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.fb-item { display: grid; align-content: start; gap: 8px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--ok-soft); height: 100%; }
.fb-link { display: flex; align-items: flex-start; gap: 12px; text-decoration: none; color: inherit; }
.fb-plan { margin-left: 46px; }
.plan-step { display: inline-flex; }
.plan-step-done { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--ok); text-decoration: none; min-height: 36px; }
.plan-step-done:hover { text-decoration: underline; }
.rb-step { display: block; }
.rb-step .plan-step { margin: 2px 0 4px; }
.fb-item.returned { background: var(--warn-soft); }
.fb-item:hover { filter: brightness(.98); }
.fb-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
.fb-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: #fff; flex: none; }
.fb-item.returned .fb-ic { background: var(--warn); }
.fb-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fb-note { margin: 6px 0 0; font-size: var(--fs-base); }
.fb-go { align-self: center; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: var(--fs-sm); color: var(--ok); white-space: nowrap; }
.fb-item.returned .fb-go { color: var(--warn); }
.new-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 800;
}
.bottom-nav .ic { position: relative; }
.nav-count {
  position: absolute; top: -6px; right: -10px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--danger); color: var(--danger-text); font-size: var(--fs-xs); font-weight: 800; line-height: 19px; text-align: center;
  border: 2px solid var(--surface);
}
/* Zähler für Arbeit (Lehrkräfte): Akzent statt Alarmrot; in der Seitenleiste rechts im Eintrag */
.nav-count.work { background: var(--accent); color: var(--accent-text); }
.nav-link .nav-count.side { position: static; margin-left: auto; min-width: 24px; height: 24px; line-height: 20px; border: 0; padding: 2px 7px; box-sizing: border-box; font-size: var(--fs-xs); }
@media (min-width: 861px) { body.is-student .bottom-nav .nav-count { position: static; margin-left: 2px; border: 0; } body.is-student .bottom-nav .ic { display: inline-flex; align-items: center; gap: 6px; } }
.step.flash { animation: flash-step 2.2s ease-out 1; border-radius: var(--r-lg); }
@keyframes flash-step { 0%, 40% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Breite Bildschirme ---------- */
@media (min-width: 1280px) {
  .path-layout { display: grid; grid-template-columns: minmax(340px, 30%) minmax(0, 1fr); align-items: start; }
  .path-layout > .path-sticky { display: none; }
  .path-side { position: sticky; top: 100px; }
  .path-side .path-hero { margin-bottom: 16px; }
  .path-side .hero-actions { grid-template-columns: 1fr; }
  .path-layout > .coming { grid-column: 2; }
}
@media (max-width: 600px) {
  .fb-link { flex-wrap: wrap; }
  .fb-body { flex: 1 1 0; }
  .fb-go { flex-basis: 100%; margin-left: 46px; }
}

/* =====================================================================
   Modernisierung (Nov 2026): freundlicherer Dunkelmodus, Glas-Kopfzeile,
   Fächer mit Farbe und Grafik, Dashboards für Schüler:innen und Lehrkräfte
   ===================================================================== */

/* Weitere Fachfarben: Bernstein, Erdbraun, Cyan, Schiefer-Indigo */
.theme-6 { --c: #f5b52e; --c2: #ffcf4d; --c-deco0: #c27803; --c-deco: #f0a91c; --cs: #fff3d6; --ci: #8f5600; --cw: #8f5600;  --on-c: #2b1a00; --on-c-rgb: 43,26,0; --on-chip: rgba(43,26,0,.14); --on-ring: rgba(43,26,0,.4); }
.theme-7 { --c: #ad622b; --c2: #b85c00; --c-deco0: #9a5b34; --c-deco: #c9814f; --cs: #f8ebe1; --ci: #7a4524; --cw: #7a4524;  }
.theme-8 { --c: #097ea5; --c2: #057cb7; --c-deco0: #0e7fa8; --c-deco: #22b0d8; --cs: #ddf3fb; --ci: #0a6384; --cw: #0a6384;  }
.theme-9 { --c: #4655c9; --c2: #5b6cd6; --c-deco0: #4655c9; --c-deco: #6f86f2; --cs: #e5e9fd; --ci: #3442a8; --cw: #3442a8;  }

/* Hintergrund mit sanften Farbflächen statt flachem Grau */
body {
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(123, 92, 240, .10), transparent 70%),
    radial-gradient(800px 480px at 100% 0%, rgba(236, 90, 150, .08), transparent 70%),
    radial-gradient(900px 600px at 50% 110%, rgba(34, 176, 216, .07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.topbar {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
}
.sidebar { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.card, .path-card, .kpi, .dash-tile, .week, .coachee, .help-list { border-color: color-mix(in srgb, var(--line) 80%, transparent); }
.card { border-radius: var(--r-xl); }

/* Dunkelmodus: blauviolettes Dämmerlicht statt Schwarz, hellere Flächen, kräftigere Akzente */
@media (prefers-color-scheme: dark) {
  :root {
    --surface-3: #3b416a;
    --text: #f4f3fc;
    --muted: #cfcde8;
    --field-line: #8f95c9;
    --accent: #b3a6ff;
    --accent-ink: #c6bbff;
    --accent-2: #cbc0ff;
    --accent-soft: #2f3262;
    --accent-text: #17143a;
    --ok-soft: #1f4136;
    --warn-soft: #4a3d22;
    --danger-soft: #4c2732;
    --violet-soft: #383569;
    --shadow: 0 1px 2px rgba(5, 6, 25, .25), 0 6px 20px rgba(5, 6, 25, .22);
    --shadow-lg: 0 14px 34px rgba(5, 6, 25, .4);
  }
  body {
    background:
      radial-gradient(900px 560px at 6% -10%, rgba(140, 110, 255, .28), transparent 70%),
      radial-gradient(800px 520px at 100% 0%, rgba(236, 90, 150, .18), transparent 70%),
      radial-gradient(1000px 640px at 50% 115%, rgba(34, 176, 216, .16), transparent 70%),
      var(--bg);
    background-attachment: fixed;
  }
  .theme-0 { --cs: #383469; }
  .theme-1 { --cs: #4a2c2a; }
  .theme-2 { --cs: #1d4545; }
  .theme-3 { --cs: #243a62; }
  .theme-4 { --cs: #4a2740; }
  .theme-5 { --cs: #224530; }
  .theme-6 { --cs: #4a3a1c; --ci: #ffd27a; }
  .theme-7 { --cs: #48342a; --ci: #f0bf9a; }
  .theme-8 { --cs: #1b4256; --ci: #8fdcf5; }
  .theme-9 { --cs: #2e3772; --ci: #b4c0ff; }
  .card, .path-card, .kpi, .dash-tile, .week { background: color-mix(in srgb, var(--surface) 92%, transparent); }
}

/* ---------- Grafiken ---------- */
.art { display: block; pointer-events: none; }
.path-card .art { position: absolute; right: -12px; bottom: -18px; width: 132px; height: auto; color: var(--c); opacity: .16; transition: transform .25s; }
.path-card:hover .art { transform: rotate(-4deg) scale(1.05); }
.path-card > :not(.art) { position: relative; }
.next-up { position: relative; overflow: hidden; }
.next-up .art.big, .path-hero .art.big { position: absolute; right: 110px; bottom: -26px; width: 230px; color: var(--on-c); opacity: .2; }
.next-up > :not(.art), .path-hero > :not(.art) { position: relative; z-index: 1; }
.path-hero .art.big { right: -20px; top: -10px; bottom: auto; width: 220px; opacity: .22; }
@media (max-width: 600px) { .next-up .art.big { right: -40px; width: 180px; } }

/* ---------- Lehrkräfte: Lernpfad-Kacheln mit Titelbild ---------- */
.path-tile.has-cover { padding-top: 0; }
.path-tile.has-cover::before { display: none; }
.tile-cover {
  position: relative; height: 92px; margin: 0 -22px 14px; border-radius: 22px 22px 0 0; overflow: hidden;
  background: linear-gradient(120deg, var(--c-deco0), var(--c-deco)); color: #fff;
}
.tile-cover .art { position: absolute; right: 8px; top: -6px; width: 128px; opacity: .45; }
.cover-subject { position: absolute; left: 18px; bottom: 12px; font-weight: 800; font-size: var(--fs-sm); letter-spacing: .02em; color: #fff; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: var(--r-pill); }

/* ---------- Fach wählen ---------- */
.subj-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.subj-choice {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 64px;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--cs); color: var(--ci); font-weight: 800; font-size: var(--fs-sm); border: 2px solid transparent;
  transition: transform .12s, background .15s;
}
.subj-choice .art { position: absolute; right: -8px; top: -6px; width: 70px; color: var(--c); opacity: .35; }
.subj-choice span { position: relative; }
.subj-choice:hover { transform: translateY(-1px); }
.subj-choice.on { background: linear-gradient(120deg, var(--c), var(--c2)); color: var(--on-c); border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.subj-choice.on .art { color: var(--on-c); opacity: .4; }
.subj-choice.on::after { content: "✓"; position: absolute; font-size: var(--fs-sm); }
.subj-choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.subj-choice[disabled] { cursor: default; opacity: .6; }
.subj-custom { grid-column: span 2; min-height: 64px; }

/* ---------- Schüler:innen-Dashboard ---------- */
.today-label { display: inline-block; font-size: var(--fs-sm); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }
.staff-hero .today-label { color: #fff; }
.kpi {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
.kpi-ic { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); }
.kpi b { font-size: var(--fs-2xl); line-height: 1.1; letter-spacing: -.02em; }
.kpi > span:last-child { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; line-height: 1.3; } .kpi.late b { color: var(--danger); }
.dash-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 18px 20px; height: 100%; }
.dash-tile h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); margin-bottom: 10px; }
.due-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.due-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.due-list a:hover { background: var(--surface-2); }
.dl-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--c-deco0), var(--c-deco)); }
.dl-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-when { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); white-space: nowrap; }
.dl-when.late { color: var(--danger); } .dl-when.soon { color: var(--warn); }

/* Fächer als farbige Kacheln (zugleich Filter) */
.subj-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; }
.subj-tile {
  all: unset; box-sizing: border-box; cursor: pointer; scroll-snap-align: start; position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: end; gap: 2px 8px; border-radius: var(--r-xl); color: var(--on-c);
  background: linear-gradient(140deg, var(--c), var(--c2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--c) 30%, transparent);
  transition: transform .15s, box-shadow .15s, outline-color .15s; outline: 3px solid transparent; outline-offset: 3px;
}
.subj-tile .art { position: absolute; right: -14px; top: -12px; color: var(--on-c); opacity: .28; }
.subj-tile .st-name { grid-column: 1; align-self: end; font-weight: 800; line-height: 1.2; position: relative; }
.subj-tile .st-meta { grid-column: 1; font-size: var(--fs-sm); font-weight: 700; position: relative; }
.subj-tile .ring { grid-column: 2; grid-row: 1 / span 2; align-self: end; position: relative; }
.subj-tile .ring .ring-track { stroke: rgba(var(--on-c-rgb), .3); } .subj-tile .ring .ring-bar { stroke: var(--on-c); } .subj-tile .ring .ring-num { color: var(--on-c); font-size: var(--fs-xs); }
.subj-tile:hover { transform: translateY(-2px); }
.subj-tile.on { outline-color: var(--c); }
.subj-tile:focus-visible, .subj-tile.on:focus-visible, .subj-tile.all:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.subj-tile.all { background: var(--surface); color: var(--text); border: 1px dashed var(--line); box-shadow: none; grid-template-columns: 1fr; }
.subj-tile.all.on { outline-color: var(--accent); border-style: solid; }

/* ---------- Lehrkräfte-Dashboard ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.dash-panel .show-all { margin-top: 8px; }
.empty-state { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.empty-state .icon { color: var(--ok); width: 26px; height: 26px; }
.empty-state p { margin: 0; font-weight: 600; }
.help-list { padding: 6px; display: grid; }
.help-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.help-item:hover { background: var(--surface-2); }
.help-item .who { grid-area: who; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); background: var(--danger-soft); color: var(--danger); }
.help-item .hi-main { grid-area: main; display: flex; gap: 8px; align-items: baseline; }
.help-item .hi-why { grid-area: why; display: flex; flex-wrap: wrap; gap: 4px; }
.help-item > .icon { grid-area: go; }
.staff-hero { background: linear-gradient(120deg, #4b36c9, #6a4fdc 50%, #b03070); box-shadow: 0 16px 40px rgba(90, 68, 220, .25); }

/* ---------- Iteration 2 ---------- */
/* Glas-Effekt nur am PC: am Handy würde backdrop-filter die feste untere Leiste in die Kopfzeile ziehen */
@media (max-width: 860px) {
  .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}
@media (min-width: 861px) {
  body.is-student .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--surface) 94%, transparent); }
}
/* Demo-Hinweis als Abzeichen neben dem Logo (auch am PC) statt als Band über die ganze Breite */
.demo-banner { display: none !important; }
body.is-demo .brand::after { content: "Demo · Testdaten"; font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); }

/* Kennzahlen: kräftige Symbolflächen, Sparkline */
.kpi .kpi-ic { color: #fff; background: linear-gradient(135deg, #8a8aa8, #a7a7c2); }
.kpi.accent .kpi-ic { background: linear-gradient(135deg, #5a44dc, #744dce); color: #fff; }
.kpi.ok .kpi-ic { background: linear-gradient(135deg, #129055, #2fc274); color: #fff; }
.kpi.late .kpi-ic { background: linear-gradient(135deg, #d13b3b, #f2706a); color: #fff; }
.kpi.info .kpi-ic { background: linear-gradient(135deg, #2563c9, #4f9bf5); color: #fff; }
.kpi.sun .kpi-ic { background: linear-gradient(135deg, #d98a00, #f6b93b); color: #fff; }
.kpi.violet .kpi-ic { background: linear-gradient(135deg, #b0368b, #e2649f); color: #fff; }
@media (prefers-color-scheme: dark) { .kpi.info .kpi-ic { background: linear-gradient(135deg, #2563c9, #4f9bf5); color: #fff; } }
.kpi { position: relative; overflow: hidden; }
.spark { position: absolute; right: 14px; top: 14px; bottom: 14px; width: 64px; display: flex; align-items: flex-end; gap: 3px; opacity: .9; }
.spark i { flex: 1; height: var(--h); border-radius: var(--r-xs); background: color-mix(in srgb, var(--ok-bright) 70%, transparent); }

/* Handy: Kennzahlen kompakt */
@media (max-width: 600px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: 4px; padding: 12px 14px; }
  .kpi .kpi-ic { width: 34px; height: 34px; border-radius: var(--r-md); }
  .kpi .kpi-ic .icon { width: 17px; height: 17px; }
  .kpi b { font-size: var(--fs-2xl); }
  .kpi > span:last-child, .kpi > span:nth-of-type(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .spark { width: 48px; top: 12px; bottom: auto; height: 34px; }
}

/* Wochenspur im Dashboard als Säulen */

/* Selbstständigkeit im Dashboard mit Stufen-Grafik */

/* Fächer-Kacheln kompakter, Auswahl durch Anheben und Haken */
.subj-strip { padding: 6px 4px 14px; scroll-padding: 4px; }
.subj-tile { min-height: 84px; padding: 12px 14px; }
.subj-tile .st-name { font-size: var(--fs-md); }
.subj-tile .art { width: 92px; }
.subj-strip:has(.subj-tile.on:not(.all)) .subj-tile:not(.on):not(.all) { opacity: 1; filter: saturate(.75); }
.subj-tile.on { outline: 0; transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 28px color-mix(in srgb, var(--c) 45%, transparent); }
.subj-tile.on:not(.all)::after { content: "✓"; position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--cw, var(--c)); display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 900; }
.subj-tile.on:not(.all) .st-name { margin-top: 22px; }
.subj-tile.all { outline: 0; }
.subj-tile.all.on { border: 2px solid var(--accent); }

/* Etappen-Karte in der linken Spalte */
.stage-map { display: none; }
@media (min-width: 1280px) {
  .stage-map { display: grid; gap: 4px; list-style: none; margin: 0; padding: 14px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
  .stage-map::before { content: ""; position: absolute; left: 33px; top: 30px; bottom: 30px; width: 3px; border-radius: var(--r-xs); background: repeating-linear-gradient(180deg, var(--cs) 0 8px, transparent 8px 13px); }
  .sm-row { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 8px 6px; border-radius: var(--r-md); }
  .sm-row:hover { background: var(--surface-2); }
  .sm-row:focus-visible { outline: 3px solid var(--accent); }
  .stage-map .sm-num { grid-row: span 2; position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--cs); color: var(--ci); }
  .stage-map .sm-num .icon { display: none; }
  .stage-map li.complete .sm-num { background: linear-gradient(135deg, var(--c), var(--c2)); color: var(--on-c); }
  .stage-map li.complete .sm-num .n { display: none; } .stage-map li.complete .sm-num .icon { display: block; }
  .sm-t { font-weight: 800; }
  .sm-c { font-size: var(--fs-sm); font-weight: 800; color: var(--muted); }
  .sm-bar { grid-column: 2 / -1; height: 6px; border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
  .sm-bar i { display: block; height: 100%; width: 0; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--c-deco0), var(--c-deco)); transition: width .5s; }
  .sm-goal { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 6px; color: var(--muted); font-weight: 700; font-size: var(--fs-sm); }
  .sm-goal .sm-num { grid-row: auto; background: var(--surface-2); color: var(--muted); border: 2px dashed var(--line); }
  .sm-goal.reached { color: var(--ok); } .sm-goal.reached .sm-num { background: linear-gradient(135deg, #f6b93b, #f59e0b); color: #fff; border: 0; box-shadow: 0 6px 16px rgba(245, 158, 11, .4); }
}

/* Lehrkräfte: Aktivitäts-Diagramm */
.chart-card { padding: 18px 20px 14px; }
.chart-sum { display: flex; gap: 28px; }
.chart-sum > div { display: grid; }
.chart-sum b { font-size: var(--fs-2xl); letter-spacing: -.02em; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; }
.bars li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bars .bar { position: relative; width: 100%; max-width: 30px; height: max(4px, calc(var(--h) * .82)); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #8b5cf6, #5a44dc); }
.bars li.we .bar { background: linear-gradient(180deg, color-mix(in srgb, #8b5cf6 45%, var(--surface-2)), color-mix(in srgb, #5a44dc 45%, var(--surface-2))); }
.bars li.today .bar { background: linear-gradient(180deg, #f6b93b, #f59e0b); }
.bars .bar em { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.bars .lbl { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.bars li.today .lbl { color: var(--text); }

/* Coachees als kompakte Kacheln */
@media (min-width: 1000px) {
  .coachee { grid-template-columns: 42px minmax(0, 1fr) auto auto; grid-template-rows: auto auto; }
}

/* Lernpfad-Liste der Lehrkraft: Filter nach Fach, gleich hohe Karten */
.subj-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sf-chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: var(--fs-sm); box-shadow: var(--shadow); }
.sf-chip b { font-size: var(--fs-xs); padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.sf-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--c-deco0), var(--c-deco)); }
.sf-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sf-chip.on b { background: rgba(0,0,0,.2); color: inherit; }
.sf-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.path-grid-t { align-items: stretch; }
.path-grid-t .path-tile, .grid .path-tile.has-cover { display: flex; flex-direction: column; margin: 0; }
.path-tile .tile-foot { margin-top: auto; }
.path-tile[hidden] { display: none !important; }

/* Dunkelmodus: mehr Abstand zwischen Hintergrund und Karten */
@media (prefers-color-scheme: dark) {
  :root { --surface: #2a2f55; --surface-2: #343a64; --line: #454c7e; }
  .card, .path-card, .kpi, .dash-tile, .week, .coachee, .stage-map, .help-list {
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 100%, #fff 4%), var(--surface)); border-color: rgba(255,255,255,.09);
  }
  .chip.warn { color: #ffd88a; }
  .chip.ok { color: #8ef0b5; }
  .path-card .art { opacity: .32; }
  .tile-cover .art { opacity: .5; }
  .sf-chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
}

/* Coachee-Kacheln: feste Raster-Plätze */
.coachee { grid-template-columns: 42px minmax(0, 1fr) 40px 16px !important; grid-template-rows: auto auto; row-gap: 6px; }
.coachee .who { grid-column: 1; grid-row: 1 / span 2; }
.coachee > .icon { grid-column: 4; grid-row: 1 / span 2; }
@media (max-width: 600px) {
  .kpi { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
  .kpi .kpi-ic { grid-row: 1 / span 2; }
}
@media (max-width: 600px) { .kpi > span:nth-of-type(2) { font-size: var(--fs-xs); } .spark { display: none; } }

/* ---------- Iteration 3 ---------- */
/* Freigabe gruppiert nach Aufgabe */
.review-groups { display: grid; gap: 12px; }
.rg { position: relative; overflow: hidden; padding: 16px 18px; margin: 0; }
.rg::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--c-deco0), var(--c-deco)); }
.rg .art { position: absolute; right: -10px; bottom: -16px; width: 110px; color: var(--c); opacity: .14; }
.rg-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rg-head > div { display: grid; }
.rg-head strong { font-size: var(--fs-md); }
.rg-people { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rg-person { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--surface-2); color: inherit; text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.rg-person:hover { background: var(--cs); color: var(--ci); }
.rg-person .who { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; background: var(--surface); color: var(--muted); }
.rg-person .who.mine { background: linear-gradient(135deg, #ffd166, #ff8a5b); color: #3b1a00; }
.rp-tag { display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.rp-tag.warn { color: var(--warn); }
/* Unterstützung: Dringlichkeitsbalken */
.help-item { grid-template-columns: auto minmax(0, 1fr) 70px auto; }
.hi-sev { grid-area: sev; height: 8px; border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.hi-sev i { display: block; height: 100%; width: calc(var(--sev) * 100%); min-width: 12%; border-radius: var(--r-sm); background: linear-gradient(90deg, #f6b93b, #ef4444); }
.help-item .hi-main { flex-wrap: nowrap; } .help-item .hi-main strong { white-space: nowrap; }
/* Aktivität als volle Zeile */
.dash-panel > .chart-card { margin-bottom: 8px; }
/* Fortschritt je Fach in einer Reihe */
/* Coachee-Kacheln: gleich hoch, Dringlichkeit am Rand */
.coachee { min-height: 82px; position: relative; overflow: hidden; }
/* Lernpfad-Kacheln der Lehrkraft: Fußzeile */
.path-tile .tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.assign-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.assign-pill.on { background: var(--cs); color: var(--ci); }
/* Schüler-Dashboard: Säulen höher, Stufen beschriftet */
/* Handy: Hero kompakter */
@media (max-width: 600px) {
  .staff-hero { padding: 20px; gap: 12px; }
  .staff-hero h1 { font-size: var(--fs-2xl); }
  .staff-hero .btn-row { flex-wrap: nowrap; gap: 8px; width: 100%; }
  .staff-hero .btn-row .btn { flex: 1; justify-content: center; padding: 10px 12px; font-size: var(--fs-sm); }
  .bars { gap: 3px; height: 150px; } .bars .bar em { display: none; } .bars .lbl { font-size: var(--fs-2xs); }
  .chart-sum { gap: 16px; flex-wrap: wrap; } .chart-sum b { font-size: var(--fs-xl); }
  .help-item { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "who main go" "who why go" "who sev go"; }
  .hi-sev { width: 70px; }
}
/* Dunkelmodus: Akzente kräftiger */
@media (prefers-color-scheme: dark) {
  .ring-track { stroke: rgba(255,255,255,.13); }
  .chip.late { color: #ffd0d6; background: rgba(244, 63, 94, .2); }
  .path-card .art, .rg .art { opacity: .4; }
  .rg-person .who { background: var(--surface-3); color: var(--text); }
}
@media (max-width: 600px) { .kpi > span:nth-of-type(2) { white-space: normal !important; } }

/* ---------- Iteration 4 ---------- */
.kpi.has-spark { grid-template-rows: auto auto auto; }
.kpi.has-spark .spark { position: static; grid-column: 2; width: 100%; height: 18px; margin-top: 6px; }
@media (max-width: 600px) { .kpi.has-spark .spark { grid-column: 1 / -1; } }
/* Ziel am Ende des Lernpfads */
.path-finish { display: flex; align-items: center; gap: 16px; margin: 8px 0 24px 0; padding: 18px 20px; border-radius: var(--r-xl); border: 2px dashed color-mix(in srgb, var(--c) 40%, var(--line)); background: color-mix(in srgb, var(--cs) 55%, var(--surface)); }
.path-finish strong { display: block; font-size: var(--fs-md); }
.fin-sub { color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.fin-badge { flex: none; width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.fin-badge .icon { width: 28px; height: 28px; }
.path-finish.reached { border-style: solid; border-color: transparent; background: linear-gradient(120deg, #f6b93b, #f59e0b); color: #3b2300; }
.path-finish.reached .fin-sub { color: #4a2d00; }
.path-finish.reached .fin-badge { background: #fff; color: #d97706; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.trail::before { width: 4px; background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, transparent) 0 9px, transparent 9px 15px); }
@media (min-width: 1280px) { .path-side { max-height: calc(100vh - 120px); overflow: auto; } }
/* Dringlichkeit abgestuft */
/* Fach-Fortschritt kompakter */
/* Diagramm kompakter, zwei Wochen getrennt, Wochenende hinterlegt */
.bars { height: 150px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.chart-sum { margin-bottom: 18px; }
.bars li { border-radius: var(--r-sm); padding: 0 2px; }
.bars li.we { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.bars li.wk { box-shadow: -4px 0 0 -3px var(--line); }
.bars .lbl { position: relative; top: 4px; }
/* Dunkelmodus: Hero gedämpfter */
@media (prefers-color-scheme: dark) {
  .staff-hero { background: linear-gradient(120deg, #33288f, #5a43c2 55%, #a33f75); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
  .path-finish { background: color-mix(in srgb, var(--cs) 70%, var(--surface)); }
}
@media (max-width: 600px) { .kpi-row { align-items: start; } .kpi { align-content: start; } .kpi.has-spark .spark { display: none; } }
.bars li.we { background: color-mix(in srgb, var(--surface-2) 35%, transparent); }
.path-finish .fin-badge { width: 64px; height: 64px; background: linear-gradient(135deg, var(--c-deco0), var(--c-deco)); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--c-deco) 35%, transparent); }
.path-finish { border-style: solid; border-width: 2px; }

/* ===== Lernjahr: Zeitleiste über das Schuljahr ===== */
.yt-card { padding: 20px 22px; }
.yt-card-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.yt-card-head h2 { font-size: var(--fs-xl); }
.yt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.yt-key { display: inline-flex; align-items: center; gap: 6px; }
.yt-dot { display: inline-block; width: 18px; height: 10px; border-radius: var(--r-sm); background: var(--accent); flex: none; }
.yt-dot.active { background: linear-gradient(90deg, var(--accent) 50%, var(--accent-soft) 50%); border: 1.5px solid var(--accent); }
.yt-dot.planned, .yt-dot.draft { background: transparent; border: 1.5px dashed var(--muted); }
.yt-dot.overdue { background: var(--danger-soft); border: 1.5px solid var(--danger); }
.yt-dot.assigned { background: var(--accent-soft); border: 1.5px solid var(--accent); }

.yt { --lw: 172px; }
.yt-gantt { --lw: 172px; position: relative; }
.yt-head, .yt-lane { display: grid; grid-template-columns: var(--lw) repeat(11, minmax(0, 1fr)); }
.yt-head { position: sticky; top: 0; z-index: 2; padding-bottom: 6px; }
.yt-m { text-align: center; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 0; border-radius: var(--r-sm); }
.yt-m.past { color: var(--muted); }
.yt-m.now { background: var(--accent); color: var(--accent-text); opacity: 1; }
.yt-m.sem2 { box-shadow: inset 2px 0 0 var(--line); border-radius: 0 8px 8px 0; }
.yt-body { position: relative; display: grid; gap: 4px; padding: 6px 0; }
.yt-cols { position: absolute; inset: 0 0 0 var(--lw); display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); pointer-events: none; }
.yt-cols span { border-left: 1px dashed var(--line); }
.yt-cols span.past { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.yt-cols span.now { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.yt-cols span.sem2 { border-left: 2px solid var(--line); }
.yt-today { position: absolute; top: -26px; bottom: 0; left: calc(var(--lw) + (100% - var(--lw)) * var(--x)); background: var(--accent); z-index: 1; pointer-events: none; }
.yt-today span { position: absolute; bottom: -4px; left: 50%; transform: translate(-50%, 100%); background: var(--accent); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.yt-body:has(.yt-today) { padding-bottom: 28px; }
.yt-lane { grid-auto-rows: 46px; row-gap: 6px; position: relative; padding: 6px 0; border-top: 1px solid var(--line); }
.yt-lane:first-of-type { border-top: 0; }
.yt-label { display: flex; align-items: center; gap: 10px; padding-right: 10px; min-width: 0; grid-column: 1; }
.yt-art { flex: none; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--cs); color: var(--c); display: grid; place-items: center; overflow: hidden; }
.yt-art .art { width: 38px; height: 30px; }
.yt-subj { display: grid; min-width: 0; line-height: 1.25; }
.yt-subj strong { color: var(--ci); font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; }
.yt-subj small { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-subj .yt-lvl { color: var(--ci); cursor: help; }

.yt-bar { position: relative; z-index: 1; margin: 0 3px; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 5px; border-radius: var(--r-md); font: inherit; font-size: var(--fs-xs); font-weight: 700; line-height: 1.15; text-align: left;
  color: var(--ci); background: var(--cs); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); cursor: default; transition: transform .15s, box-shadow .15s; }
button.yt-bar { cursor: pointer; }
button.yt-bar:hover { transform: translateY(-2px); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 30%, transparent); }
.yt-bar .yt-t { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.yt-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ci, var(--c)); }
.yt-pct { font-size: var(--fs-2xs); font-weight: 800; letter-spacing: -.02em; }
.yt-bar.done { background: linear-gradient(120deg, var(--c), var(--c2)); color: var(--on-c); border-color: transparent; box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 28%, transparent); }
.yt-bar.done .yt-ic { background: rgba(var(--on-c-rgb), .25); color: var(--on-c); }
.yt-bar.active { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 8%, var(--cs)) var(--p, 0%), var(--cs) var(--p, 0%)); border-color: var(--c); }
.yt-bar.planned, .yt-bar.draft { background: color-mix(in srgb, var(--surface) 70%, transparent); border-style: dashed; color: var(--muted); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.yt-bar.planned .yt-ic, .yt-bar.draft .yt-ic { background: var(--surface-2); color: var(--muted); }
.yt-bar.assigned { border-color: var(--c); }
.yt-bar.overdue { border-color: var(--danger); }
.yt-bar.overdue .yt-ic { background: var(--danger); color: var(--danger-text); }
.yt-bar.overdue::after { content: '!'; position: absolute; top: -7px; right: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--danger); color: var(--danger-text); font-size: var(--fs-xs); font-weight: 900; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.yt-bar.one { padding-right: 6px; }
.yt-loose { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.yt-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ci); cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: 700; }

/* Mini-Zeitleiste (Übersicht der Lernjahre) */
.yt-gantt.mini { --lw: 96px; margin-top: 14px; }
.yt-gantt.mini .yt-m { letter-spacing: 0; padding: 2px 0; }
.yt-gantt.mini .yt-lane { row-gap: 3px; padding: 4px 0; }
.yt-gantt.mini .yt-subj strong { font-size: var(--fs-xs); }
.yt-gantt.mini .yt-bar { padding: 0; border-width: 1.5px; border-radius: var(--r-xs); margin: 0 2px; }
.yt-gantt.mini .yt-bar.assigned { background: var(--c); }
.yt-gantt.mini .yt-bar.overdue::after { display: none; }
.yt-gantt.mini .yt-body { padding-bottom: 4px; }
.yt-gantt.mini .yt-today { top: -18px; }
.year-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.year-card { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; margin: 0; }
.year-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.yc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }

/* Handy: senkrechte Reise durch die Monate */
.yt-journey { display: none; list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.yt-journey::before { content: ''; position: absolute; left: 22px; top: 8px; bottom: 8px; width: 3px; border-radius: var(--r-xs); background: var(--line); }
.yj-month { position: relative; padding: 0 0 14px 0; }
.yj-mlabel { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: 44px; font-size: var(--fs-sm); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.yj-mlabel::before { content: ''; position: absolute; left: -29px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.yj-month.past .yj-mlabel::before { border-color: var(--accent); background: var(--accent); }
.yj-month.now .yj-mlabel { color: var(--accent-ink); }
.yj-month.now .yj-mlabel::before { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 5px var(--accent-soft); }
.yj-mlabel em { font-style: normal; background: var(--accent); color: var(--accent-text); padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); letter-spacing: .04em; }
.yj-mlabel small { font-size: var(--fs-2xs); color: var(--muted); font-weight: 700; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px 7px; }
.yj-month.empty { padding-bottom: 8px; }
.yj-month.empty .yj-mlabel { font-size: var(--fs-xs); }
.yj-items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.yj-item { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px 8px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.yj-node { position: relative; z-index: 1; width: 40px; height: 40px; margin-left: 2px; border-radius: 50%; display: grid; place-items: center; background: var(--cs); color: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 50%, transparent); }
.yj-item.done .yj-node { background: linear-gradient(135deg, var(--c), var(--c2)); color: var(--on-c); box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 35%, transparent); }
.yj-item.active .yj-node { width: 46px; height: 46px; margin-left: -1px; background: conic-gradient(var(--c) var(--p, 0%), var(--cs) 0); color: var(--ci); }
.yj-item.active .yj-node .yt-pct { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); font-size: var(--fs-2xs); }
.yj-item.planned .yj-node, .yj-item.draft .yj-node { background: var(--surface-2); color: var(--muted); box-shadow: 0 0 0 2px var(--line); }
.yj-item.overdue .yj-node { box-shadow: 0 0 0 2px var(--danger); }
.yj-text { display: grid; gap: 1px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.yj-item.active .yj-text { background: var(--cs); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.yj-item.overdue .yj-text { border-color: var(--danger); }
.yj-text strong { font-size: var(--fs-base); color: var(--text); }
.yj-item.planned .yj-text strong { color: var(--muted); }
.yj-text small { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.yj-item.overdue .yj-text small { color: var(--danger); }

@media (max-width: 760px) {
  .yt > .yt-gantt { display: none; }
  .yt-journey { display: block; }
  .yt-card { padding: 16px 14px; }
  .yt-card-head { align-items: flex-start; }
  .yt-card-head .yt-legend { display: none; }
  .year-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .yt, .yt-gantt:not(.mini) { --lw: 64px; }
  .yt-subj, .yt-gantt:not(.mini) .yt-subj { display: none; }
  .yt-bar .yt-ic { display: none; }
}

/* Abzeichen und Semester im Kopf */
.trophies { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 14px; }
.tr-shelf { display: flex; flex-wrap: wrap; gap: 6px; }
.medal { border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c); box-shadow: 0 3px 8px rgba(0, 0, 0, .18), inset 0 0 0 3px color-mix(in srgb, var(--c) 35%, #fff); overflow: hidden; }
.medal.open { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45); border: 0; }
.tr-sem { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tr-semi { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.tr-semi small { font-weight: 700; }
.tr-bar { border-radius: var(--r-sm); background: rgba(255, 255, 255, .25); overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: #fff; border-radius: var(--r-sm); }
@media (max-width: 760px) { .tr-shelf { gap: 4px; } .trophies { gap: 10px; } .tr-bar { width: 64px; } }

/* Gerade dran und Fächer */
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.now-card { margin: 0; padding: 14px 18px 4px; border-top: 4px solid var(--c); }
.now-subj { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ci); }
.now-art { width: 30px; height: 22px; color: var(--c); }
.now-card .station { border-top: 0; padding-top: 8px; }
@media (min-width: 1280px) { .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; } }
@media (max-width: 760px) { .now-grid { grid-template-columns: minmax(0, 1fr); } }
.lvl-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: var(--r-pill); background: var(--cs, var(--accent-soft)); color: var(--ci, var(--accent)); font-size: var(--fs-xs); font-weight: 700; cursor: help; white-space: nowrap; }
.lvl-badge b { font-weight: 800; }
.lvl-dots { display: inline-flex; gap: 2px; align-items: flex-end; }
.lvl-dots i { width: 4px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--c, var(--accent)) 30%, transparent); }
.lvl-dots i:nth-child(1) { height: 7px; } .lvl-dots i:nth-child(2) { height: 10px; } .lvl-dots i:nth-child(3) { height: 13px; } .lvl-dots i:nth-child(4) { height: 16px; }
.lvl-dots i.on { background: var(--c, var(--accent)); }
.station.flash, .yi.flash, .now-card .station.flash { animation: flash-step 1.6s ease-out; border-radius: var(--r-md); }

/* Editor */
.yi { grid-template-columns: 30px minmax(0, 1fr) auto auto auto; }
.yi-period { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 !important; }
.yi-month { width: 76px; padding: 6px 8px; }
@keyframes pulse-btn { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); } }
@media (max-width: 760px) {
  .yi { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .yi .yi-period { grid-column: 2 / -1; }
  .yi .chip { grid-column: 3; grid-row: 1; }
  .yi .yi-acts { grid-column: 2 / -1; justify-content: flex-end; }
}
.yt-subj strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
.all-paths { margin-top: 26px; }
.all-paths > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 800; margin-bottom: 14px; }
.all-paths > summary::-webkit-details-marker { display: none; }
.all-paths > summary::after { content: '▾'; color: var(--muted); transition: transform .2s; }
.all-paths[open] > summary::after { transform: rotate(180deg); }
.all-paths > summary .icon { color: var(--accent-ink); }

/* Lernjahr Iteration 2 */
.yt-bar.wide { width: 75%; justify-self: start; }
.yt-bar.one:not(.overdue) .yt-ic { display: grid; }
.yt-bar.one { padding-left: 5px; }
.yt-bar.draggable { cursor: grab; touch-action: none; user-select: none; }
.yt-bar.dragging { cursor: grabbing; z-index: 3; box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 35%, transparent); transform: scale(1.03); }
.yt-bar.dragging::before { content: attr(data-label); position: absolute; top: -26px; left: 0; background: var(--text); color: var(--surface); font-size: var(--fs-xs); font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.yt-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 12px; cursor: ew-resize; border-radius: 0 10px 10px 0; }
.yt-grip::after { content: ''; position: absolute; right: 4px; top: 30%; bottom: 30%; width: 3px; border-radius: var(--r-xs); background: currentColor; opacity: .35; }
.yt-bar:hover .yt-grip::after { opacity: .8; }
.medal { width: 42px; height: 42px; }
.medal .art { width: 36px; height: 28px; }
.medal-more { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: var(--r-pill); background: var(--on-chip); box-shadow: inset 0 0 0 1.5px var(--on-ring); font-size: var(--fs-sm); font-weight: 800; color: var(--on-c); }
.tr-shelf { align-items: center; }
@media (max-width: 760px) { .medal { width: 34px; height: 34px; } .medal .art { width: 28px; height: 22px; } .medal-more { height: 34px; font-size: var(--fs-xs); padding: 0 10px; } }
.now-card.more { display: none; }
.now-grid.all .now-card.more { display: block; }
.now-all { margin-top: 12px; }
.now-card .etappen.compact .et-label { font-size: var(--fs-xs); }
.year-new { place-items: center; align-content: center; min-height: 150px; border: 2px dashed var(--line); background: transparent; }
/* Handy-Reise: vergangene Monate eingeklappt, geschaffte als Medaille */
.yj-past > summary { list-style: none; cursor: pointer; }
.yj-past > summary::-webkit-details-marker { display: none; }
.yj-past > summary .icon { transition: transform .2s; }
.yj-past[open] > summary .icon { transform: rotate(180deg); }
.yj-item.done .yj-text { background: var(--cs); border-color: color-mix(in srgb, var(--c) 30%, transparent); }
.yj-item.done .yj-text small { color: var(--ci); }
/* Dunkelmodus: mehr Kontrast für Geplantes und die Heute-Linie */
.yt-today { width: 3px; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .yt-bar.planned, :root:not([data-theme="light"]) .yt-bar.draft { border-color: color-mix(in srgb, var(--c) 70%, var(--line)); color: color-mix(in srgb, var(--muted) 55%, var(--text)); }
  :root:not([data-theme="light"]) .yt-cols span { border-left-color: color-mix(in srgb, var(--line) 80%, #fff 8%); }
  :root:not([data-theme="light"]) .yt-cols span.past { background: rgba(255, 255, 255, .03); }
}
:root[data-theme="dark"] .yt-bar.planned, :root[data-theme="dark"] .yt-bar.draft { border-color: color-mix(in srgb, var(--c) 70%, var(--line)); color: color-mix(in srgb, var(--muted) 55%, var(--text)); }
.yj-past > summary.yj-mlabel { display: flex; flex-wrap: nowrap; white-space: nowrap; }
.yj-mlabel small { white-space: nowrap; text-transform: none; letter-spacing: 0; }
.yt-bar.clash { border-color: var(--danger) !important; background: var(--danger-soft) !important; }
.yt-bar.clash::before { background: var(--danger) !important; color: var(--danger-text) !important; }
.yt-preview .yt-bar { font-size: var(--fs-xs); }
.yt-preview .yt-bar .yt-ic { width: 22px; height: 22px; }
.now-all { margin: 0 0 0 auto; border: 0; background: none; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); text-transform: none; letter-spacing: 0; cursor: pointer; }
.ap-arts { display: inline-flex; gap: 4px; margin-left: auto; }
.ap-art { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--cs); color: var(--c); overflow: hidden; }
.ap-art .art { width: 26px; height: 20px; }
.all-paths > summary::after { margin-left: 8px; }
.tr-semi small { font-size: var(--fs-sm); }
.tr-bar { height: 10px; width: 110px; }
.tr-semi b { font-size: var(--fs-base); }
@media (max-width: 760px) { .now-section { display: none; } .ap-arts { display: none; } .all-paths > summary::after { margin-left: auto; } }
/* Dichte Spuren (ein Lernpfad je Monat): Titel vor Symbol, keine Silbentrennung */
.yt-bar.one:not(.wide):not(.overdue) .yt-ic { display: none; }
.yt-bar.one:not(.wide) { font-size: var(--fs-xs); padding: 3px 6px 3px 7px; gap: 4px; letter-spacing: -.01em; }
.yt-preview .yt-bar.one:not(.wide) { font-size: var(--fs-2xs); padding: 2px 5px; }

/* ================= Lernjournal, Lernchecks, Wochenplan ================= */

/* Gesichter */
.face { width: 30px; height: 30px; flex: none; }
.face .f-bg { fill: var(--fc, #ffd166); }
.face .f-eye { fill: #3a2a10; }
.face .f-line { fill: none; stroke: #3a2a10; stroke-width: 1.6; stroke-linecap: round; }
.face .f-fill { fill: #3a2a10; }

/* Auswahl-Knöpfe */
.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.pk { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 9px; border-radius: var(--r-md); background: var(--surface-2); border: 2px solid transparent; font-weight: 700; font-size: var(--fs-base); color: var(--text); transition: transform .12s, border-color .12s; }
.pk:hover { border-color: var(--line); }
.pk:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pk[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.moods .pk { flex-direction: column; gap: 4px; padding: 10px 14px; min-width: 64px; font-size: var(--fs-sm); }
.moods .pk .face { width: 38px; height: 38px; transition: transform .15s; }
.moods .pk[aria-checked="true"] .face { transform: scale(1.12); }
.moods.mini .pk { min-width: 0; padding: 4px; border-radius: 50%; }
.moods.mini .pk .face { width: 28px; height: 28px; }
.cf-dots { display: inline-flex; gap: 3px; }
.cf-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.cf-dots.c1 i:nth-child(-n+1), .cf-dots.c2 i:nth-child(-n+2), .cf-dots.c3 i:nth-child(-n+3) { background: var(--ok-bright); }
.cf-dots.c1 i:nth-child(1) { background: #f0a020; }
.stars { display: inline-flex; gap: 2px; }
.stars i { width: 11px; height: 11px; background: var(--surface-3); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.stars i.on { background: var(--sun); }
.self-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 12px 0 6px; }
.self-pick .pk { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; }
.self-pick .stars i { width: 15px; height: 15px; }
.new-pill { display: inline-block; font-style: normal; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--danger); color: var(--danger-text); border-radius: var(--r-pill); padding: 2px 8px; margin-left: 6px; }

/* ----- Wochenplan ----- */
.week-hero, .journal-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 24px 26px; border-radius: var(--r-xl); color: var(--on-c); margin-bottom: 14px;
  background: radial-gradient(120% 140% at 100% 0%, var(--c2) 0%, var(--c) 60%); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 30%, transparent); }
.week-hero h1, .journal-hero h1 { color: var(--on-c); margin: 4px 0 6px; font-size: var(--fs-3xl); }
.week-hero p, .journal-hero p { margin: 0 0 14px; font-size: var(--fs-md); }
.week-hero .eyebrow, .journal-hero .eyebrow { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.wh-ring { display: grid; justify-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 700; }
.wh-ring .ring-num { color: var(--on-c); }
.goal-box { display: grid; gap: 6px; max-width: 640px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-lg); padding: 12px 14px; }
.goal-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.goal-label .icon { stroke: #fff; }
.goal-edit { display: flex; gap: 8px; }
.goal-edit input { flex: 1; min-width: 0; background: #fff; color: #1b1930; border: 0; border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-md); margin: 0; }
.goal-edit textarea { flex: 1; min-width: 0; background: #fff; color: #1b1930; border: 0; border-radius: var(--r-md); padding: 10px 12px; font: inherit; font-size: var(--fs-md); line-height: 1.4; margin: 0; resize: none; min-height: 3.4em; box-sizing: border-box; }
.goal-edit textarea::placeholder { color: #5f5b78; opacity: 1; }
.goal-edit { align-items: flex-end; }
.goal-recall { margin: 0; font-size: var(--fs-base); line-height: 1.4; overflow-wrap: break-word; }
.goal-recall q { font-style: italic; }
.goal-recall b { font-weight: 700; }
.recall-card[hidden] { display: none; }
.recall-card .rc-ask { display: none; font-size: var(--fs-base); font-weight: 700; color: var(--accent-ink); }
@media (min-width: 601px) { .recall-card .rc-ask { display: inline; } }
.goal-show { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); }
.goal-show strong { flex: 1; }
.goal-prev { font-size: var(--fs-sm); }
.goal-starter { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px dashed rgba(255,255,255,.7); background: transparent; color: #fff; font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.goal-starter[hidden] { display: none; }
.goal-starter .icon { stroke: #fff; }
.goal-starter:hover { background: rgba(0,0,0,.18); }
.goal-starter:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* Rückblick der Vorwoche beim Planen */
.recall-card { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.recall-card .rc-ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--accent-soft); }
.recall-card .rc-ic .icon { stroke: var(--accent); }
.recall-card .rc-body { display: grid; gap: 4px; flex: 1; min-width: 0; justify-items: start; }
.recall-card .rc-quote { margin: 0; font-size: var(--fs-md); line-height: 1.5; font-style: italic; overflow-wrap: break-word; }
.recall-card .rc-more { all: unset; cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); }
.recall-card .rc-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.recall-card .rc-prev { overflow-wrap: break-word; }
@media (max-width: 600px) { .recall-card { flex-wrap: wrap; } .recall-card .rc-body { flex-basis: calc(100% - 52px); } .recall-card .rc-ok { margin-left: auto; min-height: 44px; } }
.icon-btn.on-dark { color: var(--on-c); background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); min-width: 34px; height: 34px; }
.icon-btn.on-dark .icon { stroke: var(--on-c); }
.week-nav { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.week-nav .icon-btn { background: var(--surface); border: 1px solid var(--line); }
.coach-note { display: flex; gap: 12px; align-items: flex-start; background: var(--violet-soft); color: var(--text); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 14px; }
.coach-note .cn-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--violet); flex: none; }
.coach-note .cn-ic .icon { stroke: #fff; }
.week-days { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.day-col { display: flex; flex-direction: column; min-height: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 10px; transition: border-color .15s, background .15s; }
.day-col.today { border: 2px solid var(--accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.day-col.past:not(.today) { background: var(--surface-2); }
.day-col.over { border-color: var(--accent); background: var(--accent-soft); }
.day-col header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; padding: 4px 4px 10px; }
.dc-wd { font-weight: 800; font-size: var(--fs-base); }
.dc-wd .sm { display: none; }
.dc-date { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.dc-today { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--accent); color: var(--accent-text); border-radius: var(--r-pill); padding: 2px 8px; }
.dc-count { margin-left: auto; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.dc-count.ok { color: var(--ok); }
.day-items { display: grid; gap: 8px; align-content: start; flex: 1; }
.day-empty { margin: 6px 4px; color: var(--muted); font-size: var(--fs-sm); font-style: italic; }
.day-add { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 7px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.day-add:hover, .day-add:focus-visible { background: var(--surface-2); color: var(--accent-ink); }
.todo-form { display: grid; gap: 6px; }
.todo-form input { margin: 0; padding: 8px 10px; font-size: var(--fs-sm); }
.wi { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px 26px 9px 9px; border-radius: var(--r-md); background: var(--cs); border-left: 4px solid var(--c); cursor: grab; }
.wi.own { background: var(--surface-2); border-left-color: var(--muted); }
.wi.dragging { opacity: .45; }
.wi.done { color: var(--muted); }
.wi.done .wi-title { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent); }
.wi-check { all: unset; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-sm); border: 2px solid color-mix(in srgb, var(--c, var(--muted)) 60%, var(--line)); background: var(--surface); margin-top: 1px; }
.wi.own .wi-check { --c: var(--muted); }
.wi-check .icon { width: 15px; height: 15px; stroke-width: 3; stroke: transparent; }
.wi-check.on { background: var(--ok-bright); border-color: var(--ok-bright); }
.wi-check.on .icon { stroke: #fff; }
.wi-check:disabled { cursor: default; opacity: .6; }
.wi-check:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wi-body { display: grid; gap: 2px; min-width: 0; }
.wi-title { font-weight: 700; font-size: var(--fs-sm); line-height: 1.3; color: var(--text); text-decoration: none; overflow-wrap: break-word; hyphens: auto; }
a.wi-title:hover { color: var(--ci); text-decoration: underline; }
.wi-meta { color: var(--muted); line-height: 1.3; }
.wi-tag { display: inline-block; margin-left: 6px; font-style: normal; font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--warn-soft); color: var(--warn); padding: 1px 6px; border-radius: var(--r-sm); }
.wi-tag.info { background: var(--accent-soft); color: var(--accent-ink); }
.wi > .menu { position: absolute; top: 4px; right: 2px; }
.wi-more { min-width: 26px; height: 26px; }
.wi .menu-list { right: 0; left: auto; }
.tray-head { display: flex; align-items: center; gap: 4px; }
.tray-head h2 { margin: 0; font-size: var(--fs-lg); }
.tp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tp-head strong { font-size: var(--fs-sm); flex: 1; min-width: 0; }
.tp-art { width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--cs); color: var(--ci); display: grid; place-items: center; flex: none; }
.tp-art .icon, .tp-art svg { width: 16px; height: 16px; }
.tt-main { display: grid; gap: 1px; }
.tt-title { font-weight: 700; font-size: var(--fs-sm); }
.tray-empty { display: flex; gap: 10px; align-items: center; color: var(--muted); margin-top: 12px; }
.tray-empty .icon { stroke: var(--ok); }
.tray-empty p { margin: 0; font-weight: 600; }
.week-review { margin-top: 16px; }
.week-review.wr-now { border: 2px solid color-mix(in srgb, var(--sun) 70%, var(--line)); }
.wr-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.wr-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-md); background: color-mix(in srgb, var(--sun) 30%, var(--surface)); flex: none; }
.wr-ic .icon { stroke: #a06a00; }
.reach .pk { padding: 10px 16px 10px 10px; font-size: var(--fs-base); }
.reach .pk .face { width: 34px; height: 34px; }
.week-review textarea { min-height: 80px; }
.cal-line { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-size: var(--fs-base); line-height: 1.4; }
.cal-line .icon { flex: none; margin-top: 2px; stroke: var(--accent); }
.week-review .cal-line + label { display: block; margin-top: 16px; }
@media (max-width: 1000px) {
  .week-days { grid-template-columns: minmax(0, 1fr); }
  .day-col { min-height: 0; }
  .day-col header { padding-bottom: 6px; }
  .day-empty { margin: 0 4px; }
}
@media (max-width: 600px) {
  .week-hero, .journal-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .wh-ring { display: none; }
  .week-hero h1, .journal-hero h1 { font-size: var(--fs-2xl); }
  .goal-show { font-size: var(--fs-md); }
  .goal-edit { flex-direction: column; align-items: stretch; }
  .week-nav { justify-content: space-between; }
  .week-nav .btn { display: none; }
}

/* ----- Lernjournal ----- */
.jr-new { align-self: start; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--cw, var(--ci)); padding: 9px 14px; border-radius: var(--r-pill); font-weight: 800; text-decoration: none; box-shadow: var(--shadow-lg); }
.jr-new .icon { stroke: var(--cw, var(--ci)); }
.journal-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .journal-layout { grid-template-columns: minmax(0, 1fr) 380px; } .jl-side { position: sticky; top: 80px; } }
.composer h2 { font-size: var(--fs-xl); }
.jc-row { display: grid; gap: 8px; margin-top: 16px; }
.jc-label { font-weight: 800; font-size: var(--fs-base); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { all: unset; cursor: pointer; font-size: var(--fs-sm); font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pchip:hover, .pchip:focus-visible { color: var(--accent-ink); border-color: var(--accent); }
.pchip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.composer textarea { min-height: 110px; margin: 0; font-size: var(--fs-md); }
.composer .btn-row { margin-top: 14px; }
.path-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pp { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 5px 12px 5px 5px; border-radius: var(--r-md); background: var(--cs); color: var(--ci); font-size: var(--fs-sm); font-weight: 700; border: 2px solid transparent; }
.pp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp[aria-pressed="true"] { border-color: var(--c); background: var(--c); color: var(--on-c); }
.pp:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pp-art { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
.pp-art svg { width: 18px; height: 18px; }
.pp[aria-pressed="true"] .pp-art svg { stroke: var(--on-c); color: var(--on-c); }
.conf .pk { font-size: var(--fs-sm); }
.jr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.jr-entry { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: start; }
.je-date { display: grid; justify-items: center; padding-top: 10px; }
.je-date b { font-size: var(--fs-xl2); line-height: 1; }
.je-date span { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; text-transform: uppercase; }
.je-card { margin: 0; padding: 16px 18px; }
.jr-entry.is-new .je-card { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.je-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.je-mood { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.je-mood .face { width: 26px; height: 26px; }
.je-path { font-size: var(--fs-xs); font-weight: 800; background: var(--cs); color: var(--ci); padding: 3px 10px; border-radius: var(--r-pill); }
.je-conf { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.je-top .menu { margin-left: auto; }
.je-more { min-width: 30px; height: 30px; }
.je-top .menu-list { right: 0; left: auto; }
.je-prompt { display: block; margin-top: 10px; font-size: var(--fs-base); color: var(--accent-ink); }
.je-text { margin: 6px 0 0; white-space: pre-wrap; font-size: var(--fs-md); line-height: 1.55; }
.je-fb { position: relative; display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--ok-soft); }
.je-fb::before { content: ""; position: absolute; top: -7px; left: 22px; width: 14px; height: 14px; background: var(--ok-soft); transform: rotate(45deg); border-radius: var(--r-xs); }
.fb-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ok); flex: none; }
.fb-av .icon { stroke: #fff; }
.fb-who { display: block; font-size: var(--fs-sm); font-weight: 800; margin-bottom: 2px; }
.je-fb p { font-size: var(--fs-base); }
.je-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.je-read-face { width: 22px; height: 22px; flex: none; }
.je-read-reply { border: 0; background: none; font: inherit; font-weight: 700; color: var(--accent-ink); cursor: pointer; padding: 6px 4px; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; }
.je-read-wrap:empty { display: none; }
.je-read-wrap { margin-top: 10px; }
.jr-list.compact .jr-entry { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
.jr-list.compact .je-card { box-shadow: none; background: var(--surface-2); border: 0; padding: 12px 14px; }
.jr-list.compact .je-date b { font-size: var(--fs-lg); }
@media (max-width: 600px) {
  .jr-entry { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .je-date { display: flex; gap: 6px; align-items: baseline; padding: 0 4px; justify-items: start; }
  .je-date b { font-size: var(--fs-base); }
  .moods .pk { min-width: 0; flex: 1; padding: 8px 4px; }
  .moods { flex-wrap: nowrap; }
}

/* ----- Lernchecks ----- */
.checks-panel { padding: 18px; }
.cp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.cp-head h2 { font-size: var(--fs-lg); }
.cp-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-md); background: var(--violet-soft); flex: none; }
.cp-ic .icon { stroke: var(--violet); }
.cp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cp-item { padding: 12px; border-radius: var(--r-lg); background: var(--surface-2); }
.cp-item.is-new { box-shadow: inset 0 0 0 2px var(--violet); }
.cp-top { display: flex; align-items: center; gap: 8px; }
.cp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.cp-title { flex: 1; min-width: 0; font-weight: 800; font-size: var(--fs-base); color: var(--text); text-decoration: none; }
.cp-title:hover { color: var(--ci); }
.cp-self { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.lc-res { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; flex: none; }
.lc-res.grade b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm); color: #fff; font-size: var(--fs-md); background: var(--g, var(--accent)); }
.lc-res.g1 { --g: #0f7a3b; } .lc-res.g2 { --g: #3b7a2a; } .lc-res.g3 { --g: #8a6400; } .lc-res.g4 { --g: #b4521a; } .lc-res.g5 { --g: #c0392f; }
.lc-res.pct b { font-size: var(--fs-base); }
.lc-bar { display: inline-block; width: 46px; height: 7px; border-radius: var(--r-xs); background: var(--surface-3); overflow: hidden; }
.lc-bar i { display: block; height: 100%; width: var(--w); background: var(--ok-bright); border-radius: var(--r-xs); }
.lc-res.text { font-size: var(--fs-xs); color: var(--violet); background: var(--violet-soft); padding: 4px 9px; border-radius: var(--r-pill); }
.lc-res.text .icon { stroke: var(--violet); }
.lc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 800; }
.lc-chip.done { background: var(--violet-soft); color: var(--violet); }
.lc-chip.done .icon { stroke: var(--violet); }
.lc-chip.self { background: color-mix(in srgb, var(--sun) 22%, var(--surface)); color: #8a5a00; }
.lc-chip.self .icon { stroke: #b07800; }
@media (prefers-color-scheme: dark) { .lc-chip.self { color: var(--sun); } .lc-chip.self .icon { stroke: var(--sun); } .wr-ic .icon { stroke: var(--sun); } }
.about-btn.lc-btn .icon { stroke: #fff; }

/* Lernchecks eintragen (Lehrkraft) */
.lc-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--r-xl); background: var(--cs); margin: 8px 0 16px; }
.lc-hero > svg:first-child { width: 52px; height: 52px; color: var(--ci); }
.lc-hero h1 { font-size: var(--fs-2xl); margin: 2px 0 4px; }
.lc-hero .subject-tag { color: var(--ci); }
.lc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.seg.lc-seg { display: inline-flex; justify-self: start; grid-template-columns: none; gap: 2px; margin: 0; padding: 4px; border-radius: var(--r-md); }
.lc-seg button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-sm); color: var(--muted); }
.lc-seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.lc-seg button:focus-visible { outline: 3px solid var(--accent); }
.lc-who { display: flex; gap: 10px; align-items: center; }
.lc-who > div { display: grid; gap: 2px; min-width: 0; }
.lc-who .who, .ji-item .who { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; text-decoration: none; flex: none; }
.ji-item .who.mine { background: var(--accent); color: var(--accent-text); }
.lc-progline { display: flex; align-items: center; gap: 6px; }
.lc-prog { display: inline-block; width: 70px; height: 6px; border-radius: var(--r-xs); background: var(--surface-3); overflow: hidden; }
.lc-prog i { display: block; height: 100%; width: var(--w); background: var(--ok-bright); }
.lc-self { display: grid; gap: 4px; font-size: var(--fs-sm); }
.lc-selfnote { font-size: var(--fs-xs); color: var(--muted); font-style: italic; }
.res-editor { display: grid; gap: 8px; }
.res-editor > input { margin: 0; padding: 8px 10px; font-size: var(--fs-sm); }
.res-editor textarea { margin: 0; }
.grades .pk { padding: 6px 10px; gap: 6px; font-size: var(--fs-sm); }
.grades .pk b { font-size: var(--fs-base); }
.res-editor.compact .grades .pk { padding: 6px 12px; }
.pct-row { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.pct-in { width: 100px; margin: 0; }
@media (max-width: 1100px) { .res-editor { grid-column: 1 / -1; } }
@media (max-width: 600px) { .lc-hero { grid-template-columns: minmax(0, 1fr); } .lc-hero > svg:first-child, .lc-hero .ring { display: none; } }

/* Startseite: Journal-Einträge beantworten */
.ji-sub { text-transform: none; letter-spacing: 0; font-weight: 600; }
.ji-list { display: grid; gap: 0; padding: 6px 16px; }
.ji-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ji-item:last-child { border-bottom: 0; }
.ji-text { margin: 4px 0 8px; font-size: var(--fs-base); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ji-text b { color: var(--accent-ink); }
.ji-more { margin: 4px 0 8px; }
.reply-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.reply-box .moods.mini { flex-wrap: nowrap; gap: 2px; }
.reply-box .error { flex-basis: 100%; margin: 0; }

/* Detailansicht: Wochenplan, Journal, Lernchecks */
.sw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sw-head > div { display: grid; }
.sw-goal { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; font-size: var(--fs-md); }
.sw-goal .icon { stroke: var(--accent); }
.sw-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sw-day { display: grid; gap: 5px; align-content: start; padding: 10px; border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.sw-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.sw-day > b { font-size: var(--fs-sm); color: var(--muted); }
.sw-it { display: flex; gap: 4px; align-items: flex-start; font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; padding: 5px 7px; border-radius: var(--r-sm); background: var(--cs, var(--surface)); border-left: 3px solid var(--c, var(--muted)); overflow-wrap: break-word; }
.sw-it.own { background: var(--surface); }
.sw-it.done { color: var(--muted); }
.sw-it .icon { width: 13px; height: 13px; flex: none; stroke: var(--ok); stroke-width: 3; margin-top: 1px; }
.sw-refl { margin: 12px 0 0; padding: 10px 14px; border-left: 4px solid var(--sun); background: var(--surface-2); border-radius: 0 12px 12px 0; font-style: italic; }
.sw-note { display: flex; gap: 8px; margin-top: 12px; }
.sw-note input { min-width: 0; margin: 0; padding: 8px 10px; font-size: var(--fs-sm); }
.sc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sc-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; border-bottom: 1px solid var(--line); }
.sc-list li:last-child { border-bottom: 0; }
.sc-title { font-weight: 700; font-size: var(--fs-sm); }
@media (max-width: 700px) { .sw-days { grid-template-columns: minmax(0, 1fr); } .sc-list li { grid-template-columns: auto minmax(0, 1fr) auto; } }
.week-goal-card { display: flex; gap: 14px; align-items: center; }
.wg-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-md); background: var(--accent-soft); flex: none; }
.wg-ic .icon { stroke: var(--accent); }
.weekend-hint { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 14px 16px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: none; }
.weekend-hint > div { display: grid; flex: 1; }
.weekend-hint .wk-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-soft); }
.weekend-hint .wk-ic .icon { stroke: var(--accent); }
.weekend-hint:hover { border-color: var(--accent); }

.res-editor.compact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.res-editor.compact .res-body { flex: 0 1 auto; }
.res-editor.compact > input { flex: 1 1 180px; }
.res-editor.compact textarea { width: 260px; min-height: 0; }
.tray-more { all: unset; cursor: pointer; margin-top: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); padding: 4px 6px; border-radius: var(--r-sm); }
.tray-more:hover, .tray-more:focus-visible { background: var(--accent-soft); }
/* Lernchecks: Tabelle mit Sofort-Speichern */
.lc-card { padding: 4px 0; }
.lc-tr { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(170px, 1fr) minmax(320px, 2fr); gap: 14px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--line); }
.lc-tr:last-child { border-bottom: 0; }
.lc-tr.ready { background: color-mix(in srgb, var(--ok-soft) 55%, transparent); }
.lc-th { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 12px; padding-bottom: 10px; }
.lc-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-grades { display: flex; gap: 4px; }
.lc-g { all: unset; cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); font-weight: 800; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.lc-g:hover { border-color: var(--g); color: var(--text); }
.lc-g:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.lc-g.g1 { --g: #16a05a; } .lc-g.g2 { --g: #4aa83a; } .lc-g.g3 { --g: #c89200; } .lc-g.g4 { --g: #e0742b; } .lc-g.g5 { --g: #d1453b; }
.lc-g[aria-checked="true"] { background: var(--g); border-color: var(--g); color: #fff; }
.lc-comment, .lc-desc { flex: 1 1 140px; min-width: 0; margin: 0; padding: 7px 10px; font-size: var(--fs-sm); }
.lc-desc { flex-basis: 220px; }
.lc-state { width: 18px; height: 18px; flex: none; }
.lc-cell[data-state="saving"] .lc-state { border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.lc-cell[data-state="saved"] .lc-state { background: var(--ok-bright); border-radius: 50%; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='black' stroke-width='4'/%3E%3C/svg%3E") center/14px no-repeat, linear-gradient(#000 0 0); }
.lc-cell[data-state="error"] .lc-state { background: var(--danger); border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.lc-kind { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: var(--fs-sm); margin: 0; }
@media (max-width: 1000px) { .lc-tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lc-cell { grid-column: 1 / -1; } .lc-th { display: none; } }
@media (max-width: 600px) { .lc-tr { grid-template-columns: minmax(0, 1fr); } }
/* Lernchecks Seitenleiste: Ich / Lehrkraft als Paare */
.cp-agree { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 700; }
.cp-agree.ok { background: var(--ok-soft); color: var(--ok); } .cp-agree.ok .icon { stroke: var(--ok); }
.cp-agree.up { background: var(--accent-soft); color: var(--accent-ink); } .cp-agree.up .icon { stroke: var(--accent); }
.cp-agree.down { background: var(--warn-soft); color: var(--warn); } .cp-agree.down .icon { stroke: var(--warn); }
/* Gesichter: Wangen */
.face .f-cheek { fill: #ff8a65; opacity: .55; }
.face-1 { --fc: #b9cbe6; } .face-2 { --fc: #ffe3a3; } .face-3 { --fc: #ffcf4a; } .face-4 { --fc: #ffa928; }
/* Journal: Handy-Reiter, Fach-Auswahl wischbar, ältere Wochen */
.jl-tabs { display: none !important; }
@media (max-width: 1099px) {
  .jl-tabs { display: inline-flex !important; width: 100%; margin: 0 0 12px; }
  .jl-tabs button { flex: 1; text-align: center; }
  .journal-layout[data-tab="main"] .jl-side, .journal-layout[data-tab="side"] .jl-main { display: none; }
}
@media (max-width: 700px) {
  .path-pick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 -4px; scrollbar-width: thin; }
  .pp { flex: none; }
}
.jr-older { margin-top: 18px; }
.jr-older > summary { cursor: pointer; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); padding: 8px 0; }
.jr-older[open] > summary { margin-bottom: 10px; }

.cp-item.is-new .new-pill { background: var(--violet); }

/* ---------- Lerncoaching: Glocke, Filter, Wochenübersicht, Gesprächsseite, Vereinbarungen ---------- */
.bell-wrap { position: relative; }
.icon-btn.bell { position: relative; }
.bell-count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--danger); color: var(--danger-text); font-size: var(--fs-xs); font-weight: 800; display: grid; place-items: center; line-height: 1; }
.bell-list { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 8px; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; }
.bell-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread { background: var(--accent-soft); }
.bell-item .bi-ic { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-2); color: var(--accent-ink); }
.bell-item .bi-main { display: grid; gap: 2px; min-width: 0; }
.bell-item .bi-main strong { font-size: var(--fs-sm); line-height: 1.3; }
.bell-item .bi-body { font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; white-space: pre-line; }
.bell-empty { padding: 18px; }

.segmented { display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--surface-2); gap: 2px; text-transform: none; letter-spacing: 0; }
.segmented .sg-opt { border: 0; background: none; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); padding: 5px 10px; border-radius: var(--r-sm); cursor: pointer; }
.segmented .sg-opt.on { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow); }
a.ji-more { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px; font-weight: 700; text-decoration: none; border-top: 1px solid var(--line); }

.cw-top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.week-nav.compact { display: flex; align-items: center; gap: 6px; }
.plan-cell { display: flex; align-items: center; gap: 8px; }
.plan-bar { width: 60px; height: 8px; border-radius: var(--r-sm); background: var(--surface-3); overflow: hidden; flex: none; }
.plan-bar i { display: block; height: 100%; background: var(--ok-bright); border-radius: var(--r-sm); }
.mood-trail { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.mood-trail .mt-face { width: 20px; height: 20px; }
.mood-trail .mt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); margin: 0 6px; }
.tk-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); align-items: start; }
@media (max-width: 960px) { .tk-grid { grid-template-columns: minmax(0, 1fr); } .tk-talk { order: -1; } }
.tk-since h3, .tk-talk h3 { margin: 20px 0 8px; font-size: var(--fs-base); display: flex; align-items: center; gap: 8px; }
.tk-done { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-path { background: var(--cs, var(--surface-2)); color: var(--ci, var(--text)); }
.tk-problems { list-style: none; padding: 0; display: grid; font-size: var(--fs-sm); }
.tk-week { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.tk-week-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tk-cn { color: var(--muted); }
.tk-journal { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: var(--fs-sm); }
.tk-journal li { display: grid; grid-template-columns: 74px 24px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 8px; border-radius: var(--r-sm); }
.tk-journal li.low { background: var(--danger-soft); }
.tk-journal .tk-face { width: 22px; height: 22px; }
.tk-j-date { color: var(--muted); font-size: var(--fs-sm); }
.tk-fb { color: var(--muted); }
.tk-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.tk-q .q { border: 1px dashed var(--line); cursor: pointer; font-weight: 600; white-space: normal; text-align: left; }
.tk-q .q:hover { border-color: var(--accent); color: var(--accent-ink); }
.tk-talk textarea { width: 100%; }
.tk-talk > label { display: block; margin-top: 16px; }
.new-ags { display: grid; gap: 6px; }
.new-ag { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 6px; }
.tk-dates { margin: 14px 0; } .tk-dates > div { flex: 1; min-width: 140px; }
.tk-sessions { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 0; }
.tk-sessions > li { padding: 12px 0; border-top: 1px solid var(--line); }
.tk-s-head { display: flex; gap: 10px; align-items: center; }
.tk-note { white-space: pre-wrap; margin: 6px 0; }

.agreements-card { border-left: 4px solid var(--violet); }
.ag-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.ag-ic { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); flex: none; }
.ag-list { list-style: none; padding: 0; margin: 0; }
.ag-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 4px; border-radius: var(--r-sm); }
.ag-list li label { display: flex; align-items: center; gap: 10px; flex: 1; margin: 0; font-weight: 600; cursor: pointer; }
.ag-list li label input { width: 22px; height: 22px; flex: none; }
.ag-list li.done label span, .ag-list.done li { color: var(--muted); text-decoration: line-through; }
.ag-list.small li { padding: 2px 0; font-size: var(--fs-sm); justify-content: flex-start; }
.ag-list.done li { justify-content: flex-start; font-size: var(--fs-sm); }
@media (max-width: 600px) {
  .tk-head .avatar { display: none; }
  .ag-list li { flex-wrap: wrap; }
  .ag-list li label { flex: 1 0 calc(100% - 48px); }
  .ag-list li > button { order: 1; }
  .ag-list li > .chip { order: 2; margin: -4px 0 2px 32px; }
}

/* ---------- Kompetenzraster ---------- */
.kr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 4px 14px; font-size: var(--fs-sm); color: var(--muted); font-weight: 700; }
.kr-key { display: inline-flex; align-items: center; }
.kr-key i { border: 1.5px solid var(--line); background: var(--surface); }
.kr-key.confirmed i { background: var(--ok-bright); border-color: var(--ok-bright); }
.kr-card > summary { list-style: none; cursor: pointer; }
.kr-card > summary::-webkit-details-marker { display: none; }
.kr-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.kr-head h2 { font-size: var(--fs-xl); }
.kr-art { width: 64px; height: 48px; color: var(--c); }
.kr-table { display: grid; grid-template-columns: minmax(120px, 170px) repeat(var(--cols), minmax(150px, 1fr)); gap: 8px; min-width: calc(170px + var(--cols) * 158px); }
.kr-step { width: 24px; height: 24px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: var(--fs-xs); color: var(--on-c); background: var(--c, var(--accent)); flex: none; }
.icon-btn.sm { width: 28px; height: 28px; }
.kr-bar { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); width: 100%; margin-top: auto; }
.kr-bar.wide { flex: 1; min-width: 80px; max-width: 280px; }
.kr-bar i.confirmed { background: var(--ok-bright); } .kr-bar i.working { background: var(--sun); }
.kr-count { font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.kr-students { display: grid; gap: 0; }
.kr-student { display: grid; grid-template-columns: 36px minmax(120px, 220px) minmax(0, 1fr) auto auto; align-items: center; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.kr-student:first-child { border-top: 0; }
.kr-detail .kr-level-tag { display: inline-block; font-size: var(--fs-xs); font-weight: 800; color: var(--ci); background: var(--cs); padding: 3px 10px; border-radius: var(--r-pill); }
.kr-big { font-size: var(--fs-lg); font-weight: 700; line-height: 1.4; margin: 10px 0 14px; }
.kr-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kr-rate button { font: inherit; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 10px 6px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: var(--fs-sm); font-weight: 700; }
.kr-rate button b { color: var(--warn); letter-spacing: 1px; font-size: var(--fs-md); }
.kr-rate button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
.kr-pathlist { display: grid; gap: 6px; margin-bottom: 8px; }
.kr-path { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); color: inherit; text-decoration: none; font-weight: 700; }
.kr-pick { display: grid; gap: 4px; max-height: 40vh; overflow: auto; }
.kr-pick-row { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; padding: 6px 4px; border-radius: var(--r-sm); }
.kr-pick-row:hover { background: var(--surface-2); }
.card.hint.okay { background: var(--ok-soft); border-color: transparent; }
.card.hint.okay > .icon { color: var(--ok); flex: none; margin-top: 2px; }
.kr-section { margin-top: 8px; }
@media (max-width: 700px) {
  /* Handy: je Kompetenzbereich eine Zeile mit Feldern zum Wischen */
  .kr-table { display: block; min-width: 0; }
  .kr-head { grid-template-columns: minmax(0, 1fr) auto; } .kr-head .kr-art { display: none; }
  .kr-student { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .kr-rate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Anmeldung mit Microsoft, Datenschutz ---------- */
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--surface); color: var(--text); border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.sso-btn:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; } .ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; } .ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; margin: 14px 0; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-wrap { margin-top: 16px; }
.sso-steps { padding-left: 20px; display: grid; gap: 8px; }
.sso-steps code { background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-sm); word-break: break-all; }
.check-row.big { font-size: var(--fs-md); margin-bottom: 12px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 4px 18px; }
table.retention input.num { width: 90px; }
ul.kv { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* =====================================================================
   UI-Stufe November 2026: "Heute zu tun", ruhigere Hierarchie, Handy-Feinschliff
   ===================================================================== */
/* Lehrkräfte-Start: Arbeitsstapel direkt im Kopf */
.staff-hero .today-bar { flex: 1 0 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 6px; }
.td-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); color: #fff; text-decoration: none;
  background: rgba(0,0,0,.18); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); transition: transform .12s, background .12s; }
a.td-item:hover { background: rgba(0,0,0,.3); transform: translateY(-1px); }
.td-item.open { background: #fff; color: #2c1f86; border-color: #fff; box-shadow: 0 8px 22px rgba(30, 10, 90, .25); }
.td-item.open:hover { background: #fff; }
.td-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: rgba(0,0,0,.22); flex: none; }
.td-item.open .td-ic { background: linear-gradient(135deg, #5a44dc, #744dce); color: #fff; }
.td-txt { display: grid; line-height: 1.25; min-width: 0; }
.td-txt b { font-size: var(--fs-xl2); letter-spacing: -.02em; }
.td-txt span { font-size: var(--fs-sm); font-weight: 600; }
.td-item.done .td-txt b { font-size: var(--fs-md); }
.td-go { margin-left: auto; opacity: .7; }
.section-title.big { font-size: var(--fs-lg); text-transform: none; letter-spacing: -.01em; color: var(--text); margin-top: 36px; }
#help { scroll-margin-top: 80px; }
.help-item { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "who main sev go" "who why why go"; }
.help-item .hi-sev { grid-area: sev; }
/* Wochenspur (Startseite) nicht mit der Wochenplan-Spalte verwechseln: immer waagrecht */
.week > .week-days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
/* Schüler-Start: Einstieg, Rückmeldung und Vereinbarungen nebeneinander, Geschafftes eingeklappt */
.due.start { background: var(--accent-soft); color: var(--accent-ink); }
.on-color .due.start { background: #fff; color: #4330b8; }
.welcome-card { border-radius: var(--r-xl); padding: 20px 22px; margin-bottom: 18px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.wc-head { display: flex; gap: 14px; align-items: flex-start; }
.wc-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: linear-gradient(135deg, #5a44dc, #e0569a); color: #fff; flex: none; }
.wc-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wc-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.wc-steps li > b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-text); flex: none; }
.wc-steps li > span { display: grid; gap: 2px; }
.done-fold > summary { cursor: pointer; list-style: none; display: flex; }
.done-fold > summary::-webkit-details-marker { display: none; }
.done-fold .fold-hint { margin-left: 4px; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--accent-ink); }
.done-fold[open] .fold-hint { display: none; }
.done-fold > summary:hover .fold-hint { text-decoration: underline; }
/* Kennzahl-Kacheln im Schüler-Start nicht unnötig hoch */
.area-list { padding: 6px; display: grid; }
.area-list .nav-link { min-height: 52px; font-size: var(--fs-md); width: 100%; border: 0; background: none; cursor: pointer; text-align: left; }
.area-list .nav-link + .nav-link { border-top: 1px solid var(--line); border-radius: 0; }
.ml-auto { margin-left: auto; }
.ag-list { display: grid; gap: 2px 24px; }
/* Tabellen am Handy: eine Karte je Zeile, Beschriftung links */
@media (max-width: 640px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  table.stack td { border: 0 !important; padding: 4px 0 !important; display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 10px; align-items: center; text-align: left !important; min-width: 0; word-break: break-word; }
  table.stack td::before { content: attr(data-label); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
  table.stack td:not([data-label])::before, table.stack td[data-label=""]::before { display: none; }
  table.stack td:not([data-label]), table.stack td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
  table.stack td:first-child { grid-template-columns: minmax(0, 1fr); font-size: var(--fs-md); font-weight: 700; padding-bottom: 8px !important; }
  table.stack td:first-child::before { display: none; }
  table.stack td select, table.stack td input { width: 100%; max-width: 100%; }
  table.stack td .btn-row, table.stack td:last-child:has(.btn) { display: flex; flex-wrap: wrap; gap: 6px; }
  table.stack td:last-child:has(.btn)::before { flex-basis: 100%; }
  .table-wrap:has(table.stack) { overflow: visible; }
  .card:has(> .table-wrap table.stack), .card:has(> table.stack) { background: none; border: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
  table.retention.stack td:first-child { font-size: var(--fs-md); }
}
/* Listen-Werkzeuge: Suche, Filter, Zähler */
.list-tools { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 18px 0 12px; }
.list-tools select { width: auto; min-width: 150px; margin: 0; }
.search-box { position: relative; flex: 1 1 260px; max-width: 460px; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { margin: 0; padding-left: 40px; }
.u-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.u-name .who { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: var(--fs-2xs); font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.u-name .who.role-teacher, .u-name .who.role-lead, .u-name .who.role-admin { background: var(--warn-soft); color: var(--warn); }
.u-name .who.role-parent { background: var(--ok-soft); color: var(--ok); }
tr.inactive { opacity: .6; }
.act-row { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.fold-card > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; color: var(--accent-ink); }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card[open] > summary { margin-bottom: 14px; color: var(--text); }
/* Formulare: Luft zwischen Feldgruppen, größere Häkchen */
form .row + .row, .card > .row + .row { margin-top: 16px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex: none; margin: 0; vertical-align: -4px; cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-base); color: var(--text); font-weight: 600; margin: 8px 0; cursor: pointer; }
@media (max-width: 640px) {
  table.stack td > * { justify-self: start; max-width: 100%; }
  table.stack td[data-empty] { display: none; }
  table.stack td > span:has(select), table.stack td > div:has(select) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-self: stretch; }
}
/* Freigabe am Handy: Abgabe zuerst, Entscheidung als schmale Leiste; das Textfeld wächst erst beim Tippen */
@media (max-width: 600px) {
  .review-grid { display: flex; flex-direction: column; }
  .decide-bar { padding: 10px; gap: 6px; border-radius: var(--r-xl); }
  .decide-bar > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .decide-bar textarea { min-height: 44px; height: 44px; padding: 10px 12px; resize: none; transition: height .15s; }
  .decide-bar textarea:focus, .decide-bar textarea:not(:placeholder-shown) { height: 96px; }
  .decide-bar .btn-row { flex-wrap: nowrap; }
  .decide-bar .btn-row .btn { flex: 1; justify-content: center; padding-left: 10px; padding-right: 10px; white-space: nowrap; }
  main:has(.decide-bar) { padding-bottom: 150px; }
}
.yt-gantt.mini .yt-m { font-size: var(--fs-2xs); overflow: hidden; }
@media (max-width: 760px) {
  .yt-gantt.mini { --lw: 84px; }
  .yt-gantt.mini .yt-m { font-size: 0; }
  .yt-gantt.mini .yt-m::first-letter { font-size: var(--fs-2xs); }
}
/* Wochenplan: "Noch einplanen" immer unter der Woche über die volle Breite (keine hohe Randspalte) */
.wi-meta { font-size: var(--fs-sm); color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.wh-ring span { text-align: center; line-height: 1.2; }
/* Coaching: schwere Journal-Tage als Randstreifen statt vollflächig rot */
.tk-journal li.low { background: none; box-shadow: inset 3px 0 0 var(--danger); border-radius: 4px 10px 10px 4px; background: color-mix(in srgb, var(--danger-soft) 35%, transparent); }
/* Lernpfad-Editor am Handy: Abschnittstitel in eigener Zeile, große Sortier-Knöpfe */
@media (max-width: 760px) {
  .section-head { flex-wrap: wrap; row-gap: 6px; }
  .section-head > input[aria-label="Abschnitt"], .section-head > strong.grow { flex: 1 0 100%; width: 100%; font-size: var(--fs-md); }
  .section-head .spacer { display: none; }
  .section-head .muted.small { margin-right: auto; }
  .section-head .icon-btn { min-width: 40px; height: 40px; }
  .task-summary .meta { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
  .task-summary .move { flex-direction: row; margin-left: auto; opacity: 1; }
  .task-summary .move .icon-btn { width: 40px; height: 40px; }
  .add-task { flex-wrap: wrap; }
}
.bottom-nav .lbl-short { display: none; }
@media (max-width: 860px) { .bottom-nav .lbl-long { display: none; } .bottom-nav .lbl-short { display: inline; } }
/* Fächer-Karten: lückenlos in Spalten (statt Raster mit Löchern), Kommendes eingeklappt */
@media (min-width: 1280px) { .subject-grid { display: block; columns: 2; column-gap: 16px; } .subject-grid > .subject-block { break-inside: avoid; } }
@media (min-width: 2000px) { .subject-grid { columns: 3; } }
.later-fold { border-top: 1px solid var(--line); margin: 4px 0 10px; }
.later-fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 2px; font-weight: 700; color: var(--muted); }
.later-fold > summary::-webkit-details-marker { display: none; }
.later-fold .fold-hint { margin-left: auto; color: var(--accent-ink); font-size: var(--fs-sm); }
.later-fold[open] .fold-hint { display: none; }
/* Zeitleiste: mehr Platz für Fachnamen und Titel in einmonatigen Balken */
@media (min-width: 1100px) {
  .yt, .yt-gantt:not(.mini) { --lw: 196px; }
  .yt-gantt:not(.mini) .yt-lane { grid-auto-rows: 54px; }
  .yt-gantt:not(.mini) .yt-subj strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.yt-bar .yt-t { word-break: normal; hyphens: auto; }
.yt-bar.one:not(.wide) .yt-t { -webkit-line-clamp: 3; }
.td-short { display: none; }
@media (max-width: 640px) {
  .staff-hero .today-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .td-item { padding: 10px; gap: 10px; }
  .td-ic { width: 34px; height: 34px; border-radius: var(--r-sm); }
  /* Fünf Kacheln: Zahl und Beschriftung in einer Zeile, damit die Leiste nicht höher wird als mit vier */
  .today-bar.many .td-item { padding: 5px 10px; min-height: 44px; }
  .today-bar.many .td-ic { width: 30px; height: 30px; }
  .today-bar.many .td-txt { display: flex; align-items: baseline; gap: 6px; }
  .today-bar.many .td-txt b { font-size: var(--fs-lg); }
  .today-bar.many .td-short { white-space: normal; line-height: 1.15; font-size: var(--fs-xs); }
  .today-bar.many .td-go { display: none; }
  .today-bar.many .td-item { gap: 8px; }
  .td-go, .td-long { display: none; }
  .td-short { display: inline; }
  .hero-actions .about-btn, .hero-actions details.about summary { white-space: normal; text-align: left; }
}
/* Klassenansicht: Kopf mit Abzeichen, Lernstand je Schüler:in statt Verwaltungsspalten */
.class-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 6px 0 18px; }
.class-badge.lg { width: 68px; height: 68px; border-radius: var(--r-xl); font-size: var(--fs-2xl); background: linear-gradient(135deg, #5a44dc, #744dce); color: #fff; box-shadow: 0 8px 20px rgba(90, 68, 220, .3); flex: none; }
.ch-main { flex: 1 1 280px; min-width: 0; display: grid; gap: 4px; }
.ch-teachers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.chip.person { background: var(--surface-2); color: var(--text); gap: 4px; }
.chip-x { all: unset; position: relative; cursor: pointer; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); margin-right: -4px; }
.chip-x:hover, .chip-x:focus-visible { background: var(--danger-soft); color: var(--danger); }
a.u-name { color: inherit; text-decoration: none; }
a.u-name:hover strong { text-decoration: underline; }
.cl-name { display: grid; line-height: 1.3; min-width: 0; }
.cl-name .muted { font-weight: 500; }
.mini-bar { display: inline-block; width: 84px; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.mini-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ok-bright), #6ee0a0); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.inline-field .th-select { margin: 0; font-size: var(--fs-base); padding: 9px 34px 9px 12px; }
.fold-card form.row { margin: 0; }
@media (max-width: 640px) { .class-head .btn-row { width: 100%; } .class-head .btn-row .btn:first-child { flex: 1; justify-content: center; } }
@media (max-width: 640px) {
  .ch-main { flex-basis: 180px; }
  table.stack tr { position: relative; }
}

/* ---------- Iteration 2: Handwerk ---------- */
.subj-choice.on::after { left: auto; right: 9px; top: 6px; }
.ring.full .ring-num.is-check { font-size: calc(var(--size) * .34); }
.help-item .hi-main .muted { white-space: nowrap; }
.decide-bar { grid-template-columns: minmax(0, 1fr); }
.decide-bar textarea { min-width: 0; }
.yt-bar .yt-t { hyphenate-limit-chars: 12 5 5; }
/* Schüler-Start: erster Schritt zuerst. Zeile 1: Als Nächstes | Kennzahlen 2×2 | Woche. Zeile 2: Fristen | Selbstständigkeit | Coaching */
/* Zweite Zeile: ab 700 px zwei Spalten (eine ungerade letzte Kachel geht über die Breite), breit 3 oder 4 Kacheln nebeneinander, nie ein Loch */
/* Heute in deinem Plan */
.today-tile { display: flex; flex-direction: column; }
.today-tile h3 { flex-wrap: wrap; }
.today-tile .tt-count { margin-left: auto; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.today-tile ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.today-tile li a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 10px; margin: 0 -10px; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.today-tile li a:hover { background: var(--surface-2); }
.today-tile .tt-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--c, var(--accent)); display: grid; place-items: center; color: #fff; }
.today-tile li.done .tt-dot { background: var(--ok); border-color: var(--ok); }
.today-tile li.waiting .tt-dot { border-color: var(--info, var(--accent)); color: var(--info, var(--accent)); }
.today-tile li.waiting .tt-dot .icon { stroke: currentColor; width: 14px; height: 14px; }
.today-tile li.done .tt-t b { text-decoration: line-through; color: var(--muted); }
.today-tile .tt-t { display: grid; min-width: 0; }
.today-tile .tt-t b { font-size: var(--fs-base); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-tile .tt-t .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-tile .tt-empty { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-base); line-height: 1.45; }
.today-tile .tt-more { margin: 6px 0 0; }
.today-tile .tt-link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 700; font-size: var(--fs-base); color: var(--accent-ink); text-decoration: none; }
.today-tile .tt-link.btn { padding-top: 0; margin-top: 4px; color: inherit; }
.today-tile .tt-link:hover { text-decoration: underline; }
.agreements-card.all-done { border-left-color: var(--ok); }
.agreements-card.all-done .ag-ic { background: var(--ok-soft); color: var(--ok); }
.agreements-card .ag-head { margin-bottom: 0; }
.agreements-card .ag-list { margin-top: 8px; }
.ag-done { margin-top: 6px; }
.ag-done > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); padding: 4px 0; }
/* Für dein nächstes Gespräch: Themen und Vorschläge der Schüler:in */
.tp-prep { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.tp-title { margin: 0; font-size: var(--fs-md); }
.tp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tp-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px 8px 10px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-base); line-height: 1.4; }
.tp-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); }
.tp-item.proposal .tp-ic { background: var(--accent-soft); color: var(--accent-ink); }
.tp-text { flex: 1; min-width: 0; overflow-wrap: break-word; padding-top: 3px; }
.tp-del { flex: none; min-width: 44px; height: 44px; margin: -8px -2px -8px 0; }
.tp-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-add { min-height: 44px; }
.tp-add:disabled { opacity: .55; cursor: not-allowed; }
.tp-form { display: grid; gap: 8px; }
.tp-starts { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-starts .chip { min-height: 36px; cursor: pointer; border: 0; font: inherit; font-size: var(--fs-sm); font-weight: 700; }
.tp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tp-row input { flex: 1 1 220px; min-width: 0; margin: 0; }
.tp-row .btn { min-height: 44px; }
.tp-note { display: flex; align-items: center; gap: 6px; }
.tp-compact { display: grid; gap: 8px; margin-top: 10px; }
.tp-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: var(--fs-base); color: var(--accent-ink); text-decoration: none; }
.tp-link:hover { text-decoration: underline; }
.wr-talk { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: var(--fs-base); color: var(--muted); }
.wr-talk .icon { flex: none; margin-top: 2px; }
.wr-talk a { color: var(--accent-ink); font-weight: 700; }
/* Gesprächsseite: das bringt die Schüler:in mit */
.tk-brings { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--accent-soft); }
.tk-brings h3 { margin: 0; font-size: var(--fs-md); }
.tk-brings-sub { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.tk-brings ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-brings li { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; font-size: var(--fs-base); line-height: 1.4; }
.tk-brings li label { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; margin: 0; font-weight: 600; cursor: pointer; min-height: 44px; padding: 8px 0; }
.tk-brings li label input { width: 22px; height: 22px; flex: none; }
.tk-brings li .tk-b-text { flex: 1; min-width: 0; overflow-wrap: break-word; padding: 10px 0; }
.tk-brings li .btn { min-height: 44px; flex: none; }
.tk-brings li.taken .tk-b-text { color: var(--muted); }
.tk-brings-none { margin: 0; font-size: var(--fs-base); }
.tk-s-topics { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--muted); }
.tk-s-topics li { display: flex; gap: 6px; align-items: flex-start; }
.tk-s-topics .icon { flex: none; margin-top: 2px; }
.show-all { margin: 14px auto 0; display: flex; }
/* "Heute zu tun": vier gleiche Kacheln, dunkles Glas mit hellem Symbol (ruhiger als weiße Flächen im Verlauf) */
.td-item, .td-item.open { background: rgba(22, 14, 70, .34); color: #fff; border: 1px solid rgba(255, 255, 255, .22); box-shadow: none; backdrop-filter: blur(8px); }
a.td-item:hover, .td-item.open:hover { background: rgba(22, 14, 70, .5); border-color: rgba(255, 255, 255, .45); }
.td-item .td-ic, .td-item.open .td-ic { background: #fff; color: #4b36c9; }
.td-item.done { opacity: 1; background: rgba(255, 255, 255, .1); }
.td-item.done .td-ic { background: rgba(255, 255, 255, .22); color: #fff; }
.td-item .td-go { opacity: .8; }
.help-item.calm .who { background: var(--surface-2); color: var(--muted); }
/* Iteration 2 · Lehrkraft-Start: Zeilen schneiden sauber ab, Handy-Reihenfolge = erst Arbeit, dann Überblick */
.help-item .hi-main { min-width: 0; overflow: hidden; }
.help-item .hi-main .muted { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.help-item .hi-main strong { min-width: 0; }
.help-item .hi-main strong { flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.help-item .hi-main .muted { flex: 1 1 0; }
@media (max-width: 600px) { .kpi-row .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Iteration 2 · journal */
/* ----- Eingang der Lehrkraft: Karten in Spalten, eine Zeile zum Reagieren ----- */
.ji-pagehead { align-items: flex-end; margin-bottom: 4px; }
.ji-pagehead .sub { margin-top: 4px; }
.ji-tools { gap: 10px; }
.ji-sec > .section-title { margin: 28px 0 12px; }
.ji-sec .ji-sub { text-transform: none; letter-spacing: 0; font-weight: 600; }
.ji-sec .section-title .count-pill { margin-left: 0; }
details.ji-sec > summary { cursor: pointer; list-style: none; }
details.ji-sec > summary::-webkit-details-marker { display: none; }
details.ji-sec > summary > .icon { transition: transform .15s; }
details.ji-sec[open] > summary > .icon { transform: rotate(180deg); }
details.ji-sec > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--r-sm); }
.ji-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: stretch; }
.ji-showall { display: inline-flex; width: 100%; min-height: 44px; margin-top: 10px; justify-content: center; }
.ji-showall[hidden] { display: none; }
.ji-grid:not(.all) > .ji-card:nth-child(n+7) { display: none; }

.ji-item.ji-card, .ji-item.ji-card:last-child { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 16px 18px 12px; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); transition: opacity .22s, transform .22s; }
.ji-item.ji-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 12px; transition: opacity .22s; }
.ji-item.ji-card.need-help, .ji-item.ji-card.need-help:last-child { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); box-shadow: inset 4px 0 0 color-mix(in srgb, var(--warn) 75%, transparent), var(--shadow); }
.ji-item.leaving { opacity: 0; transform: scale(.97); }
.ji-item.is-done > :not(.reply-box) { opacity: .45; transition: opacity .2s; }

.ji-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ji-person { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-md); }
.ji-person:hover strong { color: var(--accent-ink); }
.ji-person:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ji-who { display: grid; min-width: 0; line-height: 1.3; }
.ji-who strong { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ji-meta { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ji-mood { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.ji-mood .face { width: 24px; height: 24px; }
.ji-mood.chip { padding: 3px 11px 3px 4px; font-weight: 800; }
.ji-mood.chip.warn { color: var(--warn); }
.ji-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ji-tags .je-path { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ji-conf.chip { gap: 6px; }
.ji-item .ji-text { margin: 0; max-width: 62ch; font-size: var(--fs-base); line-height: 1.55; white-space: pre-line; overflow-wrap: break-word; }
.ji-card .ji-text { -webkit-line-clamp: 6; }
.ji-item .ji-text.open { display: block; overflow: visible; }
.ji-expand { all: unset; cursor: pointer; align-self: flex-start; margin-top: -6px; font-size: var(--fs-xs); font-weight: 700; color: var(--accent-ink); }
.ji-expand:hover { text-decoration: underline; }
.ji-expand:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

/* Reaktionszeile: Smileys (ein Tipp sendet), Antworten, Gelesen */
.ji-item .reply-box, .reply-box.rb { display: block; }
.ji-card .rb { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.rb.busy { opacity: .55; pointer-events: none; }
.rb-rowwrap { container-type: inline-size; }
.rb-row { display: flex; flex-wrap: wrap; align-items: center; }
.rb-quick { display: inline-flex; gap: 4px; margin-right: auto; }
.rb-face { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); transition: transform .12s, background .12s; }
.rb-face .face { width: 28px; height: 28px; }
.rb-face:hover { background: var(--accent-soft); transform: scale(1.1); }
.rb-face:active { transform: scale(.94); }
.rb-face:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rb-row .btn.small { padding: 8px 12px; }
.rb-row .rb-read { color: var(--muted); }
.rb-row .rb-read:hover { color: var(--accent-ink); }
@container (max-width: 352px) {
  .rb-row .btn .icon { display: none; }
  .rb-row .btn.small { padding-inline: 10px; }
}
.rb-done { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 40px; font-size: var(--fs-sm); font-weight: 700; color: var(--ok); }
.rb-done-face { width: 28px; height: 28px; }
.rb-done-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft); flex: none; }
.rb-done-ic .icon { stroke: var(--ok); }
.rb-form { display: grid; gap: 8px; }
.rb-form textarea { margin: 0; min-height: 68px; padding: 10px 12px; font-size: var(--fs-base); line-height: 1.45; }
.rb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
.rb-tools .moods.mini { flex-wrap: nowrap; gap: 2px; }
.rb-snip { margin-left: auto; }
.rb-snip .btn.small { padding: 8px 10px; }
.rb-snip .menu-list { left: auto; right: 0; width: min(320px, calc(100vw - 64px)); }
.rb-snip .menu-list button { white-space: normal; font-size: var(--fs-sm); line-height: 1.35; }
.rb-snip .menu-list button .icon { flex: none; }
.rb-actions { display: flex; justify-content: flex-end; gap: 8px; }
.rb .error { margin: 8px 0 0; }
/* Startseite: Zeilen im Kasten */
.journal-inbox .ji-list { padding: 2px 16px; }
.journal-inbox .section-title .more { white-space: nowrap; }

@media (max-width: 700px) {
  .ji-pagehead { flex-direction: column; align-items: stretch; gap: 12px; }
  .ji-tools .btn.small { min-height: 44px; }
  .ji-sec > .section-title { margin-top: 24px; }
  .ji-grid { gap: 12px; }
  details.ji-sec > summary { min-height: 44px; margin-bottom: 4px; }
  .ji-item.ji-card, .ji-item.ji-card:last-child { padding: 14px 16px 10px; }
  .ji-expand { padding-block: 12px; margin-block: -12px -8px; }
  .rb-face { width: 44px; height: 44px; }
  .rb-face .face { width: 30px; height: 30px; }
  .rb-quick { gap: 2px; }
  .rb-row .btn.small, .rb-actions .btn.small, .rb-snip .btn.small { min-height: 44px; }
  .rb-form textarea { font-size: var(--fs-md); }
}

/* Iteration 2 · admin */
/* Seitenkopf der Verwaltung: Titel und ein Satz links, die eine Hauptaktion rechts (Handy: direkt darunter) */
.ph-admin { align-items: center; margin-bottom: 20px; }
.ph-admin h1 { margin-bottom: 2px; }
.ph-admin .sub { font-size: var(--fs-base); }
@media (max-width: 640px) {
  .ph-admin { margin-bottom: 16px; gap: 12px; }
  .ph-admin > .btn { width: 100%; min-height: 46px; }
}

/* Benutzer · „Zu klären“: antippbare Kacheln, die die Liste filtern */
.attn-title { margin-top: 4px; }
.attn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 6px; }
button.kpi.attn { appearance: none; font: inherit; text-align: left; cursor: pointer; flex: 0 1 300px; min-width: 240px; padding-right: 48px; transition: border-color .15s, box-shadow .15s, transform .08s; }
button.kpi.attn:hover { border-color: var(--accent); }
button.kpi.attn:active { transform: scale(.99); }
button.kpi.attn .attn-go { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); }
button.kpi.attn .attn-go .icon + .icon { display: none; }
button.kpi.attn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
button.kpi.attn[aria-pressed="true"] .attn-go { background: var(--accent); color: var(--accent-text); }
button.kpi.attn[aria-pressed="true"] .attn-go .icon { display: none; }
button.kpi.attn[aria-pressed="true"] .attn-go .icon + .icon { display: block; }
@media (max-width: 640px) {
  .attn-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  button.kpi.attn { min-width: 0; grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: auto; align-items: center; column-gap: 10px; row-gap: 0; min-height: 56px; padding: 9px 46px 9px 10px; border-radius: var(--r-lg); }
  button.kpi.attn .kpi-ic { grid-row: auto; width: 36px; height: 36px; border-radius: var(--r-md); }
  button.kpi.attn b { font-size: var(--fs-xl); }
  button.kpi.attn > span:last-child { font-size: var(--fs-base); color: var(--text); }
}

/* Benutzerliste: ruhige Tabelle am großen Bildschirm, kompakte Zeilen darunter (eigene Darstellung statt Kartenstapel) */
.users-tools { margin: 20px 0 10px; }
.users-tools .btn.ghost { padding: 7px 10px; }
a.u-class { color: inherit; text-decoration: none; font-weight: 700; }
a.u-class:hover { color: var(--accent-ink); text-decoration: underline; }
.list-more { display: flex; margin: 14px auto 0; min-height: 44px; }
.users-empty { justify-content: flex-start; flex-wrap: wrap; }
@media (max-width: 640px) {
  .users-tools { gap: 8px; margin-top: 16px; }
  .users-tools .search-box { flex: 1 1 150px; max-width: none; }
  .users-tools select { min-width: 0; flex: 0 1 auto; max-width: 46%; }
  .users-tools .u-count { flex: 1 1 auto; }
}
dialog .secret-box { text-align: center; padding: 6px 0; }
dialog .secret-box .code { margin: 4px 0 12px; font-size: var(--fs-2xl); word-break: break-all; user-select: all; }

/* Einstellungen: jede Gruppe eine Karte mit Titel und einem Satz; Felder im Raster, Beschriftung über dem Feld */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; }
.settings-grid > .card { margin: 0; min-width: 0; }
@media (min-width: 1100px) {
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .settings-grid > .span-2 { grid-column: 1 / -1; }
}
.set-head { margin: 0 0 18px; }
.set-head h2 { margin: 0 0 4px; }
.set-head p { margin: 0; font-size: var(--fs-base); line-height: 1.5; max-width: 76ch; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.form-grid > .wide { grid-column: 1 / -1; }
.fg { min-width: 0; }
.fg > label { margin: 0 0 6px; }
.fg > input, .fg > select, .fg > textarea { margin: 0; display: block; }
.fg > input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.fhint { margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--muted); }
.set-sub { margin: 22px 0 12px; font-size: var(--fs-base); }
.set-check { margin: 0; align-items: flex-start; line-height: 1.4; }
.set-check input { margin-top: 1px; }
.set-check + .fhint { padding-left: 30px; margin-top: 4px; }
@media (max-width: 520px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* Stufen der Selbstständigkeit: zugeklappt eine ruhige Zeile je Stufe, aufgeklappt das Formular */
.stage-list { display: grid; gap: 10px; }
.stage-fold { border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.stage-fold > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 14px 9px 10px; border-radius: var(--r-lg); }
.stage-fold > summary::-webkit-details-marker { display: none; }
.stage-fold > summary:hover { background: var(--surface-2); }
.stage-no { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #5a44dc, #744dce); }
.stage-sum { display: grid; min-width: 0; line-height: 1.35; }
.stage-sum strong { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-sum span { font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-edit { font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); }
.stage-fold > summary .chev { color: var(--muted); transition: transform .15s; }
.stage-fold[open] { background: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.stage-fold[open] > summary .chev { transform: rotate(180deg); }
.stage-fold[open] > summary .stage-edit { display: none; }
.stage-body { display: grid; gap: 16px 20px; padding: 8px 16px 18px; }
.stage-body textarea { min-height: 132px; }
.stage-auto { padding: 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.stage-auto h3 { margin: 0 0 12px; font-size: var(--fs-base); }
.stage-auto .set-check { margin-top: 12px; }
@media (min-width: 1100px) {
  .stage-body { grid-template-columns: minmax(280px, .85fr) minmax(0, 1.2fr) minmax(0, 1.2fr); grid-template-areas: "name rights duties" "auto rights duties"; grid-template-rows: auto 1fr; }
  .stage-body > .st-name { grid-area: name; }
  .stage-body > .st-rights { grid-area: rights; }
  .stage-body > .st-duties { grid-area: duties; }
  .stage-body > .stage-auto { grid-area: auto; align-self: start; }
  .stage-body textarea { min-height: 236px; }
}
@media (max-width: 640px) { .stage-edit { display: none; } .stage-body { padding: 6px 12px 14px; } }

/* Speichern: eine Leiste, die am unteren Rand stehen bleibt (lange Seite) oder die Karte abschließt (kurze Seite) */
.save-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.save-bar .sb-state { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 180px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.save-bar .sb-state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.save-bar.dirty .sb-state { color: var(--text); }
.save-bar.dirty .sb-state::before { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.save-bar .btn-row { margin-left: auto; flex-wrap: nowrap; }
.save-bar .error { flex-basis: 100%; margin: 0; }
.save-bar.sticky { position: sticky; bottom: 16px; z-index: 15; margin-top: 18px; padding: 10px 10px 10px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.card > .save-bar { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .save-bar.sticky { bottom: calc(92px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 14px; } }
@media (max-width: 640px) { .save-bar .btn { min-height: 44px; } }

/* Zeile mit Symbol, Titel, Satz und einer Aktion (Datenexport, Auskunft) */
.link-rows { display: grid; }
.link-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.link-row:first-child { padding-top: 0; }
.link-row:last-child { border-bottom: 0; padding-bottom: 0; }
.link-row .lr-ic, .ret-ic { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.link-row .lr-text { display: grid; gap: 2px; min-width: 0; }
.link-row .lr-text span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) {
  .link-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .link-row > .btn { grid-column: 2; justify-self: start; min-height: 44px; }
}

/* Datenschutz: Löschfristen als Liste, daneben Vorschau, Auskunft und Hinweis */
.privacy-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.privacy-cols > *, .privacy-side > * { min-width: 0; }
.privacy-cols .card { margin: 0; }
.privacy-side { display: grid; gap: 16px; }
@media (min-width: 1100px) { .privacy-cols { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; } .privacy-side { gap: 18px; } }
.ret-list { display: grid; }
.ret-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ret-row:last-child { border-bottom: 0; }
.ret-row > label { margin: 0; font-size: var(--fs-base); font-weight: 650; color: var(--text); line-height: 1.35; }
.ret-val { display: inline-flex; align-items: center; gap: 10px; }
.ret-val input { width: 76px; margin: 0; padding: 9px 8px; text-align: center; font-weight: 700; }
.ret-val .unit { font-size: var(--fs-sm); color: var(--muted); line-height: 1.3; }
.ret-list + .fhint { margin-top: 14px; }
.ret-preview .empty-state { margin: 0 0 12px; align-items: flex-start; }
.ret-preview .empty-state p { color: var(--text); }
.ret-preview ul.kv { margin: 0 0 12px; gap: 8px; }
.ret-preview ul.kv li { padding: 6px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-base); }
.ret-preview .btn { margin-top: 14px; }
.privacy-side .card.hint { box-shadow: none; }
.privacy-side .card.hint p { margin: 0; font-size: var(--fs-base); line-height: 1.5; }
.privacy-side .card.hint p + p { margin-top: 8px; }
@media (max-width: 640px) {
  .ret-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 0; }
  .ret-row .ret-ic { grid-row: span 2; align-self: start; }
  .ret-val { grid-column: 2; }
  .ret-val input { min-height: 44px; }
}
@media (max-width: 700px) {
  .ji-tools .segmented { flex: none; }
  .ji-tools .segmented .sg-opt { flex: none; white-space: nowrap; padding-inline: 12px; }
  .ji-tools > .btn.small { margin-left: auto; }
}
@media (max-width: 700px) {
  .rb-tools .moods.mini .pk { padding: 6px; }
  .rb-snip .btn.small > .icon:first-child { display: none; }
}
/* Iteration 2 · admin: Handyzeile der Benutzerliste (Menü ganz rechts, Name über die volle Breite), Hauptaktion am Desktop erst beim Überfahren */

/* ----- Schüler-Journal: kompakter Kopf, Woche als Kreise ----- */
.journal-hero { padding: 22px 26px; gap: 14px 24px; }
.journal-hero h1 { margin: 2px 0 4px; }
.journal-hero p { margin: 0; }
.jh-side { display: grid; justify-items: end; gap: 10px; }
.jw-days { display: flex; gap: 8px; padding: 10px 12px; border-radius: var(--r-lg); background: rgba(70, 20, 0, .2); border: 1px solid rgba(255, 255, 255, .22); }
.jw-day { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .6); font-size: var(--fs-xs); font-weight: 800; color: #fff; }
.jw-day.on { background: #fff; border: 2px solid #fff; }
.jw-day.on .icon { stroke: var(--c); width: 18px; height: 18px; stroke-width: 3; }
.jw-day.today { border-style: solid; border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
@media (max-width: 600px) {
  .journal-hero { padding: 14px 18px 16px; gap: 10px; border-radius: var(--r-xl); margin-bottom: 12px; }
  .journal-hero h1 { font-size: var(--fs-2xl); margin: 0; }
  .journal-hero .eyebrow { font-size: var(--fs-2xs); }
  .journal-hero .jh-goal { margin-top: 4px; font-size: var(--fs-base); }
  .jh-side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .jw-days { padding: 0; gap: 6px; background: none; border: 0; }
  .jw-day { width: 34px; height: 34px; background: rgba(70, 20, 0, .16); }
  .jw-day.on { background: #fff; }
}

/* Neuer Eintrag: breit zweispaltig, am Handy wischbare Reihen mit weichem Rand */
label.jc-label { color: var(--text); margin: 0; }
.cmp-write .btn-row { margin-top: 14px; }
@media (min-width: 1400px) {
  .cmp-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 32px; align-items: start; }
  .composer textarea { min-height: 124px; }
}
@media (max-width: 700px) {
  .composer { padding: 18px 16px; }
  .composer .btn-row .btn { flex: 1 0 100%; min-height: 48px; }
  .composer .conf.picker .pk { min-height: 28px; }
}
@media (max-width: 1099px) {
  .jl-tabs button { box-sizing: border-box; min-height: 44px; padding: 10px 12px; display: grid; place-items: center; }
}

/* Einträge: lesbare Zeilenlänge, am Handy größere Tippflächen */
.je-text, .je-fb p { max-width: 70ch; }
@media (max-width: 700px) {
  .je-more { min-width: 44px; height: 44px; margin: -8px -10px -8px 0; }
  .jr-older > summary { padding-block: 13px; }
}

/* Meine Lernchecks: offene Lernpfade als kurze Zeilen */
.checks-panel .cp-sub { margin: 18px 0 8px; }
.checks-panel .cp-sub .count-pill { margin-left: 0; }
.cp-list.cp-todo { gap: 0; padding: 2px 12px; border-radius: var(--r-lg); background: var(--surface-2); }
.cp-item.cp-open { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 0; border-radius: 0; background: none; border-bottom: 1px solid var(--line); }
.cp-item.cp-open:last-child { border-bottom: 0; }
.cp-open .cp-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-open .btn.small { flex: none; margin-right: -8px; padding: 6px 10px; }
@media (max-width: 700px) {
  .cp-open .btn.small { min-height: 44px; }
  .cp-item.cp-open { padding: 0; }
}
.cp-top .cp-edit { flex: none; margin: -4px -8px -4px 0; padding: 6px 10px; }
@media (max-width: 700px) {
  .composer textarea { min-height: 88px; }
  .cp-top .cp-edit { min-height: 44px; margin-block: -10px; }
}
/* Iteration 2 · admin: Einstellungen im Gleichgewicht (kurze Felder dreispaltig, Auswahl als Kästchenzeile, Begriffe am Handy eingeklappt) */
label.opt-row { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; color: var(--text); font-size: var(--fs-base); transition: border-color .15s, background .15s; }
label.opt-row:hover { border-color: var(--surface-3); }
label.opt-row:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
label.opt-row input { margin-top: 1px; }
.opt-text { display: grid; gap: 3px; min-width: 0; }
.opt-text strong { font-weight: 700; line-height: 1.35; }
.opt-text span { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); line-height: 1.45; }
.terms-more { display: none; }
.save-bar .sb-state { flex-basis: 120px; }

/* ----- Detailansicht Schüler:in (Lehrkraft): Lernchecks ohne Platzhalter, Journal am Handy lesbar ----- */
.sc-list li { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px 12px; padding: 6px 4px; min-height: 44px; }
.sc-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.sc-title strong { font-size: var(--fs-base); overflow-wrap: break-word; }
.sc-must { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); white-space: nowrap; }
.sc-vals { display: inline-flex; align-items: center; gap: 10px; }
.sc-list li.sc-empty .btn { grid-column: 4; }
.sc-list li .btn.small { margin-right: -6px; }
.sw-note { flex-wrap: wrap; }
.sw-note input { flex: 1 1 220px; }
@container (max-width: 312px) {
  .rb-quick { gap: 2px; }
  .rb-row { gap: 4px; }
  .rb-row .rb-face { width: 40px; }
  .rb-row .btn.small { padding-inline: 8px; font-size: var(--fs-xs); }
}
@media (max-width: 700px) {
  .jr-list.compact .jr-entry { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .jr-list.compact .je-date b { font-size: var(--fs-base); }
  .sc-list li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sc-list li .cp-self { display: inline-flex; }
  .sc-list li .sc-vals { grid-column: 2; grid-row: 2; justify-self: start; margin-top: -4px; padding-bottom: 6px; }
  .sc-list li .btn { grid-column: 3; grid-row: 1; min-height: 44px; }
  .sc-list li.sc-empty .btn { grid-column: 3; }
  .sw-note input, .sw-note .btn { min-height: 44px; }
  .sw-note .btn { flex: 1 1 auto; }
}
/* „schwer“: Antworten leicht betont, ohne dass viele volle Knöpfe untereinander stehen */
.journal-inbox a.ji-more { border-top: 0; margin: 0; }
@media (min-width: 1400px) {
  .cmp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp-pick .moods { flex-wrap: nowrap; }
  .cmp-pick .moods .pk { flex: 1 1 0; min-width: 0; max-width: 110px; }
}
/* Iteration 2 · admin: Benutzerzeilen zwischen Handy und großem Bildschirm, Zahlenzeilen der Stufen, Microsoft-Seite */
.num-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px; align-items: center; gap: 0 12px; }
.num-row + .num-row { margin-top: 10px; }
.num-row label { margin: 0; font-size: var(--fs-base); font-weight: 600; color: var(--text); line-height: 1.35; }
.num-row label small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.num-row input { margin: 0; padding: 9px 8px; text-align: center; font-weight: 700; }
@media (min-width: 1100px) { .stage-body { grid-template-columns: minmax(330px, .9fr) minmax(0, 1.15fr) minmax(0, 1.15fr); } }
@media (max-width: 640px) { .num-row input { min-height: 44px; } }
.sso-fields { margin-top: 16px; }
.sso-fields input { font-variant-numeric: tabular-nums; }
.sso-steps { margin: 0; }
.sso-steps li { line-height: 1.5; }
.sso-uri { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.acc-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.card > .opt-row + .set-sub, .card > .fhint + .set-sub { margin-top: 22px; }

/* ----- Lernchecks je Lernpfad (Lehrkraft): am Handy große Notenknöpfe, Kommentar erst nach dem Ergebnis ----- */
.sw-day:not(:has(.sw-it)) { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 1000px) { .lc-self:empty { display: none; } }
@media (max-width: 600px) {
  .lc-tr { gap: 10px; padding: 14px; }
  .lc-cell { gap: 8px; }
  .lc-grades { flex: 1 1 100%; gap: 6px; }
  .lc-g { flex: 1; width: auto; height: 44px; font-size: var(--fs-md); }
  .lc-cell:not(.has-res) .lc-comment { display: none; }
  .lc-comment, .lc-desc, .lc-cell .pct-in { min-height: 44px; font-size: var(--fs-md); }
  .lc-toolbar { gap: 10px; }
  .lc-toolbar .lc-kind { flex-wrap: wrap; }
  .lc-toolbar .lc-seg { max-width: 100%; }
  .lc-toolbar .lc-seg button { box-sizing: border-box; min-height: 40px; display: grid; place-items: center; padding: 6px 11px; }
  .lc-hero { padding: 16px 18px; margin-top: 4px; }
  .lc-hero h1 { font-size: var(--fs-xl2); }
}
.link-rows + .fhint, .acc-none + .fhint { margin-top: 12px; }
.acc-none .icon { color: var(--muted); }
.acc-none p { color: var(--text); }
@media (max-width: 640px) { .sso-fields input { font-size: var(--fs-sm); padding-top: 13px; padding-bottom: 13px; } }

/* Selbsteinschätzung: vier gleich große Stufen (breit nebeneinander, am Handy 2 x 2) */
.picker.self-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.self-pick .pk { box-sizing: border-box; min-height: 72px; justify-content: flex-start; }
@media (min-width: 620px) { .picker.self-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } .self-pick .pk { padding: 12px; font-size: var(--fs-sm); } }
@media (max-width: 380px) {
  .ji-tools > .btn.small .icon { display: none; }
  .ji-sec .ji-sub { display: none; }
  .rb-tools .moods.mini .pk { padding: 6px 3px; border-radius: var(--r-lg); }
}
/* Iteration 2 · admin: Schule und Lernniveaus als volle Zeilen, damit keine Karte leer ausläuft */
.form-grid.cols-lv { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
@media (min-width: 1100px) {
  .form-grid.cols-school { grid-template-columns: 2fr 1fr 1fr; }
  .form-grid.cols-school > .wide { grid-column: auto; }
}
.ji-body > .empty-state { margin-top: 20px; max-width: 640px; }
/* Iteration 2 · admin: Löschfristen einzeilig auch bei 1440px, Symbol der Aktionszeilen auf Höhe des Titels */
.ret-val .unit { width: 142px; }
@media (min-width: 1100px) { .privacy-cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.link-row { align-items: start; }
.link-row > .btn, .link-row > .acc-chips { align-self: center; }
.link-row .lr-ic { margin-top: 2px; }
@media (max-width: 640px) { .ret-val .unit { width: auto; } .link-row > .btn { align-self: start; margin-top: 4px; } }
.stage-body textarea { height: var(--h, auto); }
@media (max-width: 640px) { .sso-uri .btn, .users-tools .btn.ghost, .users-empty .btn { min-height: 44px; } }
/* Iteration 2 · admin · Pflichtfeld nicht unter der Speicherleiste verstecken */
.settings-grid input, .settings-grid textarea, .settings-grid select { scroll-margin-block: 96px 132px; }
/* Iteration 2 · raster */
/* Seitenkopf: Titel und ein Satz links, die Hauptaktion rechts; am Handy direkt unter dem Titel in voller Breite */
.ph-kr { align-items: center; margin-bottom: 18px; }
.ph-kr h1 { margin-bottom: 2px; }
.ph-kr .sub { font-size: var(--fs-base); max-width: 72ch; }
.ph-kr .kr-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.ph-kr .btn-row { flex-wrap: nowrap; }
.ph-kr .kr-more { padding-left: 12px; padding-right: 12px; }
.ph-kr .menu-list { max-height: min(60vh, 420px); overflow-y: auto; }
.kr-classes .sg-opt { text-decoration: none; padding: 8px 16px; font-size: var(--fs-base); }
@media (max-width: 640px) {
  .ph-kr { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .ph-kr .btn-row { width: 100%; }
  .ph-kr .btn-row > .btn, .ph-kr .btn-row > .menu > .btn { min-height: 46px; }
  .ph-kr .btn-row > .btn:not(.secondary), .ph-kr .btn-row > .menu:has(> .btn:not(.secondary)) { flex: 1; order: -1; }
  .ph-kr .btn-row > .menu > .btn:not(.secondary) { width: 100%; }
  .ph-kr .btn-row > .menu:has(> .btn:not(.secondary)) .menu-list { left: 0; }
  .kr-classes { display: flex; }
  .kr-classes .sg-opt { flex: 1; min-height: 44px; display: grid; place-items: center; box-sizing: border-box; }
}

/* Hinweiszeile und Zeichenerklärung über dem Raster */
.kr-guide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; margin: 16px 2px 14px; }
.kr-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: var(--fs-base); font-weight: 600; line-height: 1.4; }
.kr-hint .icon { flex: none; margin-top: 2px; color: var(--accent-ink); }
.kr-guide .kr-legend { margin: 0; gap: 8px 16px; font-size: var(--fs-sm); }
.kr-ladders { display: inline-flex; align-items: center; gap: 6px; flex-basis: 100%; border: 0; background: none; padding: 6px 0; min-height: 36px; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.kr-ladders .icon { flex: none; }
.kr-key { gap: 7px; }
.kr-key i { width: 22px; height: 22px; border-radius: var(--r-sm); display: inline-grid; place-items: center; box-sizing: border-box; flex: none; color: #fff; }
.kr-key i .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.kr-key.self i { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.kr-key.working i { background: var(--sun); border-color: var(--sun); color: #4a3200; }
.kr-key.open i { background: var(--surface); border-color: var(--surface-3); }

/* Kopf einer Rasterkarte */
.kr-card { padding: 22px; }
.kr-head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 16px; margin-bottom: 18px; }
.kr-head .kr-art { grid-row: span 2; align-self: start; width: 64px; height: 48px; }
.kr-headmain { min-width: 0; display: grid; gap: 3px; }
.kr-headmain h2 { font-size: var(--fs-xl); }
.kr-headmain p { max-width: 80ch; line-height: 1.45; }
.kr-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-self: start; }
.kr-st .icon { width: 14px; height: 14px; }
.kr-st.confirmed { background: var(--ok-soft); color: var(--ok); }
.kr-st.self { background: var(--accent-soft); color: var(--accent-ink); }
.kr-st.working { background: var(--warn-soft); color: var(--warn); }
.kr-fold > .kr-head { grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; margin-bottom: 0; }
.kr-fold > .kr-head .kr-art { grid-row: auto; width: 52px; height: 40px; align-self: center; }
.kr-fold > .kr-head .kr-stats { align-self: center; }
.kr-fold[open] > .kr-head { margin-bottom: 16px; }
.kr-title { font-size: var(--fs-md); }
.kr-chev { color: var(--muted); transition: transform .15s; }
.kr-fold[open] > .kr-head .kr-chev { transform: rotate(180deg); }
.kr-fold > .kr-head:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--r-md); }
@media (max-width: 700px) {
  .kr-card { padding: 16px; }
  .kr-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 14px; }
  .kr-head .kr-stats { justify-content: flex-start; }
  .kr-fold > .kr-head { grid-template-columns: minmax(0, 1fr) auto auto; }
  .kr-fold > .kr-head .kr-stats { grid-column: 1 / -1; grid-row: 2; }
}

/* Das Raster: Tabelle mit luftigen Feldern */
.kg { min-width: 0; }
.kg-levels { display: none; }
.kg-table { display: grid; grid-template-columns: minmax(120px, 190px) repeat(var(--cols), minmax(0, 1fr)); gap: 10px; }
.kg.dense .kg-table { grid-template-columns: minmax(110px, 170px) repeat(var(--cols), minmax(0, 1fr)); }
.kg-colhead { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 800; font-size: var(--fs-sm); color: var(--ci, var(--accent)); min-width: 0; }
.kg-colhead > span:last-child { overflow-wrap: break-word; }
.kg-rowhead { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 10px 12px 10px 4px; font-weight: 800; border-right: 3px solid var(--cs, var(--accent-soft)); min-width: 0; }
.kg-rowtitle { overflow-wrap: break-word; line-height: 1.3; }
.kg-row { display: contents; }
.kg-slot { display: flex; min-width: 0; }
.kg-cell { position: relative; flex: 1; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: left; font: inherit; font-size: var(--fs-base); line-height: 1.4; color: var(--text);
  padding: 16px 16px 14px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); }
.kg.dense .kg-cell { font-size: var(--fs-sm); min-height: 96px; padding: 14px 14px 12px; }
.kg-text { overflow-wrap: break-word; }
.kg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; }
.kg-paths { display: inline-flex; align-items: flex-start; gap: 5px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); min-width: 0; }
.kg-paths .icon { margin-top: 1px; }
.kg-paths > span { overflow-wrap: break-word; }
.kg-cell.working { background: var(--warn-soft); border-color: color-mix(in srgb, var(--sun) 75%, transparent); }
.kg-cell.self { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.kg-cell.confirmed { background: var(--ok-soft); border-color: var(--ok-bright); }
.kg-cell.empty { background: transparent; border-style: dashed; min-height: 0; }
.kg-none { display: none; }
.kg-cell.empty.edit { flex-direction: row; align-items: center; justify-content: center; gap: 6px; min-height: 108px; color: var(--muted); font-weight: 700; font-size: var(--fs-sm); }
.kg-cell.quiet { background: transparent; }
.kg-cell.quiet .kg-text { color: var(--muted); }
/* Abzeichen oben rechts; das Wort dazu liest der Screenreader, am Handy steht es sichtbar daneben */
.kg-state { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; }
.kg-state > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kg-state.confirmed { background: var(--ok-bright); }
.kg-state.self { background: var(--accent); color: var(--accent-text); }
.kg-state.working { background: var(--sun); color: #4a3200; }
.kg-state.open { display: none; }
.kg-cell.confirmed .kg-text, .kg-cell.self .kg-text, .kg-cell.working .kg-text { padding-right: 32px; }
/* Antippbare Felder */
button.kg-cell { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.kg-go { position: absolute; right: 12px; bottom: 12px; display: grid; color: var(--accent-ink); opacity: 0; transition: opacity .12s ease, transform .12s ease; }
button.kg-cell:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
button.kg-cell:hover .kg-go, button.kg-cell:focus-visible .kg-go { opacity: 1; transform: translateX(2px); }
button.kg-cell:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
button.kg-cell:active { transform: scale(.99); }
button.kg-cell .kg-foot { padding-right: 22px; }
.kg-heat { flex-wrap: nowrap; gap: 10px; }
.kg-heat .kr-bar { margin: 0; flex: 1; height: 8px; }
.kg-heat .kr-count { white-space: nowrap; font-size: var(--fs-xs); }
.kr-bar i.self { background: var(--accent); }
.kg-rowmenu { margin-left: -8px; }
.kg-rowhead .menu-list { right: auto; left: 0; }
.kr-editor { margin-bottom: 14px; }

/* Schmal (Handy, schmale Spalten): EIN Umschalter für die Niveaustufe, darunter je Bereich ein Feld. Nichts scrollt seitlich. */
.kg.narrow .kg-levels { display: flex; gap: 4px; padding: 4px; margin: 0 0 6px; background: var(--surface-2); border-radius: var(--r-lg); }
.kg-lv { flex: 1 1 0; min-width: 0; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px;
  border: 0; border-radius: var(--r-md); background: none; font: inherit; font-size: var(--fs-sm); font-weight: 800; color: var(--muted); cursor: pointer; }
.kg-lv .kr-step { width: 22px; height: 22px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--muted); }
.kg-lv.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.kg-lv.on .kr-step { background: var(--c, var(--accent)); color: var(--on-c); }
.kg-lv.done .kr-step, .kg-lv.done.on .kr-step { background: var(--ok-bright); color: var(--ok-on); }
.kg-lv.done .kr-step .icon { width: 13px; height: 13px; stroke-width: 3; }
.kg-lv:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.kg-lv-name { overflow-wrap: break-word; line-height: 1.2; }
.kg-levels.all .kg-lv:not(.done) .kr-step { display: none; }
.kg-levels.focus .kg-lv { flex: 0 0 48px; }
.kg-levels.focus .kg-lv.on { flex: 1 1 auto; }
.kg-levels.focus .kg-lv:not(.on) .kg-lv-name { display: none; }
.kg.narrow .kg-table, .kg.narrow.dense .kg-table { display: block; }
.kg.narrow .kg-corner, .kg.narrow .kg-colhead { display: none; }
.kg.narrow .kg-row { display: block; }
.kg.narrow .kg-rowhead { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; border-right: 0; padding: 14px 2px 8px; min-height: 28px; }
.kg.narrow .kg-rowhead .menu-list { left: auto; right: 0; }
.kg.narrow .kg-rowmenu { margin: -8px -6px -8px 0; min-width: 44px; height: 44px; }
.kg.narrow .kg-slot:not(.cur) { display: none; }
.kg.narrow .kg-cell, .kg.narrow.dense .kg-cell { min-height: 0; padding: 14px; font-size: var(--fs-base); }
.kg.narrow button.kg-cell { padding-right: 40px; min-height: 56px; }
.kg.narrow .kg-cell.empty { padding: 12px 14px; }
.kg.narrow .kg-cell.empty.edit { min-height: 56px; padding-right: 14px; }
.kg.narrow .kg-none { display: block; font-size: var(--fs-sm); color: var(--muted); }
.kg.narrow .kg-cell .kg-text { padding-right: 0; }
.kg.narrow .kg-go { right: 12px; top: 50%; bottom: auto; margin-top: -8px; opacity: 1; color: var(--muted); transform: none; }
.kg.narrow button.kg-cell .kg-foot { padding-right: 0; }
.kg.narrow button.kg-cell:hover { transform: none; box-shadow: none; }
.kg.narrow .kg-state { position: static; width: auto; height: auto; display: inline-flex; align-items: center; gap: 5px; background: none; border-radius: 0; font-size: var(--fs-xs); font-weight: 800; }
.kg.narrow .kg-state > span { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
.kg.narrow .kg-state.confirmed { color: var(--ok); }
.kg.narrow .kg-state.self { color: var(--accent-ink); }
.kg.narrow .kg-state.working { color: var(--warn); }
.kg.narrow .kg-state.open { display: inline-flex; color: var(--muted); font-weight: 700; }
.kg.narrow .kg-state.open > i { width: 12px; height: 12px; border-radius: var(--r-xs); border: 1.5px solid currentColor; box-sizing: border-box; opacity: .7; }
/* Leiste je Bereich: auf welchen Stufen ist schon etwas erreicht (Farben wie in der Zeichenerklärung) */
@media (prefers-reduced-motion: no-preference) {
  .kg.narrow .kg-slot.cur > .kg-cell { animation: kg-in .18s ease; }
}
@keyframes kg-in { from { opacity: .4; transform: translateY(3px); } }

/* Schüler:innen: Kopf mit dem nächsten Schritt, darunter je Raster eine Kachel */
.kr-hero { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "intro ring" "next next"; gap: 16px 22px; margin-bottom: 16px; }
.kr-hero .kr-intro { grid-area: intro; }
.kr-hero .kr-intro p { margin-bottom: 0; }
.kr-hero > .ring { grid-area: ring; }
.kr-next { grid-area: next; display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-lg); background: rgba(0,0,0,.18); border: 1px solid rgba(255, 255, 255, .22); }
.kr-next strong { font-size: var(--fs-md); line-height: 1.35; }
.kr-next-from { font-size: var(--fs-sm); font-weight: 600; }
.kr-next-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.kr-next-sub { font-size: var(--fs-sm); font-weight: 600; }
.kr-next.done { display: flex; align-items: center; gap: 10px; }
@media (min-width: 1000px) {
  .kr-hero { grid-template-columns: minmax(0, 1fr) minmax(380px, 1.1fr) auto; grid-template-areas: "intro next ring"; gap: 28px; padding: 26px 28px; }
}
@media (max-width: 600px) {
  .year-hero.kr-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
  .year-hero.kr-hero .ring { display: grid; --size: 64px !important; }
}
.kr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 4px; }
.kr-tile { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; }
.kr-tile:hover { transform: translateY(-2px); border-color: var(--c, var(--accent)); box-shadow: var(--shadow-lg); }
.kr-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kt-body { display: grid; gap: 2px; min-width: 0; }
.kt-name { font-weight: 800; font-size: var(--fs-md); line-height: 1.25; overflow-wrap: break-word; }
.kt-count { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.kt-count b { color: var(--text); font-weight: 800; }
.kt-next { font-size: var(--fs-xs); font-weight: 700; color: var(--ci, var(--accent)); overflow-wrap: break-word; }
.kt-go { color: var(--muted); }
@media (max-width: 600px) {
  .kr-tiles { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .kr-tile { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 8px; padding: 12px 8px; border-radius: var(--r-lg); align-content: start; }
  .kt-name { font-size: var(--fs-sm); }
  .kt-count { font-size: var(--fs-xs); }
  .kt-long, .kt-next, .kt-go { display: none; }
}

/* Übersicht der Raster (Lehrkräfte) */
.grid.kr-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.kr-list > .tile { max-width: 560px; }
.kr-list .tile > .meta:first-of-type { margin-top: 14px; }
.kr-list .tile h3 { margin-bottom: 8px; }
.kr-list .tile-foot { justify-content: space-between; margin-top: auto; padding-top: 14px; }
.kr-open { color: var(--accent-ink); font-weight: 700; }

/* Editor: neuer Bereich als ruhige Zeile, Einstellungen als Raster */
.kr-addrow { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; }
.kr-addrow input { margin: 0; flex: 0 1 340px; min-width: 0; }
.kr-settings > summary { min-height: 28px; }
.kr-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, .7fr); gap: 16px; max-width: 980px; align-items: start; }
.kr-form .kf-wide { grid-column: 1 / -1; }
.kr-form .kf-check { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-size: var(--fs-base); font-weight: 600; }
.kr-form .kf-groups { border: 0; padding: 0; margin: 0; min-width: 0; }
.kr-form .kf-groups legend { font-weight: 600; font-size: var(--fs-sm); margin-bottom: 8px; padding: 0; }
.kr-form .kf-group-list { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.kr-form .kf-group-list .kf-check { font-weight: 500; }
@media (max-width: 700px) {
  .kr-addrow input { flex: 1 1 auto; }
  .kr-addrow .btn { min-height: 46px; }
  .kr-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kr-form .kf-title, .kr-form .kf-subject { grid-column: 1 / -1; }
}

/* Klassenstand: Liste der Schüler:innen, auf breiten Schirmen zweispaltig */
.kr-students { padding: 6px 16px; column-gap: 36px; }
.kr-student { grid-template-columns: 36px minmax(120px, 200px) minmax(60px, 1fr) auto 16px; gap: 12px; padding: 9px 0; min-height: 44px; box-sizing: border-box; border-radius: 0; }
.kr-student .who { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-xs); background: var(--surface-2); color: var(--muted); }
.kr-student strong { overflow-wrap: break-word; }
.kr-student .kr-bar.wide { max-width: none; min-width: 0; margin: 0; }
.kr-student-n { white-space: nowrap; text-align: right; }
.kr-student:hover strong { color: var(--accent-ink); }
@media (min-width: 1300px) {
  .kr-students { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kr-student:nth-child(2) { border-top: 0; }
}
@media (max-width: 700px) {
  .kr-student { grid-template-columns: 36px minmax(0, 1fr) auto 16px; gap: 4px 12px; padding: 10px 0; }
  .kr-student .kr-bar, .kr-student .muted { grid-column: auto; }
  .kr-student .kr-bar.wide { grid-column: 2 / 4; grid-row: 2; }
  .kr-student > .icon { grid-row: 1 / span 2; grid-column: 4; align-self: center; }
}
/* Wer steht wo (Dialog im Klassenstand) */
.kr-who-group + .kr-who-group { margin-top: 16px; }
.kr-who-group h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); margin-bottom: 8px; }
.kr-who-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; }
.kr-who-list a { display: flex; align-items: center; min-height: 36px; padding: 2px 8px; margin: 0 -8px; border-radius: var(--r-sm); color: var(--text); font-weight: 600; text-decoration: none; }
.kr-who-list a:hover { background: var(--surface-2); color: var(--accent-ink); }
@media (max-width: 640px) { .kr-who-list a { min-height: 44px; } }
/* Iteration 2 · raster: die allgemeine Klasse .narrow (Anmeldeseite) darf das Raster nicht einrücken */
.kg.narrow { max-width: none; margin: 0; }
.kg.narrow .kg-state.open > i { display: none; }
.kg-cell { min-height: 98px; }
@media (max-width: 600px) {
  .kr-guide { margin: 14px 2px 12px; gap: 10px; }
  .kr-guide .kr-legend { gap: 6px 11px; }
  .kr-key { gap: 6px; }
  .kr-key i { width: 20px; height: 20px; border-radius: var(--r-sm); }
}
/* Iteration 2 · raster: Feinschliff (Zeichenerklärung einzeilig am Handy, Stufenleiste deutlicher, Editorzeilen, Klassenliste am Handy) */
.kk-short { display: none; }
.kr-key.open i { border-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.kg.narrow.dense button.kg-cell { padding-right: 40px; }
.kg:not(.narrow) .kg-rowhead:has(.kg-rowmenu) { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding-right: 6px; }
.kg:not(.narrow) .kg-rowmenu { margin: 0; color: var(--muted); }
.kg:not(.narrow) .kg-rowhead .menu-list { left: auto; right: 0; }
button.kg-cell:hover { background-image: linear-gradient(color-mix(in srgb, var(--accent) 7%, transparent), color-mix(in srgb, var(--accent) 7%, transparent)); }
@media (max-width: 600px) {
  .kk-long { display: none; }
  .kk-short { display: inline; }
  .kr-addrow { flex-direction: column; align-items: stretch; gap: 8px; }
  .kr-addrow input { flex: none; min-height: 46px; }
  .kr-student { grid-template-columns: 36px minmax(0, 1fr) auto 16px; gap: 6px 12px; }
  .kr-student strong { grid-column: 2 / 4; grid-row: 1; }
  .kr-student .kr-bar.wide { grid-column: 2; grid-row: 2; }
  .kr-student .kr-student-n { grid-column: 3; grid-row: 2; }
  .kr-student .who { grid-row: 1 / span 2; }
}

/* Iteration 2 · wochenplan */
/* Kopf: Woche wechseln, Titel und ein Satz links, Wochenziel rechts, Ring nur wenn etwas geplant ist */
.wp-hero { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px) auto; gap: 18px 28px; padding: 22px 26px; margin-bottom: 16px; }
.wp-hero.no-ring { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); }
.wp-hero h1 { margin: 10px 0 4px; }
.wp-hero .wh-main p { margin: 0; max-width: 60ch; }
.wp-hero .goal-box { max-width: none; align-self: center; }
.wp-hero .goal-show { font-size: var(--fs-md); line-height: 1.3; }
.wp-hero .wh-ring .ring-num { font-size: var(--fs-xl); }
.wp-weeknav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-weeknav .icon-btn.on-dark { min-width: 40px; height: 40px; }
.wp-weeknav .icon-btn.on-dark:hover { background: rgba(255,255,255,.26); color: #fff; }
.wp-week { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 0 4px; font-size: var(--fs-sm); font-weight: 700; }
.wp-week strong { font-size: var(--fs-md); font-weight: 800; }
.wp-goal-edit { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--r-md); background: var(--on-chip); box-shadow: inset 0 0 0 1px var(--on-ring); color: var(--on-c); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; flex: none; }
.wp-goal-edit:hover { background: rgba(0,0,0,.3); }
.wp-goal-edit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.wp-back { margin-left: 4px; }

/* Einstieg in eine leere Woche */
.wp-start { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 16px 18px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: none; }
.wp-start > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wp-start strong { font-size: var(--fs-md); }
.wp-start p { color: var(--muted); font-size: var(--fs-base); }
.wp-start-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); flex: none; }
.wp-start-ic .icon { stroke: var(--accent); }

/* Woche */
.wp-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.wp-tabs { display: none; }
.wp-days { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.wp-days .day-col { min-height: 230px; padding: 12px; }
.wp-days.wp-blank .day-col { min-height: 150px; }
.wp-days .day-col header { align-items: center; padding: 2px 2px 10px; min-height: 26px; }
.wp-days .dc-wd { font-size: var(--fs-md); }
.wp-days .dc-count { display: inline-flex; align-items: center; gap: 3px; }
.wp-days .dc-count .icon { width: 14px; height: 14px; stroke-width: 3; }
.wp-days .day-col.today { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.wp-days .day-col.today header .dc-wd { color: var(--accent-ink); }
.wp-days .day-empty { margin: 0; padding: 14px 10px; border: 1.5px dashed var(--line); border-radius: var(--r-md); text-align: center; font-style: normal; font-size: var(--fs-sm); color: var(--muted); }
.wp-days .day-col.today .day-empty { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); font-weight: 600; }
.wp-days .day-add { box-sizing: border-box; min-height: 36px; margin-top: 10px; align-self: flex-start; }
.wp-days .wi { padding: 10px 34px 10px 10px; }
.wp-days .wi > .menu { top: 3px; right: 3px; }
.wp-days .wi-more { min-width: 30px; height: 30px; border-radius: var(--r-sm); }
.wp-days .wi-more:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.wp-days .wi-tag { margin-left: 0; margin-top: 3px; }
.wp-days .wi-meta { flex-wrap: wrap; gap: 0 6px; align-items: center; }
.wp-days .todo-form input { min-height: 40px; }

/* Noch einplanen: ein Knopf je Aufgabe statt fünf */
.wp-tray { padding: 18px 20px 20px; margin: 0; scroll-margin-top: 84px; }
.wp-tray .tray-head h2 { font-size: var(--fs-lg); }
.wp-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; margin-top: 16px; align-items: start; }
.wp-path.extra { display: none; }
.wp-tray.all-paths .wp-path.extra { display: block; }
.wp-path .tp-head { margin-bottom: 8px; min-height: 28px; }
.wp-path .tp-head strong { font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-n { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); white-space: nowrap; }
.wp-path ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wp-task { display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 12px; border-radius: var(--r-md); background: var(--surface-2); border-left: 4px solid var(--c); cursor: grab; }
.wp-task.dragging { opacity: .45; }
.wp-task.more { display: none; }
.wp-path.all .wp-task.more { display: flex; }
.wp-task .tt-main { flex: 1; min-width: 0; }
.wp-task .tt-title { font-size: var(--fs-base); line-height: 1.3; }
.wp-meta { font-size: var(--fs-xs); color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.wp-plan { flex: none; gap: 4px; min-height: 36px; padding: 0 12px 0 9px; }
.wp-plan .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.wp-plan:focus-visible { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
@media (hover: hover) { .wp-task:hover .wp-plan { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } }
.wp-task .menu-list { right: 0; left: auto; min-width: 200px; }
.wp-path .tray-more { display: inline-block; margin-top: 6px; }
.wp-allpaths { margin-top: 14px; }
.wp-agreements { margin-top: 16px; }
.wp-agreements > .card { margin: 0; }
.wp-layout + .week-review { margin-top: 16px; }

@media (max-width: 1250px) {
  .wp-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wp-hero, .wp-hero.no-ring { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
  .wp-hero .wh-ring { display: none; }
}

/* Handy und kleines Tablet: Tagesleiste, ein Tag auf einmal, alles mindestens 44px hoch */
@media (max-width: 900px) {
  .wp-hero, .wp-hero.no-ring { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 16px 18px; }
  .wp-hero h1 { margin-top: 12px; }
  .wp-weeknav { gap: 6px; flex-wrap: nowrap; }
  .wp-weeknav .icon-btn.on-dark { min-width: 44px; height: 44px; }
  .wp-week { flex: 1; min-width: 0; flex-direction: column; align-items: center; text-align: center; gap: 0; }
  .wp-back { min-height: 44px; margin: 0; }
  .wp-goal-edit { min-height: 44px; }
  .wp-hero .goal-edit .btn { min-height: 44px; }
  .wp-start { flex-wrap: wrap; }
  .wp-start .btn { width: 100%; min-height: 46px; }
  .wp-layout { gap: 12px; }
  .wp-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .wp-tab { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 1px; min-height: 64px; padding: 7px 2px 6px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); -webkit-tap-highlight-color: transparent; }
  .wp-tab .wt-wd { font-size: var(--fs-xs); font-weight: 700; }
  .wp-tab .wt-num { font-size: var(--fs-lg); font-weight: 800; line-height: 1.1; color: var(--text); }
  .wp-tab .wt-mark { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 800; line-height: 1; }
  .wp-tab .wt-mark.open { background: var(--surface-3); color: var(--text); }
  .wp-tab .wt-mark.ok { background: var(--ok-soft); color: var(--ok); }
  .wp-tab .wt-mark .icon { width: 12px; height: 12px; stroke-width: 3.2; }
  .wp-tab.today { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
  .wp-tab.today .wt-wd { color: var(--accent-ink); }
  .wp-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
  .wp-tab[aria-selected="true"] .wt-wd, .wp-tab[aria-selected="true"] .wt-num { color: var(--accent-text); }
  .wp-tab[aria-selected="true"] .wt-mark.ok { color: var(--accent-text); }
  .wp-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .wp-days { grid-template-columns: minmax(0, 1fr); }
  .wp-days .day-col { display: none; min-height: 0; padding: 14px; }
  .wp-days .day-col.sel { display: flex; }
  .wp-days.wp-blank .day-col { min-height: 0; }
  .wp-days .dc-wd { font-size: var(--fs-md); }
  .wp-days .wi { padding: 6px 46px 6px 4px; gap: 2px; align-items: center; min-height: 56px; box-sizing: border-box; }
  .wp-days .wi-check { width: 44px; height: 44px; border: 0; background: none; margin: 0; position: relative; }
  .wp-days .wi-check::before { content: ""; position: absolute; inset: 9px; border-radius: var(--r-sm); border: 2px solid color-mix(in srgb, var(--c, var(--muted)) 60%, var(--line)); background: var(--surface); }
  .wp-days .wi-check.on { background: none; }
  .wp-days .wi-check.on::before { background: var(--ok-bright); border-color: var(--ok-bright); }
  .wp-days .wi-check .icon { position: relative; }
  .wp-days .wi-title { font-size: var(--fs-base); }
  .wp-days .wi > .menu { top: 50%; right: 2px; transform: translateY(-50%); }
  .wp-days .wi-more { min-width: 44px; height: 44px; }
  .wp-days .day-add { min-height: 44px; padding: 0 14px 0 10px; margin-top: 10px; border-radius: var(--r-md); align-self: stretch; justify-content: center; }
  .wp-days .todo-form { grid-template-columns: minmax(0, 1fr) auto; }
  .wp-days .todo-form input { min-height: 44px; font-size: var(--fs-md); }
  .wp-days .todo-form .btn { min-height: 44px; }
  .wp-tray { padding: 16px 14px 18px; }
  .wp-paths { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .wp-path:nth-child(n+3) { display: none; }
  .wp-tray.all-paths .wp-path:nth-child(n+3) { display: block; }
  .wp-task { padding: 6px 2px 6px 12px; min-height: 56px; box-sizing: border-box; gap: 4px; }
  .wp-plan { min-height: 44px; padding: 0 14px 0 10px; }
  .wp-path .tray-more { box-sizing: border-box; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
  .wp-allpaths { width: 100%; min-height: 44px; }
}
/* Iteration 2 · wochenplan: Feinschliff */
.wp-days .day-col.today { padding: 11px; }
.wp-allpaths { margin-left: -12px; }
@media (max-width: 900px) { .wp-days .day-col.today { padding: 13px; } .wp-allpaths { margin-left: 0; } }
/* Iteration 2 · wochenplan: leere Woche ohne fünfmal "noch frei", Kopf ohne Ziel, Titel-Link am Handy 44px */
.wp-hero.no-goal, .wp-hero.no-goal.no-ring { grid-template-columns: minmax(0, 1fr) auto; }
.wp-hero.no-goal.no-ring { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) {
  .wp-days.wp-blank .day-empty { display: none; }
  .wp-days.wp-blank .day-col { min-height: 132px; }
  .wp-days.wp-blank .day-add { margin-top: 0; }
}
@media (max-width: 900px) {
  .wp-hero.has-back .wp-kw { display: none; }
  .wp-days .wi-meta { position: relative; pointer-events: none; }
}
/* Iteration 2 · wochenplan: schmale Spalten (901 bis 1250px) ruhig halten, zwei Lernpfade vor "Alle anzeigen" */
.wp-days .wi-meta { display: block; }
.wp-days .wi-tag { display: table; margin: 4px 0 0; }
@media (min-width: 1251px) { .wp-allpaths.narrow-only { display: none; } }
@media (max-width: 1250px) {
  .wp-path:nth-child(n+3) { display: none; }
  .wp-tray.all-paths .wp-path:nth-child(n+3) { display: block; }
}
@media (max-width: 1250px) and (min-width: 901px) {
  .wp-days { gap: 10px; }
  .wp-days .day-col { padding: 10px; }
  .wp-days .day-col.today { padding: 9px; }
  .wp-days .dc-date { display: none; }
}
@media (max-width: 900px) { .wp-days a.wi-title { padding: 13px 0; margin: -10px 0 -12px; } }
/* Iteration 2 · wochenplan: sehr schmale Handys, Rückblick mit drei gleich breiten Antworten */
.wp-path { min-width: 0; }
.wp-path ul { grid-template-columns: minmax(0, 1fr); }
.wp-task .tt-main { display: grid; gap: 1px; }
.week-review .reach + label { display: block; margin-top: 16px; }
@media (max-width: 600px) {
  .week-review .reach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-review .reach .pk { box-sizing: border-box; flex-direction: column; gap: 4px; padding: 10px 4px; text-align: center; font-size: var(--fs-sm); }
  .week-review .btn-row .btn { width: 100%; min-height: 46px; }
}
@media (max-width: 360px) {
  .wp-plan { padding: 0 10px 0 8px; }
  .wp-task { padding-left: 10px; }
}
.wp-task .tt-title { overflow-wrap: break-word; }
.wp-task .tt-title { hyphens: auto; }

/* Iteration 2 · lernjahr */
/* Handy-Reise: jetzt und als Nächstes offen, Späteres und Vergangenes je in einer Falte */
.yj-none { margin: 6px 0 0 44px; color: var(--muted); font-size: var(--fs-sm); }
.yj-past > summary.yj-mlabel, .yj-later > summary.yj-mlabel { list-style: none; cursor: pointer; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-height: 44px; margin-left: 44px; padding: 6px 10px 6px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--text); }
.yj-later > summary::-webkit-details-marker { display: none; }
.yj-past > summary.yj-mlabel::before, .yj-later > summary.yj-mlabel::before { left: -30px; }
.yj-lt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yj-past > summary small, .yj-later > summary small { flex: none; background: var(--surface); }
.yj-past > summary .icon, .yj-later > summary .icon { flex: none; color: var(--muted); transition: transform .2s; }
.yj-later[open] > summary .icon { transform: rotate(180deg); }
.yj-later-list { list-style: none; margin: 14px 0 0; padding: 0; }
.yj-past > .yj-items { margin-top: 12px; }
.yj-month.later { padding-bottom: 2px; }
.yj-month.later:last-child, .yt-journey > .yj-month:last-child { padding-bottom: 0; }
.yj-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; hyphens: manual; overflow-wrap: break-word; line-height: 1.3; }
.yj-text small { hyphens: manual; line-height: 1.35; }
.yj-item { min-height: 44px; }

/* Lernjahre der Lehrkraft: Kopfzeile, große Karte mit echter Zeitleiste */
.years-head .sub { max-width: 72ch; }
.year-cards.big { grid-template-columns: minmax(0, 1fr); }
.year-card.big { padding: 22px 24px; }
.year-card .yc-title { min-width: 0; }
.year-card .yc-title h2 { font-size: var(--fs-xl); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.year-card .yc-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.year-card .yc-open { pointer-events: none; white-space: nowrap; gap: 4px; }
.year-card:hover .yc-open { border-color: var(--accent); }
.year-card .yc-status { margin: 14px 0 0; }
.year-card .yc-full { display: none; margin-top: 16px; }
.year-card .yc-full .yt-head { position: static; }
.year-card .yc-empty { margin: 14px 0 0; }
.yc-now { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.yc-now p { display: grid; gap: 2px; min-width: 0; }
.yc-k { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.yc-v { font-weight: 650; font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.years-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 14px; }
/* Mini-Zeitleiste: Fachname einzeilig, Zeilen hoch genug für das Etikett */
.yt-gantt.mini .yt-lane { grid-auto-rows: 16px; align-items: center; }
.yt-gantt.mini .yt-bar { height: 9px; align-self: center; }
.yt-gantt.mini .yt-subj strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
@media (min-width: 1101px) {
  .year-card.big .yc-full { display: block; }
  .year-card.big .yc-mini { display: none; }
}
@media (max-width: 760px) {
  .year-card.big { padding: 16px; }
  .yc-head { gap: 12px; }
  .year-card .yc-open { display: none; }
  .yc-now { grid-template-columns: minmax(0, 1fr); }
  .yc-v { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .yt-gantt.mini .yt-subj strong { white-space: nowrap; overflow-wrap: normal; }
  .years-foot .yt-legend { display: none; }
  .year-edit-head > .btn, .years-head > .btn { min-height: 44px; }
}

/* Eltern: Kind wählen, Zusammenfassung zuerst */
.parent-head { align-items: flex-end; margin-bottom: 16px; }
.parent-head h1 { margin-bottom: 2px; }
.parent-head .ph-text { order: -1; } /* Tastaturreihenfolge: Kind wechseln zuerst im DOM, am Desktop steht der Titel links */
.kid-pick { display: flex; align-items: center; gap: 10px; }
.kp-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); white-space: nowrap; }
.kid-switch { border: 1px solid var(--line); }
.kid-switch button { min-height: 44px; padding: 5px 18px 5px 6px; font-size: var(--fs-base); }
.kid-switch button .avatar.sm { width: 32px; height: 32px; }
.kid-switch button.on { background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow); }
.kid-switch button:not(.on):hover { background: var(--surface); color: var(--text); }
.parent-sum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 22px; align-items: center; padding: 24px 28px; border-left: 6px solid var(--ok-bright); margin-bottom: 0; }
.parent-sum.warn { border-left-color: var(--warn); }
.parent-sum.note { border-left-color: var(--accent); }
.ps-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); align-self: start; }
.parent-sum.warn .ps-ic { background: var(--warn-soft); color: var(--warn); }
.parent-sum.note .ps-ic { background: var(--accent-soft); color: var(--accent-ink); }
.ps-title { font-size: var(--fs-2xl); line-height: 1.25; margin: 0 0 6px; }
.ps-text { margin: 0; font-size: var(--fs-md); line-height: 1.55; max-width: 72ch; }
.ps-watch { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.ps-watch li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.ps-watch li .icon { flex: none; margin-top: 3px; color: var(--warn); }
.ps-tip { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; max-width: 72ch; }
.ps-tip .icon { flex: none; margin-top: 2px; }
.ps-ring { display: grid; justify-items: center; gap: 6px; width: 120px; text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); line-height: 1.3; }
.parent-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.parent-main, .parent-side { display: grid; gap: 16px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.parent-cols .card  { margin: 0; }
.parent-work h3 { margin-bottom: 14px; }
.pw-list { list-style: none; margin: 0; padding: 0; }
.pw-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-radius: 0; }
.pw-row:first-child { border-top: 0; padding-top: 0; }
.pw-row.flash { animation: flash-step 1.6s ease-out; }
.pw-art { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--cs); color: var(--c); overflow: hidden; }
.pw-art .art { width: 38px; height: 30px; }
.pw-main { display: grid; gap: 2px; min-width: 0; }
.pw-main strong, .pw-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-bar { display: block; height: 6px; margin-top: 5px; border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.pw-bar i { display: block; height: 100%; min-width: 4px; border-radius: var(--r-sm); background: var(--c); }
.pw-next { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.pw-next .icon { flex: none; margin-top: 2px; }
.pw-next strong { color: var(--text); }
.parent-auto > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 44px; }
.parent-auto > summary::-webkit-details-marker { display: none; }
.pa-main { display: grid; min-width: 0; }
.pa-main strong { font-size: var(--fs-md); }
.pa-chev { color: var(--muted); transition: transform .2s; }
.parent-auto[open] .pa-chev { transform: rotate(180deg); }
.parent-auto > p { margin: 14px 0 0; }
.parent-auto h4 { margin: 14px 0 6px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.parent-auto .rd-list li .icon { color: var(--accent-ink); }
.parent-foot { margin-top: 26px; }
.recent-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--accent-ink); font-weight: 700; font-size: var(--fs-sm); }
.recent-more > summary::-webkit-details-marker { display: none; }
.recent-more > summary .icon { transition: transform .2s; }
.recent-more[open] > summary .icon { transform: rotate(180deg); }
.recent-more[open] .rm-open, .recent-more:not([open]) .rm-close { display: none; }
.recent-more { margin-bottom: -10px; }
.recent-more[open] { margin-bottom: 0; }
.recent h3 { margin-bottom: 14px; }

/* Schülerdetail für Coach und Lehrkraft: erst „Was braucht sie oder er jetzt“, dann Details in zwei Spalten */
.page-head.student-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin: 4px 0 18px; }
.sh-text { min-width: 0; }
.sh-meta { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 2px 0 0; }
.sh-meta span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-meta span + span::before { content: '· '; }
.sh-actions { display: flex; align-items: center; gap: 8px; }
.sh-actions .btn { white-space: nowrap; }
.sd-more { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); }
.need-card { border-left: 6px solid var(--accent); }
.need-card.calm { border-left-color: var(--ok-bright); }
.need-head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.need-head h2 { font-size: var(--fs-xl); }
.need-list { list-style: none; margin: 0; padding: 0; }
.need { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.need:first-child { border-top: 0; }
.need-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.need.late .need-ic { background: var(--danger-soft); color: var(--danger); }
.need.warn .need-ic { background: var(--warn-soft); color: var(--warn); }
.need-main { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }
.need-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need .btn { white-space: nowrap; }
.need-foot { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
@media (min-width: 1280px) { .sd-subjects { gap: 0 16px; } }
@media (max-width: 1100px) {
  .parent-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .parent-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .kid-pick { order: -1; }
  .parent-head .ph-text { order: 0; }
  .kid-switch { flex: 1 1 auto; }
  .kid-switch button { flex: 1 1 0; justify-content: center; min-width: 0; }
  .parent-sum { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; gap: 10px; }
  .ps-ic { width: 44px; height: 44px; }
  .ps-title { font-size: var(--fs-xl); }
  .ps-ring { display: none; }
  .pw-row { grid-template-columns: 44px minmax(0, 1fr); }
  .pw-row > .chip { grid-column: 2; justify-self: start; }
  .page-head.student-head { grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
  .student-head .avatar.lg { width: 52px; height: 52px; font-size: var(--fs-lg); }
  .sh-meta { flex-direction: column; }
  .sh-meta span + span::before { content: none; }
  .sh-actions { grid-column: 1 / -1; }
  .sh-actions .btn { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  .sh-actions .menu:only-child { margin-left: auto; }
  .need { grid-template-columns: 36px minmax(0, 1fr); }
  .need .btn { grid-column: 2; justify-self: start; min-height: 44px; }
  .need-main .small { white-space: normal; }
}

/* Iteration 2 · coaching */
/* Wochenübersicht: drei Stapel (Gespräch fällig, Auffällig, Läuft) statt einer langen Liste */
.cw-top { align-items: center; margin-bottom: 14px; }
.cw-top .week-nav.compact { margin: 0; }
.cc-kpis { margin-bottom: 18px; }
.cc-past { margin: -6px 0 14px; }
.cc-board { display: grid; gap: 22px; align-items: start; }
.cc-group { min-width: 0; }
.cc-title.section-title { margin: 0 0 10px; gap: 4px 8px; flex-wrap: wrap; }
.cc-title .count-pill { margin-left: 0; }
.cc-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); flex: none; }
.cc-group.due .cc-ic { background: var(--accent); color: var(--accent-text); }
.cc-group.flagged .cc-ic { background: var(--warn-soft); color: var(--warn); }
.cc-group.calm .cc-ic { background: var(--ok-soft); color: var(--ok); }
.cc-group.due .cc-title { color: var(--text); }
.cc-sub { margin-left: auto; min-width: 0; text-align: right; text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); font-weight: 600; white-space: normal; }
.cc-cards { display: grid; gap: 10px; }
.cc-none { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.cc-card { display: grid; gap: 8px; min-width: 0; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow); align-content: start; }
.cc-card.due { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cc-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-md); }
.cc-who .who { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: var(--fs-sm); flex: none; }
.cc-card.due .cc-who .who { background: var(--accent); color: var(--accent-text); }
.cc-name { display: grid; min-width: 0; line-height: 1.3; }
.cc-name strong { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-name .muted { font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-who:hover strong { color: var(--accent-ink); }
.cc-goal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: var(--fs-base); font-weight: 600; line-height: 1.35; }
.cc-goal > .icon { color: var(--muted); flex: none; }
.cc-goal > span:not(.chip) { flex: 1 1 0; min-width: 0; }
.cc-refl { margin: -2px 0 0; font-size: var(--fs-sm); color: var(--muted); font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-meters { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; min-height: 22px; }
.cc-meters:empty { display: none; }
.cc-meter { display: inline-flex; align-items: center; gap: 8px; }
.cc-lbl { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); }
.cc-meter .plan-bar { width: 56px; }
.cc-chips { gap: 5px; }
.cc-chips .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; }
.cc-chips .chip .icon { vertical-align: -3px; margin-right: 4px; }
.cc-note:empty { display: none; }
.cc-note-text { margin: 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-note-lbl { font-weight: 700; color: var(--muted); }
.cc-note-edit { display: flex; gap: 6px; align-items: center; }
.cc-note-edit input { flex: 1; min-width: 0; margin: 0; padding: 8px 12px; }
.cc-note-hint { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.cc-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.cc-acts .cc-note-btn:hover { color: var(--accent-ink); }
.cc-acts .cc-talk { margin-left: auto; }
@media (min-width: 1250px) {
  .cc-board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .cc-group { padding: 14px; border-radius: var(--r-xl); background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
}
@media (min-width: 700px) and (max-width: 1249px) {
  .cc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cw-top { display: grid; gap: 10px; }
  .cw-top .week-nav.compact { justify-content: flex-start; }
  .cw-top .week-nav.compact .icon-btn { min-width: 44px; height: 44px; }
  .cc-acts .btn { min-height: 44px; }
  .cc-card.due .cc-acts { flex-wrap: wrap-reverse; }
  .cc-card.due .cc-talk { flex: 1 1 100%; justify-content: center; }
  .cc-who { min-height: 44px; }
  .cc-note-edit .btn, .cc-note-edit .icon-btn { min-height: 44px; min-width: 44px; }
  .cc-note-edit input { min-height: 44px; }
}
@media (max-width: 600px) {
  .cc-kpis .kpi:last-child:nth-child(odd), .kpi-row.cc-kpis .kpi:last-child:nth-child(odd) { grid-column: auto; }
}
/* Iteration 2 · coaching: eigene Klassennamen (is-due, g-*), Kommentar sauber auf zwei Zeilen */
.cc-group.g-due .cc-ic { background: var(--accent); color: var(--accent-text); }
.cc-group.g-flagged .cc-ic { background: var(--warn-soft); color: var(--warn); }
.cc-group.g-calm .cc-ic { background: var(--ok-soft); color: var(--ok); }
.cc-group.g-due .cc-title { color: var(--text); }
.cc-card.is-due { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cc-card.is-due .cc-who .who { background: var(--accent); color: var(--accent-text); }
.cc-note-text { display: block; overflow: visible; }
.cc-note-text p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) {
  .cc-card.is-due .cc-talk { justify-content: center; }
}
/* Iteration 2 · coaching: Marken bleiben einzeilig (lange Hinweise kürzen sich), Hauptaktion am Handy neben dem Kommentar */
.cc-chips { flex-wrap: nowrap; min-width: 0; }
.cc-chips .chip { flex: 0 1 auto; }
.cc-chips .chip.info, .cc-chips .chip:last-child:not(:first-child).soft { flex: none; }
@media (max-width: 860px) {
  .cc-card.is-due .cc-acts { flex-wrap: nowrap; }
}
/* Iteration 2 · lernjahr: Feinschliff nach dem ersten Blick */
.yt-bar .yt-t { overflow-wrap: break-word; }
.yt-bar.one:not(.wide).overdue .yt-ic { display: none; }
.yc-full .yt-bar.one:not(.wide) { font-size: var(--fs-2xs); padding: 2px 5px 2px 6px; }
.yj-past > summary.yj-mlabel, .yj-later > summary.yj-mlabel { font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .year-card .yt-gantt.mini { --lw: 134px; }
  .all-paths > summary { flex-wrap: nowrap; min-height: 44px; }
  .all-paths > summary .muted.small { display: none; }
  .pw-main .small { white-space: normal; }
  .page-head.student-head:has(.sh-actions > .menu:only-child) { grid-template-columns: auto minmax(0, 1fr) auto; }
  .page-head.student-head:has(.sh-actions > .menu:only-child) .sh-actions { grid-column: auto; }
}
/* Iteration 2 · lernjahr: Speichern schwebt, sobald es etwas zu speichern gibt (sonst ruht es in der Kopfzeile) */
.year-edit-head > .btn:not(:disabled) { position: fixed; right: 32px; bottom: 28px; z-index: 40; box-shadow: var(--shadow-lg); min-height: 48px; padding-inline: 22px; }
@media (max-width: 760px) { .year-edit-head > .btn:not(:disabled) { right: 16px; bottom: 96px; } }
/* Iteration 2 · coaching: Gesprächsseite (Kontext links, Formular rechts; am Handy erst Kurzfassung, dann Formular mit haftender Speicherleiste) */
.tk-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.tk-top .tk-head { margin: 4px 0 0; min-width: 0; flex: 1 1 420px; }
.tk-top-acts { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.tk-state { margin-top: 8px; }
.tk-grid { grid-template-columns: minmax(0, 1.2fr) minmax(380px, 1fr); grid-template-areas: "ctx form" "hist form"; grid-template-rows: auto 1fr; margin-top: 18px; }
.tk-grid.no-history { grid-template-areas: "ctx form"; grid-template-rows: auto; }
.tk-grid > .card { margin: 0; min-width: 0; }
.tk-grid > .tk-since { grid-area: ctx; } .tk-grid > .tk-talk { grid-area: form; } .tk-grid > .tk-history { grid-area: hist; }
.tk-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.tk-card-head .icon { vertical-align: -3px; }
.tk-flags { margin-top: 10px; }
.tk-sec { margin-top: 20px; min-width: 0; }
.tk-since .tk-sec h3, .tk-talk .tk-sec h3, .tk-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-base); font-weight: 800; color: var(--text); }
.tk-h3-hint { margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-align: right; }
.tk-done { margin-top: 14px; }
.tk-problems { margin: 0; gap: 0; }
.tk-problems li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.tk-problems li strong { font-weight: 600; font-size: var(--fs-base); }
.tk-problems li .muted { font-size: var(--fs-xs); }
.tk-goal { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; }
.tk-goal .icon { flex: none; margin-top: 3px; color: var(--muted); }
.tk-week:last-child { padding-bottom: 0; }
.tk-more > summary { list-style: none; cursor: pointer; }
.tk-more > summary::-webkit-details-marker { display: none; }
.tk-q .q { gap: 4px; }
.tk-q .q .icon { width: 14px; height: 14px; }
.tk-talk textarea { margin: 0; }
.new-ag { grid-template-columns: minmax(0, 1fr) auto 150px; align-items: center; }
.new-ag input { margin: 0; }
.tk-add { margin: 6px 0 0 -8px; }
.tk-talk .tk-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.tk-dates .field { margin: 0; }
.tk-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.tk-save .error { flex: 1 1 100%; margin: 0; }
.tk-donesince { margin-top: 10px; }
.tk-s-head { justify-content: space-between; flex-wrap: nowrap; }
.tk-s-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
.tk-sessions { margin-top: 12px; }
.tk-sessions > li:last-child { padding-bottom: 0; }
@media (min-width: 961px) {
  .tk-more > summary { display: none; }
}
@media (max-width: 960px) {
  .tk-grid, .tk-grid.no-history { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ctx" "form" "hist"; grid-template-rows: auto; }
  .tk-grid > .tk-talk { order: 0; }
  .tk-more > summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: 12px; padding: 0 12px; border-radius: var(--r-md); background: var(--surface-2); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; }
  .tk-more[open] > summary .tk-more-closed, .tk-more:not([open]) > summary .tk-more-open { display: none; }
  .tk-more[open] > summary .icon { transform: rotate(180deg); }
  .tk-save { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 5; margin: 18px -10px -10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
  .tk-save .btn { flex: 1; justify-content: center; min-height: 48px; }
  .tk-save .error { padding-inline: 8px; }
}
@media (max-width: 600px) {
  .tk-top-acts { width: 100%; margin-top: 0; }
  .tk-top-acts .btn { min-height: 44px; }
  .tk-top-acts .btn.ghost { margin-left: -8px; order: 2; }
  .tk-q { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px !important; padding-inline: 16px; }
  .tk-q::-webkit-scrollbar { display: none; }
  .tk-q .q { white-space: nowrap; min-height: 44px; padding-inline: 14px; flex: none; }
  .new-ag { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding-bottom: 6px; }
  .new-ag .na-text { grid-column: 1 / -1; }
  .ag-list.coach li label { min-height: 44px; }
  .ag-list.coach li .icon-btn { min-width: 44px; height: 44px; }
  .tk-add, .tk-s-head .btn { min-height: 44px; }
  .tk-h3-hint { flex: 1 1 100%; margin-left: 0; text-align: left; }
  .tk-since .tk-sec h3, .tk-talk .tk-sec h3, .tk-label { flex-wrap: wrap; gap: 2px 8px; }
  .tk-problems li .muted { flex-basis: 100%; }
  .tk-journal li { grid-template-columns: 58px 22px minmax(0, 1fr); gap: 6px; }
}
/* Iteration 2 · lernjahr: Trennung in Monatsbalken nur dort früher, wo die Spalten schmal sind */
.yt-bar.one:not(.wide) .yt-t { hyphenate-limit-chars: 12 5 5; }
.yc-full .yt-bar.one:not(.wide) .yt-t, .yt-preview .yt-bar.one:not(.wide) .yt-t, .sd-detail-stack .yt-card .yt-bar.one:not(.wide) .yt-t { hyphenate-limit-chars: 9 4 4; }
@media (max-width: 1500px) { .yt-bar.one:not(.wide) .yt-t { hyphenate-limit-chars: 9 4 4; } }
/* Iteration 2 · coaching: offene Vereinbarungen am Handy als Raster (Text, Löschen rechts, Frist darunter) */
@media (max-width: 600px) {
  .ag-list.coach li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 0 4px; padding: 2px 0; }
  .ag-list.coach li label { grid-column: 1; grid-row: 1; }
  .ag-list.coach li > button { grid-column: 2; grid-row: 1; order: 0; }
  .ag-list.coach li > .chip { grid-column: 1; grid-row: 2; order: 0; justify-self: start; margin: -2px 0 6px 34px; }
}
/* Iteration 2 · coaching: Freigabe (Aufgabe, Abgabe und Entscheidung nebeneinander; am Handy erst die Abgabe, Entscheidung als Leiste) */
.review-top { flex-wrap: nowrap; gap: 8px 12px; min-height: 40px; }
.review-top > .muted { white-space: nowrap; }
.review-head { margin: 8px 0 18px; }
.review-head > div { min-width: 0; }
.review-grid .decide-bar { margin: 0; }
.review-grid.can-decide .decide-bar { grid-column: 1 / -1; }
.decide-head, .decide-hint { display: none; }
.decide-bar .lbl-short { display: none; }
@media (min-width: 1250px) {
  .review-grid.can-decide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(300px, 340px); }
  .review-grid.can-decide .decide-bar { grid-column: auto; position: sticky; top: 84px; bottom: auto; align-self: start; padding: 22px; border-radius: var(--r-xl); gap: 10px; box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
  .decide-head { display: grid; gap: 4px; margin-bottom: 6px; }
  .decide-head h2 { font-size: var(--fs-lg); }
  .decide-hint { display: block; margin: -4px 0 0; font-size: var(--fs-xs); color: var(--muted); }
  .review-grid.can-decide .decide-bar textarea { min-height: 92px; }
  .review-grid.can-decide .decide-bar .btn-row { flex-direction: column-reverse; align-items: stretch; margin-top: 6px; }
  .review-grid.can-decide .decide-bar .btn-row .btn { justify-content: center; }
}
@media (max-width: 860px) {
  .review-grid { align-items: stretch; }
}
@media (max-width: 600px) {
  .review-top .btn { min-height: 44px; }
  .review-top .back { min-height: 44px; }
  .decide-bar .lbl-long { display: none; }
  .decide-bar .lbl-short { display: inline; }
  .decide-bar .btn-row { gap: 8px; margin: 0; }
  .decide-bar .btn-row .btn { min-height: 48px; min-width: 0; }
  .decide-bar .btn-row .btn:not(.secondary) { flex: 1.3; }
  .review-task .btn { min-height: 44px; }
}
/* Iteration 2 · lernjahr: schmale Zeitleistenkarte (z. B. neben der Seitenleiste) zeigt Fächer als Symbol und nutzt den Platz für die Balken */
.yt-card { container-type: inline-size; }
@container (min-width: 600px) and (max-width: 1000px) {
  .yt, .yt-gantt:not(.mini) { --lw: 56px; }
  .yt-gantt:not(.mini) .yt-subj { display: none; }
  .yt-gantt:not(.mini) .yt-bar .yt-ic { display: none; }
  .yt-gantt:not(.mini) .yt-bar { padding-left: 8px; }
  .yt-gantt:not(.mini) .yt-bar.one:not(.wide) { font-size: var(--fs-2xs); padding: 2px 5px 2px 6px; }
  .yt-gantt:not(.mini) .yt-bar.one:not(.wide) .yt-t { hyphenate-limit-chars: 9 4 4; }
}
/* Wochenplan in der schmaleren Detailspalte: Wörter trennen statt zerhacken */
.sdz .sw-it { overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.sdz .sw-day { padding: 8px; }
/* Iteration 2 · lernjahr: dieselbe Verdichtung bis 1180px Kartenbreite (1440er-Bildschirm mit Seitenleiste) */
@container (min-width: 600px) and (max-width: 1180px) {
  .yt, .yt-gantt:not(.mini) { --lw: 56px; }
  .yt-gantt:not(.mini) .yt-subj { display: none; }
  .yt-gantt:not(.mini) .yt-bar .yt-ic { display: none; }
  .yt-gantt:not(.mini) .yt-bar { padding-left: 8px; }
  .yt-gantt:not(.mini) .yt-bar.one:not(.wide) { font-size: var(--fs-2xs); padding: 2px 5px 2px 6px; }
  .yt-gantt:not(.mini) .yt-bar.one:not(.wide) .yt-t { hyphenate-limit-chars: 9 4 4; }
}
/* Iteration 2 · coaching: Kennzahlen immer in einer Reihe, Karten ohne gestreckte Leerfläche, Gesprächskopf am Handy kürzer */
@media (min-width: 601px) { .kpi-row.cc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 601px) and (max-width: 1249px) { .cc-kpis .kpi { padding: 12px 14px; } .cc-kpis .kpi > span:last-child { white-space: normal; } }
.cc-cards { align-items: start; }
@media (max-width: 600px) {
  .tk-state .chip.soft:not(:first-child) { display: none; }
  .tk-top { gap: 8px; }
  .tk-grid { margin-top: 12px; }
}
/* Iteration 2 · coaching: Freigabe auf mittleren Breiten als flache Leiste (Feld und Knöpfe in einer Zeile), verdeckt die Abgabe kaum */
@media (min-width: 601px) and (max-width: 1249px) {
  .review-grid.can-decide .decide-bar { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 12px; padding: 12px 14px; }
  .review-grid.can-decide .decide-bar > label, .review-grid.can-decide .decide-bar > .error { grid-column: 1 / -1; }
  .review-grid.can-decide .decide-bar textarea { min-height: 48px; height: 48px; resize: none; transition: height .15s; }
  .review-grid.can-decide .decide-bar textarea:focus, .review-grid.can-decide .decide-bar textarea:not(:placeholder-shown) { height: 110px; }
  .review-grid.can-decide .decide-bar .btn-row { flex-wrap: nowrap; }
  .review-grid.can-decide .decide-bar .btn-row .btn { min-height: 48px; white-space: nowrap; }
  main:has(.decide-bar) { padding-bottom: 140px; }
}
/* Iteration 2 · coaching: zwei Marken dürfen umbrechen, nur mit „+n“ bleibt die Zeile einzeilig; Pflichthinweis der Freigabe-Leiste */
.cc-chips:not(:has(.chip.soft:last-child)) { flex-wrap: wrap; }
.decide-opt { font-weight: 600; color: var(--muted); }
@media (min-width: 1250px) { .decide-opt { display: none; } }

/* Iteration 2 · student */
/* Start: Selbstständigkeit beginnt auf derselben Höhe wie die Nachbarkacheln */
.wc-steps li.now { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 3px var(--accent-soft); }
.wc-steps li:not(.now) > b { background: var(--accent-soft); color: var(--accent-ink); }
/* Fächerleiste: weicher Rand, solange es dort weitergeht */
.subj-strip { scroll-snap-type: x proximity; scrollbar-width: none; }
.subj-strip::-webkit-scrollbar { display: none; }
.subj-strip.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.subj-strip.more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 56px), transparent); }
.subj-strip.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
@media (max-width: 600px) {
  .subj-strip { grid-auto-columns: 148px; gap: 10px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .subj-tile { min-height: 76px; border-radius: var(--r-lg); }
  /* dieselben Lernpfade stehen gleich darunter als Karten mit Frist */
}
/* Lernpfad: der eine nächste Schritt im Kopf */
.hero-next { all: unset; box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin-top: 16px; padding: 9px 10px 9px 16px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.18); transition: transform .12s; }
.hero-next[hidden] { display: none; }
.hero-next:hover { transform: translateY(-1px); }
.hero-next:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hero-next .hn-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.hero-next .hn-label { font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.hero-next strong { font-size: var(--fs-md); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hero-next .hn-go { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--c, var(--accent)); color: var(--on-c); }
.hero-actions .lc-btn { grid-column: 1 / -1; white-space: normal; }
.step.done .task:not([open]) .tmeta .tap:has(.openness) { display: none; }
@media (max-width: 860px) {
  .about-btn, .hero-actions details.about > summary { min-height: 44px; }
  .hero-actions details.about { padding-block: 0; }
  .hero-actions details.about[open] { padding-bottom: 10px; }
}
/* Lernpfade der Lehrkraft */
.pl-head { align-items: center; }
.pl-tools { margin: 0 0 16px; }
.pl-tools .subj-filter { margin: 0; }
.path-tile.has-cover h3 { margin: 0 0 6px; font-size: var(--fs-lg); line-height: 1.25; }
.path-tile .pt-subject { display: none; }
.path-tile .pt-facts > span + span::before { margin: 0 8px 0 -6px; color: var(--muted); }
.path-tile .pt-facts { gap: 2px 14px; }
.path-tile .tile-foot { padding-top: 14px; }
.path-tile .pt-state { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.path-tile .pt-state .chip { padding: 4px 10px; }
.path-tile.st-archived .tile-cover { filter: saturate(.35); }
.pl-nohit { margin: 8px 0 0; }
@media (max-width: 640px) {
  .pl-head .btn-row { width: 100%; flex-wrap: nowrap; }
  .pl-head .btn-row .btn { min-height: 46px; }
  .pl-head .btn-row .btn:not(.ghost) { flex: 1; order: -1; }
  .pl-tools .subj-filter { overflow-x: auto; scrollbar-width: none; }
  .pl-tools .subj-filter::-webkit-scrollbar { display: none; }
  .pl-tools .sf-chip { flex: none; box-sizing: border-box; }
  .path-grid-t { gap: 10px; }
  .path-grid-t .path-tile.has-cover { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; padding: 14px; }
  .path-grid-t .path-tile .tile-cover { grid-column: 1; margin: 0; }
  .path-grid-t .path-tile .tile-cover .art { right: 1px; top: 4px; opacity: .6; }
  .path-grid-t .path-tile .cover-subject { display: none; }
  .path-grid-t .path-tile > :not(.tile-cover) { grid-column: 2; }
}
/* Editor */
.save-state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.save-state.saved { color: var(--ok); }
.save-state.fail { color: var(--danger); }
.editor-head .title-input { width: 100%; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .editor-head { grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: center; }
  .editor-head > .back { grid-column: 1 / -1; justify-self: start; }
  .editor-head > .title-input { grid-column: 1; grid-row: 2; }
  .editor-head > .meta { grid-column: 1; grid-row: 3; }
  .editor-head > .editor-actions { grid-column: 2; grid-row: 2 / span 2; flex-wrap: nowrap; }
}
.meta-fold { padding: 14px 18px; }
.meta-fold > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; color: var(--text); min-height: 44px; }
.meta-fold[open] > summary { margin-bottom: 16px; }
.meta-fold .mf-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--cs, var(--accent-soft)); color: var(--ci, var(--accent)); }
.meta-fold .mf-body { display: grid; gap: 2px; min-width: 0; }
.meta-fold .mf-sum { display: flex; gap: 14px; align-items: center; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.meta-fold .mf-sum > span { flex: none; }
.meta-fold .mf-sum > .mf-desc { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.meta-fold .mf-subject { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.meta-fold[open] .mf-sum, .meta-fold[open] .fold-hint { display: none; }
.meta-fold .fold-hint { font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); }
.meta-fold .mf-chev { color: var(--muted); transition: transform .2s; }
.meta-fold[open] .mf-chev { transform: rotate(180deg); }
.meta-fold .mf-row { margin-bottom: 4px; }
.meta-fold .mf-notes > summary { cursor: pointer; }
.section-card { overflow: visible; }
.section-card > .section-head { border-radius: 21px 21px 0 0; }
.section-card > :last-child { border-radius: 0 0 21px 21px; }
.section-head .menu-list { min-width: 200px; }
@media (max-width: 640px) {
  .editor-actions > .btn, .editor-actions > .menu > .btn { min-height: 46px; }
  .editor-actions > .btn { flex: 1 1 auto; }
  .meta-fold { padding: 12px 14px; }
  .meta-fold .mf-sum { gap: 10px; }
  .meta-fold .mf-sum > span:nth-child(2) { display: none; }
  .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px 8px 12px 12px; }
  .section-head > input[aria-label="Abschnitt"], .section-head > strong.grow { grid-column: 1; grid-row: 1; width: 100%; min-height: 44px; }
  .section-head > .menu { grid-column: 2; grid-row: 1; }
  .section-head > .menu > .icon-btn { min-width: 44px; height: 44px; }
  .section-head > .checkout-toggle { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-left: 4px; }
  .section-head > .sec-count { grid-column: 1 / -1; grid-row: 2; justify-self: end; align-self: center; margin-right: 8px; }
  .section-head:not(:has(.checkout-toggle)) > .sec-count { justify-self: start; margin-left: 6px; }
  .task-summary .move { display: none; }
  .task-summary { min-height: 56px; }
  .add-task { flex-wrap: nowrap; }
  .add-task input { min-width: 0; }
  .te-foot { row-gap: 10px; }
}
/* Iteration 2 · student: Abschnittskopf am Handy, Anzahl rechts neben dem Schalter */
@media (max-width: 640px) {
  .section-head > .sec-count.muted.small { margin: 0 8px 0 0; }
  .section-head:not(:has(.checkout-toggle)) > .sec-count.muted.small { margin: 0 0 0 6px; }
}
/* Iteration 2 · student: Weiter-Knopf lesbar auf Weiß (auch dunkel), Faktenzeile ohne Trennpunkte, Fachfilter am Handy umbrechen statt abschneiden */
.hero-next { color: #23234a; }
.hero-next .hn-label { color: var(--cw, #4b36c9); opacity: 1; }
.path-tile .pt-facts > span + span::before { content: none; }
@media (max-width: 640px) {
  .pl-tools .subj-filter { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
}
/* Iteration 2 · student: Randblende der Fächerleiste am Handy schmaler */
@media (max-width: 600px) {
  .subj-strip.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .subj-strip.more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); }
  .subj-strip.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
}
/* Vereinbarungen: Tippflächen am Handy mindestens 44px, Kästchen oben bündig */
.ag-list label { align-items: flex-start; }
@media (max-width: 760px) {
  .ag-list li { min-height: 44px; } .ag-list label { min-height: 44px; padding: 10px 0; }
  .ag-done summary { min-height: 44px; display: flex; align-items: center; }
}
/* Iteration 3 · journal-wochenplan */
/* Aufklapper mit Pfeil statt Browser-Dreieck (Lernjournal, Lernchecks) */
.jv-disc > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 40px; font-weight: 700; color: var(--muted); border-radius: var(--r-sm); }
.jv-disc > summary::-webkit-details-marker { display: none; }
.jv-disc > summary::marker { content: ""; }
.jv-disc > summary .icon { flex: none; transition: transform .15s; }
.jv-disc[open] > summary .icon { transform: rotate(180deg); }
.jv-disc > summary:hover { color: var(--text); }
.jv-disc > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.jr-older.jv-disc > summary { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); padding: 0; min-height: 44px; }

/* Wochenplan: Wochenziel abhaken */
.wp-hero .goal-show { align-items: center; gap: 10px; }
.wp-goal-check { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid currentColor; transition: transform .12s, background .12s; }
.wp-goal-check .icon { width: 18px; height: 18px; stroke-width: 3; stroke: currentColor; opacity: .55; }
.wp-goal-check:hover { transform: scale(1.06); }
.wp-goal-check:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.wp-goal-check[aria-pressed="true"] { background: currentColor; }
.wp-goal-check[aria-pressed="true"] .icon { stroke: var(--accent); opacity: 1; }
.wp-goal-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.wp-hero .goal-show .wp-goal-text strong { flex: none; }
.wp-goal-state { font-size: var(--fs-xs); font-weight: 600; line-height: 1.35; }
/* Erledigtes: Häkchen statt blass und durchgestrichen */
.wp-days .wi.done { opacity: 1; }
.wp-days .wi.done .wi-title { text-decoration: none; color: var(--muted); }
/* Noch einplanen: Kalender-Knopf für einen anderen Tag, Mehr-Links als Knopf */
.wp-path .tray-more { padding: 6px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
@media (max-width: 900px) {
  .wp-goal-check { width: 44px; height: 44px; }
  .wp-tab .wt-mark.none { background: none; }
  .wp-tab .wt-dash { display: block; width: 10px; height: 2px; border-radius: var(--r-xs); background: currentColor; opacity: .55; }
  .wp-tab[aria-selected="true"] .wt-mark.ok { background: var(--accent-text); }
  .wp-tab[aria-selected="true"] .wt-mark.ok .icon { stroke: var(--accent); }
  .wp-tab[aria-selected="true"] .wt-mark.open { background: var(--accent-text); color: var(--accent-ink); }
  .wp-days .day-add { border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); }
  .wp-days .day-add .icon { stroke: var(--accent); }
  .wp-tray .wp-task { gap: 8px; padding-right: 6px; }
  .wp-path .tray-more { width: 100%; justify-content: center; }
}

/* Lernjournal: Kopf, Satzanfänge und Lernpfade */
.journal-hero .jh-lead { max-width: 62ch; }
.pc-short { display: none; }
.path-pick .pp-more { display: none; }
.composer > .cmp-cols .error { margin: 10px 0 0; }
@media (max-width: 700px) {
  .journal-hero .jh-lead { display: block; margin-top: 4px; font-size: var(--fs-base); line-height: 1.4; }
  .path-pick.jv-wrap, .prompt-chips.jv-wrap { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; margin: 0; padding: 0; }
  .jv-wrap .pchip { box-sizing: border-box; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; }
  .jv-wrap .pc-long { display: none; }
  .jv-wrap .pc-short { display: inline; }
  .jv-wrap .pp { box-sizing: border-box; min-height: 44px; max-width: 100%; padding: 4px 14px 4px 8px; flex: 0 1 auto; }
  .jv-wrap .pp span { white-space: normal; overflow: visible; }
  .path-pick.jv-wrap:not(.all) .pp-extra { display: none; }
  .path-pick.jv-wrap .pp-more { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 10px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; }
  .path-pick.jv-wrap .pp-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .path-pick.jv-wrap .pp-more .icon { stroke: var(--accent); }
}
/* Rückmeldung: Person mit Initialen, Smiley als Reaktion daneben */
.je-fb .fb-ini { background: var(--surface); color: var(--ok); border: 1.5px solid var(--ok); box-sizing: border-box; font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .02em; }
.je-fb .fb-ini .icon { stroke: var(--ok); }
.je-fb .fb-body { min-width: 0; display: grid; gap: 3px; }
.fb-react { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; }
.fb-react .face { width: 22px; height: 22px; flex: none; }
@media (prefers-color-scheme: dark) {
  .je-fb { background: var(--surface-2); border-left: 3px solid var(--ok); border-radius: var(--r-md); }
  .je-fb::before { display: none; }
}
.je-editdlg .jc-label { display: block; margin-bottom: 6px; }
.je-editdlg .picker.moods { margin-bottom: 18px; }
.sd-body .sd-pickerr { margin: 8px 0 0; }
/* Meine Lernchecks: eine Vergleichszeile, Rückmeldung zum Aufklappen */
.cp-cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 8px 0 0; font-size: var(--fs-sm); }
.cp-cmp-part { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cp-cmp-k { color: var(--muted); font-weight: 700; font-size: var(--fs-xs); }
.checks-panel .stars i:not(.on), .self-pick .stars i:not(.on), .lc-self .stars i:not(.on), .sc-vals .stars i:not(.on) { background: color-mix(in srgb, var(--muted) 42%, transparent); }
.cp-agree.cp-agree-line { background: none; padding: 0; margin-top: 6px; font-weight: 600; font-size: var(--fs-xs); }
.cp-disc { margin-top: 4px; }
.cp-disc > summary { min-height: 36px; font-size: var(--fs-xs); color: var(--accent-ink); }
.cp-disc > summary .icon { stroke: var(--accent); }
.cp-fbtext { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); }
.cp-item .cp-ask { margin-top: 10px; min-height: 36px; }
@media (max-width: 1099px) {
  .cp-disc > summary { min-height: 44px; }
  .cp-item .cp-ask { min-height: 44px; }
}

/* Journal-Eingang: Reaktionen 44px, Antwortfeld wo fällig, Rückgängig, Sammelaktion */
.rb-row .rb-face { width: 44px; height: 44px; }
.rb-row .rb-quick { gap: 8px; }
.rb-row { gap: 8px; }
.rb-row .rb-read { border: 1px solid var(--line); margin-right: 0; }
.rb-row .btn.small { min-height: 44px; }
.rb-inline { all: unset; box-sizing: border-box; cursor: text; flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--surface); color: var(--muted); font-size: var(--fs-base); }
.rb-inline span { min-width: 0; overflow-wrap: break-word; }
.rb-inline .icon { flex: none; stroke: var(--accent); }
.rb-inline:hover { border-color: var(--accent); }
.rb-inline:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rb-row.has-inline .rb-read { margin-left: auto; }
.rb-pending { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 44px; padding: 6px 8px 9px 10px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.rb-pending .rb-pending-t { flex: 1 1 140px; min-width: 0; }
.rb-pending .rb-undo { flex: none; min-height: 44px; }
.rb-pending .rb-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left center; animation: jv-countdown 5s linear forwards; }
@keyframes jv-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .rb-pending .rb-timer { animation: none; } }
.ji-card.bulk-wait { opacity: .55; pointer-events: none; }
.ji-sechead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 30px 0 12px; }
.ji-sechead > .section-title { margin: 0; }
.ji-bulk { display: flex; justify-content: flex-end; }
.ji-bulk:has(.ji-bulkbar) { flex: 1 0 100%; }
.ji-bulk .ji-bulkbar { flex: 1; }
.ji-bulk-btn { min-height: 36px; }
.ji-bulk .menu-list .menu-face { width: 20px; height: 20px; flex: none; }
.ji-lab { font-weight: 600; }
.ji-mood .ji-lab { margin-right: -2px; }
@media (max-width: 700px) {
  .ji-sechead { margin-top: 24px; }
  .ji-bulk-btn { min-height: 44px; }
  .ji-grid:not(.all) > .ji-card:nth-child(n+4) { display: none; }
}
/* Iteration 3 · journal-wochenplan: Eingang am Handy, eine Zeile für Smileys, Antworten und Gelesen */
@media (max-width: 700px) {
  .ji-mood .ji-lab { display: none; }
  .ji-card .rb-row { flex-wrap: nowrap; }
  .ji-card .rb-row.has-inline { flex-wrap: wrap; }
  .ji-card .rb-row .btn.small { padding-inline: 9px; font-size: var(--fs-xs); }
  .ji-card .rb-row .btn .icon { display: none; }
}

/* Iteration 3 · admin-klasse */
/* Gemeinsam: Speicherleiste nur bei Änderungen, Menü nach oben */
.save-bar.sb-auto[hidden], .save-bar.ck-bulk[hidden] { display: none; }
.card > .save-bar.sb-auto { border-top: 1px solid var(--line); padding: 10px 10px 10px 18px; margin-top: 18px; }
.save-bar.sb-auto .btn:disabled, .save-bar.ck-bulk .btn:disabled { opacity: .55; cursor: default; }
.ck-list .menu-list.up, .acc-table .menu-list.up, .attn-cell .menu-list.up { top: auto; bottom: calc(100% + 6px); }

/* Klassenliste: ruhige Zeilen statt Tabelle mit 44 Auswahlfeldern */
button.kpi.ck-kpi { appearance: none; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.kpi.ck-kpi:hover { border-color: var(--accent); }
button.kpi.ck-kpi[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.ck-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 18px 0 10px; }
.ck-tools .search-box { flex: 0 1 300px; }
.ck-tools select { width: auto; margin: 0; min-width: 0; }
.ck-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-chip { appearance: none; font: inherit; font-size: var(--fs-sm); font-weight: 700; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.ck-chip:hover { border-color: var(--accent); }
.ck-chip .ck-n { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ck-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.ck-chip[aria-pressed="true"] .ck-n { color: inherit; opacity: .85; }
.ck-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-left: auto; }
.ck-opts #f-ck-sort { padding: 9px 34px 9px 12px; font-size: var(--fs-base); }
.ck-pickbtn { min-height: 40px; }
.ck-pickbtn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ck-head, .ck-row { --pick: 0px; display: grid; align-items: center; column-gap: 16px; grid-template-columns: var(--pick) minmax(190px, 1.5fr) 150px minmax(140px, 1fr) 44px; }
.ck-head.has-lv, .has-lv > .ck-row { grid-template-columns: var(--pick) minmax(190px, 1.5fr) 150px minmax(140px, 1fr) 130px 44px; }
.ck-head.has-au, .has-au > .ck-row { grid-template-columns: var(--pick) minmax(190px, 1.5fr) 150px minmax(140px, 1fr) minmax(200px, 1.2fr) 44px; }
.ck-head.has-lv.has-au, .has-lv.has-au > .ck-row { grid-template-columns: var(--pick) minmax(190px, 1.5fr) 150px minmax(140px, .9fr) 130px minmax(200px, 1.2fr) 44px; }
.ck-head { padding: 8px 10px 8px calc(10px + var(--pick)); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; border-bottom: 1px solid var(--line); grid-template-columns: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) 44px; }
.ck-head.has-lv { grid-template-columns: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) 130px 44px; }
.ck-head.has-au { grid-template-columns: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) minmax(200px, 1.2fr) 44px; }
.ck-head.has-lv.has-au { grid-template-columns: minmax(190px, 1.5fr) 150px minmax(140px, .9fr) 130px minmax(200px, 1.2fr) 44px; }
.ck-list { list-style: none; margin: 0; padding: 0; }
.ck-list.picking { --pick: 28px; }
.ck-list.picking > .ck-row { --pick: 28px; }
.ck-row { min-height: 58px; padding: 6px 10px; border-bottom: 1px solid var(--line); transition: background .12s; }
.ck-row[hidden] { display: none; }
.ck-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.ck-row.picked { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.ck-pick { display: none; margin: 0; place-items: center; min-height: 44px; cursor: pointer; }
.ck-list:not(.picking) > .ck-row > .ck-who { grid-column: 1 / span 2; }
.ck-list.picking .ck-pick { display: grid; }
.ck-check, .set-form input[type="checkbox"]:not(.sw) { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: var(--r-sm); border: 2px solid var(--muted); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.ck-check::after, .set-form input[type="checkbox"]:not(.sw)::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid var(--accent-text); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
.ck-check:checked, .set-form input[type="checkbox"]:not(.sw):checked { background: var(--accent); border-color: var(--accent); }
.ck-check:checked::after, .set-form input[type="checkbox"]:not(.sw):checked::after { transform: rotate(45deg) scale(1); }
.ck-check:focus-visible, .set-form input[type="checkbox"]:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.ck-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; min-height: 44px; }
.ck-who strong { font-weight: 700; min-width: 0; overflow-wrap: break-word; }
.ck-who:hover strong { text-decoration: underline; }
.ck-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; font-size: var(--fs-2xs); font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); }
.ck-prog { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ck-state { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ck-state .chip, .ck-val .chip, .ck-facts .chip, .a-login-in .chip { white-space: nowrap; }
.ck-state .chip .icon, .ck-facts .chip .icon, .a-login-in .chip .icon { width: 14px; height: 14px; }
.ck-val { appearance: none; font: inherit; font-size: var(--fs-base); font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 8px; justify-self: start; max-width: 100%; min-height: 36px; padding: 5px 11px; border-radius: var(--r-md); border: 1px solid transparent; background: none; text-align: left; }
button.ck-val { cursor: pointer; border-color: var(--line); background: var(--surface); }
button.ck-val:hover { border-color: var(--accent); color: var(--accent-ink); }
.ck-val .ck-lbl { display: none; }
.ck-more { justify-self: end; }
.ck-open { display: none; }
.ck-count:empty { display: none; }
.save-bar.ck-bulk { bottom: 16px; margin-top: 14px; }
.ck-bulk-n { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 auto; }
.ck-bulk select { width: auto; margin: 0; min-width: 130px; }
.ck-dialog { width: min(560px, calc(100vw - 32px)); }
.ck-facts { margin: 0 0 18px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ck-fact { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ck-fact:last-child { border-bottom: 0; }
.ck-fact dt { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.ck-fact dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-weight: 600; min-width: 0; }
.ck-fact code { font-size: var(--fs-base); overflow-wrap: break-word; user-select: all; }
.ck-fields select { width: 100%; margin: 0; }
.ck-sheet .error { margin: 6px 0 0; }
.ck-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ck-links .btn { min-height: 40px; }
@media (prefers-color-scheme: dark) { .ck-av { background: var(--surface-3); color: var(--text); } }
@media (max-width: 1280px) and (min-width: 761px) {
  .ck-head, .ck-row { column-gap: 12px; }
  .ck-head.has-lv.has-au, .has-lv.has-au > .ck-row { grid-template-columns: var(--pick) minmax(160px, 1.4fr) 112px minmax(118px, .8fr) 96px minmax(170px, 1.1fr) 44px; }
  .ck-head.has-lv.has-au { grid-template-columns: minmax(160px, 1.4fr) 112px minmax(118px, .8fr) 96px minmax(170px, 1.1fr) 44px; }
  .ck-prog .mini-bar { width: 56px; }
}
@media (max-width: 760px) {
  .ck-tools { gap: 8px; }
  .ck-tools .search-box { flex: 1 1 100%; max-width: none; }
  .ck-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; scroll-snap-type: x proximity; flex: 1 1 100%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 36px), transparent 100%); }
  .ck-chips::-webkit-scrollbar { display: none; }
  .ck-chip { min-height: 44px; scroll-snap-align: start; flex: none; }
  .ck-chips::after { content: ""; flex: 0 0 20px; }
  .ck-opts { margin-left: 0; flex: 1 1 100%; }
  .ck-opts select, .ck-opts .ck-pickbtn { min-height: 44px; }
  .ck-opts #f-ck-sort { flex: 1 1 140px; }
  .ck-head { display: none; }
  .ck-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: visible; }
  .ck-row, .has-lv > .ck-row, .has-au > .ck-row, .has-lv.has-au > .ck-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 64px; padding: 8px 50px 9px 12px; }
  .ck-row:last-child { border-bottom: 0; }
  .ck-row:hover { background: none; }
  .ck-list.picking .ck-pick { position: absolute; left: 0; top: 0; bottom: 0; width: 46px; }
  .ck-who { flex: 1 1 0; min-height: 36px; }
  .ck-av { width: 32px; height: 32px; }
  .ck-state { flex: none; margin-left: auto; }
  .ck-prog { flex-basis: 100%; }
  .ck-prog, .ck-val, button.ck-val { order: 3; }
  .ck-prog { flex: none; height: auto; overflow: visible; margin-left: 42px; font-size: var(--fs-xs); color: var(--muted); }
  .ck-prog::before { content: ""; flex-basis: 100%; }
  .ck-prog .mini-bar { display: none; }
  .ck-prog b { font-weight: 600; }
  .ck-row::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .ck-val, button.ck-val { min-height: 0; padding: 0; border: 0; background: none; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); gap: 4px; }
  .ck-val::before { content: "·"; margin-right: 2px; }
  .ck-val.ck-lv .ck-lbl { display: inline; }
  .ck-val .ck-num { display: none; }
  .ck-val .chip { font-size: var(--fs-2xs); padding: 1px 8px; }
  .ck-more { display: none; }
  .ck-open { display: inline-grid; position: absolute; right: 3px; top: 50%; transform: translateY(-50%); min-width: 44px; height: 44px; }
  .ck-fact { grid-template-columns: 124px minmax(0, 1fr); padding: 9px 12px; }
  .ck-links .btn { min-height: 44px; flex: 1 1 auto; justify-content: center; }
  .save-bar.ck-bulk { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .ck-bulk .btn-row { flex: 1 1 100%; }
  .ck-bulk .btn-row .btn { flex: 1; justify-content: center; }
  .ck-bulk select { min-height: 44px; }
}
/* Iteration 3 · admin-klasse: Spalten der Klassenliste an einer Stelle (Kopf und Zeilen teilen sich --ck-cols) */
.ck-head, .ck-list { --ck-cols: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) 44px; }
.ck-head.has-lv, .ck-list.has-lv { --ck-cols: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) 130px 44px; }
.ck-head.has-au, .ck-list.has-au { --ck-cols: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) minmax(200px, 1.2fr) 44px; }
.ck-head.has-lv.has-au, .ck-list.has-lv.has-au { --ck-cols: minmax(190px, 1.5fr) 150px minmax(140px, .9fr) 130px minmax(200px, 1.2fr) 44px; }
@media (max-width: 1280px) {
  .ck-head.has-lv.has-au, .ck-list.has-lv.has-au { --ck-cols: minmax(160px, 1.4fr) 112px minmax(118px, .8fr) 96px minmax(170px, 1.1fr) 44px; }
}
.ck-head.ck-head.ck-head.ck-head, .ck-list.ck-list.ck-list.ck-list > .ck-row { grid-template-columns: var(--pick) var(--ck-cols); }
.ck-head.ck-head { padding-left: 10px; }
.ck-head:has(+ .ck-list.picking) { --pick: 28px; }
.ck-head > span:first-child { grid-column: 1 / span 2; }
.ck-head:has(+ .ck-list.picking) > span:first-child { grid-column: 2; }
/* Iteration 3 · admin-klasse: Suche und Filter der Klassenliste bleiben am Handy stehen, Handyzeile bündig unter dem Namen */
@media (max-width: 760px) {
  .ck-tools { display: block; margin: 8px 0 8px; padding: 0; }
  .ck-opts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 2px 0 12px; }
  .ck-opts .ck-count { grid-column: 1 / -1; }
  .ck-opts .inline-field { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .ck-opts .inline-field select { width: 100%; }
  .ck-list > .ck-row { padding-left: 54px; }
  .ck-list.picking > .ck-row { padding-left: 88px; }
  .ck-list > .ck-row .ck-av { position: absolute; left: 12px; }
  .ck-list.picking > .ck-row .ck-av { left: 46px; }
  .ck-list > .ck-row .ck-prog { margin-left: 0; }
  .ck-list > .ck-row .ck-prog + .ck-state { margin-left: auto; }
  .ck-val.ck-val::before { content: "·"; margin: 0 2px 0 0; }
}
/* Iteration 3 · journal-wochenplan: auch im Kasten der Startseite bleibt die Reaktionszeile am Handy einzeilig */
@media (max-width: 700px) {
  .ji-item .rb-row { flex-wrap: nowrap; }
  .ji-item .rb-row.has-inline { flex-wrap: wrap; }
  .ji-item .rb-row .btn.small { padding-inline: 8px; font-size: var(--fs-xs); flex: none; }
  .ji-item .rb-row .btn .icon { display: none; }
  .ji-item .rb-row .rb-quick { margin-right: auto; flex: none; }
}
.sd-body .sd-pickerr { margin-bottom: 10px; }
/* Iteration 3 · admin-klasse: Benutzerliste */
.attn-row.attn-acts { align-items: start; }
.attn-cell { display: grid; gap: 4px; justify-items: start; flex: 0 1 300px; min-width: 240px; }
.attn-cell > button.kpi.attn { width: 100%; min-width: 0; }
.attn-cell .attn-act { min-height: 36px; }
.attn-cell .attn-act:disabled { opacity: .55; cursor: default; }
.attn-cell .menu-list { left: 0; right: auto; min-width: 280px; }
.attn-note { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.acc-tools select { min-width: 0; }
.acc-tools .u-cards[hidden] { display: none; }
.acc-tools .u-cards { min-height: 40px; }
table.acc-table { border-collapse: separate; border-spacing: 0; }
.acc-table th, .acc-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.acc-table tr.is-last td { border-bottom-color: transparent; }
.acc-table th { white-space: nowrap; }
.acc-table th.a-who { width: 30%; }
.acc-table th.a-act { width: 1%; }
.acc-table td.a-role, .acc-table td.a-seen { white-space: nowrap; }
.acc-table td.a-act { text-align: right; }
.acc-table tbody tr { transition: background .12s; }
.acc-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.acc-table .cl-name strong { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acc-table .a-sub { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); overflow-wrap: break-word; }
.acc-table .a-sub-m { display: none; }
.acc-table .a-warn { font-weight: 700; color: var(--warn); }
.a-login-in { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip.a-never { background: color-mix(in srgb, var(--warn-soft) 65%, transparent); color: var(--warn); font-weight: 600; }
.acc-table .a-primary { white-space: nowrap; min-height: 36px; }
.acc-table .act-row { gap: 2px; }
@media (max-width: 1180px) and (min-width: 761px) {
  .acc-table th.a-seen, .acc-table td.a-seen { display: none; }
  .acc-table th, .acc-table td { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 760px) {
  .attn-cell { min-width: 0; gap: 0; }
  .attn-cell .attn-act { min-height: 44px; }
  .attn-cell .menu-list { min-width: 0; width: min(320px, calc(100vw - 32px)); }
  .acc-tools { gap: 8px; }
  .acc-tools .search-box { flex: 1 1 100%; max-width: none; }
  .acc-tools select { max-width: none; width: auto; }
  .acc-tools .u-cards { flex: 1 1 100%; justify-content: center; min-height: 44px; }
  table.acc-table, .acc-table tbody { display: block; width: 100%; }
  .acc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .acc-table tbody { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
  .acc-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; column-gap: 0; min-height: 60px; padding: 6px 3px 6px 12px; border-bottom: 1px solid var(--line); }
  .acc-table tr[hidden] { display: none; }
  .acc-table tr.is-last { border-bottom: 0; }
  .acc-table tbody tr:hover { background: none; }
  .acc-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .acc-table td.a-role, .acc-table td.a-login, .acc-table td.a-seen { display: none; }
  .acc-table td.a-act, .acc-table .act-row { display: contents; }
  .acc-table .a-sub-d { display: none; }
  .acc-table .a-sub-m { display: block; font-size: var(--fs-xs); line-height: 1.35; }
  .acc-table .cl-name { line-height: 1.3; }
  .acc-table .cl-name strong { overflow-wrap: break-word; }
  .acc-table .a-primary { min-height: 44px; padding: 0 8px; font-size: var(--fs-xs); gap: 5px; }
  .acc-table .icon-btn { min-width: 44px; height: 44px; }
}

/* Iteration 3 · admin-klasse: Schule und Begriffe */
.set-nav { display: none; }
.set-jump { appearance: none; font: inherit; font-size: var(--fs-sm); font-weight: 700; flex: none; min-height: 44px; padding: 6px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; scroll-snap-align: start; }
.set-jump:hover { border-color: var(--accent); color: var(--accent-ink); }
.set-form section { scroll-margin-top: 132px; }
.set-form .set-err { margin: 6px 0 0; font-size: var(--fs-sm); }
.set-foot { margin: 16px 2px 0; }
.set-2fa { margin-top: 12px; }
.set-form input.sw, #konto-mail input.sw { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 46px; height: 28px; margin: 0; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-3); cursor: pointer; transition: background .15s, border-color .15s; }
.set-form input.sw::after, #konto-mail input.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.set-form input.sw:checked, #konto-mail input.sw:checked { background: var(--accent); border-color: var(--accent); }
.set-form input.sw:checked::after, #konto-mail input.sw:checked::after { transform: translateX(18px); background: var(--accent-text); }
.set-form input.sw:focus-visible, #konto-mail input.sw:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.set-form label.sw-row { align-items: center; }
.term-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.term-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 104px; gap: 6px 14px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.term-name { align-self: center; display: grid; gap: 4px; justify-items: start; min-width: 0; }
.term-name strong { overflow-wrap: break-word; }
.term-chg { display: none; }
.term-row.changed .term-chg { display: inline-flex; }
.term-row.changed .term-fields input { border-color: var(--accent); }
.term-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.term-row.single .term-fields { grid-template-columns: minmax(0, 1fr); }
.term-fields .fg > label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.term-reset { min-height: 44px; justify-self: end; white-space: nowrap; }
.term-reset[hidden] { display: none; }
@media (min-width: 1100px) {
  .term-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
}
@media (min-width: 701px) and (max-width: 1099px) {
  .set-nav { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; position: sticky; top: 60px; z-index: 12; margin: 0 -16px 10px; padding: 8px 16px; background: var(--bg); }
  .set-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 860px) { .set-nav { top: 56px; } }
@media (max-width: 640px) {
  .set-form .stage-sum span { white-space: normal; overflow: visible; }
  .term-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .term-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; }
  .term-fields { grid-column: 1 / -1; grid-row: 2; }
  .term-reset { grid-column: 2; grid-row: 1; }
  .term-list:not(.open) > .term-row:nth-child(n+5) { display: none; }
  .term-list:not(.open) + .terms-more { display: flex; width: 100%; min-height: 46px; margin-top: 16px; }
}

/* Iteration 3 · admin-klasse: Datenschutz */
.ret-row.ret-row2 { align-items: center; padding: 12px 0; }
.ret-text { display: grid; gap: 3px; min-width: 0; }
.ret-text > label { margin: 0; font-size: var(--fs-base); font-weight: 650; color: var(--text); line-height: 1.35; }
.ret-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.ret-rec { appearance: none; font: inherit; font-weight: 700; color: var(--accent-ink); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ret-rec[hidden] { display: none; }
.ret-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--field-line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; flex: none; }
.ret-stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ret-step { appearance: none; font: inherit; font-size: var(--fs-xl); font-weight: 700; line-height: 1; width: 40px; min-height: 40px; border: 0; background: var(--surface-2); color: var(--text); padding: 0; cursor: pointer; }
.ret-step:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-ink); }
.ret-step:disabled { color: var(--muted); opacity: 1; cursor: default; }
.ret-row2 .ret-val input { width: 54px; margin: 0; padding: 8px 2px; border: 0; border-radius: 0; background: none; box-shadow: none; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; outline: none; }
.ret-row2 .ret-val input::-webkit-inner-spin-button, .ret-row2 .ret-val input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lr-fmt { display: block; margin-top: 2px; font-size: var(--fs-2xs); color: var(--muted); }
@media (min-width: 1100px) {
  .privacy-cols.pv-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .pv-cols .privacy-side { position: sticky; top: 76px; }
}
@media (max-width: 640px) {
  .ret-row.ret-row2 { grid-template-columns: auto minmax(0, 1fr); }
  .ret-row2 .ret-val { grid-column: 2; margin-top: 6px; }
  .ret-step { width: 44px; min-height: 44px; }
  .ret-rec { min-height: 44px; padding: 0 4px; }
}
/* Iteration 3 · journal-wochenplan: Umschalter im Eingang 44px */
@media (max-width: 700px) { .ji-tools .segmented .sg-opt { min-height: 44px; } }
@media (max-width: 760px) {
  .acc-tools select { flex: 1 1 40%; min-height: 44px; }
  .acc-tools .u-count { flex: 1 1 100%; }
}
@media (min-width: 641px) {
  .term-list > .term-row { grid-template-columns: 172px minmax(0, 1fr) auto; }
  .term-list .term-name strong { overflow-wrap: normal; }
}
/* Iteration 3 · journal-wochenplan: Reaktionszeile der Karten immer einzeilig, Sammelaktion auf Höhe der Abschnittsüberschrift */
.ji-card .rb-row { flex-wrap: nowrap; }
.ji-card .rb-row.has-inline { flex-wrap: wrap; }
.ji-card .rb-row .btn .icon { display: none; }
.ji-card .rb-row .btn.small { flex: none; }
.ji-sec-old > .ji-bulk { margin-top: -41px; margin-bottom: 5px; pointer-events: none; }
.ji-sec-old > .ji-bulk > * { pointer-events: auto; }
.ji-sec-old > .ji-bulk:has(.ji-bulkbar) { margin-top: 0; margin-bottom: 10px; }
@media (max-width: 700px) {
  .ji-sec-old > .ji-bulk { margin-top: -48px; margin-bottom: 4px; }
  .ji-sec-old > .ji-bulk:has(.ji-bulkbar) { margin-top: 0; }
}
/* Iteration 3 · admin-klasse: Feinschliff Klassenliste */
.ck-check.ck-check, .set-form input[type="checkbox"]:not(.sw) { box-sizing: border-box; width: 22px; height: 22px; min-height: 0; padding: 0; }
.ck-val { flex-wrap: wrap; row-gap: 2px; }
.ck-val .ck-txt { white-space: nowrap; }
@media (min-width: 1281px) {
  .ck-head.has-au, .ck-list.has-au { --ck-cols: minmax(190px, 1.5fr) 150px minmax(140px, 1fr) minmax(270px, 1.2fr) 44px; }
  .ck-head.has-lv.has-au, .ck-list.has-lv.has-au { --ck-cols: minmax(190px, 1.3fr) 130px minmax(180px, 1.1fr) 100px minmax(190px, 1fr) 44px; }
}
@media (max-width: 760px) {
  .ck-list > .ck-row { gap: 0 4px; padding-right: 46px; }
  .ck-list > .ck-row .ck-who { min-height: 44px; }
  .ck-list > .ck-row .ck-prog, .ck-list > .ck-row .ck-val { font-size: var(--fs-xs); }
  .ck-list > .ck-row .ck-val { gap: 3px; flex-wrap: nowrap; }
  .ck-list > .ck-row .ck-val .ck-txt { white-space: normal; }
}
/* Iteration 3 · admin-klasse: Werkzeugzeile der Klassenliste in zwei Teilen (oben Suche und Filter, darunter Sortierung) */
.ck-tools.ck-stick { margin-bottom: 0; }
.ck-tools.ck-tools2 { margin: 8px 0 6px; }
@media (max-width: 760px) {
  .ck-tools.ck-stick { display: grid; gap: 8px; position: sticky; top: 56px; z-index: 12; margin: 8px -16px 0; padding: 8px 16px; background: var(--bg); }
  .ck-tools.ck-stick .ck-chips { margin: 0 -16px; }
  .ck-tools.ck-tools2 { margin: 0 0 12px; }
  .ck-list.ck-list > li.ck-row { padding-left: 54px; }
  .ck-list.ck-list.picking > li.ck-row { padding-left: 88px; }
}
@media (max-width: 760px) {
  .ck-tools.ck-stick .ck-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent 100%); }
}
/* Iteration 3 · admin-klasse: Benutzerliste zwischen Handy und großem Bildschirm als Zeilenkarte mit Zugang */
@media (min-width: 761px) and (max-width: 1100px) {
  table.acc-table, .acc-table tbody { display: block; width: 100%; }
  .acc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .acc-table tbody { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
  .acc-table tr { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto 44px; align-items: center; column-gap: 10px; min-height: 60px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); }
  .acc-table tr[hidden] { display: none; }
  .acc-table tr.is-last { border-bottom: 0; }
  .acc-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .acc-table td.a-role, .acc-table td.a-seen { display: none; }
  .acc-table td.a-act, .acc-table .act-row { display: contents; }
  .acc-table .a-sub-d { display: none; }
  .acc-table .a-sub-m { display: block; }
  .acc-table .icon-btn { min-width: 44px; height: 44px; }
}
@media (max-width: 760px) { .ck-list > .ck-row .ck-av { top: 14px; } }
/* Iteration 3 · admin-klasse: Begriffe erst ab sehr breitem Bildschirm zweispaltig, damit lange Wörter ganz ins Feld passen */
@media (min-width: 1100px) and (max-width: 1499px) {
  .term-list.term-list { grid-template-columns: minmax(0, 1fr); }
  .term-list.term-list > .term-row { grid-template-columns: 220px minmax(0, 560px) auto; padding: 9px 0; }
}
/* Iteration 3 · raster */
/* Liste der Raster (Lehrkräfte): Kopfzeile bricht am Handy um, große Schirme ohne Waisenkachel */
.ph-kr .btn-row > * { min-width: 0; }
.kr-new { font: inherit; color: var(--text); text-align: left; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 22px; min-height: 120px; box-sizing: border-box;
  background: transparent; border: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent); box-shadow: none; transition: border-color .15s, background .15s; }
.kr-new:hover { border-color: var(--accent); background: var(--accent-soft); }
.kr-new:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kr-new-plus { flex: none; width: 52px; height: 52px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.kr-new-text { display: grid; gap: 4px; min-width: 0; }
.kr-new-text strong { font-size: var(--fs-md); }
.kr-new-text span { color: var(--muted); font-size: var(--fs-base); line-height: 1.4; }
@media (min-width: 1100px) {
  .grid.kr-list.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1180px; gap: 20px; }
  .grid.kr-list.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kr-list > .tile { max-width: none; }
  .kr-list.cols-2 .tile-cover { height: 132px; }
  .kr-list.cols-2 .tile h3 { font-size: var(--fs-xl); }
  .kr-list .kr-new.span-2 { grid-column: span 2; }
}
@media (max-width: 700px) {
  .ph-kr .btn-row.kr-list-actions { flex-wrap: wrap; gap: 4px; }
  .kr-list-actions > .btn:not(.secondary) { flex: 1 1 100%; }
  .kr-list-actions > .btn.kr-import { flex: 1 1 100%; min-height: 44px; background: none; border-color: transparent; box-shadow: none; }
  .kr-list .kr-new { display: none; }
}

/* Stufen-Umschalter: jede Stufe mit Namen; passt es nicht, wischt man (Rand blendet aus) */
.kg.narrow .kg-levels.named { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.kg-levels.named::-webkit-scrollbar { display: none; }
.kg-levels.named .kg-lv { flex: 1 0 auto; white-space: nowrap; padding: 6px 12px; scroll-snap-align: center; }
.kg-levels.named .kg-lv-name { overflow-wrap: normal; }
.kg-levels.named .kg-lv.part .kr-step, .kg-levels.named .kg-lv.part.on .kr-step { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1.5px currentColor; }
.kg-levels.named.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.kg-levels.named.more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 44px), transparent); }
.kg-levels.named.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
/* Zeile unter dem Bereichsnamen: in Worten, was auf welcher Stufe schon läuft (statt stummer Punkte) */
.kg-sum { display: none; }
.kg.narrow .kg-rowhead { flex-wrap: wrap; row-gap: 4px; }
.kg.narrow .kg-rowtitle { flex: 1 1 0; min-width: 0; }
.kg.narrow .kg-sum { display: flex; flex-wrap: wrap; gap: 2px 12px; flex: 0 0 100%; order: 3; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); line-height: 1.5; }
.kg-sum-i { display: inline-flex; align-items: center; gap: 4px; }
.kg-sum-i .icon { width: 14px; height: 14px; flex: none; }
.kg-sum-i.confirmed .icon { color: var(--ok); }
.kg-sum-i.self .icon { color: var(--accent-ink); }
.kg-sum-i.working .icon { color: var(--warn); }
/* Offene Felder: das nächste erreichbare je Bereich hebt sich leicht ab, spätere treten zurück */
.kg.has-state .kg-cell.upnext { border-color: color-mix(in srgb, var(--c, var(--accent)) 55%, var(--line)); }
.kg.has-state .kg-cell.later { background: transparent; border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.kg.has-state .kg-cell.later .kg-text { color: var(--muted); }

/* Mein Können (Schüler:innen) */
.kr-next .kr-next-sub { opacity: 1; }
.kr-next .kr-next-go { margin-top: 8px; }
.kr-tile .kt-go { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.kr-tile:hover .kt-go { color: var(--ci, var(--accent)); }
.kr-titleline { display: flex; align-items: center; gap: 4px; min-width: 0; }
.kr-titleline h2 { min-width: 0; overflow-wrap: break-word; }
.kr-info, .kr-toggle { display: none; }
.kr-rate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.kr-rate-head h3 { margin: 0; }
.kr-reset { font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-ink); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; margin-right: -8px; }
.kr-reset[hidden] { display: none; }
.kr-reset:hover { background: var(--accent-soft); }
.kr-reset:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
/* Kacheln als Kopf der Fächer (Handy, oder am großen Schirm bei mehr als drei Rastern): Pfeil statt „Ansehen“, ein Fach offen,
   zugeklappte Fächer stehen nicht noch einmal darunter */
.kr-tiles.fold { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.kr-tiles.fold .kt-go { display: grid; place-items: center; }
.kr-tiles.fold .kt-go-word { display: none; }
.kr-tiles.fold .kt-go .icon { transition: transform .15s; }
.kr-tiles.fold .kr-tile.on { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 1.5px var(--c, var(--accent)), var(--shadow); }
.kr-tiles.fold .kr-tile.on .kt-go { color: var(--ci, var(--accent)); }
.kr-tiles.fold .kr-tile.on .kt-go .icon { transform: rotate(180deg); }
.kr-mine.foldable.shut { display: none; }
@media (max-width: 700px) {
  .kr-tiles.fold { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .kr-tiles.fold .kr-tile { position: relative; gap: 4px; padding: 12px 6px 10px; }
  .kr-tiles.fold .kt-go { position: absolute; top: 6px; right: 6px; }
  .kr-mine > .kr-head { position: relative; grid-template-columns: minmax(0, 1fr) 44px; column-gap: 8px; }
  .kr-mine > .kr-head .kr-stats { grid-column: 1 / -1; }
  .kr-mine .kr-toggle { display: grid; place-items: center; grid-column: 2; grid-row: 1; width: 44px; height: 44px; margin: -6px -6px -6px 0; border: 0; background: none; color: var(--muted); border-radius: var(--r-md); cursor: pointer; }
  .kr-mine .kr-toggle::after { content: ""; position: absolute; inset: -8px; }
  .kr-mine .kr-toggle .icon { transition: transform .15s; transform: rotate(180deg); }
  .kr-mine.shut .kr-toggle .icon { transform: none; }
  .kr-mine .kr-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
  .kr-mine.shut > .kg, .kr-mine.shut > .kr-head .kr-stats, .kr-mine.shut .kr-desc.show { display: none; }
  .kr-mine.shut > .kr-head { margin-bottom: 0; }
  .kr-mine.shut .kr-info { display: none; }
  .kr-mine .kr-info { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px 0; border: 0; background: none; cursor: pointer; }
  .kr-mine .kr-info span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; font-style: normal; color: var(--muted); box-shadow: inset 0 0 0 1.5px currentColor; }
  .kr-mine .kr-info[aria-expanded="true"] span { color: var(--accent-ink); background: var(--accent-soft); }
  .kr-mine .kr-info:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; border-radius: 50%; }
  .kr-mine .kr-desc { display: none; position: relative; z-index: 1; }
  .kr-mine .kr-desc.show { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .kr-tiles.fold .kt-go .icon, .kr-mine .kr-toggle .icon { transition: none; }
}
/* Iteration 3 · raster: Auswahl der eigenen Klassen, wenn eine fremde Klasse aufgerufen wurde */
.kr-class-pick { flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 700px) { .kr-class-pick > .btn { flex: 1 1 100%; min-height: 46px; } }
/* Iteration 3 · raster: nächstes offenes Feld nur über den Rand betont (keine Verwechslung mit „in Arbeit“) */
.kg.has-state .kg-cell.upnext { background: var(--surface); border-color: color-mix(in srgb, var(--c, var(--accent)) 60%, var(--line)); }
/* Iteration 3 · lernjahr-eltern */
/* Zeitleiste: höchstens zwei Zeilen in mindestens 12px, schmale Monatsfelder mit Kurznamen, voller Titel im Hinweisfeld */
.yt-gantt.yt3:not(.mini) .yt-lane { grid-auto-rows: 56px; }
.yt-gantt.yt3:not(.mini) .yt-bar { font-size: var(--fs-xs); }
.yt-gantt.yt3:not(.mini) .yt-bar .yt-t { -webkit-line-clamp: 2; hyphens: auto; word-break: normal; overflow-wrap: break-word; hyphenate-limit-chars: 8 4 4; }
.yt-gantt.yt3:not(.mini) .yt-bar.narrow { font-size: var(--fs-2xs); padding: 3px 4px 3px 6px; gap: 4px; letter-spacing: -.01em; }
.yt-gantt.yt3:not(.mini) .yt-bar.narrow .yt-ic { display: none; }
/* „kommt noch“: gefüllte, aufgehellte Fläche statt durchsichtigem Strichrahmen, in beiden Farbschemata lesbar */
.yt-gantt.yt3:not(.mini) .yt-bar.planned, .yt-gantt.yt3:not(.mini) .yt-bar.draft {
  background: color-mix(in srgb, var(--c) 10%, var(--surface-2)); color: var(--text); opacity: 1;
  border-style: dashed; border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.yt-gantt.yt3:not(.mini) .yt-bar.planned .yt-ic, .yt-gantt.yt3:not(.mini) .yt-bar.draft .yt-ic { background: var(--surface); color: var(--muted); }
.yt-gantt.yt3:not(.mini) .yt-bar.fresh .yt-ic { background: var(--surface); color: var(--muted); }
.yt-gantt.yt3 .yt-bar:hover, .yt-gantt.yt3 .yt-bar:focus-visible { z-index: 6; }
.yt-pop { display: none; position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 7; width: max-content; max-width: 260px; padding: 8px 12px; border-radius: var(--r-md);
  background: var(--text); color: var(--surface); font-size: var(--fs-xs); font-weight: 600; line-height: 1.35; letter-spacing: 0; text-align: left; white-space: normal; box-shadow: var(--shadow-lg); pointer-events: none; }
.yt-pop strong { display: block; font-weight: 800; }
.yt-pop.end { left: auto; right: 0; }
.yt-bar:hover > .yt-pop, .yt-bar:focus-visible > .yt-pop, .yt-bar:active > .yt-pop { display: block; }
.yt-bar.dragging > .yt-pop { display: none; }
div.yt-bar:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.yt-gantt.yt3 .yt-subj small { white-space: normal; overflow: visible; }
/* Schmale Karte (Detailseite neben der Seitenleiste, 1440px): Fachname und Stand bleiben sichtbar */
@container (min-width: 600px) and (max-width: 1180px) {
  .yt-gantt.yt3:not(.mini) { --lw: 138px; }
  .yt-gantt.yt3:not(.mini) .yt-subj { display: grid; }
  .yt-gantt.yt3:not(.mini) .yt-art { width: 32px; height: 32px; border-radius: var(--r-sm); }
  .yt-gantt.yt3:not(.mini) .yt-art .art { width: 30px; height: 24px; }
  .yt-gantt.yt3:not(.mini) .yt-label { gap: 8px; }
  .yt-gantt.yt3:not(.mini) .yt-subj strong { font-size: var(--fs-sm); }
  .yt-gantt.yt3:not(.mini) .yt-bar:not(.narrow) .yt-ic { display: grid; }
  .yt-gantt.yt3:not(.mini) .yt-bar.narrow { font-size: var(--fs-2xs); padding: 3px 4px 3px 6px; }
}
/* Mini-Zeitleiste: Monate in 12px und voller Farbe, am Handy als Anfangsbuchstabe mit vorgelesenem Monatsnamen */
.yt-gantt.yt3.mini .yt-m { font-size: var(--fs-2xs); color: var(--text); opacity: 1; overflow: visible; letter-spacing: 0; }
.yt-gantt.yt3.mini .yt-m.now { color: var(--accent-text); }
.yt-gantt.yt3.mini .yt-m.past { color: var(--muted); }
.yt-m1 { display: none; }
@media (max-width: 760px) {
  .yt-gantt.yt3.mini { --lw: 112px; }
  .yt-gantt.yt3.mini .yt-m { font-size: var(--fs-2xs); }
  .yt-gantt.yt3.mini .yt-m3 { display: none; }
  .yt-gantt.yt3.mini .yt-m1 { display: inline; }
  .yt-gantt.yt3.mini .yt-lane { grid-auto-rows: minmax(16px, auto); }
  .yt-gantt.yt3.mini .yt-subj strong { display: block; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; hyphens: auto; font-size: var(--fs-xs); line-height: 1.25; }
}
/* Monatsreise am Handy: eine Schrift für alle Zeitabschnitte, Kästchen nur für Aufklappbares */
.yt-journey .yj-month > .yj-mlabel { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); color: var(--text); min-height: 28px; }
.yt-journey .yj-month.now > .yj-mlabel { color: var(--accent-ink); }
.yt-journey .yj-month.empty > .yj-mlabel { font-size: var(--fs-sm); opacity: 1; color: var(--muted); }
.yt-journey summary.yj-mlabel em { flex: none; }
.yj-month.now.folded { padding-bottom: 14px; }
.yj-nowfold > .yj-items { margin-top: 12px; }
.yt-journey .yj-item.fresh .yj-node { width: 40px; height: 40px; margin-left: 2px; background: var(--surface); color: var(--muted); box-shadow: 0 0 0 2px var(--line); }
.yt-journey .yj-item.overdue .yj-text small { color: var(--muted); }
.yj-late { display: inline-flex; align-items: center; gap: 5px; justify-self: start; margin-top: 4px; padding: 2px 9px; border-radius: var(--r-pill); background: var(--surface); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line)); font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; }
/* Aufklapper mit dem gemeinsamen Pfeil statt Browser-Dreieck */
.all-paths.fold3 > summary::after { content: none; }
.all-paths.fold3 > summary { min-height: 52px; }
.all-paths.fold3 > summary .f3-chev { flex: none; margin-left: auto; color: var(--muted); transition: transform .2s; }
.all-paths.fold3 > summary .ap-arts + .f3-chev { margin-left: 8px; }
.all-paths.fold3[open] > summary .f3-chev { transform: rotate(180deg); }
.f3-intro { margin: 0 4px 14px; max-width: 86ch; color: var(--text); font-size: var(--fs-base); line-height: 1.5; }
.later-fold .lf-chev { flex: none; color: var(--muted); transition: transform .2s; }
.later-fold[open] .lf-chev { transform: rotate(180deg); margin-left: auto; }
/* Mein Lernjahr: Ring, eine Zeile Stand, Weiter-Knopf, Abzeichen je Fach */
.year-hero.yh3 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text ring" "more ring"; gap: 12px 18px; }
.yh3 .yh-text { grid-area: text; min-width: 0; }
.yh3 > .ring { grid-area: ring; }
.yh3 .yh-more { grid-area: more; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; min-width: 0; }
.year-hero.yh3 .yh-line { margin: 0 0 2px; font-size: var(--fs-md); }
.year-hero.yh3 .yh-next { margin: 0; }
.yh3 .yh-go { background: var(--surface); color: var(--accent-ink); border-color: transparent; box-shadow: var(--shadow); min-height: 44px; max-width: 100%; text-align: left; white-space: normal; }
.yh3 .yh-go:hover { background: var(--accent-soft); }
.yh3 .trophies.tr3 { margin-top: 0; }
.medal-group { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 14px 3px 4px; border: 0; border-radius: var(--r-pill); background: var(--on-chip);
  box-shadow: inset 0 0 0 1.5px var(--on-ring); color: inherit; font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.medal-group:hover { background: rgba(0, 0, 0, .22); }
.medal-group:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.medal-group .medal { width: 38px; height: 38px; flex: none; }
.medal-group b { font-weight: 800; }
.tr3 .medal-more { height: 44px; }
.subject-block.flash { animation: flash-step 1.6s ease-out; border-radius: var(--r-lg); }
@media (max-width: 760px) {
  .year-hero.yh3 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text ring" "more more"; gap: 14px; }
  .year-hero.yh3 > .ring { display: grid; --size: 72px !important; }
  .year-hero.yh3 .yh-next { display: none; }
  .yh3 .yh-go { width: 100%; justify-content: space-between; min-height: 48px; }
  .yh3 .tr-sem { display: none; }
  .yh3 .trophies.tr3, .yh3 .tr3 .tr-shelf { width: 100%; }
  .yh3 .tr3 .tr-shelf { gap: 8px; }
  .medal-group .medal { width: 34px; height: 34px; }
}
/* Lernjahr-Liste: einladende Kachel für das nächste Lernjahr, sichtbarer Öffnen-Hinweis am Handy */
.year-new { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 20px; align-items: center; width: 100%; margin: 0; padding: 20px 24px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); box-shadow: none; transition: border-color .15s, background .15s; }
.year-new:hover { border-color: var(--accent); background: var(--accent-soft); }
.year-new:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.yn-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-lg); background: var(--accent); color: var(--accent-text); }
.yn-text { display: grid; gap: 4px; min-width: 0; }
.yn-text strong { font-size: var(--fs-lg); }
.yn-text .small { max-width: 70ch; line-height: 1.45; }
.yn-steps { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.yn-steps li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.yn-steps b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: var(--fs-2xs); }
.yc-open-mob { display: none; }
@media (max-width: 900px) { .yn-steps { display: none; } .year-new { grid-template-columns: auto minmax(0, 1fr); padding: 16px; } }
@media (max-width: 760px) {
  .yc-open-mob { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--accent-ink); font-weight: 700; }
  .year-card .yc-meta { white-space: normal; overflow: visible; }
  .year-card .yc-title h2 { white-space: normal; overflow: visible; }
}
/* Lernjahr-Editor: Speicherleiste im Seitenfluss (verdeckt keine Knöpfe), Hinweis je Gerät */
.save-bar.ye-bar[hidden] { display: none; }
.save-bar.ye-bar .btn { min-height: 44px; }
.ye-hint-mob { display: none; }
.ye-danger { margin-top: 18px; }
.ye-nodel { display: flex; align-items: flex-start; gap: 8px; max-width: 70ch; }
.ye-nodel .icon { flex: none; margin-top: 2px; }
@media (max-width: 760px) { .ye-hint-desk { display: none; } .ye-hint-mob { display: block; } }
/* Elternseite: Ring mit klarer Aussage, Kennzahlen als Sprungmarken, ruhige Zeilen */
.parent-sum.ps3 .ps-tip { color: var(--text); font-size: var(--fs-base); }
.parent-sum.ps3 .ps-tip .icon { color: var(--warn); }
.parent-sum.ps3 .ps-ring { width: auto; min-width: 150px; }
.ps-ring-text { display: grid; justify-items: center; gap: 1px; }
.ps-ring-text strong { font-size: var(--fs-md); color: var(--text); }
.ps-ring-text small { margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--line); font-size: var(--fs-xs); color: var(--muted); cursor: help; }
.kpi-row.pf3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
button.kpi.pf-kpi, button.kpi.sd-kpi { width: 100%; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
button.kpi.pf-kpi:hover, button.kpi.sd-kpi:hover { border-color: var(--accent); transform: translateY(-1px); }
button.kpi.pf-kpi:focus-visible, button.kpi.sd-kpi:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pf-kpi .pf-short { display: none; }
.pf-kpi b { white-space: nowrap; }
.parent-work.flash, .parent-recent.flash { animation: flash-step 1.6s ease-out; }
.parent-work, .parent-recent { scroll-margin-top: 84px; }
.pw-row.pw3 { grid-template-columns: 44px minmax(0, 1fr) 176px; }
.pw3 .pw-due { display: flex; justify-content: flex-end; min-width: 0; }
.pw3.fresh .pw-bar i { min-width: 0; }
.parent-grids { margin-top: 14px; }
.parent-grids .kr-section { margin: 0; }
@media (max-width: 1100px) { .kpi-row.pf3 .kpi-ic { width: 36px; height: 36px; } }
@media (max-width: 760px) {
  .parent-sum.ps3 { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  /* D3: zuerst der Satz (Botschaft), danach eine Zeile mit kleinem Ring und „n von m geschafft“; die Erklärung steht hinter „Was heißt das?“ */
  .parent-sum.ps3 { align-items: start; }
  .parent-sum.ps3 .ps-main { grid-column: 2; grid-row: 1; }
  .parent-sum.ps3 .ps-ring { display: flex; align-items: center; justify-content: flex-start; gap: 10px; grid-column: 1 / -1; grid-row: 2; min-width: 0; text-align: left; padding-top: 10px; border-top: 1px solid var(--line); }
  .ps3 .ps-ring-text small { display: none; }
  .parent-sum.ps3 .ps-ring .ring { --size: 56px !important; }
  .ps3 .ps-ring-text { justify-items: start; }
  .ps3 .ps-ring-text small { margin-top: 0; padding-top: 0; border-top: 0; }
  .kpi-row.pf3 { gap: 8px; }
  .kpi-row.pf3 .pf-kpi { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; border-radius: var(--r-lg); min-height: 64px; }
  .kpi-row.pf3 .kpi-ic { display: none; }
  .kpi-row.pf3 .pf-kpi b { font-size: var(--fs-xl); }
  .kpi-row.pf3 .pf-kpi > span:last-child { font-size: var(--fs-xs); }
  .pf-kpi .pf-long { display: none; }
  .pf-kpi .pf-short { display: inline; }
  .pw-row.pw3 { grid-template-columns: 44px minmax(0, 1fr); }
  .pw3 .pw-due { grid-column: 2; justify-content: flex-start; }
  .parent-grids > summary { flex-wrap: wrap; }
  .all-paths.parent-grids > summary .f3-sub { display: block; order: 5; flex-basis: 100%; padding-left: 28px; }
  .all-paths.fold3 > summary .f3-title { flex: 1 1 0; min-width: 0; }
}
/* Detailseite Schüler:in: Sprungleiste, Kennzahlen im Standardformat, antippbare Zeilen, Journal gekürzt */
.sd-tabs { position: sticky; top: 60px; z-index: 12; display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sd-tabs::-webkit-scrollbar { display: none; }
.sd-tab { flex: none; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; white-space: nowrap; }
.sd-tab:hover { border-color: var(--accent); }
.sd-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.sd-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#sd-ueberblick, #sd-woche, #sd-journal, #sd-checks, #sd-jahr, #sd-raster, #sd-pfade, #sd-zuletzt { scroll-margin-top: 132px; }
.sd-kpis .sd-kpi b { white-space: nowrap; }
.sh-actions.sh3 { flex-wrap: wrap; justify-content: flex-end; }
.sh3 .sh-talk { white-space: nowrap; }
.need.need3.tap { display: block; padding: 0; }
.need3 .need-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 8px 6px 8px 0; border: 0; border-radius: var(--r-md); background: none;
  font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.need3 .need-row:hover { background: var(--surface-2); }
.need3 .need-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.need-go { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.sd-journal { display: grid; gap: 0; min-width: 0; }
.sd-journal:not(.all) .staff-journal .jr-list > li:nth-child(n+3) { display: none; }
.sd-journal:has(.sd-jmore) > .staff-journal { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.sd-jmore { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 0 0 22px 22px;
  background: var(--surface); color: var(--accent-ink); font: inherit; font-size: var(--fs-base); font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.sd-jmore:hover { background: var(--surface-2); }
/* Schülerdetail: Zonen Jetzt entscheiden, Diese Woche, Stand, Im Detail */
.sdz { scroll-margin-top: 120px; }
.sdz .sz-grid > .card, .sdz .sz-grid > .sd-fold, .sd-stack > .card, .sd-stack > .sd-fold, .sd-detail-stack > .card, .sd-detail-stack > .sd-fold, .sdz .sz-grid > .kpi-row { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sdz .sz-grid > .need-card { height: 100%; }
/* Diese Woche: der Wochenplan braucht Breite (fünf Tage nebeneinander), sonst brechen die Wörter */
@media (min-width: 861px) { .sd-diese-woche .sz-grid > :first-child { grid-column: 1 / -1; } }
@media (min-width: 1500px) {
  .sd-diese-woche .sz-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, .9fr); }
  .sd-diese-woche .sz-grid > :first-child { grid-column: auto; }
}
.sd-stack { display: grid; gap: 12px; align-content: start; min-width: 0; }
.sd-stack > .kpi-row { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sd-detail-stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.sd-sub.section-title { margin: 14px 0 0; scroll-margin-top: 120px; }
.sd-detail-stack .sd-subjects { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .sd-detail-stack .sd-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.sd-detail-stack .sd-subjects > .sd-fold { margin: 0; }
.proof-old { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.proof-old > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 700; color: var(--accent-ink); font-size: var(--fs-sm); }
.proof-old > summary::-webkit-details-marker { display: none; }
.proof-old[open] > summary .icon { transform: rotate(180deg); }
.sd-can .sdc-last { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 10px; font-size: var(--fs-base); }
.sd-can .sdc-last .icon { flex: none; margin-top: 3px; color: var(--accent-ink); }
.sdc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sdc-list li { display: flex; align-items: center; gap: 12px; }
.sdc-main { display: grid; min-width: 0; line-height: 1.3; }
.sd-fold > .kr-section > .section-title { display: none; }
.sd-fold > .kr-section { padding: 12px 14px; }
.sd-jmore .icon { transition: transform .2s; }
.sd-journal.all .sd-jmore .icon { transform: rotate(180deg); }
@media (max-width: 860px) {
  /* Runde 7: Reiter brechen um statt abgeschnitten aus dem Bild zu laufen */
  .sd-tabs { flex-wrap: wrap; overflow: visible; position: static; border-radius: var(--r-lg); }
  .sd-tab { min-height: 44px; }
  .sd-kpis .sd-kpi { padding: 12px; column-gap: 10px; }
  .sd-kpis .sd-kpi .kpi-ic { width: 34px; height: 34px; border-radius: var(--r-md); }
  .sd-kpis .sd-kpi b { font-size: var(--fs-xl); }
  .sd-kpis .sd-kpi > span:last-child { font-size: var(--fs-xs); }
  .sh-actions.sh3 { justify-content: flex-start; }
  .sh-actions.sh3 .sh-primary { flex: 1 1 100%; order: 2; }
  .need3 .need-go-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .need3 .need-row { position: relative; }
  .sdz .sw-day:not(:has(.sw-it)) { opacity: 1; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
  .sdz .sw-day:not(:has(.sw-it))::after { content: 'nichts geplant'; font-size: var(--fs-xs); color: var(--muted); }
}
.parent-cols.pc3 { margin-top: 16px; }
/* Iteration 3 · lernjahr-eltern · Feinschliff */
.yt-gantt.yt3:not(.mini) .yt-bar.narrow .yt-t { -webkit-line-clamp: 3; }
.kpi-row.pf3 .kpi.pf-kpi:last-child { grid-column: auto; }
.ap-more.ap3 > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.ap-more.ap3 > summary::-webkit-details-marker { display: none; }
.ap-more.ap3 .ap3-chev { transition: transform .2s; }
.ap-more.ap3[open] .ap3-chev { transform: rotate(180deg); }
@media (max-width: 760px) {
  .years-foot > .muted { display: none; }
  .parent-side .coach-card p { display: none; }
}
/* Iteration 3 · coaching-freigabe */
/* Coaching-Übersicht: Kennzahlen sind Filter (2x2 am Handy, Symbol links, Text ohne Kürzung) */
.cc-kpis .kpi.cc-kpi { appearance: none; font: inherit; text-align: left; color: inherit; min-width: 0; }
button.kpi.cc-kpi { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.kpi.cc-kpi:hover { border-color: var(--accent); }
button.kpi.cc-kpi:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.kpi.cc-kpi[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.cc-kpis .kpi.is-zero b { color: var(--muted); }
.cc-kpis .kpi > span:last-child { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 600px) {
  /* vier Kennzahlen als 2 x 2: Zahl oben, Beschriftung darunter, nichts wird abgeschnitten */
  .kpi-row.cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .cc-kpis .kpi { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding: 9px 10px 10px; border-radius: var(--r-md); text-align: center; justify-items: center; align-content: start; min-height: 64px; }
  .cc-kpis .kpi .kpi-ic { display: none; }
  .cc-kpis .kpi b { font-size: var(--fs-xl); line-height: 1.2; }
  .cc-kpis .kpi > span:last-child { font-size: var(--fs-xs); line-height: 1.25; white-space: normal !important; overflow-wrap: break-word; }
  .cc-card { gap: 6px; }
  .cc-board { gap: 12px; }
  .cc-group { padding: 10px 8px; }
}
.cc-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: -4px 0 14px; padding: 4px 6px 4px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: var(--fs-sm); font-weight: 700; }
.cc-filter > .icon { color: var(--accent-ink); flex: none; }
.cc-filter > span { flex: 1 1 auto; min-width: 0; }
.cc-filter .btn { min-height: 44px; }
.cc-board.filtered { grid-template-columns: minmax(0, 1fr); }
.cc-board.filtered .cc-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
/* Marken: kurze Wörter, brechen um statt abzuschneiden; „+n“ klappt an Ort und Stelle auf */
.cc-card .cc-chips { flex-wrap: wrap; gap: 5px; }
.cc-card .cc-chips .chip { display: inline-flex; flex: none; max-width: 100%; overflow: visible; text-overflow: clip; white-space: nowrap; }
.cc-card .cc-chips .chip .icon { margin-right: 0; }
.chip.chip-more { appearance: none; position: relative; font: inherit; font-size: var(--fs-xs); font-weight: 800; border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.chip.chip-more::after { content: ""; position: absolute; inset: -10px -8px; }
.chip.chip-more:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.chip-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Aktionszeile: bricht um; Kommentar als sichtbarer Knopf oder gleich als Feld */
.cc-card .cc-acts, .cc-card.is-due .cc-acts { flex-wrap: wrap; }
.cc-acts .cc-note-btn { margin-left: 0; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.cc-acts .cc-note-btn:hover { border-color: var(--accent); }
.cc-q { display: flex; align-items: center; gap: 6px; flex: 1 1 120px; min-width: 0; }
.cc-q .cc-q-inp { flex: 1; min-width: 0; width: auto; margin: 0; min-height: 36px; padding: 6px 12px; border-radius: var(--r-md); border: 1px solid var(--field-line); background: var(--surface-2); font-size: var(--fs-sm); }
.cc-q .cc-q-inp::placeholder { color: var(--muted); opacity: 1; }
.cc-q .cc-q-inp:hover { border-color: var(--line); }
.cc-q .cc-q-inp:focus { background: var(--surface); border-color: var(--accent); }
.cc-q-send, .cc-acts .cc-q-hint { display: none; }
.cc-acts.typing .cc-q-send { display: inline-flex; }
.cc-acts.typing .cc-talk { display: none; }
/* Gelungenes: eigene ruhige Zeile über den Hinweisen (keine Marke, damit höchstens drei Marken je Zeile bleiben) */
.cc-won { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--fs-sm); line-height: 1.35; color: var(--ok); }
.cc-won .icon { flex: none; margin-top: 2px; }
.cc-won b { font-weight: 800; }
.cc-won span { color: var(--text); }
.cc-won b { color: var(--ok); }
/* Handy, nicht fällig: Name und Gespräch-Knopf in einer Zeile */
.cc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cc-head .cc-who { flex: 1 1 0; min-width: 0; }
.cc-talk-mini { flex: none; min-height: 44px; margin: 0; }
.cc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 2px; }
.cc-line > .cc-won { flex: 1 1 0; min-width: 0; }
.cc-line > .cc-won { font-size: var(--fs-xs); }
.cc-line > .cc-more { margin-left: auto; }
.cc-line > .cc-more { flex: 0 0 auto; }
.cc-line > .cc-more[open] { flex-basis: 100%; }
.cc-card.is-phone { gap: 4px; padding: 12px 14px; }
.cc-card.is-phone .cc-more > summary { min-height: 32px; }
.cc-more-icon > summary { justify-content: center; min-width: 32px; padding: 0; }
/* Läuft: kompakte Karte, Einzelheiten erst nach „Mehr“ */
.cc-card.is-compact { gap: 6px; }
.cc-card.is-compact .cc-acts { justify-content: flex-end; }
.cc-more { display: grid; gap: 8px; }
.cc-more > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); cursor: pointer; list-style: none; }
.cc-more > summary::-webkit-details-marker { display: none; }
.cc-more[open] > summary .icon { transform: rotate(180deg); }
.cc-more > :not(summary) { margin-top: 8px; }
.cc-more[open] { gap: 0; }
.cc-acts.typing .cc-q-hint { display: block; flex: 1 1 100%; margin: 0; }
.cw-top .week-nav.compact .btn { display: inline-flex; }
@media (max-width: 860px) {
  .cc-q .cc-q-inp { min-height: 44px; font-size: var(--fs-md); }
  .cc-q-send { min-height: 44px; }
  .cw-top .week-nav.compact .btn { min-height: 44px; }
  .cc-card.is-due .cc-talk { flex: 0 1 auto; }
}

/* Datumsfeld der App: Datum ausgeschrieben, Kalender des Geräts unsichtbar darüber, Schnellwahl darunter */
.df { display: grid; gap: 6px; min-width: 0; }
.df-box { position: relative; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--field-line); background: var(--surface); color: var(--text); font-weight: 600; }
.df-box > .icon { flex: none; color: var(--muted); }
.df-box .df-txt { flex: 1; min-width: 0; white-space: nowrap; }
.df-box.is-empty .df-txt { color: var(--muted); font-weight: 500; }
.df-box:hover { border-color: var(--accent); }
.df-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.df-box .df-native { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.df-box .df-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.df-clear { appearance: none; position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
.df-clear::after { content: ""; position: absolute; inset: -6px; }
.df-clear:hover { background: var(--surface-2); color: var(--text); }
.df-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.df-q { appearance: none; font: inherit; font-size: var(--fs-xs); font-weight: 700; min-height: 32px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.df-q:hover { border-color: var(--accent); }
.df-q[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.df-q:focus-visible, .df-clear:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 860px) { .df-q { min-height: 44px; padding-inline: 14px; } }

/* Gesprächsseite: Kennzahlen im gemeinsamen Kachel-Stil (2x2), springen zur Liste */
.tk-since .tk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.tk-kpis .kpi { appearance: none; font: inherit; color: inherit; text-align: left; min-width: 0; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 0; align-content: center; padding: 10px 12px; border-radius: var(--r-lg); box-shadow: none; background: var(--surface-2); border-color: transparent; }
.tk-kpis .kpi .kpi-ic { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: var(--r-md); }
.tk-kpis .kpi .kpi-ic .icon { width: 17px; height: 17px; }
.tk-kpis .kpi b { font-size: var(--fs-xl2); }
.tk-kpis .kpi > span:last-child { font-size: var(--fs-xs); line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip; }
.tk-kpis .kpi.is-zero b { color: var(--muted); }
button.kpi.tk-kpi { cursor: pointer; transition: border-color .15s; }
button.kpi.tk-kpi:hover { border-color: var(--accent); }
button.kpi.tk-kpi:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tk-since .tk-sec, .tk-since .tk-done { scroll-margin-top: 84px; }
/* Offene Vereinbarungen: Löschen mit 44px-Ziel und „Rückgängig“ */
.ag-list.coach li .tk-del { min-width: 44px; width: 44px; height: 44px; flex: none; }
.ag-list.coach li.is-gone { display: block; padding: 0; }
.tk-undo { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 48px; padding: 6px 8px 9px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.tk-undo > .icon { flex: none; color: var(--muted); }
.tk-undo-t { flex: 1 1 140px; min-width: 0; }
.tk-undo .btn { flex: none; min-height: 44px; }
.tk-undo-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left center; animation: tk-countdown 5s linear forwards; }
@keyframes tk-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .tk-undo-timer { animation: none; } }
/* Leitfragen: kurze Marken, die umbrechen */
.tk-talk .tk-q { flex-wrap: wrap; overflow: visible; gap: 6px; margin: 0 0 8px !important; padding-inline: 0; }
.tk-q-lbl { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-right: 2px; }
.tk-talk .tk-q .q { white-space: nowrap; }
.tk-talk textarea.need { border-color: var(--danger); }
.new-ags .new-ag { grid-template-columns: minmax(0, 1fr) minmax(170px, auto); align-items: start; }
.tk-talk .tk-dates { align-items: start; }
.tk-dates label { margin-bottom: 5px; }
.tk-rhythm-form .df { margin-bottom: 4px; }
.tk-save .tk-discard { flex: none; }
@media (max-width: 960px) {
  /* Die Leiste haftet erst, wenn es etwas zu speichern gibt */
  .tk-save:not(.dirty) { position: static; margin: 18px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
  .tk-save .tk-discard { flex: 0 0 auto; min-height: 48px; }
}
@media (max-width: 600px) {
  .tk-q-lbl { display: none; }
  .new-ags .new-ag { grid-template-columns: minmax(0, 1fr); }
  .tk-talk .tk-dates { grid-template-columns: minmax(0, 1fr); }
}

/* Freigabe: Abgabe groß in der Mitte, Aufgabe schmal daneben, Entscheidung haftet rechts */
@media (min-width: 861px) { .review-grid:not(.can-decide) { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); } }
@media (min-width: 1250px) {
  .review-grid.can-decide { grid-template-columns: minmax(220px, 270px) minmax(0, 1fr) minmax(290px, 320px); }
  .review-grid .review-task { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 108px); overflow-y: auto; }
}
.review-sub .sub-imgs { grid-template-columns: minmax(0, 1fr); }
.review-sub .sub-imgs:has(> a:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review-sub .sub-imgs img { max-height: min(76vh, 900px); }
.review-sub .older .sub-imgs { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.review-sub .older .sub-imgs img { max-height: 240px; }
.rv-zoomable { position: relative; display: block; border-radius: var(--r-md); cursor: zoom-in; }
.rv-zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rv-zoom-badge { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); color: var(--text); border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 700; box-shadow: var(--shadow); }
.rv-zoomable:hover .rv-zoom-badge { border-color: var(--accent); color: var(--accent-ink); }
dialog.rv-zoom-dlg { width: min(1280px, calc(100% - 24px)); }
dialog.rv-zoom-dlg .dlg-body { padding: 12px; max-height: 78vh; }
.rv-zoom-stage { display: grid; place-items: center; overflow: auto; max-height: calc(78vh - 24px); border-radius: var(--r-md); background: var(--surface-2); }
.rv-zoom-stage img { display: block; max-width: 100%; max-height: calc(78vh - 24px); object-fit: contain; cursor: zoom-in; }
.rv-zoom-stage.full { place-items: start; }
.rv-zoom-stage.full img { width: 200%; max-width: none; max-height: none; cursor: zoom-out; }
/* Aufgabe: am Handy eine Zeile zum Aufklappen */
.rv-task > summary { display: none; list-style: none; }
.rv-task > summary::-webkit-details-marker { display: none; }
.rv-task .chips { margin-bottom: 8px; }
@media (max-width: 600px) {
  .review-task > .rt-label { display: none; }
  .review-grid .review-task.card { padding-block: 4px; }
  .rv-task > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-size: var(--fs-base); font-weight: 800; color: var(--text); }
  .rv-task > summary > .icon:first-child { color: var(--muted); }
  .rv-task-t { flex: 1; min-width: 0; }
  .rv-task-closed, .rv-task-open, .rv-task > summary > .icon:last-child { color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; }
  .rv-task[open] .rv-task-closed, .rv-task:not([open]) .rv-task-open { display: none; }
  .rv-task[open] > summary > .icon:last-child { transform: rotate(180deg); }
  .rv-task[open] { padding-bottom: 14px; }
  .rv-task[open] > summary { margin-bottom: 6px; }
}
/* Textbausteine und Tastenkürzel in der Entscheidung */
.rv-snips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.rv-snip { appearance: none; font: inherit; font-size: var(--fs-xs); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 32px; padding: 4px 12px 4px 8px; border-radius: var(--r-pill); border: 1px dashed var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap; }
.rv-snip .icon { width: 14px; height: 14px; }
.rv-snip:hover { border-color: var(--accent); color: var(--accent-ink); }
.rv-snip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.decide-key { display: none; margin: 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.decide-key kbd { font: inherit; font-weight: 700; padding: 1px 6px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
@media (min-width: 1250px) and (hover: hover) { .decide-key { display: block; } }
/* Bausteine und nächster Schritt: zwei beschriftete Gruppen, am Handy erst bei offener Leiste */
.rv-extras { display: grid; gap: 10px; min-width: 0; }
.rv-snips { align-items: center; }
.rv-snip-label { flex: 1 0 100%; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.rv-next { display: grid; gap: 6px; }
.rv-next > summary { display: none; list-style: none; }
.rv-next > summary::-webkit-details-marker { display: none; }
/* die Leiste blendet sonst alle Beschriftungen aus: diese bleibt sichtbar */
.decide-bar .rv-next > label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
@media (max-width: 600px) {
  .rv-next > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: var(--fs-base); color: var(--accent-ink); cursor: pointer; }
  .rv-next > summary .decide-opt-inline { font-weight: 600; color: var(--muted); }
  .rv-next > summary .icon { stroke: var(--accent); }
}
.rv-next input { width: 100%; margin: 0; }
.rv-next input.need { border-color: var(--danger); }
.decide-opt-inline { font-weight: 600; color: var(--muted); }
.rv-next-shown { font-size: var(--fs-base); }
.chip.rv-conf { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1249px) {
  .decide-bar:not(.open) .rv-extras { display: none; }
  .review-grid.can-decide .decide-bar > .rv-extras { grid-column: 1 / -1; }
  .rv-snip { min-height: 44px; padding-inline: 10px 14px; }
}
@media (max-width: 600px) {
  /* offene Leiste: höchstens etwa ein Drittel des Bildschirms für Bausteine, darüber hinaus innen scrollen */
  /* Runde 7: Bausteine brechen um statt abgeschnitten aus dem Bild zu laufen */
  .decide-bar .rv-snips { gap: 6px; flex-wrap: wrap; margin-inline: -2px; padding: 2px; }
  .decide-bar .rv-snip-label { flex: none; align-self: center; }
  .rv-next:not([open]) > :not(summary) { display: none; }
  .rv-next[open] > summary { display: none; }
  .rv-next input { min-height: 44px; }
  .decide-bar .btn-row .btn, .decide-bar .btn-row .btn:not(.secondary) { flex: 1 1 auto; font-size: var(--fs-base); }
  .decide-bar .btn-row .btn .icon { display: none; }
}
/* Iteration 3 · coaching-freigabe: Feinschliff nach dem ersten Blick */
@media (min-width: 1250px) { .review-grid.can-decide { grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(300px, 340px); } }
@media (max-width: 600px) {
  .tk-kpis .kpi { column-gap: 8px; padding: 9px 10px; }
  .tk-kpis .kpi .kpi-ic { width: 30px; height: 30px; border-radius: var(--r-sm); }
  .tk-dates .df { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .tk-dates .df .df-box { flex: 1 1 150px; }
}
/* Iteration 3 · lernjahr-eltern · Sprungleiste als schwebende Pille (kein Farbbalken über dem Seitenverlauf) */
.sd-tabs { width: fit-content; max-width: 100%; padding: 5px; border-radius: var(--r-pill); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--shadow); }
.sd-tabs .sd-tab { border-color: transparent; background: transparent; }
.sd-tabs .sd-tab:hover { background: var(--surface-2); border-color: transparent; }
.sd-tabs .sd-tab.on { background: var(--accent); color: var(--accent-text); }
@media (max-width: 860px) {
  .sd-tabs { top: 62px; margin: 0 0 10px; padding: 4px; }
  #sd-ueberblick, #sd-woche, #sd-journal, #sd-checks, #sd-jahr, #sd-raster, #sd-pfade, #sd-zuletzt { scroll-margin-top: 136px; }
}
/* Iteration 3 · coaching-freigabe: Speicherleiste am Handy einzeilig (Verwerfen links, Speichern rechts), Abstand im Rhythmus-Dialog */
@media (max-width: 960px) {
  .tk-save.dirty { flex-wrap: wrap; gap: 8px; }
  .tk-save.dirty .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; white-space: nowrap; }
  .tk-save.dirty .tk-discard { flex: 0 0 auto; }
}
@media (max-width: 600px) { .tk-save.dirty .btn .icon { display: none; } }
.tk-rhythm-form .df { margin-top: 0; }
.tk-rhythm-form select { margin-bottom: 14px; }
/* Iteration 3 · coaching-freigabe: bis 1500px schmalere Seitenspalten, damit die Abgabe die Hälfte der Breite bekommt */
@media (min-width: 1250px) and (max-width: 1500px) {
  .review-grid.can-decide { grid-template-columns: 220px minmax(0, 1fr) 310px; }
  .review-grid.can-decide .decide-bar { padding: 18px 16px; }
  .review-grid .review-task.card { padding: 18px; }
}
@media (min-width: 1250px) { .rv-snip { padding: 4px 9px 4px 6px; } .rv-snips { gap: 6px 5px; } }
/* Iteration 3 · coaching-freigabe: schmale Aufgabenspalte ohne abgeschnittene Zeilen */
.review-task .rt-label { flex-wrap: wrap; row-gap: 0; }
.review-task .rt-label .muted { white-space: nowrap; }
.review-task .rv-task .btn { max-width: 100%; white-space: normal; text-align: left; }
/* Iteration 3 · coaching-freigabe: Unterzeile der Coachee-Karte bricht um statt abzuschneiden */
.cc-card .cc-name .muted { white-space: normal; overflow: visible; text-overflow: clip; }
/* Iteration 3 · coaching-freigabe: „n erledigt“ der Vereinbarungen mit dem Pfeil der App statt des Browser-Dreiecks */
.agreements-card .ag-done > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.agreements-card .ag-done > summary::-webkit-details-marker { display: none; }
.agreements-card .ag-done > summary::before, .agreements-card .ag-done > summary::marker { content: none; }
.agreements-card .ag-done[open] > summary .icon { transform: rotate(180deg); }

/* ===== Schüler-Startseite: Jetzt, Neu für dich, Diese Woche, Dein Stand ===== */
.s-home .hz { margin: 0; }
.s-home .hz-t { margin: 24px 0 12px; }
.hz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hz-head .btn { margin-top: 12px; }
.hz-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.hz-grid > * { min-width: 0; margin: 0; }
.hz-grid > .kpi-tile { align-self: start; }
.hz-hero .next-up { margin: 0; height: 100%; }
.hello-link { font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; display: inline-block; }
/* Neu für dich: Karten statt einer großen Rahmenkarte */
.hz-new .fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.hz-new .fb-list > li { min-width: 0; }
.hz-new .fb-more { margin-top: 10px; }
.fb-item.proof { background: var(--accent-soft); }
.fb-item.proof .fb-ic { background: var(--accent); color: var(--accent-text); }
.fb-item.proof .fb-go { color: var(--accent-ink); }
/* Diese Woche: Wochenbalken */
.wk-tile { display: flex; flex-direction: column; }
.wk-tile .week, .wk-disc .week { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.wk-tile .week { flex: 1; display: flex; flex-direction: column; }
.hz-week .week-days { min-height: 110px; }
.wk-tile .week-days { flex: 1; align-items: end; }
.hz-week .week-days li { justify-content: flex-end; height: 100%; }
.hz-week .week-days .dot { width: 100%; max-width: 46px; border-radius: var(--r-md); height: calc(30px + var(--n, 0) * 15px); transition: height .4s; }
.hz-week .week-days li.on .dot { background: var(--ok-bright); color: var(--ok-on); }
.hz-week .week-days li:not(.on) .dot { height: 6px; max-width: 46px; border: 0; border-radius: var(--r-xs); background: var(--surface-3); opacity: 1; }
.hz-week .week-days li.today:not(.on) .dot { background: var(--accent); opacity: .55; }
details.wk-disc { margin-top: 0; }
details.ov-disc.wk-disc > summary .ov-title { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); color: var(--text); font-weight: 700; }
/* Jetzt, Startphase */
.hz-now .welcome-card { margin: 0; height: 100%; }
.hz-now .welcome-card .wc-steps { grid-template-columns: minmax(0, 1fr); margin-top: 14px; gap: 8px; }
.hz-now .welcome-card .wc-steps li { padding: 10px 12px; }
/* Dein Stand: gleich gebaute Kennzahl-Kacheln */
.stand-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.hz-stand .can-kpi .kpi-lbl, .can-kpi .kpi-lbl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.can-kpi .can-last { font-weight: 500; }
.fb-can .fb-can-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-weight: 600; }
.hz-stand .kpi-tile, .hz-week .kpi-tile { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; padding: 14px 16px; }
.hz-stand .kpi-tile b, .hz-week .kpi-tile b { font-size: var(--fs-2xl); }
.hz-stand .kpi-tile .kpi-lbl, .hz-week .kpi-tile .kpi-lbl { font-size: var(--fs-sm); line-height: 1.3; }
.hz-stand .kpi-tile.au-kpi b, .hz-week .kpi-tile.au-kpi b { font-size: var(--fs-xl2); line-height: 1.2; white-space: normal; overflow-wrap: break-word; }
.wk-empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; }
.wk-empty .btn { margin-top: 4px; }
.kpi.no-value .kpi-lbl { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; font-size: var(--fs-md); color: var(--text); }
@media (min-width: 861px) {
  .hz-new .fb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hz-week .hz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hz-week .hz-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stand-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .hz-grid-now { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .hz-grid-now > .hz-hero:only-child { grid-column: 1 / -1; }
  .hz-new .fb-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hz-week .hz-grid { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
  .hz-week .hz-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .stand-row { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
}
@media (min-width: 1100px) and (max-width: 1399px) {
  .hz-stand .kpi-tile { padding: 12px 14px; column-gap: 10px; }
  .hz-stand .kpi-tile .kpi-ic { width: 38px; height: 38px; }
}
/* Handy: Reihenfolge Jetzt, Neu für dich, Heute, Dein Stand, Lernpfade, Diese Woche (steht im Markup, siehe plannerView) */
@media (max-width: 860px) {
  .s-home { display: flex; flex-direction: column; gap: 14px; }
  .s-home > .hello { margin-bottom: 0; }
  .s-home .hz-now > .hz-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
  .s-home > .today-tile, .s-home > .welcome-card { margin: 0; }
  .s-home .hz-t { margin: 4px 0 10px; }
  .hz-head .btn { margin-top: 0; }
  .hz-week .week-days { min-height: 84px; }
  .hz-week .week-days .dot { height: calc(26px + var(--n, 0) * 9px); }
  .stand-row { gap: 10px; grid-auto-rows: 1fr; }
  .hz-stand .kpi-tile { padding: 10px 12px; column-gap: 8px; border-radius: var(--r-lg); }
  .hz-stand .kpi-tile .kpi-ic { width: 30px; height: 30px; border-radius: var(--r-sm); }
  .hz-stand .kpi-tile .kpi-ic .icon { width: 16px; height: 16px; }
  .hz-stand .kpi-tile b { font-size: var(--fs-xl); }
  .hz-stand .kpi-tile .kpi-lbl { font-size: var(--fs-xs); line-height: 1.25; hyphens: manual; overflow-wrap: break-word; }
  .hz-stand .kpi-tile { min-height: 76px; }
  .hz-stand .kpi-tile.au-kpi b { font-size: var(--fs-base); overflow-wrap: normal; }
  .hz-stand .kpi-tile { align-self: stretch; }
}
/* Iteration 3 · schueler-lernpfade */
/* --- Schüler-Start: Kennzahlen ohne Abschneiden, antippbar --- */
/* Wochenspur: leere Tage als flache Grundlinie statt gestrichelter Platzhalter */
/* Selbstständigkeit: was du darfst, in einem Satz */
/* Lernpfade mit Fächer-Filter direkt darüber */
.s-paths { margin-top: 8px; }
.s-paths > .subj-strip { margin-bottom: 4px; }
/* Startphase: erster Schritt antippbar, Karte nicht höher als nötig */
.s-home .wc-steps li.has-link { padding: 0; }
.s-home .wc-steps .wc-go { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; min-height: 48px; box-sizing: border-box; border-radius: var(--r-lg); color: inherit; text-decoration: none; }
.s-home .wc-steps .wc-go > b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-text); flex: none; }
.s-home .wc-steps .wc-go > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.s-home .wc-steps .wc-go > .icon { flex: none; color: var(--accent-ink); }
.s-home .wc-steps a.wc-go:hover { background: var(--accent-soft); }
.s-home .wc-steps a.wc-go:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.s-home .wc-steps li:not(.now) { background: transparent; border-color: transparent; padding-block: 6px; }
@media (max-width: 899px) {
  /* Handy: Lernpfade gleich nach dem nächsten Schritt, Zahlen kompakt, Rest danach */
  .s-home { display: flex; flex-direction: column; }
  /* "Heute" steht direkt unter "Weiter mit": die zweite Zeile löst sich auf, ihre Kacheln werden einzeln einsortiert */
  .s-home .s-paths { margin-top: 0; margin-bottom: 18px; }
}
@media (max-width: 600px) {
  /* Fächer als ruhige Filter-Chips: ganze Namen, weicher Rand, bewusst angeschnitten */
  .s-paths > .subj-strip { display: flex; gap: 8px; margin-inline: -16px; padding: 4px 16px 10px; scroll-padding-inline: 16px; }
  .s-paths .subj-tile, .s-paths .subj-tile.all { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); white-space: nowrap; box-shadow: none; transform: none; }
  .s-paths .subj-tile .art, .s-paths .subj-tile .ring { display: none; }
  .s-paths .subj-tile .st-name { font-size: var(--fs-base); margin: 0; }
  .s-paths .subj-tile .st-meta { font-size: var(--fs-xs); opacity: 1; padding: 1px 8px; border-radius: var(--r-pill); background: rgba(0,0,0,.3); }
  .s-paths .subj-tile.all .st-meta { background: var(--surface-2); color: var(--muted); }
  .s-paths .subj-tile.all { border: 1.5px solid var(--line); }
  .s-paths .subj-tile.on, .s-paths .subj-tile.all.on { transform: none; outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: none; }
  .s-paths .subj-tile.all.on { border: 1.5px solid var(--accent); }
  .s-paths .subj-tile.on:not(.all)::after { position: static; order: -1; width: 20px; height: 20px; font-size: var(--fs-2xs); }
  .s-paths .subj-tile.on:not(.all) .st-name { margin-top: 0; }
}

/* Handy: Tippflächen auf den Schüler-Seiten mindestens 44 px hoch */
@media (max-width: 700px) {
  .done-fold > summary.section-title, .tt-link, .goal-starter, .proof-card .pc-main > .btn, .pf-form, .plan-step-done, .hz-head .btn, .tp-starts .chip.soft, .path-goals > a.small, main#main > a.back, main#main > button.back { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .done-fold > summary.section-title { display: flex; justify-content: flex-start; }
  .dlg-head .icon-btn { min-width: 44px; height: 44px; }
}
/* --- Schüler-Lernpfad --- */
/* ein ruhiges Abzeichen je Aufgabe, normale Schreibweise */
.path-layout .task > summary .ttype { text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); }
.path-layout .task > summary .ttype .sub { display: none; }
.path-layout .task-facts { list-style: none; margin: 4px 0 14px; padding: 10px 12px; display: grid; gap: 6px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.4; color: var(--text); }
.path-layout .task-facts li { display: flex; gap: 8px; align-items: flex-start; }
.path-layout .task-facts .icon { flex: none; margin-top: 2px; color: var(--muted); }
/* Erledigtes: Haken und heller Grund, Text bleibt voll lesbar */
.path-layout .step.done .task { opacity: 1; }
.path-layout .step.done .task h3, .path-layout .step.done .task:not([open]) h3 { text-decoration: none; color: var(--text); }
.path-layout .step.done .task:not([open]) .tmeta button.tap { opacity: 1; }
/* gelesene Info: ruhiger Haken */
.path-layout .node.info.seen { border-style: solid; border-color: var(--line); background: var(--surface-2); color: var(--muted); }
.path-layout .node.info.seen .icon { stroke-width: 3; width: 18px; height: 18px; }
.path-layout .step.seen .seen-tag { display: inline-flex !important; background: var(--surface-2); color: var(--muted); }
/* Etappen ein- und ausklappen */
.path-layout .stage-head { cursor: pointer; border-radius: var(--r-md); min-height: 44px; }
.path-layout .stage-head .count { margin-left: auto; }
.path-layout .stage-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 -8px 0 0; border-radius: var(--r-md); color: var(--muted); flex: none; }
.path-layout .stage-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }
.path-layout .stage-toggle .icon { transition: transform .2s; transform: rotate(180deg); }
.path-layout .stage.folded .stage-toggle .icon { transform: none; }
.path-layout .stage.folded > .trail, .path-layout .stage.folded > .stage-note { display: none; }
.path-layout .stage.folded { margin-bottom: 4px; }
.path-layout .stage.folded .stage-head { margin-bottom: 0; background: color-mix(in srgb, var(--ok-bright) 7%, var(--surface)); border: 1px solid var(--line); padding: 6px 12px; }
.path-layout .stage.folded .stage-head h2 { font-size: var(--fs-md); }
@media (hover: hover) { .path-layout .stage-head:hover .stage-toggle { color: var(--text); } }
/* Eigene Abgabe läuft nie aus der Karte */
.path-layout .task-content, .path-layout .my-sub, .path-layout .my-sub .submission { min-width: 0; }
.path-layout .my-sub, .path-layout .my-sub .submission { grid-template-columns: minmax(0, 1fr); }
.path-layout .my-sub > strong { flex-wrap: wrap; row-gap: 2px; }
.submission .mat { min-width: 0; max-width: 100%; }
.submission .mat .name { min-width: 0; overflow-wrap: break-word; word-break: break-word; white-space: normal; }
.submission .sub-text { overflow-wrap: break-word; }
.file-gone { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--line); background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); min-width: 0; }
.file-gone .icon { flex: none; }
.file-gone > span { display: grid; min-width: 0; }
.file-gone strong { color: var(--text); }
.file-gone .fg-name { overflow-wrap: break-word; font-size: var(--fs-xs); }
/* Hinweis in der mitlaufenden Leiste darf umbrechen */
.path-sticky.cheering { height: auto; min-height: 44px; }
.path-sticky.cheering .msg { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; padding-block: 4px; }
@media (min-width: 1280px) {
  /* breite Bildschirme: Aufgabenspalte lesbar schmal, das Ganze mittig */
  .path-layout { grid-template-columns: minmax(360px, 420px) minmax(0, 780px); justify-content: center; gap: 8px 40px; }
}

/* --- Lehrkraft: Lernpfad-Karten --- */
.path-grid-t .path-tile { overflow: visible; }
.path-grid-t .path-tile .pt-link { color: inherit; text-decoration: none; }
.path-grid-t .path-tile .pt-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.path-grid-t .path-tile .pt-link:focus-visible { outline: 0; }
.path-grid-t .path-tile .pt-link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.path-grid-t .path-tile .pt-facts { display: flex; flex-wrap: wrap; }
.path-grid-t .path-tile .pt-facts > span + span::before { margin: 0 7px; color: var(--muted); }
.path-grid-t .path-tile .tile-foot { padding-right: 56px; min-height: 44px; align-content: center; }
.path-grid-t .path-tile:has(.pt-assign) .tile-foot { padding-right: 176px; }
.path-grid-t .path-tile .pt-actions { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 6px; align-items: center; }
.path-grid-t .path-tile .pt-actions .menu { position: relative; }
.path-grid-t .path-tile .pt-more { width: 44px; height: 44px; border-radius: var(--r-md); }
.path-grid-t .path-tile .pt-assign { min-height: 44px; padding-inline: 14px; }
.path-grid-t .path-tile:has(.menu-list) { z-index: 5; }
/* Status neutral statt in Fachfarbe */
.path-grid-t .assign-pill, .path-grid-t .assign-pill.on { background: var(--surface-2); color: var(--text); font-weight: 700; }
.path-grid-t .assign-pill:not(.on) { color: var(--muted); }
.path-grid-t .chip.pt-shared { background: var(--surface-2); color: var(--muted); }
/* ein Farbton für den aktiven Filter */
.pl-tools .sf-chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pl-tools .sf-chip.on b { background: rgba(0,0,0,.22); color: inherit; }
.path-new-tile { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 200px; padding: 20px; border-radius: var(--r-xl); border: 2px dashed var(--line); color: var(--muted); text-align: center; transition: border-color .15s, background .15s, color .15s; }
.path-new-tile strong { color: var(--text); font-size: var(--fs-md); }
.path-new-tile .pn-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 4px; }
.path-new-tile .pn-sub { font-size: var(--fs-sm); }
.path-new-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.path-new-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (min-width: 641px) {
  .path-grid-t { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); max-width: 1500px; }
}
@media (max-width: 640px) {
  .path-new-tile { display: none; }
  .path-grid-t .path-tile.has-cover { grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; }
  .path-grid-t .path-tile .tile-cover { width: 52px; height: 52px; grid-row: 1 / span 2; border-radius: var(--r-md); }
  .path-grid-t .path-tile .tile-cover .art { width: 50px; }
  .path-grid-t .path-tile .pt-subject { display: block; font-size: var(--fs-2xs); font-weight: 800; color: var(--ci, var(--muted)); margin-bottom: 1px; }
  .path-grid-t .path-tile.has-cover h3 { margin-bottom: 2px; }
  .path-grid-t .path-tile .pt-facts { grid-column: 1 / -1; font-size: var(--fs-sm); margin-top: 8px; flex-wrap: nowrap; white-space: nowrap; }
  .path-grid-t .path-tile .pt-facts > span + span::before { margin: 0 5px; }
  .path-grid-t .path-tile .tile-foot { grid-column: 1 / -1; padding-top: 8px; }
  .path-grid-t .path-tile .pt-actions { right: 8px; bottom: 8px; }
}
/* Neuer Lernpfad: Fehler direkt am Feld */
dialog .field > .error.field-error { margin: 6px 0 0; }
dialog .field > input[aria-invalid="true"] { border-color: var(--danger); }

/* --- Lehrkraft: Editor --- */
.section-card .add-wrap { border-top: 1px solid var(--line); }
.section-card .add-task { border-top: 0; align-items: center; }
.section-card .add-task[hidden], .section-card .add-task-ghost[hidden] { display: none; }
.section-card .add-task-ghost { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 16px; border-radius: 0 0 21px 21px; color: var(--accent-ink); font-weight: 700; font-size: var(--fs-base); }
.section-card .add-task-ghost:hover { background: var(--surface-2); }
.section-card .add-task-ghost:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.section-card .add-task .icon-btn { width: 44px; height: 44px; flex: none; }
.task-summary > .menu { flex: none; position: relative; }
.task-summary .row-more { width: 44px; height: 44px; border-radius: var(--r-md); color: var(--muted); }
.task-summary .row-more:hover { color: var(--text); background: var(--surface-3); }
.task-row:has(.menu-list) { position: relative; z-index: 5; }
.task-summary .menu-list button, .path-grid-t .menu-list button { min-height: 44px; }
.task-row.open > .task-summary { background: var(--surface-2); }
/* "nur Lernniveau" als lesbarer Chip */
.task-summary .lv-set { gap: 4px; padding: 3px 5px 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); }
.task-summary .lv-set .lv-label { font-size: var(--fs-xs); color: var(--text); }
/* Abschluss mit Freigabe: richtiger Schalter */
.section-head .checkout-toggle, .section-head .checkout-toggle.on { border: 0; background: none; padding: 0 4px; gap: 8px; min-height: 44px; color: var(--muted); font-size: var(--fs-sm); }
.section-head .checkout-toggle.on { color: var(--text); }
.section-head .checkout-toggle input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 40px; height: 24px; margin: 0; border-radius: var(--r-pill); border: 0; background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: background .15s; }
.section-head .checkout-toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.section-head .checkout-toggle input:checked { background: var(--accent); box-shadow: none; }
.section-head .checkout-toggle input:checked::after { transform: translateX(16px); background: #fff; }
.section-head .checkout-toggle input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.section-head .checkout-toggle input:disabled { opacity: .6; cursor: default; }
.section-head .checkout-toggle .icon { opacity: .7; }
.section-head .checkout-toggle:not(.on) .icon { display: none; }
@media (max-width: 640px) {
  .editor-actions > .ea-wide { display: none; }
  .editor-actions { flex-wrap: nowrap; }
  .section-head > .checkout-toggle { min-height: 44px; }
  .task-summary { flex-wrap: nowrap; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding-right: 6px; }
  .task-summary .title { grid-column: 1; grid-row: 1; order: 0; }
  .task-summary > .menu { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
  .task-summary > .ttype { grid-column: 1; justify-self: start; }
  .task-summary .meta { grid-column: 1; }
}
/* Iteration 3 · schueler-lernpfade: Fächer-Chips am Handy sauber in einer Zeile, Terminhinweis */
@media (max-width: 600px) {
  .s-paths .subj-tile .st-name, .s-paths .subj-tile .st-meta { position: static; align-self: center; grid-column: auto; grid-row: auto; line-height: 1.2; }
}
.s-home .due-list .dl-hint { margin: 10px 0 0; font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
/* Iteration 3 · schueler-lernpfade: Kartenfuß der Lehrkraft-Lernpfade (Status oben, Datum neben den Aktionen) */
.path-grid-t .path-tile .pt-facts { gap: 2px 14px; }
.path-grid-t .path-tile .pt-facts > span + span::before { content: none; }
.path-grid-t .path-tile .tile-foot, .path-grid-t .path-tile:has(.pt-assign) .tile-foot { padding-right: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; justify-content: stretch; }
.path-grid-t .path-tile .assign-pill, .path-grid-t .path-tile .pt-state .chip { white-space: nowrap; }
.path-grid-t .path-tile .pt-when { min-height: 30px; display: flex; align-items: center; padding-right: 52px; }
.path-grid-t .path-tile:has(.pt-assign) .pt-when { padding-right: 176px; }
@media (max-width: 640px) {
  .path-grid-t .path-tile .pt-facts { gap: 2px 12px; }
}

/* Iteration 3 · start-navigation */
/* --- Hinweis (Toast): auch innerhalb eines offenen Dialogs sichtbar, optional mit Aktion --- */
.toast { z-index: 2147483000; display: flex; align-items: center; gap: 14px; width: max-content; }
.toast[hidden] { display: none; }
.toast .toast-act { flex: none; border: 0; border-radius: var(--r-sm); min-height: 36px; padding: 6px 12px; font: inherit; font-weight: 800; cursor: pointer; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }
.toast .toast-act:hover { background: color-mix(in srgb, var(--bg) 30%, transparent); }
dialog > .toast { position: fixed; }
@media (max-width: 860px) { .toast .toast-act { min-height: 44px; } }

/* --- Menü: nach oben bzw. von links klappen, Kopf, Trenner, Häkchen --- */
.menu-list.up { top: auto; bottom: calc(100% + 6px); }
.menu-list.from-left { right: auto; left: 0; }
.menu-list .menu-head { display: grid; gap: 2px; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); line-height: 1.35; }
.menu-list .menu-head strong { color: var(--text); font-size: var(--fs-base); }
.menu-list .menu-head .chip { justify-self: start; margin-top: 6px; }
.menu-list .menu-div { margin: 6px 0 2px; padding: 8px 12px 2px; border-top: 1px solid var(--line); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-list .menu-div:empty { padding: 0; margin: 6px 0; }
.menu-list button .menu-lbl { flex: 1; min-width: 0; }
.menu-list button .menu-check { flex: none; width: 18px; text-align: center; color: var(--accent-ink); font-weight: 800; }
.menu-list button[aria-checked="true"] { background: var(--accent-soft); }
.menu-list button { min-height: 44px; }

/* --- Fehlermeldungen: betroffenes Feld markieren --- */
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.error[role="alert"] { scroll-margin: 24px; }
.load-error { max-width: 560px; margin: 8vh auto 0; text-align: center; padding: 32px 24px; }
.load-error .le-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--muted); margin-bottom: 8px; }
.load-error h1 { margin: 0 0 6px; }
.load-error .btn-row { justify-content: center; margin-top: 16px; }
.load-error .error { margin-top: 0; }
dialog.leave-dlg .dlg-foot { flex-wrap: wrap; }

/* --- Kennzahl-Kachel in drei Größen (kpiTile) --- */
.kpi-tile { text-align: left; font: inherit; color: var(--text); text-decoration: none; min-width: 0; }
.kpi-tile .kpi-lbl { overflow: visible; white-space: normal; text-overflow: clip; overflow-wrap: break-word; }
.kpi-tile b { white-space: nowrap; }
.kpi-tile.tk-kpi .kpi-lbl, .kpi-tile.ck-kpi .kpi-lbl, .kpi-tile.attn .kpi-lbl, .kpi-tile.cc-kpi .kpi-lbl, .kpi-tile.sd-kpi .kpi-lbl { overflow-wrap: normal; }
button.kpi-tile { cursor: pointer; width: 100%; }
.kpi-tile.kpi-link { transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi-tile.kpi-link:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.kpi-tile.kpi-link[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* --- Aufklapper mit dem Pfeil der App (disclosure) --- */
details.disc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; border-radius: var(--r-md); }
details.disc > summary::-webkit-details-marker { display: none; }
details.disc > summary::marker { content: ""; }
details.disc > summary .disc-label { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
details.disc > summary .disc-chev { flex: none; transition: transform .18s; color: var(--muted); }
details.disc[open] > summary .disc-chev { transform: rotate(180deg); }
details.disc > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
details.disc.more-disc > summary { justify-content: center; font-weight: 700; color: var(--accent-ink); font-size: var(--fs-base); }
details.disc.more-disc > summary .disc-chev { color: var(--accent-ink); }
details.disc.more-disc > summary:hover { background: var(--surface-2); }
details.disc.more-disc.in-card { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
details.disc.more-disc:not(.in-card) > .disc-body { margin-top: 12px; }

/* --- Chip-Zeile, die seitlich rollt und weich ausläuft (chipRow) --- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
@media (max-width: 860px) {
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-block: 2px; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row > * { flex: none; scroll-snap-align: start; }
  .chip-row.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .chip-row.fade-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 40px), transparent); }
  .chip-row.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
}

/* --- Kästchen: ein Aussehen überall (statt des Browser-Kästchens) --- */
input[type="checkbox"]:not(.sw):not(.ck-check) { appearance: none; -webkit-appearance: none; box-sizing: border-box; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; border-radius: var(--r-sm); border: 2px solid var(--muted); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; vertical-align: -5px; }
input[type="checkbox"]:not(.sw):not(.ck-check)::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid var(--accent-text); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
input[type="checkbox"]:not(.sw):not(.ck-check):checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:not(.sw):not(.ck-check):checked::after { transform: rotate(45deg) scale(1); }
input[type="checkbox"]:not(.sw):not(.ck-check):disabled { opacity: .55; cursor: default; }
input[type="checkbox"]:not(.sw):not(.ck-check):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --- Kopfzeile --- */
.account-btn { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 2px; min-width: 44px; height: 44px; border-radius: var(--r-pill); }
.account-btn .account-chev { color: var(--muted); width: 14px; height: 14px; }
.account-btn[aria-expanded="true"] { background: var(--surface-2); }
.account-btn[aria-expanded="true"] .account-chev { transform: rotate(180deg); }
.topbar .icon-btn.bell { min-width: 44px; height: 44px; }
.topbar .bell-count { min-width: 18px; height: 18px; font-size: var(--fs-2xs); top: 2px; right: 1px; }
.user-chip .menu-list { min-width: 250px; }
@media (max-width: 860px) {
  /* Am Handy steht der Schulname im Konto-Menü statt abgeschnitten in der Leiste */
  .topbar .school { visibility: hidden; }
  body.is-demo .brand::after { content: none; display: none; }
  .topbar { gap: 6px; }
  .user-chip { gap: 2px; }
  .user-chip .menu-list { max-width: calc(100vw - 24px); }
}
/* Untere Leiste: aktiver Reiter deutlicher (Strich über dem Symbol, im Dunkeln hellere Fläche) */
@media (max-width: 860px) {
  .bottom-nav a { position: relative; min-height: 52px; justify-content: center; }
  .bottom-nav a.active { font-weight: 800; }
  .bottom-nav a.active::before { content: ""; position: absolute; top: 3px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: var(--r-xs); background: var(--accent); }
}
@media (prefers-color-scheme: dark) {
  @media (max-width: 860px) {
    .bottom-nav a { color: var(--muted); }
    .bottom-nav a.active { color: #fff; background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
    .bottom-nav a.active::before { background: #fff; }
  }
}

/* --- Startseite der Lehrkräfte --- */
/* Zonen: Jetzt entscheiden, Braucht Aufmerksamkeit, Läuft (Reihenfolge nur über das Markup) */
.sz { margin: 20px 0 0; }
.sz-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 8px; min-height: 36px; }
.sz-t.section-title { margin: 0; }
.sz-grid { display: grid; gap: 18px 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.sz-grid > * { min-width: 0; margin: 0; }
.sz-ch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; min-height: 34px; margin: 0 0 10px; }
.sz-ch .section-title { margin: 0; }
.sz-ch .more, .sz-ch .more { text-decoration: none; }
.sz-card .card { margin: 0; }
.sz-calm { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: var(--fs-base); }
.sz-calm .icon { color: var(--ok); flex: none; }
.sz-calm .more { margin-left: auto; white-space: nowrap; font-weight: 700; font-size: var(--fs-sm); }
.sz-grid + .sz-calm, .kr-self-disc { margin-top: 14px; }
.sz-card .ov-grid { grid-template-columns: minmax(0, 1fr); margin-top: 0; gap: 12px; }
.sz-card .ov-grid .ov-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sz-card .ov-grid .ov-kpis .kpi { padding: 12px 14px; }
.sz-card .ov-grid .ov-chart, .sz-card .ov-grid .ov-chart .chart-card { height: auto; }
@media (min-width: 861px) {
  .sz-card .ov-grid { grid-template-columns: minmax(250px, .75fr) minmax(0, 2fr); align-items: stretch; }
  .sz-card .ov-grid .ov-kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sz-card .ov-grid .ov-kpis .kpi { padding: 8px 12px; }
  .sz-card .ov-grid .ov-chart, .sz-card .ov-grid .ov-chart .chart-card { height: 100%; }
  .sz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sz-grid > :last-child:nth-child(odd), .sz-grid > .sz-wide { grid-column: 1 / -1; }
}
@media (min-width: 1500px) {
  .sz-grid { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
  .sz-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .sz-grid > .sz-wide { grid-column: span 2; }
  .sz-runs .sz-grid[style*="--n:1"] > .sz-wide { grid-column: 1 / -1; }
}
.rv-panel .rg-rest { padding: 4px 12px; color: var(--accent-ink); min-height: 36px; }
.rv-panel .rg-person { min-height: 36px; }
/* Personenzeilen (Coachees, Unterstützung) */
.pr-list { padding: 6px; display: grid; gap: 2px; margin: 0; }
.pr-lead { margin: 0; padding: 8px 12px 6px; font-size: var(--fs-sm); color: var(--muted); }
.pr-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); min-height: 60px; }
.pr-row:hover { background: var(--surface-2); }
.pr-row.top { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.pr-row.top:hover { background: var(--surface-2); }
.pr-who { grid-area: who; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); }
.pr-row.top .pr-who { background: var(--accent); color: var(--accent-text); }
.pr-row.calm .pr-who { background: var(--surface-2); color: var(--muted); }
.pr-main { grid-area: main; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.pr-name { font-weight: 800; color: var(--text); text-decoration: none; overflow-wrap: break-word; }
.pr-name::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.pr-name:focus-visible { outline: none; }
.pr-name:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -2px; }
.pr-sub { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.pr-why { grid-area: why; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pr-why .chip { white-space: normal; }
.pr-more { position: relative; z-index: 1; border: 0; cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: 800; justify-content: center; }
.pr-more::before { content: ""; position: absolute; }
.pr-more:hover { background: var(--accent-soft); color: var(--accent-ink); }
.pr-go { grid-area: go; }
.pr-list .disc-body { display: grid; gap: 2px; }
/* Fortschritt je Fach als Zeilen */
.sj-list { padding: 6px; display: grid; gap: 2px; margin: 0; }
.sj-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: var(--r-md); color: inherit; text-decoration: none; min-height: 60px; }
a.sj-row:hover { background: var(--surface-2); }
.sj-row .ring .ring-bar { stroke: var(--c); }
.sj-row .ring-num { font-size: var(--fs-2xs); }
.sj-row .ring.full .ring-num.is-check { font-size: var(--fs-md); }
.sj-main { display: grid; min-width: 0; line-height: 1.3; }
.sj-main strong { overflow-wrap: break-word; }
.sj-row .chip { white-space: nowrap; }
/* Überblick: aufklappbar, Kennzahlen neben dem Verlauf */
details.ov-disc { margin-top: 26px; }
details.ov-disc > summary { justify-content: flex-start; }
details.ov-disc > summary .ov-title { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); }
details.ov-disc > summary .ov-hint { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
details.ov-disc[open] > summary .ov-hint { display: none; }
details.ov-disc > summary .disc-chev { margin-left: 2px; }
.ov-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 6px; }
.ov-grid .ov-kpis { margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ov-grid .ov-chart .chart-card { margin: 0; }
@media (min-width: 1100px) {
  .ov-grid { grid-template-columns: minmax(260px, .9fr) minmax(0, 2.1fr); align-items: stretch; }
  .ov-grid .ov-kpis { grid-template-columns: minmax(0, 1fr); align-content: stretch; }
  .ov-grid .ov-chart, .ov-grid .ov-chart .chart-card { height: 100%; }
}
@media (max-width: 860px) {
  .ov-grid .ov-kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  details.ov-disc { margin-top: 18px; padding: 2px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  details.ov-disc[open] { padding-bottom: 14px; }
  details.ov-disc > summary { justify-content: space-between; min-height: 52px; }
  details.ov-disc > summary .disc-label { display: grid; gap: 0; }
  .sz { margin-top: 16px; }
  .sz-head { min-height: 0; }
  .sz-ch .more, .sz-head .more { min-height: 44px; display: inline-flex; align-items: center; }
  .pr-row { padding: 10px 8px; gap: 4px 10px; }
  .sj-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px; }
  .sj-row > .icon { display: none; }
  /* Meine Lernpfade am Handy als kompakte Zeilen ohne Titelbild */
  .home-paths { gap: 10px; }
  .home-paths .path-tile.has-cover { display: grid; grid-template-columns: minmax(0, 1fr); padding: 14px 16px 14px 20px; }
  .home-paths .path-tile.has-cover .tile-cover { display: none; }
  .home-paths .path-tile.has-cover::before { display: block; left: 0; right: auto; top: 0; bottom: 0; width: 6px; height: auto; background: linear-gradient(180deg, var(--c-deco0, var(--accent)), var(--c-deco, var(--accent-2))); }
  .home-paths .path-tile.has-cover h3 { margin-top: 0; }
  .home-classes { gap: 10px; }
}

/* --- Anmeldung --- */
.login-box .field-help { margin: 6px 2px 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }
.login-box .seg { border: 1px solid var(--line); }
.login-box .seg a { color: var(--text); opacity: .78; min-height: 44px; display: grid; place-items: center; }
.login-box .seg a:hover { opacity: 1; }
.login-box .seg a.active { opacity: 1; color: var(--accent-ink); box-shadow: var(--shadow), inset 0 -3px 0 var(--accent); }
.login-go.busy { opacity: .7; cursor: progress; }
.login-alt { margin-top: 6px; }
.login-alt .or-line { margin: 16px 0 12px; }
.login-qr { gap: 10px; }
.login-qr-hint { margin: 8px 2px 0; text-align: center; font-size: var(--fs-sm); color: var(--muted); }
details.login-forgot { margin-top: 10px; }
details.login-forgot > summary { justify-content: center; color: var(--accent-ink); font-weight: 700; font-size: var(--fs-base); }
details.login-forgot > summary .disc-chev { color: var(--accent-ink); }
details.login-forgot .disc-body { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-base); }
.login-forgot-pw { margin: 16px 0 0; text-align: center; font-size: var(--fs-sm); color: var(--muted); }
.school-known { min-height: 48px; }
.school-known .btn { min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
dialog.scan-dlg .scan-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 1 / 1; max-height: 52vh; margin: 0 auto 12px; }
dialog.scan-dlg .scan-frame::after { content: ""; position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.85); border-radius: var(--r-lg); pointer-events: none; }
dialog.scan-dlg .scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
dialog.scan-dlg .scan-steps { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 8px; }
@media (prefers-color-scheme: dark) {
  .login-box .seg { background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border-color: var(--line); }
  .login-box .seg a.active { background: var(--surface-3); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
}
/* Iteration 3 · schueler-lernpfade: Fachfilter-Chips am Handy 44px */
@media (max-width: 640px) { .pl-tools .sf-chip { min-height: 44px; } }

/* Iteration 3 · start-navigation: Feinschliff Startseite, Platzhalter, dunkle Töne */
.pr-row { grid-template-areas: "who main go" "why why go"; }
.pr-who { width: 36px; height: 36px; font-size: var(--fs-xs); }
.pr-more { min-width: 0; min-height: 0; padding: 2px 9px; }
.pr-more::before { inset: -10px -8px; }
.pr-list .disc-body { margin-top: 2px; }
@media (max-width: 860px) {
  .pr-lead { display: none; }
  .pr-list { padding-top: 6px; }
  details.sj-disc .sj-list { border: 0; box-shadow: none; padding: 0; background: none; }
  details.ov-disc.sj-disc { margin-top: 18px; }
  details.ov-disc[open] > summary .ov-hint { display: block; }
  .home-paths .path-tile.has-cover .meta { margin-top: 4px; }
  .home-paths .path-tile.has-cover > :not(.tile-cover):not(h3):not(.meta) { display: none; }
}
/* Platzhalter gut lesbar (mindestens 4,5:1), der Beispielcode bleibt zurückhaltend, aber erkennbar */
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input.code-input::placeholder { opacity: .62; }
.login-qr-hint { margin-top: 6px; }
@media (prefers-color-scheme: dark) {
  /* eine Stufe mehr Abstand zwischen Seitengrund und Karten */
  :root { --bg: #161930; }
  .help-item .who { background: color-mix(in srgb, var(--danger) 34%, var(--surface-3)); color: #fff; }
  .help-item.calm .who { background: var(--surface-3); color: #fff; }
  .pr-who { background: var(--surface-3); color: #fff; }
  .pr-row.top .pr-who { background: var(--accent); color: var(--accent-text); }
  .pr-row.calm .pr-who { background: var(--surface-3); color: var(--text); }
}
/* Iteration 3 · schueler-lernpfade: Lernniveau-Abzeichen im Kopf als 44px-Ziel */
@media (max-width: 860px) { .path-hero .top button.tap { display: inline-flex; align-items: center; min-height: 44px; } }
/* Iteration 3 · start-navigation: einladende „Neu“-Kachel neben wenigen Lernpfaden */
.home-paths .new-tile { display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; text-decoration: none; color: var(--text); border: 2px dashed var(--line); background: transparent; box-shadow: none; min-height: 160px; margin: 0; padding: 20px; }
.home-paths .new-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.home-paths .new-tile .nt-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); }
/* Iteration 3 · schueler-lernpfade: langer Link in der eigenen Abgabe ruhig und umbrechend */
.path-layout .my-sub .submission .mat .name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
/* Iteration 3 · start-navigation: Tippflächen 44px auf der Startseite und in der Kopfzeile */
.topbar .brand { min-height: 44px; }
@media (max-width: 860px) {
  .sz .segmented .sg-opt { min-height: 38px; padding-inline: 12px; position: relative; }
  .sz .segmented .sg-opt::before { content: ""; position: absolute; inset: -4px 0; }
  .sz .rv-panel .rg-head .btn { min-height: 44px; }
  .sz .rv-panel .rg-person { min-height: 44px; padding-right: 12px; }
  .sz .rv-panel .rg-people { gap: 8px; }
  #main > .section-title > .more { min-height: 44px; display: inline-flex; align-items: center; }
}
/* Iteration 3 · schueler-lernpfade: Karten der Lehrkraft etwas breiter, damit Datum und "Zuweisen" nebeneinander passen; Schalter im Abschnittskopf */
@media (min-width: 641px) { .path-grid-t { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.path-grid-t .path-tile .pt-when { white-space: nowrap; }
.section-head .checkout-toggle input.sw { display: inline-block; border: 0; width: 40px; height: 24px; border-radius: var(--r-pill); }
/* Iteration 3 · schueler-lernpfade: Schalterknopf auch im Dunkeln sichtbar */
@media (prefers-color-scheme: dark) { .section-head .checkout-toggle input.sw:not(:checked)::after { background: var(--muted); } }
/* Iteration 3 · start-navigation: zweispaltige Startseite ohne Lücke (Journal rechts über beide Reihen) */
@media (min-width: 1100px) and (max-width: 1499.98px) {
  .home-paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1500px) { .home-paths { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Korrektur · lernpfade-schueler */
/* Ersatz-Chip „Datei nicht verfügbar“: nicht Wort für Wort umbrechen */
.file-gone { min-width: min(100%, 220px); }
/* Im Vorschau-Raster nimmt der Hinweis die ganze Zeile statt einer schmalen Bildspalte */
.sub-imgs > .file-gone { grid-column: 1 / -1; }

/* Korrektur · journal-wochenplan */
/* Lernjournal: Lernpfad-Auswahl zeigt die offenen Lernpfade, der Rest liegt auf allen Breiten hinter „mehr“ */
.path-pick .pp-more .ppm-narrow { display: none; }
.path-pick.jv-wrap:not(.all) .pp-rest { display: none; }
@media (min-width: 701px) {
  .path-pick.jv-wrap.has-rest .pp-more { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 14px 0 10px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; }
  .path-pick.jv-wrap.has-rest .pp-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .path-pick.jv-wrap.has-rest .pp-more .icon { stroke: var(--accent); }
}
@media (max-width: 700px) {
  .path-pick .pp-more .ppm-narrow { display: inline; }
  .path-pick .pp-more .ppm-wide { display: none; }
}
/* Korrektur · coaching-admin */
/* Glocke am Handy: die Liste hängt nicht mehr an der Glocke (ragte links aus dem Bild), sondern steht mit 12px Rand unter der Kopfzeile */
@media (max-width: 600px) {
  .menu-list.bell-list { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; max-height: min(70vh, calc(100vh - 150px)); }
}
/* Benutzerliste: Name bricht an Wortgrenzen, die Marke „inaktiv“ rutscht bei Platzmangel in die nächste Zeile */
.acc-table .cl-name strong { flex-wrap: wrap; row-gap: 2px; }
.acc-table .cl-name strong .a-name { min-width: 0; overflow-wrap: break-word; }
.acc-table .cl-name strong .chip { flex: none; }
/* Gespräch · „Seit dem letzten Gespräch erledigt“: Haken und Text in einer Zeile, durchgestrichen ist nur der Text */
.tk-donesince .ag-list.done li { flex-wrap: nowrap; align-items: flex-start; text-decoration: none; }
.tk-donesince .ag-list.done li > .icon { flex: none; margin-top: 2px; }
.tk-donesince .tk-ds-main { flex: 1; min-width: 0; overflow-wrap: break-word; }
.tk-donesince .tk-ds-text { text-decoration: line-through; }
/* Korrektur · login-start */
/* Anmeldung: „QR-Code scannen“ ist klar der zweite Weg (Umriss ohne Fläche), der gefüllte Hauptknopf bleibt der stärkste */
.login-box .btn.login-qr { background: transparent; border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); color: var(--accent-ink); box-shadow: none; font-weight: 700; }
.login-box .btn.login-qr:hover { background: var(--accent-soft); border-color: var(--accent); }
/* Anmeldung am Handy: alles bis „Code vergessen?“ passt ohne Scrollen auf 390×844 */
@media (max-width: 640px) {
  .login-art { padding: 14px 20px 14px; }
  .login-art .art-brand { margin-bottom: 8px; }
  .login-side { padding-top: 14px; padding-bottom: 20px; }
  .login-alt .or-line { margin: 10px 0 8px; }
  details.login-forgot { margin-top: 4px; }
}
/* Kopfzeile am Handy: „Demo“ und der Schulname stehen wieder kompakt in der Leiste (lange Namen werden gekürzt) */
@media (max-width: 860px) {
  .topbar .brand { flex: none; }
  body.is-demo .topbar .brand::after { content: "Demo"; display: inline-block; font-size: var(--fs-2xs); padding: 2px 6px; border-radius: var(--r-sm); }
  .topbar .school, body.is-student .topbar .school { visibility: visible; flex: 1 1 0; min-width: 0; font-size: var(--fs-xs); }
}

/* ---------- Gelingensnachweise ---------- */
.proof-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.proof-hello .btn { flex: none; }
.proof-sec { margin-bottom: 22px; }
.proof-lead { margin: -4px 0 12px; }
.proof-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.proof-list > :only-child { max-width: 760px; }
.proof-list.compact { grid-template-columns: minmax(0, 1fr); }
.count-pill.ok { background: var(--ok-soft); color: var(--ok); }
.proof-card {
  --c: #5a44dc; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0;
}
.proof-card.is-new { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.proof-card.granted { border-left: 5px solid var(--ok-bright); }
.proof-card.not_yet { border-left: 5px solid var(--warn); }
.proof-card.requested { border-left: 5px solid var(--accent-2); }
.pc-medal { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-lg); flex: none; background: var(--cs, var(--accent-soft)); color: var(--ci, var(--accent)); }
.proof-card.granted .pc-medal { background: var(--ok-soft); color: var(--ok); }
.proof-card.not_yet .pc-medal { background: var(--warn-soft); color: var(--warn); }
.pc-medal.sm { width: 34px; height: 34px; border-radius: var(--r-md); }
.pc-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.pc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-title { font-size: var(--fs-md); overflow-wrap: break-word; }
.pc-meta { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.pc-note { margin: 0; overflow-wrap: break-word; }
.pc-when { margin-top: -2px; }
.pc-reply { border-radius: var(--radius-sm); padding: 10px 12px; background: var(--ok-soft); }
.pc-reply.not_yet { background: var(--warn-soft); }
.pc-reply-by { display: block; font-size: var(--fs-xs); font-weight: 800; margin-bottom: 2px; color: var(--ok); }
.pc-reply.not_yet .pc-reply-by { color: var(--warn); }
.pc-reply p { overflow-wrap: break-word; }
.pc-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); text-decoration: none; }
.pc-who .who { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-2xs); font-weight: 800; flex: none; }
.proof-empty { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 28px 18px; }
.proof-empty > .icon { width: 36px; height: 36px; color: var(--accent-ink); }
.proof-empty p { margin: 0; }

/* Anmelden */
.pf-dialog textarea, .pf-dialog select, .pf-dialog input { width: 100%; box-sizing: border-box; }
.pf-label { font-weight: 700; margin: 12px 0 6px; }
.pf-forms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pf-form { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.pf-form.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* Kachel auf der Startseite */

/* Am Ende des Lernpfads: Einstieg in der Ziel-Karte */
.path-finish.has-cta { flex-wrap: wrap; }
.path-finish .fin-text { flex: 1 1 200px; min-width: 0; }
.pf-cta { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-cta[hidden] { display: none; }
@media (max-width: 700px) { .pf-cta { flex-basis: 100%; } .pf-cta .btn { width: 100%; justify-content: center; } }

/* Link oben auf „Können“ */
.proof-link { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--violet-soft); color: var(--violet); font-weight: 800; text-decoration: none; }
.proof-link span { flex: 1; }

/* Lehrkraft */
.pd-box { display: grid; gap: 8px; margin-top: 4px; }
.pd-box textarea { width: 100%; box-sizing: border-box; }
.pd-snips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* Ich-kann-Sätze am Nachweis: im Antrag zum Abwählen, auf der Karte als Liste, bei der Entscheidung zum Bestätigen im Raster */
.pf-sentences { margin-top: 4px; }
.pf-sent-list, .pc-sents, .pd-sent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pf-sent, .pd-sent { font-size: var(--fs-base); display: flex; align-items: flex-start; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface-2); line-height: 1.35; }
label.pf-sent, label.pd-sent { cursor: pointer; margin: 0; }
.pf-sent input, .pd-sent input { flex: none; margin-top: 2px; }
.pf-sent-t, .pd-sent-t { display: grid; gap: 2px; min-width: 0; overflow-wrap: break-word; font-weight: 600; }
.pf-sent.is-done, .pd-sent.is-done { background: var(--ok-soft); }
.pf-sent.is-done .icon, .pd-sent.is-done .icon { flex: none; margin-top: 2px; color: var(--ok); }
.pd-sent > i { flex: none; width: 8px; height: 8px; margin: 7px 7px 0; border-radius: 50%; background: var(--muted); }
.pd-sents { display: grid; gap: 6px; }
.pd-sent-head { font-weight: 700; margin: 0; }
.pc-sents li { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-base); line-height: 1.35; }
.pc-sents li > i { flex: none; width: 6px; height: 6px; margin: 7px 8px 0 5px; border-radius: 50%; background: var(--muted); }
.pc-sents li.is-done .icon { flex: none; margin-top: 2px; color: var(--ok); }
details.pd-sent-disc { margin: 0; }
.kr-shown { display: block; margin-top: 2px; font-weight: 700; }
.kr-show-btn { margin: 4px 0 12px; }
.chip.snip { cursor: pointer; border: 1px solid transparent; font: inherit; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; text-align: left; }
.chip.snip.good { background: var(--ok-soft); color: var(--ok); }
.chip.snip.later { background: var(--warn-soft); color: var(--warn); }
.pd-actions { margin: 0; }
.pp-list { padding: 6px; }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.pp-row:hover { background: var(--surface-2); }
.pp-row .who { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 800; flex: none; }
.pp-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pp-main strong, .pp-main span { overflow-wrap: break-word; }
.staff-proofs .section-title.in-card { margin-top: 0; }

/* Eltern */
.parent-proofs h3 { margin-top: 0; }
.pp3-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pp3-list li { display: flex; align-items: center; gap: 12px; }
.pp3-list .pc-medal { background: var(--ok-soft); color: var(--ok); }
.pp3-main { display: grid; gap: 1px; min-width: 0; }
.pp3-main strong, .pp3-main span { overflow-wrap: break-word; }
@media (max-width: 700px) {
  .proof-list { grid-template-columns: minmax(0, 1fr); }
  .proof-card { padding: 14px; gap: 12px; }
  .proof-card .pc-medal { display: none; }
  .proof-hello .btn { width: 100%; justify-content: center; }
}

.proof-ask { display: grid; gap: 4px; justify-items: end; }
.proof-ask .btn[disabled] { opacity: .55; cursor: not-allowed; }
.parent-proofs > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.parent-proofs > summary::-webkit-details-marker { display: none; }
.parent-proofs > summary .pp3-head { flex: 1; display: grid; gap: 1px; min-width: 0; }
.parent-proofs[open] > summary > .icon:last-child { transform: rotate(180deg); }
.parent-proofs .pp3-list { margin-top: 12px; }
.parent-proofs .pc-medal { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 700px) { .proof-ask { justify-items: stretch; width: 100%; } }
#konto-mail input.sw:disabled { opacity: .5; cursor: not-allowed; }

/* Zuweisen an einzelne Schüler:innen */
.as-pick-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.as-pick-head input { flex: 1; min-width: 0; }
.as-pick-head .muted { white-space: nowrap; }
.as-pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; background: var(--surface); }
.as-pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; min-height: 44px; }
.as-pick-row:hover { background: var(--surface-2); }
.as-pick-name { flex: 1; min-width: 0; font-weight: 600; }
.as-pick-list > p { padding: 8px 10px; margin: 0; }

/* ---------- Stufe je Fach, Weg zurück, Einschätzung (Gutachten Nov 2026) ---------- */
.au-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.au-tabs button { all: unset; box-sizing: border-box; cursor: pointer; padding: 8px 14px; min-height: 40px; border-radius: var(--r-pill); background: var(--surface-2); font-weight: 700; font-size: var(--fs-base); display: inline-flex; align-items: center; gap: 6px; }
.au-tabs button.on { background: var(--accent); color: var(--accent-text); }
.au-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.au-plan { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 6px; }
.au-plan > strong { display: flex; align-items: center; gap: 6px; }
.au-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.au-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-base); }
.au-steps li.done > span:last-child, .au-steps li.done label span { color: var(--muted); text-decoration: line-through; }
.au-steps label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.au-steps input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ok); }
.au-tick { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-xs); font-weight: 700; }
.au-steps li.done .au-tick { background: var(--ok-soft); color: var(--ok); }
.au-rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.au-row { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); }
.au-row.repeat { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.au-row-head { display: grid; gap: 4px 14px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.au-subj { font-weight: 800; grid-column: 1; }
.au-stage { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; grid-column: 1; }
.au-act { grid-column: 2; grid-row: 1 / span 2; }
.au-panel .au-row-head { grid-template-columns: minmax(0, 1fr); }
.au-panel .au-act { grid-column: 1; grid-row: auto; margin-top: 6px; }
.au-act { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.au-act select { min-height: 36px; max-width: 14em; }
.au-assess { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: var(--fs-base); line-height: 1.5; }
.au-assess .chip { margin-right: 2px; }
.au-assess-cta { margin-top: 12px; }
.au-assess-list { margin-top: 12px; }
.au-assess-ul { list-style: none; margin: 0; padding: 0; }
.au-assess-ul .au-assess { margin-top: 6px; }
.au-base { margin: 10px 0 0; }
/* Kompakte Fachzeilen: Fach und Stufe links, Auswahl und Rückstufen rechts; zwei Spalten ab 1100 px */
.au-row.compact { padding: 10px 14px; }
.au-panel .au-row.compact .au-row-head { grid-template-columns: minmax(0, 1fr) auto; }
.au-panel .au-row.compact .au-act { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; flex-wrap: nowrap; }
.au-fold > summary { display: none; }
.au-panel { container-type: inline-size; }
.au-stage .au-of { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.au-stage .au-basetag { padding: 0 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-xs); }
/* Spalten und Anordnung folgen der Breite des Panels, nicht des Fensters (im Schülerdetail steht es in einer schmalen Seitenspalte) */
@container (min-width: 720px) {
  .au-panel .au-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .au-panel .au-row.repeat { grid-column: 1 / -1; }
}
@container (max-width: 560px) {
  .au-panel .au-row.compact .au-row-head { grid-template-columns: minmax(0, 1fr); }
  .au-panel .au-row.compact .au-act { grid-column: 1; grid-row: auto; margin-top: 6px; flex-wrap: wrap; }
  .au-panel .au-act select { flex: 1 1 8em; }
}
@media (max-width: 700px) {
  .au-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 10px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; cursor: pointer; list-style: none; }
  .au-fold > summary::-webkit-details-marker { display: none; }
  .au-fold[open] > summary .icon { transform: rotate(180deg); }
  .au-fold > .au-rows { margin-top: 10px; }
  .au-panel .au-act select { flex: 1 1 100%; }
  .au-panel .au-row.compact .au-row-head { grid-template-columns: minmax(0, 1fr); }
  .au-panel .au-row.compact .au-act { grid-column: 1; grid-row: auto; margin-top: 6px; flex-wrap: wrap; }
}
.linkish { all: unset; cursor: pointer; color: var(--accent-ink); font-weight: 700; text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk-autonomy { margin-top: 18px; }
dialog.wide-dlg { width: min(760px, calc(100vw - 32px)); }
.de-form .hint, .as-form .hint { display: flex; gap: 6px; align-items: center; color: var(--muted); margin: 4px 0 12px; }
.de-steps { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.de-steps legend { font-weight: 800; padding: 0 4px; }
.de-step { display: flex; gap: 10px; align-items: center; }
.de-step .n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--surface-2); font-weight: 700; font-size: var(--fs-xs); }
.de-step input { flex: 1; min-width: 0; }
.c3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.c3-b { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 10px 8px; min-height: 44px; border-radius: var(--r-md); border: 1px solid var(--line); font-weight: 700; background: var(--surface); }
.c3-b:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.c3-b.on.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.c3-b.on.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.c3-b.on.late { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.pa-subjects { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.pa-subjects li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.pa-subjects li.repeat { background: var(--warn-soft); }
.pa-repeat { background: var(--warn-soft); border-radius: var(--r-md); padding: 10px 12px; margin: 10px 0; }
.pa-repeat h4 { margin: 0 0 4px; }
.dl-new { font-style: normal; font-size: var(--fs-2xs); font-weight: 700; color: var(--accent-ink); }
/* Erfolgskriterien, Ziele des Lernpfads, Selbstkontrolle */
.criteria { background: var(--accent-soft); border-radius: var(--r-md); padding: 10px 14px; margin: 12px 0; }
.criteria > strong { display: flex; align-items: center; gap: 6px; }
.criteria ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.path-goals { margin-top: 14px; padding: 0; }
.path-goals summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 800; }
.path-goals summary::-webkit-details-marker { display: none; }
.path-goals .pg-chev { margin-left: auto; transition: transform .2s; }
.path-goals[open] .pg-chev { transform: rotate(180deg); }
.path-goals ul { list-style: none; margin: 0; padding: 0 16px; display: grid; gap: 10px; }
.path-goals li { display: grid; gap: 2px; }
.path-goals .pg-proof { display: flex; align-items: center; gap: 4px; color: var(--violet); font-weight: 600; }
.path-goals > a { display: inline-block; margin: 10px 16px 14px; }
.sol-hint { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin: 12px 0; font-size: var(--fs-base); }
.sc-chip { margin-left: 8px; font-size: var(--fs-2xs); }
.sc-chip.sc3 { background: var(--ok-soft); color: var(--ok); }
.sc-chip.sc2 { background: var(--warn-soft); color: var(--warn); }
.sc-chip.sc1 { background: var(--danger-soft); color: var(--danger); }
.compare-sol { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }
.compare-q { margin: 14px 0 0; font-size: var(--fs-md); }
.rv-goals { margin-top: 12px; }
.rv-goals ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.rv-crit { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin: 0 0 12px; display: grid; gap: 6px; }
.rv-crit legend { font-weight: 800; padding: 0 4px; }
.rv-crit .btn { justify-self: start; min-height: 44px; }
.rv-crit .check { min-height: 44px; margin: 0; width: 100%; font-weight: 500; font-size: var(--fs-base); }
.rv-crit .check input { margin: 0 4px 0 0; }
.kr-kinds { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 10px; }
.kr-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.kr-count-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kr-count { width: 5em; }
.kr-proof { display: flex; gap: 8px; align-items: flex-start; background: var(--violet-soft); border-radius: var(--r-md); padding: 10px 12px; }
@media (max-width: 600px) {
  .au-subj { min-width: 0; }
  .au-act { width: 100%; }
  .au-act select { flex: 1; max-width: none; }
}
.as-form > * + *, .de-form > * + * { margin-top: 14px; }
.as-form > .hint, .de-form > .hint { margin-top: 6px; }

/* Schülerdetail am Handy: lange Abschnitte als Zeile mit Kurzfassung (Iteration 2b) */
.sd-fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.sd-fold[class*="theme-"] { border-top: 5px solid var(--c); }
.sd-fold > .sdf-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 56px; padding: 10px 14px; cursor: pointer; list-style: none; }
.sd-fold > .sdf-sum::-webkit-details-marker { display: none; }
.sd-fold > .sdf-sum:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sdf-main { display: grid; gap: 1px; flex: 1 1 10em; min-width: 0; }
.sdf-main strong { font-size: var(--fs-md); }
.sdf-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.sdf-chev { flex: none; margin-left: auto; transition: transform .15s; }
.sd-fold[open] > .sdf-sum .sdf-chev { transform: rotate(180deg); }
.sd-fold[open] > .sdf-sum { border-bottom: 1px solid var(--line); }
.sd-fold > .card, .sd-fold > .subject-block { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.sd-fold > .subject-block { padding: 12px 14px 4px; }
/* Überschriften stehen schon in der Zeile darüber */
.sd-fold > .staff-checks > .sw-head, .sd-fold > .staff-proofs > .section-title, .sd-fold > .recent > h3, .sd-fold > .yt-card > .yt-card-head > div:first-child,
.sd-fold > .subject-block > header > div:first-child { display: none; }
.sd-fold > .subject-block > header { justify-content: flex-start; margin-bottom: 4px; }
.sd-fold > .subject-block > header:not(:has(.sb-level)) { display: none; }
.sd-fold.flash, .sd-fold:has(.flash) { outline: 0; }
.au-fold > summary > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
/* Abgabe und Freigabe: Merkmal "unsicher", Hinweise zum nächsten Schritt (Iteration 2b) */
/* Merkmal "unsicher" beim Abgeben: neutral, mit Wort (kein Mangel der Schüler:in) */
.rp-tag.rp-unsure { gap: 5px; padding: 3px 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.rv-planned { margin-left: 8px; vertical-align: middle; }
.ladders-jump { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 8px; font-size: var(--fs-sm); text-align: left; }
.three-note { margin: 10px 0 0; }
.plan-step-done.is-done { color: var(--ok); }
.rp-unsure .cf-dots.c1 i:nth-child(1) { background: var(--muted); }
.rb-sent { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.4; }
.rb-sent .rb-done-face { flex: none; }
/* Themen fürs Gespräch: Kurzmarke und Rücklauf */
.tp-kind { margin-right: 8px; font-size: var(--fs-2xs); padding: 1px 8px; vertical-align: 1px; }
.tp-backlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tp-back { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
.tp-back .icon { flex: none; margin-top: 2px; color: var(--ok); }
.tp-back b { color: var(--text); font-weight: 700; }
.tp-limit { margin-top: 6px; }
.sub-cal .cal-line { margin: 8px 0 0; }
/* Gesprächsseite: Ankreuzfeld und Text in einer Linie */
.tk-brings li label .tk-b-text { padding: 0; }
.tk-brings li label input { margin-top: 0; }

/* Schule und Begriffe am Handy: die Karte steht unter der Zeile; ihre Überschrift steht schon in der Zeile (Iteration 3) */
.set-fold > .card .set-head h2 { display: none; }
.set-fold > .card .set-head { margin-bottom: 12px; }
.set-fold { scroll-margin-top: 132px; margin-bottom: 0; }

/* ===== Iteration 4b: Journal in der Schülerdetail-Zone kompakt (Antworten gekürzt), Silbentrennung ===== */
.sd-journal:not(.all) .staff-journal .je-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sd-journal:not(.all) .staff-journal .je-fb .fb-body p { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sd-journal:not(.all) .staff-journal .je-fb .fb-react { display: none; }
.sd-journal:not(.all) .staff-journal .je-card { padding-block: 12px; }
html { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }
/* R6: automatisch nur in langem Fließtext (Erklärungen, Beschreibungen); Beschriftungen, Titel und Sätze in Karten nie */
.prose, .kr-desc, .help-body p, dialog p.muted, .lp-desc, .guide p { hyphens: auto; -webkit-hyphens: auto; }
input, textarea, code, pre, .mono, .code-chunk, [translate="no"] { hyphens: manual; }
/* B6: Beschriftungen (Knöpfe, Etiketten, Tabellenköpfe, Kennzahlen) werden nie automatisch getrennt; Fließtext trennt weiter */
button, .btn, .chip, label, th, summary, .eyebrow, .section-title, .kpi-lbl, .subject-tag, .td-item, .nav a, nav a, .tab { hyphens: manual; -webkit-hyphens: manual; }
.sz-grid { align-items: start; }

.sd-sub.section-title { text-transform: none; letter-spacing: 0; font-size: var(--fs-md); font-weight: 800; color: var(--text); margin: 22px 0 0; }
/* Schülerdetail, „Jetzt entscheiden“: die Nachweis-Karte bekommt die breitere Spalte, mehrere Anfragen stehen nebeneinander */
@media (min-width: 1100px) {
  .sdz.sz-jetzt .sz-grid:has(> .staff-proofs, > .sd-fold) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
  .sdz.sz-jetzt .sz-grid > .need-card { height: auto; align-self: start; }
  .sdz.sz-jetzt .staff-proofs .proof-list:not(.compact-one) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
}
/* Kontrast-Feinschliff aus der Bildmessung: Deko hinter Text zurücknehmen, Zähler im Dunkelmodus */
.next-up::after, .path-hero::after { background: rgba(var(--on-c-rgb), .06); }
.next-up .art.big, .path-hero .art.big { opacity: .12; }
.subj-tile .art { opacity: .16; }
.subj-tile .st-meta { justify-self: start; padding: 1px 8px; border-radius: var(--r-pill); background: rgba(0,0,0,.24); }
.theme-6.subj-tile .st-meta { background: rgba(255,255,255,.4); }
.theme-3.subj-tile .st-meta, .s-paths .theme-3.subj-tile .st-meta { background: rgba(0,0,0,.5); }
.s-paths .subj-tile.all .st-meta, .subj-tile.all .st-meta { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn:not(.secondary):not(.ghost) .count-badge { background: rgba(23,20,58,.18); }
}
:root[data-theme="dark"] .btn:not(.secondary):not(.ghost) .count-badge { background: rgba(23,20,58,.18); }
@media (max-width: 600px) { .path-hero::after, .next-up::after { display: none; } }

/* Iteration 5 */
.dlg-foot-inline { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.save-state .save-retry { margin-left: 6px; padding: 2px 10px; min-height: 28px; border: 1px solid currentColor; border-radius: var(--r-pill); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.save-state .save-retry:hover { background: var(--danger-soft); }
.field-hint.err { color: var(--danger); font-weight: 600; }
dialog.confirm-dlg { max-width: 460px; }
.assigned-line { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 10px 4px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left; cursor: pointer; justify-self: start; }
.assigned-line:hover { background: var(--accent-soft, var(--line)); color: var(--text); }
@media (min-width: 900px) { .editor-head > .assigned-line { grid-column: 1; grid-row: 4; } }
.warn-hint { color: var(--warn); font-weight: 600; }
.as-list li.fresh { animation: as-fresh 2.4s ease-out; background: var(--ok-soft, transparent); border-radius: var(--r-sm); }
@keyframes as-fresh { from { box-shadow: 0 0 0 2px var(--ok); } to { box-shadow: 0 0 0 0 transparent; } }
.as-list li.editing { flex-wrap: wrap; }
.as-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; width: 100%; }
.as-edit label { display: grid; gap: 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.as-edit-btns { display: inline-flex; gap: 6px; }
.as-done { margin: 10px 0 0; color: var(--ok); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .as-list li.fresh { animation: none; } }
.rd-quote { margin: 4px 0 12px; padding: 4px 0 4px 14px; border-left: 3px solid var(--line); }
.rd-quote .rd-list { margin: 0; }
.secret-share { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.sub-empty-note { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-weight: 600; }

/* Abgabe-Blatt: Rückfrage und Fehler in der Fußzeile, über den Knöpfen */
dialog .dlg-foot:has(.sub-empty-note) { flex-wrap: wrap; }
dialog .dlg-foot > .sub-empty-note, dialog .dlg-foot > p.error { flex: 1 1 100%; margin: 0; }

.conflict-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.conflict-note span { flex: 1 1 200px; }

/* Passwort-Formular: Hinweis hat Abstand zum nächsten Feld, Fehler steht direkt über dem Knopf */
.card.narrow form .field-hint { margin-bottom: 16px; }
.card.narrow form > p.error { margin: 0 0 12px; }

/* ---------- Iteration 6: Import und Gruppen ---------- */
.import-kpis { margin-top: 4px; }
.import-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--info-soft, var(--surface-2)); font-weight: 600; }
.import-secrets { margin: 14px 0; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--warn, var(--line)); background: var(--warn-soft, var(--surface-2)); display: grid; gap: 10px; }
.import-next { margin: 14px 0; }
.import-next h3, .import-h { margin: 14px 0 8px; }
.import-result > .btn-row { margin: 12px 0; }
.import-example { margin: 4px 0 12px; }
.import-example th, .import-example td { white-space: nowrap; }
.gp-add { display: grid; gap: 12px; margin-bottom: 16px; }
.gp-search { flex: 1 1 220px; min-width: 0; }
.gp-search input { width: 100%; }
.gp-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.gp-rows { list-style: none; margin: 0; padding: 0; }
.gp-list { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.gp-rows > li { border-bottom: 1px solid var(--line); }
.gp-rows > li:last-child { border-bottom: 0; }
.gp-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; cursor: pointer; }
.gp-mem > .gp-row { cursor: default; }
.gp-row .gp-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.gp-row.is-member { cursor: default; opacity: .6; }
.gp-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin: 0; }
.gp-row:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.gp-empty { padding: 14px; }
.gp-members .gp-mem { margin-top: 8px; }
.gp-none { display: grid; gap: 10px; justify-items: start; }

/* Lernjahr-Editor: Etikett „heute“ überdeckt nicht die Zeile „Ohne Zeitraum“; Einträge nach Frist gestrichelt */
.yt-gantt:has(.yt-today) ~ .yt-loose { margin-top: 38px; }
.yt-bar.from-due { border-style: dashed; }
.yi-due { flex-basis: 100%; }
.ye-note { display: block; font-weight: 500; }

/* Wochenplan: Knopf „anderen Tag wählen“ mit sichtbarem Text */

/* „Was heißt das?“ und antippbare Chips */
.glossary { display: grid; gap: 10px; }
.gl-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.gl-item.focus { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.gl-sym { flex: none; min-width: 34px; display: grid; justify-items: start; align-items: start; padding-top: 2px; }
.gl-text { display: grid; gap: 4px; min-width: 0; }
.gl-text h3 { font-size: var(--fs-md); }
.gl-text p { line-height: 1.45; }
.gl-text .btn { justify-self: start; margin-top: 6px; min-height: 44px; }
.tap-chip { cursor: pointer; }
.link-btn { all: unset; cursor: pointer; color: var(--accent-ink); font-weight: 700; text-decoration: underline; padding: 10px 2px; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
.wc-word { margin-top: 10px; }
.class-badge { white-space: nowrap; overflow: hidden; }

.review-done { display: grid; gap: 12px; justify-items: start; max-width: 560px; margin: 24px auto; padding: 24px; }
.review-done .rd-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); }
.year-hero.yh3 .yh-start { margin: 0; font-size: var(--fs-base); }
.gl-item { flex-direction: column; gap: 8px; }
.gl-sym { min-width: 0; padding-top: 0; }

/* Handy: Tippflächen mindestens 44 px (Iteration 6) */
@media (max-width: 700px) {
  .sg-opt, .chip.snip, button.chip.soft, .ret-step, .ck-val.ck-lv, .ck-val.ck-au,
  .link-btn, .linkish.hello-link, .menu > .btn.secondary, .editor-head > a.back { min-height: 44px; box-sizing: border-box; }
  .sg-opt, .ret-step { min-width: 44px; }
  .ji-head > a.ji-person, .pr-main > a.pr-name, .pc-meta > a.pc-who { display: inline-flex; align-items: center; min-height: 44px; }
  .pd-snips { gap: 8px; }
  .link-btn, .linkish.hello-link, .editor-head > a.back { display: inline-flex; align-items: center; }
}
@media (max-width: 700px) {
  .segmented .sg-opt { min-height: 44px; }
  button.chip.soft { min-width: 44px; justify-content: center; }
  .cc-more-icon > summary { min-width: 44px; min-height: 44px; }
  .df-clear { min-width: 44px; min-height: 44px; }
  .autonomy-panel button.linkish, .je-read-reply { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
  .ret-row2 .ret-val input, #f-ret-weekPlanYears { min-width: 44px; min-height: 44px; }
}
@media (max-width: 700px) {
  .cc-card .cc-more.cc-more-icon > summary { min-height: 44px; min-width: 44px; }
  .sz-head .segmented .sg-opt { min-height: 44px; padding-block: 0; }
}

/* Import am Handy: in der Beispielkarte bleibt auch die erste Beschriftung („Klasse“) sichtbar */
@media (max-width: 640px) {
  .import-example table.stack td:first-child { grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); font-size: inherit; font-weight: inherit; padding-bottom: 4px !important; }
  .import-example table.stack td:first-child::before { display: grid; }
}

/* Handy: Tippfläche von 44 px ohne sichtbare Höhe. Die Optik bleibt wie bei Zeilentext; eine unsichtbare Fläche
   (::after) reicht über das Element hinaus. Damit wachsen lange Listen (Klasse, Nachweise) nicht. */
@media (max-width: 700px) {
  .ck-val.ck-lv, .ck-val.ck-au, .chip.snip, button.chip.soft:not(.chip-more), .link-btn,
  .ji-head > a.ji-person, .pr-main > a.pr-name, .pc-meta > a.pc-who { min-height: 0; position: relative; }
  .ck-val.ck-lv::after, .ck-val.ck-au::after, .chip.snip::after, button.chip.soft:not(.chip-more)::after, .link-btn::after,
  .ji-head > a.ji-person::after, .pr-main > a.pr-name::after, .pc-meta > a.pc-who::after { content: ""; position: absolute; inset: -14px -6px; }
}

/* Handy: Kompetenzraster bearbeiten, Tippflächen mindestens 44 px */
@media (max-width: 700px) {
  .fold-card > summary { min-height: 44px; }
  .kr-kind, .kr-pick-row { min-height: 44px; box-sizing: border-box; }
}
@media (max-width: 700px) {
  .cc-who { min-height: 0; position: relative; }
  .cc-who::after { content: ""; position: absolute; inset: -4px 0; }
}
.gl-sym .lv { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: var(--fs-sm); }

/* ---------- Protokoll (Iteration 7): Tage, Bereiche, lesbare Zeilen ---------- */
.prot-chips { margin-bottom: 18px; }
.prot-day { margin-bottom: 18px; }
.prot-date { font-size: var(--fs-md); font-weight: 800; margin: 0 0 8px; color: var(--text); }
.prot-rows { list-style: none; margin: 0; padding: 4px 0; }
.prot-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) minmax(120px, 220px); gap: 4px 16px; align-items: baseline; padding: 11px 18px; border-top: 1px solid var(--line); font-size: var(--fs-base); }
.prot-row:first-child { border-top: 0; }
.prot-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.prot-main { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; min-width: 0; }
.prot-what { font-weight: 700; }
.prot-n { font-weight: 600; color: var(--muted); }
.prot-detail { overflow-wrap: anywhere; }
.prot-who { text-align: right; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.prot-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 24px; }
.prot-note { margin: 0; }
@media (max-width: 700px) {
  .prot-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .prot-main { grid-column: 1 / -1; grid-row: 1; flex-direction: column; gap: 2px; }
  .prot-time { grid-row: 2; grid-column: 2; }
  .prot-who { grid-row: 2; grid-column: 1; text-align: left; }
  .prot-more { min-height: 44px; }
}

/* Passwort ändern: Beschriftung, Feld und Hinweis mit Luft, der Knopf klebt nicht am letzten Feld */
.pw-form { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.pw-form > label { margin-top: 12px; }
.pw-form > label:first-child { margin-top: 0; }
.pw-form .field-hint { margin: 0; }
.pw-form .btn[type="submit"] { align-self: flex-start; margin-top: 22px; }

/* Neu für dich: bei einer oder zwei Karten nutzen sie die Breite (halbe Breite bei einer), statt zwei Drittel leer zu lassen */
@media (min-width: 861px) {
  .hz-new .fb-list:has(> li:nth-child(2):last-child), .hz-new .fb-list:has(> li:only-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Handy: Auswahlfelder in Listen (Rollen bei der Microsoft-Anmeldung) mit Tippfläche von 44 px */
@media (max-width: 700px) {
  .check-grid .check-row { min-height: 44px; margin: 0; }
}

/* Protokoll: betroffene Person */
.prot-subj { font-weight: 600; overflow-wrap: anywhere; }

/* Handy: kleine Knöpfe und Links bekommen eine unsichtbare Tippfläche von 44 px (::after), die Seiten werden nicht länger */
@media (max-width: 700px) {
  .gp-row .icon-btn, .fb-plan .btn, .today-tile li a, .tl-st a.btn, .tl > a.btn, .sub-link summary, .tl summary { position: relative; }
  .gp-row .icon-btn::after { content: ""; position: absolute; inset: -2px; }
  .fb-plan .btn::after, .tl-st a.btn::after, .tl > a.btn::after { content: ""; position: absolute; inset: -4px 0; }
  .today-tile li a::after { content: ""; position: absolute; inset: -4px 0; }
  .sub-link summary::after, .tl summary::after { content: ""; position: absolute; inset: -12px 0; }
  .sb-level-select { min-height: 44px; }
  .jr-new { min-height: 44px; }
}

/* Wochenplan im Schülerdetail: In einer schmalen Kachel stehen die Tage untereinander (Tag links, Einträge rechts), damit kein Wort senkrecht umbricht */
.staff-week { container: sweek / inline-size; }
@media (min-width: 701px) {
  @container sweek (max-width: 640px) {
    .sw-days { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .sw-day { grid-template-columns: 2.4rem minmax(0, 1fr); align-items: start; gap: 4px 8px; }
    .sw-day > b { grid-column: 1; grid-row: 1; padding-top: 5px; }
    .sw-day > .sw-it { grid-column: 2; }
    .sdz .sw-it { hyphens: manual; }
  }
}

/* Elternansicht: Ich-kann-Sätze, Stimmung, Gesprächsthemen (Entscheidung 16.11.2026) */
.parent-can, .parent-mood, .parent-topics { display: grid; gap: 10px; }
.pcan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pcan-list, .ptop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pcan-list li, .ptop-list li { display: flex; gap: 10px; align-items: flex-start; }
.pcan-list li > span, .ptop-list li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pcan-list .icon, .ptop-list.done .icon { color: var(--ok); flex: none; margin-top: 2px; }
.pmood-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pmood-day .face { width: 30px; height: 30px; }
.pmood-hint { display: flex; gap: 6px; align-items: flex-start; }
.pc-added { font-style: italic; }
.prot-ip { display: block; font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }

/* Einfache „Heute“-Ansicht: Umschalter neben dem Gruß (Entscheidung 16.11.2026) */
.dash-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: var(--fs-base); cursor: pointer; }
.view-toggle:hover { border-color: var(--accent); }
.view-toggle.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-ink); }
.view-toggle .icon { stroke: currentColor; }

/* Schülerdetail: echte Reiter, nur das gewählte Panel ist sichtbar */
.sd-panel[hidden] { display: none; }
.sd-panel:focus { outline: none; }
.sd-panel > .sz:first-child { margin-top: 4px; }

/* Gesprächsseite am Handy: Festhalten zuerst, Vorbereitung als Kurzfassung, Speichern-Leiste immer sichtbar */
.tk-prep > summary { list-style: none; cursor: pointer; }
.tk-prep > summary::-webkit-details-marker { display: none; }
.tk-prep > summary .tk-prep-closed, .tk-prep > summary .tk-prep-open, .tk-prep > summary .icon { display: none; }
.tk-prep > :not(summary) { margin-top: 14px; }
.tk-jline { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.4; }
.tk-jline .icon { flex: none; margin-top: 2px; color: var(--muted); }
.tk-step .tk-step-chip { margin-right: 4px; }
@media (max-width: 960px) {
  .tk-grid, .tk-grid.no-history { grid-template-areas: "form" "ctx" "hist"; }
  .tk-prep > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; min-height: 44px; margin-top: 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; }
  .tk-prep > summary .tk-prep-sum { grid-column: 1 / -1; color: var(--text); font-weight: 600; }
  .tk-prep[open] > summary .tk-prep-closed, .tk-prep:not([open]) > summary .tk-prep-open { display: none; }
  .tk-prep > summary .tk-prep-closed, .tk-prep > summary .tk-prep-open { display: inline; }
  .tk-prep > summary .icon { display: inline-block; justify-self: end; grid-column: 2; grid-row: 2; }
  .tk-prep[open] > summary .icon { transform: rotate(180deg); }
  .tk-prep > summary .tk-prep-closed, .tk-prep > summary .tk-prep-open { grid-column: 1; grid-row: 2; }
  /* die Leiste haftet immer, nicht erst bei Änderungen */
  .tk-save:not(.dirty) { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 5; margin: 18px -10px -10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
  .tk-save:not(.dirty) .btn { flex: 1; justify-content: center; min-height: 48px; }
}
@media (max-width: 860px) {
  .au-act .btn.small, .au-act select { min-height: 44px; }
  .au-steps label { min-height: 44px; align-items: center; }
  .tk-step label { min-height: 44px; }
}
/* Freigabe: „Nächster Schritt“ steht immer direkt unter der Rückmeldung; die Bausteine dazu erst bei offener Leiste */
@media (max-width: 1249px) {
  .review-grid.can-decide .decide-bar > .rv-next { grid-column: 1 / -1; }
  .decide-bar:not(.open) .rv-next .rv-snips { display: none; }
}
/* Fachkacheln: Zählchip kräftiger hinterlegt, der Rand der Leiste blendet schmaler aus */
.theme-3.subj-tile .st-meta, .s-paths .theme-3.subj-tile .st-meta { background: rgba(0,0,0,.62); }
@media (max-width: 700px) {
  .subj-strip.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
}
.home-path-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
@media (max-width: 860px) { .home-path-links .btn { min-height: 44px; } }

/* Iteration 2: Freigabe (Überlauf), Gespräch (Vorbereitung, Selbstständigkeit eingeklappt) */
.rv-next { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.tk-au-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; list-style: none; box-shadow: var(--shadow); }
.tk-au-fold > summary::-webkit-details-marker { display: none; }
.tk-au-fold > summary .tk-au-t { display: grid; min-width: 0; }
.tk-au-fold[open] > summary { margin-bottom: 10px; }
.tk-au-fold[open] > summary .icon { transform: rotate(180deg); }
.tk-au-fold > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (min-width: 961px) {
  .tk-prep > summary { display: none; }
  .tk-au-fold > summary { display: none; }
}
@media (min-width: 861px) and (max-width: 960px) { .tk-save, .tk-save:not(.dirty) { bottom: 12px; } }
.au-plan-hint { display: flex; gap: 6px; align-items: flex-start; }
.gl-stages { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-base); }
.ps-honest { margin-top: 6px; font-weight: 600; }
.ps-ring-note { display: block; max-width: 18em; font-size: var(--fs-xs); color: var(--muted); }
.pw-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 700; color: var(--accent-ink); font-size: var(--fs-sm); }
.pw-more > summary::-webkit-details-marker { display: none; }
.pw-more[open] > summary .icon { transform: rotate(180deg); }
.pa-chip { justify-self: start; margin-top: 2px; }
/* Schülerstart am Handy: Umschalter unter dem Gruß (verdeckt nichts), klein und linksbündig */
@media (max-width: 600px) {
  .dash-hello { flex-direction: column; align-items: flex-start; gap: 0; }
  .dash-hello .view-toggle { order: 3; margin-top: 8px; padding: 6px 12px; font-size: var(--fs-xs); }
}
.agr-disc .ov-title { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); }
@media (max-width: 600px) {
  .hz-week .hz-grid { gap: 8px; }
  .s-paths .done-fold > summary.section-title { min-height: 44px; margin: 0; }
  .s-paths { margin-bottom: 8px; }
}
.dash-hello .view-toggle { order: 2; }

/* ---- Iteration 3: Tagesimpuls, lang überfällige Frist, Vereinbarungen in „Jetzt“ ---- */
.day-impulse { display: grid; gap: 10px; padding: 12px 14px; margin: 0; }
.day-impulse .di-mood { display: grid; gap: 8px; }
.day-impulse .di-mood > strong { font-size: var(--fs-md); }
.di-faces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.di-face { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; padding: 6px 4px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.di-face .face { width: 30px; height: 30px; transition: transform .15s; }
.di-face:hover { border-color: var(--accent); }
.di-face:hover .face, .di-face:focus-visible .face { transform: scale(1.12); }
.di-face:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.di-face:disabled { opacity: .6; cursor: default; }
.di-saved { grid-template-columns: 32px minmax(0, 1fr); align-items: center; }
.di-saved .face { width: 32px; height: 32px; }
.di-refl { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; }
.di-refl > span { flex: 1; min-width: 0; }
.di-refl .muted { color: inherit; opacity: .85; }
.hero-late { display: grid; gap: 8px; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-base); }
.hero-late > .ic { display: none; }
.hero-late .btn { justify-self: start; white-space: normal; text-align: left; }
.agr-slim { padding: 12px 14px; margin: 0; }
.agr-slim .ag-head { margin-bottom: 4px; }
.agr-slim .ag-list li { padding: 4px 4px; }
.agr-slim .ag-list li label { min-height: 44px; }
.hz-now .agr-slim, .hz-now .day-impulse { margin-top: 12px; }
.agr-slim .ag-list li label > span .chip { margin-left: 2px; white-space: nowrap; }
@media (max-width: 700px) {
  .s-paths .path-card { padding: 14px 16px; gap: 4px 14px; }
  .s-paths .path-card h3 { margin: 4px 0 6px; font-size: var(--fs-lg); }
  .s-paths .path-card .counts { margin-top: 4px; }
  .hz-new .fb-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 700px) {
  .today-tile .tt-link:not(.btn) { display: none; }
  .hz-new .fb-item .fb-go { display: none; }
  .agr-slim .ag-ic { display: none; }
  .agr-slim .ag-head { margin-bottom: 0; }
}
@media (max-width: 700px) {
  .s-home .hz-t { margin: 16px 0 8px; }
  .s-home .hz-grid { gap: 12px; }
  .hz-now .agr-slim, .hz-now .day-impulse { margin-top: 0; }
  .hz-new .fb-list { gap: 8px; }
}
@media (max-width: 700px) {
  /* Der Ring zeigt den Fortschritt in Prozent; „3 von 4 Aufgaben“ bleibt für Screenreader und im Lernpfad selbst */
  .s-paths .path-card .counts { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .s-home .stand-row .kpi-tile { padding-block: 10px; }
}
.wp-daypick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.wp-daypick .wp-dp { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 700; min-width: 44px; min-height: 36px; justify-content: center; cursor: pointer; }
.wp-daypick .wp-dp[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.wp-daypick .wp-dp:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wp-daypick .wp-dp.today:not([aria-pressed="true"]) { border-color: var(--accent); }
.after-submit { display: grid; gap: 10px; margin: 8px 0 12px; padding: 12px 14px; border-left: 5px solid var(--ok); }
.after-submit > strong { display: flex; align-items: center; gap: 8px; }
.after-submit .as-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.after-submit .btn { white-space: normal; text-align: left; }
.td-sub { display: block; font-size: var(--fs-xs); color: inherit; font-weight: 500; margin-top: 2px; }
.today-bar.many .td-item.has-sub { grid-column: 1 / -1; }
.today-bar.many .has-sub .td-txt { flex-wrap: wrap; }
.today-bar.many .has-sub .td-sub { flex-basis: 100%; margin-top: 0; font-size: var(--fs-2xs); }
.hz-hero { display: flex; flex-direction: column; gap: 0; }
.hz-hero .next-up { flex: 1 1 auto; height: auto; }
.hero-late { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hero-late > .ic { display: inline-block; flex: none; }
.hero-late > span { flex: 1 1 0; min-width: 0; }
.hero-late .btn { flex-basis: 100%; }

.hero-late .btn { min-height: 44px; }
@media (max-width: 700px) {
  /* Klassenliste: der Hauptgrund darf umbrechen, damit der Name seine Breite behält */
  .ck-state .chip.ck-main { white-space: normal; text-align: left; line-height: 1.2; }
  .ck-state { min-width: 0; }
}
@media (max-width: 760px) {
  /* Klassenliste am Handy: engere Zeilen, damit die Liste mit Hauptgründen unter 3000 px bleibt */
  .ck-list.ck-list > li.ck-row { padding-top: 6px; padding-bottom: 6px; }
}
@media (max-width: 760px) {
  .ck-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .ck-opts > .ck-count { flex: 1 0 100%; margin: 0; }
  .ck-opts > #f-ck-sort { flex: 1 1 150px; min-width: 0; width: auto; }
  .ck-opts > .inline-field { flex: 1 1 170px; min-width: 0; }
  .ck-opts > .ck-pickbtn { flex: 1 0 100%; }
}
@media (max-width: 760px) {
  .ck-opts > #f-ck-sort { flex: 0 1 132px; }
  .ck-opts > .inline-field { flex: 1 1 200px; }
}
@media (max-width: 760px) {
  /* „+n“ nur am großen Bildschirm; am Handy stehen alle Gründe in der Übersicht der Person (ein Tipp auf die Zeile) */
}
@media (max-width: 760px) {
  /* Hauptgrund in eigener Zeile unter dem Namen, nie unter den Pfeil geschoben */
  .ck-list > .ck-row .ck-state { flex: 0 1 auto; max-width: 100%; margin: 0 0 0 auto; min-width: 0; }
  .ck-list > .ck-row .ck-state .ck-main { margin: 0; max-width: 100%; box-sizing: border-box; }
}
.hz-new .fb-more, .hz-new .btn.ghost.small { min-height: 44px; }
@media (max-width: 760px) {
  .ck-list > .ck-row > .ck-who { min-width: 128px; }
}

/* Klassenliste: „+n“ ist ein Knopf (klappt die übrigen Gründe auf); Fläche 44 px, ohne die Zeile höher zu machen */
.ck-main .ck-plus { all: unset; box-sizing: border-box; cursor: pointer; margin: -10px -4px -10px 4px; padding: 0 6px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ck-main .ck-plus:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--r-pill); }
.ck-state.open { flex-wrap: wrap; gap: 4px; }
.ck-state .ck-rest { font-size: var(--fs-2xs); }
@media (max-width: 760px) { .tap-chip[role=button] { min-height: 44px; display: inline-flex; align-items: center; margin-block: -8px; } }

/* Start der Lehrkräfte: gescheiterte Entscheidungen bleiben sichtbar */
.fail-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; padding: 8px 12px; border-radius: var(--r-md); background: #fff; color: #7a1f1f; font-weight: 700; font-size: var(--fs-base); }
.fail-note[hidden] { display: none; }
.fail-note .btn { min-height: 44px; }

/* „Was heißt das?“ an Ort und Stelle: eigener Knopf neben dem Wort */
.term-q { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; margin: -10px 0; font-size: var(--fs-xs); font-weight: 700; color: var(--text); text-decoration: underline; text-underline-offset: 3px; border-radius: var(--r-sm); vertical-align: middle; }
.term-q:hover .term-q-t { text-decoration: underline; }
.term-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }

/* Gespräch am Handy: dichtere Karten, damit die Seite unter 2500 px bleibt (ohne Inhalt zu streichen) */
@media (max-width: 760px) {
  .tk-grid { gap: 12px; }
  .tk-grid > .card { padding-top: 14px; padding-bottom: 14px; }
  .tk-since, .tk-history { padding-top: 12px; padding-bottom: 12px; }
}
.sz-head .term-q { margin-block: -24px; }
/* Eltern · Ansprechperson mit E-Mail-Knopf (18.11.2026) */
.parent-sum .ps-contact { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0; font-size: var(--fs-base); line-height: 1.45; }
.ps-contact > .icon { flex: none; color: var(--muted); }
.ps-contact > span { flex: 1 1 220px; min-width: 0; }
.ps-contact .ps-mail { min-height: 44px; }
@media (max-width: 760px) { .parent-sum.ps3 .ps-contact { grid-column: 1 / -1; grid-row: 3; } }
@media (max-width: 640px) { .parent-sum .ps-contact { grid-column: 1 / -1; } }
/* Ab Donnerstag (Tagesimpuls): Rückblick und Folgewoche nebeneinander, „Dein Stand“ am Handy eingeklappt (19.11.2026) */
.di-refl .muted { color: inherit; opacity: 1; }
.di-links { display: grid; gap: 8px; }
.di-links.two { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.di-links .di-refl strong { font-size: var(--fs-base); }
@media (max-width: 600px) { .di-links .di-sub, .di-links.two .di-long { display: none; } }
/* „Dein Stand“ am Handy: eine Karte mit Kurzzeile (nicht nur eine Überschrift mit Leerraum) */
.stand-fold { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 4px 14px; }
.stand-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; cursor: pointer; list-style: none; }
.stand-fold > summary::-webkit-details-marker { display: none; }
.stand-fold > summary .sf-text { display: grid; gap: 2px; min-width: 0; }
.stand-fold > summary .section-title { margin: 0; }
.stand-fold > summary .sf-line { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.stand-fold[open] > summary .sf-line { display: none; }
.stand-fold[open] { padding-bottom: 12px; }
.stand-fold[open] > summary .sf-chev { transform: rotate(180deg); }
.stand-fold .hz-stand > .hz-t { display: none; }
@media (max-width: 600px) { .dash-hello .today-label { display: block; } }
/* Kurzer Wochentag am Handy: eine Zeile neben dem Umschalter (21.11.2026) */
.today-label .tl-short { display: none; }
@media (max-width: 600px) { .dash-hello .today-label .tl-long { display: none; } .dash-hello .today-label .tl-short { display: inline; } }
.tray-late-row { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tray-late-row .btn { min-height: 44px; }
.wp-late { margin-top: 10px; }
/* Tippfläche „Rückblick lesen“ u. Ä. in der Coaching-Übersicht am Handy (Prüfung it7) */
@media (max-width: 600px) { .cc-more > summary, .cc-card.is-phone .cc-more > summary { min-height: 44px; } }

/* Abgabe zu einer seither geänderten Aufgabe: Fassung beim Abgeben */
.rv-task-then { margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--line, #d0d4dc); }
.rv-task-then summary { cursor: pointer; }
.rv-task-then[open] summary { margin-bottom: 6px; }

/* Verlauf einer Rasterzelle (Lehrkraft) */
.kr-history { margin: 8px 0 0; }
.kr-history summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; }
.kr-history ol { margin: 6px 0 0; padding-left: 18px; }
.kr-history li { margin: 2px 0; }

/* „Erreicht mit Unterstützung“: bestätigt, gestrichelter Rand als Zusatz */
.kg-cell.confirmed.support { border-style: dashed; }
.kr-support-row { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; min-height: 44px; }
.kr-support-row input { margin-top: 0; }

/* ===== Lernstand zum Ausdrucken (Elternsprechtag, KEL-Gespräch), im Schuldesign: Aptos, Apricot nur für Linien und Flächen ===== */
.ls-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.ls-bar .back { flex-basis: 100%; }
.ls-bar-main { flex: 1 1 260px; }
.ls-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; padding: 0; margin: 0; flex-basis: 100%; }
.ls-opt { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); cursor: pointer; }
.ls-sheet {
  --ls-text: #333333; --ls-apricot: #F3AF98; --ls-hell: #FBEDE7; --ls-rost: #A04E28; --ls-grau: #6B6B6B; --ls-rahmen: #D9C3B8;
  font-family: Aptos, 'Segoe UI', Calibri, Arial, sans-serif; color: var(--ls-text); background: #fff; color-scheme: light;
  max-width: 210mm; margin: 0 auto; padding: 16mm 15mm; box-shadow: 0 2px 16px rgba(0,0,0,.12); border-radius: var(--r-xs);
  font-size: 10.5pt; line-height: 1.4;
}
.ls-sheet h1 { font-size: 18pt; font-weight: 700; margin: 2px 0 4px; color: var(--ls-text); }
.ls-sheet h2 { font-size: 12pt; color: var(--ls-rost); margin: 0 0 6px; padding-bottom: 3px; border-bottom: 1.5pt solid var(--ls-apricot); }
.ls-sheet h3 { font-size: 11pt; margin: 8px 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ls-head { border-bottom: 3pt solid var(--ls-apricot); padding-bottom: 8px; margin-bottom: 12px; }
.ls-logos { display: flex; justify-content: space-between; align-items: center; gap: 10mm; margin: 0 0 3mm; }
.ls-logos img { display: block; height: 12mm; width: auto; max-width: 75mm; object-fit: contain; }
.ls-logos img.right { margin-left: auto; }
.ls-school { margin: 0; font-size: 9.5pt; color: var(--ls-grau); letter-spacing: .02em; }
.ls-meta { margin: 0; font-size: 10pt; }
.ls-sec { margin: 0 0 10px; }
.ls-sec > h2 { break-after: avoid-page; }
.ls-sec[data-part="notizen"], .ls-sec[data-part="vereinb"], .ls-sec[data-part="stufe"] { break-inside: avoid; }
.ls-sec[hidden], .ls-self[hidden] { display: none !important; }
.ls-sheet ul { margin: 2px 0 4px; padding-left: 18px; }
.ls-sheet li { margin: 1px 0; }
.ls-lead { margin: 0 0 4px; }
.ls-small { font-size: 9pt; margin: 4px 0; }
.ls-muted { color: var(--ls-grau); }
.ls-count { font-size: 9.5pt; font-weight: 400; color: var(--ls-rost); }
.ls-box { background: var(--ls-hell); border-radius: var(--r-sm); padding: 6px 10px; margin: 4px 0; }
.ls-sheet ul.ls-checks { list-style: none; padding-left: 0; }
.ls-checks li { display: flex; gap: 8px; align-items: baseline; }
.ls-mark { flex: none; width: 11px; height: 11px; border: 1pt solid var(--ls-rahmen); border-radius: var(--r-xs); background: #fff; font-size: 8pt; line-height: 10px; text-align: center; color: var(--ls-rost); transform: translateY(1px); }
.ls-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; line-height: 1.3; }
.ls-table th { background: var(--ls-apricot); color: var(--ls-text); text-align: left; font-weight: 700; }
.ls-table th, .ls-table td { border: 0.5pt solid var(--ls-rahmen); padding: 2px 5px; vertical-align: top; }
.ls-table td:first-child { background: var(--ls-hell); white-space: nowrap; }
.ls-table .num { text-align: right; white-space: nowrap; }
.ls-table tr.late td:last-child { font-weight: 700; }
/* Raster als Karten in zwei Spalten: jedes Fach bleibt auf einer Seite zusammen (21.11.2026) */
.ls-grids { margin-top: 6px; }
.ls-block { display: flex; flex-wrap: wrap; gap: 0 7mm; align-items: flex-start; }
.ls-block > .ls-kurse-t { flex: 0 0 100%; }
.ls-col { flex: 1 1 0; min-width: 0; }
/* Jedes Fach als eigene Karte: heller Kopf mit Fachname in Rost, dünner Rahmen, Abstand zur nächsten Karte (Albert, 21.11.2026) */
.ls-grid { break-inside: avoid; -webkit-column-break-inside: avoid; display: flow-root; margin: 0 0 3.5mm; border: 0.75pt solid var(--ls-rahmen); border-radius: var(--r-xs); overflow: hidden; background: #fff; }
.ls-sheet .ls-grid h3 { display: flex; flex-wrap: nowrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; padding: 3px 8px; background: var(--ls-hell); border-bottom: 1.5pt solid var(--ls-apricot); font-size: 10.5pt; line-height: 1.25; color: var(--ls-rost); }
.ls-grid-body { padding: 2px 8px 4px; }
.ls-gt { min-width: 0; }
.ls-count { flex: none; font-size: 8pt; font-weight: 700; color: var(--ls-text); white-space: nowrap; }
.ls-sheet table.ls-mini { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px 2px; font-size: 9pt; line-height: 1.15; margin: 0 -2px 2px; }
.ls-mini th, .ls-mini td { border: 0; background: none; }
.ls-sheet .ls-mini thead th { font-weight: 400; color: var(--ls-grau); text-align: center; vertical-align: bottom; padding: 0 1px 1px; font-size: 6.5pt; hyphens: manual; line-height: 1.1; overflow-wrap: normal; }
.ls-sheet .ls-mini tbody th { text-align: left; font-weight: 400; font-size: 9pt; line-height: 1.15; color: var(--ls-text); padding: 0 4px 0 0; white-space: normal; vertical-align: middle; }
.ls-mini td { padding: 0; vertical-align: middle; }
.ls-sheet .ls-mini td i { height: 10px; }
.ls-mini td i, .ls-legend i { display: block; width: 100%; height: 100%; border-radius: var(--r-xs); border: 0.75pt solid var(--ls-rahmen); box-sizing: border-box; }
.ls-mini td.none i { border-style: dotted; opacity: .5; }
.ls-mini .conf i, .ls-legend .conf { background: var(--ls-rost); border-color: var(--ls-rost); }
.ls-mini .sup i, .ls-legend .sup { background: repeating-linear-gradient(135deg, var(--ls-rost) 0 2px, #fff 2px 4px); border-color: var(--ls-rost); }
/* Im Schwarzweißdruck an der Musterung zu unterscheiden, nicht nur am Grauton: bestätigt = voll, mit Unterstützung = schräg, selbst eingeschätzt = Punkte, in Arbeit = senkrechte Streifen, offen = leer */
.ls-mini .self i, .ls-legend .self { background: radial-gradient(circle at 50% 50%, var(--ls-apricot) 0 1.1px, #fff 1.5px) 0 0 / 4px 4px; border-color: var(--ls-apricot); border-width: 1pt; }
.ls-mini .work i, .ls-legend .work { background: repeating-linear-gradient(90deg, var(--ls-grau) 0 1px, #fff 1px 3px); border-color: var(--ls-grau); }
.ls-legend { display: flex; flex-wrap: wrap; gap: 3px 14px; color: var(--ls-grau); }
.ls-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ls-legend i { display: inline-block; width: 16px; height: 10px; }
.ls-row { font-weight: 700; margin: 3px 0 0; font-size: 9.5pt; }
.ls-can-row { break-inside: avoid; }
.ls-sheet .ls-can ul, .ls-sheet .ls-self ul { font-size: 10pt; line-height: 1.3; margin: 1px 0 2px; padding-left: 0; list-style: none; }
.ls-can li, .ls-self li { display: flex; gap: 5px; align-items: baseline; margin: 1px 0; }
.ls-lvl { flex: none; display: inline-block; min-width: 0; margin: 0; padding: 0 4px; border-radius: var(--r-xs); background: var(--ls-hell); font-size: 8pt; line-height: 1.5; color: var(--ls-rost); font-weight: 700; white-space: nowrap; }
.ls-sup { color: var(--ls-grau); font-style: normal; }
.ls-self { margin-top: 3px; padding: 1px 0 1px 7px; border-left: 2pt solid var(--ls-apricot); }
.ls-self .ls-row { color: var(--ls-grau); margin-top: 0; }
.ls-grid-body > .ls-muted.ls-small { font-size: 8pt; margin: 1px 0 2px; }
.ls-end { display: flex; flex-wrap: wrap; gap: 0 7mm; break-inside: avoid; }
.ls-end > .ls-sec { flex: 1 1 75mm; min-width: 0; font-size: 9.5pt; }
.ls-lines span { display: block; height: 6.2mm; border-bottom: 0.5pt solid var(--ls-rahmen); }
.ls-sign { display: flex; gap: 10mm; margin-top: 6mm; }
.ls-sign span { flex: 1; border-top: 0.5pt solid var(--ls-text); padding-top: 2px; }
.ls-foot { break-before: avoid; margin-top: 4px; padding-top: 4px; border-top: 0.5pt solid var(--ls-rahmen); font-size: 8pt; color: var(--ls-grau); }
@page lernstand {
  size: A4; margin: 12mm 14mm 14mm;
  @bottom-right { content: "Seite " counter(page) " von " counter(pages); font: 7.5pt Aptos, 'Segoe UI', Calibri, Arial, sans-serif; color: #6B6B6B; }
  @bottom-left { font: 7.5pt Aptos, 'Segoe UI', Calibri, Arial, sans-serif; color: #6B6B6B; }
}
@media print {
  .ls-sheet { page: lernstand; max-width: none; padding: 0; box-shadow: none; border-radius: 0; }
  .ls-sheet, .ls-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main:has(.ls-sheet) > :not(.ls-sheet), body:has(.ls-sheet) .skip-link { display: none !important; }
  html:has(.ls-sheet) { background: #fff !important; color-scheme: light; }
  body:has(.ls-sheet), body:has(.ls-sheet) main { background: #fff !important; color: #333; }
  body:has(.ls-sheet)::before, body:has(.ls-sheet)::after { display: none !important; }
  body:has(.ls-sheet) main { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
  html:has(.ls-sheet), body:has(.ls-sheet), body:has(.ls-sheet) .app, body:has(.ls-sheet) .layout { min-height: 0 !important; height: auto !important; }
}
@media screen and (max-width: 860px) {
  .ls-sheet { padding: 16px; font-size: 10pt; }
  /* Tabelle bleibt eine Tabelle (hell, nicht als dunkle Karten); sie bricht um oder wischt seitlich */
  .ls-tablewrap { overflow-x: auto; }
  .ls-table { font-size: var(--fs-2xs); }
  .ls-table .num { white-space: normal; }
  .ls-table td:first-child { white-space: normal; }
  .ls-grids { display: flex; flex-direction: column; }
  .ls-block, .ls-col { display: contents; }
  .ls-block > .ls-kurse-t { order: 99; }
  .ls-logos { gap: 4mm; }
  .ls-logos img { max-width: 45%; height: auto; max-height: 12mm; min-width: 0; }
  .ls-opt { min-height: 44px; }
  .ls-bar .back { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Schuleinstellungen: Logos für Ausdrucke */
.logo-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.logo-slot { display: grid; gap: 8px; }
.logo-label { margin: 0; }
.logo-prev { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 10px; border: 1px dashed var(--line, #d0d4dc); border-radius: var(--r-md); background: #fff; }
.logo-prev img { max-height: 56px; max-width: 100%; object-fit: contain; }
.logo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-btns .btn, .logo-btns label.btn { min-height: 44px; display: inline-flex; align-items: center; }
.ls-explain { margin: 2px 0 4px; }
.kr-key.confirmed.support i { background: var(--ok-soft); border: 2px dashed var(--ok-bright); color: var(--ok); }
.sdc-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 2px 4px; border: 0; border-radius: var(--r-md); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sdc-row:hover { background: var(--surface-2); }
.sdc-row .sdc-main { flex: 1 1 auto; }
.sdc-row > .icon:last-child { flex: none; }

/* Schülerdetail, Reiter Kompetenzraster: Sprungleiste und „dein Raster“ */
.kr-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.kr-jump-t { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin-right: 4px; }
.kr-jump-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.kr-jump-btn:hover { background: var(--surface-2); }
.kr-jump-btn.own { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.kr-own-tag { display: inline-block; width: fit-content; padding: 1px 8px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-2xs); font-weight: 700; }
.kr-fold.own { border-color: var(--accent); }
.kr-fold { scroll-margin-top: 130px; }
.gp-now { flex: none; }
.kind-hint { margin: 0 0 4px; }
.logo-preview { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.logo-preview[hidden] { display: none; }
.logo-preview-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }

.kr-key-note { flex: 1 1 100%; font-size: var(--fs-sm); color: var(--muted); }

/* Große Schirme: nichts Wichtiges unter 14 px (Vereinbarungen 16 px) */
@media (min-width: 1280px) {
  body main .level-chip,
  body main .subject-tag,
  body main .due,
  body main .st-meta,
  body main .dl-when,
  body main .tl-long,
  body main .new-badge,
  body main .eyebrow,
  body main .lv,
  body main .wd,
  body main .fold-hint,
  body main .wi-meta,
  body main .dc-date,
  body main .dc-tag,
  body main .dc-count,
  body main .goal-label,
  body main .wp-goal-state,
  body main .wt-wd,
  body main .wt-num,
  body main .kt-next,
  body main .kr-st,
  body main .kr-step,
  body main .kr-key,
  body main .kr-legend,
  body main .kr-guide .kr-legend,
  body main .section-title.hz-t,
  body main .cp-agree,
  body main .ag-done > summary,
  body main .chip { font-size: var(--fs-sm); }
  body main .ag-list li, body main .ag-list li label, body main .agreements-card .ag-list { font-size: var(--fs-md); }
  body main .ag-list.small li, body main .ag-list.done li { font-size: var(--fs-base); }
  body main .subj-tile .st-meta, body main .s-paths .subj-tile .st-meta, body main .year-hero .eyebrow, body main .next-up .eyebrow, body main .week-hero .eyebrow,
  body main .journal-hero .eyebrow, body main .section-title, body main .sd-sub.section-title { font-size: var(--fs-sm); }
  body main .section-title.big, body main .sd-sub.section-title { font-size: var(--fs-md); }
}

/* Sprungleiste am Handy: eine Zeile, seitlich wischbar (Schülerdetail und Elternsicht) */
@media (max-width: 700px) {
  .kr-jump { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 6px; margin-right: -16px; padding-right: 16px; }
  .kr-jump > * { flex: none; }
  .kr-jump-btn { white-space: nowrap; }
}
@media (max-width: 700px) {
  .kr-fold { padding: 12px 14px; }
  .kr-fold > .kr-head { row-gap: 4px; }
  .kr-fold > .kr-head .kr-own-tag { display: none; }
  .kr-fold > .kr-head .kr-stats { gap: 4px 6px; }
  .kr-fold.own > .kr-head .kr-title::after { content: " · dein Raster"; font-weight: 600; color: var(--accent-ink); font-size: var(--fs-sm); }
}
.logo-slot[hidden] { display: none; }
.kg-cell.withdrawing { opacity: .55; border-style: dashed; }

/* Handy: eingeklappte Bereiche (Eltern-Start, Lernplaner) etwas knapper gesetzt, damit der Start im Höhenbudget bleibt */
@media (max-width: 700px) {
  .all-paths { margin-top: 16px; }
  .all-paths > summary { padding: 12px 16px; margin-bottom: 10px; }
  .all-paths.fold3 > summary { min-height: 48px; }
}
@media (max-width: 700px) {
  .parent-cols, .parent-main, .parent-side { gap: 12px; }
  .parent-cols { margin-bottom: 12px; }
  .parent-cols .card, .parent-sum { padding: 16px; }
  .parent-sum { gap: 10px 14px; }
}
/* Dialog „Ergebnis eintragen“: Tippflächen am Handy mindestens 44 px */
@media (max-width: 700px) {
  .res-editor .seg.lc-seg > button, .res-body .picker.grades > button.pk, .res-editor > input { min-height: 44px; }
}

/* Iteration 3: Erfolgskriterien zum Aufklappen (am Handy zu), die klebende Entscheidungsleiste bleibt niedrig */
.rv-crit { padding: 0 12px; gap: 0; display: block; }
.rv-crit > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; cursor: pointer; list-style: none; }
.rv-crit > summary::-webkit-details-marker { display: none; }
.rv-crit[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rv-crit .rv-crit-hint { font-weight: 500; color: var(--muted); font-size: var(--fs-sm); }
.rv-crit .rv-crit-list { display: grid; gap: 2px; }
.rv-crit .btn { margin: 4px 0 8px; }
@media (max-width: 600px) {
  .rv-crit { margin: 0; }
  .rv-crit .rv-crit-hint { display: none; }
  .rv-crit[open] .rv-crit-list { max-height: 28dvh; overflow-y: auto; }
}
/* Über einer haftenden Leiste (Freigabe-Entscheidung, Gespräch speichern) steht die Meldung direkt darüber, dom.js misst die Leiste */
@media (max-width: 860px) { .toast.lifted { bottom: var(--toast-bottom, 100px); } }

/* Raster-Liste: Filter „Meine | Alle“, Alle nach Fach geordnet */
.kr-scope { display: block; margin: 0 0 14px; }
.kr-scope .segmented .sg-opt { min-height: 44px; padding: 0 18px; font-size: var(--fs-base); }

/* Satzanfänge für Gesprächsthemen: am Handy eine wischbare Zeile statt mehrerer Reihen */
@media (max-width: 600px) {
  .tp-starts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .tp-starts::-webkit-scrollbar { display: none; }
  .tp-starts .chip { flex: none; white-space: nowrap; }
}
.cc-line > .cc-chips, .cc-line > .chips { flex: 1 1 0; min-width: 0; }

/* Rückblick-Karte am Handy: „Ausblenden“ steht in der Titelzeile, keine eigene Zeile */
@media (max-width: 600px) {
  .recall-card { flex-wrap: nowrap; position: relative; }
  .recall-card .rc-body { flex-basis: auto; }
  .recall-card .rc-body > strong { display: flex; align-items: center; min-height: 40px; padding-right: 92px; }
  .recall-card .rc-ok { position: absolute; top: 8px; right: 8px; margin: 0; min-height: 44px; }
}
/* Usability-Nachbesserung 3 */
.review-top .back { white-space: nowrap; flex: none; hyphens: none; }
@media (max-width: 600px) {
  dialog .dlg-foot .cd-cancel { display: none; } /* am Handy schließt das ✕ */
  dialog .dlg-foot:has(.cd-cancel) > .btn { flex: 1 1 100%; justify-content: center; min-height: 44px; }
}

/* ---------- Kern und Kurse, Profil, Archiv (Entscheidung Schulleitung 22.11.2026) ---------- */
/* Kern-Raster als Matrix Fach × Jahrgang; Kurse darunter, getrennt */
.kr-sec { margin-top: 18px; }
.kr-sec-head { margin: 0 0 2px; font-size: var(--fs-xl); }
.kr-sec-sub { margin: 0 0 10px; }
.kr-mx-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.kr-mx-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kr-mx { border-collapse: collapse; width: 100%; min-width: 560px; font-size: var(--fs-base); }
.kr-mx th, .kr-mx td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.kr-mx thead th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.kr-mx tbody th { font-weight: 700; min-width: 150px; }
.kr-mx tbody tr:last-child > * { border-bottom: 0; }
.kr-mx td + td, .kr-mx th + th { border-left: 1px solid var(--line); }
.kr-mx-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; padding: 3px 10px; margin: 2px 4px 2px 0; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.kr-mx-chip:hover { text-decoration: underline; }
.kr-mx-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kr-mx-chip.draft { background: var(--surface-2); color: var(--muted); }
.kr-mx-ex { font-size: var(--fs-xs); color: var(--warn); }
/* Schüler:innen: Kurse klein und getrennt unter den Fächern */
.kr-kurse-head { margin: 22px 0 8px; font-size: var(--fs-md); color: var(--muted); }
.kr-tiles-kurse { margin-bottom: 4px; }
.kr-tiles-kurse .kr-tile { padding-top: 10px; padding-bottom: 10px; }
/* Ausnahmen je Raster und je Schüler:in */
.kr-ex-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.kr-ex-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.kr-ex-list li:first-child { border-top: 0; }
.kr-ex-list li.withdrawing { opacity: .45; }
.kr-ex-reason { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.kr-assign { margin-top: 16px; }
.kr-exceptions { margin-top: 12px; }
/* Profil-Etikett */
.profile-chip { white-space: nowrap; }
.ck-name { display: flex; flex-direction: column; min-width: 0; }
.ck-profile { font-size: var(--fs-2xs); font-weight: 500; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
/* Archiv */
.card.tile.archived { border-style: dashed; display: grid; gap: 6px; align-content: start; }
.card.tile.archived h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.archive-toggle { margin: 0 0 12px; }
.archived-note { margin: 12px 0; }
/* Druckblatt: Kurse klein unter den Kern-Fächern */
.ls-kurse { margin-top: 3mm; }
.ls-kurse .ls-kurse-t { margin: 0 0 2mm; font-size: 10pt; color: var(--ls-rost); }
.ls-kurse .ls-grid { margin-bottom: 2.5mm; }


/* Klassenliste: lange Stand-Texte umbrechen statt in die Nachbarspalte zu laufen */
.ck-state { min-width: 0; }
.ck-state .chip.ck-main { white-space: normal; text-align: left; line-height: 1.2; max-width: 100%; box-sizing: border-box; border-radius: var(--r-md); }

/* ---------- Nachbesserung 22.11. (Runde 1): Ausnahmen, Matrix am Handy, Archiv ---------- */
.term-tip { all: unset; box-sizing: border-box; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; padding: 0 2px; vertical-align: middle; }
.term-tip:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-radius: var(--r-xs); }
.kr-kurse-help { margin: -4px 0 10px; max-width: 70ch; }
.kr-assign { margin: 0 0 12px; }
.kr-assign-note { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.kr-assign-btns { margin-bottom: 8px; }
@media (max-width: 600px) {
  .kr-assign .btn, .kr-ex-list .btn, .kr-exceptions .btn, .kr-ex-list a { min-height: 44px; }
  .kr-ex-list a { display: inline-flex; align-items: center; }
}
/* Raster-Übersicht: Tabelle ab 601 px, am Handy eine Zeile je Fach */
.kr-mxl { display: none; }
@media (max-width: 600px) {
  .kr-mx-wrap { display: none; }
  .kr-mxl { display: block; list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .kr-mxl li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 12px; border-top: 1px solid var(--line); min-height: 52px; }
  .kr-mxl li:first-child { border-top: 0; }
  .kr-mxl-subj { flex: 1 1 130px; min-width: 0; overflow-wrap: anywhere; }
  .kr-mxl-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 1 auto; max-width: 100%; }
  .kr-mxl .kr-mx-chip { min-height: 44px; margin: 0; padding: 4px 14px; max-width: 100%; overflow-wrap: anywhere; box-sizing: border-box; }
}
.archive-toggle { min-height: 44px; padding: 4px 0; }
@media (max-width: 600px) { .archive-toggle { margin-bottom: 10px; } }
@media (max-width: 700px) {
  .kr-section > .kr-fold { margin-bottom: 10px; }
  .kr-kurse-head { margin-top: 14px; }
}
@media (max-width: 700px) {
  .kr-fold { padding: 10px 14px; }
  .kr-assign-note { margin: 0 0 4px; }
}

.card.tile.archived .chip { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.kg-cell.empty.edit { color: color-mix(in srgb, var(--muted) 75%, var(--text)); }
@media (max-width: 600px) {
  /* Raster-Übersicht am Handy: Kursraster ohne großes Titelbild, damit die Seite kurz bleibt */
  .kr-list .tile.has-cover .tile-cover { display: none; }
  .kr-list .tile.has-cover { padding-top: 14px; gap: 6px; }
  .kr-list .tile .meta { gap: 2px 10px; }
}

/* Messen der Rasterkarten in Blattbreite (print-views.js balanceCards), auch am schmalen Bildschirm */
.kr-ex-list li.fresh { background: var(--accent-soft); border-radius: var(--r-sm); padding-left: 8px; padding-right: 8px; animation: kr-fresh 2.4s ease-out 1; }
@keyframes kr-fresh { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .kr-ex-list li.fresh { animation: none; } }

.chip-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
@media (max-width: 600px) {
  .archived-note { padding: 10px 12px; gap: 10px; margin: 8px 0; }
  .archived-note .btn { min-height: 44px; margin-top: 4px; }
  .archived-note p { font-size: var(--fs-xs); line-height: 1.35; }
}
@media (max-width: 600px) {
  .archived-note > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; flex: 1; min-width: 0; }
  .archived-note > div > p { grid-column: 1 / -1; grid-row: 2; }
  .archived-note > div > .btn { grid-column: 2; grid-row: 1; margin-top: 0; }
}
@media (max-width: 600px) { main > details.fold-card:not([open]) { padding-top: 6px; padding-bottom: 6px; } }
@media (max-width: 600px) { .archived-note { margin: 0 0 4px; } }

/* Trennpunkt im Schülerkopf: nicht in das Profil-Etikett, sondern davor und danach */
.sh-meta .profile-chip::before { content: none; }
.sh-meta .profile-chip { overflow: visible; }
.sh-meta .profile-chip + span::before { content: none; }
@media (min-width: 701px) { .sh-meta .profile-chip { margin: 0 2px; } }
.proof-link .chip { white-space: nowrap; flex: none; }
@media (max-width: 600px) {
  /* Raster-Übersicht: Kurskarte in drei Zeilen (Status, Titel und Gilt für, Verknüpfung) mit „Bearbeiten“ immer rechts unten */
  .kr-list .tile h3 + .meta > span:nth-child(n+2) { display: none; }
  .kr-list .tile .tile-foot { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; }
  .kr-list .tile .kr-open { margin-left: auto; white-space: nowrap; }
}
@media (max-width: 600px) {
  .kr-form .kf-group-list { gap: 0 16px; }
  .kr-form .kf-group-list .kf-check { min-height: 44px; padding: 4px 0; }
  .kr-form .kf-group-list .kf-check input { width: 22px; height: 22px; flex: none; }
}
.yt-bar.planned, .yt-bar.draft { color: color-mix(in srgb, var(--muted) 70%, var(--text)); }
@media (max-width: 600px) {
  .tk-brings li { flex-wrap: wrap; }
  .tk-brings li .tk-b-text, .tk-brings li label { flex: 1 1 100%; }
  .tk-brings li .btn { margin-left: auto; }
}

/* D1: Zähler als ruhige Pill-Zeile unter der Hero (nicht mehr in der Hero) */
.today-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.today-bar .td-item, .today-bar.many .td-item, .today-bar .td-item.has-sub { grid-column: auto; flex: 0 1 auto; padding: 6px 14px 6px 8px; min-height: 44px; gap: 8px; border-radius: var(--r-pill);
  background: var(--surface, #fff); color: var(--text); border: 1px solid var(--line, #e2e4ee); box-shadow: none; backdrop-filter: none; }
.today-bar a.td-item:hover { background: var(--surface-2, #f3f4fa); transform: none; }
.today-bar .td-ic, .today-bar.many .td-ic { width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--accent-soft, #ece9fb); color: var(--accent, #5a44dc); }
.today-bar .td-txt, .today-bar.many .td-txt { display: flex; align-items: baseline; gap: 6px; }
.today-bar .td-txt b, .today-bar.many .td-txt b { font-size: var(--fs-md); }
.today-bar .td-txt span { font-size: var(--fs-sm); font-weight: 500; }
.today-bar .td-go { display: none; }

/* D10: Kopfzeile am Handy nur Logo, DEMO-Marke, Glocke und Avatar; der abgeschnittene Schulname entfällt (steht im Avatar-Menü) */
@media (max-width: 600px) { .topbar .school, body.is-student .topbar .school { display: none; } .topbar { gap: 10px; } }
@media (max-width: 600px) { .kr-profile-line .kr-profile-help { display: none; } .kr-profile-line { margin: 6px 0; } }
.check-row[hidden] { display: none; }

/* R1: im Druckblatt nie automatisch trennen (Ich-kann-Sätze bleiben ganz) */
.ls-sheet, .ls-sheet * { hyphens: manual; -webkit-hyphens: manual; }
.stack[hidden] { display: none; }
@media (min-width: 601px) { .kr-profile-q { display: none; } }
.ps-planned-mobile { display: none; }
@media (max-width: 760px) { .ps3 .ps-planned-mobile { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: var(--fs-xs); color: var(--muted); } }

/* R4: Desktop: begrenzte Inhaltsbreite, etwas größere Metaschrift, Schüler-Start zweispaltig, runde Smiley-Knöpfe */
main:not(.wide) { max-width: 1320px; margin-inline: auto; }
@media (min-width: 1200px) {
  :root { --fs-xs: .875rem; --fs-sm: .9375rem; }
  /* Runde 7: Smileys beisammen (nicht über die ganze Breite verteilt), mit sichtbarer Beschriftung wie am Handy */
  .di-faces { display: flex; justify-content: flex-start; gap: 14px; }
  .di-face { width: 96px; min-height: 84px; padding: 8px 4px; border-radius: var(--r-lg); justify-content: center; flex: none; }
  .di-face .face { width: 40px; height: 40px; }
}
@media (min-width: 761px) {
  .parent-sum.ps3 { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 20px; align-items: start; }
  .parent-sum.ps3 .ps-ring { min-width: 0; width: auto; }
}

/* R7: Höhenpuffer: Klassenlisten am Handy etwas dichter (Tippfläche bleibt 44 px) */
@media (max-width: 600px) { .ck-row { min-height: 52px; padding: 4px 10px; } }

/* R8: Zähler-Pills am Handy als gleichmäßiges Raster, „Hilfe nötig“ über beide Spalten */
@media (max-width: 600px) {
  .today-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .today-bar .td-item, .today-bar.many .td-item { border-radius: var(--r-lg); min-width: 0; }
  .today-bar .td-item.has-sub, .today-bar.many .td-item.has-sub { grid-column: 1 / -1; }
  .today-bar .td-short { white-space: normal; line-height: 1.15; }
  .today-bar .td-long { display: none; }
}
@media (min-width: 601px) { .today-bar .td-short { display: none; } }
/* R1: Zeilennamen im Druckblatt brechen notfalls im Wort, statt in die Balken zu laufen */
.ls-sheet .ls-mini tbody th { overflow-wrap: anywhere; font-size: 8pt; }

/* Nachbesserung: keine Wortbrüche mitten im Wort, Grid-Kinder dürfen schrumpfen, Druckkopf mit Luft */
.s-home * { overflow-wrap: normal; }
.s-home .hz-stand .kpi-lbl, .s-home .hz-stand .kpi-val, .s-home .hz-stand .kpi-tile * { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.s-home .hz-grid > *, .s-home .hz > * { min-width: 0; }
.hz-stand .kpi-row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.s-home .day-impulse { max-width: 560px; }
.ls-sheet .ls-mini thead th { padding: 0 1px 1px; }
.ls-mini col.ls-mini-row { width: 40%; }
.s-home .day-impulse { margin-top: 14px; max-width: none; }

/* Wochenplan: Raster-Blöcke (Ich-kann-Sätze) einplanen, 22.11.2026 */
.wp-tray-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.wp-how { flex: 1 1 260px; }
.wp-grip { flex: none; display: inline-grid; place-items: center; width: 14px; margin-left: -6px; color: var(--muted); cursor: grab; }
.wp-grip .icon { width: 16px; height: 16px; stroke-width: 3.2; }
.wp-skills { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wp-skill { display: grid; gap: 10px; padding: 12px 12px 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); border-left: 5px solid var(--c); cursor: grab; min-width: 0; }
.wp-skill.dragging { opacity: .45; }
.wp-skill.extra { display: none; }
.wp-tray.all-paths .wp-skill.extra { display: grid; }
.wp-skill:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 22%, transparent); }
.wp-skill .sk-head { display: flex; align-items: flex-start; gap: 8px; }
.wp-skill .sk-head .wp-grip { margin-top: 4px; }
.wp-skill .sk-head .tp-art { flex: none; }
.wp-skill .sk-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.wp-skill .sk-text { font-size: var(--fs-base); line-height: 1.35; }
.wp-skill .wp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.sk-known, .sk-late { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-weight: 700; padding: 1px 8px; border-radius: var(--r-pill); }
.sk-known { background: var(--ok-soft); color: var(--ok); }
.sk-known .icon { width: 12px; height: 12px; stroke-width: 3.2; }
.sk-late { background: var(--danger-soft, color-mix(in srgb, #e5484d 16%, transparent)); color: var(--danger, #e5484d); }
.wp-skill.known { opacity: .85; }
.wp-skill .sk-next { display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 10px; border-radius: var(--r-md); background: var(--surface); }
.wp-skill .sk-next-t { display: grid; gap: 1px; flex: 1; min-width: 0; }
.wp-skill .sk-label { font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--c); }
.wp-skill .sk-task { font-size: var(--fs-sm); line-height: 1.3; }
@media (hover: hover) { .wp-skill .sk-next:hover .wp-plan { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } }
.wp-skill .menu-list { right: 0; left: auto; min-width: 200px; }
.wp-skill .sk-all { justify-self: start; margin-top: -2px; }
.wp-skill .sk-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wp-skill .sk-tasks .wp-task { background: var(--surface); }
.wp-loose-h { margin: 22px 0 0; font-size: var(--fs-md); color: var(--muted); }
.wp-loose { margin-top: 10px; }
.wi-skill { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; font-size: var(--fs-xs); line-height: 1.3; color: color-mix(in srgb, var(--text) 78%, var(--muted)); }
.wi-skill .icon { flex: none; width: 15px; height: 15px; margin-top: 0; stroke-width: 2.4; stroke: var(--c, var(--accent)); }
.wi-skill > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.weekend-hint .wk-go { flex: none; gap: 4px; pointer-events: none; }
@media (max-width: 1250px) { .wp-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .wp-grip { display: none; }
  .wp-skill, .wp-task { cursor: default; }
  .wp-skills { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wp-skill:nth-child(n+5) { display: none; }
  .wp-tray.all-paths .wp-skill:nth-child(n+5) { display: grid; }
  .wp-skill .sk-next { padding: 4px 2px 4px 10px; min-height: 56px; box-sizing: border-box; }
  .wp-skill .sk-all { box-sizing: border-box; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .wp-mode { width: 100%; }
  .wp-mode .sg-opt { flex: 1; min-height: 40px; }
  .weekend-hint { flex-wrap: wrap; }
  .weekend-hint .wk-go { width: 100%; justify-content: center; min-height: 44px; }
}

/* Paket 1 (23.11.2026) · Wochenplan: ein Weg zum Einplanen, Blöcke mit mehreren Sätzen, Kontrast, Tippflächen */
.wp-skill .sk-label { color: var(--text); }
.wp-skill .sk-sentences { margin: 0; padding-left: 18px; font-size: var(--fs-sm); line-height: 1.35; }
.wp-skill .sk-sentences[hidden] { display: none; }
.wp-skill .sk-text { overflow-wrap: anywhere; }
.wp-mode .sg-opt { min-height: 44px; padding-inline: 14px; }
@media (max-width: 900px) {
  .wp-skill:nth-child(n+5) { display: grid; }
  .wp-skill.extra, .wp-skill.extra:nth-child(n+5) { display: none; }
  .wp-tray.all-paths .wp-skill.extra, .wp-tray.all-paths .wp-skill.extra:nth-child(n+5) { display: grid; }
  .wp-mode .sg-opt { min-height: 44px; }
}
.kpi-sub { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); line-height: 1.3; }
@media (max-width: 900px) { .wp-skills { gap: 10px; } }
.wr-disc > summary { min-height: 44px; }
.wp-skill .sk-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .wp-skill .sk-text { -webkit-line-clamp: 2; } }
.wp-skill.sk-open .sk-text { display: block; overflow: visible; }
.wp-skill .sk-expand { appearance: none; border: 0; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--accent-ink); min-height: 44px; padding: 0; text-align: left; cursor: pointer; justify-self: start; }
.wp-skill .sk-expand[hidden] { display: none; }

/* Runde 2 (23.11.2026) */
@media (max-width: 860px) { .coachee-panel .pr-lead { display: none; } }
/* Klassenliste am Handy: Name und Profil in einer Zeile (kürzere Seite) */
@media (max-width: 860px) {
  .ck-name { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
}
.ck-allbtn { min-height: 44px; width: 100%; justify-content: center; margin-top: 8px; }
.ck-allbtn[hidden] { display: none; }

/* Runde 3, Druckblatt: Karten werden in print-views.js auf Seiten verteilt; Vorschau und PDF brechen gleich um */
.ls-sheet.ls-measure { width: 182mm; max-width: none; box-sizing: border-box; padding: 0; font-size: 10.5pt; }
.ls-sheet.ls-measure .ls-table { font-size: 9.5pt; }
.ls-sheet.ls-measure .ls-table .num, .ls-sheet.ls-measure .ls-table td:first-child { white-space: nowrap; }
.ls-sheet.ls-measure .ls-logos img { height: 12mm; width: auto; max-width: 75mm; }
.ls-sheet.ls-measure .ls-grids { display: block; }
.ls-sheet.ls-measure .ls-block { display: flex; }
.ls-sheet.ls-measure .ls-col { display: block; }
.ls-block[data-newpage]::before { content: 'Hier beginnt im Druck eine neue Seite'; flex: 0 0 100%; margin: 6px 0 12px; padding-top: 4px; border-top: 1px dashed var(--ls-rahmen); font-size: 8pt; color: var(--ls-grau); }
@media (max-width: 860px) { .ls-block[data-newpage]::before { display: none; } }
@media print { .ls-block[data-newpage] { break-before: page; } .ls-block[data-newpage]::before { display: none; } .ls-block { break-inside: avoid; } }

/* Runde 3: Archiv-Abschnitt, Admin-Start */
.archive-section { margin-top: 24px; }
.archive-section > h2 { margin: 0 0 10px; font-size: var(--fs-lg); }
.ad-card { display: grid; gap: 8px; align-content: start; padding: 16px; }
.ad-big { font-size: var(--fs-xl); font-weight: 800; }
.ad-hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ad-hints a { display: flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; color: var(--text); }
.ad-hints a svg:last-child { margin-left: auto; }
.kr-ex-effect { flex: 1 1 220px; min-width: 0; }
.ad-card .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.wp-skill .wp-plan { transition: none; }
.wp-tray .wp-plan:focus-visible, .wp-tray .btn.secondary.wp-plan:focus-visible { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
/* Hover nur mit Maus: am Handy bliebe der Knopf nach dem Antippen gefüllt, und eine Messung mit dem Mauszeiger über dem Knopf sähe Text in Knopffarbe auf Knopffarbe */
@media (hover: hover) { .wp-tray .wp-plan:hover, .wp-tray .btn.secondary.wp-plan:hover { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } }

/* Runde 4: Aufgaben üben Ich-kann-Sätze (Editor, Lernpfad der Schüler:innen) */
.te-skills-h { font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; }
.te-skills .ts-search { width: 100%; min-height: 44px; margin-bottom: 8px; }
.ts-list { display: grid; gap: 10px; max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 10px; }
.ts-group[hidden], .ts-list li[hidden] { display: none; }
.ts-grid { display: block; font-size: var(--fs-sm); color: var(--muted); margin: 6px 0 2px; }
.ts-group ul { list-style: none; margin: 0; padding: 0; }
.ts-opt { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; cursor: pointer; font-size: var(--fs-base); }
.ts-opt input { flex: none; width: 22px; height: 22px; margin: 0; }
.ts-meta { display: block; }
.task-skills { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.task-skill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: var(--fs-sm); color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--r-pill); padding: 4px 12px; }
.task-skill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.task-skill svg { flex: none; }
/* Runde 4: Kontrast und Tippflächen (Wochenplan-Blöcke, Aufgaben-Editor) */
.sk-known { color: color-mix(in srgb, var(--ok) 72%, var(--text)); }
.wp-skill .sk-all { color: color-mix(in srgb, var(--accent-ink) 78%, var(--text)); }
.task-edit .level-toggle { min-width: 44px; height: 44px; }
.task-edit .subpanel .row .btn { min-height: 44px; }
.task-edit .subpanel .check { min-height: 44px; }
.task-edit .te-foot .btn { min-height: 44px; }

/* Runde 5 (23.11.2026): Ich-kann-Satz-Chips antippbar, Hinweise im Wochenplan und in der Aufgabenzeile */
button.task-skill { appearance: none; border: 0; font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.task-skill.open span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.task-skill.open { border-radius: var(--r-md); align-items: flex-start; }
.task-skill.open svg { margin-top: 3px; }
@media (max-width: 900px) { button.task-skill { min-height: 44px; } }
.wp-skill .sk-expand { margin-block: -8px; }
.row-skills { color: var(--accent-ink); }
.wp-donehints { display: grid; gap: 8px; margin-bottom: 10px; }
.wp-donehint { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.wp-donehint .dh-t { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.wp-donehint .btn { min-height: 44px; }
/* Druckblatt (Runde 5): Stufennamen im Rasterkopf nie trennen, lieber kleiner */
.ls-sheet .ls-mini thead th { hyphens: none; font-size: 7pt; overflow-wrap: normal; word-break: keep-all; }
.sz-extra { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

/* Runde 6 (23.11.2026): deutsche Kurzhilfe unter dem Ich-kann-Satz (vorläufig, abschaltbar in help-de.js) */
.help-de { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: 400; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.help-de.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help-de.in-cell { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.help-de.block { margin-top: 3px; }
.kr-big + .help-de { margin: -10px 0 14px; font-size: var(--fs-sm); }
.ls-sheet .help-de { margin-top: 0; font-size: 8pt; line-height: 1.25; color: var(--ls-grau); }
/* Druckblatt: Messung der Bereichsnamen im Rasterbild (Wort ohne Umbruch) */
.ls-word { display: inline-block; white-space: nowrap; }
/* Runde 6: freundlicher Moment beim Einplanen (nur ohne „weniger Bewegung“) */
@keyframes wi-pop { 0% { transform: scale(.97); box-shadow: 0 0 0 3px var(--c, var(--accent)); } 60% { transform: scale(1.015); } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: no-preference) { .wi.just-added { animation: wi-pop .6s ease-out; } }
.wi.just-added { outline: 0; }

/* Runde 7: Kasten „Du wiederholst diese Stufe“ steht direkt unter der eigenen Stufe */
.stage-list li.repeat-li { display: block; padding: 0; background: none; }

/* Runde 7: Handy, Raster mit vielen Fächern: Fächer ohne Bewegung zugeklappt in einer Gruppe */
.kr-idle { margin-top: 10px; }
.kr-idle > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); font-weight: 700; }
.kr-idle > summary::-webkit-details-marker { display: none; }
.kr-idle[open] > summary svg { transform: rotate(180deg); }
.kr-idle > .kr-card { margin-top: 10px; }

/* Runde 7: Druckblatt, Spaltenköpfe des Minirasters als Zahlen, Namen einmal darunter */
.ls-sheet .ls-grid-body > .ls-cols { font-size: 7.5pt; margin: 0 0 3px; line-height: 1.25; }

/* Runde 7: Chip „Übt: …“ bricht auf zwei Zeilen um statt abzuschneiden; Freiheitsgrad in einfachen Worten am Handy; Legende zu den Sternen */
.openness .o-gloss { display: none; }
@media (max-width: 700px) { .openness .o-gloss { display: inline; font-weight: 500; } }
.kr-rate-legend { margin: 6px 0 10px; }

/* Runde 7: Zählung mit Worten im Spaltenkopf („3 dringend · 5 mit leichtem Hinweis“) */
.count-pill.wide-pill { height: auto; min-height: 22px; padding: 2px 10px; text-align: left; line-height: 1.3; font-weight: 700; }

/* Runde 7: Prüfliste der Freigabe in zwei getrennten Gruppen (Erfolgskriterien der Aufgabe, Ich-kann-Sätze) */
.rv-crit-h { font-size: var(--fs-sm); margin: 10px 0 4px; color: var(--muted); font-weight: 800; }
.rv-crit-group:first-of-type .rv-crit-h { margin-top: 4px; }

/* Runde 7: Aufgaben-Editor kompakt: Satzwahl, Material und Musterlösung einklappbar */
.te-skills-disc > summary, .te-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.te-skills-disc > summary::-webkit-details-marker, .te-fold > summary::-webkit-details-marker { display: none; }
.te-skills-disc > summary svg, .te-fold > summary svg { margin-left: auto; flex: none; }
.te-skills-disc[open] > summary svg, .te-fold[open] > summary svg { transform: rotate(180deg); }
.te-fold > summary h4 { margin: 0; }
.te-skills-sum .te-skills-h { flex: 1; min-width: 0; }
.te-skills-sum .ts-count { white-space: nowrap; }

/* Runde 7: gleiche Wörter in der unteren Leiste wie am großen Schirm (Lernplaner, Wochenplan, Lernjournal): kleinere Schrift, damit sie ganz lesbar bleiben */
@media (max-width: 860px) {
  body.is-student .bottom-nav { left: 8px; right: 8px; padding: 5px 3px; }
  body.is-student .bottom-nav a { font-size: 0.6875rem; letter-spacing: -0.01em; padding-inline: 0; }
}

/* Runde 7: Handy, Raster der Eltern und Lehrkräfte: Legende ohne Zusatzzeile (steht in „Wie liest man das Raster?“ und im Tooltip) */
@media (max-width: 700px) { .kr-section .kr-key-note, .parent-grids .kr-key-note { display: none; } .parent-grids .kr-legend { display: none; } .kr-fold > .kr-head { row-gap: 6px; } }
.ls-nowrap { white-space: nowrap; }

/* ---- Runde 8: Prüfungen nach Stand Runde 7 ---- */
/* Tastaturfokus: ein Rahmen für alle Knöpfe und Textknöpfe (auch die mit „all: unset“, die sonst nur die Textfarbe wechseln) */
button:focus-visible, a:focus-visible, summary:focus-visible, [role="button"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.day-add:focus-visible, .link-btn:focus-visible { border-radius: var(--r-sm); }
/* Können (Schüler:in): Hauptzahl ist die Zahl bestätigter Sätze, kein Prozent */
.kr-hero > .kr-bignum { grid-area: ring; display: grid; justify-items: center; align-content: center; min-width: 92px; padding: 8px 14px; border-radius: var(--r-lg); border: 2px solid rgba(var(--on-c-rgb), .55); color: var(--on-c); text-align: center; }
.kr-bignum b { font-size: var(--fs-2xl); line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.kr-bignum span { font-size: var(--fs-xs); font-weight: 700; }
.kr-hero .kr-intro .kr-total { margin-top: 4px; font-size: var(--fs-xs); }
.lv-add { min-height: 44px; }
@media (max-width: 600px) { .kr-hero .kr-intro .kr-total { display: none; } }
@media (max-width: 760px) { .year-hero.kr-hero .kr-bignum { display: grid; min-width: 72px; padding: 6px 10px; } .kr-bignum b { font-size: var(--fs-xl2); } }
/* Raster der Eltern und Lehrkräfte: Zahl in Worten statt Ring */
.kr-sumtxt { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) { .kr-sumtxt { display: none; } }
/* Eltern: Rückstand in Worten unter „geplant bis jetzt“ */
.ps3 .ps-ring-text small.ps-gap { display: block; cursor: auto; border-top: 0; margin-top: 2px; padding-top: 0; max-width: 18em; color: var(--text); font-weight: 600; }
/* Handy-Start: Vereinbarungen vor den Lernpfaden */
.hz-agr { margin-top: 14px; }
.hz-agr > details.ov-disc { margin-top: 0; }
/* Freigabe am Handy: die Leiste klappt beim Scrollen auf eine Zeile zusammen, „Freigeben“ bleibt sichtbar */
.decide-expand { display: none; }
.rv-crit-note-s { font-weight: 600; color: var(--muted); }
.rv-crit-note { margin: 4px 0 8px; }
@media (max-width: 600px) {
  .decide-bar.compact:not(.open) { padding: 8px 10px; gap: 0; }
  .decide-bar.compact:not(.open) > :not(.btn-row) { display: none; }
  .decide-bar.compact:not(.open) .btn-row { margin: 0; }
  .decide-bar.compact:not(.open) .decide-expand { display: inline-flex; border: 1.5px solid var(--line); color: var(--accent-ink); background: var(--surface); flex: none; min-width: 48px; justify-content: center; padding-left: 0; padding-right: 0; }
}
/* Gespräch am Handy: Kurzzeile oben, Icons inline */
.tk-brief { display: none; }
@media (max-width: 960px) {
  .tk-brief { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font-weight: 700; }
  .tk-brief > .icon { flex: none; color: var(--accent-ink); }
  .tk-brief > span { flex: 1 1 12em; min-width: 0; }
  .tk-brief .link-btn { padding: 8px 2px; min-height: 44px; box-sizing: border-box; }
}
.ag-list.small li { flex-wrap: nowrap; align-items: flex-start; }
.ag-list.small li > .icon { flex: none; margin-top: 3px; }
.ag-list.small li > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
/* Niveaustufen als Chips mit „+“ */
.lv-edit { display: grid; gap: 8px; }
.lv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; font-weight: 700; }
.lv-chip .lv-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-2xs); }
.lv-x { all: unset; box-sizing: border-box; cursor: pointer; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; margin: -10px -4px -10px 0; border-radius: 50%; color: var(--muted); }
.lv-x:hover:not(:disabled) { color: var(--danger); }
.lv-x:disabled { opacity: .35; cursor: not-allowed; }
.lv-new { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lv-new input { flex: 1 1 12em; min-width: 0; margin: 0; }
.lv-msg:empty { display: none; }
.kf-group-help { margin: 0 0 6px; }
.kr-mx-grp { font-weight: 600; opacity: .85; }
/* Jahresleiste im Dunkelmodus: die Prozentzahl im Kreis war dunkel auf dunkel (Kontrast 1,8:1) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .yt-bar:not(.done):not(.overdue):not(.planned):not(.draft) .yt-ic { color: var(--text); } }
:root[data-theme="dark"] .yt-bar:not(.done):not(.overdue):not(.planned):not(.draft) .yt-ic { color: var(--text); }

/* Externe Apps (Klassenzimmer u. a.) */
.ext-results { margin: 10px 0; display: grid; gap: 4px; }
.ext-result { display: block; padding: 8px 12px; line-height: 1.5; border-radius: 10px; background: var(--surface-2, rgba(0,0,0,.04)); font-size: var(--fs-small, .92rem); }
.ext-hint { display: flex; align-items: center; gap: 4px; margin: 6px 0 0; }
.ext-key code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface-2, rgba(0,0,0,.05)); word-break: break-all; user-select: all; }
.ext-app { margin-bottom: 14px; }
.ext-app.inactive { opacity: .75; }
.ext-app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ext-facts { margin: 10px 0 12px; padding-left: 18px; }
.ext-result .icon { vertical-align: -2px; margin-right: 4px; }
.ext-endpoint code { word-break: break-all; }
.ext-app + form.card { margin-top: 14px; }
