/* Design-System „Study“ (Ansatz B, entschieden 02.10.2026)
   Quelle: ui_design_styles_b.html, ui_professor_workspace.html und das Artifact
   „Agora Focused Home“. Tokens heißen wie in den Entwürfen (--k-*), damit ein
   Entwurf und der Code dieselbe Sprache sprechen.
   Aufbau: 1 Schriften · 2 Tokens hell/dunkel/Stage · 3 Grundlagen · 4 Shell ·
   5 Layout · 6 Komponenten · 7 Gespräch · 8 Canvas und Reader · 9 Responsive ·
   10 Stage (dunkler Look für labs, 09.10.2026) · 11 Night & Paper (Opt-in auf
   labs, 16.10.2026) */

/* ---------- 1 Schriften (selbst gehostet, OFL; keine Anfrage an Google) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-latin.65850a373e25.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-latin-ext.01ba6c2a184b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/source-serif-4-latin.6a682eb0234e.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/source-serif-4-latin-ext.20f95b1e4359.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/source-serif-4-italic-latin.e5fc844e2baa.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/source-serif-4-italic-latin-ext.fb43d3e01409.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Night & Paper: Platzhalter für Söhne, Söhne Schmal und Söhne Mono, bis die
   Lizenz gekauft ist (design_system/, Entscheidung B2). Latin und seit
   16.10.2026 Latin Extended (ł, č, ő in Namen; Fontsource Instrument Sans und
   Anton 5.2.5, IBM Plex Mono 5.2.6, dieselben Versionen wie die Latin-Dateien);
   der Browser lädt eine Datei erst, wenn ein Zeichen aus ihrem Bereich auf der
   Seite steht. Zeichen außerhalb (→, ✓) kommen aus der Systemschrift. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-latin-wght-normal.dafadd776a70.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-latin-ext-wght-normal.cb9895bbd9d7.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/anton-latin-400-normal.a2675f0a4671.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/anton-latin-ext-400-normal.24aa444162a5.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.4cc7b4398540.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-400-normal.6ce02d71b5de.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- 2 Tokens ----------
   Der helle Satz gilt auch für die Lesefläche unter Stage (.paper), solange
   das Konto sie nicht auf dunkel gestellt hat: Tokens auf dem Element selbst
   schlagen die geerbten dunklen. */
:root,
:root[data-ui="stage"] .paper:not([data-paper="dark"]) {
  color-scheme: light;
  --k-bg: #F6F5F2;          /* Seitenleiste, Hintergrund hinter Blättern */
  --k-chat: #FBFAF8;        /* Gesprächsfläche, ruhige Felder */
  --k-panel: #FFFFFF;       /* Seite, Karten, Blatt */
  --k-bar: rgba(255,255,255,.86);
  --k-ink: #1F1E1C;
  --k-muted: #69655D;
  --k-line: #E4E1DA;
  --k-line-strong: #D3CFC6;
  --k-accent: #1F6B5E;
  --k-accent-hover: #185649;
  --k-onaccent: #FFFFFF;
  --k-tint: rgba(31,107,94,.1);
  --k-chipbg: #FFFFFF; --k-chipfg: #1F1E1C; --k-chipbd: #DCD8CF;
  --k-cmpbg: #FFFFFF; --k-cmpbd: #DCD8CF;
  --k-cmpshadow: 0 .15em .35em rgba(40,35,25,.04), 0 .5em 1.4em rgba(40,35,25,.06);
  --k-segbg: rgba(120,110,95,.13); --k-segonbg: #FFFFFF; --k-segonshadow: 0 .1em .3em rgba(0,0,0,.1);
  --k-okbg: rgba(31,107,94,.1); --k-okfg: #1F6B5E;
  --k-warnbg: #FBEFD2; --k-warnfg: #7A5200;
  --k-dangerbg: #FBE4E1; --k-dangerfg: #9B2A1E;
  --k-neutralbg: #EEECE7; --k-neutralfg: #5A564F;
  --k-ownbg: #EAE6F4; --k-ownfg: #4E4180;   /* eigenes Material der Studierenden */
  --k-mark: #FBEFC4;                          /* markierte Stelle im Text */
  --k-face: #ECE9E3;
  --k-shadow: 0 1px 2px rgba(40,35,25,.05), 0 8px 24px -12px rgba(40,35,25,.18);
  --k-fui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --k-fhead: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --k-fread: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --k-r: 12px;      /* Karten */
  --k-r-sm: 8px;
  --sb-w: 248px;
  /* Seitengrund und Hauptknopf: in Study dieselben Werte wie Blatt und
     Akzent, Stage setzt sie eigens (schwarzer Grund, weißer Hauptknopf). */
  --k-page: var(--k-panel);
  --k-primary: var(--k-accent); --k-primary-hover: var(--k-accent-hover); --k-onprimary: var(--k-onaccent);
  --k-glow: transparent;
  --k-fieldbd: var(--k-line-strong);   /* Rand von Eingabefeldern */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --k-bg: #151514; --k-chat: #1A1918; --k-panel: #1F1E1C; --k-bar: rgba(31,30,28,.86);
    --k-ink: #EEECE7; --k-muted: #A39F96; --k-line: #34322E; --k-line-strong: #46433E;
    --k-accent: #5DB6A4; --k-accent-hover: #74C6B5; --k-onaccent: #0E1D1A; --k-tint: rgba(93,182,164,.15);
    --k-chipbg: #22211F; --k-chipfg: #EEECE7; --k-chipbd: #3A3834;
    --k-cmpbg: #22211F; --k-cmpbd: #3A3834; --k-cmpshadow: none;
    --k-segbg: rgba(160,150,135,.18); --k-segonbg: #3A3834; --k-segonshadow: none;
    --k-okbg: rgba(93,182,164,.16); --k-okfg: #7CCBBA;
    --k-warnbg: #3B3014; --k-warnfg: #F2C46A;
    --k-dangerbg: #3D1D19; --k-dangerfg: #F2B8B0;
    --k-neutralbg: #2C2A27; --k-neutralfg: #B5B0A6;
    --k-ownbg: #2D2840; --k-ownfg: #C6BDF0;
    --k-mark: #4A3F17;
    --k-face: #2C2A27;
    --k-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --k-bg: #151514; --k-chat: #1A1918; --k-panel: #1F1E1C; --k-bar: rgba(31,30,28,.86);
  --k-ink: #EEECE7; --k-muted: #A39F96; --k-line: #34322E; --k-line-strong: #46433E;
  --k-accent: #5DB6A4; --k-accent-hover: #74C6B5; --k-onaccent: #0E1D1A; --k-tint: rgba(93,182,164,.15);
  --k-chipbg: #22211F; --k-chipfg: #EEECE7; --k-chipbd: #3A3834;
  --k-cmpbg: #22211F; --k-cmpbd: #3A3834; --k-cmpshadow: none;
  --k-segbg: rgba(160,150,135,.18); --k-segonbg: #3A3834; --k-segonshadow: none;
  --k-okbg: rgba(93,182,164,.16); --k-okfg: #7CCBBA;
  --k-warnbg: #3B3014; --k-warnfg: #F2C46A;
  --k-dangerbg: #3D1D19; --k-dangerfg: #F2B8B0;
  --k-neutralbg: #2C2A27; --k-neutralfg: #B5B0A6;
  --k-ownbg: #2D2840; --k-ownfg: #C6BDF0;
  --k-mark: #4A3F17;
  --k-face: #2C2A27;
  --k-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
}

/* Stage (09.10.2026, Manuel: ganz labs, Studierende und Lehrende). Werte aus
   ui_design_stage_julian_2026-10-09.html; Kontraste nach WCAG 2.2 gerechnet:
   Text #ECEEEC auf Grund #0A0B0B 16,9:1; gedämpft #8F9794 auf Grund 6,6:1,
   auf Fläche #121514 6,1:1, auf gehobener Fläche #1A1E1D 5,6:1; Akzent
   #7CCBBA auf Grund 10,4:1, Bernstein #E7C77F auf Grund 12,1:1; Feldrand
   #626A67 auf Fläche 3,3:1 (Bedienelemente brauchen 3:1, die Linie #3A403E
   hätte 1,7:1). Immer dunkel, unabhängig vom Gerät; wer hell will, stellt
   am Konto auf Study. */
:root[data-ui="stage"] {
  color-scheme: dark;
  --k-page: #0A0B0B;        /* Grund (die Bühne) */
  --k-bg: #0A0B0B;          /* Seitenleiste, Fläche hinter Blättern */
  --k-panel: #121514;       /* Karten, Blätter, Felder, Dialoge */
  --k-chat: #1A1E1D;        /* gehobene Fläche: eigene Nachricht, ruhige Felder */
  --k-bar: rgba(10,11,11,.82);
  --k-ink: #ECEEEC;
  --k-muted: #8F9794;
  --k-line: #272C2B;
  --k-line-strong: #3A403E;
  --k-accent: #7CCBBA;
  --k-accent-hover: #9AD8CA;
  --k-onaccent: #0A0B0B;
  --k-tint: rgba(124,203,186,.14);
  --k-primary: #ECEEEC; --k-primary-hover: #FFFFFF; --k-onprimary: #0A0B0B;
  --k-chipbg: #1A1E1D; --k-chipfg: #ECEEEC; --k-chipbd: #272C2B;
  --k-cmpbg: #121514; --k-cmpbd: #626A67; --k-cmpshadow: 0 24px 48px -28px rgba(0,0,0,.9);
  --k-fieldbd: #626A67;
  --k-segbg: rgba(236,238,236,.07); --k-segonbg: #272C2B; --k-segonshadow: none;
  --k-okbg: rgba(124,203,186,.14); --k-okfg: #7CCBBA;
  --k-warnbg: rgba(231,199,127,.13); --k-warnfg: #E7C77F;   /* braucht dich */
  --k-dangerbg: rgba(238,148,136,.12); --k-dangerfg: #EE9488;
  --k-neutralbg: #1A1E1D; --k-neutralfg: #B7BEBB;
  --k-ownbg: rgba(198,189,240,.13); --k-ownfg: #C6BDF0;
  --k-mark: rgba(231,199,127,.24);
  --k-face: #1A1E1D;
  --k-shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -20px rgba(0,0,0,.85);
  --k-glow: rgba(124,203,186,.08);
}

/* Night & Paper (16.10.2026, Opt-in je Konto auf labs; ersetzt Stage, wenn die
   Gründer beide gesehen haben). Werte aus design_system/night-and-paper/
   project/tokens.json, Zuordnung nach dessen labs.md: im Kommentar der
   Token-Name des Designsystems. Night ist der Standard, Paper die helle
   Einstellung (data-np="paper") und zugleich die Lesefläche (.paper) in
   beiden. Kontraste rechnet core/tests/test_night_paper.py nach. Eigene
   Tokens nur hier: --k-muted-strong, --k-field, --k-zone-line, --k-onglow,
   --k-glow-*, --k-fdisplay, --k-fmono. Vorläufig, bis Daniel bestätigt:
   die Verlaufsstufen (S4). */
:root[data-ui="np"],
:root[data-ui="np"][data-np="paper"] .paper[data-paper="dark"] {
  color-scheme: dark;
  --k-page: #121211;        /* ground */
  --k-bg: #121211;          /* ground */
  --k-panel: #121211;       /* ground: keine Karten, Linien statt Flächen */
  --k-chat: #26251F;        /* raised: eigene Nachricht, gedrückter Zustand */
  --k-bar: #121211;         /* ground, deckend, ohne Unschärfe */
  --k-ink: #FBFAF7;         /* ink */
  --k-muted: #9C9A94;       /* ink-subtle: Labels, Meta */
  --k-muted-strong: #D6D4CE;  /* ink-muted: zweite Ordnung, Meta in der Zone */
  --k-line: #2E2D2A;        /* line: Haarlinie, kein Rand von Bedienelementen */
  --k-line-strong: #9C9A94; /* ink-subtle: Ränder von Bedienelementen (3:1) */
  --k-accent: #FBFAF7;      /* ink: Links und aktive Zustände; kein Teal */
  --k-accent-hover: #FBFAF7;
  --k-onaccent: #121211;
  --k-tint: #332E1F;        /* zone: nur die aktuelle Frage */
  --k-zone-line: #E5D7A6;   /* zone-line: 3px Kante der Zone */
  --k-primary: #4566DA; --k-primary-hover: #4566DA; --k-onprimary: #FBFAF7;   /* action, on-action */
  --k-chipbg: #121211; --k-chipfg: #FBFAF7; --k-chipbd: #9C9A94;
  --k-field: #1B1A18;       /* field */
  --k-cmpbg: #1B1A18; --k-cmpbd: #9C9A94; --k-cmpshadow: none;
  --k-fieldbd: #9C9A94;
  --k-segbg: #26251F; --k-segonbg: #FBFAF7; --k-segonshadow: none;
  --k-okbg: #26251F; --k-okfg: #FBFAF7;           /* mit Wort, ohne Farbe */
  --k-warnbg: #332E1F; --k-warnfg: #FBFAF7;       /* „Braucht dich“ ist die Aufgabe des Moments */
  --k-dangerbg: #26251F; --k-dangerfg: #FBFAF7;   /* offen: S2 */
  --k-neutralbg: #26251F; --k-neutralfg: #D6D4CE;
  --k-ownbg: #121211; --k-ownfg: #FBFAF7;         /* eigenes Material: gestrichelter Rahmen in 11 */
  --k-mark: #332E1F;        /* zone; auf der Lesefläche reader-mark */
  --k-face: #26251F;
  --k-onglow: #121211;      /* on-glow: Initialen auf dem Verlauf */
  --k-glow-amber: #FFC56B; --k-glow-coral: #F28B6B; --k-glow-red: #E8455A; --k-glow-violet: #7B3FF2;
  --k-shadow: none;
  --k-glow: transparent;    /* der Lichtkreis gehört der Kommunikation */
  --k-fui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fhead: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fread: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fdisplay: Anton, Impact, "Arial Narrow", sans-serif;
  --k-fmono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --k-r: 0;
  --k-r-sm: 0;
}
:root[data-ui="np"][data-np="paper"],
:root[data-ui="np"] .paper:not([data-paper="dark"]) {
  color-scheme: light;
  --k-page: #FBFAF7;        /* ground; reader-ground auf der Lesefläche */
  --k-bg: #FBFAF7;
  --k-panel: #FBFAF7;
  --k-chat: #ECE9E2;        /* raised */
  --k-bar: #FBFAF7;
  --k-ink: #1A1A1A;         /* ink; reader-ink */
  --k-muted: #6B6963;       /* ink-subtle */
  --k-muted-strong: #45433F;  /* ink-muted */
  --k-line: #DAD7D0;
  --k-line-strong: #6B6963;
  --k-accent: #1A1A1A;
  --k-accent-hover: #1A1A1A;
  --k-onaccent: #FBFAF7;
  --k-tint: #F1E7C3;        /* zone */
  --k-zone-line: #E2CF8A;
  --k-primary: #2B4FC4; --k-primary-hover: #2B4FC4; --k-onprimary: #FBFAF7;
  --k-chipbg: #FBFAF7; --k-chipfg: #1A1A1A; --k-chipbd: #6B6963;
  --k-field: #FFFFFF;
  --k-cmpbg: #FFFFFF; --k-cmpbd: #6B6963; --k-cmpshadow: none;
  --k-fieldbd: #6B6963;
  --k-segbg: #ECE9E2; --k-segonbg: #1A1A1A; --k-segonshadow: none;
  --k-okbg: #ECE9E2; --k-okfg: #1A1A1A;
  --k-warnbg: #F1E7C3; --k-warnfg: #1A1A1A;
  --k-dangerbg: #ECE9E2; --k-dangerfg: #1A1A1A;
  --k-neutralbg: #ECE9E2; --k-neutralfg: #45433F;
  --k-ownbg: #FBFAF7; --k-ownfg: #1A1A1A;
  --k-mark: #F1E7C3;        /* reader-mark */
  --k-face: #ECE9E2;
  --k-onglow: #1A1A1A;
  --k-glow-amber: #FFC56B; --k-glow-coral: #F28B6B; --k-glow-red: #E8455A; --k-glow-violet: #7B3FF2;
  --k-shadow: none;
  --k-glow: transparent;
  --k-fui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fhead: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fread: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fdisplay: Anton, Impact, "Arial Narrow", sans-serif;
  --k-fmono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --k-r: 0;
  --k-r-sm: 0;
}

/* Friction (23.10.2026, D-072, Opt-in je Konto auf labs; friction_labs_plan_2026-10-23.md, Phase 1 und Abgleich).
   Werte aus Daniels Quellpaket (Konzept_Julian_Daniel/2026-10-23_FRICTION_Screens: tokens/friction-tokens.json und das
   Inline-CSS der HTML-Screens; „Screen D09“ = desktop-studierende/html/09_*, „P08“ = mobile-studierende/html/08_*), vorher
   aus seinen PDFs gemessen. Farbregeln aus seiner README: Blau nur für Knöpfe, Türkis die einzige Hervorhebung, Sand
   genau eine Stelle je Bildschirm (die Frage, die gerade eine Antwort verlangt), Glut nur für große Zahlen, der Verlauf
   nur ganz und von kalt nach heiß. Darum sind Tönung, Warnung und gedämpfte Flächen hier neutral, nicht Sand.
   Dunkel auf jedem Gerät wie alle Screens (D-121); hell als eigene Wahl „Friction hell“ (friction-paper, data-np="paper"
   aus core/context_processors.py) und immer auf der Lesefläche (.paper), bis das Konto sie dunkel stellt. Wo ein Wert von Daniel abweicht, steht der
   Grund daneben (Kontrast nach WCAG 2.2, gerechnet in core/tests/test_friction_theme.py). Eigene Tokens nur hier:
   --k-muted-strong, --k-field, --k-zone-line, --k-label, --k-kpi, --k-sand*, --k-t-*, --k-dot, --k-heat,
   --k-meter, --k-heatglow, --k-lvmid. */
:root[data-ui="friction"],
:root[data-ui="friction"] .paper[data-paper="dark"] {
  color-scheme: dark;
  --k-page: #0E0E10;        /* Tinte: Grund (Desktop S. 1 bis 14, Phone S. 1 bis 15, Brandsheet „Dunkel“) */
  --k-bg: #0E0E10;
  --k-panel: #141417;       /* Fläche: Karte, Blatt (tokens.json dark.surface) */
  --k-chat: #1A1A1E;        /* gehoben: eigene Nachricht, aktiver Ort (tokens.json dark.surface-2, P08) */
  --k-field: #141417;       /* Feld (tokens.json dark.surface, P01 Eingabe) */
  --k-bar: #0E0E10;
  --k-ink: #F4F3EF;         /* Papier als Schrift (alle Seiten) */
  --k-muted: #8A8A92;       /* gedämpft (Desktop S. 8, Phone S. 2 bis 15) */
  --k-muted-strong: #B5B5BD;  /* zweite Ordnung, Text in Chips (Desktop S. 8, Phone) */
  --k-line: #26262A;        /* Haarlinie, Kartenrand (Desktop S. 8, Phone) */
  --k-line-strong: #696971; /* Rand von Bedienelementen; Daniels #3A3A40 (Desktop S. 2, S. 8) hat 1,7 : 1, 3 : 1 braucht #696971 */
  --k-accent: #F4F3EF;      /* Links unterstrichen und aktive Orte in Papier, wie in den Screens */
  --k-accent-hover: #F4F3EF;
  --k-onaccent: #0E0E10;
  --k-tint: #1A1A1E;        /* aktive Zeile und Auswahl neutral gehoben: Sand bleibt der einen Frage (README) */
  --k-zone-line: #EFD9A0;
  --k-primary: #4C8FEE; --k-primary-hover: #4C8FEE; --k-onprimary: #0E0E10;   /* Aktion in Kaltblau, Text in Tinte (Desktop S. 2, Phone S. 1) */
  --k-chipbg: #0E0E10; --k-chipfg: #F4F3EF; --k-chipbd: #696971;
  --k-cmpbg: #141417; --k-cmpbd: #696971; --k-cmpshadow: none;
  --k-fieldbd: #696971;
  --k-segbg: #1A1A1E; --k-segonbg: #F4F3EF; --k-segonshadow: none;   /* gewählt: Papier mit Tinte (Desktop S. 8, S. 9 „Lesemodus“) */
  --k-okbg: #1A2222; --k-okfg: #86D9C6;           /* Teal (Phone S. 2, Desktop S. 13 „Bereit für Donnerstag“) */
  --k-warnbg: #1A1A1E; --k-warnfg: #F4F3EF;       /* Hinweise neutral in Papier; Sand nur für die eine Frage (README) */
  --k-dangerbg: #241716; --k-dangerfg: #E8674A;   /* heißes Rot */
  --k-neutralbg: #1A1A1E; --k-neutralfg: #B5B5BD;
  --k-ownbg: #1A1A1E; --k-ownfg: #F4F3EF;         /* eigenes Material: gestrichelter Rand in 12 */
  --k-mark: #24221E;        /* Markierung im Text: Sand 10 % auf Tinte (Daniels mark-Stil, D09) */
  --k-face: #1A1A1E;
  --k-shadow: none;
  --k-glow: transparent;
  --k-label: #86D9C6;       /* Zeile über der Überschrift (Desktop S. 3 bis 5, Phone S. 2 bis 4) */
  --k-kpi: #E8674A;         /* große Zahl (Desktop S. 11, S. 14, Phone S. 12) */
  --k-sand: #EFD9A0; --k-onsand: #0E0E10;         /* die Frage, an der jemand arbeitet (Desktop S. 7, S. 9, Phone S. 8) */
  --k-sandmuted: #725D1B;   /* Zeile auf Sand; Daniels #8A6F1E (Desktop S. 8) hat 3,45 : 1 */
  --k-sandedge: #EFD9A0;    /* auf Tinte braucht Sand keinen Rand */
  /* Temperaturskala, Stufen 0, 25, 50, 75 und 100 % (Phone-PDF, Verlauf der Oberkante) */
  --k-t-cold: #4C8FEE; --k-t-teal: #86D9C6; --k-t-sand: #EFD9A0; --k-t-warm: #F2A65A; --k-t-hot: #E8674A;
  --k-dot: linear-gradient(135deg, #F2A65A, #E8674A);   /* der warme Punkt (tokens.json color.dot) */
  --k-heat: linear-gradient(90deg, #4C8FEE, #86D9C6 25%, #EFD9A0 50%, #F2A65A 75%, #E8674A);
  --k-meter: linear-gradient(90deg, #4C8FEE, #86D9C6 25%, #EFD9A0 50%, #F2A65A 75%, #E8674A);
  --k-heat-panel: linear-gradient(160deg, #4C8FEE, #86D9C6 26%, #EFD9A0 52%, #F2A65A 76%, #E8674A);   /* Markenmoment, P01 */
  /* warmes Licht unten links hinter der Anmeldung, Daniels Kreis aus D01 (980 px, Mitte 230 px vom Rand, 110 px über
     der Unterkante) mit seinen Stufen */
  --k-heatglow: radial-gradient(circle 490px at 230px calc(100% - 110px), rgba(242,166,90,.34), rgba(232,103,74,.22) 20%, rgba(239,217,160,.10) 40%, rgba(134,217,198,.06) 55%, rgba(14,14,16,0) 68%);
  --k-lvmid: #EFD9A0;       /* mittlere Stufe im Kohortenpuls: die Skala an ihrer Stelle */
  --k-fui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;    /* Ersatz für Aeonik (Desktop S. 1) */
  --k-fhead: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fread: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-r: 16px;              /* Karte (tokens.json radius.card) */
  --k-r-sm: 8px;
}
:root[data-ui="friction"][data-np="paper"],
:root[data-ui="friction"] .paper:not([data-paper="dark"]) {
  color-scheme: light;
  --k-page: #F4F3EF;        /* Papier (Brandsheet „Hell, Tinte auf Papier“, Phone-PDF Seitengrund) */
  --k-bg: #F4F3EF;
  --k-panel: #FBFAF7;       /* abgeleitet: Papier, ein Hauch heller */
  --k-chat: #E8E6E2;        /* abgeleitet: Linie #DAD6D1 zu 45 % auf Papier */
  --k-field: #FFFFFF;
  --k-bar: #F4F3EF;
  --k-ink: #0E0E10;         /* Tinte (Brandsheet) */
  --k-muted: #6B6560;       /* Bildunterschrift im Phone-PDF */
  --k-muted-strong: #413E3C;
  --k-line: #DAD6D1;        /* Phone-PDF */
  --k-line-strong: #88837E; /* 3 : 1 auf allen hellen Flächen */
  --k-accent: #0E0E10;
  --k-accent-hover: #0E0E10;
  --k-onaccent: #F4F3EF;
  --k-tint: #E8E6E2;        /* neutral gehoben wie dunkel */
  --k-zone-line: #9E884A;
  --k-primary: #4B8CEA; --k-primary-hover: #4B8CEA; --k-onprimary: #0E0E10;   /* Daniels #4C8FEE hat auf Papier 2,92 : 1 */
  --k-chipbg: #F4F3EF; --k-chipfg: #0E0E10; --k-chipbd: #88837E;
  --k-cmpbg: #FFFFFF; --k-cmpbd: #88837E; --k-cmpshadow: none;
  --k-fieldbd: #88837E;
  --k-segbg: #E8E6E2; --k-segonbg: #0E0E10; --k-segonshadow: none;
  --k-okbg: #D5ECE4; --k-okfg: #466D66;
  --k-warnbg: #E8E6E2; --k-warnfg: #0E0E10;
  --k-dangerbg: #F6E6E0; --k-dangerfg: #A24B37;
  --k-neutralbg: #E8E6E2; --k-neutralfg: #413E3C;
  --k-ownbg: #F4F3EF; --k-ownfg: #0E0E10;
  --k-mark: #F2E7CB;
  --k-face: #E8E6E2;
  --k-shadow: none;
  --k-glow: transparent;
  --k-label: #466D66;
  --k-kpi: #A24B37;
  --k-sand: #EFD9A0; --k-onsand: #0E0E10;
  --k-sandmuted: #725D1B;
  --k-sandedge: #9E884A;    /* Sand auf Papier hat 1,25 : 1: ein Rand in dunklerem Sand */
  --k-t-cold: #4C8FEE; --k-t-teal: #86D9C6; --k-t-sand: #EFD9A0; --k-t-warm: #F2A65A; --k-t-hot: #E8674A;
  --k-dot: linear-gradient(135deg, #F2A65A, #E8674A);
  --k-heat: linear-gradient(90deg, #4C8FEE, #86D9C6 25%, #EFD9A0 50%, #F2A65A 75%, #E8674A);
  --k-meter: linear-gradient(90deg, #0E0E10, #0E0E10);   /* auf Papier trägt die Skala keinen Balken (Teal 1,5 : 1): Tinte */
  --k-heat-panel: linear-gradient(160deg, #4C8FEE, #86D9C6 26%, #EFD9A0 52%, #F2A65A 76%, #E8674A);
  --k-heatglow: none;
  --k-lvmid: #725D1B;       /* Sand hat auf Papier 1,25 : 1: der dunkle Sand */
  --k-fui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fhead: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-fread: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-r: 16px;
  --k-r-sm: 8px;
}
/* Sand als Insel (.fx-sand; im Gespräch der letzte Absatz von Avas letzter Antwort, Abschnitt 12): Tinte auf Sand in
   dunkel und hell. :is() verzeiht einen Teil, den der Browser nicht kennt (:has), die Insel gilt dann nur für .fx-sand. */
:root[data-ui="friction"] :is(.fx-sand, .thread-in > .msg-ava:not(#typing):not([aria-busy="true"]):not(:has(~ .msg-ava:not(#typing))) > .bubble > .md > p:last-child) {
  --k-ink: #0E0E10; --k-accent: #0E0E10; --k-accent-hover: #0E0E10; --k-onaccent: #EFD9A0;
  --k-muted: #725D1B; --k-muted-strong: #453916;
  --k-line: #CBB989; --k-line-strong: #725D1B;
  --k-panel: #F6EACB; --k-chat: #F6EACB; --k-field: #F6EACB; --k-face: #F6EACB;
  --k-chipbg: #EFD9A0; --k-chipfg: #0E0E10; --k-chipbd: #725D1B;
  --k-neutralbg: #F6EACB; --k-neutralfg: #0E0E10;
  --k-okbg: #F6EACB; --k-okfg: #0E0E10; --k-warnbg: #F6EACB; --k-warnfg: #0E0E10; --k-dangerbg: #F6EACB; --k-dangerfg: #0E0E10;
  --k-tint: #F6EACB; --k-mark: #F6EACB;
}

/* ---------- 3 Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--k-fui); font-size: 15px; line-height: 1.5; color: var(--k-ink);
  background: var(--k-page); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--k-fhead); margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--k-accent); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration: underline; text-underline-offset: .15em; } }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
[hidden] { display: none !important; }
/* Telefon (mobile-native, 21.10.2026): iOS legte beim Tippen einen grauen Kasten über Knöpfe und Links, und
   im Querformat soll die Schrift nicht wachsen. Jede Hover-Regel steht in (hover: hover) and (pointer: fine):
   nach einem Tipp blieb der Rand von Karte, Knopf und Chip hell, bis man woanders tippte (iOS-Simulator, labs
   26ce5372). :focus-visible und :focus-within bleiben außerhalb. Druckzustand, Tippziele und Rollen am Ende
   von Abschnitt 9. */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--k-muted); }
.small { font-size: .87rem; }
.xsmall { font-size: .78rem; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--k-muted); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 1.1em; height: 1.1em; flex: none; }
.nowrap { white-space: nowrap; }
.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- 4 Shell ---------- */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; transition: grid-template-columns .25s ease; }
.app.noside { grid-template-columns: 0 minmax(0, 1fr); }

.sb { background: var(--k-bg); border-right: 1px solid var(--k-line); display: flex; flex-direction: column; gap: 2px; padding: 14px 10px 12px; overflow-y: auto; overflow-x: hidden; font-size: .92rem; transition: visibility 0s, padding .25s ease; }
.app.noside .sb { visibility: hidden; padding-inline: 0; border-right-color: transparent; transition: visibility 0s linear .25s, padding .25s ease; }
.sb-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.02rem; padding: 4px 8px 14px; color: var(--k-ink); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .sb-brand:hover { text-decoration: none; } }
.bmark { width: 26px; height: 26px; border-radius: 7px; background: var(--k-accent); color: var(--k-onaccent); display: grid; place-items: center; font-size: .82rem; font-weight: 700; flex: none; }
.labs-pill { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: var(--k-warnbg); color: var(--k-warnfg); }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; color: var(--k-ink); font-weight: 500; white-space: nowrap; min-width: 0; }
@media (hover: hover) and (pointer: fine) { .sb-item:hover { background: var(--k-segbg); text-decoration: none; } }
.sb-item .ico { color: var(--k-muted); }
.sb-item.on { background: var(--k-tint); color: var(--k-accent); font-weight: 650; }
.sb-item.on .ico { color: var(--k-accent); }
.sb-item.quiet { color: var(--k-muted); }
.sb-item > span:not(.cdot):not(.sb-count) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sb-item small { margin-left: auto; color: var(--k-muted); font-size: .78rem; }
.sb-count { margin-left: auto; background: var(--k-accent); color: var(--k-onaccent); font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 1.55; }
.sb-count.warn { background: var(--k-warnfg); color: var(--k-page); }
/* Aufklappbare Gruppe in der Seitenleiste (Stage: „Semester“ mit den Kursen) */
.sb-group > summary { list-style: none; cursor: pointer; }
.sb-group > summary::-webkit-details-marker { display: none; }
.sb-group > summary .chev { margin-left: auto; width: 14px; height: 14px; color: var(--k-muted); transition: transform .2s ease; }
.sb-group[open] > summary .chev { transform: rotate(180deg); }
.sb-group-in { display: grid; gap: 2px; padding: 2px 0 6px 14px; }
.sb-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--k-muted); font-weight: 600; padding: 14px 9px 4px; }
.cdot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.sb-spacer { flex: 1; min-height: 12px; }
.sb-acct { display: flex; align-items: center; gap: 9px; padding: 10px 6px 0; margin-top: 6px; border-top: 1px solid var(--k-line); }
.sb-acct a { color: var(--k-ink); display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
@media (hover: hover) and (pointer: fine) { .sb-acct a:hover { text-decoration: none; } }
.sb-legal { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 8px 6px 2px; font-size: .74rem; }
.sb-legal a { color: var(--k-muted); }
.sb-acct .who { display: grid; font-weight: 600; min-width: 0; line-height: 1.25; }
.sb-acct .who small { font-weight: 400; color: var(--k-muted); font-size: .78rem; }
.face { width: 30px; height: 30px; border-radius: 50%; background: var(--k-face); display: grid; place-items: center; font-size: .74rem; font-weight: 700; flex: none; color: var(--k-ink); }
.iconbtn { border: 0; background: transparent; color: var(--k-muted); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
@media (hover: hover) and (pointer: fine) { .iconbtn:hover { background: var(--k-segbg); color: var(--k-ink); } }
.iconbtn svg { width: 18px; height: 18px; }
.sb-close { display: none; }

.pg { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--k-page); }
.tb { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px 8px 12px; min-height: 52px; border-bottom: 1px solid var(--k-line); background: var(--k-bar); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px); position: relative; z-index: 5; }
.tb.flat { border-bottom-color: transparent; }
.tb-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-brand { display: none; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; color: var(--k-ink); }
@media (hover: hover) and (pointer: fine) { .tb-brand:hover { text-decoration: none; } }
.app.noside .tb-brand { display: flex; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--k-muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--k-muted); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--k-ink); } }
.crumbs .sep { opacity: .6; }
.crumbs .here { color: var(--k-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tb-acts { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
/* Konto oben rechts und Rechtliches in der Fußzeile (schlanke Lehrendenseite, 19.10.2026) */
.tb-acct { position: relative; flex: none; }
.tb-acct > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border: 1px solid var(--k-line); border-radius: 999px; cursor: pointer; color: var(--k-ink); font-weight: 600; font-size: .86rem; max-width: 14rem; }
.tb-acct > summary::-webkit-details-marker { display: none; }
.tb-acct > summary:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
.tb-acct > summary .chev { width: 14px; height: 14px; color: var(--k-muted); }
.tb-acct[open] > summary .chev { transform: rotate(180deg); }
.tb-acct-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 15rem; display: grid; gap: 2px; padding: 6px; background: var(--k-panel); border: 1px solid var(--k-line-strong); border-radius: var(--k-r); box-shadow: var(--k-shadow); z-index: 20; }
.tb-acct-name { margin: 2px 8px 6px; font-size: .8rem; color: var(--k-muted); }
.tb-acct-pop a, .tb-acct-pop button { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; color: var(--k-ink); background: none; border: 0; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tb-acct-pop a:hover, .tb-acct-pop button:hover { background: var(--k-segbg); text-decoration: none; } }
.tb-acct-pop svg { width: 16px; height: 16px; color: var(--k-muted); }
.pg-foot { padding: 28px 20px 18px; }
.pg-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: .76rem; }
.pg-legal a { color: var(--k-muted); }
.pg-main.fill > .pg-foot { flex: none; padding: 6px 20px; }
.pg-main { flex: 1; overflow-y: auto; min-height: 0; position: relative; }
.pg-main.fill { overflow: hidden; display: flex; flex-direction: column; }

.tabbar { display: none; }
.sb-backdrop { display: none; }

/* Hinweisleisten unter der Kopfzeile */
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 20px; font-size: .88rem; border-bottom: 1px solid var(--k-line); background: var(--k-warnbg); color: var(--k-warnfg); }
.notice form { display: inline; }
.notice .btn-link { color: inherit; }
.notice.mode { background: var(--k-accent); color: var(--k-onaccent); border-bottom: 0; font-weight: 600; }
.notice.mode a, .notice.mode button { color: var(--k-onaccent); }

/* ---------- 5 Layout ---------- */
.wrap { max-width: 64rem; margin: 0 auto; padding: 28px 28px 64px; }
.wrap-md { max-width: 48rem; margin: 0 auto; padding: 28px 24px 64px; }
.wrap-sm { max-width: 40rem; margin: 0 auto; padding: 28px 24px 64px; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.stack-lg { display: grid; gap: 28px; align-content: start; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cols-main { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 28px; align-items: start; }
.page-head { display: grid; gap: 6px; margin-bottom: 22px; }
.page-head .lede { color: var(--k-muted); max-width: 44rem; }
.sect { display: grid; gap: 12px; }
.sect + .sect { margin-top: 30px; }
.sect-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.divider { border: 0; border-top: 1px solid var(--k-line); margin: 0; }

/* ---------- 6 Komponenten ---------- */
/* Knöpfe: Pillen; einer pro Ansicht ist primär (GOV.UK: ein Hauptknopf) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 15px; border-radius: 999px; font-weight: 600; font-size: .92rem; white-space: nowrap; border: 1px solid var(--k-line-strong); color: var(--k-ink); background: var(--k-panel); cursor: pointer; line-height: 1.3; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .btn:hover { border-color: var(--k-accent); text-decoration: none; } }
.btn .ico { width: 1em; height: 1em; }
.btn-primary { background: var(--k-primary); border-color: var(--k-primary); color: var(--k-onprimary); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--k-primary-hover); border-color: var(--k-primary-hover); } }
.btn-tint { background: var(--k-tint); color: var(--k-accent); border-color: transparent; }
@media (hover: hover) and (pointer: fine) { .btn-tint:hover { border-color: var(--k-accent); } }
.btn-ghost { background: transparent; border-color: transparent; color: var(--k-ink); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--k-segbg); border-color: transparent; } }
.btn-danger { color: var(--k-dangerfg); }
@media (hover: hover) and (pointer: fine) { .btn-danger:hover { border-color: var(--k-dangerfg); } }
.btn-sm { font-size: .84rem; padding: 4px 11px; }
.btn-lg { font-size: 1rem; padding: 10px 20px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-link { border: 0; background: none; padding: 0; color: var(--k-accent); cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }

/* Vorschläge unter dem Eingabefeld */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--k-chipbg); color: var(--k-chipfg); border: 1px solid var(--k-chipbd); border-radius: 999px; padding: 6px 13px; font-size: .88rem; font-weight: 500; cursor: pointer; text-decoration: none; max-width: 100%; }
/* Lange Chips (z. B. „Weiterlesen: …“) brechen am Handy um statt über den Rand zu laufen. */
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--k-accent); text-decoration: none; } }
.chip.on, .chip[aria-pressed="true"] { background: var(--k-tint); border-color: var(--k-accent); color: var(--k-accent); font-weight: 600; }
.chip .ico { width: .95em; height: .95em; color: var(--k-muted); }

/* Eingabefeld (Composer) */
.composer { background: var(--k-cmpbg); border: 1px solid var(--k-cmpbd); border-radius: 20px; box-shadow: var(--k-cmpshadow); padding: 8px 8px 8px 16px; display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.composer:focus-within { border-color: var(--k-accent); }
.composer textarea, .composer input[type=text] { flex: 1; border: 0; outline: none; resize: none; background: transparent; padding: 6px 0; line-height: 1.5; max-height: 180px; min-height: 24px; font-size: .98rem; }
.composer textarea::placeholder, .composer input::placeholder { color: var(--k-muted); }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--k-primary); color: var(--k-onprimary); display: grid; place-items: center; flex: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .send:hover { background: var(--k-primary-hover); } }
.send[disabled] { opacity: .4; cursor: default; }
.send svg { width: 16px; height: 16px; }
/* Sprachmodus (labs): Mikrofon neben Senden, ruhiger als der Senden-Knopf */
.send-voice { background: var(--k-segbg); color: var(--k-ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .send-voice:hover { background: var(--k-tint); color: var(--k-accent); } }
/* Diktat (dictate.js, 18.10.2026): Mikrofon im Interview nimmt auf */
.send-voice.is-rec { background: var(--k-dangerbg); color: var(--k-dangerfg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-dangerfg) 25%, transparent); }
.dictate-status { text-align: center; margin: 6px 0 0; }
#dictate-optin { text-align: start; }   /* erbt sonst die Mitte des ersten Bildschirms (.greet) */
.cbtn { display: inline-flex; align-items: center; gap: 5px; color: var(--k-ink); border: 1px solid var(--k-line); background: transparent; border-radius: 999px; padding: 5px 11px; font-size: .84rem; white-space: nowrap; cursor: pointer; flex: none; }
@media (hover: hover) and (pointer: fine) { .cbtn:hover { border-color: var(--k-accent); } }
.ai-note { font-size: .78rem; color: var(--k-muted); text-align: center; }

/* Karten */
.card { border: 1px solid var(--k-line); border-radius: var(--k-r); padding: 14px 16px; background: var(--k-panel); display: grid; gap: 7px; align-content: start; }
.card.flush { padding: 0; }
.card.quiet { background: var(--k-chat); }
.card-link { color: inherit; transition: border-color .15s, box-shadow .15s; }
@media (hover: hover) and (pointer: fine) { .card-link:hover { border-color: var(--k-line-strong); box-shadow: var(--k-shadow); text-decoration: none; } }
.card-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 650; }
.card-sub { color: var(--k-muted); font-size: .9rem; }
.card-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* Status in Worten */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 650; padding: 2px 9px; border-radius: 999px; white-space: nowrap; flex: none; line-height: 1.5; background: var(--k-neutralbg); color: var(--k-neutralfg); }
.tag-ok { background: var(--k-okbg); color: var(--k-okfg); }
.tag-warn { background: var(--k-warnbg); color: var(--k-warnfg); }
.tag-danger { background: var(--k-dangerbg); color: var(--k-dangerfg); }
.tag-ai { background: transparent; border: 1px solid var(--k-chipbd); color: var(--k-muted); }
.tag-own { background: var(--k-ownbg); color: var(--k-ownfg); }
.tag-new { background: var(--k-warnbg); color: var(--k-warnfg); }

/* Listen mit einer Zeile je Eintrag */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--k-line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li-main { flex: 1; display: grid; min-width: 0; gap: 1px; }
.li-main b, .li-main strong { font-weight: 600; }
/* Sitzungen auf der Kursseite: Marke neben dem Titel, Notizen über die volle Breite (am Handy sonst eine schmale Spalte). */
.li-sess { align-items: flex-start; }
/* Nächste Sitzung in der Liste: Fläche der Zone (Kursseite, Als Studierende ansehen, Sitzungen der Lehrenden). */
.li-next { background: var(--k-tint); border-radius: 10px; padding-inline: 10px; margin-inline: -10px; }
.li-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.li-head .tag { margin-top: 1px; }
.sub { color: var(--k-muted); font-size: .88rem; font-weight: 400; }
a.li { color: inherit; }
/* Hinweise der Lehrperson zu einer Sitzung (Kursseite der Studierenden) */
.snotes { margin-top: 6px; font-size: .9rem; }
.snotes > summary { cursor: pointer; color: var(--k-muted); font-size: .85rem; width: fit-content; }
.snotes-b { margin-top: 6px; padding: 10px 12px; background: var(--k-chat); border: 1px solid var(--k-line); border-radius: var(--k-r); overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { a.li:hover { text-decoration: none; background: var(--k-chat); } }
.date { flex: none; width: 46px; text-align: center; border-radius: 8px; background: var(--k-chat); border: 1px solid var(--k-line); padding: 3px 0; line-height: 1.1; display: grid; }
.date b { font-size: 1.05rem; }
.date span { font-size: .62rem; text-transform: uppercase; color: var(--k-muted); letter-spacing: .06em; font-weight: 600; }

/* Fortschritt */
.trk { display: block; height: 6px; border-radius: 999px; background: var(--k-neutralbg); overflow: hidden; }
.trk i { display: block; height: 100%; border-radius: 999px; background: var(--k-accent); }

/* Segment-Umschalter und lokale Reiter */
.seg { display: inline-flex; background: var(--k-segbg); border-radius: 9px; padding: 2px; gap: 2px; white-space: nowrap; }
.seg button, .seg a { font: inherit; font-size: .88rem; border: 0; background: transparent; color: var(--k-muted); padding: 4px 12px; border-radius: 7px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .seg button:hover, .seg a:hover { color: var(--k-ink); text-decoration: none; } }
.seg [aria-pressed="true"], .seg .on { background: var(--k-segonbg); color: var(--k-ink); font-weight: 650; box-shadow: var(--k-segonshadow); }
.seg-wrap { flex-wrap: wrap; }   /* mehr als drei Optionen (Look am Konto): am Handy zweizeilig */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--k-line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 12px; color: var(--k-muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .tabs a:hover { color: var(--k-ink); text-decoration: none; } }
.tabs a.on { color: var(--k-ink); border-bottom-color: var(--k-accent); font-weight: 650; }
.tabs .count { color: var(--k-muted); font-weight: 500; margin-left: 4px; }

/* Klappzeilen auf der Startseite (details/summary) */
.glance { width: 100%; }
.gs > summary { list-style: none; cursor: pointer; display: block; }
.gs > summary::-webkit-details-marker { display: none; }
.shead { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.ghead { display: flex; align-items: center; gap: 8px; }
.glabel { font-weight: 650; }
.gcount { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 0 8px; line-height: 1.6; background: var(--k-neutralbg); color: var(--k-neutralfg); font-variant-numeric: tabular-nums; }
.gcount.warn { background: var(--k-warnbg); color: var(--k-warnfg); }
.gcount.ok { background: var(--k-okbg); color: var(--k-okfg); }
.gsum { grid-column: 1; color: var(--k-muted); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { grid-column: 2; grid-row: 1 / span 2; color: var(--k-muted); transition: transform .2s ease; width: 16px; height: 16px; }
.gs[open] .chev { transform: rotate(180deg); }
.gs[open] .gsum { display: none; }
.gs[open] .gpanel { animation: gin .18s ease-out; }
@keyframes gin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Startseite: fokussiert (zentriert wie ChatGPT/Claude) oder Überblick (zwei Spalten) */
.home { padding: 0 24px 64px; }
.greet { display: grid; gap: 14px; padding: 9vh 0 6px; max-width: 46rem; margin: 0 auto; }
.home.focus .greet { justify-items: center; text-align: center; }
.gtitle { font-family: var(--k-fhead); font-weight: 700; font-size: 2rem; letter-spacing: -.02em; line-height: 1.15; }
.gline { display: flex; gap: 10px; align-items: flex-start; max-width: 38rem; text-align: left; }
.gline .av { margin-top: 1px; }
.home.focus .chips { justify-content: center; }
.home .glance { max-width: 46rem; margin: 22px auto 0; }
.home.focus .glance { border-top: 1px solid var(--k-line); }
.home.focus .gs { border-bottom: 1px solid var(--k-line); }
.home.focus .gs > summary { padding: 11px 10px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .home.focus .gs > summary:hover { background: var(--k-chat); } }
.home.focus .gpanel { padding: 0 10px 14px; }
.home .composer { max-width: 40rem; }
.home-panel { max-width: 40rem; width: 100%; text-align: left; margin: 0 auto; }
/* Startseite Lehrende: Gesprächsmodus ab der ersten Frage (05.10.2026). Eingabe
   unten fest wie bei ChatGPT und Claude, Übersicht als eine Zeile oben. */
.home .chat-dock { display: grid; gap: 6px; width: 100%; max-width: 40rem; margin: 0 auto; }
.chat-bar { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 46rem; margin: 0 auto; }
.chat-sum { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--k-line); background: var(--k-panel); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .86rem; color: var(--k-muted); cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .chat-sum:hover { color: var(--k-ink); border-color: var(--k-line-strong); } }
.chat-sum .chev { margin-left: auto; flex: none; }
.chat-sum[aria-expanded="true"] .chev { transform: rotate(180deg); }
.home.chatting { min-height: 100%; display: flex; flex-direction: column; padding-bottom: 0; }
.home.chatting .greet { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-top: 16px; max-width: 46rem; width: 100%; text-align: left; }
.home.chatting .gtitle, .home.chatting .gline, .home.chatting .greet > .chips, .home.chatting #prof-scope { display: none; }
.home.chatting .glance { margin: 0; max-width: none; }
.home.chatting .home-panel { flex: 1; max-width: 46rem; }
.home.chatting .msg { scroll-margin-top: 12px; scroll-margin-bottom: 120px; }
.home.chatting .chat-dock { position: sticky; bottom: 0; z-index: 4; max-width: 46rem; padding: 10px 0 14px; background: var(--k-bar); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px); }

/* Formulare */
/* align-content: start: neben einem Feld mit langem Hilfetext (Benutzername) wurde das E-Mail-Feld
   in der .form-row auf 62 px gestreckt und 22 px tiefer gesetzt (O32 #5). */
.field { display: grid; gap: 5px; align-content: start; }
.field > label, .lbl { font-weight: 600; font-size: .9rem; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field input[type=time], .field input[type=url], .field select, .field textarea {
  width: 100%; border: 1px solid var(--k-fieldbd); border-radius: 10px; padding: 8px 11px; background: var(--k-panel); color: var(--k-ink); line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 84px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--k-accent); box-shadow: 0 0 0 3px var(--k-tint); }
.help { color: var(--k-muted); font-size: .84rem; }
.err { color: var(--k-dangerfg); font-size: .86rem; font-weight: 600; }
.field.has-err input, .field.has-err textarea, .field.has-err select { border-color: var(--k-dangerfg); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 3px; accent-color: var(--k-accent); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 12px; }
.form-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Darf schmaler werden als seine eigene Breite: neben „Hochladen“ in einer .row.nowrap (Kurs, Lernziele) ragte die Zeile am Handy 65 px hinaus (21.10.2026). */
input[type=file] { font-size: .9rem; max-width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--k-accent); }

/* Meldungen */
.flash { border-radius: 10px; padding: 10px 14px; font-size: .92rem; background: var(--k-okbg); color: var(--k-okfg); font-weight: 550; }
.flash.warn { background: var(--k-warnbg); color: var(--k-warnfg); }
.flash.err { background: var(--k-dangerbg); color: var(--k-dangerfg); }
/* Fehlerübersicht über Formularen (18.10.2026): oben, mit Fokus, jede Meldung verlinkt auf ihr Feld. */
.err-summary { border: 2px solid var(--k-dangerfg); border-radius: 10px; padding: 12px 14px; background: var(--k-dangerbg); color: var(--k-dangerfg); font-size: .92rem; }
.err-summary:focus { outline: 3px solid var(--k-dangerfg); outline-offset: 2px; }
.err-summary-title { margin: 0 0 6px; font-weight: 700; }
.err-summary ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.err-summary a:not(.btn) { color: inherit; font-weight: 600; text-decoration: underline; }
.err-summary-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; color: var(--k-ink); }
.err-summary-acts span { flex-basis: 100%; }
.empty { border: 1px dashed var(--k-line-strong); border-radius: var(--k-r); padding: 18px; color: var(--k-muted); font-size: .92rem; display: grid; gap: 8px; justify-items: start; }
.info { background: var(--k-chat); border: 1px solid var(--k-line); border-radius: var(--k-r); padding: 14px 16px; font-size: .9rem; display: grid; gap: 6px; }
/* Kästchen mit Erklärtext (Rechte-Erklärung): .info setzt grid, das Kästchen stand sonst allein über dem Text. */
.check.info { display: flex; }
/* Lernprofil (D-078): jede Zeile zum Ankreuzen ganz tippbar und 44 px hoch; die Knöpfe teilen sich die Breite,
   damit „Ohne Angaben weiter“ so groß ist wie die Einwilligung. Gilt unter jedem Look. */
.needs .check { min-height: 44px; align-items: center; }
.needs .check input { margin-top: 0; width: 24px; height: 24px; flex: none; }
.needs-acts > .btn { flex: 1 1 12rem; min-height: 44px; white-space: normal; }
.needs-list { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.needs-block { font-size: .86rem; }
/* Lernziele je Termin im Termin-Dialog (D-087): Haken mit 24 px in Zeilen von 44 px, wie im Lernprofil */
.goal-ticks .check { min-height: 44px; align-items: center; }
.goal-ticks .check input { margin-top: 0; width: 24px; height: 24px; flex: none; }

/* Aufgabenliste (Kurs einrichten, GOV.UK „complete multiple tasks“) */
.tasks { list-style: none; margin: 0; padding: 0; display: grid; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--k-line); }
.tasks li:last-child { border-bottom: 0; }
.tasks .n { width: 24px; height: 24px; border-radius: 50%; background: var(--k-neutralbg); color: var(--k-neutralfg); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.tasks li.done .n { background: var(--k-accent); color: var(--k-onaccent); }
.tasks li.cur { background: var(--k-tint); border-radius: 8px; padding-inline: 8px; margin-inline: -8px; border-bottom-color: transparent; }
.tasks a { color: var(--k-ink); flex: 1; min-width: 0; }
@media (hover: hover) and (pointer: fine) { .tasks a:hover { color: var(--k-accent); text-decoration: none; } }

/* Dialog */
dialog.dlg { border: 1px solid var(--k-line); border-radius: 16px; padding: 0; width: min(36rem, calc(100vw - 32px)); background: var(--k-panel); color: var(--k-ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
dialog.dlg::backdrop { background: rgba(20,18,15,.38); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 0; }
.dlg-b { padding: 14px 20px 20px; display: grid; gap: 14px; }

/* Wie Ava hier arbeitet (core/ai_notes.py, 18.10.2026): Info-Symbol oben rechts und sein Blatt.
   Breit von rechts; am Handy von unten (volle Breite, höchstens 85 % der Höhe, scrollt) mit
   einem Tippziel von 44 px, im Handy-Block unten (@media max-width: 700px). */
.ai-info { color: var(--k-muted); }
.ai-info[aria-expanded="true"] { color: var(--k-accent); }
.ai-info:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
dialog.ai-sheet { border: 1px solid var(--k-line); border-right: 0; border-radius: 16px 0 0 16px; padding: 0;
  margin: 0 0 0 auto; width: min(24rem, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: var(--k-panel); color: var(--k-ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); overflow-y: auto; }
dialog.ai-sheet::backdrop { background: rgba(20,18,15,.38); }
.ai-sheet-in { padding: 18px 20px 24px; display: grid; gap: 16px; align-content: start; font-size: .92rem; line-height: 1.5; }
.ai-sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.ai-sheet-head h2 { font-size: 1.15rem; margin: 0; }
.ai-sheet-head h2:focus { outline: none; }
.ai-sheet-sub { margin: 2px 0 0; color: var(--k-muted); font-size: .85rem; }
.ai-sheet-sect { display: grid; gap: 6px; }
.ai-sheet-sect h3 { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--k-muted); margin: 0; }
.ai-sheet-sect p { margin: 0; }
.ai-sheet-links { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--k-line); }
.ai-sheet-links a { font-weight: 550; }
.ai-onb { font-size: .8rem; color: var(--k-muted); margin: 6px 0 0; text-align: center; }
.ai-onb-i { display: inline-flex; vertical-align: -3px; }
.ai-onb-i svg { width: 16px; height: 16px; }
.print-only { display: none; }
.ai-print-note { font-size: .78rem; color: var(--k-muted); border-top: 1px solid var(--k-line); padding-top: 8px; }
.ai-print-note p { margin: 0 0 4px; }
@media print { dialog.ai-sheet, .ai-info { display: none !important; } .print-only { display: block !important; } }

/* Tabelle */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--k-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--k-line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--k-line); vertical-align: top; }
/* Breite Tabelle in eigenem Kasten: am Handy rollt nur die Tabelle seitlich, nicht die Seite (Beispielstudierende, 21.10.2026). */
.tbl-wrap { overflow-x: auto; }

/* Kennzahl (nur echte Zahlen; Regel per Test erzwungen) */
.kpi { display: grid; gap: 2px; }
.kpi b { font-size: 1.5rem; font-family: var(--k-fhead); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--k-muted); font-size: .86rem; }

/* Kursfarbe als Initial */
.cinit { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; flex: none; font-size: .95rem; }

/* ---------- 7 Gespräch mit Ava ---------- */
.av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--k-accent); color: var(--k-onaccent); font-weight: 700; display: inline-grid; place-items: center; font-size: .78rem; }
.av.lg { width: 34px; height: 34px; font-size: .95rem; }
.convo { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--k-page); }
.convo-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--k-line); min-height: 52px; }
.thread { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; }
.thread-in { max-width: 46rem; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-me { justify-content: flex-end; }
.msg-me .bubble { background: var(--k-chat); border: 1px solid var(--k-line); border-radius: 16px 16px 4px 16px; padding: 9px 14px; max-width: 34rem; white-space: pre-wrap; }
.msg-ava .bubble { max-width: 40rem; padding-top: 2px; min-width: 0; }
.msg .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quote { border-left: 3px solid var(--k-accent); background: var(--k-chat); padding: 6px 10px; border-radius: 0 8px 8px 0; font-family: var(--k-fread); font-size: .95rem; margin-bottom: 6px; color: var(--k-ink); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--k-muted); animation: tdot 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
/* Eine Spalte, die schmaler werden darf: sonst zog die markierte Stelle (#rd-anchor, eine Zeile mit „…“) die Spalte
   auf ihre volle Länge, im Reader am iPhone SE 759 px; Eingabe und Senden lagen außerhalb (iOS-Simulator, 21.10.2026). */
.convo-foot { flex: none; padding: 8px 20px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.convo-foot-in { max-width: 46rem; width: 100%; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.srcs { display: grid; gap: 6px; margin-top: 10px; }
.help-line { margin: 10px 0 0; border: 1px solid var(--k-line); border-radius: 10px; padding: 8px 11px; font-size: .9rem; background: var(--k-chat); }
.src { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--k-line); border-radius: 10px; padding: 8px 11px; font-size: .86rem; color: inherit; background: var(--k-panel); }
@media (hover: hover) and (pointer: fine) { .src:hover { border-color: var(--k-line-strong); text-decoration: none; } }
.src .q { font-weight: 700; color: var(--k-accent); flex: none; }
.src .snip { color: var(--k-muted); display: block; }
.minor { border: 0; background: none; color: var(--k-muted); font-size: .8rem; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .minor:hover { color: var(--k-ink); background: var(--k-segbg); } }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* Karteikarten im Gespräch (core/chat_cards.py): die Liste des Servers an der Stelle des Blocks */
.fc-slot { margin: 10px 0; }
.fc-slot:last-child { margin-bottom: 0; }
.md .fc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.md .fc { margin: 0; border: 1px solid var(--k-line); border-radius: 10px; background: var(--k-panel); padding: 9px 12px; }
.fc-q { font-weight: 600; }
.fc-a { color: var(--k-muted); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--k-line); }
.md .fc-q p, .md .fc-a p { margin: 0; }
.fc-acts { display: flex; gap: 16px; margin-top: 7px; font-size: .84rem; }
.fc-note { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: .86rem; color: var(--k-muted); }
.fc-wait { color: var(--k-muted); font-style: italic; }
.fc-edit .field { margin-top: 6px; }
.fc-edit .field label { display: block; font-size: .8rem; color: var(--k-muted); margin-bottom: 3px; }
.fc-edit .field textarea { min-height: 0; }
.fc-err { color: var(--k-dangerfg); font-size: .84rem; margin: 6px 0 0; }

/* Markdown in Avas Antworten (tutor.js mdToHtml) */
.md { line-height: 1.62; overflow-wrap: anywhere; }
.md p { margin: 0 0 10px; }
.md p:last-child, .md ul:last-child, .md ol:last-child, .md table:last-child { margin-bottom: 0; }
.md h4 { margin: 14px 0 6px; font-size: 1rem; font-weight: 700; }
.md h4:first-child { margin-top: 0; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md hr { border: none; border-top: 1px solid var(--k-line); margin: 12px 0; }
.md code { background: var(--k-neutralbg); border-radius: 4px; padding: 1px 5px; font-size: .88em; }
.md table { border-collapse: collapse; margin: 4px 0 10px; font-size: .9rem; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--k-line); padding: 5px 9px; text-align: left; }
.md th { background: var(--k-chat); font-weight: 650; }

/* Hilfe beim Formulieren (Workout-Dialog und Warm-up, D-084 Punkt 4, 27.10.2026), unter jedem Look und deshalb
   vor Abschnitt 12 (ab dort gilt alles nur für friction, core/tests/test_friction_theme.py).
   Daniels Klickdummy vom 27.10. (.dhelp, .hintbox, .wuask, .wuchips) unter jedem Look; seit v3 (28.10., D-090 Punkt 12)
   ohne Satzanfänge: „Denkanstoß von Ava“ als Textlink mit Glühbirne (.dhelp .hintbtn) vorn in der Zeile über dem
   Eingabefeld, auf dem Telefon in derselben Zeile zum Wischen (r-scroll-x, Abschnitt 9), nicht höher als die Chips
   daneben; die Zeile „Bleib dabei …“ im Gegenwind nur ab 701 px, damit Eingabe und KI-Hinweis auf dem iPhone SE über
   der Tab-Leiste bleiben. */
/* Der Weg aus dem Dialog („Weiter zum Cool-down“) unter jedem Look mindestens 24 px hoch (mobile_check: 21 px unter np). */
:where(.wo-bar) a { display: inline-flex; align-items: center; min-height: 24px; }   /* friction (Abschnitt 13) behält 44 px */
.dlg-help-h { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted); }
.dlg-hint { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 32px; padding: 4px 2px; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600; white-space: nowrap; color: var(--k-accent); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dlg-hint .ico { width: 14px; height: 14px; flex: none; }
.dlg-hint[disabled] { opacity: .6; }
.dlg-hint:active { color: var(--k-ink); }
@media (hover: hover) and (pointer: fine) { .dlg-hint:hover { text-decoration: underline; text-underline-offset: 3px; } }
.dlg-note { display: grid; gap: 2px; max-width: 36rem; margin: 2px 0 10px 40px; padding: 6px 12px; border-left: 2px solid var(--k-accent); }
.dlg-note b { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-accent); }
.dlg-note p { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--k-muted); }
.dlg-note-plain { border-left-color: var(--k-line-strong); }
.wo-ask-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wo-ask-head .lbl { margin: 0; }
.wo-ask-head span { white-space: nowrap; }
.wo-ask-me { margin: 0 0 0 auto; max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 4px 14px; background: var(--k-ownbg, var(--k-chipbg)); color: var(--k-ownfg, var(--k-ink)); }
.wo-ask-ava { margin: 0; max-width: 92%; line-height: 1.5; }
.wo-ask-moves { margin: 0; flex-wrap: wrap; }
.wo-ask-moves .chip { min-height: 36px; text-align: left; }
.wo-ask-own { display: flex; gap: 8px; align-items: center; margin: 0; }
.wo-ask-own input { flex: 1; min-width: 0; min-height: 44px; font-size: 1rem; }
.wo-ask-own .btn { min-height: 44px; }

/* ---------- 8 Canvas (zweite Fläche) und Reader ---------- */
.split { display: grid; grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr); height: 100%; min-height: 0; }
.split > .convo { border-right: 1px solid var(--k-line); }
/* Reader: der Text links, Ava rechts am Rand. Man liest links und geht mit Fragen nach rechts, wie
   Randkommentare auf einer Klausur; so war es im ersten Entwurf (Harbecke, 19.10.2026). Nur am Desktop;
   bis 1023 px bleibt der Text oben und Ava darunter (Abschnitt 9). */
@media (min-width: 1024px) {
  #rd-split { grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem); }
  #rd-split > .canvas { order: -1; }
  #rd-split > .convo { border-right: 0; border-left: 1px solid var(--k-line); }
}
.canvas { overflow-y: auto; min-height: 0; background: var(--k-bg); }
.canvas-in { max-width: 46rem; margin: 0 auto; padding: 22px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.sheet { background: var(--k-panel); border: 1px solid var(--k-line); border-radius: 14px; padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sheet-sect { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--k-line); }
.sheet-sect:first-child { padding-top: 0; border-top: 0; }
.just-added { background: var(--k-warnbg); border-radius: 8px; transition: background 2.5s ease; }

.rd-article { max-width: 42rem; margin: 0 auto; font-family: var(--k-fread); font-size: 1.12rem; line-height: 1.75; color: var(--k-ink); overflow-wrap: anywhere; }
/* overflow-wrap: lange URLs und DOIs aus PDFs brechen um; sonst wächst der Artikel als Grid-Element auf ihre Breite und schneidet am Telefon jede Zeile rechts ab (10.9, Lane E #1). */
.rd-meta { font-family: var(--k-fui); }
.rd-title { font-family: var(--k-fread); font-size: 1.7rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.rd-sec { position: relative; padding: 4px 0 4px 48px; margin-bottom: 16px; border-radius: 10px; transition: background .4s; }
.rd-sec h3 { font-family: var(--k-fread); font-size: 1.2rem; font-weight: 650; margin: 18px 0 8px; }
.rd-sec p { margin: 0; white-space: pre-line; }
/* Passagennummern in gedämpfter Schrift, nicht in der Linienfarbe: unter Stage und Study standen ungelesene bei 1,55:1
   (Altseiten-Inventur 20.10.2026, #13); Ava nennt sie („Passage 12, S. 4“). Gelesene sehen nun aus wie ungelesene, wie unter
   Night & Paper schon bisher; den Lesestand zeigt die Prozentzahl oben. */
.rd-num { position: absolute; left: 0; top: 7px; width: 34px; text-align: right; font-family: var(--k-fui); font-size: .72rem; font-weight: 600; color: var(--k-muted); user-select: none; }
.rd-sec.rd-engaged .rd-num { color: var(--k-accent); }
.rd-ask { position: absolute; left: 0; top: 28px; width: 34px; display: flex; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.rd-sec:focus-within .rd-ask { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .rd-sec:hover .rd-ask { opacity: 1; } }
.rd-ask button { cursor: pointer; width: 24px; height: 24px; padding: 0; border-radius: 7px; border: 1px solid var(--k-chipbd); background: var(--k-panel); color: var(--k-accent); font-weight: 700; font-size: .8rem; font-family: var(--k-fui); }
.rd-sec.rd-flash { background: var(--k-mark); }
.rd-sec.rd-active { background: var(--k-tint); }
.rd-article ::selection { background: var(--k-mark); }
#rd-popover { position: absolute; z-index: 40; display: none; gap: 6px; flex-wrap: wrap; max-width: min(420px, calc(100% - 16px)); background: var(--k-ink); border-radius: 12px; padding: 6px; box-shadow: var(--k-shadow); font-family: var(--k-fui); }
#rd-popover button { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--k-panel); background: transparent; border: 0; border-radius: 8px; padding: 6px 10px; }
@media (hover: hover) and (pointer: fine) { #rd-popover button:hover { background: rgba(127,127,127,.25); } }
#rd-anchor { display: none; align-items: center; gap: 8px; font-size: .84rem; color: var(--k-ink); background: var(--k-mark); border-radius: 9px; padding: 7px 10px; }
#rd-anchor.on { display: flex; }
.rd-chat-toggle { display: none; }
/* Ohne Maus bleibt das „?“ sichtbar: genau das Gegenteil der Hover-Bedingung, sonst bliebe es auf einem Gerät mit
   Hover und grobem Zeiger unsichtbar. */
@media not all and (hover: hover) and (pointer: fine) { .rd-ask { opacity: .75; } }

/* Lernkarte */
.flashcard { border: 1px solid var(--k-line); border-radius: 16px; background: var(--k-panel); padding: 28px; display: grid; gap: 14px; min-height: 14rem; align-content: start; box-shadow: var(--k-shadow); }
.flashcard .q { font-family: var(--k-fread); font-size: 1.3rem; line-height: 1.45; }
.flashcard .a { font-family: var(--k-fread); font-size: 1.08rem; line-height: 1.55; border-top: 1px solid var(--k-line); padding-top: 14px; }

/* Anmeldung: eine Karte, mittig */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; background: var(--k-bg); }
.auth-card { width: min(28rem, 100%); background: var(--k-panel); border: 1px solid var(--k-line); border-radius: 18px; padding: 28px; display: grid; gap: 18px; box-shadow: var(--k-shadow); }
.auth-card.wide { width: min(34rem, 100%); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.auth-foot { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: .82rem; color: var(--k-muted); }
.auth-foot a { color: var(--k-muted); }
.auth-legal { display: contents; }
.demo-logins { display: grid; gap: 6px; font-size: .86rem; }
.demo-logins button { text-align: left; }

/* ---------- 9 Responsive ---------- */
@media (max-width: 1023px) {
  .app, .app.noside { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; top: 0; bottom: 0; left: 0; width: min(18rem, 86vw); z-index: 60; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); visibility: visible !important; padding: 14px 10px 12px !important; border-right: 1px solid var(--k-line) !important; }
  body.nav-open .sb { transform: none; }
  body.nav-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20,18,15,.4); }
  .sb-close { display: grid; margin-left: auto; }
  .tb-brand { display: flex; }
  /* Kurs einrichten: der Entwurf unten höchstens 42 % und scrollt; mit "auto" nahm er am Handy die ganze Höhe und das Gespräch war 0 px hoch (07.10.). */
  .split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 42%); }
  /* Mindesthöhe fürs Gespräch: sonst rutscht am Handy das Eingabefeld unter die Tab-Leiste (Reader mit Hinweisbanner, 07.10.). */
  .split.canvas-first { grid-template-rows: minmax(0, 1fr) minmax(0, max(46%, 23rem)); }
  .split.canvas-first > .canvas { order: -1; }
  .split > .convo { border-right: 0; border-top: 1px solid var(--k-line); }
  .split > .convo.min .thread, .split > .convo.min .convo-foot,
  .split > .convo.rd-chat-min .thread, .split > .convo.rd-chat-min .convo-foot { display: none; }
  .split.canvas-first:has(.rd-chat-min) { grid-template-rows: minmax(0, 1fr) auto; }
  /* Vorschau der Lehrenden ohne Ava-Spalte: keine leere zweite Zeile (O32 #11; der Text bekam 277 von 645 px). */
  .split.solo { grid-template-rows: minmax(0, 1fr); }
  .rd-chat-toggle { display: inline-flex; }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  /* Zeile, die umbricht: Inhalt oben, Knöpfe darunter (Vorschläge im Kurskontext, 19.10.2026) */
  .li.li-wrap { flex-wrap: wrap; }
  .li.li-wrap > .li-main { flex: 1 1 100%; }
  body { font-size: 15px; }
  /* Info-Symbol und Blatt am Handy (core/ai_notes.py, 18.10.2026): Tippziel 44 px, Blatt von unten. */
  .ai-info { width: 44px; height: 44px; }
  .ai-info svg { width: 20px; height: 20px; }
  /* unten angesetzt und so hoch wie der Inhalt: der modale Dialog streckt sich sonst über inset: 0 */
  dialog.ai-sheet { inset: auto 0 0 0; margin: 0; width: 100vw; height: auto; max-height: 85dvh;
    border: 1px solid var(--k-line); border-bottom: 0; border-radius: 16px 16px 0 0; }
  .tb { padding: 6px 12px 6px 6px; }
  .tb .hide-sm, .convo-head .hide-sm, .li .hide-sm { display: none; }
  /* Lange Knöpfe oben rechts ("Prüfen und veröffentlichen (noch 6 Teile)") brechen um, statt Logo und Brotkrumen zu überdecken.
     Schmaler als ihr längstes Wort werden sie nicht: mit min-width: 0 ragte „Einladungslink kopieren“ 10 px aus dem Bild (O32 #11). */
  .tb-left { flex: 1 1 auto; min-width: 72px; }
  .tb-acts { flex: 0 1 auto; }
  .tb-acts .btn { white-space: normal; text-align: center; line-height: 1.2; }
  /* Tippziele mindestens 24 px hoch (WCAG 2.5.8; Messung labs 21.10.2026: Rechtslinks in der Fußzeile 18 px, „Melden“
     unter Avas Antworten 22 x 18, kleine Knöpfe oben 23, „Ändern“ und Namen in Tabellen 18, Sitzungsnotizen 21,
     die Schritte der Kurseinrichtung 19 bis 22).
     Links mitten im Satz bleiben, wie sie sind (dort gilt die Ausnahme für Text). */
  .pg-legal a, .auth-foot a, .tbl td > a { display: inline-block; padding-block: 3px; }
  .crumbs a, .sp-lab a { display: inline-block; padding-block: 1px; }
  .minor { min-width: 24px; min-height: 24px; }
  .btn-sm, .btn-link { min-height: 24px; }
  .snotes > summary { padding-block: 2px; }
  .wrap, .wrap-md, .wrap-sm { padding: 18px 16px 88px; }
  .home { padding: 0 16px 96px; }
  .greet { padding-top: 5vh; }
  /* .pg-main hält unten 64px für die Tab-Leiste frei; dazu nur der Home-Indicator. */
  .home.chatting .chat-dock { bottom: env(safe-area-inset-bottom, 0px); }
  .chat-bar .btn span { display: none; }
  .gtitle { font-size: 1.55rem; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  /* O32 #11 (Rundgang 10.9, 390 px): Inhalte, die nicht umbrechen (Titel mit .trunc, Auswahlfelder, lange Wörter in
     Tabellen), machten Karten und damit die ganze Seite breiter als das Telefon; der Rand wurde abgeschnitten. */
  .card { grid-template-columns: minmax(0, 1fr); }
  /* overflow: hidden: WebKit (iOS Safari) zählt den langen Sitzungstitel, der über das begrenzte Feld hinausgeht,
     zur Seitenbreite; das Briefing ließ sich 70 px seitlich schieben (21.10.2026). */
  .page-head select.input { min-width: 0; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
  /* Sitzungszeilen mit Status: der Status steht unter dem Titel, statt ihn zu überdecken. */
  .li-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: start; }
  .li-status > .date { grid-row: span 2; }
  .li-status > .li-main { grid-column: 2; }
  .li-status > .tag { grid-column: 2; grid-row: 2; justify-self: start; }
  .li-status > :not(.date):not(.li-main):not(.tag) { grid-column: 3; grid-row: 1; }
  /* Tabelle der Prüfen-Seite: Überschrift über dem Inhalt, „Ändern“ rechts daneben. */
  .tbl-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--k-line); }
  .tbl-stack th { grid-column: 1 / -1; border-bottom: 0; padding-bottom: 0; width: auto !important; }
  .tbl-stack td { border-bottom: 0; }
  .thread { padding: 16px 14px; }
  .convo-foot { padding: 6px 12px 10px; }
  .canvas-in { padding: 16px 14px 48px; }
  .rd-sec { padding-left: 30px; }
  .rd-num, .rd-ask { width: 24px; }
  .rd-article { font-size: 1.05rem; line-height: 1.7; }
  .pg-main { padding-bottom: 64px; }
  .pg-main.fill { padding-bottom: 60px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--k-bar); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-top: 1px solid var(--k-line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .tabbar.five { grid-template-columns: repeat(5, 1fr); }
  .tab { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; font-size: .7rem; font-weight: 600; color: var(--k-muted); position: relative; }
  @media (hover: hover) and (pointer: fine) { .tab:hover { text-decoration: none; } }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { color: var(--k-accent); }
  .tab .sb-count { position: absolute; top: 0; left: calc(50% + 6px); margin: 0; }
  .auth-card { padding: 22px 18px; }
  /* Gewollte Zeilen zum Wischen (r-scroll-x, im allgemeinen Gespräch Kurse und Vorschläge) unter jedem Look eine
     Zeile, Text ohne Umbruch: umbrochen standen die Vorschläge auf dem iPhone SE in Safari (547 px) in fünf Zeilen,
     vom Gespräch blieben 32 px, und unter np und study lag der KI-Hinweis unter der Tab-Leiste (27.10.2026). */
  .chips.r-scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .chips.r-scroll-x::-webkit-scrollbar { display: none; }
  .chips.r-scroll-x .chip { flex: none; white-space: nowrap; max-width: none; }
  /* Workout-Dialog (Abschnitt 7, Hilfe beim Formulieren): ohne Überschrift über der Zeile, Denkanstoß ohne Einzug. */
  .dlg-help-h { display: none; }
  .dlg-note { margin-left: 0; }
}
/* iOS Safari zoomt hinein, sobald ein Feld unter 16 px den Fokus bekommt (Anmeldung 15 px mit autofocus, Avas
   Eingabe .98rem), und bleibt danach vergrößert: die Seite lässt sich seitlich schieben (Manuel 21.10.2026,
   Lehrraum auf dem iPhone). Unter 1024 px daher jedes Feld 16 px, auch gegen Inline-Stile alter Seiten.
   Zoomen mit zwei Fingern bleibt erlaubt: kein maximum-scale im Viewport-Tag. */
@media (max-width: 1023px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
  /* WebKit zählt den Text einer Auswahl, der über ihr Feld hinausgeht, zur Seitenbreite, nicht nur unter .page-head:
     auf labs schob die Kursauswahl der alten Seite /kuratieren/ die Seite 86 pt seitlich (iOS, SE; 21.10.2026). */
  select { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
/* Druckzustand (mobile-native, 21.10.2026): ein Bedienelement antwortet, sobald der Finger aufliegt, nicht erst
   beim Loslassen. Je Familie die Farbe des Hovers und 0,97 Größe in 120 ms; unter reduzierter Bewegung bleibt
   nur die Farbe. iOS setzt :active bei einem kurzen Tipp nur, wenn die Seite auf touchstart hört (shell.js). */
.btn, .chip, .cbtn, .grade, .send, .iconbtn, .minor, .sb-item, .tab, .seg button, .seg a, .rd-ask button {
  transition: transform 120ms cubic-bezier(.23, 1, .32, 1), background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out, filter 120ms ease-out; }
.card-link { transition: transform 120ms cubic-bezier(.23, 1, .32, 1), border-color .15s, box-shadow .15s; }
.btn:active, .chip:active, .cbtn:active, .grade:active, .send:active, .iconbtn:active, .minor:active, .sb-item:active, .tab:active, .seg button:active, .seg a:active, .rd-ask button:active, .card-link:active { transform: scale(.97); }
.btn:not(.btn-primary):not(.btn-ghost):active, .chip:active, .cbtn:active, .grade:active { border-color: var(--k-accent); }
.btn-ghost:active, .iconbtn:active, .minor:active { background: var(--k-segbg); }
.btn-primary:active, .send:active { filter: brightness(.88); }
.sb-item:active, .tab:active, .seg button:active, .seg a:active { color: var(--k-ink); }
.card-link:active { border-color: var(--k-line-strong); }
/* Langer Druck auf ein Bedienelement markiert nicht seine Beschriftung und öffnet kein Vorschaumenü (vorher
   markierte ein langer Druck auf „Kurse“ in der Tab-Leiste die Seite bis zur Beschriftung). Nur auf
   Bedienelementen: Lesetext, Avas Antworten, Karten und Quellen bleiben markierbar, Markieren und Fragen beginnt
   mit einer Auswahl. */
button, .btn, .chip, .cbtn, .grade, .send, .iconbtn, .tab, .sb-item, .seg a, [role="button"] {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Tippziele von 44 px für Bedienelemente jeder Sitzung (mobile-native Abschnitt 5), nur bei grobem Zeiger; die
   Fläche wächst über ::before, sichtbar bleibt der Knopf, wie er ist. iOS Safari vorher (16 Pro Max): Senden
   34 x 34, das „?“ im Reader 28 x 24. Tab-Leiste (86 x 53) und Selbsteinschätzung (161 x 66) reichen schon. */
@media (pointer: coarse) {
  .send { position: relative; }
  .send::before { content: ""; position: absolute; inset: -5px; }
  .rd-ask button { position: relative; }
  .rd-ask button::before { content: ""; position: absolute; inset: -11px; }   /* ab der Innenkante des 1-px-Rands */
}
/* Am Telefon beginnt der Text 30 px nach dem Rand des Abschnitts. Die Fläche des „?“ reicht deshalb 14 px in den
   Seitenrand (.canvas-in) und endet am Text, weil dort das Markieren beginnt (Werte ab der Innenkante des Rands). */
@media (pointer: coarse) and (max-width: 700px) {
  .rd-ask button::before { inset: -11px -7px -11px -15px; }
}
/* Innere Rollflächen geben das Ende ihres Rollens nicht an die Seite weiter (mobile-native Abschnitt 8), sonst
   federt am Telefon die ganze Shell mit Kopfzeile und Tab-Leiste. */
.pg-main, .sb, .thread, .canvas, .rail, dialog.ai-sheet { overscroll-behavior: contain; }
@media (prefers-reduced-motion: reduce) {
  .app, .sb, .chev, .rd-sec, .just-added { transition: none !important; }
  .btn:active, .chip:active, .cbtn:active, .grade:active, .send:active, .iconbtn:active, .minor:active, .sb-item:active, .tab:active, .seg button:active, .seg a:active, .rd-ask button:active, .card-link:active { transform: none; }
  .gs[open] .gpanel, .typing i { animation: none !important; }
}
/* Ruhiger Modus und weniger Bewegung (D-078, 27.10.2026), hier und nicht in Abschnitt 12, weil er unter jedem Look
   gilt. Ruhiger Modus aus dem Lernprofil (learning_needs.calm; data-calm am Wurzelelement). Die Texte (Datum statt
   Countdown, keine Punkte, kein „überfällig“) setzen core/heute.py und die Vorlagen; die Frist bekommt dort den Stand
   „plain“, also weder Glutpunkt noch Ring noch Sand (auch der Stand der Kurse in der Seitenleiste). Hier: die große
   Zahl in Schriftfarbe. Gleiches Layout, damit beim Umschalten nichts springt.
   Bewegung: für alle mit prefers-reduced-motion und im ruhigen Modus immer keine Animationen und Übergänge (1 ms statt
   none, damit transitionend und animationend weiter feuern) und kein Druckzustand, der die Größe ändert; die Farbe
   des Druckzustands bleibt. Weiches Rollen schalten reader.js, shell.js und prof_home.js selbst ab. */
[data-calm] .wo-score .kpi b { color: var(--k-ink); }
[data-calm] .wo-break .ico { width: 16px; height: 16px; color: var(--k-muted); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
[data-calm] *, [data-calm] *::before, [data-calm] *::after { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
[data-calm] :is(.btn, .chip, .cbtn, .grade, .send, .iconbtn, .minor, .sb-item, .tab, .seg button, .seg a, .rd-ask button, .card-link):active { transform: none; }
@media print {
  .sb, .tb, .tabbar, .notice, .convo-foot { display: none !important; }
  .app { display: block; height: auto; }
  .pg-main { overflow: visible; }
}

/* Meldungen nach einer Aktion (Django messages) */
.flashes { max-width: 64rem; margin: 14px auto 0; padding: 0 28px; display: grid; gap: 8px; }
.flashes .flash { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.flashes .flash.info { background: var(--k-neutralbg); color: var(--k-neutralfg); }
@media (max-width: 700px) { .flashes { padding: 0 16px; } }

/* Wiederholen: Selbsteinschätzung und kurze Rückmeldung */
.grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.grade { border: 1px solid var(--k-line-strong); background: var(--k-panel); border-radius: 12px; padding: 10px 6px; text-align: center; cursor: pointer; display: grid; gap: 2px; color: var(--k-ink); }
@media (hover: hover) and (pointer: fine) { .grade:hover { border-color: var(--k-accent); } }
.grade b { font-size: .95rem; }
.grade span { font-size: .74rem; color: var(--k-muted); }
.grade.sug { border-color: var(--k-accent); background: var(--k-tint); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--k-ink); color: var(--k-panel); font-size: .88rem; font-weight: 600; padding: 9px 16px; border-radius: 999px; box-shadow: var(--k-shadow); z-index: 70; }
@media (max-width: 700px) { .grades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Anmeldung und Registrierung */
.auth { align-content: center; gap: 18px; }
.notice-box { background: var(--k-warnbg); color: var(--k-ink); border-radius: var(--k-r); padding: 12px 14px; display: grid; gap: 8px; }
.notice-box p { margin: 0; line-height: 1.55; }
fieldset.field { display: grid; gap: 8px; }
.prompt-box > summary { list-style: none; }
.prompt-box > summary::-webkit-details-marker { display: none; }
.prompt-box[open] .chev { transform: rotate(180deg); }
.prompt-text { margin: 0; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.65; white-space: pre-wrap; background: var(--k-chat); border-top: 1px solid var(--k-line); color: var(--k-ink); border-radius: 0 0 var(--k-r) var(--k-r); overflow-x: auto; }
/* Lernplan */
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.day { border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-panel); padding: 12px; display: grid; gap: 8px; align-content: start; min-height: 12rem; }
.day.today { border-color: var(--k-accent); box-shadow: var(--k-shadow); }
.day-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--k-line); }
.day.today .day-h b { color: var(--k-accent); }
.pblock { display: grid; gap: 2px; border-left: 3px solid var(--k-accent); background: var(--k-chat); border-radius: 0 8px 8px 0; padding: 8px 10px; color: inherit; }
@media (hover: hover) and (pointer: fine) { a.pblock:hover { text-decoration: none; background: var(--k-hover, var(--k-chat)); } }
@media (max-width: 900px) { .week { grid-template-columns: 1fr; } .day { min-height: 0; } }
/* Gespräch mit Seitenspalte (Wochenreflexion) */
.convo-rail { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; height: 100%; min-height: 0; }
.rail { border-left: 1px solid var(--k-line); background: var(--k-bg); padding: 20px 18px; overflow-y: auto; }
.show-narrow { display: none; }
@media (max-width: 1023px) {
  .convo-rail { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .show-narrow { display: inline-flex; }
  .rail-open .rail { display: block; position: fixed; left: 0; right: 0; bottom: 0; max-height: 75vh; z-index: 60; border-left: 0; border-top: 1px solid var(--k-line); border-radius: 16px 16px 0 0; box-shadow: var(--k-shadow); background: var(--k-panel); }
}
/* Briefing (Screen 5) */
.briefing .topic { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--k-line); }
.briefing .topic:last-of-type { border-bottom: 0; }
.briefing .topic .trk { height: 8px; }
.quote-card { margin: 0; }
.quote-card blockquote { margin: 0; font-family: var(--k-fread); font-size: 1.08rem; line-height: 1.55; }
.openers { margin: 0; padding-left: 1.3rem; display: grid; gap: 10px; }
.openers li { padding-left: 2px; }
.openers li b, .openers li span { display: block; }
.openers li span { margin-top: 2px; }
@media print {
  .no-print { display: none !important; }
  .briefing .cols-main { display: block; }
  .briefing .card { box-shadow: none; break-inside: avoid; }
  .briefing { padding: 0; }
}
/* Ganze Gruppe (Kohorten-Puls, 20.10.2026): Bausteine des Briefings. Eine Stufe steht als Wort und als Farbe;
   unter Night & Paper sind die Statusfarben Tinte, dann trägt das Wort sie allein. */
.cohort .co-privacy { margin-bottom: 26px; }
.cohort .co-course + .co-course { margin-top: 40px; }
.cohort .co-title { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.cohort .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cohort .kpi .xsmall { color: var(--k-muted); }
.cohort .kpi b.lv-hard { color: var(--k-dangerfg); }
.cohort .kpi b.lv-mid { color: var(--k-warnfg); }
.cohort .kpi b.lv-ok { color: var(--k-okfg); }
.cohort .kpi b.lv-none { font-size: 1.1rem; }
.cohort .co-held { grid-column: 2 / -1; align-content: center; }
.cohort .trk.lv-hard i { background: var(--k-dangerfg); }
.cohort .trk.lv-mid i { background: var(--k-warnfg); }
.cohort .trk.lv-ok i { background: var(--k-okfg); }
.cohort .co-sub { flex-wrap: wrap; }
.cohort .co-topic { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cohort .co-topic > :first-child { min-width: 0; overflow-wrap: anywhere; }
.cohort .co-tbl tbody th { font-weight: 600; color: var(--k-ink); font-size: .92rem; text-transform: none; letter-spacing: 0; vertical-align: top; border-bottom-color: var(--k-line); }
.cohort .co-course > .sect-h > .small { white-space: nowrap; }
.cohort .co-tbl tbody th > span { display: block; }
.cohort .co-tbl td { white-space: nowrap; }
.cohort .co-tbl td.co-none { white-space: normal; }
.cohort .co-passages { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--k-line); }
.cohort .co-passages h4 { font-size: .95rem; }
@media (max-width: 860px) { .cohort .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  /* Auf dem Telefon wird jede Zeile ein Block: der Text oben, darunter die Werte mit ihrer Spaltenüberschrift. */
  .cohort .co-tbl, .cohort .co-tbl tbody, .cohort .co-tbl tr, .cohort .co-tbl th, .cohort .co-tbl td { display: block; }
  .cohort .co-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cohort .co-tbl tr { border-bottom: 1px solid var(--k-line); padding: 8px 0; }
  .cohort .co-tbl tbody th, .cohort .co-tbl td { border-bottom: 0; padding: 3px 0; }
  .cohort .co-tbl td[data-label] { display: flex; justify-content: space-between; gap: 12px; white-space: normal; }
  .cohort .co-tbl td[data-label]::before { content: attr(data-label); color: var(--k-muted); }
}
/* Anführungszeichen je Sprache (für <q>) */
q { quotes: "“" "”" "‘" "’"; }
:lang(de) q { quotes: "„" "“" "‚" "‘"; }
/* Mein KI-Avatar: ohne Text nur das Gespräch in der Mitte, danach Gespräch und Blatt */
.av-focus { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.av-intro { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 5vh 0 6px; }
.av-intro .gtitle { font-size: 1.6rem; }
.av-intro p { margin: 0; max-width: 34rem; color: var(--k-muted); }
.av-text { white-space: pre-line; line-height: 1.6; overflow-wrap: anywhere; }
.sheet-sect.gs > summary { padding: 2px 0; }
/* Formeln (KaTeX) in Avas Antworten: breite Formeln scrollen statt umzubrechen. */
.md .katex { overflow-wrap: normal; font-size: 1.05em; }
.md .katex-display { margin: 8px 0; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }

/* ---- Beta für unabhängige Lernende (14.10.2026) ----
   Erster Start ohne Kurs, Beispiele zum Ausprobieren, Avas Tagesbudget als
   ruhige Zeile, Hinweis „Testversion“. */
.first-start { display: grid; gap: 22px; padding-bottom: 28px; }
.first-start .greet { padding-top: 7vh; }
.first-start .gline b { font-weight: 600; }
.first-start .composer textarea { min-height: 3.2em; }
.first-try { max-width: 52rem; width: 100%; margin: 0 auto; }
.first-try-h { font-size: .95rem; font-weight: 600; color: var(--k-muted); text-align: center; }
.first-alt { text-align: center; }
.try-grid .card-t { line-height: 1.3; }
.budget-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; font-size: .82rem; color: var(--k-muted); }
.budget-line.at-limit { color: var(--k-ink); background: var(--k-warnbg); border-radius: var(--k-r); padding: 8px 12px; }
.budget-state { font-weight: 600; }
.budget-state.ok { color: var(--k-okfg); }
/* Ava antwortet nicht (19.10.2026, core/ava_down.py): der Weg von Hand am Gespräch der Lehrenden. Unter 1024 px steht der Entwurf unter dem Gespräch. */
.ava-down { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .85rem; line-height: 1.4; color: var(--k-ink); background: var(--k-warnbg); border-radius: var(--k-r); padding: 8px 12px; }
.ava-down p { margin: 0; flex: 1 1 14rem; }
.ava-down .ad-narrow { display: none; }
@media (max-width: 1023px) { .ava-down .ad-wide { display: none; } .ava-down .ad-narrow { display: inline; } }
.notice.verify-email .vn-short { display: none; }
.notice.demo-account .dm-short { display: none; }
.notice.test-banner { background: var(--k-tint); color: var(--k-ink); padding-block: 6px; }
.notice.test-banner a { color: inherit; text-decoration: underline; }
.notice.test-banner .iconbtn { margin-left: auto; }
@media (max-width: 640px) {
  .first-start .greet { padding-top: 3vh; }
  .notice.test-banner { padding-inline: 16px; font-size: .82rem; flex-wrap: nowrap; }
  .notice.test-banner .tb-more { display: none; }   /* eine Zeile: Platz für Text und Ava */
  .notice.verify-email { padding: 6px 16px; gap: 8px; font-size: .82rem; flex-wrap: nowrap; }
  .notice.verify-email .vn-long { display: none; }  /* eine Zeile bis zur Bestätigung */
  .notice.verify-email .vn-short { display: inline; }
  .notice.verify-email .vn-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .notice.verify-email form { flex-shrink: 0; white-space: nowrap; }
  .rd-title { font-size: 1.4rem; }                  /* lange englische Titel (Beispieltexte) */
  .notice.demo-account { padding: 6px 16px; font-size: .82rem; }
  .notice.demo-account .dm-long { display: none; }  /* eine Zeile, damit der Reader Platz behält */
  .notice.demo-account .dm-short { display: inline; }
}

/* Schlanke Einrichtung (labs, 19.10.2026, Daniels Screens 1 und 2): Einstieg mit Ablage; beim Einrichten
   das Gespräch groß und rechts schmal der Qualitätsindex mit den Dokumenten. */
.cn-lean { max-width: 52rem; margin: 0 auto; padding: 28px 24px 56px; display: grid; gap: 18px; min-width: 0; }
.cn-eyebrow { color: var(--k-accent); }
.cn-h { font-family: var(--k-fdisplay, inherit); font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.1; margin: 0; }
.cn-drop { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 30px 22px; border: 2px dashed var(--k-line-strong); border-radius: 18px; background: var(--k-panel); min-width: 0; }
.cn-drop.is-over { border-color: var(--k-accent); background: var(--k-tint); }
.cn-drop.is-busy { opacity: .7; pointer-events: none; }
.cn-drop h2 { margin: 0; font-size: 1.3rem; }
.cn-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--k-accent); color: var(--k-onaccent); }
.cn-icon svg { width: 24px; height: 24px; }
.cn-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cn-pick { cursor: pointer; }
.cn-rights { text-align: left; max-width: 40rem; font-size: .86rem; }
.cn-names { margin: 0; overflow-wrap: anywhere; }
.cn-chat { text-align: center; }
.cn-chat .btn-link { font-weight: 550; }
.cn-next { border-top: 1px solid var(--k-line); padding-top: 16px; display: grid; gap: 10px; }
.cn-next ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 14px; }
.cn-next li { display: grid; gap: 3px; font-size: .9rem; }
.cn-next li span { color: var(--k-muted); }
/* Hochladen zuerst (L1, 28.10.2026, Daniels v3): was in die drei Gruppen gehört, Links an der Ablage, und die Liste
   „Unterlagen ordnen“ (core/templates/core/material_sort.html) unter jedem Look; Telefon im Block darunter. */
.cn-links { width: 100%; max-width: 40rem; text-align: left; display: grid; gap: 6px; }
.cn-links > summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--k-accent); min-height: 32px; display: flex; align-items: center; }
.cn-links textarea { width: 100%; }
.cn-links .btn { justify-self: start; }
.cn-what { display: grid; gap: 8px; }
.cn-what-h { margin: 0; font-size: 1.1rem; }
.cn-what > p { margin: 0; }
.cn-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 14px; }
.cn-group { display: grid; align-content: start; gap: 6px; padding: 14px 16px; border: 1px solid var(--k-line); border-radius: 14px; background: var(--k-panel); }
.cn-group p, .cn-group ul { margin: 0; }
.cn-group ul { padding-left: 18px; display: grid; gap: 3px; }
.ms { max-width: 52rem; margin: 0 auto; padding: 28px 24px 56px; display: grid; gap: 16px; min-width: 0; }
.ms-h { margin: 0; font-size: clamp(1.5rem, 3.6vw, 2.2rem); line-height: 1.15; }
.ms .lede { margin: 0; }
.ms-form { display: grid; gap: 18px; }
.ms-group { display: grid; gap: 4px; }
.ms-gh { display: grid; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--k-line); }
.ms-gh h2, .ms-gh p { margin: 0; }
.ms-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--k-line); }
.ms-ic svg { width: 18px; height: 18px; color: var(--k-muted); }
.ms-main { display: grid; gap: 2px; min-width: 0; }
.ms-name { overflow-wrap: anywhere; font-weight: 600; }
.ms-sub { overflow-wrap: anywhere; }
.ms-vis { color: var(--k-muted); }
.ms-pick { display: flex; gap: 6px; align-items: center; }
.ms-pick select { min-height: 40px; max-width: 18rem; }
/* Die Rechte-Erklärung an der Ablage und in der Liste: das Kästchen 24 px wie in .needs und .goal-ticks (vorher 12 px). */
.cn-rights input, .ms-add .check input { margin-top: 0; width: 24px; height: 24px; flex: none; }
/* Hochladen in der Materialsammlung (Phone-Check 28.10.2026, L1): dasselbe Kästchen, die aufklappbare Zeile und der
   Link im Hinweis wenigstens 24 px hoch (vorher 12, 21 und 15 px). */
#ms-upload label.small { display: flex; gap: 8px; align-items: center; }
#ms-upload label.small input { margin: 0; width: 24px; height: 24px; flex: none; }
#ms-upload details > summary { line-height: 28px; }
#ms-model-note a { padding-block: 5px; }
.ms-empty { margin: 4px 0 0; }
.ms-acts { display: flex; justify-content: flex-end; }
.ms-more { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--k-line); }
.ms-more h2 { margin: 0; }
.ms-add { display: grid; gap: 8px; }
.ms-add .btn { justify-self: start; }
/* Maßstäbe der Lehrperson vor der ersten Position im Workout (L1), eingeklappt, damit die Frage vorn bleibt. */
.wo-criteria { display: grid; gap: 6px; padding: 10px 14px; border: 1px solid var(--k-line); border-radius: 12px; }
.wo-criteria > summary { cursor: pointer; font-weight: 600; font-size: .92rem; min-height: 28px; display: flex; align-items: center; }
.wo-criteria ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.wo-criteria p { margin: 0; }
/* Kurskontext im Entwurf (L1): die Arten eines Teils untereinander, Avas Ton als Auswahl. */
.ctx-sub { display: grid; gap: 4px; padding-top: 8px; border-top: 1px dashed var(--k-line); }
.ctx-sub .btn-link { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; }
.ctx-sub .btn-link svg { width: 16px; height: 16px; }
.ctx-tone { display: grid; gap: 4px; }
.ctx-tone label { font-size: .86rem; font-weight: 600; }
.ctx-tone .row { gap: 8px; }
.ctx-tone select { width: auto; flex: 1; min-width: 0; min-height: 40px; }

.split.split-lean { grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem); }
.split.split-lean > .convo { border-right: 1px solid var(--k-line); }
.split-lean .convo.is-over { outline: 2px dashed var(--k-accent); outline-offset: -6px; }
.step-chip { flex: none; font-size: .78rem; font-weight: 600; color: var(--k-muted); text-decoration: none; white-space: nowrap; padding: 3px 10px; border: 1px solid var(--k-line); border-radius: 999px; }
.msg-ava.is-current .bubble { border-left: 3px solid var(--k-accent); padding-left: 12px; }
.ask-focus { display: grid; gap: 4px; margin: 10px 0; padding: 12px 14px; border-left: 3px solid var(--k-accent); background: var(--k-tint); border-radius: 0 10px 10px 0; }
.ask-focus span { font-size: .86rem; color: var(--k-muted); }
.composer .attach { align-self: end; }
.sp { padding: 0; }
.sp-fold > .sp-sum { display: none; }
.sp-in { display: grid; gap: 16px; padding: 18px 18px 48px; min-width: 0; }
.sp-head { display: flex; gap: 8px; align-items: start; }
.sp-head .grow { min-width: 0; overflow-wrap: anywhere; }
.sp-when { display: block; }
.sp-index { display: grid; gap: 8px; }
.sp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sp-score b { font-size: 1.7rem; font-weight: 700; }
.sp-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.sp-bar i { height: 8px; border-radius: 3px; background: var(--k-segbg); }
.sp-bar i.on { background: var(--k-accent); }
.sp-scale { display: flex; justify-content: space-between; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); }
.sp-scale .here { color: var(--k-ink); font-weight: 700; }
.sp-note { margin: 0; }
.sp-rows { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.sp-rows li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--k-line); font-size: .9rem; }
.sp-rows li.cur { font-weight: 650; }
.sp-rows li.cur .sp-ic { border-color: var(--k-accent); }
.sp-ic { width: 16px; height: 16px; margin-top: 2px; border: 1.5px solid var(--k-line-strong); border-radius: 50%; display: grid; place-items: center; }
.sp-rows li.done .sp-ic { border-color: var(--k-accent); background: var(--k-accent); color: var(--k-onaccent); }
.sp-ic svg { width: 11px; height: 11px; }
.sp-lab { display: grid; gap: 2px; min-width: 0; }
.sp-lab a, .sp-go { color: inherit; text-decoration: none; font-weight: inherit; text-align: left; }
.sp-subs { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .8rem; font-weight: 450; }
.sp-subs .btn-link { color: var(--k-muted); font-weight: 450; text-decoration: none; }
.sp-subs .btn-link.cur { color: var(--k-ink); font-weight: 650; }
.sp-pts { font-size: .8rem; color: var(--k-muted); white-space: nowrap; }
.sp-part .sheet-sect { padding-top: 0; border-top: 0; }
.sp-docs { display: grid; gap: 6px; }
.sp-add { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.sp-add svg { width: 14px; height: 14px; }
.sp-doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: .86rem; }
.sp-doc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1023px) {
  .split.split-lean { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  /* Aufgeklappt höchstens 45 % der Höhe: darunter braucht das Gespräch Platz für Eingabe und Knöpfe. */
  .split.split-lean > .sp { order: -1; border-bottom: 1px solid var(--k-line); max-height: 45vh; }
  .split-lean .convo-head { display: none; }
  .split.split-lean > .convo { border-right: 0; border-top: 0; }
  .sp-fold > .sp-sum { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; list-style: none; font-size: .88rem; font-weight: 600; }
  .sp-fold > .sp-sum::-webkit-details-marker { display: none; }
  .sp-fold > .sp-sum span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-fold > .sp-sum svg { width: 16px; height: 16px; transition: transform .15s ease; }
  .sp-fold[open] > .sp-sum svg { transform: rotate(90deg); }
  .sp-in { padding: 4px 16px 20px; }
  .step-chip { display: none; }
}
@media (max-width: 700px) {
  .cn-lean { padding: 18px 16px 40px; }
  .cn-drop { padding: 22px 14px; }
  .ms { padding: 18px 16px 40px; }
  /* Am Telefon steht die Auswahl unter dem Namen, über die ganze Breite (Tippziel 44 px). */
  .ms-row { grid-template-columns: 20px minmax(0, 1fr); }
  .ms-pick { grid-column: 1 / -1; }
  .ms-pick select { flex: 1; min-width: 0; max-width: none; min-height: 44px; }
  .ms-acts .btn { flex: 1; min-height: 44px; }
  .ctx-tone select, .ctx-tone .btn, .cn-links .btn, .ms-add .btn { min-height: 44px; }
}

/* Rechtliches auf dem Telefon (D-113): die Fußzeile der Lehrenden nahm über der Tab-Leiste eine ganze Bildschirmhöhe
   ein; die Links stehen dort unten in der Seitenleiste wie bei den Studierenden, zwei Tipps von jeder Seite. */
.sb-legal-phone { display: none; }
@media (max-width: 700px) {
  .pg-foot { display: none; }
  .sb-legal-phone { display: flex; }
  .sb-legal a { display: inline-block; padding-block: 5px; }
}

/* Kurskopf auf dem Telefon (D-113): „Einladungslink kopieren“ ließ dem Kurs drei Buchstaben. Der Knopf wird zum Symbol
   mit 44 px, der Titel läuft, so weit er passt; unter rund 12 Zeichen steht das Kürzel des Kurses. Die Kopfzeile misst
   nur ihre eigene Breite, deshalb eine Container-Abfrage und kein Skript. Nach dem Kopieren steht kurz „Link kopiert“. */
.crumb-c { display: none; }
@media (max-width: 700px) {
  .crumbs:has(.crumb-c) { flex: 1 1 0; container: tb-crumbs / inline-size; }
  .tb .btn-icon-sm { min-width: 44px; min-height: 44px; padding-inline: 10px; justify-content: center; }
}
@container tb-crumbs (max-width: 100px) {
  .crumb-t { display: none; }
  .crumb-c { display: inline; }
}

/* Workout auf dem Telefon (D-113, Manuels iPhone-Durchgang 01.11.2026), unter jedem Look und deshalb vor Abschnitt 10
   (ab Abschnitt 12 nur Friction, test_friction_theme): ein Gespräch, keine Erklärungen. Es bleiben Avas Frage, der
   Denkanstoß, die Fahne und der Weg zum Cool-down; das Gespräch bekommt den größeren Teil der Höhe. Der Satz „Ava ist
   eine KI …“ weicht einer kleinen Marke an Avas Namen (Art. 50 Abs. 1 KI-VO); am Desktop bleibt alles wie es ist. */
.ai-mark { display: none; }
@media (max-width: 700px) {
  .in-workout :is(.notice.demo-account, .wo-bar-sess, .convo-head .xsmall, header.rd-meta > .eyebrow, .rd-byline, .ai-note),
  .in-workout .rd-article > .info.rd-meta,
  .in-workout .dlg-row .chip,
  .in-workout .dlg-row:not(:has(.js-hint:not([hidden]))),
  .in-workout .convo-head:has(.js-scope) { display: none; }
  .in-workout .wo-bar { flex-wrap: nowrap; justify-content: space-between; }
  /* „Ava“ und die Marke bleiben ganz, der Kursname gibt nach; sonst schnitt die Kopfzeile unter Night die Marke ab. */
  .in-workout .crumbs .here:has(~ .trunc) { flex: none; }
  .in-workout .convo-head { min-height: 0; padding-block: 2px; }
  .in-workout .ai-mark { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--k-line-strong); border-radius: 5px; font-size: .68rem; font-weight: 600; line-height: 1.45; letter-spacing: .04em; color: var(--k-muted); vertical-align: 1px; }
  /* Das Beispiel im Lese-Gespräch: ein Platzhalter steht im Attribut und reader.js setzt ihn neu, also hier ausgeblendet. */
  .in-workout #rd-chat #composer::placeholder { color: transparent; }
  .in-workout .split.canvas-first:has(.dlg-row):not(:has(.rd-chat-min)) { grid-template-rows: minmax(0, 1fr) minmax(0, max(60%, 23rem)); }
}

/* ---------- 10 Stage (09.10.2026) ----------
   Dunkler Look für labs nach ui_design_stage_julian_2026-10-09.html („The
   direction“, Screen 01): schwarzer Grund, gedämpfte Seitenleiste, größere
   und engere Überschriften, ein Schimmer Teal hinter der Begrüßung, weiß, was
   zählt. Farben nur über die Tokens in 2. Selektoren mit :where(), damit die
   Klassen der Seiten weiter gewinnen. Die Lesefläche (.paper) ist hell, bis
   das Konto sie dunkel stellt (data-paper="dark"). */
:where([data-ui="stage"]) h1 { font-size: 2rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.12; }
:where([data-ui="stage"]) h2 { font-size: 1.28rem; letter-spacing: -.02em; }
:where([data-ui="stage"]) .gtitle { font-size: 2.6rem; font-weight: 650; letter-spacing: -.04em; line-height: 1.06; }
:where([data-ui="stage"]) .eyebrow { letter-spacing: .1em; }
/* Seitenleiste gedämpft (Linear 2026): die Arbeit führt, die Orte treten zurück. */
:where([data-ui="stage"]) .sb-item { color: var(--k-muted); font-weight: 500; }
:where([data-ui="stage"]) .sb-item .ico { opacity: .85; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="stage"]) .sb-item:hover { color: var(--k-ink); } }
:where([data-ui="stage"]) .sb-item.on { background: var(--k-segbg); color: var(--k-ink); font-weight: 600; }
:where([data-ui="stage"]) .sb-item.on .ico { color: var(--k-accent); opacity: 1; }
:where([data-ui="stage"]) .sb-brand { font-weight: 650; letter-spacing: -.01em; }
/* Kursfarben sind für helle Flächen gewählt: ein feiner Ring hält dunkle Punkte sichtbar. */
:where([data-ui="stage"]) .cdot { box-shadow: 0 0 0 1px var(--k-line-strong); }
:where([data-ui="stage"]) .home.focus .greet { background: radial-gradient(ellipse 70% 60% at 50% 18%, var(--k-glow), transparent 72%); }
@media (hover: hover) and (pointer: fine) { :where([data-ui="stage"]) .card-link:hover { border-color: var(--k-line-strong); box-shadow: none; } }
:where([data-ui="stage"]) dialog.dlg::backdrop, :where([data-ui="stage"]) dialog.ai-sheet::backdrop { background: rgba(0,0,0,.62); }
/* Umschalter mit Zustand (Lesefläche dunkel): gedrückt sichtbar, nicht nur für Screenreader. */
:where([data-ui="stage"]) .btn[aria-pressed="true"] { background: var(--k-segbg); border-color: var(--k-line-strong); color: var(--k-ink); }
/* Knopf-Tabs („Kurse“, „Semester“) tragen inline font:inherit und wurden so größer als die
   anderen Tabs; das betrifft auch stable und wird dort nach dem Freeze im Markup behoben. */
:where([data-ui="stage"]) button.tab { font-size: .7rem !important; font-weight: 600 !important; }
/* Lesefläche: Text, Farben und Bildlaufleisten aus dem hellen Satz. */
.paper { color: var(--k-ink); }
@media (max-width: 700px) {
  :where([data-ui="stage"]) h1 { font-size: 1.6rem; }
  :where([data-ui="stage"]) .gtitle { font-size: 1.9rem; }
}

/* ---------- 11 Night & Paper (16.10.2026) ----------
   Regeln aus dem Designsystem (design_system/night-and-paper/project/README.md),
   die Study und Stage nicht kennen: eckig, ohne Schatten und Unschärfe, Linien
   statt Karten, 3px Tinte öffnet einen Abschnitt, Links in Tinte und
   unterstrichen, Kobalt nur für den Hauptknopf, rund nur Menschen (Verlauf)
   und die KI (ein Punkt, der atmet), keine Symbole in der Seitenleiste.
   Farben nur über die Tokens in 2; Selektoren mit :where(), damit die Klassen
   der Seiten weiter gewinnen. Ausnahme: Ecken und Schatten gelten mit
   !important, weil sie auch Inline-Styles älterer Seiten treffen müssen. */
:root[data-ui="np"] *, :root[data-ui="np"] *::before, :root[data-ui="np"] *::after { border-radius: 0 !important; box-shadow: none !important; }
:root[data-ui="np"] :is(.av, .face, .av-orb, .typing i, .voice-orb i, .lh-dot, input[type=radio]) { border-radius: 50% !important; }
:where([data-ui="np"]) :is(.tb, .tabbar, .home.chatting .chat-dock) { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* Schrift: eine Familie, Überschriften mittelstark und enger, Fließtext 16/25. */
:where([data-ui="np"]) body { font-size: 16px; line-height: 1.5625; }
:where([data-ui="np"]) :is(h1, h2, h3, h4) { font-weight: 500; letter-spacing: -.02em; }
:where([data-ui="np"]) h1 { font-size: 2.5rem; line-height: 1.1; }
:where([data-ui="np"]) h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.33; }
:where([data-ui="np"]) h3 { font-weight: 600; letter-spacing: -.01em; }
:where([data-ui="np"]) .gtitle { font-size: 2.5rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
:where([data-ui="np"]) :is(.eyebrow, .sb-label) { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .1em; }
:where([data-ui="np"]) .kpi b { font-family: var(--k-fdisplay); font-weight: 400; font-size: 2.5rem; line-height: 1; }
:where([data-ui="np"]) :is(code, kbd, .prompt-text) { font-family: var(--k-fmono); }
:where([data-ui="np"]) .rd-article { font-size: 1.125rem; line-height: 1.667; }
:where([data-ui="np"]) .page-head .lede { color: var(--k-muted-strong); }
/* Wortmarke: nur Schrift, Name aus der Instanz (instance.product_name). */
:where([data-ui="np"]) :is(.sb-brand, .tb-brand, .auth-brand) { font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
:where([data-ui="np"]) .bmark { background: var(--k-ink); color: var(--k-page); letter-spacing: 0; }   /* nur noch in der Kopfzeile (Handy) */
:where([data-ui="np"]) :is(.sb-brand, .auth-brand) .bmark { display: none; }
/* „TRANSFORMEDUCATION“ braucht 198 px, neben Marke und Labs-Plakette blieben 121: die Plakette bricht um. */
:where([data-ui="np"]) .sb-brand { flex-wrap: wrap; row-gap: 4px; }
:where([data-ui="np"]) .labs-pill { background: transparent; color: var(--k-muted); border: 1px solid var(--k-line-strong); letter-spacing: .1em; }
/* Seitenleiste und Tab-Leiste: Text in Grau, der aktive Ort in Tinte mit Linie. */
:where([data-ui="np"]) .sb-item { color: var(--k-muted); border-left: 3px solid transparent; padding-left: 6px; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="np"]) .sb-item:hover { background: transparent; color: var(--k-ink); } }
:where([data-ui="np"]) .sb-item.on { background: transparent; color: var(--k-ink); font-weight: 600; border-left-color: var(--k-ink); }
:where([data-ui="np"]) .sb-item > svg.ico:not(.chev) { display: none; }
:where([data-ui="np"]) .tab { border-top: 2px solid transparent; }
:where([data-ui="np"]) .tab.on { color: var(--k-ink); border-top-color: var(--k-ink); }
:where([data-ui="np"]) .tabs a.on { border-bottom-width: 3px; }
/* Knopf-Tabs tragen inline font:inherit (wie unter Stage, Abschnitt 10). */
:where([data-ui="np"]) button.tab { font-size: .7rem !important; font-weight: 600 !important; }
/* Linien statt Karten; 3px Tinte über einem Abschnitt. */
:where([data-ui="np"]) .card { background: transparent; border-width: 1px 0 0; padding-inline: 0; }
:where([data-ui="np"]) .card.quiet { background: var(--k-chat); border-width: 0; padding-inline: 16px; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="np"]) .card-link:hover { border-color: var(--k-ink); } }
:where([data-ui="np"]) .sect-h { border-bottom: 3px solid var(--k-ink); padding-bottom: 8px; }
:where([data-ui="np"]) .tbl th { border-bottom-color: var(--k-ink); }
:where([data-ui="np"]) a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Bedienelemente: ein Hauptknopf in Kobalt, sonst Tinte; Auswahl mit ✓, nicht nur Farbe. */
@media (hover: hover) and (pointer: fine) { :where([data-ui="np"]) :is(.btn-primary, .send):not([disabled]):hover { filter: brightness(.88); } }
/* Gesperrt heißt „wartet“ (gestrichelt wie ein wartender Schritt); der Text bleibt lesbar,
   weil er oft sagt, was fehlt („noch 4 Teile“). */
:where([data-ui="np"]) :is(.btn[disabled], .btn.is-disabled) { opacity: 1; background: transparent; border: 1px dashed var(--k-line-strong); color: var(--k-muted); }
:where([data-ui="np"]) .btn-tint { background: transparent; border-color: var(--k-line-strong); color: var(--k-ink); }
:where([data-ui="np"]) .seg { background: transparent; border: 1px solid var(--k-line-strong); padding: 0; gap: 0; }
:where([data-ui="np"]) :is(.seg [aria-pressed="true"], .seg .on) { color: var(--k-page); }
:where([data-ui="np"]) :is(.seg [aria-pressed="true"], .seg .on)::before { content: "✓\00a0"; }
:where([data-ui="np"]) :is(.input, .field input, .field select, .field textarea) { background: var(--k-field); }
:where([data-ui="np"]) :is(.input, .field input, .field select, .field textarea):focus { border-color: var(--k-ink); outline: 2px solid var(--k-ink); outline-offset: 2px; }
:where([data-ui="np"]) .composer:focus-within { border-color: var(--k-ink); outline: 2px solid var(--k-ink); outline-offset: 2px; }
/* Schritte der Kurseinrichtung sind Knöpfe: umbrochen standen sie sonst mittig. */
:where([data-ui="np"]) .tasks button { text-align: start; }
:where([data-ui="np"]) .tag-own { border: 1px dashed var(--k-line-strong); }
:where([data-ui="np"]) dialog.dlg, :where([data-ui="np"]) dialog.ai-sheet { border-color: var(--k-line-strong); }
:where([data-ui="np"]) dialog.dlg::backdrop, :where([data-ui="np"]) dialog.ai-sheet::backdrop { background: color-mix(in srgb, var(--k-page) 82%, transparent); }
/* Auf der Fläche der Zone reicht ink-subtle auf Paper nicht (4,43:1): Meta dort in ink-muted. */
:where([data-ui="np"]) :is(.notice, .notice-box, .flash.warn, .tag-warn, .tag-new, .gcount.warn, .tasks li.cur, .rd-sec.rd-active, .budget-line.at-limit, .grade.sug, .chip.on, .just-added, .li-next) { --k-muted: var(--k-muted-strong); }
/* Menschen: Scheibe im Verlauf mit Initialen; der KI-Avatar der Lehrperson mit gestricheltem Ring. */
:where([data-ui="np"]) .face { background: linear-gradient(135deg, var(--k-glow-amber) 0%, var(--k-glow-coral) 35%, var(--k-glow-red) 65%, var(--k-glow-violet) 100%); color: var(--k-onglow); }
/* avatar.css lädt nach dieser Datei: hier ohne :where(), sonst gewinnt dort die Fläche der Zone. */
[data-ui="np"] .av-orb { background: linear-gradient(135deg, var(--k-glow-amber) 0%, var(--k-glow-coral) 35%, var(--k-glow-red) 65%, var(--k-glow-violet) 100%); color: var(--k-onglow); border: 0; outline: 1px dashed var(--k-ink); outline-offset: 3px; animation: none; }
/* Die KI bei der Arbeit: ein Punkt in Tinte, der von 14 auf 6 px atmet (1,4 s). */
:where([data-ui="np"]) .typing i { background: var(--k-ink); }
:where([data-ui="np"]) .typing i:first-child { width: 14px; height: 14px; animation: np-breathe 1.4s ease-in-out infinite; }
:where([data-ui="np"]) .typing i:not(:first-child) { display: none; }
@keyframes np-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.43); } }
@media (max-width: 700px) {
  :where([data-ui="np"]) h1 { font-size: 1.75rem; }
  :where([data-ui="np"]) .gtitle { font-size: 1.9rem; }
}


/* ---------- 12 Friction (23.10.2026) ----------
   Daniels Screens (Konzept_Julian_Daniel/2026-10-23_FRICTION_Screens; Maße aus tokens.json und dem Inline-CSS der
   HTML-Screens, D = desktop-studierende, P = mobile-studierende), nur das Aussehen: Tinte als Grund, Papier als
   Schrift, eine Temperaturskala von Kaltblau bis Heißrot als Linie oben und in Fortschrittsbalken, Kaltblau für die
   eine Aktion, Sand für die Frage, an der jemand arbeitet, große enge Überschriften und weit gesperrte Versalien als
   Labels, Zahlen in Tabellenziffern. Aufbau wie Stage (STAGE_LAYOUT_THEMES). Farben nur über die Tokens in 2;
   Selektoren mit :where(), damit die Klassen der Seiten weiter gewinnen. Bausteine für Phase 2a (Workout) am Ende:
   .fx-sand, .fx-heat, .fx-conf (Selbsteinschätzung), .fx-fab (Notizknopf); Vorschau unter /komponenten/friction/. */
/* Schriftgrade aus tokens.json (desktop_scale, mobile_scale). Fließtext 16/25 statt Daniels 15: mit 15 px wurden Links
   in Listen 23 px hoch (Tippziel 24 px, Startseite am Telefon), und Felder brauchen 16 px gegen den Zoom von iOS. */
:where([data-ui="friction"]) body { font-size: 16px; line-height: 1.55; font-feature-settings: "kern"; }
:where([data-ui="friction"]) :is(h1, h2, h3, h4) { font-weight: 600; letter-spacing: -.01em; }
:where([data-ui="friction"]) h1 { font-size: 40px; line-height: 1.05; }
:where([data-ui="friction"]) h2 { font-size: 22px; line-height: 1.25; }
:where([data-ui="friction"]) .gtitle { font-size: 40px; font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
:where([data-ui="friction"]) .page-head .lede { color: var(--k-muted-strong); font-size: 19px; line-height: 1.5; }
:where([data-ui="friction"]) .card-t { font-size: 18px; }
/* Labels: Versalien, gesperrt (tokens.json label_caps: 12 px, 600, .12em; Seitenleiste D16 11 px). */
:where([data-ui="friction"]) :is(.eyebrow, .tbl th, .ai-sheet-sect h3) { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .sb-label { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .page-head .eyebrow { color: var(--k-label); }
/* Zahlen, die untereinander stehen, in Tabellenziffern. */
:where([data-ui="friction"]) :is(.kpi b, .gcount, .sb-count, .rd-num, .date b, .tbl td, .trk + *, .sp-lab, .card-sub, .sub) { font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .kpi b { font-size: 2.4rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--k-kpi); }
:where([data-ui="friction"]) :is(.pg-main, .auth-card) a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where([data-ui="friction"]) :focus-visible { outline-color: var(--k-ink); }
:where([data-ui="friction"]) :is(.tb, .tabbar, .home.chatting .chat-dock) { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Die Linie oben: die Temperaturskala über der Kopfzeile (Desktop S. 2 bis 14, Phone S. 2 bis 15). */
:where([data-ui="friction"]) .tb::before, :where([data-ui="friction"]) .auth::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--k-heat); pointer-events: none; }
:where([data-ui="friction"]) .auth { position: relative; background: var(--k-heatglow), var(--k-page); }
:where([data-ui="friction"]) .tb { border-bottom-color: var(--k-line); }

/* Wortmarke (shell/_friction_wordmark.html): Daniels SVG in currentColor, Breite wie in seinen Screens (Seitenleiste
   D16 140 px, Kopfzeile D09 118 px, Telefon P06 104 px, Anmeldung P01 150 px und D01 170 px). Unter 32 px Platz nur
   „F.“ (friction-icon-F): in der Kopfzeile schmaler Telefone und in der Vorschau. */
:where([data-ui="friction"]) .fx-wm { display: inline-flex; align-items: center; line-height: 0; }   /* Farbe von der Umgebung: Papier auf Tinte, Tinte auf Papier und Verlauf */
:where([data-ui="friction"]) .fx-wm svg { display: block; overflow: visible; }
:where([data-ui="friction"]) .fx-wm-full { width: var(--fx-wm-w, 118px); height: auto; aspect-ratio: 1011 / 112; }
:where([data-ui="friction"]) .fx-wm .fx-wm-short { display: none; width: auto; height: var(--fx-f-h, 18px); aspect-ratio: 104 / 112; }
:where([data-ui="friction"]) .sb-brand .fx-wm { --fx-wm-w: 140px; }
:where([data-ui="friction"]) .auth-brand .fx-wm { --fx-wm-w: 170px; }
/* Als Link braucht die Marke ein Tippziel von 44 px (am Telefon vorher 92 x 12). */
:where([data-ui="friction"]) :is(.tb-brand, .sb-brand) { min-height: 44px; min-width: 44px; align-items: center; }
:where([data-ui="friction"]) .sb-brand { padding: 10px 10px 18px; flex-wrap: wrap; row-gap: 6px; }
:where([data-ui="friction"]) .labs-pill { background: transparent; color: var(--k-muted); border: 1px solid var(--k-line-strong); border-radius: 4px; letter-spacing: .12em; }

/* Seitenleiste (Desktop S. 13, S. 14): Orte in Papier, der aktive auf gehobener Fläche, Labels gesperrt. */
:where([data-ui="friction"]) .sb { border-right-color: var(--k-line); }
:where([data-ui="friction"]) .sb-item { color: var(--k-ink); font-size: 14px; font-weight: 500; border-radius: var(--k-r-sm); padding: 10px 12px; min-height: 40px; }
:where([data-ui="friction"]) .sb-item .ico { color: var(--k-muted); }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .sb-item:hover { background: var(--k-chat); } }
:where([data-ui="friction"]) .sb-item.on { background: var(--k-chat); color: var(--k-ink); font-weight: 600; }
:where([data-ui="friction"]) .sb-item.on .ico { color: var(--k-ink); }
:where([data-ui="friction"]) .sb-count { background: var(--k-chat); color: var(--k-ink); }
/* Fällige Zahl wie Daniels Notizzähler (D09): Papier mit Tinte; Sand bleibt der einen Frage. */
:where([data-ui="friction"]) .sb-count.warn { background: var(--k-ink); color: var(--k-page); }
:where([data-ui="friction"]) .cdot { box-shadow: 0 0 0 1px var(--k-line-strong); }

/* Tab-Leiste am Telefon (P06, tokens.json tab-label 11 px): deckend, Beschriftung klein und gesperrt, der aktive Ort in Papier. */
:where([data-ui="friction"]) .tab { color: var(--k-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
:where([data-ui="friction"]) .tab.on { color: var(--k-ink); }
:where([data-ui="friction"]) button.tab { font-size: 11px !important; font-weight: 600 !important; }

/* Knöpfe: Ecken statt Pillen; die Aktion in Kaltblau mit Tinte, sonst Rand und Papier. Höhen aus Daniels Screens:
   48 px in Karten (P06, D16), 52 px für die eine große Aktion (tokens.json button_height, P01), 40 px in der Kopfzeile
   (D09 „Pause“), 32 px klein in der Zeile (P06 „Lesen“); Ecke 12 px (tokens.json radius.button), klein 8 px. */
:where([data-ui="friction"]) .btn { border-radius: 12px; min-height: 48px; padding: 0 20px; font-size: 15px; background: transparent; border-color: var(--k-line-strong); }
:where([data-ui="friction"]) .btn-sm { border-radius: var(--k-r-sm); min-height: 32px; padding: 0 12px; font-size: 13px; }
:where([data-ui="friction"]) .btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
:where([data-ui="friction"]) .tb .btn { border-radius: var(--k-r-sm); min-height: 40px; padding: 4px 12px; font-size: 14px; }
:where([data-ui="friction"]) .btn-primary { background: var(--k-primary); border-color: var(--k-primary); color: var(--k-onprimary); }
@media (hover: hover) and (pointer: fine) {
  :where([data-ui="friction"]) .btn:hover { border-color: var(--k-ink); }
  :where([data-ui="friction"]) :is(.btn-primary, .send):not([disabled]):hover { filter: brightness(1.08); border-color: var(--k-primary); }
}
:where([data-ui="friction"]) .btn-ghost { border-color: transparent; }
:where([data-ui="friction"]) .btn-tint { background: transparent; border-color: var(--k-line-strong); color: var(--k-ink); }
/* Gesperrt (Desktop S. 7 „Weiter“): gehobene Fläche, gedämpfte Schrift, ohne Transparenz. */
:where([data-ui="friction"]) :is(.btn[disabled], .btn.is-disabled) { opacity: 1; background: var(--k-chat); border-color: var(--k-chat); color: var(--k-muted); }
:where([data-ui="friction"]) .btn[aria-pressed="true"] { background: var(--k-segonbg); border-color: var(--k-segonbg); color: var(--k-page); }
:where([data-ui="friction"]) .btn-link { color: var(--k-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Chips (D09 Antwortvorschläge): Rand, Schrift in zweiter Ordnung, 40 px hoch, Ecke 18 px (tokens.json radius.chip);
   gewählt in Papier. */
:where([data-ui="friction"]) .chip { min-height: 40px; padding: 9px 14px; border-radius: 18px; font-size: 14px; font-weight: 500; color: var(--k-muted-strong); }
:where([data-ui="friction"]) :is(.chip.on, .chip[aria-pressed="true"]) { background: var(--k-segonbg); border-color: var(--k-segonbg); color: var(--k-page); }
:where([data-ui="friction"]) :is(.chip.on, .chip[aria-pressed="true"]) .ico { color: var(--k-page); }
:where([data-ui="friction"]) .cbtn { border-color: var(--k-line-strong); }

/* Felder (D01 48 px, P01 52 px, Ecke 12 px): eigene Fläche, Rand 3 : 1, Fokus in Papier. */
:where([data-ui="friction"]) :is(.input, .field input, .field select, .field textarea) { background: var(--k-field); border-radius: 12px; padding: 11px 14px; min-height: 48px; }
:where([data-ui="friction"]) :is(.input, .field input, .field select, .field textarea)::placeholder { color: var(--k-muted); }
/* Fokus: der Rand wird Papier und doppelt so stark (2 px); ohne Abstandsring, der in Daniels Screens nicht vorkommt. */
:where([data-ui="friction"]) :is(.input, .field input, .field select, .field textarea):focus { border-color: var(--k-ink); box-shadow: 0 0 0 1px var(--k-ink); outline: none; }
:where([data-ui="friction"]) .field > label, :where([data-ui="friction"]) .lbl { font-size: .86rem; color: var(--k-muted-strong); }
/* Eingabe im Gespräch (D09): Ecke 14 px, Senden 40 px mit 8 px Ecke; am Telefon rund und 44 px (unten). */
:where([data-ui="friction"]) .composer { border-radius: 14px; padding: 10px 10px 10px 18px; }
/* Ein Suchfeld in der Eingabezeile (Zweitgehirn) zählt nicht mit seiner Grundbreite (rund 200 px) zur Mindestbreite
   der Seite: neben dem größeren Etikett schob es das iPhone SE sonst 10 px seitlich. Die Breite kommt aus flex: 1. */
:where([data-ui="friction"]) .composer :is(input, textarea) { min-width: 0; width: 0; }
:where([data-ui="friction"]) .composer:focus-within { border-color: var(--k-ink); box-shadow: 0 0 0 1px var(--k-ink); }
:where([data-ui="friction"]) .composer > .ico { align-self: center; color: var(--k-muted); }
:where([data-ui="friction"]) .send { border-radius: var(--k-r-sm); width: 40px; height: 40px; }
:where([data-ui="friction"]) .check input, :where([data-ui="friction"]) :is(input[type=checkbox], input[type=radio]) { accent-color: var(--k-t-cold); }

/* Karten (D16 22 x 24 px, P06 18 px, Ecke 16 px, Abstand 14 px): Fläche, Haarlinie. */
:where([data-ui="friction"]) .card { padding: 22px 24px; gap: 14px; }
:where([data-ui="friction"]) .card.quiet { background: var(--k-chat); border-color: var(--k-chat); }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .card-link:hover { border-color: var(--k-line-strong); } }
:where([data-ui="friction"]) .card-t { font-weight: 600; letter-spacing: -.01em; }
:where([data-ui="friction"]) :is(.info, .snotes-b, .help-line) { border-radius: var(--k-r-sm); }
:where([data-ui="friction"]) .empty { border-radius: var(--k-r); }

/* Status in Worten als gesperrte Versalien mit Rand (D16 „Workout 03 läuft“, „Vorlesung“: 11 px, .08em, 3 x 7 px). */
:where([data-ui="friction"]) .tag { border-radius: 4px; border: 1px solid currentColor; background: transparent; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; line-height: 1.2; }
:where([data-ui="friction"]) .tag-own { border-style: dashed; }
:where([data-ui="friction"]) .gcount { background: var(--k-chat); color: var(--k-ink); }
:where([data-ui="friction"]) .gcount.warn { background: var(--k-ink); color: var(--k-page); }
:where([data-ui="friction"]) .flash { border-radius: var(--k-r-sm); }

/* Zone: die nächste Sitzung (Kursseite) mit Sandkante, die eine Stelle dort, die gerade etwas verlangt; der aktuelle
   Schritt einer Liste (Kurseinrichtung, neben Avas Frage) mit Papierkante. Daniels Teal-Kante für gespeicherte eigene
   Positionen (D06, D12) bleibt für 2a: --k-label. Gedämpftes dort in zweiter Ordnung. */
:where([data-ui="friction"]) .li-next { box-shadow: inset 3px 0 0 var(--k-zone-line); border-radius: 0 var(--k-r-sm) var(--k-r-sm) 0; }
:where([data-ui="friction"]) .tasks li.cur { box-shadow: inset 3px 0 0 var(--k-ink); border-radius: 0 var(--k-r-sm) var(--k-r-sm) 0; }
/* Erledigt: der Haken in Türkis (tokens.json turquoise: „Erreichtes, Haken“; P06 „Warm-up“). */
:where([data-ui="friction"]) .tasks li.done .n { background: var(--k-okbg); color: var(--k-okfg); box-shadow: inset 0 0 0 1px var(--k-okfg); }
:where([data-ui="friction"]) :is(.notice, .notice-box, .flash.warn, .tag-warn, .tag-new, .gcount.warn, .tasks li.cur, .rd-sec.rd-active, .grade.sug, .li-next, .just-added) { --k-muted: var(--k-muted-strong); }
:where([data-ui="friction"]) .date { background: transparent; border-color: var(--k-line); border-radius: var(--k-r-sm); }

/* Segmente und Reiter: gewählt in Papier mit Tinte (Desktop S. 9 „Lesemodus“). */
:where([data-ui="friction"]) .seg { border-radius: var(--k-r-sm); }
:where([data-ui="friction"]) .seg button, :where([data-ui="friction"]) .seg a { border-radius: 6px; }
:where([data-ui="friction"]) :is(.seg [aria-pressed="true"], .seg .on) { color: var(--k-page); }
:where([data-ui="friction"]) .tabs a.on { border-bottom-color: var(--k-ink); }

/* Fortschritt: der Balken zeigt die Temperatur an seiner Stelle (Desktop S. 12, S. 14); auf Papier in Tinte.
   Der Verlauf liegt auf der Spur, der Schatten der Füllung deckt den Rest. */
:where([data-ui="friction"]) .trk { background: var(--k-meter); position: relative; isolation: isolate; }
:where([data-ui="friction"]) .trk i { background: transparent; box-shadow: 0 0 0 100vmax var(--k-line); border-radius: 0; }

/* Dialoge und Blätter */
:where([data-ui="friction"]) :is(dialog.dlg, dialog.ai-sheet) { border-color: var(--k-line-strong); box-shadow: none; }
:where([data-ui="friction"]) :is(dialog.dlg, dialog.ai-sheet)::backdrop { background: color-mix(in srgb, var(--k-page) 78%, transparent); }

/* Gespräch mit Ava (D09 Dialog, P08): Ava ohne Scheibe, ein Punkt vor jedem Zug (10 px, der aktuelle in Papier);
   frühere Züge Avas in zweiter Ordnung (P08), der letzte in Papier; die eigene Nachricht auf gehobener Fläche mit der
   spitzen Ecke unten rechts. Sand trägt nur die Frage: der letzte Absatz von Avas letzter Antwort, bis Ava wieder
   antwortet; Quellen, Etikett, Melden und Karten stehen darunter auf Tinte wie Daniels Chips und Dokumentlink. Während
   Ava schreibt (aria-busy), steht noch kein Sand: der letzte Absatz wechselt dann mit jedem neuen. Ohne :has() bleibt
   der Sand ganz weg. Steht die Frage nicht im letzten Absatz (gut jede siebte Antwort in den Proben), liegt der Sand
   auf dem letzten Absatz; genauer geht es nur mit Markup oder Prompt (Bericht T-20261023-1810). */
:where([data-ui="friction"]) .thread .msg-ava > .av { width: 10px; height: 10px; margin: 8px 8px 0 6px; font-size: 0; background: var(--k-muted); color: transparent; }
:where([data-ui="friction"]) .thread-in > .msg-ava:not(#typing):last-child > .av { background: var(--k-ink); }
:where([data-ui="friction"]) .thread-in > .msg-ava:has(~ .msg-ava:not(#typing)) > .bubble > .md { color: var(--k-muted-strong); }
:where([data-ui="friction"]) .msg-me .bubble { background: var(--k-chat); border-color: var(--k-chat); border-radius: 14px 14px 4px 14px; padding: 12px 16px; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .quote { border-left-color: var(--k-line-strong); border-radius: 0 6px 6px 0; }
:where([data-ui="friction"]) .src { border-radius: var(--k-r-sm); }
:where([data-ui="friction"]) .src .q { color: var(--k-ink); }
:where([data-ui="friction"]) .ai-note { color: var(--k-muted); }
/* Der Sandblock (P08: 17 px, 500, 16 x 18 px, Ecke 14 px; D09 und D08: Ecke links gerade, 18 x 22 px). */
:where([data-ui="friction"]) :is(.fx-sand, .thread-in > .msg-ava:not(#typing):not([aria-busy="true"]):not(:has(~ .msg-ava:not(#typing))) > .bubble > .md > p:last-child) {
  background: var(--k-sand); color: var(--k-ink); border-radius: 0 12px 12px 0; padding: 18px 22px; font-size: 17px; line-height: 1.5; font-weight: 500; box-shadow: inset 0 0 0 1px var(--k-sandedge); }
:where([data-ui="friction"]) .thread-in > .msg-ava:not(#typing):not([aria-busy="true"]):not(:has(~ .msg-ava:not(#typing))) > .bubble > .md > p:last-child { width: fit-content; max-width: 100%; margin-top: 14px; }
:where([data-ui="friction"]) .thread-in > .msg-ava:not(#typing):not([aria-busy="true"]):not(:has(~ .msg-ava:not(#typing))) > .bubble > .md > p:only-child { margin-top: 0; }
:where([data-ui="friction"]) .fx-sand .eyebrow { color: var(--k-muted); }
:where([data-ui="friction"]) :is(.fx-sand, .msg-ava .md) a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Ava bei der Arbeit: der warme Punkt atmet (Brandsheet „03 Die Bewegung“). */
:where([data-ui="friction"]) .typing i { background: var(--k-dot); }
:where([data-ui="friction"]) .typing i:first-child { width: 10px; height: 10px; animation: fx-breathe 1.4s ease-in-out infinite; }
:where([data-ui="friction"]) .typing i:not(:first-child) { display: none; }
@keyframes fx-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.5); } }

/* Reader (Desktop S. 9 Lesemodus, Phone S. 9): Text in der Schrift der Oberfläche; die Lesefläche ist Tinte auf Papier. */
:where([data-ui="friction"]) .rd-article { font-size: 1.1rem; line-height: 1.7; }
:where([data-ui="friction"]) :is(.rd-title, .rd-sec h3) { font-weight: 600; letter-spacing: -.02em; }
:where([data-ui="friction"]) .rd-sec { border-radius: var(--k-r-sm); }
:where([data-ui="friction"]) .rd-ask button { border-radius: 6px; color: var(--k-ink); }
:where([data-ui="friction"]) #rd-popover { border-radius: 10px; }
:where([data-ui="friction"]) #rd-anchor { border-radius: var(--k-r-sm); box-shadow: inset 3px 0 0 var(--k-line-strong); }
:where([data-ui="friction"]) .sheet { border-radius: var(--k-r); }

/* Wiederholen: Karte und Selbsteinschätzung (Desktop S. 8 Antwortkarten). */
:where([data-ui="friction"]) .flashcard { border-radius: 16px; box-shadow: none; }
:where([data-ui="friction"]) .flashcard .q { font-size: 1.35rem; font-weight: 500; letter-spacing: -.01em; }
:where([data-ui="friction"]) .grade { border-radius: 10px; border-color: var(--k-line-strong); background: transparent; }
:where([data-ui="friction"]) .grade.sug { background: var(--k-tint); border-color: var(--k-zone-line); }
:where([data-ui="friction"]) .toast { border-radius: var(--k-r-sm); }

/* Anmeldung und Registrierung (Desktop S. 2, Phone S. 1): das Formular auf Tinte, ohne Karte. */
:where([data-ui="friction"]) .auth-card { background: transparent; border-color: transparent; box-shadow: none; }
:where([data-ui="friction"]) .auth-card h1 { font-size: 2rem; }

/* Kohortenpuls der Lehrenden: die drei Stufen in der Skala (Teal, Sand, Glut), seit Warnungen neutral sind. */
:where([data-ui="friction"]) .cohort .kpi b.lv-mid { color: var(--k-lvmid); }
:where([data-ui="friction"]) .cohort .trk.lv-mid i { background: var(--k-lvmid); }

/* Menschen: Initialen in einem Ring (Desktop S. 2 bis 14). */
:where([data-ui="friction"]) .face { background: transparent; box-shadow: inset 0 0 0 1px var(--k-ink); color: var(--k-ink); }

/* ---- Bausteine für Phase 2a (Workout), in den Abläufen noch nicht benutzt ---- */
/* Die Temperaturskala als eigene Linie (Desktop S. 4 Phasen, Brandsheet). */
:where([data-ui="friction"]) .fx-heat { display: block; height: 3px; border-radius: 2px; background: var(--k-heat); }
/* Markenmoment für 2b (P01 Anmeldung, P11 Geschafft): der ganze Verlauf schräg, darauf Marke und Zeichnung in Tinte. */
:where([data-ui="friction"]) .fx-brand-panel { background: var(--k-heat-panel); color: var(--k-onsand); border-radius: var(--k-r); padding: 32px 28px; display: grid; gap: 28px; justify-items: start; }
:where([data-ui="friction"]) .fx-brand-panel img { display: block; height: auto; }
/* Nur „F.“ (Vorschau; in der Kopfzeile am Telefon über die Regel unten). */
:where([data-ui="friction"]) .fx-wm-only-short .fx-wm-full { display: none; }
:where([data-ui="friction"]) .fx-wm-only-short .fx-wm-short { display: block; }
/* Selbsteinschätzung „Geraten“ bis „Sicher“ (Desktop S. 7, S. 8; Phone S. 7): echte Radioknöpfe, als Reihe gleich
   breiter Felder; gewählt in Papier mit Tinte. Am Telefon brechen fünf Felder in zwei Zeilen um, Tippziel 44 px. */
:where([data-ui="friction"]) .fx-conf { border: 1px solid var(--k-line); border-radius: var(--k-r); padding: 16px 18px; margin: 0; display: grid; gap: 12px; background: var(--k-panel); min-width: 0; }
:where([data-ui="friction"]) .fx-conf legend { float: left; width: 100%; padding: 0; font-weight: 600; font-size: .95rem; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-conf-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.2rem, 1fr)); gap: 6px; clear: both; }
:where([data-ui="friction"]) .fx-conf-opt { position: relative; display: grid; }
:where([data-ui="friction"]) .fx-conf-opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
:where([data-ui="friction"]) .fx-conf-opt span { display: grid; place-items: center; min-height: 44px; padding: 6px 8px; border: 1px solid var(--k-line-strong); border-radius: var(--k-r-sm); font-weight: 600; font-size: .9rem; color: var(--k-muted-strong); text-align: center; }
:where([data-ui="friction"]) .fx-conf-opt input:checked + span { background: var(--k-segonbg); border-color: var(--k-segonbg); color: var(--k-page); }
:where([data-ui="friction"]) .fx-conf-opt input:focus-visible + span { outline: 2px solid var(--k-ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-conf-opt input:not(:checked):hover + span { border-color: var(--k-ink); color: var(--k-ink); } }
:where([data-ui="friction"]) .fx-conf-help { color: var(--k-muted); font-size: .82rem; }
/* Der Notizknopf (P06 bis P15, tokens.json fab 56 px): rund, Papier mit Tinte, rechts unten über der Tab-Leiste. */
:where([data-ui="friction"]) .fx-fab { position: fixed; right: 20px; bottom: 24px; z-index: 45; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--k-ink); color: var(--k-page); border: 0; cursor: pointer; text-decoration: none; }
:where([data-ui="friction"]) .fx-fab svg { width: 20px; height: 20px; }
:where([data-ui="friction"]) .fx-fab:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-fab:hover { filter: brightness(.92); text-decoration: none; } }
:where([data-ui="friction"]) .fx-fab:focus-visible { outline: 2px solid var(--k-ink); outline-offset: 3px; }

/* Telefon (tokens.json mobile_scale und space: h1 32, Titel 17, Rand 24 px, Karte 18 px, Feld und Aktion 52 px). */
@media (max-width: 700px) {
  :where([data-ui="friction"]) h1 { font-size: 32px; }
  :where([data-ui="friction"]) .gtitle { font-size: 32px; }
  :where([data-ui="friction"]) h2 { font-size: 17px; }
  :where([data-ui="friction"]) .card-t { font-size: 17px; }
  :where([data-ui="friction"]) .page-head .lede { font-size: 16px; }
  :where([data-ui="friction"]) .auth-brand .fx-wm { --fx-wm-w: 150px; }
  :where([data-ui="friction"]) .tb-brand .fx-wm { --fx-wm-w: 104px; }
  :where([data-ui="friction"]) :is(.wrap, .wrap-md, .wrap-sm) { padding-inline: 24px; }
  :where([data-ui="friction"]) .home { padding-inline: 24px; }
  :where([data-ui="friction"]) .thread { padding-inline: 24px; }
  :where([data-ui="friction"]) .page-head select.input { max-width: calc(100vw - 48px); }
  :where([data-ui="friction"]) .card { padding: 18px; }
  :where([data-ui="friction"]) :is(.input, .field input, .field select) { min-height: 52px; }
  :where([data-ui="friction"]) .send { width: 44px; height: 44px; border-radius: 50%; }
  /* Daniels Mindestmaß zum Tippen (tokens.json touch_min 44 px) auch für kleine Knöpfe, die Kopfzeile und die Orte. */
  :where([data-ui="friction"]) :is(.btn-sm, .tb .btn, .sb-item) { min-height: 44px; }
  :where([data-ui="friction"]) .fx-fab { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 16px; }
}
/* Am Telefon hat die Marke in der Kopfzeile den Platz des alten Zeichens (26 px, unter 32 px): nur „F.“, damit
   Brotkrumen und Knöpfe Platz behalten (iPhone SE: „Ava fragen“ brach sonst zweizeilig um, „Ava“ wurde zu „A“).
   Die ganze Marke steht auf der Startseite (ohne Brotkrumen), in der Seitenleiste und bei der Anmeldung. */
@media (max-width: 700px) {
  :where([data-ui="friction"]) .tb:not(.flat) .tb-brand .fx-wm-full { display: none; }
  :where([data-ui="friction"]) .tb:not(.flat) .tb-brand .fx-wm-short { display: block; }
  /* Brotkrumen geben zuerst nach, der Knopf oben rechts bleibt einzeilig („Ava fragen“ brach auf labs unter allen
     Looks zweizeilig um), und „Ava“ vor dem Kursnamen bleibt ganz (vorher „A.“); beides nur unter friction. */
  :where([data-ui="friction"]) .tb-left { flex: 1 1 0; }
  :where([data-ui="friction"]) .crumbs .here:has(~ .trunc) { flex: none; }
  :where([data-ui="friction"]) :is(.fx-sand, .thread-in > .msg-ava:not(#typing):not([aria-busy="true"]):not(:has(~ .msg-ava:not(#typing))) > .bubble > .md > p:last-child) { padding: 16px 18px; border-radius: 14px; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  :where([data-ui="friction"]) .typing i:first-child { animation: none; }
}

/* ---------- 13 Workout (Friction Phase 2a, 23.10.2026) ----------
   Daniels Workout-Screens (Desktop 7 bis 13, Phone 7 bis 11): ein Schritt je Bildschirm, die Frage auf Sand, die
   Phasen als Leiste in der Temperaturskala (Warm-up warm, Dialog im Verlauf, Cool-down kalt, Desktop S. 4), eigene
   Worte mit Teal-Kante (gespeicherte Position, Desktop S. 6 und S. 12), die Punkte als große Zahl. Nur unter
   friction; die anderen Looks zeigen dieselben Seiten schlicht mit ihren Grundklassen (Markup in
   core/templates/core/workout_*.html). Bausteine aus Abschnitt 12 (.fx-sand, .fx-conf) unverändert. */
:where([data-ui="friction"]) .wo-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 16px; }
:where([data-ui="friction"]) .wo-where { margin: 0; }
:where([data-ui="friction"]) .wo-points { grid-row: 1; grid-column: 2; margin: 0; color: var(--k-muted); font-size: .86rem; white-space: nowrap; }
:where([data-ui="friction"]) .wo-points b { color: var(--k-ink); font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 2px; }
/* Phasen: je eine Spur mit Beschriftung darunter; erledigt in Teal, die aktuelle in ihrer Temperatur. */
:where([data-ui="friction"]) .wo-phases { grid-column: 1 / -1; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
:where([data-ui="friction"]) .wo-sep { display: none; }
:where([data-ui="friction"]) .wo-ph { display: grid; gap: 6px; font-size: 11px; line-height: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where([data-ui="friction"]) .wo-ph b { font-weight: 600; color: var(--k-ink); }
:where([data-ui="friction"]) .wo-ph::before { content: ""; height: 4px; border-radius: 2px; background: var(--k-line); }
:where([data-ui="friction"]) .wo-ph-done::before { background: var(--k-t-teal); }
:where([data-ui="friction"]) .wo-ph-now::before { background: var(--k-ink); }
:where([data-ui="friction"]) .wo-ph-now { color: var(--k-ink); }
/* Fragen im Warm-up: eine Spur je Frage über dem Sandblock (Desktop S. 8). */
:where([data-ui="friction"]) .wo-steps { display: flex; gap: 6px; margin-bottom: -12px; }
:where([data-ui="friction"]) .wo-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--k-line); }
:where([data-ui="friction"]) .wo-steps .done { background: var(--k-t-teal); }
:where([data-ui="friction"]) .wo-steps .now { background: var(--k-ink); }
:where([data-ui="friction"]) .wo-q { font-size: 1.45rem; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; margin: 0; }
/* Mehrfachauswahl (Desktop S. 8, Phone S. 7): eine Karte je Möglichkeit, Buchstabe im Ring, gewählt mit Teal-Rand. */
:where([data-ui="friction"]) .wo-opts { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
:where([data-ui="friction"]) .wo-opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--k-line-strong); border-radius: var(--k-r); background: var(--k-panel); cursor: pointer; }
:where([data-ui="friction"]) .wo-opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
:where([data-ui="friction"]) .wo-key { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--k-line-strong); font-size: .8rem; font-weight: 600; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .wo-opt:has(input:checked) { border-color: var(--k-t-teal); box-shadow: inset 0 0 0 1px var(--k-t-teal); }
:where([data-ui="friction"]) .wo-opt:has(input:checked) .wo-key { border-color: var(--k-t-teal); color: var(--k-ink); }
:where([data-ui="friction"]) .wo-opt:has(input:focus-visible) { outline: 2px solid var(--k-ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .wo-opt:hover { border-color: var(--k-ink); } }
/* Eigene Worte: Teal-Kante (gespeicherte eigene Position). */
:where([data-ui="friction"]) .wo-own { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--k-label); color: var(--k-muted-strong); font-size: 1.02rem; }
:where([data-ui="friction"]) .wo-check { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 8px; }
:where([data-ui="friction"]) .wo-check .btn { min-height: 48px; justify-content: center; }
:where([data-ui="friction"]) .wo-verdict { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
:where([data-ui="friction"]) .wo-right { color: var(--k-okfg); }
:where([data-ui="friction"]) .wo-wrong { color: var(--k-dangerfg); }
:where([data-ui="friction"]) .wo-cal { margin: 0; color: var(--k-ink); }
:where([data-ui="friction"]) .wo-change { border: 0; padding: 0; margin: 0; min-width: 0; }
:where([data-ui="friction"]) .wo-change .check { min-height: 44px; display: flex; align-items: center; gap: 10px; }
:where([data-ui="friction"]) .wo-change .check input { width: 24px; height: 24px; flex: none; margin: 0; }
/* Geschafft (Desktop S. 13, Phone S. 11): große Versalien, die Zahl in Glut, die Übungen als Liste, eigene Worte mit
   Teal-Label. Ohne Liga, ohne „nur du“, ohne Lerngraph. */
:where([data-ui="friction"]) .wo-done-h { font-size: 3.4rem; line-height: .95; letter-spacing: -.04em; text-transform: uppercase; }
:where([data-ui="friction"]) .wo-score { display: grid; grid-template-columns: auto 1fr; gap: 8px 32px; align-items: start; }
:where([data-ui="friction"]) .wo-score .kpi { margin: 0; display: grid; }
:where([data-ui="friction"]) .wo-score .kpi b { font-size: 4.5rem; }
:where([data-ui="friction"]) .wo-score .kpi span { color: var(--k-ink); font-weight: 500; }
:where([data-ui="friction"]) .wo-score .help { grid-column: 1 / -1; margin: 0; }
:where([data-ui="friction"]) .wo-break { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
:where([data-ui="friction"]) .wo-break li { display: flex; justify-content: space-between; gap: 12px; color: var(--k-muted); font-size: .92rem; border-bottom: 1px solid var(--k-line); padding-bottom: 6px; }
:where([data-ui="friction"]) .wo-break li.got { color: var(--k-ink); }
:where([data-ui="friction"]) .wo-break b { font-variant-numeric: tabular-nums; font-weight: 600; }
:where([data-ui="friction"]) .wo-words { margin: 0; display: grid; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .wo-words > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--k-line); }
:where([data-ui="friction"]) .wo-words dt { font-size: 11px; line-height: 20px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--k-label); }
:where([data-ui="friction"]) .wo-words dd { margin: 0; }
/* Einstieg auf der Kursseite: ein kleiner Knopf unter der Sitzung, Tippziel 44 px. */
:where([data-ui="friction"]) .wo-entry { display: inline-flex; align-items: center; min-height: 36px; margin-top: 8px; padding: 6px 12px; border: 1px solid var(--k-line-strong); border-radius: var(--k-r-sm); color: var(--k-ink); font-weight: 600; font-size: .88rem; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .wo-entry:hover { border-color: var(--k-ink); text-decoration: none; } }
@media (pointer: coarse) { :where([data-ui="friction"]) .wo-entry { min-height: 44px; } }
/* Die Leiste über Reader und Gespräch (Workout im Dialog): eine Zeile, der Link als Tippziel. */
:where([data-ui="friction"]) .wo-bar { padding-top: 4px; padding-bottom: 4px; }
:where([data-ui="friction"]) .wo-bar a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--k-ink); text-decoration: underline; text-underline-offset: 3px; }
/* .fx-conf im Workout: WebKit (iOS Safari) setzt die gefloatete Legende aus Abschnitt 12 trotzdem auf den Rahmen
   (Chromium nicht); absolut gesetzt ist sie in beiden Engines keine „rendered legend“ und steht im Kasten. */
:where([data-ui="friction"]) .wo .fx-conf { position: relative; padding-top: 46px; }
:where([data-ui="friction"]) .wo .fx-conf legend { position: absolute; top: 16px; left: 18px; right: 18px; float: none; width: auto; }
/* Sicherheit im Workout: vier Felder in einer Reihe, auf schmalen Telefonen zwei mal zwei statt drei und eins. */
@media (max-width: 439px) { :where([data-ui="friction"]) .wo .fx-conf-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  :where([data-ui="friction"]) .wo-q { font-size: 1.25rem; }
  :where([data-ui="friction"]) .wo-ph { font-size: 0; gap: 0; }
  /* Nur die aktuelle Phase trägt ihren Namen, rechts unter den Spuren (Phone S. 7: „WARM-UP · 2/5“), damit er
     nicht über den Rand läuft, wenn die Phase die letzte ist. */
  :where([data-ui="friction"]) .wo-phases { position: relative; padding-bottom: 22px; }
  :where([data-ui="friction"]) .wo-ph-now { font-size: 11px; }
  :where([data-ui="friction"]) .wo-ph-now b { position: absolute; right: 0; bottom: 0; white-space: nowrap; }
  :where([data-ui="friction"]) .wo-bar { flex-wrap: nowrap; justify-content: space-between; padding: 2px 16px; }
  :where([data-ui="friction"]) :is(.wo-bar-sess, .wo-where .wo-title) { display: none; }
  /* Am Telefon die Aktion unten in voller Breite (Phone S. 7, S. 10), „Zurück“ darunter. */
  :where([data-ui="friction"]) .wo-acts { flex-direction: column-reverse; align-items: stretch; }
  :where([data-ui="friction"]) .wo-acts .btn { justify-content: center; min-height: 52px; }
  :where([data-ui="friction"]) .wo-acts > span:empty { display: none; }
  :where([data-ui="friction"]) .wo-done-h { font-size: 2.6rem; }
  :where([data-ui="friction"]) .wo-score { grid-template-columns: 1fr; }
  :where([data-ui="friction"]) .wo-words > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- 14 Heute und Rahmen (Friction, Klickdummy Phase 1, 27.10.2026) ----------
   Daniels Klickdummy (Konzept_Julian_Daniel/2026-10-27_FRICTION_Klickdummy, VIEWS.heute, sideHTML, tabbar, fab):
   Kurskarten nach Frist, Fristenstand, Termine der nächsten 14 Tage, Prüfungen mit Countdown, die Woche auf dem
   Desktop, Seitenleiste in Worten, der Notizknopf mit Zahl und Blatt. Markup in core/templates/core/heute.html,
   shell/_fx_side.html, shell/_fx_tabbar.html, shell/_fx_note.html; nur unter friction gerendert. Farben nur über
   die Tokens. Sand genau eine Stelle: nur die dringendste Karte mit Frist in höchstens zwei Tagen (.fx-h-dl.sand,
   core/heute.mark_focus); weitere in diesem Stand zeigen ihn in Worten mit einem Ring. Der Punkt für „offen“ und
   „heute fällig“ ist der warme Punkt der Marke (--k-dot), auf Papier steht Sand nur mit Rand (--k-sandedge). */
:where([data-ui="friction"]) .fx-h { max-width: 960px; padding: 0 24px 120px; display: flex; flex-direction: column; gap: 14px; }
:where([data-ui="friction"]) .fx-h-greet { display: flex; flex-direction: column; gap: 6px; padding-top: 22px; }
:where([data-ui="friction"]) .fx-h-greet h1 { font-size: 30px; line-height: 1.05; }
:where([data-ui="friction"]) .fx-h-date { font-size: 13px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-h-dateline { font-size: 13px; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where([data-ui="friction"]) .fx-h-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--k-dot); color: var(--k-onsand); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-h-avatar:hover { text-decoration: none; filter: brightness(1.05); } }
:where([data-ui="friction"]) .fx-h-sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
:where([data-ui="friction"]) .fx-h-sechead > span { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-h :is(ul, ol) { list-style: none; margin: 0; padding: 0; }

/* Kurskarten (Klickdummy .card.course): Titel und Frist oben, der Platz für den Fortschritt, das Workout mit seinen
   Phasen, die eine Aktion, die Gruppenzahl. Die erste offene Karte mit stärkerem Rand (.focus). */
:where([data-ui="friction"]) .fx-h-courses { display: flex; flex-direction: column; gap: 14px; }
:where([data-ui="friction"]) .fx-h-course { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
:where([data-ui="friction"]) .fx-h-course.focus { border-color: var(--k-line-strong); }
/* Daniels Home (23.10., 16_Home): die Karte, an der man gerade ist, mit dem Verlauf als Rand, wie „Als Nächstes“ auf der
   Kursseite (.fx-knext). Im ruhigen Modus bleibt der stärkere graue Rand (keine Skala). T-20261103-1228 Punkt 5. */
:where([data-ui="friction"]:not([data-calm])) .fx-h-course.focus { border: 2px solid transparent; padding: 17px; background: linear-gradient(var(--k-panel), var(--k-panel)) padding-box, var(--k-heat) border-box; }
:where([data-ui="friction"]) .fx-h-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
:where([data-ui="friction"]) .fx-h-title { font-size: 17px; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-h-title .fx-h-tlink { color: var(--k-ink); text-decoration: none; display: inline-block; min-height: 24px; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-h-title .fx-h-tlink:hover { text-decoration: underline; } }
:where([data-ui="friction"]) .fx-h-due { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-okfg); flex: none; }
/* Fristenstand (Klickdummy dl()): mehr als zwei Tage grau, höchstens zwei Tage hervorgehoben, heute oder vorbei mit dem
   warmen Punkt. */
:where([data-ui="friction"]) .fx-h-dl { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; text-align: right; }
:where([data-ui="friction"]) .fx-h-dl b { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--k-muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
:where([data-ui="friction"]) .fx-h-dl small { font-size: 12px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-h-dl:is(.now, .soon) b { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-h-dl:is(.now, .soon) b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
:where([data-ui="friction"]) .fx-h-dl.now b::before { background: var(--k-dot); }
:where([data-ui="friction"]) .fx-h-dl.soon b::before { box-shadow: inset 0 0 0 1.5px var(--k-ink); }
:where([data-ui="friction"]) .fx-h-dl.soon.sand b { color: var(--k-sand); }
:where([data-ui="friction"]) .fx-h-dl.soon.sand b::before { background: var(--k-sand); box-shadow: inset 0 0 0 1px var(--k-sandedge); }
:where([data-ui="friction"][data-np="paper"]) .fx-h-dl.soon.sand b { color: var(--k-ink); }
/* Der Platz für den Fortschritt (Klickdummy .rdy, ersetzt durch D-084): je Zahl eine Zeile mit Label, Spur in der
   Skala und Zahl („Lernziele geübt“, „Fragen sicher“, ohne beide „Workouts erledigt“). Die Spalten gehen über alle
   Zeilen, damit die Balken bündig beginnen. Im ruhigen Modus trägt die Spur keine Skala, nur Grau. */
:where([data-ui="friction"]) .fx-prog { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: center; gap: 8px 10px; }
:where([data-ui="friction"]) .fx-prog-r { display: contents; }
:where([data-ui="friction"]) .fx-prog-l { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-prog-trk { height: 5px; }
:where([data-ui="friction"]) .fx-prog-n { font-size: 12px; font-weight: 600; color: var(--k-muted-strong); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"][data-calm]) .fx-prog-trk { background: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-h-wo { display: flex; flex-direction: column; gap: 6px; }
:where([data-ui="friction"]) .fx-h-wot { font-size: 14px; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-h-phases { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-h-phases li { display: inline-flex; align-items: center; gap: 5px; }
:where([data-ui="friction"]) .fx-h-phases li.now { color: var(--k-ink); font-weight: 600; }
:where([data-ui="friction"]) .fx-h-phases li.done { color: var(--k-muted-strong); }
/* Über jeder Phase ein kleiner Balken (Daniels v3 .ph3>div>i, 28.10.2026), so breit wie Haken und Wort: erledigt in
   Türkis wie der Haken, die laufende in Tinte, die offenen als Linie. Absolut gesetzt, damit die Breite jeder Phase und
   damit die gemessenen Grenzen für den Umbruch unten bleiben. Im ruhigen Modus wie sonst: keine Skala, kein Sand. */
:where([data-ui="friction"]) .fx-h-phases li { position: relative; padding-top: 9px; }
:where([data-ui="friction"]) .fx-h-phases li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--k-line-strong); }
:where([data-ui="friction"]) .fx-h-phases li.now::before { background: var(--k-ink); }
:where([data-ui="friction"]) .fx-h-phases li.done::before { background: var(--k-okfg); }
/* Farbig wie Daniels Home (23.10., 16_Home: erledigt warm, die laufende vom Türkis ins Warme, offen als Linie), auf
   Tinte; auf Papier (Friction hell, Skala unter 3 : 1) und im ruhigen Modus wie oben. T-20261103-1228 Punkt 5. */
:where([data-ui="friction"]:not([data-np="paper"]):not([data-calm])) .fx-h-phases li.done::before { background: var(--k-t-warm); }
:where([data-ui="friction"]:not([data-np="paper"]):not([data-calm])) .fx-h-phases li.now::before { background: linear-gradient(90deg, var(--k-t-teal), var(--k-t-warm)); }
:where([data-ui="friction"]) .fx-h-ok { width: 14px; height: 14px; color: var(--k-okfg); flex: none; }
/* Passen die Phasen nicht in eine Zeile, brechen sie gleichmäßig, nie mit einer Phase allein (D-077, 393 px: „Dialog“
   stand in der zweiten Zeile): fünf als zwei und drei, vier als zwei und zwei, Reihenfolge und Haken wie gehabt. Es
   entscheidet die Breite der Karte, nicht die des Fensters (Telefon und die schmalen Karten auf dem Desktop); die
   Grenzen sind die längste Zeile mit allen Haken, gemessen in WebKit, Deutsch und Englisch. Unter 240 px eine Stufe
   kleiner in der Skala. */
:where([data-ui="friction"]) .fx-h-wo { container: fx-wo / inline-size; }
@container fx-wo (max-width: 459px) {
  :where([data-ui="friction"]) .fx-h-phases.n5 { row-gap: 8px; }
  :where([data-ui="friction"]) .fx-h-phases.n5::before { content: ""; flex-basis: 100%; height: 0; order: 1; }
  :where([data-ui="friction"]) .fx-h-phases.n5 > li:nth-child(n+3) { order: 2; }
}
@container fx-wo (max-width: 369px) {
  :where([data-ui="friction"]) .fx-h-phases.n4 { row-gap: 8px; }
  :where([data-ui="friction"]) .fx-h-phases.n4::before { content: ""; flex-basis: 100%; height: 0; order: 1; }
  :where([data-ui="friction"]) .fx-h-phases.n4 > li:nth-child(n+3) { order: 2; }
}
@container fx-wo (max-width: 239px) {
  :where([data-ui="friction"]) .fx-h-phases { font-size: 12px; column-gap: 12px; }
}
:where([data-ui="friction"]) .fx-h-meta { font-size: 13px; color: var(--k-muted); display: none; }
:where([data-ui="friction"]) .fx-h-go { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; font-weight: 600; }
:where([data-ui="friction"]) .fx-h-cohort { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-h-empty { padding: 18px; display: grid; gap: 12px; }

/* Termine, nächste 14 Tage (Klickdummy .agday, .ag): Tag als Zeile mit Linie, je Eintrag Zeit, Art und Text. */
:where([data-ui="friction"]) .fx-h-agenda, :where([data-ui="friction"]) .fx-h-exams { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
:where([data-ui="friction"]) .fx-h-agday { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--k-muted); padding: 14px 0 4px; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-h-agday.today { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-h-ag { display: grid; grid-template-columns: 42px 104px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 0; }
:where([data-ui="friction"]) .fx-h-agt { font-size: 13px; color: var(--k-muted-strong); padding-top: 1px; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-h-kind { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted); border: 1px solid var(--k-line-strong); border-radius: 999px; padding: 3px 8px; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where([data-ui="friction"]) .fx-h-kind.lec { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-h-kind.exam { color: var(--k-label); border-color: var(--k-label); }
:where([data-ui="friction"]) .fx-h-agb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:where([data-ui="friction"]) .fx-h-agc { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-h-agc > span { font-weight: 400; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-h-ags-sub { font-size: 12px; color: var(--k-muted); }

/* Prüfungen mit Countdown (Klickdummy .exam): Tage im Kasten, daneben Kurs, Datum und Hinweis. */
:where([data-ui="friction"]) .fx-h-exam { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-h-when { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border: 1px solid var(--k-line-strong); border-radius: 12px; }
:where([data-ui="friction"]) .fx-h-when b { font-size: 20px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-h-when span { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-h-exb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:where([data-ui="friction"]) .fx-h-ext { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-h-exd { font-size: 13px; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-h-exn { font-size: 12px; color: var(--k-muted); }

/* Termine nach Wochen (Desktop S1b, Klickdummy .agwk, .agd, .agi): die Woche als Zeile über ihren Tagen, ein
   erledigtes Workout mit Haken statt Uhrzeit, gedämpft. Am Telefon bleibt der Tag eine Zeile wie in Phase 1
   (.fx-h-agday), die Datumsspalte (.fx-h-agdate) erscheint erst auf dem Desktop; „erledigt“ steht dort neben dem
   Haken und am Telefon nur für Screenreader (die Spalte ist 42 px breit). */
:where([data-ui="friction"]) .fx-h-mine { display: flex; flex-direction: column; gap: 14px; }
:where([data-ui="friction"]) .fx-h-desk { display: none; }
:where([data-ui="friction"]) .fx-h-agwk { display: flex; flex-direction: column; }
:where([data-ui="friction"]) .fx-h-agwkh { padding: 14px 0 2px; }
:where([data-ui="friction"]) .fx-h-agdate { display: none; }
:where([data-ui="friction"]) .fx-h-ag.ok .fx-h-agt { color: var(--k-okfg); display: inline-flex; align-items: center; gap: 4px; }
:where([data-ui="friction"]) .fx-h-ag.ok .fx-h-agt .fx-h-ok { width: 13px; height: 13px; }
:where([data-ui="friction"]) .fx-h-ag.ok :is(.fx-h-agc, .fx-h-agc > span, .fx-h-kind) { color: var(--k-muted); }

/* Seitenleiste (Klickdummy #side, Desktop S1b): die fünf Orte mit den Symbolen der Tab-Leiste, „Meine Kurse“ mit
   Kürzel, Titel und Stand in Worten (core/heute.side_courses), unten Hilfe, Feedback und Abmelden in zweiter Ordnung.
   Der Stand wie die Frist auf der Karte: heute fällig oder vorbei mit dem warmen Punkt, bald mit Ring, erledigt in
   Türkis; Sand nur auf Heute (eine Stelle je Bildschirm). Im ruhigen Modus der Stand „plain“: gedämpft, ohne Punkt. */
:where([data-ui="friction"]) .fx-side { display: flex; flex-direction: column; gap: 2px; }
:where([data-ui="friction"]) .fx-side .sb-item { gap: 12px; }
:where([data-ui="friction"]) .fx-side .sb-item > .ico { width: 18px; height: 18px; flex: none; }
:where([data-ui="friction"]) .fx-side .sb-item > span:not(.fx-cnt) { flex: 1; }
:where([data-ui="friction"]) .fx-side-b .sb-item { justify-content: space-between; }
:where([data-ui="friction"]) .fx-side-courses { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-side-courses .sb-label { margin: 0; padding: 0 12px 6px; }
:where([data-ui="friction"]) .fx-crs { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 7px 10px; border-radius: var(--k-r-sm); color: var(--k-ink); text-decoration: none; min-width: 0; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-crs:hover { background: var(--k-chat); text-decoration: none; } }
:where([data-ui="friction"]) .fx-crs.on { background: var(--k-chat); }
:where([data-ui="friction"]) .fx-cb { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid var(--k-line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-ct { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
:where([data-ui="friction"]) .fx-ct b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where([data-ui="friction"]) .fx-st { font-size: 12px; color: var(--k-muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
:where([data-ui="friction"]) .fx-st:is(.now, .soon) { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-st:is(.now, .soon)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
:where([data-ui="friction"]) .fx-st.now::before { background: var(--k-dot); }
:where([data-ui="friction"]) .fx-st.soon::before { box-shadow: inset 0 0 0 1.5px var(--k-ink); }
/* Die eine dringendste Frist in höchstens zwei Tagen (heute.side_courses, dieselbe wie die Sand-Karte auf Heute) mit
   gefülltem Sandpunkt wie in Daniels Seitenleiste (16_Home); weitere behalten den Ring. T-20261103-1228 Punkt 5. */
:where([data-ui="friction"]) .fx-st.soon.sand::before { background: var(--k-sand); box-shadow: inset 0 0 0 1px var(--k-sandedge); }
:where([data-ui="friction"]) .fx-st.ok { color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-cnt { font-size: 11px; color: var(--k-muted); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-side-b { display: flex; flex-direction: column; gap: 0; }
:where([data-ui="friction"]) .fx-side-b .sb-item { font-size: 13px; color: var(--k-muted-strong); min-height: 36px; padding: 6px 12px; }
:where([data-ui="friction"]) .fx-logout { border: 0; background: none; font: inherit; cursor: pointer; text-align: left; width: 100%; }
/* „Hilfe“ oben auf „Ich“ (D-077): ohne eigene Taste ist sie so von jeder Taste aus zwei Tipps entfernt. */
:where([data-ui="friction"]) .fx-help { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 14px 18px; color: var(--k-ink); font-weight: 600; text-decoration: none; }
:where([data-ui="friction"]) .fx-help > span { flex: 1; min-width: 0; }
:where([data-ui="friction"]) .fx-help svg { width: 20px; height: 20px; color: var(--k-muted); flex: none; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-help:hover { text-decoration: none; border-color: var(--k-line-strong); } }

/* Notizknopf mit Zahl (Klickdummy .fab, .nbadge) und Blatt; die Zahl in Türkis, der einzigen Hervorhebung. */
:where([data-ui="friction"]) .fx-nbadge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--k-label); color: var(--k-page); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--k-page); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-nbadge.pop { animation: fx-nbpop .35s ease-out; }
@keyframes fx-nbpop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
:where([data-ui="friction"]) .fx-note-live { position: fixed; right: 16px; bottom: 96px; z-index: 46; margin: 0; padding: 10px 14px; border-radius: var(--k-r-sm); background: var(--k-ink); color: var(--k-page); font-size: 14px; max-width: min(320px, calc(100vw - 32px)); }
:where([data-ui="friction"]) .fx-note-live:empty { display: none; }
/* Block statt Grid: als Grid setzt WebKit in iOS 18 die Legende auf ihre kleinste Breite („Zu / welchem / Kurs?“). */
:where([data-ui="friction"]) .fx-note-courses { border: 0; padding: 0; margin: 0; display: block; min-width: 0; }
:where([data-ui="friction"]) .fx-note-courses legend { padding: 0; font-size: .86rem; color: var(--k-muted-strong); margin-bottom: 8px; }
:where([data-ui="friction"]) .fx-note-opts { display: grid; gap: 6px; }
:where([data-ui="friction"]) .fx-note-opt { position: relative; display: grid; }
:where([data-ui="friction"]) .fx-note-opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
:where([data-ui="friction"]) .fx-note-opt > span { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--k-line-strong); border-radius: var(--k-r-sm); color: var(--k-muted-strong); font-weight: 500; min-width: 0; }
:where([data-ui="friction"]) .fx-note-opt small { font-size: 12px; color: inherit; flex: none; }
:where([data-ui="friction"]) .fx-note-opt input:checked + span { background: var(--k-segonbg); border-color: var(--k-segonbg); color: var(--k-page); }
:where([data-ui="friction"]) .fx-note-opt input:focus-visible + span { outline: 2px solid var(--k-ink); outline-offset: 2px; }
:where([data-ui="friction"]) .fx-note-msg:empty { display: none; }
:where([data-ui="friction"]) .fx-note-msg { color: var(--k-dangerfg); font-size: 14px; }

/* Kursseite (Desktop S1b, Klickdummy VIEWS.kurs: .kh, .kgrid, .kcard, .knext, .wrow, .kstat, .kag, .inprev; Markup
   core/templates/core/fx_course.html): Kopf, darunter die Reiter, im Überblick links der nächste Schritt und alle
   Sitzungen als Workouts, rechts der eigene Stand, Prüfungen, Termine und Notizen; zwei Spalten ab 1100 px wie im
   Klickdummy. „Als Nächstes“ mit dem Verlauf als Rand (ganz, kalt nach heiß). Die Zeile des nächsten Schritts gehoben,
   ihr Stand wie in der Seitenleiste (.fx-st), ohne Sand: Sand trägt hier nur die Frist auf „Als Nächstes“. */
:where([data-ui="friction"]) .fx-k { max-width: 1100px; padding: 0 24px 120px; display: flex; flex-direction: column; gap: 16px; }
:where([data-ui="friction"]) .fx-k :is(ul, ol) { list-style: none; margin: 0; padding: 0; }
:where([data-ui="friction"]) .fx-kh { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
:where([data-ui="friction"]) .fx-kback { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; font-size: 13px; color: var(--k-muted); text-decoration: none; align-self: flex-start; }
:where([data-ui="friction"]) .fx-kback .ico { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-kback:hover { color: var(--k-ink); text-decoration: none; } }
:where([data-ui="friction"]) .fx-kh h1 { font-size: 28px; line-height: 1.05; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-kmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 14px; color: var(--k-muted-strong); }
/* Leiste des Kursverlaufs im Kopf (Daniels v3 .crs-strip, .crs-lab; core/heute.course_strip): eine Zelle je Woche mit
   ihrer Nummer, die laufende in Tinte, „P“ für die Prüfung mit Rand; darunter Start, Zahl der Wochen und das Datum der
   Prüfung. Zwei Ziffern brauchen 15 px Zelle (WebKit): mehr als 14 Wochen (.long) zeigen ihre Zahlen erst ab 320 px
   Breite der Leiste, mehr als 16 (.dense) erst ab 560 px; darunter bleiben die Zellen ohne Zahl. */
:where([data-ui="friction"]) .fx-kstrip { display: flex; flex-direction: column; gap: 6px; max-width: 520px; margin-top: 2px; container: fx-ks / inline-size; }
:where([data-ui="friction"]) .fx-kstrip-c { display: flex; gap: 3px; align-items: center; }
:where([data-ui="friction"]) .fx-kstrip-c span { height: 26px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-kstrip-c .w { flex: 1; min-width: 0; overflow: hidden; background: var(--k-chat); border: 1px solid var(--k-line); color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kstrip-c .w.now { background: var(--k-ink); border-color: var(--k-ink); color: var(--k-panel); }
:where([data-ui="friction"]) .fx-kstrip-c .p { flex: none; width: 26px; font-size: 11px; border: 1.5px solid var(--k-ink); color: var(--k-ink); }
:where([data-ui="friction"]) .fx-kstrip-l { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; font-size: 11px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kstrip-l > :nth-child(2) { text-align: center; }
:where([data-ui="friction"]) .fx-kstrip-l > :nth-child(3) { text-align: right; }
@container fx-ks (max-width: 559px) {
  :where([data-ui="friction"]) .fx-kstrip.dense .w { font-size: 0; }
}
@container fx-ks (max-width: 319px) {
  :where([data-ui="friction"]) .fx-kstrip.long .w { font-size: 0; }
}
:where([data-ui="friction"]) .fx-kgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
:where([data-ui="friction"]) .fx-kcol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
:where([data-ui="friction"]) .card.fx-kcard { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
:where([data-ui="friction"]) .fx-ksech { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
:where([data-ui="friction"]) .fx-ksech h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
:where([data-ui="friction"]) .fx-ksech > span { font-size: 12px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .card.fx-knext { border: 2px solid transparent; background: linear-gradient(var(--k-panel), var(--k-panel)) padding-box, var(--k-heat) border-box; }
:where([data-ui="friction"]) .fx-knext .eyebrow { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-kt { font-size: 20px; font-weight: 600; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-wrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-wn { font-size: 13px; font-weight: 600; color: var(--k-muted); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-wt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:where([data-ui="friction"]) .fx-wt > :is(a, b) { display: block; min-height: 24px; line-height: 24px; font-size: 15px; font-weight: 500; color: var(--k-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-wt > a:hover { text-decoration: underline; } }
:where([data-ui="friction"]) .fx-wt small { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-wt .snotes { margin-top: 4px; font-size: 13px; }
:where([data-ui="friction"]) .fx-ws { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-ws .fx-h-ok { width: 13px; height: 13px; }
:where([data-ui="friction"]) .fx-wrow.done .fx-ws { color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-wrow.done .fx-wt > a { color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-wrow:is(.lock, .plain) .fx-wt > b { color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-wrow.lock .fx-wt > b { color: var(--k-muted); }
:where([data-ui="friction"]) .fx-wrow.cur { margin: 0 -12px; padding: 11px 12px; border-radius: 10px; border-top-color: transparent; background: var(--k-chat); }
:where([data-ui="friction"]) .fx-wrow.cur + .fx-wrow { border-top-color: transparent; }
:where([data-ui="friction"]) .fx-wrow.cur .fx-wn { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-kstat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--k-line); border-radius: 12px; }
:where([data-ui="friction"]) .fx-kstat b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-kstat span { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) :is(.fx-knote, .fx-kempty) { margin: 0; font-size: 13px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kexams .fx-h-exam:first-child { border-top: 0; padding-top: 0; }
:where([data-ui="friction"]) .fx-kag { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--k-line); font-size: 14px; }
:where([data-ui="friction"]) .fx-kd { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kd b { display: block; font-size: 14px; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-kx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:where([data-ui="friction"]) .fx-kx > b { font-weight: 600; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-kx .fx-h-kind { display: inline-block; margin-left: 4px; padding: 1px 7px; vertical-align: 1px; }
:where([data-ui="friction"]) .fx-kx small { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kag.ok .fx-kx > b { color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kag.ok .fx-kx small { color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-kprev { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-kprev span { font-size: 11px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kprev p { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:where([data-ui="friction"]) .fx-klink { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-klink .ico { width: 15px; height: 15px; }
:where([data-ui="friction"]) .fx-kfoot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-kfoot p { margin: 0; }

@media (min-width: 900px) {
  :where([data-ui="friction"]) .fx-h { padding: 0 40px 60px; }
  :where([data-ui="friction"]) .fx-h-greet h1 { font-size: 36px; }
  :where([data-ui="friction"]) .fx-h-greet .fx-h-date { display: none; }
  :where([data-ui="friction"]) .fx-h-desk { display: flex; }
  :where([data-ui="friction"]) .fx-h-mine { padding-top: 8px; }
  :where([data-ui="friction"]) :is(.fx-h-agenda, .fx-h-exams) { padding-top: 26px; gap: 12px; }
  :where([data-ui="friction"]) .fx-h-sechead h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; text-transform: none; color: var(--k-ink); }
  :where([data-ui="friction"]) .fx-h-sechead > span { font-size: 13px; }
  :where([data-ui="friction"]) .fx-h-agwk + .fx-h-agwk { margin-top: 18px; }
  :where([data-ui="friction"]) .fx-h-agwkh { padding: 0 0 8px; }
  :where([data-ui="friction"]) .fx-h-agd { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--k-line); }
  :where([data-ui="friction"]) .fx-h-agwk .fx-h-agd:last-child { border-bottom: 1px solid var(--k-line); }
  :where([data-ui="friction"]) .fx-h-agdate { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
  :where([data-ui="friction"]) .fx-h-agdate span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted); }
  :where([data-ui="friction"]) .fx-h-agdate b { font-size: 24px; font-weight: 600; color: var(--k-muted-strong); font-variant-numeric: tabular-nums; }
  :where([data-ui="friction"]) .fx-h-agdate em { margin-top: 3px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--k-ink); }
  :where([data-ui="friction"]) .fx-h-agd.today .fx-h-agdate b { color: var(--k-ink); }
  :where([data-ui="friction"]) .fx-h-agday { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  :where([data-ui="friction"]) .fx-h-ags { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  :where([data-ui="friction"]) .fx-h-ag { grid-template-columns: 86px 96px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 0; }
  :where([data-ui="friction"]) .fx-h-agt { font-size: 14px; }
  :where([data-ui="friction"]) .fx-h-agc { font-size: 15px; }
  :where([data-ui="friction"]) .fx-h-ags-sub { font-size: 13px; }
  :where([data-ui="friction"]) .fx-k { padding: 0 40px 60px; }
  :where([data-ui="friction"]) .fx-kh h1 { font-size: 34px; }
  :where([data-ui="friction"]) .card.fx-kcard { padding: 20px; }
  :where([data-ui="friction"]) .fx-h-meta { display: block; }
  :where([data-ui="friction"]) .fx-h-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  :where([data-ui="friction"]) .fx-h-course .fx-h-go { margin-top: auto; }
}
@media (min-width: 1100px) {
  :where([data-ui="friction"]) .fx-kgrid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}
@media (max-width: 899px) {
  :where([data-ui="friction"]) .fx-h-dateline { display: none; }
  :where([data-ui="friction"]) .fx-h-agdone { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
@media (max-width: 700px) {
  :where([data-ui="friction"]) .fx-h { padding: 0 24px 140px; }
  :where([data-ui="friction"]) .fx-k { padding: 0 24px 140px; }
  /* Am Telefon bricht der Titel einer Sitzung um, statt mit „…“ zu enden: die Spalte für den Stand nimmt Platz. */
  :where([data-ui="friction"]) .fx-wt > :is(a, b) { white-space: normal; overflow-wrap: anywhere; }
  :where([data-ui="friction"]) .fx-note-live { bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
  /* Ava als Taste (D-077): Eingabe und KI-Hinweis stehen über der Tab-Leiste (60 px), auch als Web-App auf dem
     Home-Bildschirm, wo die Leiste um den Home-Indicator wächst. */
  :where([data-ui="friction"]) .pg-main.fill { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  /* Die Zeilen zum Wischen für Vorschläge und Kurse im allgemeinen Gespräch gelten seit 27.10. unter jedem Look
     (Abschnitt 9, .chips.r-scroll-x). */
  /* Das Blatt am Telefon unten, über die ganze Breite, mit runden Ecken oben (Klickdummy .sheet). */
  :where([data-ui="friction"]) dialog.fx-note-dlg { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 380px) {
  :where([data-ui="friction"]) :is(.fx-h, .fx-k) { padding-inline: 16px; }
  :where([data-ui="friction"]) .fx-h-ag { grid-template-columns: 38px 96px minmax(0, 1fr); gap: 6px; }
  :where([data-ui="friction"]) .fx-h-kind { letter-spacing: .06em; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  :where([data-ui="friction"]) .fx-nbadge.pop { animation: none; }
}
/* Kurzer Text vor dem Termin (D-098, 28.10.2026; core/_fx_handin.html): auf der Karte und in „Als Nächstes“ je Abgabe
   eine Zeile als Link: Art und Sitzung klein, rechts daneben Lane As Etikett („Schreiben“ oder „abgegeben“), darunter
   über die ganze Breite die Aufgabe in zwei Zeilen, Frist als Datum und Stand (die Karte ist auf dem Desktop schmal).
   Bei den Terminen ein kleiner Knopf wie „Beitreten“. Kein Sand, kein Countdown, kein Glutpunkt. */
:where([data-ui="friction"]) .fx-hand { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
:where([data-ui="friction"]) .fx-hand-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--k-line-strong); border-radius: 12px; color: var(--k-ink); text-decoration: none; }
:where([data-ui="friction"]) .fx-hand-e { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-hand-st { display: inline-flex; align-items: center; gap: 6px; }
:where([data-ui="friction"]) .fx-hand-n { white-space: nowrap; }
:where([data-ui="friction"]) .fx-hand-st .ico { width: 16px; height: 16px; flex: none; color: var(--k-muted); }
:where([data-ui="friction"]) :is(.fx-hand-t, .fx-hand-s) { grid-column: 1 / -1; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-hand-t { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:where([data-ui="friction"]) .fx-hand-s { font-size: 12px; line-height: 1.45; color: var(--k-muted-strong); }
:where([data-ui="friction"]) :is(.fx-h-ags, .fx-kx) .fx-h-hbtn { align-self: flex-start; margin-top: 6px; }
:where([data-ui="friction"]) .fx-h-hbtn .fx-h-ok { margin-right: 2px; }
@media (hover: hover) and (pointer: fine) {
  :where([data-ui="friction"]) .fx-hand-a:hover { border-color: var(--k-ink); text-decoration: none; }
  :where([data-ui="friction"]) .fx-hand-a:hover .fx-hand-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}

/* ---------- 15 Lehrende unter Friction (L1 Lehrraum, 28.10.2026) ----------
   Daniels Lehrenden-Klickdummy v3 (Konzept_Julian_Daniel/2026-10-27_FRICTION_Klickdummy/friction_lehrende_klickdummy_v3.html:
   .sb-role, .db, .db-hd, .db-grid, .w, .w-h, .w-todo, .w-tr, .w-list, .w-recs, .w-note). Die Seitenleiste der
   Lehrenden (shell/_fx_side_prof.html) nimmt die Bausteine aus Abschnitt 14, dazu die Zeile „Für Lehrende“. Die
   Übersicht (core/prof_dash.html): Widgets als Karten, ab 900 px in zwei Spalten, „Aufgaben“ über die ganze Breite und
   ab 1100 px selbst zweispaltig, links die Termine, rechts die übrigen übereinander (.fx-db-col, sonst bliebe neben der
   langen Terminliste eine Lücke); darunter eine Spalte. Kein Sand: der bleibt der Frist auf der einen Karte der
   Studierenden (Abschnitt 14, test_heute). Daniels Sand an der Zahl dringender Aufgaben (.w-badge.u) wird hier Tinte
   auf Papier wie .sb-count.warn, ein dringender Eintrag trägt den warmen Punkt. Links in Tinte, Blau nur für Knöpfe. */
:where([data-ui="friction"]) .fx-side-role { margin: -4px 12px 14px; font-size: 10px; line-height: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-db { max-width: 1240px; padding: 0 24px 48px; display: flex; flex-direction: column; gap: 18px; }
:where([data-ui="friction"]) .fx-db-hd { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; }
:where([data-ui="friction"]) .fx-db-hd h1 { font-size: 30px; line-height: 1.05; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-db-hd p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--k-muted-strong); max-width: 640px; }
:where([data-ui="friction"]) .fx-db-hd p b { color: var(--k-ink); font-weight: 600; }
:where([data-ui="friction"]) .fx-db-hd form { margin-top: 6px; }
:where([data-ui="friction"]) .fx-db-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
:where([data-ui="friction"]) .fx-db-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
:where([data-ui="friction"]) .fx-w { border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-panel); display: flex; flex-direction: column; min-width: 0; }
:where([data-ui="friction"]) .fx-w-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-w-h h2 { margin: 0; flex: 1; min-width: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
:where([data-ui="friction"]) .fx-w-ic { width: 16px; height: 16px; flex: none; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-w-meta { font-size: 12px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-w-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--k-chat); color: var(--k-ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-w-badge.u { background: var(--k-ink); color: var(--k-page); }
:where([data-ui="friction"]) .fx-w-b { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
:where([data-ui="friction"]) .fx-w-b :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
:where([data-ui="friction"]) :is(.fx-w-empty, .fx-w-foot, .fx-w-sub) { margin: 0; font-size: 13px; line-height: 1.45; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-w-sub { color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-w-empty { display: flex; gap: 6px; align-items: center; padding: 4px 0; }
:where([data-ui="friction"]) .fx-w-empty .fx-h-ok { width: 13px; height: 13px; flex: none; color: var(--k-okfg); }
:where([data-ui="friction"]) :is(.fx-w-more, .fx-w-act) { display: inline-flex; align-items: center; min-height: 24px; font-size: 13px; font-weight: 600; color: var(--k-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
:where([data-ui="friction"]) .fx-w-more { align-self: flex-start; font-size: 14px; }
:where([data-ui="friction"]) .fx-w-todo { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 28px; }
:where([data-ui="friction"]) .fx-w-todo li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--k-line); font-size: 14px; min-width: 0; }
:where([data-ui="friction"]) .fx-w-todo li:first-child { border-top: 0; }
:where([data-ui="friction"]) .fx-w-mark { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--k-line-strong); }
:where([data-ui="friction"]) .fx-w-todo li.u .fx-w-mark { background: var(--k-dot); box-shadow: none; }
:where([data-ui="friction"]) .fx-w-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
:where([data-ui="friction"]) .fx-w-tx b { font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-w-todo li.u .fx-w-tx b { font-weight: 600; }
:where([data-ui="friction"]) .fx-w-tx small { font-size: 12px; line-height: 1.4; color: var(--k-muted); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-w-tx > a { display: inline-flex; align-items: center; min-height: 24px; font-weight: 500; line-height: 1.35; color: var(--k-ink); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-w-tr { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 44px; padding: 8px 6px; margin: 0 -6px; border-radius: 10px; color: var(--k-ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { :where([data-ui="friction"]) .fx-w-tr:hover { background: var(--k-chat); text-decoration: none; } }
:where([data-ui="friction"]) .fx-w-tr.today { background: var(--k-chat); }
:where([data-ui="friction"]) .fx-w-tr + .fx-w-tr { border-top: 1px solid var(--k-line); border-radius: 0; }
:where([data-ui="friction"]) .fx-w-tr.today + .fx-w-tr { border-top-color: transparent; }
:where([data-ui="friction"]) .fx-w-td { display: flex; flex-direction: column; align-items: center; line-height: 1; }
:where([data-ui="friction"]) .fx-w-td b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-w-td small { margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-w-tt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
:where([data-ui="friction"]) .fx-w-tt b { max-width: 100%; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where([data-ui="friction"]) .fx-w-tt small { font-size: 12px; color: var(--k-muted); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-w-tt .fx-h-kind { padding: 1px 7px; }
:where([data-ui="friction"]) .fx-w-ts { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-w-ts.ok { color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-w-ts .fx-h-ok { width: 12px; height: 12px; }
:where([data-ui="friction"]) .fx-w-b .fx-w-recs { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.4; }
:where([data-ui="friction"]) .fx-w-recs li::marker { color: var(--k-muted); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-w-list li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--k-line); font-size: 14px; min-width: 0; }
:where([data-ui="friction"]) .fx-w-list li:first-child { border-top: 0; }
:where([data-ui="friction"]) .fx-w-loose { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-w-note { width: 100%; min-height: 120px; resize: vertical; line-height: 1.5; }
:where([data-ui="friction"]) .fx-w-noterow { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
@media (pointer: coarse) {
  :where([data-ui="friction"]) :is(.fx-w-more, .fx-w-act) { min-height: 44px; }
}
@media (min-width: 900px) {
  :where([data-ui="friction"]) .fx-db { padding: 0 40px 60px; }
  :where([data-ui="friction"]) .fx-db-hd h1 { font-size: 40px; }
  :where([data-ui="friction"]) .fx-db-hd .fx-h-date { display: none; }
  :where([data-ui="friction"]) .fx-db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where([data-ui="friction"]) .fx-w-all { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  :where([data-ui="friction"]) .fx-w-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where([data-ui="friction"]) .fx-w-todo li:nth-child(2) { border-top: 0; }
}
@media (max-width: 700px) {
  /* Am Telefon steht die Aktion unter dem Text der Aufgabe, sonst bliebe dem Text ein Drittel der Breite (SE). */
  :where([data-ui="friction"]) .fx-w-todo li { flex-wrap: wrap; row-gap: 2px; }
  :where([data-ui="friction"]) .fx-w-todo .fx-w-tx { flex-basis: calc(100% - 20px); }
  :where([data-ui="friction"]) .fx-w-todo .fx-w-act { margin-left: 20px; }
}
@media (max-width: 380px) {
  :where([data-ui="friction"]) .fx-db { padding-inline: 16px; }
  :where([data-ui="friction"]) .fx-w-tr { grid-template-columns: 34px minmax(0, 1fr); }
  :where([data-ui="friction"]) .fx-w-ts { grid-column: 2; }
}

/* ---------- 16 Semesterplan der Lehrenden unter Friction (L8, 28.10.2026) ----------
   Daniels Lehrenden-Klickdummy v3 (Semesterplan: .pl-gs, .pl-tile, .pl-leg, .pl-thead, .pl-row, .pl-c-date, .pl-c-p,
   .pl-ms, .pl-c-w, .pl-c-s, .pl-det, .pl-flow, .pl-step, .pl-dt, .pl-lib). Markup core/prof_plan.html, Daten
   core/semester_plan.py, Zellen der Zeile core/templatetags/plan_tags.py. Lane A legte den ersten Stand, Lane E den
   Look (28.10.2026): ist die Liste 720 px breit oder breiter (Container fx-pl; ein Laptop mit 1280 px neben Seitenleiste
   und Dokumenten), wird sie Daniels Tabelle mit Datum,
   Termin, Vorbereitung, Workout danach und Status; schmaler bleibt jeder Termin eine Karte, die dieselben Zellen
   untereinander stellt, und nichts rollt seitwärts. Aufgeklappt drei Schritte: Vorher, Im Termin, Danach (schmal
   untereinander). Je Art der Vorbereitung eine Farbe, wie Daniel sie setzt (Lesen grau, Beispiel Apricot, Kurzer Text
   Glut); die eigene Lektüre trägt Türkis statt Sand, denn Sand bleibt der einen Frage (Abschnitt 14). Dunkel die Töne
   der Skala wie bei Daniel; auf Papier mit Tinte gemischt, bis Schrift 4,5 : 1 erreicht (Türkis 45 %, Apricot 50 %,
   Glut 65 %; gerechnet in test_semester_plan_look). Kein Blau: gewählte Kachel und Schritte in Tinte. Die Leiste
   mit Dokumenten zum Ziehen erst ab 1100 px (plan.js zieht nur mit feinem Zeiger). „fällt aus“ in den Farben für
   Gefahr, „heute“ Tinte auf Papier. */
:where([data-ui="friction"]) .fx-pl { max-width: 1240px; padding: 0 24px 48px; display: flex; flex-direction: column; gap: 16px;
  --fx-pl-read: var(--k-muted-strong); --fx-pl-book: var(--k-t-teal); --fx-pl-example: var(--k-t-warm); --fx-pl-write: var(--k-t-hot); }
:where([data-ui="friction"][data-np="paper"]) .fx-pl { --fx-pl-book: color-mix(in srgb, var(--k-t-teal) 45%, var(--k-ink)); --fx-pl-example: color-mix(in srgb, var(--k-t-warm) 50%, var(--k-ink)); --fx-pl-write: color-mix(in srgb, var(--k-t-hot) 65%, var(--k-ink)); }
:where([data-ui="friction"]) .fx-pl .t-read { --fx-pl-c: var(--fx-pl-read); }
:where([data-ui="friction"]) .fx-pl .t-book { --fx-pl-c: var(--fx-pl-book); }
:where([data-ui="friction"]) .fx-pl .t-example { --fx-pl-c: var(--fx-pl-example); }
:where([data-ui="friction"]) .fx-pl .t-write { --fx-pl-c: var(--fx-pl-write); }
:where([data-ui="friction"]) .fx-pl-hd { padding-top: 22px; margin-bottom: 0; }
:where([data-ui="friction"]) .fx-pl-hd h1 { overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-pl-box { border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
:where([data-ui="friction"]) .fx-pl-bh { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
:where([data-ui="friction"]) .fx-pl-bh h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
:where([data-ui="friction"]) .fx-pl-bh > span { flex: 1 1 220px; font-size: 13px; line-height: 1.45; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-bh > .btn { margin-left: auto; }
:where([data-ui="friction"]) .fx-pl-sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--k-muted-strong); }
:where([data-ui="friction"]) :is(.fx-pl-tk, .fx-pl-sec h5, .fx-pl-kv dt, .fx-pl-mon, .fx-pl-thead) { margin: 0; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }

/* Grundeinstellungen: Kacheln, jede öffnet ihren Teil des einen Formulars darunter (plan.js) */
:where([data-ui="friction"]) .fx-pl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
:where([data-ui="friction"]) .fx-pl-tile { font: inherit; color: var(--k-ink); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px; border: 1px solid var(--k-line-strong); border-radius: var(--k-r-sm); background: var(--k-page); }
:where([data-ui="friction"]) .fx-pl-tile.on { border-color: var(--k-ink); box-shadow: inset 0 0 0 1px var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-tile.warn { border-style: dashed; }
:where([data-ui="friction"]) .fx-pl-tl { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
:where([data-ui="friction"]) .fx-pl-te { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-te .ico { width: 12px; height: 12px; }
:where([data-ui="friction"]) .fx-pl-tile.on .fx-pl-te { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-tile b { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-pl-tile small { font-size: 12px; line-height: 1.4; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-tile.warn small { color: var(--k-ink); font-weight: 600; }
:where([data-ui="friction"]) .fx-pl-tf { padding: 14px 16px; border: 1px solid var(--k-ink); border-radius: var(--k-r-sm); background: var(--k-page); }
:where([data-ui="friction"]) .fx-pl-apply { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
:where([data-ui="friction"]) .fx-pl-ts { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }

/* Vorschau und Texte ohne Termin (Lane A) */
:where([data-ui="friction"]) .fx-pl-preview { border-color: var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-preview h2 { margin: 0; font-size: 17px; }
:where([data-ui="friction"]) .fx-pl-pv { margin: 0; padding: 0; list-style: none; display: grid; }
:where([data-ui="friction"]) .fx-pl-pv > li { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--k-line); min-width: 0; }
:where([data-ui="friction"]) .fx-pl-pvl { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 14px; }
:where([data-ui="friction"]) .fx-pl-pvl > span { flex: 0 0 150px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-pvl s { color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-pvl .ico { width: 14px; height: 14px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-loose { margin: 0; padding: 0; list-style: none; }
:where([data-ui="friction"]) .fx-pl-loose > li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-pl-loose > li:first-child { border-top: 0; }
:where([data-ui="friction"]) .fx-pl-lt { flex: 1; min-width: 0; display: grid; gap: 1px; }
:where([data-ui="friction"]) .fx-pl-lt b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
:where([data-ui="friction"]) :is(.fx-pl-lt, .fx-pl-pm, .fx-pl-t, .fx-pl-lib li) small { font-size: 12px; line-height: 1.45; color: var(--k-muted); }

/* Liste: Kopf mit Legende, Alle aufklappen und neuem Termin; schmal Karten, breit die Tabelle */
:where([data-ui="friction"]) .fx-pl-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
:where([data-ui="friction"]) .fx-pl-list { container: fx-pl / inline-size; min-width: 0; }
:where([data-ui="friction"]) .fx-pl-tbl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
:where([data-ui="friction"]) .fx-pl-lh { align-items: center; }
:where([data-ui="friction"]) .fx-pl-lh > .fx-pl-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; line-height: 1.5; }
:where([data-ui="friction"]) .fx-pl-lk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-lk > i { width: 10px; height: 10px; border-radius: 3px; background: var(--fx-pl-c); flex: none; }
:where([data-ui="friction"]) .fx-pl-lh > .fx-pl-lact { flex: 0 1 auto; margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--k-ink); }
:where([data-ui="friction"]) :is(.fx-pl-all, .fx-pl-add > summary) { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--k-ink); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where([data-ui="friction"]) .fx-pl-add > summary { list-style: none; }
:where([data-ui="friction"]) .fx-pl-add > summary::-webkit-details-marker { display: none; }
:where([data-ui="friction"]) .fx-pl-add > summary .ico { width: 14px; height: 14px; }
:where([data-ui="friction"]) .fx-pl-thead { display: none; }
:where([data-ui="friction"]) .fx-pl-mon { padding: 10px 2px 0; }
:where([data-ui="friction"]) .fx-pl-card { border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-panel); min-width: 0; scroll-margin-top: 72px; }
:where([data-ui="friction"]) .fx-pl-card.today { border-color: var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-card.focus { outline: 2px solid var(--k-ink); outline-offset: 2px; }
:where([data-ui="friction"]) .fx-pl-card.drop { outline: 2px dashed var(--k-ink); outline-offset: 2px; }
:where([data-ui="friction"]) .fx-pl-card.past :is(.fx-pl-t > b, .fx-pl-date b) { color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-pl-card.cancel .fx-pl-t > b { text-decoration: line-through; text-decoration-thickness: 1px; }

/* Die Zeile eines Termins: schmal Datum links, rechts Titel, Vorbereitung, Workout und Stand untereinander */
:where([data-ui="friction"]) .fx-pl-sum { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 20px; grid-template-areas: "d t t x" "d p p p" "d w s s"; gap: 6px 12px; align-items: start; padding: 12px 14px; cursor: pointer; list-style: none; }
:where([data-ui="friction"]) .nowk .fx-pl-sum { grid-template-areas: "d t t x" "d p s s"; }
:where([data-ui="friction"]) .fx-pl-sum::-webkit-details-marker { display: none; }
:where([data-ui="friction"]) .fx-pl-sum:focus-visible { outline-offset: -2px; }
:where([data-ui="friction"]) .fx-pl-card.exam .fx-pl-sum { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "d t"; cursor: default; }
:where([data-ui="friction"]) .fx-pl-date { grid-area: d; display: grid; justify-items: center; align-self: start; border: 1px solid var(--k-line); border-radius: var(--k-r-sm); padding: 4px 0; line-height: 1.15; }
:where([data-ui="friction"]) .fx-pl-date b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-pl-date span { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-t { grid-area: t; display: grid; gap: 3px; min-width: 0; }
:where([data-ui="friction"]) .fx-pl-t > b { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-pl-num { margin-right: 2px; color: var(--k-muted); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-pl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
:where([data-ui="friction"]) :is(.fx-pl-fmt, .fx-pl-today, .fx-pl-off) { font-size: 11px; line-height: 16px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--k-line); color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-pl-today { background: var(--k-ink); border-color: var(--k-ink); color: var(--k-page); }
:where([data-ui="friction"]) .fx-pl-off { background: var(--k-dangerbg); border-color: transparent; color: var(--k-dangerfg); }
:where([data-ui="friction"]) .fx-pl-cp { grid-area: p; display: grid; gap: 3px; min-width: 0; font-size: 13px; line-height: 1.45; }
:where([data-ui="friction"]) .fx-pl-ms { display: grid; grid-template-columns: 7px minmax(0, 1fr); align-items: center; column-gap: 7px; min-width: 0; }
:where([data-ui="friction"]) .fx-pl-ms > i { width: 7px; height: 7px; border-radius: 50%; background: var(--fx-pl-c); }
:where([data-ui="friction"]) :is(.fx-pl-mt, .fx-pl-ms > em, .fx-pl-cw > b) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-mt { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-ms > em { grid-column: 2; font-size: 12px; line-height: 1.35; font-style: normal; color: var(--k-muted); }
:where([data-ui="friction"]) :is(.fx-pl-more, .fx-pl-none) { font-size: 12px; line-height: 1.45; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-cw { grid-area: w; display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; line-height: 1.45; }
:where([data-ui="friction"]) .fx-pl-cw > b { flex: 0 1 auto; font-weight: 500; }
:where([data-ui="friction"]) .fx-pl-cw > small { flex: none; font-size: 12px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-cs { grid-area: s; justify-self: end; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.5; font-weight: 600; color: var(--k-muted-strong); white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-cs .ico { width: 12px; height: 12px; flex: none; }
:where([data-ui="friction"]) .fx-pl-cs.ok { color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-pl-cs.open { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-cs.open::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
:where([data-ui="friction"]) .fx-pl-cs.past { color: var(--k-muted); font-weight: 500; }
:where([data-ui="friction"]) .fx-pl-cs.off { color: var(--k-dangerfg); }
:where([data-ui="friction"]) .fx-pl-miss { color: var(--k-warnfg); font-weight: 600; }
:where([data-ui="friction"]) .fx-pl-chev { grid-area: x; display: grid; place-items: center; height: 20px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-chev .ico { width: 16px; height: 16px; }
:where([data-ui="friction"]) .fx-pl-card[open] > .fx-pl-sum .fx-pl-chev { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-pl-card[open] > .fx-pl-sum .fx-pl-chev .ico { transform: rotate(180deg); }

/* Aufgeklappt: Vorher, Im Termin, Danach */
:where([data-ui="friction"]) .fx-pl-det { display: grid; gap: 12px; padding: 12px 14px 14px; border-top: 1px solid var(--k-line); min-width: 0; }
:where([data-ui="friction"]) .fx-pl-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
:where([data-ui="friction"]) .fx-pl-arr { display: flex; align-items: center; justify-content: center; height: 14px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-arr .ico { width: 14px; height: 14px; transform: rotate(90deg); }
:where([data-ui="friction"]) .fx-pl-step { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--k-line); border-radius: var(--k-r-sm); background: var(--k-panel); }
:where([data-ui="friction"]) .fx-pl-step.off { border-style: dashed; background: transparent; }
:where([data-ui="friction"]) .fx-pl-step p { margin: 0; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-pl-sh { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
:where([data-ui="friction"]) .fx-pl-sh h4 { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
:where([data-ui="friction"]) .fx-pl-sh small { margin-left: auto; font-size: 12px; color: var(--k-muted); white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-sn { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; background: var(--k-ink); color: var(--k-page); }
:where([data-ui="friction"]) .fx-pl-kv { margin: 0; display: grid; gap: 8px; }
:where([data-ui="friction"]) .fx-pl-kv > div { display: grid; gap: 3px; }
:where([data-ui="friction"]) .fx-pl-kv dd { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-pl-sec { display: grid; gap: 6px; min-width: 0; }
:where([data-ui="friction"]) .fx-pl-wq { font-size: 15px; font-weight: 600; line-height: 1.4; }
:where([data-ui="friction"]) :is(.fx-pl-prep, .fx-pl-goals) { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
:where([data-ui="friction"]) .fx-pl-pi { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 6px 4px 8px 10px; border: 1px solid var(--k-line); border-radius: var(--k-r-sm); background: var(--k-page); min-width: 0; }
:where([data-ui="friction"]) .fx-pl-dt { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; color: var(--fx-pl-c); white-space: nowrap; }
:where([data-ui="friction"]) .fx-pl-pi > .fx-pl-pm { grid-column: 1 / -1; }
:where([data-ui="friction"]) .fx-pl-pi > .fx-pl-pm:first-child { grid-column: 1; grid-row: 1; }
:where([data-ui="friction"]) .fx-pl-pa { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 2px; }
:where([data-ui="friction"]) .fx-pl-pa > form { display: contents; }
:where([data-ui="friction"]) .fx-pl-up .ico { transform: rotate(180deg); }
:where([data-ui="friction"]) .fx-pl-pm { min-width: 0; display: grid; gap: 2px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-pl-goals > li { display: flex; gap: 6px; font-size: 14px; line-height: 1.45; }
:where([data-ui="friction"]) :is(.fx-pl-goals, .fx-pl-line) .ico { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-pl-kinds { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
:where([data-ui="friction"]) .fx-pl-kinds > form { display: contents; }
:where([data-ui="friction"]) .fx-pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fx-pl-c); flex: none; }
:where([data-ui="friction"]) .fx-pl-task > p:not(.small) { padding: 10px 12px; border-radius: var(--k-r-sm); background: var(--k-chat); font-size: 14px; line-height: 1.5; }
:where([data-ui="friction"]) .fx-pl-task > .btn { justify-self: start; }
:where([data-ui="friction"]) .fx-pl-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-pl-acts > form { display: contents; }
:where([data-ui="friction"]) .fx-pl-acts .ico { width: 14px; height: 14px; }
:where([data-ui="friction"]) .fx-pl-cnote { margin: 0; padding: 10px 12px; border-radius: var(--k-r-sm); background: var(--k-dangerbg); color: var(--k-dangerfg); font-size: 14px; line-height: 1.5; }
:where([data-ui="friction"]) .fx-pl-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
:where([data-ui="friction"]) .fx-pl-line a { display: inline-flex; align-items: center; min-height: 24px; color: var(--k-ink); text-decoration: underline; text-underline-offset: 3px; }
:where([data-ui="friction"]) .fx-pl-lib { display: none; }

/* Breit: die Liste als Tabelle (Daniels .pl-thead und .pl-rl), die Schritte nebeneinander */
@container fx-pl (min-width: 720px) {
  :where([data-ui="friction"]) .fx-pl-tbl { gap: 0; padding-top: 14px; border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-panel); overflow: clip; }
  :where([data-ui="friction"]) .fx-pl-lh { padding: 0 16px 12px; }
  :where([data-ui="friction"]) :is(.fx-pl-thead, .fx-pl-sum) { grid-template-columns: 56px minmax(0, 2.1fr) minmax(0, 1.9fr) minmax(0, 1.3fr) 88px 16px; grid-template-areas: "d t p w s x"; gap: 14px; align-items: center; padding: 12px 16px; }
  :where([data-ui="friction"]) .nowk :is(.fx-pl-thead, .fx-pl-sum) { grid-template-columns: 56px minmax(0, 2.1fr) minmax(0, 2.4fr) 88px 16px; grid-template-areas: "d t p s x"; }
  :where([data-ui="friction"]) .fx-pl-thead { display: grid; padding-block: 8px; border-top: 1px solid var(--k-line); letter-spacing: .1em; }
  :where([data-ui="friction"]) .fx-pl-mon { padding: 14px 16px 6px; border-top: 1px solid var(--k-line); }
  :where([data-ui="friction"]) .fx-pl-card { border: 0; border-top: 1px solid var(--k-line); border-radius: 0; background: transparent; }
  :where([data-ui="friction"]) .fx-pl-mon + .fx-pl-card { border-top-color: transparent; }
  :where([data-ui="friction"]) .fx-pl-card.today { box-shadow: inset 3px 0 0 var(--k-ink); }
  :where([data-ui="friction"]) .fx-pl-card.focus, :where([data-ui="friction"]) .fx-pl-card.drop { outline-offset: -2px; }
  :where([data-ui="friction"]) .fx-pl-card[open] { background: var(--k-page); }
  :where([data-ui="friction"]) .fx-pl-card[open] > .fx-pl-sum { background: var(--k-chat); }
  :where([data-ui="friction"]) .fx-pl-card.exam .fx-pl-sum { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "d t"; }
  :where([data-ui="friction"]) .fx-pl-date { justify-items: start; align-self: center; border: 0; padding: 0; }
  :where([data-ui="friction"]) .fx-pl-date b { font-size: 22px; letter-spacing: -.02em; }
  :where([data-ui="friction"]) .fx-pl-t > b { order: -1; }
  :where([data-ui="friction"]) .fx-pl-cw { flex-direction: column; align-items: stretch; gap: 1px; }
  :where([data-ui="friction"]) .fx-pl-cw > b { font-size: 14px; line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  :where([data-ui="friction"]) .fx-pl-cs { justify-self: start; }
  :where([data-ui="friction"]) .fx-pl-det { padding: 4px 16px 16px; border-top: 0; }
  :where([data-ui="friction"]) .fx-pl-flow { grid-template-columns: minmax(0, 1.35fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr); gap: 8px; align-items: stretch; }
  :where([data-ui="friction"]) .fx-pl-flow.two { grid-template-columns: minmax(0, 1.35fr) 18px minmax(0, 1fr); }
  :where([data-ui="friction"]) .fx-pl-arr { height: auto; }
  :where([data-ui="friction"]) .fx-pl-arr .ico { transform: none; }
}
@media (hover: hover) and (pointer: fine) {
  :where([data-ui="friction"]) .fx-pl-tile:hover { border-color: var(--k-ink); }
  :where([data-ui="friction"]) .fx-pl-sum:hover .fx-pl-chev { color: var(--k-ink); }
}
@media (pointer: coarse) {
  :where([data-ui="friction"]) :is(.fx-pl-all, .fx-pl-add > summary, .fx-pl-line a) { min-height: 44px; }
}
@media (min-width: 1100px) {
  :where([data-ui="friction"]) .fx-pl { padding: 0 32px 60px; }
  :where([data-ui="friction"]) .fx-pl-body { grid-template-columns: minmax(0, 1fr) 220px; }
  :where([data-ui="friction"]) .fx-pl-lib { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--k-line); border-radius: var(--k-r); background: var(--k-panel); }
  :where([data-ui="friction"]) .fx-pl-lib p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--k-muted); }
  :where([data-ui="friction"]) .fx-pl-lib ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
  :where([data-ui="friction"]) .fx-pl-lib li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--k-line); border-radius: var(--k-r-sm); font-size: 13px; cursor: grab; overflow-wrap: anywhere; }
  :where([data-ui="friction"]) .fx-pl-libmore { font-size: 13px; font-weight: 600; color: var(--k-ink); text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 700px) {
  :where([data-ui="friction"]) .fx-pl { padding-inline: 16px; }
  :where([data-ui="friction"]) .fx-pl-sum { grid-template-columns: 46px minmax(0, 1fr) auto 20px; gap: 6px 10px; padding: 10px 12px; }
  :where([data-ui="friction"]) .fx-pl-card.exam .fx-pl-sum { grid-template-columns: 46px minmax(0, 1fr); }
  :where([data-ui="friction"]) .fx-pl-det { padding-inline: 12px; }
  :where([data-ui="friction"]) .fx-pl-step { padding: 10px; }
  :where([data-ui="friction"]) .fx-pl-pvl > span { flex-basis: 100%; }
}
@media (max-width: 380px) {
  :where([data-ui="friction"]) .fx-pl-cw { flex-wrap: wrap; row-gap: 0; }
}

/* Studierende: „Beitreten“ und „fällt aus“ auf Heute und der Kursseite (Lane A, L8). „Beitreten“ steht auf der Karte
   im Aktionsbereich direkt über der Hauptaktion (Lane E, 28.10.2026): Daniels Karten enden mit ihrer Aktion, und die
   Zeile mit dem Termin (.fx-h-meta) ist auf dem Telefon verborgen. In den Terminen von Heute klein am Eintrag.
   Lehrende: „fällt aus“ mit der Notiz in „Nächste Termine“ (Abschnitt 15, Lane E). */
:where([data-ui="friction"]) .fx-h-off { color: var(--k-dangerfg); font-weight: 600; }
:where([data-ui="friction"]) :is(.fx-h-course, .fx-knext) > .fx-h-join { width: 100%; justify-content: center; min-height: 44px; }
:where([data-ui="friction"]) .fx-h-ags .fx-h-join { align-self: flex-start; margin-top: 6px; }
:where([data-ui="friction"]) .fx-w-tr.off .fx-w-tt b { color: var(--k-muted-strong); text-decoration: line-through; text-decoration-thickness: 1px; }
:where([data-ui="friction"]) .fx-w-tt .fx-w-cnote { max-width: 100%; overflow-wrap: anywhere; font-variant-numeric: normal; }
@media (min-width: 900px) {
  :where([data-ui="friction"]) .fx-h-course > .fx-h-join { margin-top: auto; }
  :where([data-ui="friction"]) .fx-h-course > .fx-h-join + .fx-h-go { margin-top: 0; }
}

/* ---------- 17 Alle Dokumente der Lehrenden unter Friction (L11, 28.10.2026) ----------
   Daniels Lehrenden-Klickdummy v3 (Teil „Alle Dokumente“: .dl-head, .dl-bar, .dl-search, .dl-f, .dl-sec, .dl-sh,
   .dl-grp, .dl-row, .dl-k, .dl-t, .dl-snip, .dl-crs, .dl-u, .dl-tag, .dl-count, .dl-empty; Teil „Dokument-Ansicht“:
   .dv, .dv-h, .dv-view, .dv-pp, .dv-nav, .dv-side, .dv-sec, .dv-h1, .dv-ha), core/fx_doclib.html. Die Liste bis 1040 px breit; mit
   offenem Dokument ab 980 px Platz die Liste links und die Seitenansicht rechts (klebt beim Rollen), schmaler die
   Seitenansicht an Stelle der Liste. Die Seite selbst ist Lesefläche (.paper: hell, bis das Konto sie dunkel stellt).
   Kein Sand: Treffer markiert Türkis (die eine Hervorhebung), Avas offene Vorschläge stehen in der Farbe der Labels.
   Avas Vorschläge tragen links die Farbe ihrer Art (Inhalt Apricot, Literatur Türkis, Interaktion Grau), nur als Kante. */
:where([data-ui="friction"]) .fx-dl { container: fx-dl / inline-size; padding: 0 16px 48px; }
:where([data-ui="friction"]) .fx-dl-in { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
:where([data-ui="friction"]) .fx-dl-main { container: fx-dlm / inline-size; width: 100%; max-width: 1040px; margin: 0 auto; padding-top: 22px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
:where([data-ui="friction"]) .fx-dl-head h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.05; letter-spacing: -.02em; }
:where([data-ui="friction"]) .fx-dl-head p { margin: 0; max-width: 560px; font-size: 15px; line-height: 1.5; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dl-bar { display: flex; gap: 10px; align-items: stretch; }
:where([data-ui="friction"]) .fx-dl-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--k-fieldbd); border-radius: 12px; background: var(--k-field); color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-search:focus-within { border-color: var(--k-ink); box-shadow: inset 0 0 0 1px var(--k-ink); }
:where([data-ui="friction"]) .fx-dl-search .ico { width: 18px; height: 18px; flex: none; }
:where([data-ui="friction"]) .fx-dl-search input { flex: 1; min-width: 0; min-height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; color: var(--k-ink); font: inherit; }
:where([data-ui="friction"]) .fx-dl-search input::placeholder { color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-filters { display: flex; flex-direction: column; gap: 10px; margin-top: -8px; min-width: 0; }
:where([data-ui="friction"]) .fx-dl-f { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
:where([data-ui="friction"]) .fx-dl-c { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--k-line-strong); border-radius: 999px; color: var(--k-muted-strong); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
:where([data-ui="friction"]) .fx-dl-c.on { background: var(--k-ink); border-color: var(--k-ink); color: var(--k-page); font-weight: 600; }
:where([data-ui="friction"]) .fx-dl-c.zero { color: var(--k-muted); border-style: dashed; }
:where([data-ui="friction"]) .fx-dl-n { font-size: 12px; font-weight: 600; color: var(--k-muted); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-dl-c.on .fx-dl-n { color: var(--k-page); }
:where([data-ui="friction"]) .fx-dl-fr { display: flex; align-items: center; gap: 10px; min-width: 0; }
:where([data-ui="friction"]) .fx-dl-fl { flex: none; width: 96px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-f.sm .fx-dl-c { min-height: 32px; padding: 0 12px; font-size: 13px; }
:where([data-ui="friction"]) .fx-dl-f.sm .fx-dl-c.on { background: var(--k-chat); border-color: var(--k-ink); color: var(--k-ink); }
:where([data-ui="friction"]) .fx-dl-f.sm .fx-dl-c.on .fx-dl-n { color: var(--k-ink); }
:where([data-ui="friction"]) .fx-dl-count { margin: 0 0 -10px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-count a { display: inline-flex; align-items: center; min-height: 24px; color: var(--k-ink); font-weight: 500; letter-spacing: 0; text-transform: none; }
:where([data-ui="friction"]) .fx-dl-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
:where([data-ui="friction"]) .fx-dl-sh { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
:where([data-ui="friction"]) .fx-dl-sh h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dl-sh span { flex: 1; min-width: 10rem; font-size: 13px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-sh a { display: inline-flex; align-items: center; min-height: 24px; font-size: 13px; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-dl-grp { list-style: none; margin: 0; padding: 0; border: 1px solid var(--k-line); border-radius: 14px; overflow: hidden; }
:where([data-ui="friction"]) .fx-dl-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--k-line); scroll-margin-top: 80px; }
:where([data-ui="friction"]) .fx-dl-row:first-child { border-top: 0; }
:where([data-ui="friction"]) .fx-dl-row.on { background: var(--k-chat); box-shadow: inset 3px 0 0 var(--k-ink); }
:where([data-ui="friction"]) .fx-dl-k { padding: 4px 0; border: 1px solid var(--k-line-strong); border-radius: 6px; font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-align: center; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dl-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 24px; color: var(--k-ink); text-decoration: none; }
:where([data-ui="friction"]) .fx-dl-t b { font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dl-t small { font-size: 12px; line-height: 1.45; color: var(--k-muted); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dl-t .fx-dl-snip { color: var(--k-muted-strong); }
:where([data-ui="friction"]) :is(.fx-dl, .fx-dv) mark { padding: 0 2px; border-radius: 3px; background: color-mix(in srgb, var(--k-t-teal) 26%, transparent); color: var(--k-ink); box-shadow: inset 0 -1px 0 var(--k-t-teal); }
:where([data-ui="friction"]) .fx-dl-x { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
:where([data-ui="friction"]) .fx-dl-x:empty { display: none; }
:where([data-ui="friction"]) .fx-dl-hint { font-size: 12px; font-weight: 600; color: var(--k-label); white-space: nowrap; }
:where([data-ui="friction"]) .fx-dl-crs { padding: 3px 8px; border: 1px solid var(--k-line-strong); border-radius: 6px; font-size: 12px; color: var(--k-muted-strong); white-space: nowrap; }
:where([data-ui="friction"]) .fx-dl-u { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
:where([data-ui="friction"]) .fx-dl-ul { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 24px; padding: 0 7px; border-radius: 6px; background: var(--k-chat); color: var(--k-ink); font-size: 12px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-dl-none { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) :is(.fx-dl-as, .fx-dv-jl) { display: inline-flex; align-items: center; align-self: flex-start; min-height: 24px; font-size: 13px; font-weight: 500; color: var(--k-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where([data-ui="friction"]) .fx-dl-empty { display: flex; flex-direction: column; gap: 6px; padding: 32px; border: 1px dashed var(--k-line-strong); border-radius: 14px; font-size: 14px; line-height: 1.5; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dl-empty b { font-size: 18px; color: var(--k-ink); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dl-empty a { color: var(--k-ink); }
/* Die Seitenansicht (Daniels .dv): Kopf, Aktionen, die Seite auf der Lesefläche mit Blättern, daneben oder darunter, wo
   das Dokument verwendet wird, und Avas Vorschläge. */
:where([data-ui="friction"]) .fx-dv { container: fx-dv / inline-size; display: flex; flex-direction: column; gap: 12px; min-width: 0; border: 1px solid var(--k-line); border-radius: 18px; background: var(--k-panel); overflow: hidden; scroll-margin-top: 16px; }
:where([data-ui="friction"]) .fx-dv-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 44px; margin: 6px 0 -12px 14px; padding: 0 6px; font-size: 14px; font-weight: 500; color: var(--k-ink); text-decoration: none; }
:where([data-ui="friction"]) .fx-dv-back .ico { width: 16px; height: 16px; }
:where([data-ui="friction"]) .fx-dv-h { display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 0 20px; }
:where([data-ui="friction"]) .fx-dv-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
:where([data-ui="friction"]) .fx-dv-ht h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-ht small { font-size: 12px; line-height: 1.45; color: var(--k-muted); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-x { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px; }
:where([data-ui="friction"]) .fx-dv-exam { margin: 0 20px; font-size: 13px; line-height: 1.5; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-gr { display: inline-block; margin-right: 6px; padding: 1px 7px; border: 1px solid var(--k-line-strong); border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-dv-b { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-dv-view { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; padding: 20px 16px; background: var(--k-page); }
:where([data-ui="friction"]) .fx-dv-pp { width: 100%; max-width: 560px; min-height: 18rem; padding: 32px 28px; border: 1px solid var(--k-line); border-radius: 4px; background: var(--k-panel); color: var(--k-ink); box-sizing: border-box; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-pp.slide { max-width: 760px; }
:where([data-ui="friction"]) .fx-dv-s { scroll-margin-top: 80px; }
:where([data-ui="friction"]) .fx-dv-s + .fx-dv-s { margin-top: 12px; }
:where([data-ui="friction"]) .fx-dv-pp h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
:where([data-ui="friction"]) .fx-dv-pp p { margin: 0 0 10px; font-family: var(--k-fread); font-size: 15px; line-height: 1.6; }
:where([data-ui="friction"]) .fx-dv-nav { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--k-muted-strong); font-variant-numeric: tabular-nums; }
:where([data-ui="friction"]) .fx-dv-nav .iconbtn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--k-line-strong); border-radius: 10px; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-dv-nav .iconbtn.off { border-color: var(--k-line); color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dv-jump { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-jump input { width: 6em; min-height: 40px; padding: 0 10px; border: 1px solid var(--k-fieldbd); border-radius: 10px; background: var(--k-field); color: var(--k-ink); }
:where([data-ui="friction"]) .fx-dv-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: 20px; border-top: 1px solid var(--k-line); }
:where([data-ui="friction"]) .fx-dv-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
:where([data-ui="friction"]) .fx-dv-lbl { margin: 0; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dv-use { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-page); }
:where([data-ui="friction"]) .fx-dv-use b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-use small { font-size: 12px; line-height: 1.45; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
:where([data-ui="friction"]) .fx-dv-as { display: flex; flex-direction: column; gap: 8px; align-self: stretch; margin: 4px 0 0; }
:where([data-ui="friction"]) .fx-dv-pr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
:where([data-ui="friction"]) .fx-dv-pr .field { margin: 0; min-width: 0; }
:where([data-ui="friction"]) .fx-dv-pr input { width: 100%; min-height: 44px; }
:where([data-ui="friction"]) .fx-dv-as .btn { align-self: flex-start; }
:where([data-ui="friction"]) .fx-dv-muted { margin: 0; font-size: 13px; line-height: 1.5; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dv-sug { --fx-dv-c: var(--k-t-warm); display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--k-line); border-left: 3px solid var(--fx-dv-c); border-radius: 12px; background: var(--k-page); scroll-margin-top: 80px; }
:where([data-ui="friction"]) .fx-dv-sug.k-literature { --fx-dv-c: var(--k-t-teal); }
:where([data-ui="friction"]) .fx-dv-sug.k-interaction { --fx-dv-c: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-sug.on { border-color: var(--k-line-strong); border-left-color: var(--fx-dv-c); background: var(--k-chat); }
:where([data-ui="friction"]) .fx-dv-sug.done b { color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-sh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:where([data-ui="friction"]) .fx-dv-ty { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-sh small { font-size: 12px; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dv-st { margin-left: auto; padding: 1px 6px; border: 1px solid var(--k-line-strong); border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-dv-st.ok { border-color: var(--k-okfg); color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-dv-sug > b { font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-sug p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--k-muted-strong); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-works { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; color: var(--k-muted-strong); overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-diff { display: grid; gap: 2px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-dv-diff :is(.minus, .plus) { padding: 4px 8px; border-radius: 6px; }
:where([data-ui="friction"]) .fx-dv-diff .minus { background: var(--k-dangerbg); color: var(--k-dangerfg); }
:where([data-ui="friction"]) .fx-dv-diff .plus { background: var(--k-okbg); color: var(--k-okfg); }
:where([data-ui="friction"]) .fx-dv-ha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
:where([data-ui="friction"]) .fx-dv-ha form { margin: 0; }
:where([data-ui="friction"]) .fx-dv-ai { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12px; line-height: 1.5; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-dv-ai .ico { width: 14px; height: 14px; flex: none; margin-top: 2px; }
:where([data-ui="friction"]) .fx-dv-ai a { display: inline-flex; align-items: center; min-height: 24px; color: var(--k-ink); }
@media (hover: hover) and (pointer: fine) {
  :where([data-ui="friction"]) .fx-dl-row:hover { background: var(--k-panel); }
  :where([data-ui="friction"]) .fx-dl-row.on:hover { background: var(--k-chat); }
  :where([data-ui="friction"]) .fx-dl-t:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  :where([data-ui="friction"]) .fx-dl-c:hover { border-color: var(--k-ink); color: var(--k-ink); }
  :where([data-ui="friction"]) .fx-dl-c.on:hover { color: var(--k-page); }
  :where([data-ui="friction"]) .fx-dl-f.sm .fx-dl-c.on:hover { color: var(--k-ink); }
  :where([data-ui="friction"]) :is(.fx-dl-tag, .fx-dv-x):hover { background: var(--k-line); color: var(--k-ink); text-decoration: none; }
}
@media (pointer: coarse) {
  :where([data-ui="friction"]) :is(.fx-dl-tag, .fx-dl-as, .fx-dv-jl, .fx-dl-count a, .fx-dl-sh a, .fx-dv-ai a) { position: relative; }
  :where([data-ui="friction"]) :is(.fx-dl-tag, .fx-dl-as, .fx-dv-jl, .fx-dl-count a, .fx-dl-sh a, .fx-dv-ai a)::before { content: ""; position: absolute; inset: -10px -4px; }
  :where([data-ui="friction"]) .fx-dl-c { min-height: 40px; }
}
/* Am Telefon die Filter je eine Zeile zum Wischen (wie die Chips, Abschnitt 9); schmal die Zeile in zwei Spalten wie
   bei Daniel unter 700 px, auch in der Liste neben der Seitenansicht. */
@media (max-width: 699px) {
  :where([data-ui="friction"]) .fx-dl-f { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  :where([data-ui="friction"]) .fx-dl-fr { flex-direction: column; align-items: stretch; gap: 6px; }
  :where([data-ui="friction"]) .fx-dl-fl { width: auto; }
}
@container fx-dlm (max-width: 699px) {
  :where([data-ui="friction"]) .fx-dl-row { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 12px; padding: 14px; }
  :where([data-ui="friction"]) :is(.fx-dl-x, .fx-dl-u) { grid-column: 2; justify-self: start; align-items: flex-start; justify-content: flex-start; }
  :where([data-ui="friction"]) .fx-dl-x { flex-direction: row; flex-wrap: wrap; }
}
@container fx-dv (min-width: 760px) {
  :where([data-ui="friction"]) .fx-dv-b { grid-template-columns: minmax(0, 1fr) 300px; }
  :where([data-ui="friction"]) .fx-dv-side { border-top: 0; border-left: 1px solid var(--k-line); }
  :where([data-ui="friction"]) .fx-dv-view { padding: 28px; }
  :where([data-ui="friction"]) .fx-dv-pp { padding: 44px 40px; }
}
/* Mit offenem Dokument: schmal steht die Seitenansicht allein (zurück über „Alle Dokumente“), breit neben der Liste. */
@container fx-dl (max-width: 979px) {
  :where([data-ui="friction"]) .fx-dl-in.has-view > .fx-dl-main { display: none; }
  :where([data-ui="friction"]) .fx-dl-in.has-view > .fx-dv { margin-top: 12px; }
}
@container fx-dl (min-width: 980px) {
  :where([data-ui="friction"]) .fx-dl-in.has-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
  :where([data-ui="friction"]) .fx-dl-in.has-view > .fx-dl-main { max-width: none; margin: 0; }
  :where([data-ui="friction"]) .fx-dl-in.has-view > .fx-dv { position: sticky; top: 16px; max-height: calc(100vh - 32px); margin-top: 22px; overflow: auto; overscroll-behavior: contain; }
  :where([data-ui="friction"]) .fx-dv-back { display: none; }
}
@media (min-width: 900px) {
  :where([data-ui="friction"]) .fx-dl { padding: 0 40px 60px; }
  :where([data-ui="friction"]) .fx-dl-main { padding-top: 32px; }
  :where([data-ui="friction"]) .fx-dl-head h1 { font-size: 40px; }
}
/* Avas offene Vorschläge über alle Dokumente (D-097; Daniels Teil „Ava prüft“: .av, .av-top, .av-tt, .av-list, .av-c,
   .av-ty, .av-ref, nur als Liste): ein Kasten über der Suche, je Vorschlag eine Zeile mit der Kante seiner Art wie in der
   Seitenansicht, die ersten drei offen, der Rest zum Aufklappen; ab 700 px Breite der Liste zwei Spalten wie bei Daniel.
   Ohne Daniels blauen Verlauf, ohne Sand, ohne Knöpfe (die Aktionen stehen in der Seitenansicht). */
:where([data-ui="friction"]) .fx-av { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--k-line-strong); border-radius: 18px; background: var(--k-panel); }
:where([data-ui="friction"]) .fx-av-top { display: flex; align-items: flex-start; gap: 12px; }
:where([data-ui="friction"]) .fx-av-mark { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--k-line-strong); border-radius: 50%; color: var(--k-ink); }
:where([data-ui="friction"]) .fx-av-mark .ico { width: 18px; height: 18px; }
:where([data-ui="friction"]) .fx-av-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
:where([data-ui="friction"]) .fx-av-lbl { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-av-tt h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-av-tt > span:last-child { font-size: 13px; line-height: 1.45; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-av-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
:where([data-ui="friction"]) .fx-av-li { --fx-av-c: var(--k-t-warm); min-width: 0; }
:where([data-ui="friction"]) .fx-av-li.k-literature { --fx-av-c: var(--k-t-teal); }
:where([data-ui="friction"]) .fx-av-li.k-interaction { --fx-av-c: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-av-ln { display: flex; flex-direction: column; gap: 3px; height: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--k-line); border-left: 3px solid var(--fx-av-c); border-radius: 12px; background: var(--k-page); color: var(--k-ink); text-decoration: none; box-sizing: border-box; }
:where([data-ui="friction"]) .fx-av-ref { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; font-size: 12px; line-height: 1.45; color: var(--k-muted); }
:where([data-ui="friction"]) .fx-av-ty { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted-strong); }
:where([data-ui="friction"]) .fx-av-doc { min-width: 0; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-av-ln b { font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
:where([data-ui="friction"]) .fx-av-more > summary { padding: 12px 0; font-size: 13px; font-weight: 500; color: var(--k-ink); cursor: pointer; }
:where([data-ui="friction"]) .fx-av-more > .fx-av-list { margin-top: 4px; }
@container fx-dlm (min-width: 700px) {
  :where([data-ui="friction"]) .fx-av-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: hover) and (pointer: fine) {
  :where([data-ui="friction"]) .fx-av-ln:hover { border-color: var(--k-line-strong); border-left-color: var(--fx-av-c); background: var(--k-chat); }
  :where([data-ui="friction"]) .fx-av-ln:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  :where([data-ui="friction"]) .fx-av-more > summary:hover { text-decoration: underline; }
}

/* ---------- 21 Telefon: Semesterplan (D-113, Manuels iPhone-Durchgang 01.11.2026) ----------
   Die Datumskachel nur mit Tag und Monat, „THU · OCT“ lief bei 46 px über den Rand bis an den Titel. Zwischen Kachel
   und Titel 12 px; „ohne Datum“ bricht in der Kachel um. Am Desktop bleibt die Kachel, wie sie ist. Die Regeln für jeden
   Look (Workout, Rechtliches, Kurskopf) stehen vor Abschnitt 10, ab Abschnitt 12 prüft test_friction_theme nur Friction. */
@media (max-width: 700px) {
  :where([data-ui="friction"]) .fx-pl-wd { display: none; }
  :where([data-ui="friction"]) .fx-pl-sum { column-gap: 12px; }
  :where([data-ui="friction"]) .fx-pl-date span { white-space: normal; text-align: center; }
}
