/* Self-hosted fonts (latin subset, covers ä/ö/ü/ß) — served from fonts/, precached by the service worker */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var.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: 500;
  font-display: swap;
  src: url("../fonts/plexmono-500.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: "Kalam";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/kalam-700.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-italic.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;
}

/* Concept 3: type-led, flat color fields, hairlines. No cards, no shadows.
   Color roles (every palette defines the same five):
   --sage  progress, success, "das"   --slate "der"   --clay "die" and mistakes
   --sand  rewards only               --act   the one primary action           */
:root {
  --bg: #f0eee9; /* PANTONE 11-4201 Cloud Dancer */
  --surface-2: #e6e7e1;
  --ink: #202426;
  --ink-2: #5c625d;
  --ink-3: #686d67; /* 4.5:1 on --bg, so it can carry text */
  --hair: rgba(32, 36, 38, .14);
  --sage: #5f8f8b;
  --slate: #6b7fa8;
  --clay: #c98473;
  --sand: #b98f3f;
  --act: #c46f5a;
  --on-accent: #ffffff;
  /* Tonal scale from the palette, same hue as each colour (computed in OKLCH):
     -ink   text in that colour, at least 4.5:1 on the page and on its own field
     -field a pale tint that still reads as the colour (mixing into the beige page turned them grey)
     --act-fill the primary action fill, deep enough for a white label (4.5:1)
     The -l values are per palette; dark mode points the names at the colours themselves (already 7:1). */
  --sage-ink-l: #3c736f; --sage-field-l: #d7f2ef; --slate-ink-l: #536895; --slate-field-l: #dfecff; --clay-ink-l: #9a5241; --clay-field-l: #ffe0d6; --sand-ink-l: #8d6000; --sand-field-l: #fee8c2; --act-ink-l: #a54a34; --act-field-l: #ffdfd3; --act-fill-l: #b45c47;
  --sage-ink: var(--sage-ink-l); --slate-ink: var(--slate-ink-l); --clay-ink: var(--clay-ink-l); --sand-ink: var(--sand-ink-l); --act-ink: var(--act-ink-l);
  --sage-field: var(--sage-field-l); --slate-field: var(--slate-field-l); --clay-field: var(--clay-field-l); --sand-field: var(--sand-field-l); --act-field: var(--act-field-l);
  --act-fill: var(--act-fill-l);
  /* Surfaces: page (--bg), raised (--surface-1, cards and grouped cells), pressed/sunken (--surface-2), and tracks */
  --surface-1: color-mix(in srgb, #fff 58%, var(--bg));
  --track: color-mix(in srgb, var(--ink) 11%, var(--bg));
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px;
  --act-shadow: color-mix(in srgb, var(--act-fill) 75%, transparent); /* soft lift under the primary action; plain dark in dark mode */
  --scrim: rgba(20, 22, 23, .55);
  --font-display: "Archivo", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --font-body: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --font-italic: "Newsreader", Georgia, serif;

  /* Legacy names still used by admin.html */
  --text: var(--ink);
  --muted: var(--ink-2);
  --panel: var(--bg);
  --panel-strong: var(--surface-2);
  --line: var(--hair);
  --accent: var(--act);

  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171918; --surface-2: #242726;
    --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #7c827c; --hair: rgba(236, 238, 234, .13);
    --sage: #7fb0ab; --slate: #8fa1c6; --clay: #e09d8c; --sand: #e0bd78; --act: #e0917c;
    --on-accent: #171918; --scrim: rgba(0, 0, 0, .65);
    --sage-ink: var(--sage); --slate-ink: var(--slate); --clay-ink: var(--clay); --sand-ink: var(--sand); --act-ink: var(--act); --act-fill: var(--act);
    --sage-field: color-mix(in srgb, var(--sage) 20%, var(--bg)); --slate-field: color-mix(in srgb, var(--slate) 20%, var(--bg)); --clay-field: color-mix(in srgb, var(--clay) 20%, var(--bg));
    --sand-field: color-mix(in srgb, var(--sand) 18%, var(--bg)); --act-field: color-mix(in srgb, var(--act) 18%, var(--bg));
    --surface-1: color-mix(in srgb, #fff 6%, var(--bg)); --track: color-mix(in srgb, #fff 12%, var(--bg)); --act-shadow: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171918; --surface-2: #242726;
  --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #7c827c; --hair: rgba(236, 238, 234, .13);
  --sage: #7fb0ab; --slate: #8fa1c6; --clay: #e09d8c; --sand: #e0bd78; --act: #e0917c;
  --on-accent: #171918; --scrim: rgba(0, 0, 0, .65);
  --sage-ink: var(--sage); --slate-ink: var(--slate); --clay-ink: var(--clay); --sand-ink: var(--sand); --act-ink: var(--act); --act-fill: var(--act);
  --sage-field: color-mix(in srgb, var(--sage) 20%, var(--bg)); --slate-field: color-mix(in srgb, var(--slate) 20%, var(--bg)); --clay-field: color-mix(in srgb, var(--clay) 20%, var(--bg));
  --sand-field: color-mix(in srgb, var(--sand) 18%, var(--bg)); --act-field: color-mix(in srgb, var(--act) 18%, var(--bg));
  --surface-1: color-mix(in srgb, #fff 6%, var(--bg)); --track: color-mix(in srgb, #fff 12%, var(--bg)); --act-shadow: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* Palettes (Fjord is the default above). Light values, then dark for OS setting and explicit choice. */
:root[data-palette="bernstein"] { --sage: #7d8a4e; --slate: #64798f; --clay: #a8687a; --sand: #b88a2e; --act: #a96c45; --sage-ink-l: #626f2b; --sage-field-l: #e7f0ce; --slate-ink-l: #546b84; --slate-field-l: #dfedfc; --clay-ink-l: #975166; --clay-field-l: #ffdfe9; --sand-ink-l: #905e00; --sand-field-l: #fee8c2; --act-ink-l: #985528; --act-field-l: #ffe2cc; --act-fill-l: #a6653c; }
:root[data-palette="wald"]      { --sage: #4f7a62; --slate: #5f7d96; --clay: #b5735c; --sand: #a9842f; --act: #3f6650; --sage-ink-l: #43745a; --sage-field-l: #d9f3e3; --slate-ink-l: #4b6d88; --slate-field-l: #dceefd; --clay-ink-l: #9a533b; --clay-field-l: #ffe1d3; --sand-ink-l: #8a6100; --sand-field-l: #fce9c2; --act-ink-l: #3f6650; --act-field-l: #dbf2e3; --act-fill-l: #3f6650; }
:root[data-palette="salbei"]    { --sage: #6f8770; --slate: #6f7f95; --clay: #a87f6e; --sand: #a8935f; --act: #24282a; --sage-ink-l: #567058; --sage-field-l: #e1f0e1; --slate-ink-l: #596a82; --slate-field-l: #e0ecfd; --clay-ink-l: #8a5e4c; --clay-field-l: #ffe5db; --sand-ink-l: #7d662b; --sand-field-l: #f6eacd; --act-ink-l: #24282a; --act-field-l: #e9eced; --act-fill-l: #24282a; }
:root[data-palette="pflaume"]   { --sage: #7d6a8f; --slate: #66829a; --clay: #b67f76; --sand: #b48a4c; --act: #6e5a82; --sage-ink-l: #756089; --sage-field-l: #f1e6fd; --slate-ink-l: #4e6c87; --slate-field-l: #ddeefc; --clay-ink-l: #92584f; --clay-field-l: #ffe2dc; --sand-ink-l: #8c600c; --sand-field-l: #ffe7c5; --act-ink-l: #6e5a82; --act-field-l: #f1e5ff; --act-fill-l: #6e5a82; }
/* Zen (after "Zen Inspired", owner 2026-11-18, version B): also sets its own paper, cards and text, so every dark block below repeats them. */
:root[data-palette="zen"]       { --bg: #e9e4d8; --surface-1: #f4efe4; --surface-2: #e3ddcf; --ink: #1e1e1e; --ink-2: #5e5a52; --ink-3: #67625a; --hair: rgba(30, 30, 30, .14); --sage: #6b8451; --slate: #4c6585; --clay: #f26a4b; --sand: #b7893b; --act: #e76346; --sage-ink-l: #546c3a; --sage-field-l: #deecd3; --slate-ink-l: #4d6687; --slate-field-l: #dbe8f9; --clay-ink-l: #a64832; --clay-field-l: #ffded6; --sand-ink-l: #875d01; --sand-field-l: #f5e4c9; --act-ink-l: #a64832; --act-field-l: #ffded6; --act-fill-l: #b4503a; }
/* Orient, Swirl, Allports: the owner's three ColorSense palettes (2026-11-18); like Zen they set paper and text, repeated in the dark blocks. */
:root[data-palette="orient"] { --bg: #ebe3d7; --surface-2: #e0d6c7; --ink-2: #5c5853; --ink-3: #68645f; --sage: #5fa0a6; --slate: #026884; --clay: #9b2f15; --sand: #ca933e; --act: #e1440a; --sage-ink-l: #2b6e74; --sage-field-l: #d5f2f4; --slate-ink-l: #0e6d89; --slate-field-l: #d1f1ff; --clay-ink-l: #9b2f15; --clay-field-l: #ffe5de; --sand-ink-l: #885b02; --sand-field-l: #ffe7c8; --act-ink-l: #ae4121; --act-field-l: #fee5dd; --act-fill-l: #d53e02; }
:root[data-palette="swirl"] { --bg: #e8e6e3; --surface-2: #dcd9d6; --ink: #1f1a2e; --ink-2: #5a595f; --ink-3: #66656b; --on-accent: #f4f3f2; --sage: #2a461d; --slate: #7e88c3; --clay: #bd5f69; --sand: #ca9d42; --act: #2d224e; --sage-ink-l: #2a461d; --sage-field-l: #e1f1db; --slate-ink-l: #5a629a; --slate-field-l: #e6eaff; --clay-ink-l: #a44954; --clay-field-l: #ffe4e5; --sand-ink-l: #835f03; --sand-field-l: #fce9c6; --act-ink-l: #2d224e; --act-field-l: #dfe4fa; --act-fill-l: #2d224e; }
:root[data-palette="allports"] { --bg: #f5ece6; --surface-2: #ecdfd6; --ink-2: #655d5c; --ink-3: #706967; --sage: #4a925c; --slate: #666aab; --clay: #c10d16; --sand: #fdad30; --act: #0b7b9b; --sage-ink-l: #2f7844; --sage-field-l: #d5f5da; --slate-ink-l: #6063a3; --slate-field-l: #e7eaff; --clay-ink-l: #c10d16; --clay-field-l: #ffe4e0; --sand-ink-l: #915e01; --sand-field-l: #ffe7ca; --act-ink-l: #047290; --act-field-l: #d2f1fe; --act-fill-l: #0b7b9b; }
:root[data-palette="mango"]    { --bg: #eedec0; --surface-1: #f8efd9; --surface-2: #e2cb9f; --ink: #26180e; --ink-2: #513b29; --ink-3: #624a36; --hair: rgba(38, 24, 14, .18); --on-accent: #ffffff; --sage: #336d53; --slate: #2450ff; --clay: #b4432d; --sand: #9e6b20; --act: #2450ff; --sage-ink-l: #23543e; --sage-field-l: #d1ecdd; --slate-ink-l: #193fd6; --slate-field-l: #d7e0ff; --clay-ink-l: #8f311e; --clay-field-l: #fcd9d0; --sand-ink-l: #70490c; --sand-field-l: #f7dcb0; --act-ink-l: #193fd6; --act-field-l: #d7e0ff; --act-fill-l: #2450ff; --lb-glass: rgba(248, 239, 217, .68); --lb-line: rgba(255, 255, 255, .86); --lb-shadow: rgba(38, 24, 14, .24); }
:root[data-palette="midnight"] { --bg: #eef4f8; --surface-1: #f8fbfd; --surface-2: #dde8f0; --ink: #01152d; --ink-2: #394f66; --ink-3: #4f6780; --hair: rgba(1, 21, 45, .15); --on-accent: #ffffff; --sage: #118e70; --slate: #073775; --clay: #b84a39; --sand: #b07f26; --act: #026cb9; --sage-ink-l: #075863; --sage-field-l: #d4f3ea; --slate-ink-l: #073775; --slate-field-l: #d9e6fa; --clay-ink-l: #973526; --clay-field-l: #fde0da; --sand-ink-l: #7d560e; --sand-field-l: #f9e7c2; --act-ink-l: #026cb9; --act-field-l: #d7ecff; --act-fill-l: #026cb9; --lb-glass: rgba(248, 251, 253, .72); --lb-line: rgba(255, 255, 255, .94); --lb-shadow: rgba(1, 21, 45, .20); }
@media (prefers-color-scheme: dark) {
  :root[data-palette="bernstein"]:not([data-theme="light"]) { --sage: #a9b46f; --slate: #93a6bd; --clay: #c98898; --sand: #e2b866; --act: #d9946a; }
  :root[data-palette="wald"]:not([data-theme="light"])      { --sage: #79a88c; --slate: #8aa6bf; --clay: #d39379; --sand: #ddb968; --act: #79a88c; }
  :root[data-palette="salbei"]:not([data-theme="light"])    { --sage: #98ae98; --slate: #9aaac0; --clay: #cfa695; --sand: #d6c39b; --act: #eceeea; }
  :root[data-palette="pflaume"]:not([data-theme="light"])   { --sage: #a693b8; --slate: #93adc0; --clay: #dcaaa1; --sand: #e2bd85; --act: #a693b8; }
  :root[data-palette="zen"]:not([data-theme="light"])       { --bg: #141414; --surface-1: #1c1c1c; --surface-2: #222222; --ink: #e8e3da; --ink-2: #a8a39a; --ink-3: #8e8a83; --hair: rgba(232, 227, 218, .13); --sage: #91ac77; --slate: #8aa5c9; --clay: #e78973; --sand: #e3b366; --act: #e78973; }
  :root[data-palette="orient"]:not([data-theme="light"]) { --bg: #0f1b20; --surface-2: #1d282c; --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #828882; --sage: #70b1b7; --slate: #60b1cf; --clay: #f18b72; --sand: #eeb562; --act: #f08b6f; }
  :root[data-palette="swirl"]:not([data-theme="light"]) { --bg: #15112a; --surface-2: #221e36; --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #7c827c; --on-accent: #15112a; --sage: #8cac7e; --slate: #95a0dd; --clay: #ea8890; --sand: #e3b55b; --act: #a59cd2; }
  :root[data-palette="allports"]:not([data-theme="light"]) { --bg: #1c1413; --surface-2: #2a2120; --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #7c827c; --sage: #6bb37b; --slate: #999fe4; --clay: #ef867b; --sand: #f2b157; --act: #52afd1; }
  :root[data-palette="mango"]:not([data-theme="light"])    { --bg: #1b130d; --surface-1: #261b13; --surface-2: #32241a; --ink: #f6ecda; --ink-2: #c2b098; --ink-3: #9f8c74; --hair: rgba(246, 236, 218, .14); --on-accent: #101423; --sage: #72b898; --slate: #7d99ff; --clay: #ec8b75; --sand: #e2b05c; --act: #708eff; --lb-glass: rgba(38, 27, 19, .66); --lb-line: rgba(246, 236, 218, .16); --lb-shadow: rgba(0, 0, 0, .72); }
  :root[data-palette="midnight"]:not([data-theme="light"]) { --bg: #01152d; --surface-1: #052040; --surface-2: #092b52; --ink: #edf4fa; --ink-2: #9cb8d1; --ink-3: #7798b6; --hair: rgba(237, 244, 250, .15); --on-accent: #01152d; --sage: #36c49e; --slate: #5eb7f8; --clay: #f08e7c; --sand: #ebb965; --act: #4daeff; --lb-glass: rgba(7, 55, 117, .38); --lb-line: rgba(94, 183, 248, .22); --lb-shadow: rgba(0, 0, 0, .75); }
}
:root[data-theme="dark"][data-palette="bernstein"] { --sage: #a9b46f; --slate: #93a6bd; --clay: #c98898; --sand: #e2b866; --act: #d9946a; }
:root[data-theme="dark"][data-palette="wald"]      { --sage: #79a88c; --slate: #8aa6bf; --clay: #d39379; --sand: #ddb968; --act: #79a88c; }
:root[data-theme="dark"][data-palette="salbei"]    { --sage: #98ae98; --slate: #9aaac0; --clay: #cfa695; --sand: #d6c39b; --act: #eceeea; }
:root[data-theme="dark"][data-palette="pflaume"]   { --sage: #a693b8; --slate: #93adc0; --clay: #dcaaa1; --sand: #e2bd85; --act: #a693b8; }
:root[data-theme="dark"][data-palette="zen"]       { --bg: #141414; --surface-1: #1c1c1c; --surface-2: #222222; --ink: #e8e3da; --ink-2: #a8a39a; --ink-3: #8e8a83; --hair: rgba(232, 227, 218, .13); --sage: #91ac77; --slate: #8aa5c9; --clay: #e78973; --sand: #e3b366; --act: #e78973; }
:root[data-theme="dark"][data-palette="orient"] { --bg: #0f1b20; --surface-2: #1d282c; --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #828882; --sage: #70b1b7; --slate: #60b1cf; --clay: #f18b72; --sand: #eeb562; --act: #f08b6f; }
:root[data-theme="dark"][data-palette="swirl"] { --bg: #15112a; --surface-2: #221e36; --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #7c827c; --on-accent: #15112a; --sage: #8cac7e; --slate: #95a0dd; --clay: #ea8890; --sand: #e3b55b; --act: #a59cd2; }
:root[data-theme="dark"][data-palette="allports"] { --bg: #1c1413; --surface-2: #2a2120; --ink: #eceeea; --ink-2: #a0a6a0; --ink-3: #7c827c; --sage: #6bb37b; --slate: #999fe4; --clay: #ef867b; --sand: #f2b157; --act: #52afd1; }
:root[data-theme="dark"][data-palette="mango"]    { --bg: #1b130d; --surface-1: #261b13; --surface-2: #32241a; --ink: #f6ecda; --ink-2: #c2b098; --ink-3: #9f8c74; --hair: rgba(246, 236, 218, .14); --on-accent: #101423; --sage: #72b898; --slate: #7d99ff; --clay: #ec8b75; --sand: #e2b05c; --act: #708eff; --lb-glass: rgba(38, 27, 19, .66); --lb-line: rgba(246, 236, 218, .16); --lb-shadow: rgba(0, 0, 0, .72); }
:root[data-theme="dark"][data-palette="midnight"] { --bg: #01152d; --surface-1: #052040; --surface-2: #092b52; --ink: #edf4fa; --ink-2: #9cb8d1; --ink-3: #7798b6; --hair: rgba(237, 244, 250, .15); --on-accent: #01152d; --sage: #36c49e; --slate: #5eb7f8; --clay: #f08e7c; --sand: #ebb965; --act: #4daeff; --lb-glass: rgba(7, 55, 117, .38); --lb-line: rgba(94, 183, 248, .22); --lb-shadow: rgba(0, 0, 0, .75); }

* { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { height: 100%; overscroll-behavior: none; touch-action: pan-y; }
body {
  margin: 0; min-width: 320px;
  overflow: hidden; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--act-ink); outline-offset: 3px; }


/* App-like: the page itself never scrolls; only the content area (main) inside the app does */
html, body { overflow: hidden; overflow: clip; }
.app-shell {
  position: relative; display: flex; flex-direction: column; height: 100%; width: min(100%, 760px); margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) 0 max(0px, env(safe-area-inset-left));
  background: var(--bg);
  overflow-x: clip;
}

@media (orientation: portrait) and (max-width: 760px) {
  .app-shell {
    width: 100%;
    max-width: 100%;
  }
}

.site-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 20px 12px; }
.brand { order: 2; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.brand-mark { width: 7px; height: 7px; background: var(--act); display: inline-block; font-size: 0; }
.header-meta { order: 1; min-width: 0; color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; white-space: nowrap; }
body.session-open .site-header { display: none; }
.header-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.icon-button { display: flex; align-items: center; gap: 6px; height: 38px; min-width: 34px; padding: 0 10px; border: 1.5px solid var(--hair); border-radius: 0; background: transparent; color: var(--ink); font-weight: 700; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.icon-button span { font-size: 1rem; }
.icon-button small { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.icon-button.speaker-btn { position: relative; justify-content: center; width: 38px; min-width: 38px; height: 38px; padding: 0; gap: 0; border-radius: 50%; background: var(--act-fill); color: var(--on-accent); border-color: transparent; }
.icon-button.speaker-btn::before, .icon-button.speaker-btn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--act); opacity: 0; pointer-events: none; }
.icon-button.speaker-btn.speaking::before { animation: speaker-ripple 1.2s ease-out infinite; }
.icon-button.speaker-btn.speaking::after { animation: speaker-ripple 1.2s ease-out .6s infinite; }
@keyframes speaker-ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
body.no-animations .icon-button.speaker-btn.speaking::before { animation: none; opacity: .6; transform: scale(1.25); }
body.no-animations .icon-button.speaker-btn.speaking::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .icon-button.speaker-btn.speaking::before, .icon-button.speaker-btn.speaking::after { animation: none; } }
.verb-row { display: flex; align-items: center; gap: 10px; }
.solution-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hidden { display: none !important; }
main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; animation: screen-in .25s ease both; scrollbar-width: none; padding: 0 20px; display: flex; flex-direction: column; container-type: inline-size; }
main > .screen { flex: 1 0 auto; }
body.session-open main { padding-top: 6px; }
main::-webkit-scrollbar { width: 0; height: 0; display: none; }
#app:focus { outline: none; }

/* Bottom tab bar */
.tabbar { flex: 0 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0 8px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); background: var(--bg); }
.tabbar button { position: relative; min-height: 50px; padding: 12px 0 4px; border: 0; background: transparent; color: var(--ink-2); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tabbar button.active { color: var(--ink); }
.tabbar > button[hidden] { display: none; }
.tabbar button.active::before { content: ""; position: absolute; top: -1px; left: 24%; right: 24%; height: 2.5px; background: var(--ink); }
body.session-open .tabbar { display: none; }
body.session-open .app-shell { padding-bottom: env(safe-area-inset-bottom); }

.screen { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; padding-bottom: 20px; width: 100%; max-width: 100%; min-width: 0; }
.screen.bleed-bottom { padding-bottom: 0; }
.hero { display: grid; gap: 6px; padding: 4px 0 2px; }
.hero-tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero-tag { border: 1px solid var(--hair); padding: 5px 10px; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.eyebrow, .kicker { color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; letter-spacing: .02em; font-weight: 500; text-transform: none; }
h1, h2, h3, p { margin: 0; }
h1 { margin: 2px 0 6px; color: var(--ink); font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: clamp(2.6rem, 9vw + 2vh, 4.6rem); line-height: .88; letter-spacing: -.005em; text-transform: uppercase; overflow-wrap: anywhere; }
h1 .line { display: block; }
.subtitle { max-width: 42ch; color: var(--ink-2); line-height: 1.55; font-size: .9rem; }

.panel, .stat-card, .question-card, .review-item, .achievement, .empty-state {
  position: relative; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.panel { padding: 14px 0 0; border-top: 1.5px solid var(--ink); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title > * { min-width: 0; overflow-wrap: anywhere; }
.section-title h2 { font-family: var(--font-display); font-stretch: 80%; color: var(--ink); font-size: 1rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.section-title span { color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.stat-card { min-height: 78px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg); }
.stat-label { color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .02em; }
.stat-value { color: var(--ink); font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: 2.25rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-suffix { font-size: .9rem; color: var(--ink-2); margin-left: 2px; font-weight: 600; }
.action-grid { display: grid; gap: 10px; }

/* Lists of choices (modes, levels, chapters) read as rows, not cards */
.mode-card { width: 100%; text-align: left; cursor: pointer; display: grid; gap: 4px; padding: 14px 34px 14px 0; border-top: 1px solid var(--hair); font-family: var(--font-body); color: var(--ink); transition: background .15s ease, padding .15s ease; }
.mode-card.panel { border-top: 1px solid var(--hair); }
.mode-card::after { content: "→"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 1.2rem; transition: transform .15s ease, color .15s ease; }
.mode-card-title { font-family: var(--font-display); font-stretch: 72%; font-size: 1.75rem; line-height: .95; font-weight: 800; color: var(--ink); margin: 2px 0; text-transform: uppercase; }
/* Ganzes Glossar: its text takes the action colour (like Üben starten), so it follows every palette. */
.mode-card.glossary-card .mode-card-title, .mode-card.glossary-card .kicker, .mode-card.glossary-card .page-copy { color: var(--act-ink); }
.mode-card.chapter-resume { background: var(--sage-field); padding-left: 14px; border-top-color: var(--sage); }
.resume-meter { width: 100%; height: 3px; margin-top: 10px; accent-color: var(--sage); }
.resume-action { display: block; margin-top: 6px; color: var(--sage-ink); font-weight: 700; }
.mode-card:active { background: var(--surface-2); }
.mode-card:disabled, .mode-card[aria-busy="true"] { cursor: wait; opacity: .6; }
.done-tag { position: absolute; top: 14px; right: 34px; font-family: var(--font-mono); color: var(--sage-ink); font-size: .7rem; pointer-events: none; }
.mode-card.dogear { clip-path: none; }
.mode-card.dogear::before { content: none; }

.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; }
.glossary-controls { display: grid; gap: 10px; }
.glossary-search-label { color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; }
.glossary-search { width: 100%; min-height: 46px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding: 0 2px; color: var(--ink); background: transparent; font-size: 1rem; font-weight: 500; }
.glossary-search::placeholder { color: var(--ink-3); }
.chapter-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
.b1-chapter-tabs, .a1-chapter-tabs, .a2-chapter-tabs, .b1plus-chapter-tabs, .b2-chapter-tabs { flex-wrap: wrap; }
.chapter-tab { flex: 0 0 auto; min-height: 40px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 0; background: transparent; color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.chapter-tab.active, .chapter-tab[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chapter-tab:disabled, .chapter-tab[aria-busy="true"] { cursor: not-allowed; opacity: .5; }
.glossary-chapter-picker { display: none; }
.glossary-chapter-picker label { color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; }
.glossary-chapter-select { width: 100%; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 0; background: var(--bg); color: var(--ink); font: 600 .9rem var(--font-body); }
.glossary-result-count { color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; }
#b1-glossary-results, #a1-glossary-results, #a2-glossary-results, #b1plus-glossary-results, #b2-glossary-results { display: grid; gap: 22px; }
.glossary-chapter { display: grid; gap: 12px; }
.glossary-chapter > h2 { padding-bottom: 6px; border-bottom: 1.5px solid var(--ink); color: var(--ink); font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.4rem; text-transform: uppercase; }
.glossary-section { display: grid; gap: 6px; }
.glossary-section h3 { color: var(--ink-2); font-family: var(--font-mono); font-weight: 500; font-size: .7rem; }
.glossary-table { width: 100%; table-layout: fixed; border-collapse: collapse; border-top: 1px solid var(--hair); background: transparent; }
.glossary-table .activity-column { width: 3.6rem; }
.glossary-table th, .glossary-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.glossary-table th { color: var(--ink-2); font-family: var(--font-mono); font-weight: 500; font-size: .7rem; text-transform: uppercase; }
.glossary-table td { color: var(--ink); font-size: .9rem; line-height: 1.45; font-weight: 500; }
.glossary-table td[lang="en"] { color: var(--ink-2); font-family: var(--font-italic); font-style: italic; font-size: .9rem; }
.glossary-table .glossary-activity { color: var(--clay-ink); font-family: var(--font-mono); font-size: .7rem; white-space: nowrap; }
.glossary-table td[lang="de"] { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.glossary-table .gl-say { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: -5px 0 -5px 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
/* Only while it speaks: on phones a tapped button keeps :hover, so the hover look is for mouse devices only */
.glossary-table .gl-say.speaking { color: var(--act-ink); background: var(--act-field); }
@media (hover: hover) { .glossary-table .gl-say:hover { color: var(--act-ink); } }
.glossary-best h2 { color: var(--act-ink); }
.glossary-best .glossary-table { border-top-color: var(--act); }
.glossary-error { display: grid; gap: 10px; border-top-color: var(--clay); }
.glossary-error h2 { color: var(--clay-ink); font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.4rem; text-transform: uppercase; }
.glossary-error p { color: var(--ink); line-height: 1.5; font-size: .9rem; }
.glossary-error button { width: 100%; }

.primary-button, .secondary-button, .option-button, .text-button, .danger-button {
  min-height: 50px; border-radius: 0; border: 1.5px solid var(--ink); font-weight: 700; letter-spacing: .01em;
  transition: background .15s ease, border-color .15s ease, color .15s ease; font-size: .9rem;
}
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; min-height: 58px; background: var(--act-fill); border-color: var(--act-fill); color: var(--on-accent); text-align: left; }
.secondary-button { padding: 0 17px; background: transparent; color: var(--ink); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button-row > * { flex: 1 1 140px; }
.database-actions { margin-top: 12px; }

.icon-button.active { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.difficulty-option.active { border-color: var(--ink); background: var(--ink); color: var(--bg); }

.progress-meter, .bar-meter {
  width: 100%; height: 3px; overflow: hidden; border: 0; border-radius: 0; appearance: none; -webkit-appearance: none;
  background: var(--hair);
}
.progress-meter::-webkit-progress-bar, .bar-meter::-webkit-progress-bar { background: transparent; }
.progress-meter::-webkit-progress-value, .bar-meter::-webkit-progress-value { background: var(--sage); }
.progress-meter::-moz-progress-bar, .bar-meter::-moz-progress-bar { background: var(--sage); }
.bar-meter { height: 8px; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; }
.quiz-meta span { min-width: 0; overflow-wrap: anywhere; }
.quiz-meta .repeat-tag { color: var(--act-ink); font-weight: 500; }
.quiz-score { color: var(--sand-ink); }
.question-card { padding: 6px 0 0; display: grid; gap: 14px; }
.verb-word { color: var(--ink); font-family: var(--font-display); font-stretch: 66%; font-weight: 800; font-size: clamp(2.8rem, 10vw + 2vh, 5rem); line-height: .9; overflow-wrap: anywhere; }
.meaning { color: var(--ink-2); font-family: var(--font-italic); font-style: italic; font-size: 1rem; }
.prompt { font-size: clamp(1.05rem, 4.2vw, 1.35rem); line-height: 1.5; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.blank { color: var(--act-ink); border-bottom: 2px solid var(--act); padding: 0 .15em .08em; }
.options { display: grid; gap: 0; border-top: 1px solid var(--hair); }
.option-button { width: 100%; display: grid; grid-template-columns: 34px 1fr; align-items: center; text-align: left; padding: 0 12px 0 4px; border: 0; border-bottom: 1px solid var(--hair); background: transparent; color: var(--ink); font-weight: 500; font-size: 1rem; overflow-wrap: anywhere; }
.option-button > span:last-child { min-width: 0; }
.option-key { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--hair); color: var(--ink-2); font-family: var(--font-mono); font-size: .7rem; }
.option-button:disabled { cursor: default; }
.option-button.correct { background: var(--sage-field); color: var(--ink); box-shadow: inset 3px 0 0 var(--sage); }
.option-button.correct .option-key { border-color: var(--sage); background: var(--sage); color: var(--on-accent); }
.option-button.wrong { background: var(--clay-field); color: var(--ink-2); box-shadow: inset 3px 0 0 var(--clay); text-decoration: line-through; text-decoration-color: var(--clay); }
.option-button.wrong .option-key { border-color: var(--clay); color: var(--clay-ink); }
.option-button.muted-option { opacity: .4; }
.feedback { display: grid; gap: 8px; padding: 14px 16px; background: var(--sage-field); font-size: .9rem; line-height: 1.5; }
.feedback > * { min-width: 0; overflow-wrap: anywhere; }
.feedback.wrong-feedback { background: var(--clay-field); }
.feedback strong { display: block; font-family: var(--font-display); font-stretch: 75%; color: var(--sage-ink); font-size: 1.4rem; font-weight: 800; text-transform: uppercase; line-height: 1; }
.feedback.wrong-feedback strong { color: var(--clay-ink); }
[data-action="next-question"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.timer { color: var(--ink); font-family: var(--font-mono); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 2px 0 6px; }
.page-heading h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.page-copy { color: var(--ink-2); line-height: 1.55; font-size: .9rem; overflow-wrap: anywhere; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.metric-grid .stat-card { background: var(--bg); }
.wide-card { grid-column: span 2; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, .75fr) 1.8fr auto; align-items: center; gap: 10px; color: var(--ink); font-size: .8rem; font-weight: 500; }
.bar-row span { min-width: 0; overflow-wrap: anywhere; }
.bar-row strong { font-family: var(--font-mono); font-weight: 500; font-size: .8rem; color: var(--ink-2); }
.bar-row.bad .bar-meter::-webkit-progress-value { background: var(--clay); }
.bar-row.bad .bar-meter::-moz-progress-bar { background: var(--clay); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; color: var(--ink); font-size: .9rem; font-weight: 700; }
.setting-row small { display: block; color: var(--ink-2); margin-top: 3px; font-size: .8rem; line-height: 1.4; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border: 1.5px solid var(--ink); background: transparent; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; background: var(--ink-3); transition: .2s; }
.switch input:checked + span { background: var(--act-fill); border-color: var(--act); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--on-accent); }
.switch input:focus-visible + span { outline: 2px solid var(--act); outline-offset: 3px; }
.file-input { width: 100%; border: 1px dashed var(--hair); padding: 11px; color: var(--ink-2); font-size: .8rem; background: transparent; }
.danger-button { padding: 0 15px; color: var(--clay-ink); border-color: var(--clay); background: transparent; }

/* Appearance picker (settings) */
.appearance { display: grid; gap: 16px; }
.appearance-label { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); }
.theme-options button { min-height: 42px; border: 0; background: transparent; color: var(--ink-2); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.theme-options button + button { border-left: 1.5px solid var(--ink); }
.theme-options button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.palette-list { display: grid; border-top: 1px solid var(--hair); }
.palette-option { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--hair); background: transparent; color: var(--ink); text-align: left; }
.palette-swatch { display: flex; height: 30px; }
.palette-swatch i { flex: 1; }
.palette-option strong { display: block; font-size: .9rem; font-weight: 700; }
.palette-option small { display: block; color: var(--ink-2); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.palette-check { width: 22px; height: 22px; border: 1.5px solid var(--hair); display: grid; place-items: center; font-size: .8rem; color: transparent; }
.palette-option[aria-pressed="true"] .palette-check { background: var(--act-fill); border-color: var(--act-fill); color: var(--on-accent); }

.achievement-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.achievement { padding: 14px 12px; min-height: 130px; display: grid; align-content: space-between; gap: 8px; background: var(--bg); }
.achievement.locked { opacity: .45; filter: grayscale(1); }
.achievement-icon { color: var(--sand-ink); font-size: 1.4rem; }
.achievement strong { color: var(--ink); font-size: .9rem; font-weight: 700; }
.achievement small { color: var(--ink-2); line-height: 1.4; font-size: .7rem; }
.review-item { padding: 12px 0 12px 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--hair); }
.review-item.correct-review { box-shadow: inset 3px 0 0 var(--sage); }
.review-item.wrong-review { box-shadow: inset 3px 0 0 var(--clay); }
.review-head { display: flex; justify-content: space-between; gap: 10px; color: var(--ink); font-weight: 700; }
.review-head > * { min-width: 0; overflow-wrap: anywhere; }
.review-head span { font-family: var(--font-mono); font-weight: 500; font-size: .7rem; color: var(--ink-2); }
.review-item p { color: var(--ink-2); font-size: .8rem; line-height: 1.5; }
.review-item code { color: var(--ink); font-family: inherit; font-weight: 700; }
.review-item .stamp { display: none; }
.smudge-word { text-decoration: line-through; text-decoration-color: var(--clay); text-decoration-thickness: 2px; }
.grade {
  display: block; width: fit-content; margin: 0; padding: 0; border: 0;
  color: var(--ink); font-family: var(--font-display); font-stretch: 66%; font-weight: 800; font-size: clamp(5rem, 22vw, 7.5rem); line-height: .85; font-variant-numeric: tabular-nums;
}
.empty-state { padding: 22px 0; color: var(--ink-2); line-height: 1.6; font-size: .9rem; }
.text-button { width: fit-content; justify-self: start; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--ink-2); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; min-height: 0; padding-bottom: 2px; margin-top: 6px; }
.toast-region { position: fixed; z-index: 8; top: max(15px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 32px), 500px); pointer-events: none; }
.toast { padding: 14px 16px; background: var(--ink); color: var(--bg); font-size: .9rem; font-weight: 600; animation: toast-in .25s ease both; box-shadow: inset 3px 0 0 var(--sand); }
.toast.error { box-shadow: inset 3px 0 0 var(--clay); }
.modal { position: fixed; z-index: 7; inset: 0; display: grid; align-items: center; justify-items: center; padding: 20px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left)); background: var(--scrim); animation: modal-fade .18s ease-out; }
/* A card in the middle of the screen: the button that keeps you where you are is the filled one */
.modal-card { width: min(100%, 400px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 26px 22px 22px; border: 1px solid var(--hair); border-radius: 22px; background: var(--surface-1, var(--bg)); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: modal-pop .22s cubic-bezier(.2, .9, .3, 1.1); }
.modal-card .button-row { flex-wrap: nowrap; }
.modal-card .button-row > * { flex: 1 1 0; min-height: 50px; padding: 0 12px; justify-content: center; text-align: center; line-height: 1.15; }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-pop { from { opacity: 0; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .modal, .modal-card { animation: none; } }
.modal-card h2 { color: var(--ink); font-family: var(--font-display); font-stretch: 72%; font-size: 1.75rem; line-height: .95; text-transform: uppercase; margin-bottom: 10px; font-weight: 800; }
.modal-card p { color: var(--ink-2); line-height: 1.55; font-size: .9rem; margin-bottom: 18px; }

/* Home */
.today-figure { display: flex; align-items: flex-end; gap: 12px; }
.today-figure .n { font-family: var(--font-display); font-stretch: 64%; font-weight: 800; font-size: clamp(6rem, 30vw, 9rem); line-height: .82; color: var(--act); font-variant-numeric: tabular-nums; }
.today-figure .lab { padding-bottom: 8px; display: grid; gap: 3px; }
.today-figure .lab b { font-family: var(--font-display); font-stretch: 80%; font-size: 1.4rem; font-weight: 700; line-height: 1; color: var(--act-ink); }
.today-figure .lab i { font-family: var(--font-italic); font-size: 1rem; color: var(--ink-2); }
.course-list { display: grid; }
.course-row { display: grid; grid-template-columns: 26px 1fr auto 16px; align-items: baseline; gap: 10px; width: 100%; padding: 13px 0; border: 0; border-top: 1px solid var(--hair); background: transparent; color: var(--ink); text-align: left; }
.course-row:last-child { border-bottom: 1px solid var(--hair); }
.course-row .k { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.course-row b { font-size: 1rem; font-weight: 600; }
.course-row .c { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); } 20%, 40%, 60%, 80% { transform: translateX(4px); } }
.shake { animation: shake 0.5s ease-in-out; }
@media (min-width: 620px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } .metric-grid { grid-template-columns: repeat(3, 1fr); } .wide-card { grid-column: span 3; } .achievement-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@container (min-width: 620px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } .metric-grid { grid-template-columns: repeat(3, 1fr); } .wide-card { grid-column: span 3; } .achievement-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
/* Hover only for real pointers — prevents sticky flashes on touch */
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover { border-color: var(--ink); }
  .mode-card:hover, .course-row:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
  .mode-card:hover::after { transform: translate(4px, -50%); color: var(--act-ink); }
  .primary-button:hover { background: color-mix(in srgb, var(--act-fill) 88%, var(--ink)); }
  .secondary-button:hover { background: var(--ink); color: var(--bg); }
  .option-button:not(:disabled):hover { background: var(--surface-2); }
  .text-button:hover, .tabbar button:hover { color: var(--ink); }
  .chapter-tab:not(.active):hover { border-color: var(--ink); color: var(--ink); }
  .palette-option:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
}
@media (max-width: 620px) {
  .site-header { margin-bottom: 10px; padding-bottom: 8px; }
  .screen { gap: 12px; }
  .question-card { gap: 12px; }
  .option-button { min-height: 50px; }
  .glossary-table .activity-column { width: 3rem; }
  .glossary-table th, .glossary-table td { padding: 8px 6px 8px 0; }
  .glossary-table td { font-size: .8rem; line-height: 1.4; }
  .b1-chapter-tabs, .a1-chapter-tabs, .a2-chapter-tabs, .b1plus-chapter-tabs, .b2-chapter-tabs { display: none; }
  .glossary-chapter-picker { display: grid; gap: 6px; }
}
@container (max-width: 620px) {
  .site-header { margin-bottom: 10px; padding-bottom: 8px; }
  .screen { gap: 12px; }
  .question-card { gap: 12px; }
  .option-button { min-height: 50px; }
  .glossary-table .activity-column { width: 3rem; }
  .glossary-table th, .glossary-table td { padding: 8px 6px 8px 0; }
  .glossary-table td { font-size: .8rem; line-height: 1.4; }
  .b1-chapter-tabs, .a1-chapter-tabs, .a2-chapter-tabs, .b1plus-chapter-tabs, .b2-chapter-tabs { display: none; }
  .glossary-chapter-picker { display: grid; gap: 6px; }
}

/* Universal Short-Height Viewports (landscape phones, Samsung Pop-up / Split-Screen, virtual keyboard) */
@media (max-height: 600px) {
  .site-header { padding-top: 2px; padding-bottom: 4px; }
  .hero { gap: 2px; padding: 2px 0; }
  h1 { font-size: clamp(1.8rem, 6vw + 3vh, 2.8rem); line-height: .95; }
  .today-ring-wrap { gap: 12px; }
  .today-ring { width: clamp(86px, 22vh, 116px); }
  .today-ring .num b { font-size: clamp(2rem, 9vh, 2.8rem); }
  .lanes { min-height: clamp(130px, 30vh, 200px); }
  .lane { padding: 8px 10px 12px; }
  .lane b { font-size: clamp(1.6rem, 7vh, 2.4rem); }
  .verb-word { font-size: clamp(2rem, 7vh + 2vw, 3.2rem); }
  .question-card { gap: 8px; }
  .option-button { min-height: 44px; }
  .tabbar > button { min-height: calc(40px + max(4px, env(safe-area-inset-bottom))); padding-top: 6px; font-size: .7rem; }
  .tabbar > button.active::after { top: 22px; }
  .action-bar { min-height: 52px; padding-top: 8px; }
  .note-figure .n { font-size: clamp(3.4rem, 16vh, 5.5rem); }
}
@container (max-height: 550px) {
  .hero { gap: 2px; padding: 2px 0; }
  .question-card { gap: 8px; }
  .option-button { min-height: 44px; }
  .action-bar { min-height: 52px; padding-top: 8px; }
}

/* Universal Ultra-Compact Widths (< 360px: Galaxy Fold cover, iPhone SE 1st gen, multi-window splits) */
@container (max-width: 360px) {
  main { padding: 0 12px; }
  .site-header { padding-left: 12px; padding-right: 12px; }
  .action-bar { margin: auto -12px 0; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .home-dock, .swipe-under-dock { padding: 4px 10px; }
  .home-dock > .action-bar, .home-screen > .action-bar, .swipe-under-dock > .action-bar { margin: 0 0 10px; padding: 0 10px 0 8px; gap: 8px; }
  .day-cards { grid-template-columns: 1fr; }
  .hero { gap: 4px; }
  .button-row > * { flex: 1 1 100%; }
  .section-title { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
body.no-animations *, body.no-animations *::before, body.no-animations *::after { animation: none !important; transition: none !important; }


/* ---- Question screens ---- */
.quiz-top { display: flex; align-items: center; gap: 12px; }
.quiz-top .progress-meter { flex: 1; }
.quiz-top .timer, .quiz-top .quiz-score { font-family: var(--font-mono); font-size: .7rem; white-space: nowrap; }
.quiz-close { width: 32px; height: 32px; display: grid; place-items: center; margin-left: -6px; border: 0; background: transparent; color: var(--ink); }
.word-block { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.word-main { display: grid; gap: 6px; min-width: 0; }
.word-block[class*="field-"] { padding: 18px 16px 20px; }
.word-block.field-der { background: var(--slate-field); }
.word-block.field-die { background: var(--clay-field); }
.word-block.field-das { background: var(--sage-field); }
.article-tag { font-family: var(--font-display); font-stretch: 80%; font-weight: 700; font-size: 1.4rem; line-height: 1; margin-top: 4px; }
.a-der { color: var(--slate-ink); } .a-die { color: var(--clay-ink); } .a-das { color: var(--sage-ink); } .a-blank { color: var(--ink-3); }
.plural { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }

/* der · die · das drill */
.artikel-screen { align-content: start; }
.artikel-word { display: grid; gap: 8px; padding: 10px 0 6px; }
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); min-height: clamp(200px, 40vh, 340px); }
.lane { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 14px 12px 22px; border: 0; text-align: left; transition: opacity .15s ease, background .15s ease; }
.lane b { font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1; }
.lane-key { font-family: var(--font-mono); font-size: .7rem; opacity: .7; }
.lane-mark { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lane-der { background: var(--slate-field); color: var(--slate-ink); }
.lane-die { background: var(--clay-field); color: var(--clay-ink); }
.lane-das { background: var(--sage-field); color: var(--sage-ink); }
.lane.is-correct { color: var(--on-accent); }
.lane-der.is-correct { background: var(--slate); } .lane-die.is-correct { background: var(--clay); } .lane-das.is-correct { background: var(--sage); }
.lane.is-dim { opacity: .35; }
.lane.is-wrong { opacity: .6; text-decoration: line-through; }
.lane:disabled { cursor: default; }
@media (hover: hover) and (pointer: fine) { .lane:not(:disabled):hover { filter: brightness(.96); } }

/* ---- Results ---- */
.note-figure { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.note-figure .n { font-family: var(--font-display); font-stretch: 64%; font-weight: 800; font-size: clamp(5.5rem, 26vw, 8rem); line-height: .82; font-variant-numeric: tabular-nums; }
.note-figure .lab { display: grid; gap: 4px; text-align: right; padding-bottom: 8px; }
.note-figure .lab b { font-family: var(--font-display); font-stretch: 80%; font-size: 1.4rem; font-weight: 700; line-height: 1; }
.ruler { position: relative; height: 32px; margin: 0 6px; }
.ruler .bar { position: absolute; left: 0; right: 0; top: 8px; height: 1.5px; background: var(--ink); }
.ruler .tk { position: absolute; top: 4px; width: 1.5px; height: 10px; margin-left: -.75px; background: var(--ink); }
.ruler .lb { position: absolute; top: 17px; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); transform: translateX(-50%); }
.ruler .mk { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; background: var(--act); transform: rotate(45deg); }
.squares { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.squares i { aspect-ratio: 1; background: var(--sage); }
.squares i.w { background: var(--clay); }
.missed { display: grid; }
.missed .eyebrow { margin-bottom: 6px; }
/* Nomen & Artikel: the trainers, then the rules (owner 2026-11-11). */
/* der·die·das: start every noun (owner 2026-11-11, mockup-artikel-start.html): sand surface, the count large, a slate ring. */
.artikel-all { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 14px 14px 14px 18px; border: 1px solid var(--sand); border-radius: var(--r-lg); background: var(--sand-field); color: var(--sand-ink); font: inherit; text-align: left; cursor: pointer; }
.artikel-all > b { font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: 2.6rem; line-height: .9; }
.artikel-all > span { display: grid; gap: 2px; font-weight: 700; color: var(--ink); }
.artikel-all > span small { font: 500 .7rem var(--font-mono); color: var(--ink-2); }
.artikel-all > i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--slate); box-shadow: inset 0 0 0 2px var(--slate); }
.artikel-all > i svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.artikel-all:active { transform: scale(.985); }
.artikel-all:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }
.missed div { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--hair); font-size: .9rem; }
.missed .ar { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; }
.missed .en { font-family: var(--font-italic); font-style: italic; color: var(--ink-2); text-align: right; overflow-wrap: anywhere; }
.all-answers summary { cursor: pointer; padding: 12px 0; border-top: 1px solid var(--hair); font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }

/* ---- Chapters as a transit line ---- */
.line { display: grid; }
.stop { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 54px; padding: 8px 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.stop::before { content: ""; position: absolute; left: 9px; width: 6px; top: 0; bottom: 0; background: var(--track); }
.stop.done::before { background: var(--sage); }
.stop.cur::before { background: linear-gradient(var(--sage) 50%, var(--track) 50%); }
.stop:first-child::before { top: 50%; }
.stop:last-child::before { bottom: 50%; }
.stop .o { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 3px solid var(--track); }
.stop.done .o { border-color: var(--sage); }
.stop.cur .o { border-color: var(--act-fill); background: var(--act-fill); }
.stop .t { display: grid; font-size: 1rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.stop.todo .t { color: var(--ink-2); font-weight: 500; }
.stop .t .n { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; color: var(--ink-2); }
.stop .m { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); white-space: nowrap; }
.stop .here { justify-self: start; margin-top: 4px; padding: 2px 6px; background: var(--act-fill); color: var(--on-accent); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stop .resume-meter { grid-column: 2 / -1; margin-top: 2px; height: 3px; }
@media (hover: hover) and (pointer: fine) { .stop:hover .t { color: var(--act-ink); } }

/* ---- Mockup parity: full-width action bar ---- */
.action-bar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; margin: auto -20px 0; padding: 12px max(22px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); border: 0; background: var(--act-fill); color: var(--on-accent); font-weight: 700; font-size: 1rem; text-align: left; }
.action-bar > span:not(.p):not([aria-hidden]) { display: grid; gap: 2px; }
.action-bar small { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; opacity: .8; }
.action-bar .p { position: absolute; left: 0; top: 0; height: 3px; background: color-mix(in srgb, var(--on-accent) 55%, transparent); }
@media (hover: hover) and (pointer: fine) { .action-bar:hover { background: color-mix(in srgb, var(--act-fill) 88%, var(--ink)); } }

/* ---- Heute ---- */
.home-screen { gap: 18px; }
.today-ring-wrap { display: flex; align-items: center; gap: 18px; }
.today-ring { position: relative; flex: none; width: clamp(140px, 42vw, 176px); aspect-ratio: 1; }
.today-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.today-ring circle { fill: none; stroke-width: 11; }
.today-ring .trk { stroke: var(--track); stroke-dasharray: .86 .14; }
.today-ring .fil { stroke: var(--act); transition: stroke-dasharray .4s ease; }
.today-ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.today-ring .num b { font-family: var(--font-display); font-stretch: 62%; font-weight: 800; font-size: clamp(3.8rem, 15vw, 4.9rem); line-height: .8; color: var(--act-ink); font-variant-numeric: tabular-nums; }
.today-ring .num small { margin-top: 6px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-2); }
.today-ring-wrap .today-figure { display: grid; gap: 4px; align-items: start; }
.today-ring-wrap .today-figure .lab { padding: 0; }
.today-ring-wrap .today-figure .lab b { font-size: 1.4rem; }
.day-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.day-card { display: grid; gap: 3px; align-content: start; min-width: 0; padding: 10px 11px 11px; border: 0; text-align: left; color: var(--ink); font-family: var(--font-body); }
.day-card .k { font-family: var(--font-mono); font-size: .7rem; letter-spacing: 0; color: var(--ink-2); text-transform: uppercase; }
.day-card b { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1rem; line-height: 1.08; overflow-wrap: anywhere; }
.day-card small { font-family: var(--font-italic); font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; }
.day-card.verb { background: var(--sand-field); box-shadow: inset 0 2px 0 var(--sand); }
.day-card.word { background: var(--clay-field); box-shadow: inset 0 2px 0 var(--clay); }
.day-card .a-der { color: var(--slate-ink); } .day-card .a-die { color: var(--clay-ink); } .day-card .a-das { color: var(--sage-ink); }
.day-card.is-loading b { color: var(--ink-3); }
.day-card:active { filter: brightness(.92); }
.course-row { row-gap: 6px; }
.course-row .mini { grid-column: 2 / 4; position: relative; height: 2px; background: var(--track); }
.course-row .mini i { position: absolute; inset: 0 auto 0 0; background: var(--sage); }
.week-block { display: grid; gap: 8px; }
.streak { display: flex; justify-content: space-between; align-items: baseline; }
.streak b { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; color: var(--sand-ink); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week div { display: grid; gap: 4px; justify-items: center; }
.week span { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); text-align: center; }
.week .t span { color: var(--ink); font-weight: 700; }
.course-row { grid-template-columns: 26px 1fr auto; }
.home-dock, .swipe-under-dock { flex: 0 0 auto; padding: 6px 14px; background: var(--bg); }
.home-dock:empty, .swipe-under-dock:empty { display: none; padding: 0; }
.home-dock > .action-bar, .home-screen > .action-bar, .swipe-under-dock > .action-bar { position: relative; width: 100%; min-height: 52px; height: 52px; margin: 0 0 10px; padding: 0 16px 0 10px; border-radius: 22px; background: var(--act-fill); background: linear-gradient(100deg, var(--act-fill), color-mix(in srgb, var(--act-fill) 55%, var(--sand-ink))); color: var(--on-accent); display: flex; align-items: center; gap: 12px; border: 0; cursor: pointer; transition: transform .15s ease, filter .15s ease; } /* "Abendrot": the accent runs into sand (owner pick, mockup-startleiste-farben.html F); title stays >= 4.5:1 in every palette */
.home-dock > .action-bar:active, .home-screen > .action-bar:active, .swipe-under-dock > .action-bar:active { transform: scale(.985); filter: brightness(.93); }
@media (hover: hover) and (pointer: fine) {
  .home-dock > .action-bar:hover, .home-screen > .action-bar:hover, .swipe-under-dock > .action-bar:hover { filter: brightness(1.05); }
}
.action-bar .ab-ring { position: relative; width: 34px; height: 34px; flex: none; display: grid; place-content: center; }
.action-bar .ab-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.action-bar .ab-ring circle { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.action-bar .ab-ring .ab-ring-trk { stroke: color-mix(in srgb, var(--on-accent) 26%, transparent); }
.action-bar .ab-ring .ab-ring-fil { stroke: var(--on-accent); transition: stroke-dasharray .4s ease; }
.action-bar .ab-ring-val { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; color: var(--on-accent); letter-spacing: -.03em; }
.action-bar .ab-ring-val small { font-size: .5rem; opacity: .7; }
.home-dock > .action-bar .ab-content, .home-screen > .action-bar .ab-content, .swipe-under-dock > .action-bar .ab-content { flex: 1; min-width: 0; display: grid; gap: 2px; }
.home-dock > .action-bar .ab-title, .home-screen > .action-bar .ab-title, .swipe-under-dock > .action-bar .ab-title { font-weight: 700; font-size: .9rem; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-dock > .action-bar .ab-sub, .home-screen > .action-bar .ab-sub, .swipe-under-dock > .action-bar .ab-sub { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; opacity: .85; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-dock > .action-bar .ab-arrow, .home-screen > .action-bar .ab-arrow, .swipe-under-dock > .action-bar .ab-arrow { flex: none; display: grid; place-content: center; }
.action-bar .ab-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Konjugation table ---- */
.conj-screen { gap: 14px; }
.conj-screen .verb { display: grid; gap: 4px; }
.conj-screen .verb-word { font-size: clamp(3.4rem, 15vw, 4.6rem); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.ctable { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-top: 1.5px solid var(--ink); }
.ctable > * { padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 1rem; }
.ctable .p { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); padding-top: 13px; }
.ctable .f { font-weight: 500; }
.ctable .f.dim { color: var(--ink-3); }
.ctable .f.in { display: flex; align-items: center; gap: 8px; margin: 3px 0; padding: 0 10px; background: var(--surface-2); box-shadow: inset 0 -2.5px 0 var(--act); font-weight: 700; min-height: 40px; }
.ctable .f.in input { width: 100%; min-height: 40px; border: 0; background: transparent; color: var(--ink); font-size: 1rem; font-weight: 700; outline: none; }
.ctable .f.in:focus-within { outline: 2px solid var(--act-ink); outline-offset: 2px; } /* the input has no outline; the cell shows the app's focus ring */
.ctable .f.in.ok { background: var(--sage-field); box-shadow: inset 0 -2.5px 0 var(--sage); }
.ctable .f.in.bad { background: var(--clay-field); box-shadow: inset 0 -2.5px 0 var(--clay); }
.ctable .f.in s { color: var(--clay-ink); font-weight: 500; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 -20px; background: var(--hair); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.keys button { min-height: 48px; border: 0; background: var(--bg); color: var(--ink); font-size: 1.2rem; font-weight: 600; }
.keys button:active { background: var(--surface-2); }

/* ---- der · die · das (mockup) ---- */
.artikel-screen { gap: 14px; }
.artikel-word { padding: 18px 0 10px; }
.artikel-word .verb-word { font-size: clamp(3.2rem, 15vw, 4.4rem); }
.artikel-word .sup { display: inline-block; margin-right: 10px; font-stretch: 80%; font-weight: 700; font-size: .42em; vertical-align: top; transform: translateY(.35em); }
.artikel-screen .lanes { margin: auto -20px 0; min-height: clamp(240px, 42vh, 340px); }
.artikel-screen .lane { padding: 16px 14px 30px; }


/* ---- Note ---- */
.results-top { display: flex; justify-content: space-between; align-items: center; }
.results-top .quiz-close { margin-right: -6px; }
.results .note-figure .lab { gap: 6px; }

/* ---- Linie ---- */
.line-screen { gap: 14px; }
.course-head { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1.5px solid var(--ink); }
.course-head h1 { margin: 0; }
.course-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.stop { min-height: 48px; padding: 6px 0; }
.stop .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop .t .n { margin-right: 8px; }
.stop .here { position: absolute; left: 36px; top: -6px; margin: 0; z-index: 2; }
.stop.cur { margin-top: 8px; }
.screen:has(> .action-bar), .screen.bleed-bottom { display: flex; flex-direction: column; }
.screen:has(> .action-bar) > *, .screen.bleed-bottom > * { flex-shrink: 0; }
body.results-open .site-header, body.results-open .tabbar { display: none; }
body.results-open main { padding-top: 6px; }
body.results-open .app-shell { padding-bottom: env(safe-area-inset-bottom); }
/* Action bars sit flush on the tab bar (or the screen bottom during sessions) */
.screen:has(> .action-bar) { padding-bottom: 0; }
/* Full-bleed bottoms: the color reaches the screen edge, content clears the iPhone home indicator */
body.session-open .app-shell, body.results-open .app-shell { padding-bottom: 0; }
.artikel-screen .lane { padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
body.session-open .action-bar, body.results-open .action-bar { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
body.session-open .screen:not(.bleed-bottom):not(:has(> .action-bar)) { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
.umlaut-hint { margin: 0; padding: 10px 14px; background: var(--sand-field, color-mix(in srgb, var(--sand) 18%, var(--bg))); box-shadow: inset 3px 0 0 var(--sand); font-size: .9rem; }

/* ================= Native iOS feel ================= */

/* 1 · Never let Safari zoom into a field: every input is at least 16 px */
input, select, textarea, .glossary-chapter-select, .file-input { font-size: max(16px, 1rem); }

/* 3 · No grey tap flash; nothing in the app can be selected or copied (long press shows no Copy / Look Up menu),
   except what you type into a field */
* { -webkit-tap-highlight-color: transparent; }
html, body, body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* 10 · Pressed states while the finger is down */
.mode-card:active, .course-row:active, .stop:active, .palette-option:active, .option-button:not(:disabled):active { background: var(--surface-2); }
.mode-card, .course-row, .stop { margin-inline: -20px; padding-inline: 20px; width: calc(100% + 40px); }
.mode-card { padding-right: 54px; }
.mode-card::after { right: 24px; }
.action-bar:active, .primary-button:active { filter: brightness(.9); }
/* "Go on" buttons after a round or on the Konjugation path: a rounded card floating above the bottom edge */
.action-bar.next-pill { bottom: max(10px, env(safe-area-inset-bottom)); min-height: 52px; margin: auto 0 10px; border-radius: 14px; font-size: 1rem; }
/* even padding so the text sits in the middle (the full-width bar adds room for the home indicator at the bottom) */
body .screen > .action-bar.next-pill { padding: 0 20px; }
.lane:not(:disabled):active { filter: brightness(.93); }
.tabbar button:active, .quiz-close:active, .text-button:active, .icon-button:active { opacity: .5; }
.keys button:active { background: var(--surface-2); }

/* 8 · 44 pt tap targets (icons keep their visual size) */
.quiz-close { width: 44px; height: 44px; margin-left: -12px; }
.results-top .quiz-close { margin-right: -12px; }
.icon-button.speaker-btn { width: 44px; min-width: 44px; height: 44px; }
.brand { min-height: 44px; }
.text-button { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 0; text-decoration: underline; text-underline-offset: 4px; }

/* 2 · Size the app to the visible area: CSS only, the same rule on every phone */
/* The app is pinned to the visible area (the layout viewport), so whatever the phone, status bar, system bars,
   browser bars or theme, the tab bar sits on the bottom edge. Nothing in the app measures the screen: the old
   JavaScript heights (screen.height on iPhones, saved heights elsewhere) made the app taller than the visible area
   on some phones and pushed the tab bar off the bottom. Only while the keyboard is up (a focused text field) does
   the app shrink to the part above it (--vvh/--vvt), so bars ride on top of the keyboard. */
.app-shell { position: fixed; inset: 0; height: auto; transform: none; }
/* iPhone home-screen app behind the clock (html.screen-fit, set by fitScreen in index.html): iOS reports the visible
   area short by the clock area there and clips pinned (fixed) content at that line, which hid the tab bar's hills.
   So the page and the app are laid out normally at the phone's own screen height instead of being pinned. */
html.screen-fit, html.screen-fit body { height: var(--screen-h); }
html.screen-fit .app-shell { position: relative; inset: auto; height: var(--screen-h); }
/* The launch intro the same way: pinned, it started at the short height, let the hills show below it and then grew,
   so its words jumped down once iOS settled. */
html.screen-fit .intro { position: absolute; inset: 0 0 auto; height: var(--screen-h); }
body.keyboard-open .app-shell { height: var(--vvh, 100dvh); transform: translateY(var(--vvt, 0px)); }
/* iPhone home-screen app: it always runs behind the clock and iOS always draws the clock white. In the light theme a
   soft shade behind the clock keeps it readable (owner choice B, mockup-statusbar). It is as tall as the clock area,
   so it is gone wherever there is none. */
html.ios-app::after { content: ""; position: fixed; z-index: 200; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top, 0px) * 1.3); pointer-events: none;
  background: linear-gradient(rgba(32, 36, 38, .42), rgba(32, 36, 38, 0)); }
html.ios-app[data-theme="dark"]::after { display: none; }
@media (prefers-color-scheme: dark) { html.ios-app:not([data-theme="light"])::after { display: none; } }
body.keyboard-open .action-bar { padding-bottom: 12px; }
/* While typing, the tab bar steps aside (like native apps) instead of riding on top of the keyboard. */
body.keyboard-open .tabbar, body.keyboard-open .home-dock { display: none; }

/* 13 · Compact title in the header once the large title scrolls away */
.site-header { display: grid; grid-template-columns: 1fr auto 1fr; padding-bottom: 6px; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.header-meta { justify-self: start; }
.header-title { order: 2; justify-self: center; max-width: 52vw; font-family: var(--font-display); font-stretch: 80%; font-weight: 700; font-size: .9rem; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; }
.brand { order: 3; justify-self: end; }
body.scrolled .header-title { opacity: 1; transform: none; }
body.scrolled .site-header { border-bottom-color: var(--hair); }

/* 6 · Back: a round button in front of the screen's title */
.back-round { width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform .15s ease; }
.back-round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back-round:active { transform: scale(.9); }
.back-round:focus:not(:focus-visible) { outline: none; }
.page-heading:has(> .back-round) { justify-content: flex-start; align-items: center; }
.page-heading > .back-round + h1 { min-width: 0; }
/* Page titles in the colour of their tab's hill (TAB_HILL_COLORS): Heute sand, Üben sage, Noten slate, Mehr clay */
[data-section="home"] { --section-ink: var(--sand-ink); }
[data-section="practice"] { --section-ink: var(--sage-ink); }
[data-section="statistics"] { --section-ink: var(--slate-ink); }
[data-section="settings"] { --section-ink: var(--clay-ink); }
.page-heading h1, .mx-title { color: var(--section-ink, var(--ink)); }
.course-head .page-heading { margin: 0; }
body.scrolled .site-header { border-bottom-color: transparent; }

/* 7 · Push / pop transitions between screens */
main { animation: none; }
main.push { animation: push-in .34s cubic-bezier(.2, .8, .2, 1) both; }
main.pop { animation: pop-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes push-in { from { transform: translateX(30%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop-in { from { transform: translateX(-24%); opacity: .5; } to { transform: none; opacity: 1; } }

/* 9 · Hidden iOS switch used for the system haptic tick */
#haptic-tick { position: fixed; left: -200px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* 15 · iOS-style round switches and grouped settings rows */
.switch { width: 51px; height: 31px; }
.switch span { border: 0; border-radius: 28px; background: color-mix(in srgb, var(--ink) 16%, var(--bg)); }
.switch span::after { top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 0 1px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--sage); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.screen > .panel:has(> .setting-row) { padding: 0 16px; border-top: 0; border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); }
.setting-row { padding: 12px 0; min-height: 52px; }

/* 12 · Glossary as a list: one row per word, search fixed at the top */
.glossary-controls { position: sticky; top: 0; z-index: 3; margin: 0 -20px; padding: 8px 20px 10px; background: var(--bg); }
.glossary-table, .glossary-table tbody, .glossary-table tr, .glossary-table td { display: block; width: auto; }
.glossary-table colgroup, .glossary-table thead { display: none; }
.glossary-table { border-top: 0; }
.glossary-table tr { position: relative; padding: 11px 44px 11px 0; border-bottom: 1px solid var(--hair); }
.glossary-table td { padding: 0; border: 0; }
.glossary-table td[lang="de"] { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.glossary-table td[lang="en"] { margin-top: 2px; font-size: .9rem; }
.glossary-table .glossary-activity { position: absolute; right: 0; top: 13px; width: auto; }
.gl-art { font-weight: 700; }
@media (max-width: 620px) { .glossary-table td { font-size: inherit; } .glossary-table td[lang="de"] { font-size: 1rem; } }
/* Glossar rows (owner pick A, mockup-glossar-polish.html): word and plural, meaning under it, the example sentence on
   its own line; the speaker sits beside the word. Only the Glossar lists (.gl-list), not the word tables on Pfad pages. */
.gl-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 10px; padding: 12px 0; }
.gl-list td { grid-column: 1; }
.gl-list .glossary-activity { position: static; grid-column: 1 / -1; margin-bottom: 3px; }
.gl-list td[lang="de"] { display: block; font-size: 1.05rem; font-weight: 650; line-height: 1.3; }
.gl-list td.gl-say-cell { grid-column: 2; grid-row: span 2; }
.gl-list .gl-say { width: 40px; height: 40px; margin: -4px 0 0; background: var(--surface-2); }
.gl-list td[lang="en"] { margin-top: 2px; color: var(--sand-ink); font-family: var(--font-body); font-style: normal; font-size: .92rem; line-height: 1.35; }
.gl-pl { margin-left: 2px; color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; font-weight: 500; }
.gl-list td.gl-ex { grid-column: 1 / -1; display: grid; gap: 1px; margin-top: 7px; padding-left: 10px; border-left: 2px solid var(--hair); }
.gl-ex [lang="de"] { color: var(--sage-ink); font-size: .86rem; font-weight: 400; line-height: 1.4; }
.gl-ex [lang="en"] { color: var(--ink-2); font-family: var(--font-italic); font-style: italic; font-size: .84rem; line-height: 1.4; }
.glossary-chapter > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gl-count { flex: none; color: var(--ink-2); font-family: var(--font-mono); font-stretch: 100%; font-size: .7rem; font-weight: 500; text-transform: none; }
/* Glossar search area as glass (owner pick C, mockup-glossar-suche-farbe.html): the page's colours show through it,
   also while it stays on top of the words; sage line, labels and count. Same glass as the leaderboard head (.lb-head). */
.glossary-controls { padding-top: 12px; border-top: 0; border-bottom: 1px solid var(--hair); background: color-mix(in srgb, var(--bg) 58%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.glossary-controls .glossary-search { border-bottom-color: var(--sage-ink); }
.glossary-controls .glossary-search-label, .glossary-controls .glossary-chapter-picker label, .glossary-controls .glossary-result-count { color: color-mix(in srgb, var(--sage-ink) 80%, var(--ink)); } /* small text: a touch darker than sage so it stays readable over the tinted page */
.glossary-controls .glossary-chapter-select { border-color: color-mix(in srgb, var(--sage-ink) 55%, transparent); background: color-mix(in srgb, var(--bg) 70%, transparent); }

@media (prefers-reduced-motion: reduce) { main.push, main.pop { animation: none; } }

/* ================= Intro: Wortkaskade ================= */
html.intro-skip .intro { display: none !important; }
.intro { position: fixed; inset: 0; z-index: 100; overflow: hidden; contain: strict; will-change: opacity, transform; background: var(--bg); color: var(--ink); cursor: pointer;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1); -webkit-user-select: none; user-select: none; }
.intro.is-leaving { opacity: 0; transform: scale(1.03); pointer-events: none; }
.intro::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--bg) 0%, transparent 28%, transparent 62%, var(--bg) 100%); }
.intro-stack { position: absolute; left: max(24px, env(safe-area-inset-left)); right: 24px; bottom: 46%; display: grid; gap: .04em;
  font-family: var(--font-display); font-stretch: 64%; font-weight: 800; font-size: clamp(54px, 15.5vw, 96px); line-height: .92;
  text-transform: uppercase; color: color-mix(in srgb, var(--ink) 12%, transparent); white-space: nowrap; will-change: transform;
  transform: translateY(100%); }
.intro.is-playing .intro-stack { animation: intro-roll 1.15s cubic-bezier(.16, 1, .3, 1) both; }
.intro-hit { color: var(--ink); display: flex; align-items: flex-end; }
.intro-u { height: .99em; width: .6em; margin-bottom: .01em; flex: none; overflow: visible; }
.intro-dot { fill: #c46f5a; transform-box: fill-box; transform-origin: center; will-change: transform, opacity; opacity: 0; }
.intro.is-playing .intro-dot { animation: intro-dot .35s cubic-bezier(.34, 1.56, .64, 1) 1.05s both; }
.intro.is-playing .intro-dot.d2 { animation-delay: 1.15s; }
.intro-tag { position: absolute; left: max(24px, env(safe-area-inset-left)); top: 57%; z-index: 2; margin: 0; will-change: transform, opacity;
  font-family: var(--font-italic); font-style: italic; font-size: 1.2rem; color: var(--ink-2); opacity: 0; }
.intro.is-playing .intro-tag { animation: intro-tag .45s ease 1.25s both; }
@keyframes intro-roll { from { transform: translateY(100%); } to { transform: none; } }
@keyframes intro-dot { from { transform: translateY(-.4em) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes intro-tag { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ================= Swipe back (iOS-style) ================= */
main#app { touch-action: pan-y; }
.swipe-under { position: fixed; left: 0; right: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.swipe-under-content { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.swipe-under-page { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0 20px; background: var(--bg); position: relative; }
.swipe-under-page > .screen { min-height: 100%; }
.swipe-under-dock { flex: 0 0 auto; padding: 6px 14px; background: var(--bg); }
.swipe-under-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .1); pointer-events: none; }
main#app { position: relative; z-index: 1; background: var(--bg); }

/* ---- Konjugation 2.0 ---- */
.konj-votd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--sand) 45%, transparent); background: color-mix(in srgb, var(--sand) 10%, var(--bg)); }
.konj-votd { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.konj-votd > div { display: grid; gap: 2px; min-width: 0; }
.konj-votd b { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1.2rem; line-height: 1.05; overflow-wrap: anywhere; }
.konj-votd small { font-family: var(--font-italic); font-size: .9rem; color: var(--ink-2); }
.konj-votd .x2 { font-family: var(--font-mono); font-size: .7rem; color: var(--sand-ink); border: 1px solid var(--sand); padding: 3px 6px; white-space: nowrap; }
.konj-level-list { display: grid; }
.konj-level { display: grid; grid-template-columns: 38px 1fr auto; gap: 2px 10px; align-items: center; width: 100%; padding: 14px 0; border: 0; border-top: 1px solid var(--hair); background: transparent; color: var(--ink); text-align: left; font-family: var(--font-body); }
.konj-level:last-child { border-bottom: 1px solid var(--hair); }
.konj-level .tag { grid-row: span 3; align-self: start; padding-top: 6px; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.konj-level b { font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: 1.75rem; line-height: 1; text-transform: uppercase; }
.konj-level .crown { font-style: normal; color: var(--sand-ink); font-size: 1.2rem; }
.konj-level .st { font-family: var(--font-mono); font-size: .7rem; color: var(--sand-ink); white-space: nowrap; }
.konj-level .t { grid-column: 2 / 4; font-size: .8rem; color: var(--ink-2); }
.konj-level .bar { grid-column: 2 / 4; position: relative; height: 3px; margin-top: 6px; background: var(--track); }
.konj-level .bar i { position: absolute; inset: 0 auto 0 0; background: var(--sage); }
.konj-level:active, .konj-stn:active { background: var(--surface-2); }
.konj-path { position: relative; display: grid; gap: 6px; padding-left: 46px; }
.konj-path::before { content: ""; position: absolute; left: 16px; top: 16px; bottom: 16px; width: 2px; background: repeating-linear-gradient(var(--hair) 0 6px, transparent 6px 10px); }
.konj-stn { position: relative; display: grid; gap: 2px; width: 100%; padding: 8px 10px 8px 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-family: var(--font-body); }
.konj-stn .dot { position: absolute; left: -46px; top: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-display); font-weight: 700; font-size: .8rem; border: 2px solid var(--bg); }
.konj-stn b { font-family: var(--font-display); font-stretch: 74%; font-weight: 800; font-size: 1.2rem; line-height: 1.05; text-transform: uppercase; }
.konj-stn small { font-size: .8rem; color: var(--ink-2); }
.konj-stn .stars, .konj-bigstars { color: var(--sand-ink); letter-spacing: 2px; font-size: .8rem; }
.konj-stn .stars .o, .konj-bigstars .o, .konj-hud .hearts .o { color: var(--ink-3); }
.konj-stn.done .dot { background: var(--sage); color: var(--on-accent); }
.konj-stn.cur { background: color-mix(in srgb, var(--act) 9%, transparent); padding-left: 10px; margin-left: -10px; }
.konj-stn.cur .dot { left: -36px; background: var(--act-fill); color: var(--on-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--act) 28%, transparent); }
.konj-stn.boss .dot { background: var(--bg); border-color: var(--sand); color: var(--sand-ink); }
.konj-stn.boss.done .dot { background: var(--sand); color: var(--on-accent); }
/* "Im Satz" trainer (owner 2026-11-16, mockup-konj-satz.html look 1): station start + the Thema gap card */
/* the start button has the shape of "Weiter" (owner 2026-11-16, mockup-konj-startknopf.html "A") */
.screen.konj-start { display: flex; flex-direction: column; }
.konj-start .konj-start-go { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); margin-top: auto; }
.konj-start-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.konj-start-meta span { padding: 4px 8px; border: 1px solid var(--hair); font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); }
.konj-start-meta span.c { color: var(--clay-ink); border-color: color-mix(in oklab, var(--clay) 50%, transparent); }
.konj-start-rec { margin: 0; font-family: var(--font-mono); font-size: .74rem; color: var(--ink-2); }
.konj-satz .question-card { align-content: start; }
.konj-satz .thema-q .prompt { font-size: 1.6rem; line-height: 1.3; }
.konj-satz-verb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.konj-satz-verb b { font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--slate-ink); letter-spacing: 0; text-transform: none; }
.konj-satz-verb .votd-tag { color: var(--sand-ink); border: 1px solid var(--sand); padding: 0 4px; }
.konj-satz-en { margin: -6px 0 0; font-family: var(--font-italic); color: var(--ink-2); font-size: 1rem; line-height: 1.4; }
.thema-q .gap-fill.near { color: var(--sand-ink); }
.konj-missed { display: grid; border-top: 1px solid var(--hair); }
.konj-missed > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: .92rem; }
.konj-missed s { flex: none; color: var(--clay-ink); }
/* looking back at a sentence: what you picked and what it got */
.konj-satz-said { margin: 0; font-size: .92rem; line-height: 1.4; }
.konj-satz-said.ok { color: var(--sage-ink); } .konj-satz-said.bad { color: var(--clay-ink); } .konj-satz-said.bad b { color: var(--ink); }
.konj-satz-said.near b:first-child { color: var(--sand-ink); }
.konj-satz-said .chip { font-family: var(--font-mono); font-size: .76rem; background: color-mix(in srgb, var(--sage) 16%, transparent); padding: 4px 8px; }
/* game */
.konj-game { min-height: 100%; align-content: start; }
.konj-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.konj-combo b, .konj-score b { display: block; font-family: var(--font-display); font-stretch: 66%; font-weight: 800; font-size: 1.75rem; line-height: 1; }
.konj-combo b { color: var(--sand-ink); }
.konj-combo small, .konj-score small { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); letter-spacing: .06em; }
.konj-score { text-align: right; }
.konj-score b { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; }
.konj-hud .hearts { color: var(--clay-ink); font-size: 1.2rem; letter-spacing: 3px; }
/* Radiergummi: after a wrong answer the right form is written into the gap by hand */
.konj-tile:disabled { opacity: .5; }
.konj-submit { margin-top: auto; } /* auto keeps Prüfen pinned to the bottom edge, like every other action bar */
.konj-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.konj-tile { padding: 10px 13px; border: 1px solid var(--hair); background: transparent; color: var(--ink); font: 700 1.02rem var(--font-body); }
.konj-tile.used { opacity: .25; }
.konj-tile:active { border-color: var(--act); color: var(--act-ink); }
/* results */
.konj-xp { font-family: var(--font-display); font-stretch: 62%; font-weight: 800; font-size: clamp(4.4rem, 22vw, 6rem); line-height: .82; color: var(--act); }
.konj-it { font-family: var(--font-italic); color: var(--ink-2); }
.konj-bigstars { font-size: 1.75rem; letter-spacing: 5px; }
.konj-rgrid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.konj-rgrid > div { padding: 10px 0; display: grid; gap: 2px; }
.konj-rgrid b { font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: 1.4rem; }
.konj-rises { display: grid; gap: 8px; }
.konj-results .rise { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.konj-results .pips { display: flex; gap: 4px; }
.konj-results .pips i { width: 12px; height: 12px; border-radius: 50%; background: var(--track); }
.konj-results .pips i.f { background: var(--sage); }
.konj-results .pips i.n { background: var(--sand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sand) 25%, transparent); }
.konj-streak { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); }
.konj-streak > span:first-child { display: grid; gap: 2px; }
.konj-streak b { font-family: var(--font-display); font-stretch: 74%; font-weight: 800; }
.konj-streak small { font-family: var(--font-italic); color: var(--ink-2); font-size: .9rem; }
.konj-result-actions { display: flex; gap: 20px; flex-wrap: wrap; }
/* iPhone: while a game runs and no keyboard is open, fill the whole screen. The visual-viewport
   height can be a little shorter on long, scrolling screens and left a dark strip under the bar. */


/* ================= Motion =================
   Keyframes only describe the *start* of a movement; every element's normal style is its end state.
   So with "Animationen" off (body.no-animations) or Reduce Motion, everything simply shows its final look. */
:root { --m-spring: cubic-bezier(.34, 1.56, .64, 1); --m-out: cubic-bezier(.22, 1, .36, 1); }
@keyframes m-pop { 40% { transform: scale(.94); } }
@keyframes m-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes m-badge { from { opacity: 0; transform: scale(.6); } }
@keyframes m-stamp { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } }

/* 1 · Heute ring, week rings */
.today-ring .seg-new { stroke: var(--act); animation: m-seg .3s var(--m-spring) backwards; animation-delay: calc(var(--i) * 55ms + .15s); }
@keyframes m-seg { from { opacity: 0; stroke-width: 3; } }
@keyframes m-draw { from { stroke-dasharray: 0 1; } }
/* 8 · Tagesziel geschafft */
.today-ring .goal-check { width: 56%; height: auto; transform: none; margin: 0 auto -4px; }
.today-ring .goal-check path { fill: none; stroke: var(--act); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; }
.today-ring.m-goal .goal-check path { animation: m-tick .5s var(--m-out) .55s backwards; }
/* Feuerwerk: twelve rays in the tab colours around the check; on the celebration they shoot out after the tick */
.today-ring .goal-firework { position: relative; width: clamp(85px, 25.6vw, 107px); aspect-ratio: 1; /* 61% of the ring */ display: grid; place-items: center; }
.today-ring .goal-rays { position: absolute; inset: 0; width: 100%; height: 100%; transform: none; overflow: visible; }
.today-ring .goal-rays path { fill: none; stroke-width: 4; stroke-linecap: round; }
.today-ring .goal-firework .goal-check { width: 48%; margin: 0; }
.today-ring.m-goal .goal-rays path { animation: m-ray .7s var(--m-out) .8s backwards; }
@keyframes m-ray { from { stroke-dasharray: 0 30; opacity: 0; } to { stroke-dasharray: 30 0; opacity: 1; } }
@keyframes m-tick { from { stroke-dashoffset: 80; } }
.today-ring.m-goal > svg { animation: m-ring-pulse .6s var(--m-spring) .25s; }
@keyframes m-ring-pulse { 50% { transform: rotate(-90deg) scale(1.07); } }
.m-burst { position: absolute; inset: 0; pointer-events: none; }
.m-burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 12px; opacity: 0; animation: m-burst 1.2s var(--m-out) .75s; }
@keyframes m-burst { 0% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
/* 14 · Serie +1 */
.m-roll { display: inline-flex; flex-direction: column; height: 1.25em; overflow: hidden; vertical-align: bottom; line-height: 1.25; }
.m-roll span { display: block; height: 1.25em; transform: translateY(-100%); animation: m-roll .55s var(--m-spring) .7s backwards; }
@keyframes m-roll { from { transform: none; } }
.m-flame { width: 11px; height: 14px; vertical-align: -2px; margin-right: 4px; transform-origin: 50% 100%; animation: m-flick 1.1s ease-in-out .3s 2; }
@keyframes m-flick { 25% { transform: scale(1.12, .94) rotate(-4deg); } 50% { transform: scale(.94, 1.08) rotate(3deg); } 75% { transform: scale(1.06, .96) rotate(-2deg); } }
/* 9 · Wort des Tages wird gesprochen */
.day-card .m-wave { display: flex; align-items: center; gap: 3px; height: 0; opacity: 0; overflow: hidden; transition: height .2s ease, opacity .2s ease; }
.day-card.speaking .m-wave { height: 18px; opacity: 1; }
.m-wave i { width: 4px; height: 5px; border-radius: 2px; background: var(--clay); }
.day-card.speaking .m-wave i { animation: m-wave .45s ease-in-out infinite alternate; }
.m-wave i:nth-child(2) { animation-delay: .08s !important; } .m-wave i:nth-child(3) { animation-delay: .16s !important; } .m-wave i:nth-child(4) { animation-delay: .24s !important; }
.m-wave i:nth-child(5) { animation-delay: .32s !important; } .m-wave i:nth-child(6) { animation-delay: .4s !important; } .m-wave i:nth-child(7) { animation-delay: .48s !important; }
@keyframes m-wave { to { height: 16px; } }
.day-card.speaking { animation: m-pop .3s ease; }

/* 2 · Richtig getippt, 4 · Falsch getippt */
.m-float { position: absolute; left: 50%; top: 4px; font: 800 1.05rem var(--font-display); color: var(--sage-ink); pointer-events: none; opacity: 0; transform: translate(-50%, -44px); animation: m-float 1s var(--m-out); }
@keyframes m-float { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -44px) scale(1.1); } }
/* Blitz: the pause plays in the timer line itself (Farbwechsel); the coral 5-minute bar steps aside meanwhile */
/* 3 · Kombo steigt */
.konj-hud { position: relative; }
.konj-combo.m-level-up b { animation: m-combo .5s var(--m-spring); }
@keyframes m-combo { from { transform: translateY(70%); opacity: 0; } }
.m-sweep { position: absolute; top: -6px; bottom: -6px; left: 110%; width: 40%; pointer-events: none; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sand) 35%, transparent), transparent); animation: m-sweep .9s var(--m-out); }
@keyframes m-sweep { from { left: -40%; } }
.m-combo-note { font-family: var(--font-mono); font-size: .7rem; color: var(--sand-ink); border: 1px solid var(--sand); padding: 3px 7px; animation: m-badge .45s var(--m-spring) .1s backwards; }
/* 19 · Umlaut-Punkte fallen */
/* 5 · Kachel fliegt ins Feld */
/* 20 · Tabelle prüft sich Zeile für Zeile */
/* 6 · Leben verloren */
.konj-hud .hearts .h { position: relative; display: inline-block; }
.konj-hud .hearts .h.m-lose { animation: m-heart .7s var(--m-out); }
@keyframes m-heart { 25% { transform: scale(1.35); } }
.m-shard { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; background: var(--clay); opacity: 0; pointer-events: none; animation: m-shard .6s var(--m-out) .15s; }
@keyframes m-shard { 0% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(90deg); } }
.konj-game.m-hurt::after { content: ""; position: fixed; inset: 0; pointer-events: none; animation: m-vignette .7s ease; }
@keyframes m-vignette { 40% { box-shadow: inset 0 0 50px 6px color-mix(in srgb, var(--clay) 45%, transparent); } }
@keyframes m-jolt { 30% { transform: translateY(2px); } 60% { transform: translateY(-2px); } }
/* 16 · Letzte Sekunden */
/* 7 · Ergebnis */
.konj-bigstars .s, .konj-bigstars .o { display: inline-block; }
.konj-bigstars .s { animation: m-stamp .45s var(--m-spring) backwards; animation-delay: calc(var(--i) * 260ms + .9s); }
.konj-results .pips i.n { animation: m-pip .4s var(--m-spring) backwards; animation-delay: calc(var(--i) * 180ms + 1.8s); }
@keyframes m-pip { from { transform: scale(.2); background: var(--surface-2); box-shadow: none; } }
/* 13 · Station geschafft */
.konj-stn .stars .s, .konj-stn .stars .o { display: inline-block; }
.konj-stn.m-just .dot { animation: m-dot .45s var(--m-spring) .25s backwards; }
@keyframes m-dot { from { transform: scale(.6); background: var(--surface-2); color: var(--ink-2); } }
.konj-stn.m-just .stars .s { animation: m-stamp .35s var(--m-spring) backwards; animation-delay: calc(var(--i) * 150ms + .45s); }
.konj-stn.m-next .dot { animation: m-glow 1.2s ease .9s 2; }
@keyframes m-glow { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--act) 22%, transparent); } }
/* 27 · Krone landet */
.konj-level .crown { position: relative; display: inline-block; }
.konj-level .crown.m-drop { animation: m-crown .7s var(--m-spring) .3s backwards; }
@keyframes m-crown { 0% { opacity: 0; transform: translateY(-50px) rotate(-25deg); } 60% { opacity: 1; transform: translateY(4px) rotate(8deg); } }
.m-spark { position: absolute; right: -2px; top: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--sand); opacity: 0; animation: m-spark .6s var(--m-out) .9s; }
@keyframes m-spark { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }

/* 12 · der/die/das: die Spalte füllt sich */
.lane-der { --lane-c: var(--slate); --lane-f: var(--slate-field); }
.lane-die { --lane-c: var(--clay); --lane-f: var(--clay-field); }
.lane-das { --lane-c: var(--sage); --lane-f: var(--sage-field); }
.lane.is-correct { background-image: linear-gradient(var(--lane-c), var(--lane-c)); background-repeat: no-repeat; background-position: bottom; background-size: 100% 100%; animation: m-flood .45s var(--m-out); }
@keyframes m-flood { from { background-size: 100% 0%; background-color: var(--lane-f); color: var(--lane-c); } }
.artikel-word .sup.a-der, .artikel-word .sup.a-die, .artikel-word .sup.a-das { animation: m-art .4s var(--m-spring) .15s backwards; }
@keyframes m-art { from { opacity: 0; transform: translateY(-.4em); } }
/* 22 · Possessivartikel: die Endung wächst an */
.m-poss { font-weight: 800; }
.m-poss.ok { color: var(--sage-ink); } .m-poss.bad { color: var(--clay-ink); }
.m-end { display: inline-block; max-width: 3em; overflow: hidden; white-space: nowrap; vertical-align: bottom; color: var(--slate-ink); animation: m-grow .5s var(--m-spring) .2s backwards; }
@keyframes m-grow { from { max-width: 0; opacity: 0; } }
/* 21 · Zahl rollt ein */
.m-odo { display: inline-block; height: 1.2em; overflow: hidden; vertical-align: bottom; line-height: 1.2; }
.m-odo-col { display: flex; flex-direction: column; transform: translateY(calc(var(--d) * -1.2em)); animation: m-odo .9s var(--m-out) backwards; animation-delay: calc(var(--i) * 150ms + .1s); }
.m-odo-col span { height: 1.2em; }
@keyframes m-odo { from { transform: none; } }

/* 10 · Tab wechselt */
.tabbar { position: relative; }
.tab-ind { position: absolute; top: -1px; left: 8px; width: calc((100% - 16px) / 4); height: 2.5px; pointer-events: none; transform: translateX(calc(var(--tab, 0) * 100%)); transition: transform .35s var(--m-out), opacity .2s ease; }
.tab-ind::before { content: ""; position: absolute; left: 24%; right: 24%; top: 0; bottom: 0; background: var(--ink); }
.tabbar.has-ind button.active::before { display: none; }
.tabbar:not(.has-ind) .tab-ind, .tabbar.no-tab .tab-ind { opacity: 0; }

/* Tab bar landscape (Hügel · Himmelszeile). Same height as before: the bottom safe-area padding moves into the
   buttons, so each column, hill included, is one tap target, and the hills reach the very bottom edge. */
.tabbar { isolation: isolate; overflow: hidden; padding-bottom: 0; }
.tabbar > button { min-height: calc(50px + max(14px, env(safe-area-inset-bottom))); padding: 12px 0 0; display: flex; justify-content: center; align-items: flex-start; }
.tabbar { --pfad: color-mix(in srgb, var(--sage) 45%, var(--slate)); }
.tabbar > button[data-nav="home"] { --tc: var(--sand); } .tabbar > button[data-nav="practice"] { --tc: var(--sage); } .tabbar > button[data-nav="pfad"] { --tc: var(--pfad); }
.tabbar > button[data-nav="statistics"] { --tc: var(--slate); } .tabbar > button[data-nav="settings"] { --tc: var(--clay); }
.tabbar > button.active::after { content: ""; position: absolute; top: 27px; left: 50%; width: 36px; margin-left: -18px; height: 2px; background: var(--tc); }
.tabbar .tab-ind, .tabbar > button.active::before { display: none; }
/* Tab switch (Schieben): the outgoing screen is a copy laid over the old spot while it slides away */
.app-shell { overflow: clip; }
.tab-ghost { position: absolute; z-index: 1; margin: 0; pointer-events: none; animation: none; }
.tab-hills { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tab-hills .sun { fill: var(--sand); stroke: color-mix(in srgb, var(--sand) 30%, transparent); stroke-width: 8; }
.tab-hills .drop { stroke: var(--ink); stroke-opacity: .2; stroke-dasharray: 1.5 3; }
.tab-hills .drop.on { stroke-opacity: .5; }
.tab-hills .summit { fill: var(--ink); }
/* 15 · Abzeichen */
/* New badge: a card that drops in under the ✕ on the results; swiped away sideways (badgeDrop in index.html) */
.badge-drop { position: fixed; z-index: 8; top: calc(max(12px, env(safe-area-inset-top)) + 62px); left: 14px; right: 14px; max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--sand) 38%, transparent); border-radius: 22px; background: color-mix(in srgb, var(--sand) 12%, var(--surface-1)); color: var(--ink); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: grab; animation: bd-in .5s cubic-bezier(.2, .8, .2, 1.15) backwards; }
@keyframes bd-in { from { transform: translateY(-160%); opacity: 0; } }
.badge-drop .medal { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--sand) 45%, #fff), var(--sand)); color: #2a2110; font-size: 1.4rem; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sand) 20%, transparent); animation: m-medal .5s var(--m-spring) .1s backwards; }
@keyframes m-medal { from { transform: scale(.3) rotate(-30deg); } }
.badge-drop .medal::after { content: ""; position: absolute; inset: -20%; transform: translateX(120%); background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%); animation: m-shine .9s ease .5s backwards; }
@keyframes m-shine { from { transform: translateX(-120%); } }
.badge-drop .bd-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.badge-drop small { font-family: var(--font-mono); font-size: .7rem; color: var(--sand-ink); }
.badge-drop b { font-size: 1rem; line-height: 1.2; }
.badge-drop .bd-text > span { font-size: .8rem; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .badge-drop, .badge-drop .medal, .badge-drop .medal::after { animation: none; } }
/* 25 · Suche, 18 · Laden */
.m-hit { background: color-mix(in srgb, var(--sand) 32%, transparent); color: inherit; padding: 0 1px; }
.m-refresh { animation: m-refresh .25s ease; }
@keyframes m-refresh { from { opacity: .4; } }
.m-skeleton { display: grid; gap: 16px; }
.m-skeleton div { display: grid; gap: 7px; }
.m-skeleton i { display: block; height: 13px; background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--ink) 10%, var(--surface-2)), var(--surface-2)); background-size: 200% 100%; animation: m-shimmer 1.1s linear infinite; }
.m-skeleton i.s { height: 9px; }
@keyframes m-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* 23/24 · Palette und Hell/Dunkel breiten sich im Kreis aus */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Weiter mit Google. Follows Google's light/dark button colours. */
.google-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 18px;
  border: 1px solid #747775; border-radius: 0; background: #fff; color: #1f1f1f; font: 600 .95rem var(--font-body); cursor: pointer;
}
.google-button span { white-space: nowrap; }
.google-button svg { flex: none; }
.google-button:active { opacity: .7; }
.google-button:focus-visible { outline: 2px solid var(--act); outline-offset: 3px; }
:root[data-theme="dark"] .google-button { border-color: #8e918f; background: #131314; color: #e3e3e3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .google-button { border-color: #8e918f; background: #131314; color: #e3e3e3; } }
/* Profile sheet: display name and leaderboard opt-in. */
.profile-card { display: grid; gap: 6px; }
.profile-card > p { margin-bottom: 8px; }
.profile-card .setting-row { margin-top: 8px; border-bottom: 0; }
.profile-card .button-row { margin-top: 6px; }
.profile-error { min-height: 1.2em; color: var(--clay-ink); font-size: .8rem; }
.profile-card input[aria-invalid="true"] { border-bottom-color: var(--clay); }

/* ============================================================
   Mehr (Aurora): profile card on a soft glow, grouped settings
   ============================================================ */
.mx { --mx-card: color-mix(in srgb, #fff 62%, var(--bg)); --mx-card-2: color-mix(in srgb, var(--ink) 5%, var(--bg)); --mx-line: color-mix(in srgb, var(--ink) 8%, transparent); --mx-line-2: color-mix(in srgb, var(--ink) 15%, transparent);
  --mx-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -22px rgba(35,30,20,.35), 0 2px 6px -2px rgba(35,30,20,.08); --mx-danger: #c4564a; --mx-on: var(--sage); --mx-spring: cubic-bezier(.34, 1.56, .64, 1);
  position: relative; isolation: isolate; gap: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mx { --mx-card: color-mix(in srgb, #fff 5%, var(--bg)); --mx-card-2: color-mix(in srgb, #fff 9%, var(--bg)); --mx-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 50px -24px rgba(0,0,0,.8), 0 2px 8px -2px rgba(0,0,0,.4); --mx-danger: #ef8476; } }
:root[data-theme="dark"] .mx { --mx-card: color-mix(in srgb, #fff 5%, var(--bg)); --mx-card-2: color-mix(in srgb, #fff 9%, var(--bg)); --mx-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 50px -24px rgba(0,0,0,.8), 0 2px 8px -2px rgba(0,0,0,.4); --mx-danger: #ef8476; }
.mx-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mx-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mx-head { padding-top: 4px; }
.mx-eyebrow { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.mx-title { margin: 6px 0 0; }

/* Profile card */
.mx-hero { position: relative; margin-top: 16px; padding: 20px 18px 18px; border-radius: 28px; background: var(--mx-card); border: 1px solid var(--mx-line);
  box-shadow: var(--mx-shadow); transition: box-shadow .3s; }
.mx-hero.is-editing { box-shadow: var(--mx-shadow), 0 0 0 2px color-mix(in srgb, var(--act) 55%, transparent); }
.mx-who { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; }
.mx-hero-actions { position: absolute; top: 14px; right: 14px; z-index: 2; }
/* Edit sits as a small tag on the bottom edge of the photo ring */
.mx-avatar .mx-edit { position: absolute; left: 50%; bottom: -13px; translate: -50% 0; z-index: 2; min-height: 26px; padding: 0 10px; gap: 4px; font-size: .7rem; white-space: nowrap;
  background: var(--mx-card-2); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.mx-avatar .mx-edit .mx-i { width: 12px; height: 12px; }
.mx-hero-actions { display: flex; gap: 6px; }
.mx-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--mx-line-2);
  background: color-mix(in srgb, var(--mx-card) 70%, transparent); color: var(--ink); font: 700 .76rem var(--font-body); transition: transform .3s var(--mx-spring), background .2s; }
.mx-pill .mx-i { width: 14px; height: 14px; }
.mx-pill:active { transform: scale(.94); }
.mx-pill.is-primary { background: var(--act-fill); border-color: transparent; color: var(--on-accent); }
.mx-pill.mx-wide { width: 100%; min-height: 46px; font-size: .9rem; }
.mx-avatar { position: relative; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
button.mx-avatar { cursor: pointer; }
button.mx-avatar:focus-visible { outline: 2px solid var(--act); outline-offset: 3px; }
.mx-ring { position: absolute; inset: 0; transform: rotate(-90deg); fill: none; stroke-width: 3; stroke-linecap: round; }
.mx-ring circle { stroke: color-mix(in srgb, var(--ink) 12%, transparent); }
.mx-ring circle.fil { stroke: var(--act); }
.mx-face { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: var(--on-accent);
  background: linear-gradient(140deg, var(--act), color-mix(in srgb, var(--act) 55%, var(--sand))); box-shadow: inset 0 -6px 12px rgba(0,0,0,.18);
  font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: 1.75rem; }
.mx-face img { width: 100%; height: 100%; object-fit: cover; }
.mx-id { min-width: 0; }
.mx-hero.is-editing .mx-id { padding-right: 0; padding-top: 30px; }
.mx-name { margin: 0; font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: 2.25rem; line-height: .9; text-transform: uppercase; overflow-wrap: anywhere; }
.mx-name-input { width: 100%; min-height: 44px; padding: 4px 12px; border-radius: 14px; border: 1px solid var(--mx-line-2); background: color-mix(in srgb, var(--mx-card) 80%, transparent); color: var(--ink);
  font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: 1.75rem; text-transform: uppercase; outline: none; transition: border-color .2s, box-shadow .2s; }
.mx-name-input:focus { border-color: var(--act); box-shadow: 0 0 0 3px color-mix(in srgb, var(--act) 25%, transparent); }
.mx-name-input[aria-invalid="true"] { border-color: var(--mx-danger); }
.mx-error { display: block; min-height: 1.1em; margin-top: 4px; font-size: .7rem; color: var(--mx-danger); }
.mx-chips { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.mx-chip.is-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mx-on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mx-on) 28%, transparent); }
/* Total XP leads, streak / answers / badges sit below it */
.mx-xp { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 14px 16px; border-radius: 22px;
  background: color-mix(in srgb, var(--act) 10%, var(--mx-card-2)); border: 1px solid color-mix(in srgb, var(--act) 28%, transparent); }
.mx-xp-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mx-xp-t small { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--act-ink); }
.mx-xp-t b { font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: 2.25rem; line-height: .9; overflow-wrap: anywhere; }
.mx-xp-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--act-ink); background: color-mix(in srgb, var(--act) 16%, transparent); }
.mx-xp-ic .mx-i { width: 22px; height: 22px; }
.mx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.mx-stat { min-width: 0; text-align: center; padding: 11px 8px 10px; border-radius: 14px; background: var(--mx-card-2); border: 1px solid var(--mx-line); }
.mx-stat b { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1.4rem; line-height: 1; white-space: nowrap; }
.mx-stat b .mx-i { width: 16px; height: 16px; color: var(--sand-ink); }
.mx-stat span { display: block; margin-top: 4px; font-size: .7rem; font-weight: 600; color: var(--ink-2); }
.mx-hint { margin: 16px 0 10px; font-size: .8rem; color: var(--ink-2); }
.mx-hero .google-button { width: 100%; border-radius: 14px; }

/* Section labels and grouped rows */
.mx-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 26px 6px 10px; }
.mx-label h3 { flex-shrink: 0; margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.mx-label span { font-size: .7rem; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-group { border-radius: 22px; background: var(--mx-card); border: 1px solid var(--mx-line); box-shadow: var(--mx-shadow); overflow: hidden; }
.mx-gap { margin-top: 22px; }
.mx-row { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; width: 100%; min-height: 64px; padding: 12px 16px;
  border: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none; font: inherit; transition: background .2s; }
.mx-row + .mx-row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--mx-line); }
button.mx-row, a.mx-row { cursor: pointer; }
button.mx-row:active, a.mx-row:active { background: var(--mx-card-2); }
.mx-row.is-stack { grid-template-columns: 36px 1fr; }
.mx-full { grid-column: 1 / -1; }
.mx-t { min-width: 0; }
.mx-t strong { display: block; font-size: .9rem; font-weight: 600; }
.mx-t small { display: block; margin-top: 3px; font-size: .76rem; line-height: 1.35; color: var(--ink-2); }
.mx-row.is-danger .mx-t strong { color: var(--mx-danger); }
.mx-val { display: flex; color: var(--ink-3); }
.mx-val .mx-i { width: 14px; height: 14px; }
.mx-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--c, var(--act));
  background: color-mix(in srgb, var(--c, var(--act)) 16%, var(--mx-card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--act)) 22%, transparent); }

/* Switch (a real checkbox, so the existing settings handler keeps working) */
.mx-sw { appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: 999px; background: var(--mx-line-2); cursor: pointer; transition: background .3s; flex: none; }
.mx-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .35s var(--mx-spring); }
.mx-sw:checked { background: var(--mx-on); }
.mx-sw:checked::after { transform: translateX(20px); }
.mx-sw:focus-visible { outline: 2px solid var(--act); outline-offset: 3px; }

/* Segmented control with a sliding thumb */
.mx-seg { --n: 2; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 4px; border-radius: 14px; background: var(--mx-card-2); border: 1px solid var(--mx-line); }
.mx-seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 10px; background: var(--mx-card);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.3), 0 0 0 1px var(--mx-line); transform: translateX(calc(var(--i) * 100%)); transition: transform .45s var(--mx-spring); }
.mx-seg button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 0; background: transparent; color: var(--ink-2); font: 600 .84rem var(--font-body); }
.mx-seg button[aria-pressed="true"] { color: var(--ink); }
.mx-seg .mx-i { width: 16px; height: 16px; }

/* Palette cards with a tiny preview of the app */
.mx-rail { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.mx-rail::-webkit-scrollbar { display: none; }
.mx-pcard { flex: none; width: 92px; padding: 10px 10px 9px; border-radius: 22px; border: 1px solid var(--mx-line); background: var(--mx-card-2); color: var(--ink); display: grid; gap: 8px; justify-items: start; scroll-snap-align: start; transition: transform .35s var(--mx-spring), box-shadow .25s, border-color .25s; }
.mx-pcard:active { transform: scale(.95); }
.mx-pcard b { font-size: .8rem; }
.mx-pcard[aria-pressed="true"] { border-color: color-mix(in srgb, var(--act) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--act) 22%, transparent); }
.mx-pcard[aria-pressed="true"] b::after { content: " ✓"; color: var(--act-ink); }
.mx-mini { position: relative; width: 100%; height: 58px; border-radius: 10px; overflow: hidden; background: var(--pp, #f0eee9); }
.mx-mini .r { position: absolute; left: 7px; top: 9px; width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(var(--pa) 0 62%, color-mix(in srgb, var(--pa) 20%, transparent) 0);
  -webkit-mask: radial-gradient(circle 9px, transparent 98%, #000); mask: radial-gradient(circle 9px, transparent 98%, #000); }
.mx-mini .b { position: absolute; right: 7px; top: 11px; width: 26px; display: grid; gap: 4px; }
.mx-mini .b i { display: block; height: 6px; border-radius: 3px; }
.mx-mini .k { position: absolute; left: 7px; right: 7px; bottom: 7px; height: 7px; border-radius: 4px; background: var(--pa); }

.mx-foot { margin: 22px 0 8px; text-align: center; font-size: .7rem; line-height: 1.6; color: var(--ink-2); }
.mx-foot .mx-niche { display: block; margin: 2px auto 6px; font-family: var(--font-display); font-stretch: 72%; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); text-wrap: balance; }
.mx-foot b { font-family: var(--font-display); font-stretch: 72%; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }


/* XP: the multiplier badge in the quiz header and feedback, and the XP line on the results */
.xp-mult { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--act-fill); color: var(--bg); font-size: .78em; font-weight: 800; line-height: 1.5; vertical-align: 1px; }
.xp-earned { margin: 0; font-family: var(--font-italic); color: var(--ink-2); }
.xp-earned b { font-family: var(--font-display); font-style: normal; font-weight: 800; color: var(--act-ink); }

/* XP rail: the progress line runs across the top with the XP counter riding its tip */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.xp-rail { --p: 0; position: relative; flex: 1; min-width: 0; height: 34px; transition: --p .55s cubic-bezier(.34, 1.56, .64, 1); }
.xp-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; translate: 0 -50%; border-radius: 3px; background: var(--hair); }
.xp-rail-fill { position: absolute; left: 0; top: 50%; height: 3px; width: calc(var(--p) * 1%); translate: 0 -50%; border-radius: 3px; background: linear-gradient(90deg, var(--sage), var(--act)); }
.xp-rider { position: absolute; top: 50%; left: calc(var(--p) * 1%); translate: calc(var(--p) * -1%) -50%; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--hair); font-family: var(--font-mono); font-size: .7rem; color: var(--sand-ink); white-space: nowrap; transition: color .3s; }
.xp-num { font-variant-numeric: tabular-nums; }
.xp-rider.heat1 .xp-mult { display: none; }
.xp-rider:not(.heat1) { color: var(--ink); }
.xp-rail.timed { transition: --p .2s linear; }
/* room for the countdown under the rail; padding (not margin) keeps the close button level with the rail */
.quiz-top:has(.xp-rail.clocked), .konj-hud:has(.xp-rail.clocked) { padding-bottom: 46px; }
.xp-half { position: absolute; left: 50%; top: 50%; width: 2px; height: 9px; translate: -50% -50%; border-radius: 1px; background: var(--ink-3); }
.rail-clock { --tc: var(--sage-ink); position: absolute; left: 50%; top: 100%; translate: -50% 0; margin-top: 2px; text-align: center; font-family: var(--font-display); font-stretch: 62%; font-weight: 800; font-size: 2.25rem; line-height: 1; color: var(--tc); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .4s; }
.rail-clock[data-phase="warm"] { --tc: var(--sand-ink); } .rail-clock[data-phase="hot"] { --tc: var(--act-ink); }
.rail-clock b { display: inline-block; font-weight: 800; }
.rail-clock small { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.rail-clock.m-urgent b { animation: konj-beat .5s ease-in-out infinite; }
@keyframes konj-beat { 50% { transform: scale(1.12); } }
body.no-animations .rail-clock.m-urgent b { animation: none; }
@media (prefers-reduced-motion: reduce) { .rail-clock.m-urgent b { animation: none; } }
.konj-hud .xp-rail { margin: 0 4px; }
body.no-animations .xp-rail { transition: none; }
@media (prefers-reduced-motion: reduce) { .xp-rail { transition: none; } }
.xp-spark { position: fixed; z-index: 60; left: 0; top: 0; width: 10px; height: 10px; translate: -50% -50%; border-radius: 50%; pointer-events: none; background: #fff; box-shadow: 0 0 12px 3px var(--sage); will-change: transform; }
.xp-spark.t2 { box-shadow: 0 0 14px 4px var(--sand); } .xp-spark.t3 { box-shadow: 0 0 16px 5px var(--clay); } .xp-spark.t5 { width: 12px; height: 12px; box-shadow: 0 0 20px 7px var(--act); }
.xp-capped { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; text-transform: none; color: var(--ink-2); }

/* Zahlen: the German word big (Wort → Zahl), and the price as a tag */
.verb-word.zahl-word { font-size: clamp(1.9rem, 5vw + 2vh, 2.7rem); line-height: 1; overflow-wrap: anywhere; margin: 6px 0 4px; }
.price-tag { align-self: center; margin: 4px auto; padding: 6px 16px; background: var(--surface-2); font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: 1.75rem; width: fit-content; }

/* The example that belongs to a word, shown small under it (kept out of the answer options) */
.word-example { margin: 6px 0 0; font-family: var(--font-italic); font-style: italic; font-size: 1rem; line-height: 1.3; color: var(--act-ink); }
.word-block.field-der .word-example { color: var(--slate-ink); }
.word-block.field-die .word-example { color: var(--clay-ink); }
.word-block.field-das .word-example { color: var(--sage-ink); }
/* "here:" senses: the sentence leads, the word it is about stands out, the dictionary form sits under it */
.ctx-sentence { margin: 8px 0 0; font-family: var(--font-italic); font-style: italic; font-size: clamp(1.9rem, 7vw + 1vh, 2.75rem); line-height: 1.1; color: var(--ink); overflow-wrap: anywhere; }
.ctx-sentence b { font-family: var(--font-display); font-style: normal; font-stretch: 68%; font-weight: 800; font-size: 1.08em; color: var(--act-ink);
  text-decoration: underline; text-decoration-color: var(--act); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.ctx-from { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.ctx-from small { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.ctx-from b { color: var(--ink); }
.ctx-tag { color: var(--act-ink); }
.ctx-ask { color: var(--act-ink); }
.feedback i[lang] { font-family: var(--font-italic); }

/* ---- Heute leaderboard: global top 3 (glass card, pastel diamonds), places 4–7, pull-up stretch, full sheet ---- */
:root { --lb-glass: rgba(255, 255, 255, .55); --lb-line: rgba(255, 255, 255, .95); --lb-shadow: rgba(60, 50, 40, .28); --lb-blob: .5; }
:root[data-theme="dark"] { --lb-glass: rgba(255, 255, 255, .06); --lb-line: rgba(255, 255, 255, .16); --lb-shadow: rgba(0, 0, 0, .7); --lb-blob: .28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lb-glass: rgba(255, 255, 255, .06); --lb-line: rgba(255, 255, 255, .16); --lb-shadow: rgba(0, 0, 0, .7); --lb-blob: .28; } }
.lb-top { position: relative; overflow: hidden; padding: 14px 8px 16px; border-radius: 28px; background: var(--lb-glass); border: 1px solid var(--lb-line); box-shadow: 0 26px 50px -30px var(--lb-shadow); isolation: isolate; }
.lb-blobs { position: absolute; inset: -20px; z-index: -1; filter: blur(34px); opacity: var(--lb-blob); pointer-events: none; }
.lb-blobs i { position: absolute; border-radius: 50%; animation: lb-blob 12s ease-in-out infinite; }
.lb-blobs i:nth-child(1) { left: -30px; top: 20px; width: 180px; height: 180px; background: var(--clay); }
.lb-blobs i:nth-child(2) { right: -40px; top: 0; width: 200px; height: 200px; background: var(--slate); animation-delay: -4s; }
.lb-blobs i:nth-child(3) { left: 32%; top: 150px; width: 200px; height: 140px; background: var(--sage); animation-delay: -8s; }
@keyframes lb-blob { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18px, -14px) scale(1.12); } }
.lb-top-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 10px; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; }
.lb-top-head b, .lb-top-head span { font-weight: 500; letter-spacing: normal; color: var(--ink-2); }
.lb-podium { margin-top: 4px; display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; }
.lb-place { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; animation: lb-bob 3.2s ease-in-out infinite; }
.lb-place.p2 { animation-delay: -1s; }
.lb-place.p3 { animation-delay: -2s; }
.lb-place.p1 { padding-bottom: 14px; }
@keyframes lb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.lb-name { margin-top: 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1rem; }
.lb-place.p1 .lb-name { margin-top: 22px; font-size: 1.2rem; }
.lb-place small { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.lb-place.p1 small { color: var(--act-ink); font-weight: 700; }
.lb-place.is-empty .lb-name { color: var(--ink-2); font-weight: 600; }
.lb-place.is-me .lb-name { color: var(--act-ink); }

.lb-next-head { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.lb-rows { display: grid; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lb-row { display: grid; grid-template-columns: 26px 32px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hair); }
.lb-row .k { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.lb-row .c { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lb-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 600; }
.lb-av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(150deg, #e3e3ff, #cdeee6); color: #25235e; font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: .9rem; }
.lb-av img { width: 100%; height: 100%; object-fit: cover; }
.lb-row.is-me { margin: 0 -10px; padding: 11px 10px; border-top-color: transparent; border-radius: 14px; background: color-mix(in srgb, var(--act) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--act); }
.lb-row.is-me .k, .lb-row.is-me .c { color: var(--act-ink); font-weight: 700; }
.lb-row.is-me .lb-av { background: var(--act-fill); color: var(--on-accent); }
.lb-empty { margin: 0; padding: 12px 0; border-top: 1px solid var(--hair); font-family: var(--font-italic); font-style: italic; color: var(--ink-2); }
.lb-note { justify-self: start; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--act-ink); font: 700 .74rem var(--font-mono); text-transform: uppercase; }
.lb-pull-hint { border-top: 1px solid var(--hair); padding-top: 10px; text-align: center; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.lb-stretch { height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lb-ring { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transition: background .25s; }
.lb-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.lb-ring circle { fill: none; stroke-width: 2.5; }
.lb-ring .trk { stroke: var(--hair); }
.lb-ring .fil { stroke: var(--act); stroke-linecap: round; }
.lb-ring svg.arrow { position: relative; inset: auto; width: 20px; height: 20px; rotate: 0deg; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: rotate .4s, stroke .25s; }
.lb-stretch b { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; }
.lb-stretch .say-go { display: none; color: var(--act-ink); }
.home-screen.lb-pulling .lb-stretch { height: calc(var(--lb-e, 0) * .9px); justify-content: center; } /* no fixed padding: it would snap away after the spring */
.home-screen.lb-pulling .lb-row { transform: translateY(calc(var(--lb-e, 0) * var(--k, 0) * -.14px)); }
.home-screen.lb-pulling .lb-pull-hint { opacity: 0; }
.home-screen.lb-ready .lb-ring { background: var(--act-fill); }
.home-screen.lb-ready .lb-ring svg.arrow { stroke: var(--on-accent); rotate: 360deg; }
.home-screen.lb-ready .say-pull { display: none; }
.home-screen.lb-ready .say-go { display: block; }
.home-screen.lb-spring .lb-row { transition: transform .7s var(--m-spring); }
.home-screen.lb-spring .lb-stretch { transition: height .5s var(--m-out), padding .5s var(--m-out); }

.lb-sheet { position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; padding: 0 0 max(14px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--bg); color: var(--ink); box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .45); transform: translateY(100%); transition: transform .6s cubic-bezier(.2, .9, .2, 1); }
.lb-sheet.is-dragging { transition: none; }
.lb-grab { align-self: center; margin-top: max(10px, env(safe-area-inset-top)); width: 40px; height: 5px; border-radius: 3px; background: var(--hair); }
.lb-head { display: flex; align-items: center; gap: 12px; padding: 8px 16px 0; }
.lb-head h2 { flex: 1; margin: 0; font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1.75rem; }
.lb-head span { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); text-transform: uppercase; }
.lb-sheet:focus { outline: none; }
.lb-tabs { margin: 14px 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border-radius: 14px; background: var(--surface-2); }
.lb-tabs button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 700 .9rem var(--font-body); }
.lb-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.lb-periods { margin: 10px 16px 0; display: flex; gap: 6px; }
.lb-periods button { min-height: 34px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 .74rem var(--font-mono); text-transform: uppercase; }
.lb-periods button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.lb-top.is-sheet { margin: 12px 16px 0; padding: 10px 0 12px; border-radius: 22px; flex: none; }
.lb-top.is-sheet .lb-podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; }
.lb-top.is-sheet .lb-name { margin-top: 12px; max-width: 96px; font-size: .9rem; }
.lb-list { flex: 1; min-height: 0; overflow-y: auto; margin-top: 8px; padding: 0 16px 8px; display: grid; align-content: start; overscroll-behavior: contain; }
.lb-mebar { margin: 0 14px; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px 6px 16px; border: 0; border-radius: 14px; background: var(--act-fill); color: var(--on-accent); text-align: left; font: inherit; }
.lb-mebar > b { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1.4rem; }
.lb-mebar > span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.lb-mebar > span b { font-size: .9rem; }
.lb-mebar small { font-family: var(--font-mono); font-size: .7rem; opacity: .9; }
.lb-mebar button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--on-accent); color: var(--act-ink); font: 700 .78rem var(--font-body); }
body.no-animations .lb-blobs i, body.no-animations .lb-place { animation: none; }
body.no-animations .lb-sheet, body.no-animations .home-screen .lb-row, body.no-animations .home-screen .lb-stretch { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .lb-blobs i, .lb-place { animation: none; }
  .lb-sheet, .home-screen .lb-row, .home-screen .lb-stretch { transition: none; }
}

/* ================= Polish: surfaces, controls, feedback =================
   Same palette and layouts; what changes is how the colours sit. Raised cells for stats, one corner scale
   (--r-sm/md/lg) for stand-alone controls (rows and full-bleed bars stay square), a pressed state on every
   button, and a visible focus ring. Tokens live at the top of the file. */

/* Raised cells: stats, metrics and badges read as tiles on the page instead of outlines on it */
.stats-grid, .metric-grid, .achievement-grid { border-radius: var(--r-md); overflow: hidden; border-color: var(--hair); }
.stat-card, .metric-grid .stat-card, .achievement { background: var(--surface-1); }
.screen > .panel:has(> .setting-row) { background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--hair); }

/* Buttons: one corner, the primary action stands out by fill and a soft shadow in its own colour */
.primary-button, .secondary-button, .danger-button, .google-button, .glossary-chapter-select { border-radius: var(--r-md); }
.primary-button { box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 8px 18px -10px var(--act-shadow); }
.secondary-button { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.primary-button, .secondary-button, .danger-button, .google-button, .mx-pill, .lb-mebar button, .konj-tile, .chapter-tab, .lb-tabs button, .lb-periods button, .icon-button {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease, filter .12s ease, box-shadow .15s ease;
}
.primary-button:not(:disabled):active, .secondary-button:not(:disabled):active, .danger-button:not(:disabled):active, .google-button:active,
.lb-mebar button:active, .konj-tile:not(:disabled):active, .chapter-tab:not(:disabled):active, .lb-periods button:active {
  transform: scale(.97); filter: brightness(.94); opacity: 1;
}
.primary-button:not(:disabled):active { box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 3px 8px -6px var(--act-shadow); }
.secondary-button:not(:disabled):active { background: var(--surface-2); }
.icon-button.speaker-btn:active { transform: scale(.92); opacity: 1; }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
button:disabled { cursor: not-allowed; }

/* Focus: one ring for every control, shown for keyboard use only */
:where(button, a, summary, input, select, [tabindex]):focus-visible { outline: 2px solid var(--act-ink); outline-offset: 3px; }
.mode-card:focus-visible, .course-row:focus-visible, .stop:focus-visible, .option-button:focus-visible, .lb-row:focus-visible { outline-offset: -2px; }

/* Answer options: a real key chip; the right answer's key carries the colour */
.option-key { width: 24px; height: 24px; border-radius: 8px; border-color: color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink-2); transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.option-button { transition: background-color .15s ease, color .15s ease, opacity .2s ease; }
.option-button.correct .option-key { border-color: var(--sage-ink); background: var(--sage-ink); color: var(--on-accent); }
.option-button.correct { box-shadow: inset 3px 0 0 var(--sage-ink); }
.option-button.wrong { box-shadow: inset 3px 0 0 var(--clay-ink); }
.option-button.wrong .option-key { border-color: var(--clay-ink); color: var(--clay-ink); }
.feedback { border-radius: var(--r-md); }
.feedback strong { letter-spacing: .01em; }
.option-button.muted-option { opacity: .5; }

/* Small controls: same corner, 44 px tap height where the row has room */
.chapter-tab { min-height: 44px; border-radius: var(--r-sm); border-color: color-mix(in srgb, var(--ink) 18%, transparent); }
.konj-tile, .konj-votd, .konj-streak, .price-tag, .umlaut-hint, .file-input { border-radius: var(--r-sm); }
.konj-tile { border-color: color-mix(in srgb, var(--ink) 22%, transparent); background: var(--surface-1); }
.option-key, .palette-check { flex: none; }
.palette-check { border-radius: 50%; transition: background-color .15s ease, border-color .15s ease; }
.lb-note { min-height: 44px; }
/* Pills that stay compact get a larger invisible hit area */
.lb-periods button, .mx-pill, .lb-mebar button { position: relative; }
.lb-periods button::after, .mx-pill::after, .lb-mebar button::after { content: ""; position: absolute; inset: -6px -3px; }
.lb-periods button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.lb-tabs button { transition: background-color .2s ease, color .2s ease; }

/* Tab bar: inactive labels are readable, the active one is full ink */
.tabbar > button { transition: color .2s ease; }

/* Progress fills ease to their new value */
.course-row .mini i, .konj-level .bar i { transition: width .45s var(--m-out); }

/* Full-bleed bars: a lighter line on top gives the fill an edge against the page */
.action-bar { box-shadow: inset 0 1px 0 rgb(255 255 255 / .14); }
/* The practice card is a stack of questions: two cards peek out underneath (shadows, so they stay put on press). */
.home-dock > .action-bar, .home-screen > .action-bar, .swipe-under-dock > .action-bar { box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 14px 24px -16px var(--act-shadow); }

body.no-animations .primary-button:active, body.no-animations .secondary-button:active { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .primary-button:active, .secondary-button:active, .danger-button:active, .google-button:active, .konj-tile:active, .chapter-tab:active, .lb-periods button:active, .lb-mebar button:active, .icon-button.speaker-btn:active { transform: none; }
}

/* ---- Heute sky (T2): the top 3 without a card. The colours run edge to edge from the top of the screen
   (behind the iPhone status bar where the app may draw there) and fade into the page; the date row lives in
   the sky, so the header steps aside. ---- */
body.home-sky .app-shell { padding-top: 0; }
body.home-sky .site-header { display: none; }
.lb-sky { margin: 0 -20px; padding: calc(max(14px, env(safe-area-inset-top)) + 4px) 20px 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lb-sky .lb-blobs { inset: -10px -10px 0; opacity: var(--lb-sky); -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent); }
.lb-sky .lb-blobs i:nth-child(1) { top: 30px; width: 190px; height: 190px; }
.lb-sky .lb-blobs i:nth-child(2) { width: 220px; height: 220px; }
.lb-sky .lb-blobs i:nth-child(3) { top: 190px; width: 220px; height: 150px; }
.lb-sky-head { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 28px; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; text-transform: uppercase; color: var(--ink); }
.lb-sky-brand { display: flex; align-items: center; gap: 6px; }
.lb-sky .lb-top-head { margin-top: 18px; padding: 0; }
.lb-sky .lb-podium { margin-top: 8px; }
.lb-sky .lb-name { margin-top: 20px; font-size: 1rem; }
.lb-sky .lb-place.p1 .lb-name { margin-top: 26px; font-size: 1.2rem; }

:root { --lb-sky: .62; }
:root[data-theme="dark"] { --lb-sky: .34; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lb-sky: .34; } }

/* ---- Meteors: thin streaks with a bright head, falling from the upper right. A slow, sparse drift in the night sky
   (Heute and the full leaderboard, dark mode only) and a one-time burst for good moments (a climb on the board, a great
   round, a beaten boss). The streaks take the palette's own tones; nothing moves with Animationen off or Reduce Motion. ---- */
.mt-layer { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mt { position: absolute; width: var(--len, 80px); height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--mc, #fff)); opacity: 0; animation: mt-drift 8s linear var(--w, 0s) infinite; }
.mt::after { content: ""; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--mc, #fff); box-shadow: 0 0 8px 2px color-mix(in srgb, var(--mc, #fff) 50%, transparent); }
@keyframes mt-drift { 0% { transform: translate(0, 0) rotate(122deg); opacity: 0; } 4% { opacity: 1; } 30% { opacity: .9; } 38%, 100% { transform: translate(-300px, 480px) rotate(122deg); opacity: 0; } }
.mt-sky { display: none; -webkit-mask: linear-gradient(#000 60%, transparent 92%); mask: linear-gradient(#000 60%, transparent 92%); }
.mt-sky.mt-small .mt { animation-name: mt-drift-short; }
@keyframes mt-drift-short { 0% { transform: translate(0, 0) rotate(122deg); opacity: 0; } 4% { opacity: 1; } 30% { opacity: .85; } 38%, 100% { transform: translate(-200px, 320px) rotate(122deg); opacity: 0; } }
:root[data-theme="dark"] .mt-sky { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-sky { display: block; } }
.mt-burst { bottom: auto; height: 460px; -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent); }
.mt-burst .mt { height: 2px; animation: mt-burst 1.5s cubic-bezier(.3, .6, .4, 1) var(--w, 0s) both; }
.mt-burst .mt::after { width: 5px; height: 5px; margin-top: -2.5px; right: -3px; box-shadow: 0 0 10px 3px color-mix(in srgb, var(--mc) 40%, transparent); }
.mt-gold .mt::after { background: color-mix(in srgb, var(--mc) 40%, #fff); }
@keyframes mt-burst { 0% { transform: translate(0, 0) rotate(122deg); opacity: 0; } 8% { opacity: 1; } 75% { opacity: .85; } 100% { transform: translate(-320px, 512px) rotate(122deg); opacity: 0; } }
.results, .konj-results { isolation: isolate; }
/* Diwali fireworks (index.html, fireworks): a canvas in the meteor sky's place, with its layer, mask and dark-mode-only rule; a burst layer (.fw-burst) sits
   where the meteor burst would, and the sky row greets in the Peacock blue */
.fw-sky { width: 100%; height: 100%; }
.lb-sky.fw-tall { overflow: visible; } /* Heute: the canvas reaches below the week row, the rockets rise from there */
.fw-tall > .fw-sky { -webkit-mask: linear-gradient(#000 72%, transparent); mask: linear-gradient(#000 72%, transparent); }
.fw-burst { bottom: auto; height: 460px; -webkit-mask: linear-gradient(#000 60%, transparent); mask: linear-gradient(#000 60%, transparent); }
.fw-greet { color: var(--slate-ink); }
:root[data-theme="dark"] .fw-greet { color: #9fe8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fw-greet { color: #9fe8ff; } }

/* ---- Christmas (index.html, xmasOn): the night sky (dark mode, with motion), presents, hats and snowflakes ---- */
.xm-sky .xm-night { position: absolute; inset: 0; background: linear-gradient(#0b1630cc, transparent 62%); }
.xm-sky .xm-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .2; animation: xm-tw 3s ease-in-out infinite; }
@keyframes xm-tw { 50% { opacity: .9; transform: scale(1.4); } }
.xm-sky .xm-moon { position: absolute; top: calc(max(14px, env(safe-area-inset-top)) + 12px); left: calc(50% - 22px); width: 66px; height: 66px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fffef8 0%, #f7f0d8 38%, #e9dfbd 68%, #d2c494 100%);
  box-shadow: inset -6px -5px 12px rgb(120 100 60 / .25), 0 0 0 1px rgb(255 250 230 / .06), 0 0 26px 6px rgb(255 246 220 / .32), 0 0 90px 30px rgb(180 200 255 / .12); }
.xm-sky .xm-moon::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(ellipse 13px 9px at 60% 40%, rgb(150 135 95 / .22), transparent), radial-gradient(ellipse 10px 12px at 38% 64%, rgb(150 135 95 / .2), transparent), radial-gradient(ellipse 7px 6px at 70% 68%, rgb(150 135 95 / .18), transparent), radial-gradient(ellipse 6px 5px at 30% 36%, rgb(150 135 95 / .14), transparent); }
.xm-sky .xm-hills { position: absolute; left: 0; top: calc(var(--xm-pod, 90px) + 28px); width: 100%; height: 150px; -webkit-mask: linear-gradient(#000 62%, transparent); mask: linear-gradient(#000 62%, transparent); }
.xm-sky .xm-win { animation: xm-win 5s ease-in-out infinite; }
@keyframes xm-win { 0%, 100% { opacity: 1; } 45% { opacity: .75; } 50% { opacity: .95; } }
.xm-sky .xm-snow { position: absolute; inset: 0; width: 100%; height: 100%; }
.fw-tall > .xm-sky { -webkit-mask: linear-gradient(#000 80%, transparent); mask: linear-gradient(#000 80%, transparent); }
/* The sleigh flies in front of the podium, as one deep night tone, across the moon every 18 seconds */
.mt-layer.xm-front { z-index: 2; -webkit-mask: none; mask: none; }
.xm-path { position: absolute; left: 0; top: calc(max(14px, env(safe-area-inset-top)) - 14px); width: 100%; animation: xm-path 18s linear 2s infinite; transform: translate(0, 96px); }
@keyframes xm-path { 0% { transform: translate(0, 96px); } 52% { transform: translate(calc(100% + 260px), -54px); } 52.1%, 100% { transform: translate(calc(100% + 260px), -54px); opacity: 0; } }
.xm-fly { position: absolute; left: -220px; top: 0; width: 200px; color: #060c1d; rotate: -6deg; }
.xm-bob { display: block; animation: xm-bob 1.4s ease-in-out infinite alternate; }
@keyframes xm-bob { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
.xm-sleigh { display: block; width: 100%; height: auto; overflow: visible; }
.xm-deer { animation: xm-bob .7s ease-in-out infinite alternate; }
.xm-leg-f, .xm-leg-b { transform-box: fill-box; }
.xm-leg-f { transform-origin: 0 0; animation: xm-leg-f .7s ease-in-out infinite alternate; }
.xm-leg-b { transform-origin: 100% 0; animation: xm-leg-b .7s ease-in-out infinite alternate; }
@keyframes xm-leg-f { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
@keyframes xm-leg-b { from { transform: rotate(12deg); } to { transform: rotate(-14deg); } }
/* Sky row greeting */
.xm-greet { color: var(--slate-ink); }
.xm-star { width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; fill: currentColor; }
:root[data-theme="dark"] .xm-greet { color: #cfe8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xm-greet { color: #cfe8ff; } }
/* Podium: presents and hats */
.xm-gift { display: block; width: 64%; height: auto; margin-top: 8px; overflow: visible; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .35)); }
.lb-place.p1 .xm-gift { width: 72%; }
.lb-place.is-empty .xm-gift { opacity: .45; filter: grayscale(1); }
.xm-wear { position: relative; display: block; width: fit-content; margin: 0 auto; line-height: 0; }
.xm-wear .lb-mascot { max-width: none; }
.xm-hat { position: absolute; z-index: 1; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .3)); }
.xm-pipo .xm-hat { left: 33%; top: -11%; width: 46%; rotate: 14deg; }
.xm-cloo .xm-hat { left: 29%; top: -9%; width: 50%; rotate: 16deg; }
.xm-talu-hat { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .3)); }
/* Week row: snowflakes instead of flames, a lit one for each day that reached the goal */
.week { --sf-on: #3d7fd6; --sf-glow: #8fc4ff; --sf-off: #b9c3cf; }
:root[data-theme="dark"] .week { --sf-on: #e9f7ff; --sf-glow: #7cc8ff; --sf-off: #4b5a70; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .week { --sf-on: #e9f7ff; --sf-glow: #7cc8ff; --sf-off: #4b5a70; } }
.week .sf { display: block; width: 26px; height: 26px; overflow: visible; color: var(--sf-off); opacity: .6; }
.week .full .sf { color: var(--sf-on); opacity: 1; filter: drop-shadow(0 0 6px var(--sf-glow)); animation: xm-spin 14s linear infinite; }
.week .full:nth-child(even) .sf { animation-direction: reverse; }
.week .t:not(.full) .sf { opacity: .85; }
@keyframes xm-spin { to { transform: rotate(360deg); } }
body.no-animations .week .sf, body.no-animations .xm-path { animation: none; }
@media (prefers-reduced-motion: reduce) { .week .sf { animation: none !important; } }
.lb-climb { position: absolute; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) - 4px); z-index: 3; translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); white-space: nowrap; animation: lb-climb 4.6s ease-out both; }
.lb-climb > span:last-child { display: grid; gap: 1px; }
.lb-climb b { font-size: .9rem; }
.lb-climb small { font-family: var(--font-mono); font-size: .7rem; opacity: .8; }
.lb-climb-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--act-fill); color: #fff; }
:root[data-theme="dark"] .lb-climb-ic { color: var(--on-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lb-climb-ic { color: var(--on-accent); } }
.lb-climb-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes lb-climb { 0% { transform: translateY(-8px) scale(.9); opacity: 0; } 10%, 85% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
body.no-animations .mt-layer { display: none; }
body.no-animations .lb-climb { animation: none; }
@media (prefers-reduced-motion: reduce) { .mt-layer { display: none; } .lb-climb { animation: none; } }

/* Results: the grade counts down (motionResults), the marker slides with it, the label lands, the squares fill in */
.ruler .mk.m-slide { transition: left 1.1s var(--m-out) .25s; }
.note-figure.m-count .lab b { animation: m-label .3s ease 1.35s backwards; }
@keyframes m-label { from { opacity: 0; transform: translateY(4px); } }
.squares.m-fill i { animation: m-sq .45s var(--m-spring) calc(var(--i, 0) * 32ms + .2s) backwards; }
@keyframes m-sq { from { transform: scale(.25); background: var(--track); } }

/* Heute: no iPhone rubber-band at the ends, so the pull-up stretch is the only thing that moves */
body.home-sky main { overscroll-behavior-y: none; }

/* Possessivartikel cheat sheet (start screen, and under a wrong answer) */
/* No white card of its own: the page shows through, as on the Konjugation Spickzettel (owner 2026-11-21). */
.cheat-sheet { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 0 14px; background: transparent; }
.cheat-sheet > .cs-head { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--hair); font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; color: var(--ink-2); }
.cheat-sheet .cs-title { margin: 12px 0 6px; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; color: var(--ink-2); }
.cheat-sheet .cs-persons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
/* The person cards look pressable (owner 2026-11-21: "a visual cue that the card is clickable"): raised like a key, sink when pressed. */
.cheat-sheet .cs-person { display: grid; gap: 1px; align-content: start; margin: 0 0 2px; padding: 6px 8px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--surface-1); box-shadow: 0 2px 0 var(--hair); font: inherit; font-size: .7rem; text-align: left; color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease, color .15s ease, transform .1s ease, box-shadow .1s ease; }
.cheat-sheet .cs-person b { font-size: .9rem; color: var(--ink); }
.cheat-sheet .cs-person:active { transform: translateY(2px); box-shadow: 0 0 0 var(--hair); }
@media (hover: hover) { .cheat-sheet .cs-person:not(.on):hover { background: var(--surface-2); } }
.cheat-sheet .cs-person:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
.cheat-sheet .cs-person.on { border-color: var(--act); background: var(--act-field); box-shadow: 0 2px 0 var(--act); color: var(--act-ink); }
.cheat-sheet .cs-person.on b { color: var(--act-ink); }
/* ‹ Endungen (mein) › and the dots under the table: the table is something to page through (owner 2026-11-21, mockup L). */
.cheat-sheet .cs-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 6px; }
.cheat-sheet .cs-pager .cs-title { margin: 0; text-align: center; }
.cheat-sheet .cs-step { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 1px solid var(--hair); border-radius: 50%; background: var(--surface-1); box-shadow: 0 2px 0 var(--hair); color: var(--act-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .1s ease, box-shadow .1s ease; }
.cheat-sheet .cs-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cheat-sheet .cs-step.prev svg { transform: scaleX(-1); }
.cheat-sheet .cs-step:active { transform: translateY(2px); box-shadow: 0 0 0 var(--hair); }
.cheat-sheet .cs-step:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
.cheat-sheet .cs-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0 2px; }
.cheat-sheet .cs-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--track); transition: width .2s ease, background-color .2s ease; }
.cheat-sheet .cs-dots i.on { width: 16px; background: var(--act); }
/* The endings table (owner 2026-11-21, mockup-possessiv-spickzettel.html): a column per article in its colour, as in the
   der·die·das trainer (der slate, das sage, die clay, Pl. sand); the Akkusativ -en in the accent. Forms never break mid-word. */
.cheat-sheet .g-m { --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.cheat-sheet .g-n { --g-ink: var(--sage-ink); --g-field: var(--sage-field); }
.cheat-sheet .g-f { --g-ink: var(--clay-ink); --g-field: var(--clay-field); }
.cheat-sheet .g-pl { --g-ink: var(--sand-ink); --g-field: var(--sand-field); }
.cheat-sheet .cs-tab { width: calc(100% + 8px); margin: 0 -4px; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cheat-sheet .cs-tab thead td:first-child { width: 3.4rem; }
.cheat-sheet .cs-tab thead th { padding: 0 0 2px; text-align: center; }
.cheat-sheet .cs-tab .cs-g { display: inline-block; min-width: 2.6rem; padding: 3px 8px; border-radius: 999px; background: var(--g-field); color: var(--g-ink); font-family: var(--font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.cheat-sheet .cs-tab tbody th { padding: 0 2px; text-align: left; vertical-align: middle; white-space: nowrap; font-family: var(--font-mono); font-weight: 500; font-size: .66rem; line-height: 1.15; text-transform: uppercase; color: var(--ink-2); }
.cheat-sheet .cs-tab abbr { text-decoration: none; }
.cheat-sheet .cs-tab tbody th small { display: block; font-family: var(--font-body); font-size: .64rem; text-transform: none; color: var(--ink-3); }
.cheat-sheet .cs-tab td { padding: 9px 2px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--g-field) 55%, transparent); text-align: center; white-space: nowrap; overflow-wrap: normal; font-size: .92rem; font-weight: 600; color: var(--ink); }
.cheat-sheet .cs-tab td b { font-weight: 800; color: var(--g-ink); }
.cheat-sheet .cs-tab td .cs-alt { display: block; margin-top: 1px; font-size: .62rem; font-weight: 500; color: var(--ink-3); } /* "auch unsers" */
.cheat-sheet .cs-tab .cs-akk td.g-m b { padding: 0 2px; border-radius: 4px; background: var(--act-field); color: var(--act-ink); }
.cheat-sheet .cs-tab td.on { background: var(--act-field); box-shadow: inset 0 0 0 1.5px var(--act); }
.cheat-sheet .cs-tab.cs-swap tbody td { animation: cs-in .22s ease both; }
@keyframes cs-in { from { opacity: .2; transform: translateY(3px); } }
/* Swipe or ‹ ›: only the form cells move, the Nom./Akk. labels stay still. While the finger is down they follow it (cs-drag,
   --cs-dx); on a change they glide out (cs-leave) and the new forms glide in from the other side; otherwise they ease back.
   Sideways moves on the table belong to the swipe. */
.cheat-sheet .cs-tab { touch-action: pan-y; }
.cheat-sheet .cs-tab tbody td { transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .24s ease; }
.cheat-sheet .cs-tab.cs-drag tbody td { transform: translateX(var(--cs-dx, 0)); opacity: var(--cs-op, 1); transition: none; }
.cheat-sheet .cs-tab.cs-drag.cs-leave tbody td { transition: transform .14s cubic-bezier(.4, 0, 1, 1), opacity .14s ease-in; }
.cheat-sheet .cs-tab.cs-swap[data-dir="next"] tbody td { animation: cs-in-next .3s cubic-bezier(.2, .8, .2, 1) both; }
.cheat-sheet .cs-tab.cs-swap[data-dir="prev"] tbody td { animation: cs-in-prev .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cs-in-next { from { opacity: 0; transform: translateX(36px); } }
@keyframes cs-in-prev { from { opacity: 0; transform: translateX(-36px); } }
@media (prefers-reduced-motion: reduce) { .cheat-sheet .cs-tab.cs-swap tbody td { animation: none; } .cheat-sheet .cs-tab tbody td { transition: none; } .cheat-sheet .cs-person, .cheat-sheet .cs-step, .cheat-sheet .cs-dots i { transition: none; } }
.feedback .cheat-sheet .cs-tab td { padding: 7px 1px; font-size: .82rem; }
.feedback .cheat-sheet .cs-tab thead td:first-child { width: 3rem; }
/* The example: bigger, the possessive word in its article's colour (owner 2026-11-21). */
.cheat-sheet .cs-ex { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--g-ink); border-radius: var(--r-sm); background: color-mix(in srgb, var(--g-field) 55%, transparent); font-size: 1.05rem; line-height: 1.35; color: var(--ink); }
.cheat-sheet .cs-ex .cs-ex-w { font-weight: 700; color: var(--g-ink); }
.cheat-sheet .cs-ex .cs-ex-w b { font-weight: 800; text-decoration: underline 2px; text-underline-offset: 3px; }
.cheat-sheet .cs-note { margin: 10px 0 12px; font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.feedback .cheat-sheet { margin-top: 10px; text-align: left; }
@media (max-width: 380px) { .cheat-sheet .cs-persons { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feedback .cheat-sheet { padding: 0 10px; } .feedback .cheat-sheet .cs-tab td { font-size: .74rem; } .cheat-sheet .cs-tab thead td:first-child { width: 2.8rem; } }

/* Verb des Tages: a flash card on Today (both faces in the card's own space, so it keeps its size) and a sheet with the question */
.day-card.votd { position: relative; padding: 0; background: none; box-shadow: none; perspective: 900px; }
.day-card.votd:active { filter: none; }
.votd-flip { position: relative; display: grid; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.77, 0, .175, 1); }
.day-card.votd.flipped .votd-flip { transform: rotateY(180deg); }
.day-card.votd:active .votd-flip { scale: .98; }
.votd-face { grid-area: 1 / 1; display: grid; gap: 3px; align-content: start; min-width: 0; padding: 10px 11px 11px; background: var(--sand-field); box-shadow: inset 0 2px 0 var(--sand); text-align: left; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.votd-back { transform: rotateY(180deg); }
.votd-face .k { font-family: var(--font-mono); font-size: .7rem; letter-spacing: 0; color: var(--ink-2); text-transform: uppercase; }
.votd-face .try { color: var(--sand-ink); }
.votd-face .q { font-family: var(--font-mono); font-size: .7rem; letter-spacing: 0; color: var(--ink-2); text-transform: uppercase; }
.votd-face .turn { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--sand) 55%, transparent) 50%); }
.day-card.votd.won .votd-back { box-shadow: inset 0 2px 0 var(--sage); }
.day-card.votd.lost .votd-back { box-shadow: inset 0 2px 0 var(--clay); }
.day-card.votd.won .votd-back .try { color: var(--sage-ink); }
.day-card.votd.lost .votd-back .try { color: var(--clay-ink); }
.day-card.votd .m-float { z-index: 2; top: -6px; font-size: .8rem; font-family: var(--font-mono); }

.votd-scrim { position: fixed; inset: 0; z-index: 7; background: rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.votd-scrim.on { opacity: 1; pointer-events: auto; }
.votd-sheet { position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; padding: 10px 20px max(22px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); color: var(--ink); box-shadow: 0 -12px 34px rgba(0, 0, 0, .2); transform: translateY(105%); transition: transform .32s cubic-bezier(.23, 1, .32, 1); }
.votd-sheet.on { transform: none; }
.votd-sheet:focus { outline: none; }
.votd-grab { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--track); }
.votd-k { display: flex; justify-content: space-between; gap: 8px; font: 500 .7rem var(--font-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.votd-xp { color: var(--sand-ink); }
.votd-inf, .votd-forms { margin: 6px 0 2px; font-family: var(--font-display); font-stretch: 62%; font-weight: 800; line-height: .95; }
.votd-inf { font-size: 2.25rem; }
.votd-forms { font-size: 1.75rem; font-stretch: 66%; }
.votd-en { margin: 0; font: .95rem var(--font-italic); color: var(--ink-2); }
.votd-ask { margin: 14px 0 0; font: 500 .7rem var(--font-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.votd-sentence { margin: 6px 0 12px; font: 600 1.08rem/1.45 var(--font-body); }
.votd-gap { display: inline-block; min-width: 3.2em; min-height: 1.1em; vertical-align: bottom; border-bottom: 2px dotted color-mix(in srgb, var(--sand-ink) 70%, transparent); color: transparent; line-height: 1.1; }
.votd-gap.filled { color: inherit; border-bottom-style: solid; }
.votd-gap.filled.ok { border-bottom-color: var(--sage); }
.votd-gap.filled.no { border-bottom-color: var(--clay); color: var(--clay-ink); }
.votd-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.votd-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 1px solid var(--hair); background: var(--surface-1); color: var(--ink); font: 600 1rem var(--font-body); text-align: left; transition: background-color .2s ease, border-color .2s ease, opacity .2s ease, transform .16s ease-out; }
.votd-choice:active { transform: scale(.97); }
.votd-choice .key { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--hair); font: .7rem var(--font-mono); color: var(--ink-2); }
.votd-choice.right { background: var(--sage-field); border-color: var(--sage); }
.votd-choice.right .key { background: var(--sage); border-color: var(--sage); color: var(--on-accent, #fff); }
.votd-choice.wrong { background: var(--clay-field); border-color: var(--clay); color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--clay); }
.votd-choice.dim { opacity: .38; }
.votd-choice:disabled { cursor: default; }
.votd-res { min-height: 1.3em; margin: 12px 0 0; font: 600 .95rem var(--font-body); opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .25s cubic-bezier(.23, 1, .32, 1); }
.votd-res.on { opacity: 1; transform: none; }
.votd-res.ok { color: var(--sage-ink); }
.votd-res.no { color: var(--clay-ink); }
.votd-sheet.m-nudge { animation: votd-nudge .32s ease-in-out; }
@keyframes votd-nudge { 20% { translate: -6px 0; } 45% { translate: 5px 0; } 70% { translate: -2px 0; } }
.votd-line { margin: 0; padding-top: 10px; border-top: 1px solid var(--hair); font: .92rem/1.4 var(--font-body); color: var(--ink-2); }
.votd-line b { color: var(--ink); }
.votd-line b.no { color: var(--clay-ink); }
.votd-when { margin: 12px 0 0; font: 500 .7rem var(--font-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
body.no-animations .votd-flip, body.no-animations .votd-sheet, body.no-animations .votd-scrim { transition: none; }
body.no-animations .votd-sheet.m-nudge { animation: none; }
@media (prefers-reduced-motion: reduce) { .votd-flip { transition-duration: .01ms; } .votd-sheet.m-nudge { animation: none; } }

/* Possessivartikel: the sentence or question the task starts from, and the form to judge in "Richtig oder falsch?" */
.poss-setup { margin: 6px 0 0; padding: 10px 12px; border-left: 3px solid var(--slate); background: var(--surface-1); font: 600 1rem/1.4 var(--font-body); color: var(--ink); }
.poss-ask { margin: 8px 0 -6px; font: 500 .7rem var(--font-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.poss-shown { padding: 0 2px; border-bottom: 2px solid var(--sand); font-weight: 700; }
.poss-was { margin-right: 2px; color: var(--clay-ink); font-weight: 600; text-decoration-thickness: 2px; opacity: .85; }
.mode-card.mode-card-small { padding-top: 10px; padding-bottom: 10px; }
.mode-card.mode-card-small .mode-card-title { font-size: 1.4rem; }

/* Erinnerungen: the time picker in Mehr, and the one-time offer on the results screen */
.mx-select { min-height: 40px; max-width: 46vw; padding: 0 10px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--surface-1); color: var(--ink); font: 600 .9rem var(--font-body); }
.remind-offer { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--sand-field); box-shadow: inset 0 2px 0 var(--sand); }
.remind-offer p { margin: 0; font: 600 .98rem/1.4 var(--font-body); color: var(--ink); }
.remind-offer div { display: flex; flex-wrap: wrap; gap: 8px; }
.remind-offer button { min-height: 44px; padding: 0 16px; border-radius: 999px; font: 700 .92rem var(--font-body); cursor: pointer; }
.remind-yes { border: 0; background: var(--act-fill); color: #fff; }
.remind-no { border: 1px solid var(--hair); background: transparent; color: var(--ink-2); }

/* Two-choice dialog (choose): facts as small pills, a progress bar, small print under the buttons */
.modal-card .modal-facts { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.modal-card .modal-facts span { font: 500 .7rem var(--font-mono); color: var(--ink-2); border: 1px solid var(--hair); border-radius: 999px; padding: 4px 9px; }
.modal-card .modal-facts b { color: var(--ink); font-weight: 500; }
.modal-card .resume-bar { position: relative; height: 3px; border-radius: 3px; background: var(--hair); margin: 0 0 18px; }
.modal-card .resume-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--sage), var(--act)); }
.modal-card .resume-bar em { position: absolute; top: 50%; translate: -50% -50%; width: 11px; height: 11px; border-radius: 50%; background: var(--act); box-shadow: 0 0 0 3px var(--surface-1, var(--bg)); }
.modal-card p.modal-fine { order: 9; margin: 12px 0 0; font-size: .8rem; text-align: center; }
.modal-card:has(.modal-fine) { display: flex; flex-direction: column; }

/* Looking back: pulling the XP bar to the left rewinds the line under the finger; a label shows the question chosen */
.xp-rail[tabindex] { touch-action: pan-y; cursor: grab; }
.xp-rail.pulling { cursor: grabbing; transition: none; }
.xp-rail.pulling .xp-rider { transition: color .3s; }
.back-price { position: absolute; z-index: 2; top: 100%; left: calc(var(--p) * 1%); translate: calc(var(--p) * -1%) 6px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 .7rem var(--font-mono); white-space: nowrap; opacity: 0; scale: .92; transform-origin: 50% 0; transition: opacity .15s, scale .2s cubic-bezier(.23, 1, .32, 1); pointer-events: none; }
.xp-rail.rewind .back-price { opacity: 1; scale: 1; }
.bp-dots { display: inline-flex; gap: 4px; }
.bp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); opacity: .55; transition: opacity .12s, scale .18s cubic-bezier(.23, 1, .32, 1); }
.bp-dots i.miss { background: var(--clay); }
.bp-dots i.sel { opacity: 1; scale: 1.5; }
.look-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink-2); font: .7rem var(--font-mono); }
.look-head b { color: var(--act-ink); font-weight: 500; }
.look-dots { display: flex; gap: 8px; margin: 12px 0 4px; }
.look-dots button { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--hair); border-radius: 50%; background: none; color: var(--ink-2); font: 500 .7rem var(--font-mono); }
.look-dots button::after { content: ""; position: absolute; bottom: -5px; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.look-dots button.miss::after { background: var(--clay); }
.look-dots button.sel { background: var(--ink); color: var(--bg); border-color: transparent; }
.look-done { width: 100%; margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .back-price, .bp-dots i { transition: none; } }
/* The look-back tip: the swipe label with a hint, and a faint finger that pulls the bar (index.html lookBack.tip) */
.back-price.look-tip { transition: none; }
.look-arrow { margin-right: -3px; color: var(--act); font-weight: 700; }
.look-finger { position: absolute; z-index: 3; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); opacity: 0; pointer-events: none; }
/* Signed out: the leaderboard's place on Heute and in the sheet shows why and how to see it (index.html lbLockHtml) */
.lb-lock { position: relative; display: grid; justify-items: center; gap: 10px; padding: 26px 18px 30px; text-align: center; }
.lb-lock-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-1); border: 1px solid var(--hair); }
.lb-lock-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-lock b { font: 800 1.35rem/1.05 var(--font-display); font-stretch: 68%; text-transform: uppercase; color: var(--ink); }
.lb-lock p { margin: 0; max-width: 270px; font-family: var(--font-italic); font-style: italic; color: var(--ink-2); line-height: 1.35; }
.lb-lock-btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--act-fill); color: #fff; font: 700 .8rem var(--font-mono); text-transform: uppercase; box-shadow: var(--act-shadow); cursor: pointer; }
.lb-lock-btn:active { transform: scale(.97); }
.lb-top.is-sheet.is-guest .lb-lock { padding: 22px 18px 24px; }
/* Guest lock: what a guest cannot open yet stays visible, greyed, with a lock where the arrow or the stop would be */
.lock-glyph { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mode-card.locked::after { content: none; }
.mode-card.locked .mode-card-title, .mode-card.locked .page-copy, .mode-card.locked .kicker, .mode-card.locked .mode-card-title span { color: var(--ink-3); }
.guest-tag { color: var(--sage-ink); }
.stop.locked .o { display: grid; place-items: center; }
.stop.locked .o svg { width: 12px; height: 12px; fill: none; stroke: var(--ink-3); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.stop.locked .t, .stop.locked .t .n, .stop.locked .m { color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .stop.locked:hover .t { color: var(--ink-2); } }
.guest-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 6px -20px; padding: 12px 20px; background: var(--surface-1); border-block: 1px solid var(--hair); }
.guest-band b { display: block; font: 800 1.05rem/1.05 var(--font-display); font-stretch: 72%; text-transform: uppercase; color: var(--ink); }
.guest-band span { font-family: var(--font-italic); font-style: italic; color: var(--ink-2); font-size: .9rem; }
.guest-band .lb-lock-btn { min-height: 44px; padding: 0 16px; font-size: .7rem; }
/* The guest sign-in sheet ("Calm and clear", owner pick 2026-10-30): a small lock label first, a calm title, checked
   benefits, one full-width Google button and a quiet "Später". Only this sheet: choose()'s other dialogs keep their look. */
.modal-card:has(.guest-kicker) { display: flex; flex-direction: column; padding: 22px 20px 14px; border-radius: 22px; }
.modal-card:has(.guest-kicker) h2 { order: 1; margin-bottom: 8px; font-family: var(--font-body); font-stretch: 100%; font-size: 1.4rem; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; text-transform: none; }
.guest-kicker { order: 0; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 500 .66rem var(--font-mono); text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); }
.guest-kicker-icon { width: 32px; height: 32px; flex: none; display: grid; place-content: center; border-radius: 10px; background: var(--act-field); color: var(--act-ink); }
.guest-kicker-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.modal-card:has(.guest-kicker) p { order: 2; font-size: .9rem; line-height: 1.5; }
.guest-lock-list { order: 3; margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 10px; font-size: .9rem; color: var(--ink); }
.guest-lock-list li { display: flex; align-items: center; gap: 10px; }
.guest-lock-list svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--sage-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.modal-card:has(.guest-kicker) .button-row { order: 4; flex-direction: column-reverse; gap: 4px; }
.modal-card:has(.guest-kicker) .button-row > .primary-button { min-height: 52px; justify-content: center; gap: 10px; border-radius: 14px; font-size: 1rem; }
.modal-card:has(.guest-kicker) .button-row > .primary-button::before { content: ""; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E") center / 14px no-repeat; }
.modal-card:has(.guest-kicker) .button-row > .secondary-button { min-height: 46px; border-color: transparent; background: transparent; color: var(--ink-2); font-weight: 600; }
/* "Freitag ohne Limit" on Heute (index.html boostStripHtml): announces Friday's window, then marks it live */
.boost-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); color: var(--ink); }
.boost-strip b { font: 700 .74rem var(--font-mono); text-transform: uppercase; color: var(--act-ink); }
.boost-strip span { font-size: .9rem; color: var(--ink-2); }
.boost-strip.is-live { border-color: color-mix(in srgb, var(--act) 45%, var(--hair)); background: color-mix(in srgb, var(--act) 10%, var(--surface-1)); }
.boost-strip.is-live span { color: var(--ink); font-weight: 600; }

/* ---- Refinements (owner: "Refine real screens", 2026-11-01): small, separable details on the existing screens; reviewed in mockup-refine.html ---- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* 1 · Grain: removes the flat, digital look of large dark areas (Craft "Noise"). Painted once, blended inside its own layer. */
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }


/* 2b · Word of the day: the whole card speaks the word when tapped, but nothing said so. A speaker chip makes it visible. */
.day-card.word { position: relative; }
.day-card.word::after { content: ""; position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--clay) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clay) 45%, transparent); }
.day-card.word::before { content: ""; position: absolute; right: 19px; bottom: 19px; width: 14px; height: 14px; z-index: 1; background: var(--clay-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9z'/%3E%3Cpath d='M16.500 8.500a5 5 0 0 1 0 7' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9z'/%3E%3Cpath d='M16.500 8.500a5 5 0 0 1 0 7' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; }

/* 2c · Board rows: avatars get the faint inner edge (Craft "Image outlines"), your own row lifts with a coloured shadow, ranks stay in step. */
.lb-av { outline: 1px solid rgb(0 0 0 / .1); outline-offset: -1px; }
.lb-row .k, .lb-row .c { font-variant-numeric: tabular-nums; }
.lb-row.is-me { box-shadow: inset 0 0 0 1.5px var(--act), 0 14px 24px -16px color-mix(in srgb, var(--act) 70%, #000); }
.lb-row { transition: background .15s ease; }
.lb-place small { font-variant-numeric: tabular-nums; }

/* 3 · Fallback home (no board, e.g. offline first run): goal ring with glowing segments, a warm backlight, a little more weight in the number. */
.today-ring::before { content: ""; position: absolute; inset: -16%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--act) 18%, transparent), transparent 72%); }
.today-ring .fil, .today-ring .seg-new { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--act) 55%, transparent)); }
.today-ring .trk { stroke: color-mix(in srgb, var(--track) 80%, var(--bg)); }
.today-ring .num b { text-shadow: 0 1px 0 color-mix(in srgb, #fff 8%, transparent), 0 10px 24px color-mix(in srgb, var(--act) 28%, transparent); }
.today-ring-wrap { isolation: isolate; }

/* 4 · Week: today is marked with a small pill, the finished days keep their sage ring. */

/* 5 · Day cards: lit from above, inner edge, tinted shadow; the kicker no longer leaves one orphan word on a second line. */
.day-card { background-image: linear-gradient(180deg, rgb(255 255 255 / .06), rgb(255 255 255 / 0) 46%); transition: transform 100ms ease-out; }
.day-card .k { text-wrap: balance; line-height: 1.25; letter-spacing: .01em; }
.day-card b { font-size: 1.2rem; }
.day-card small { line-height: 1.25; }
.day-card:active { transform: scale(.97); filter: none; }

/* 6 · Course rows: the number becomes a coloured chip, one colour per subject (the palette the app already has), thicker rounded progress. */
.course-row { padding-block: 15px; transition: background .15s ease; }
.course-row .k { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; align-self: center; font-size: .7rem; font-weight: 500; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); }
.course-row:nth-child(1) .k { color: var(--sage-ink); background: var(--sage-field); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sage) 40%, transparent); }
.course-row:nth-child(2) .k { color: var(--slate-ink); background: var(--slate-field); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--slate) 40%, transparent); }
.course-row:nth-child(3) .k { color: var(--clay-ink); background: var(--clay-field); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clay) 40%, transparent); }
.course-row:nth-child(4) .k { color: var(--sand-ink); background: var(--sand-field); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sand) 40%, transparent); }
.course-row .mini { height: 4px; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, var(--track) 80%, var(--bg)); }
.course-row .mini i { border-radius: 2px; transition: width .4s cubic-bezier(.33, 1, .68, 1); }
.course-row:nth-child(2) .mini i { background: var(--slate); } .course-row:nth-child(3) .mini i { background: var(--clay); } .course-row:nth-child(4) .mini i { background: var(--sand); }

/* 7 · Practice bar: a lit top edge and a coloured shadow, so it reads as a pressable object rather than a flat strip. */
.action-bar { box-shadow: inset 0 1px 0 rgb(255 255 255 / .34), inset 0 -1px 0 rgb(0 0 0 / .12), 0 18px 28px -16px color-mix(in srgb, var(--act) 70%, #000); transition: transform 100ms ease-out; }
.action-bar:active { transform: scale(.985); }
.action-bar .ab-title { letter-spacing: -.005em; }

/* 8 · Üben: each subject carries its colour (tick, kicker, arrow chip) so the four rows stop looking identical. */
.mode-card { position: relative; padding-right: 64px; border-top-color: var(--hair); }
.mode-card::before { content: ""; position: absolute; left: 9px; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: var(--c, var(--sage)); }
.mode-card .kicker { color: var(--c-ink, var(--ink-2)); }
.mode-card::after { content: ""; right: 20px; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--hair); background: var(--c-field, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat; }
.screen > .mode-card:nth-of-type(4n+1) { --c: var(--sage); --c-ink: var(--sage-ink); --c-field: var(--sage-field); }
.screen > .mode-card:nth-of-type(4n+2) { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.screen > .mode-card:nth-of-type(4n+3) { --c: var(--clay); --c-ink: var(--clay-ink); --c-field: var(--clay-field); }
.screen > .mode-card:nth-of-type(4n+4) { --c: var(--sand); --c-ink: var(--sand-ink); --c-field: var(--sand-field); }
.mode-card { transition: background .15s ease, transform 100ms ease-out; }
.mode-card:active { transform: scale(.985); }

/* 9 · Question: answers press in (3 % scale, 100 ms) and the letter chip fills while the finger is down; the gap reads as a slot to fill.
   The XP rail with its rider is an approved design and is left exactly as it is. */
.option-button { transition: background .12s ease, transform 100ms ease-out; }
.option-button:active { transform: scale(.985); background: color-mix(in srgb, var(--act) 10%, transparent); }
.option-key { transition: background .12s ease, color .12s ease, box-shadow .12s ease; }
.option-button:active .option-key { background: var(--act-fill); color: var(--on-accent); box-shadow: none; }
.prompt .blank { display: inline-block; min-width: 4.4ch; text-align: center; border-radius: 8px 8px 0 0; background: color-mix(in srgb, var(--act) 13%, transparent); }
.quiz-meta span:last-child { font-variant-numeric: tabular-nums; }
.question-card .speaker-btn { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 12px 18px -10px color-mix(in srgb, var(--act) 75%, #000); }

/* 10 · Progress: the numbers carry the meaning colours the app already uses (sage = right, clay = wrong, sand = streak). */
.stat-value { font-variant-numeric: tabular-nums; }
.metric-grid .stat-card:nth-child(1) .stat-value, .metric-grid .stat-card:nth-child(3) .stat-value { color: var(--sage-ink); }
.metric-grid .stat-card:nth-child(4) .stat-value { color: var(--clay-ink); }
.metric-grid .stat-card:nth-child(5) .stat-value { color: var(--sand-ink); }

/* 11 · More: the profile card is the most personal screen, so it gets the same lit edge as the other cards; the photo gets the faint inner edge. */
.mx-hero { background-image: linear-gradient(180deg, rgb(255 255 255 / .05), rgb(255 255 255 / 0) 38%); box-shadow: var(--mx-shadow), inset 0 1px 0 rgb(255 255 255 / .07); }
.mx-face { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.mx-xp { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06); }
.mx-stat b, .mx-xp-t b { font-variant-numeric: tabular-nums; }
.mx-group { box-shadow: var(--mx-shadow), inset 0 1px 0 rgb(255 255 255 / .05); }

/* 12 · Results (the end of a round is the moment people remember): answer squares get a small radius and a lit top edge so the grid reads as tiles,
   the XP earned glows in the accent colour, the grade marker casts a soft shadow on its scale. */
.results .squares > * { border-radius: 4px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .28); }
.results .xp-earned { font-variant-numeric: tabular-nums; text-shadow: 0 8px 22px color-mix(in srgb, var(--act) 40%, transparent); }
.results .ruler .mk { filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--act) 55%, transparent)); }
.results .review-item { transition: background .12s ease; }

@media (prefers-reduced-motion: reduce) { .day-card, .action-bar, .mode-card, .course-row .mini i { transition: none; } }

/* ---- Podium mascots (owner, 2026-11-01): the top 3 are mascots (Talu, Pipo, Cloo), a colour bar marks the place; everyone else keeps the profile picture ---- */
.lb-mascot { display: block; width: auto; height: 72px; max-width: 92%; object-fit: contain; }
.lb-place.p1 .lb-mascot { height: 100px; }
.lb-place .lb-name { margin-top: 10px; }
.lb-place.p1 .lb-name { margin-top: 10px; }
.lb-bar { display: block; width: 72%; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--bar, var(--sand)); }
.lb-place.p1 { --bar: var(--sand); } .lb-place.p2 { --bar: var(--clay); } .lb-place.p3 { --bar: var(--slate); }
.lb-place.is-empty .lb-mascot { opacity: .35; filter: grayscale(1); }
.lb-place.is-empty .lb-bar { background: var(--track); }
.lb-sky .lb-mascot { height: min(88px, 23cqi); }
.lb-sky .lb-place.p1 .lb-mascot { height: min(128px, 33cqi); }
.lb-top.is-sheet { padding-top: 8px; }
.lb-top.is-sheet .lb-mascot { height: 106px; }
.lb-top.is-sheet .p1 .lb-mascot { height: 148px; }
.lb-top.is-sheet .lb-name { max-width: 110px; font-size: .9rem; }

/* ---- Full leaderboard as one scrolling page (owner, 2026-11-01): Today's sky stays behind the whole page, the podium has no box and scrolls up with the rows;
   the back bar sticks to the top, the "You" bar to the bottom. The guest lock card keeps its box. ---- */
.lb-sheet { display: block; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  background: radial-gradient(300px 300px at -40px 24%, color-mix(in srgb, var(--clay) calc(var(--lb-sky, .5) * 85%), transparent), transparent 72%), radial-gradient(320px 320px at calc(100% + 50px) 44%, color-mix(in srgb, var(--slate) calc(var(--lb-sky, .5) * 85%), transparent), transparent 72%), radial-gradient(360px 260px at 38% 100%, color-mix(in srgb, var(--sage) calc(var(--lb-sky, .5) * 85%), transparent), transparent 72%), var(--bg); }
.lb-sheet::-webkit-scrollbar { display: none; }
.lb-head { position: sticky; top: 0; z-index: 4; padding-bottom: 8px; background: color-mix(in srgb, var(--bg) 35%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lb-top.is-sheet:not(.is-guest) { background: none; border: 0; box-shadow: none; overflow: visible; isolation: auto; border-radius: 0; }
.lb-top.is-sheet:not(.is-guest) .lb-blobs { display: none; }
.lb-list { overflow: visible; flex: none; margin-top: 0; padding-bottom: 96px; }
.lb-list .lb-row:first-child { border-top-color: transparent; }
.lb-sheet .lb-mebar { position: sticky; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 5; margin-top: -80px; box-shadow: 0 18px 30px -12px rgb(0 0 0 / .5); }

/* ---- One sky behind every main tab (Heute, Üben, Progress, More), to the bottom, so changing tabs does not change the background; quizzes and results keep the plain background (owner, 2026-11-01) ---- */
body:not(.session-open):not(.results-open) .app-shell {
  background: radial-gradient(300px 300px at -40px 24%, color-mix(in srgb, var(--clay) calc(var(--lb-sky, .5) * 85%), transparent), transparent 72%), radial-gradient(320px 320px at calc(100% + 50px) 44%, color-mix(in srgb, var(--slate) calc(var(--lb-sky, .5) * 85%), transparent), transparent 72%), radial-gradient(360px 260px at 38% 100%, color-mix(in srgb, var(--sage) calc(var(--lb-sky, .5) * 85%), transparent), transparent 72%), var(--bg); }
body:not(.session-open):not(.results-open) main#app, body:not(.session-open):not(.results-open) .home-dock { background: transparent; }
.home-screen .lb-sky .lb-blobs { display: none; }
.tabbar { border-top: 0; }
body:not(.session-open):not(.results-open) .tabbar { background: transparent; }

/* ---- Week row as flames (owner, 2026-11-01): a lit flame for each day that reached the goal, coloured letters underneath, no rings. Heat follows the streak. ---- */
.week { gap: 2px; }
.week div { gap: 6px; }
.week .fz { height: 36px; display: grid; place-items: end center; }
.week .fl { display: block; width: 22px; height: 29px; overflow: visible; --f0: #e0612c; --f1: #f0a14a; --f2: #ffd36b; --fc: #fff3c9; opacity: .55; }
.week.heat3 .fl { --f0: #2d6fe0; --f1: #59a6ff; --f2: #b7e0ff; --fc: #fff; }
.week.heat0 .fl { --f0: #3a3d3c; --f1: #4a4e4c; --f2: #5a5e5c; --fc: #2a2d2c; }
.week .fl-b, .week .fl-i { transform-origin: 50% 100%; }
.week .full .fl { opacity: 1; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--act) 60%, transparent)); }
.week .full .fl-b { animation: wk-flick 1.5s ease-in-out infinite; } .week .full .fl-i { animation: wk-flick2 1.1s ease-in-out infinite; }
.week.heat1 .full .fl-b { animation-duration: 2.2s; }
.week.heat0 .full .fl-b, .week.heat0 .full .fl-i { animation: none; }
.week .t:not(.full) .fl { opacity: .5; }
.week div > span:last-child { font-weight: 700; letter-spacing: .04em; font-size: .8rem; color: var(--ink-3); }
.week .full > span:last-child { color: var(--act-ink); }
.week .t > span:last-child { padding: 2px 9px; border-radius: 99px; background: var(--act-fill); color: var(--on-accent); }
.week.m-week-in .fz { animation: wk-pop .45s var(--m-out, cubic-bezier(.2, .9, .2, 1)) backwards; animation-delay: calc(var(--i) * 70ms + .45s); }
@keyframes wk-flick { 0%, 100% { transform: scale(1, 1) skewX(0); } 25% { transform: scale(.97, 1.06) skewX(3deg); } 50% { transform: scale(1.03, .97) skewX(-2deg); } 75% { transform: scale(.98, 1.05) skewX(2deg); } }
@keyframes wk-flick2 { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.9, 1.1) translateY(-1px); } }
@keyframes wk-pop { from { opacity: 0; transform: translateY(8px) scale(.6); } }
body.no-animations .week .fl-b, body.no-animations .week .fl-i, body.no-animations .week .fz { animation: none; }
@media (prefers-reduced-motion: reduce) { .week .fl-b, .week .fl-i, .week .fz { animation: none !important; } }
/* A podium XP number changed in place: the place bar flashes and stretches for a moment (see leaderboard.patchXp). */
.lb-bar.lb-bump { animation: lb-bump .9s cubic-bezier(.2, .9, .2, 1); }
@keyframes lb-bump { 0% { transform: scaleX(1); } 30% { transform: scaleX(1.18); filter: brightness(1.5); box-shadow: 0 0 12px var(--bar); } 100% { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .lb-bar.lb-bump { animation: none; } }
body.no-animations .lb-bar.lb-bump { animation: none; }

/* ---- Gespräche (chat-engine.js): conversation exercises as a chat with Lena and Arjun. Scoped under .chat. ----
   The learner's messages are on the right (accent), the others' on the left; pictures sit on warm paper. */
.chat { --paper: #fbf7ef; --paper-edge: rgba(29, 29, 27, .07); --ch-ease: cubic-bezier(.2, .8, .2, 1); --ch-spring: cubic-bezier(.2, .9, .25, 1.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chat { --paper: #ece5d7; --paper-edge: rgba(0, 0, 0, .2); } }
:root[data-theme="dark"] .chat { --paper: #ece5d7; --paper-edge: rgba(0, 0, 0, .2); }
body.chat-open main { padding: 0; overflow: hidden; }
main > .screen.chat { flex: 1 1 auto; min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; padding: 0; }
.chat button { font: inherit; cursor: pointer; }
.chat-hd { position: relative; z-index: 4; display: grid; grid-template-columns: 40px auto 1fr auto; gap: 10px; align-items: center; padding: 4px 14px 10px; box-shadow: 0 1px 0 var(--hair); }
.chat-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.chat-stack { display: flex; } .chat-stack .av { width: 38px; height: 38px; box-shadow: 0 0 0 2.5px var(--bg); } .chat-stack .av + .av { margin-left: -12px; }
.chat-ttl { min-width: 0; } .chat-ttl b { display: block; font-size: 1.02rem; line-height: 1.2; }
.chat-sub { display: block; height: 1.2em; overflow: hidden; color: var(--ink-2); font-size: .8rem; }
.chat-sub span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chat-sub.is-typing span { color: var(--sage-ink); }
.chat-pill { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 .72rem var(--font-mono); font-variant-numeric: tabular-nums; }
.chat-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; } .chat-prog i { display: block; height: 100%; width: 0; background: var(--sage); transition: width .6s var(--ch-ease); }
.chat-list { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; padding: 12px 12px 20px; background-image: radial-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1.5px); background-size: 22px 22px; scrollbar-width: none; }
.chat .chat-list > :first-child { margin-top: auto; }
.chat .row { display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; }
.chat .row.first { margin-top: 12px; }
.chat .row.them { padding-right: 44px; } .chat .row.me { justify-content: flex-end; padding-left: 52px; }
.chat .av { width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--paper-edge); }
.chat .av svg { display: block; width: 100%; height: 100%; }
.chat .row.them .av { visibility: hidden; } .chat .row.them.last .av { visibility: visible; }
.chat .col { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.chat .bub { position: relative; min-width: 0; padding: 8px 12px 6px; border-radius: 20px; font-size: 1.03rem; line-height: 1.42; overflow-wrap: anywhere; }
.chat .them .bub { background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--hair), 0 1px 1px rgba(0, 0, 0, .06); }
.chat .them:not(.first) .bub { border-top-left-radius: 7px; } .chat .them:not(.last) .bub { border-bottom-left-radius: 7px; } .chat .them.last .bub { border-bottom-left-radius: 4px; }
.chat .me .bub { background: var(--act-fill); color: var(--on-accent); box-shadow: 0 6px 14px -10px var(--act-shadow); }
.chat .me:not(.first) .bub { border-top-right-radius: 7px; } .chat .me:not(.last) .bub { border-bottom-right-radius: 7px; } .chat .me.last .bub { border-bottom-right-radius: 4px; }
.chat .name { display: block; margin-bottom: 1px; font: 650 .74rem var(--font-body); }
.chat .name.lena { color: var(--sage-ink); } .chat .name.arjun { color: var(--slate-ink); }
.chat .meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 1px 0 0 14px; float: right; position: relative; top: 5px; color: var(--ink-3); font: 500 .64rem var(--font-mono); font-variant-numeric: tabular-nums; }
.chat .me .meta { color: color-mix(in srgb, var(--on-accent) 70%, transparent); }
.chat .hear { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; }
.chat .hear svg { width: 14px; height: 14px; }
.chat .bub.photo { width: 272px; max-width: 100%; padding: 4px 4px 6px; }
.chat .bub.photo .cap { padding: 6px 8px 0; }
.chat .plate { position: relative; border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--paper-edge); }
.chat .plate svg.scene { display: block; width: 100%; height: auto; }
.chat .st-wohin, .chat .st-wo { transition: opacity .35s ease; }
.chat .plate[data-state="wo"] .st-wohin, .chat .plate[data-state="wohin"] .st-wo { opacity: 0; }
.chat .plate[data-state="wohin"] .mover { animation: chat-move 1.1s cubic-bezier(.3, .7, .3, 1) .2s both; }
.chat .plate[data-state="wohin"] .arrow { stroke-dasharray: 420; animation: chat-draw 1s .35s ease-out both; }
.chat .plate[data-state="wohin"] .arrowhead { transform-box: fill-box; transform-origin: center; animation: chat-pop .25s 1.25s ease-out both; }
.chat .plate[data-state="wo"] .pin-ring { animation: chat-ring 1.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes chat-move { from { transform: translateX(-26px); } }
@keyframes chat-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes chat-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes chat-ring { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }
.chat .st { margin: 4px 4px 0 0; display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font: 600 .66rem var(--font-mono); letter-spacing: .03em; }
.chat .st.ok { color: var(--sage-ink); } .chat .st.no { color: var(--clay-ink); } .chat .st svg { width: 12px; height: 12px; }
.chat .del { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .6; }
.chat .ins { display: inline-block; margin-left: 2px; padding: 0 5px; border-radius: 7px; background: color-mix(in srgb, var(--on-accent) 24%, transparent); font-weight: 750; animation: chat-ins .4s var(--ch-spring) both; }
@keyframes chat-ins { from { opacity: 0; transform: scale(.6); } }
.chat .squig { text-decoration: underline wavy var(--clay); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.chat .sys { align-self: center; margin: 12px 0 4px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .78rem; text-align: center; }
.chat .day { align-self: center; margin: 8px 0 2px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); color: var(--ink-2); font: 600 .66rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.chat .tip { align-self: center; display: grid; grid-template-columns: 22px 1fr; gap: 8px; max-width: 88%; margin: 10px 0 2px; padding: 10px 14px; border-radius: 16px; background: var(--sand-field); color: var(--ink); font-size: .9rem; line-height: 1.4; }
.chat .tip svg { width: 20px; height: 20px; color: var(--sand-ink); } .chat .tip b { color: var(--sand-ink); }
.chat .typing { display: inline-flex; gap: 5px; padding: 13px 15px; border-radius: 20px 20px 20px 4px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--hair); }
.chat .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: chat-wave 1.1s ease-in-out infinite; }
.chat .typing i:nth-child(2) { animation-delay: .15s; } .chat .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-wave { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat .endcard { align-self: center; display: grid; gap: 12px; justify-items: center; width: 88%; margin: 16px 0 6px; padding: 22px 18px 18px; border-radius: 24px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--hair), 0 20px 40px -30px rgba(0, 0, 0, .6); text-align: center; }
.chat .endcard > b { font: 800 2rem/1 var(--font-display); font-stretch: 72%; text-transform: uppercase; }
.chat .ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sage) 0%, var(--track) 0); }
.chat .ring span { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-1); font: 800 1.6rem var(--font-display); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.chat .endcard p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.chat .btn { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border: 0; border-radius: 16px; background: var(--act-fill); color: var(--on-accent); font-weight: 700; }
.chat .btn.ghost { justify-content: center; min-height: 46px; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--hair); }
.chat .in-them { animation: chat-in .34s var(--ch-spring) both; transform-origin: 0 100%; }
.chat .in-me { animation: chat-in .34s var(--ch-spring) both; transform-origin: 100% 100%; }
.chat .in-mid { animation: chat-mid .3s var(--ch-ease) both; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes chat-mid { from { opacity: 0; transform: translateY(6px); } }
.chat .shake { animation: chat-shake .36s; } @keyframes chat-shake { 20% { transform: translateX(-5px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
.chat .pop { animation: chat-popb .4s var(--ch-spring); } @keyframes chat-popb { 40% { transform: scale(1.04); } }
.chat-ft { position: relative; z-index: 4; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s var(--ch-ease); box-shadow: 0 -1px 0 var(--hair); background: var(--bg); }
.chat-ft.open { grid-template-rows: 1fr; }
.chat-ft > .in { min-height: 0; overflow: hidden; }
.chat-ft .pad { display: grid; gap: 10px; padding: 10px 12px max(14px, env(safe-area-inset-bottom)); }
.chat-ft .lab { display: flex; justify-content: space-between; color: var(--ink-2); font: 600 .66rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.chat .sugg { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.chat .chip { max-width: 92%; min-height: 50px; padding: 0 18px; border: 1.5px solid color-mix(in srgb, var(--act) 40%, transparent); border-radius: 22px 22px 6px 22px; background: var(--act-field); color: var(--ink); font: 600 1.05rem var(--font-body); text-align: right; transition: transform .12s, background .15s; }
.chat-ft.open .chip { animation: chat-chip .36s var(--ch-spring) both; }
.chat-ft.open .chip:nth-child(2) { animation-delay: .05s; } .chat-ft.open .chip:nth-child(3) { animation-delay: .1s; }
@keyframes chat-chip { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.chat .chip:active { transform: scale(.97); background: color-mix(in srgb, var(--act) 30%, var(--bg)); }
.chat .photo-chip { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; min-height: 64px; }
.chat .photo-chip .thumb { width: 78px; flex: none; border-radius: 14px; overflow: hidden; }
.chat .comp { display: flex; align-items: flex-end; gap: 8px; }
.chat .field { flex: 1; min-height: 50px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 25px; background: var(--surface-1); box-shadow: inset 0 0 0 1.5px var(--hair); }
.chat .field:empty::before { content: attr(data-empty); color: var(--ink-3); }
.chat .field .w { min-height: 36px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--act-field); color: var(--ink); font: 650 1rem var(--font-body); animation: chat-chip .25s var(--ch-spring) both; }
.chat .send { width: 50px; height: 50px; flex: none; border: 0; border-radius: 50%; background: var(--act-fill); color: var(--on-accent); display: grid; place-items: center; transition: transform .2s var(--ch-spring), background .2s; }
.chat .send:disabled { background: var(--track); color: var(--ink-3); transform: scale(.9); }
.chat .bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chat .tile { min-height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--surface-1); color: var(--ink); font: 650 1.02rem var(--font-body); box-shadow: inset 0 0 0 1.5px var(--hair), 0 3px 0 var(--hair); transition: opacity .2s, transform .12s; }
.chat .tile:active { transform: translateY(2px); } .chat .tile.used { opacity: .18; pointer-events: none; }
/* The flying copy of a sent answer lives on body for a moment */
body > .bub { padding: 8px 12px 6px; border-radius: 20px; background: var(--act-fill); color: var(--on-accent); font-size: 1.03rem; line-height: 1.42; font-family: var(--font-body); }
body > .bub .meta { display: none; }
@media (prefers-reduced-motion: reduce) { .chat *, .chat *::before { animation: none !important; transition: none !important; } }
body.no-animations .chat *, body.no-animations .chat *::before { animation: none !important; transition: none !important; }


/* ---- Themen on Üben (docs/THEMEN_PLAN.md): each card carries its own colour, so the order can grow ---- */
/* Only the Üben cards are coloured by kind; on a list of one kind (Wortschatz, Possessivartikel trainers) the cards take
   the four colours in turn (nth-of-type above), owner 2026-11-11. */
.screen > .mode-card[data-action="choose-mode"][data-kind="vocab"], .screen > .mode-card.tone-0 { --c: var(--sage); --c-ink: var(--sage-ink); --c-field: var(--sage-field); }
.screen > .mode-card[data-action="choose-mode"][data-kind="conjugation"], .screen > .mode-card.tone-1 { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.screen > .mode-card[data-action="choose-mode"][data-kind="possessive"], .screen > .mode-card.tone-2 { --c: var(--clay); --c-ink: var(--clay-ink); --c-field: var(--clay-field); }
.screen > .mode-card[data-action="choose-mode"][data-kind="zahlen"], .screen > .mode-card.tone-3 { --c: var(--sand); --c-ink: var(--sand-ink); --c-field: var(--sand-field); }
/* Üben marker contours and ink sampled from the approved reference. */
.uben-themen { --reference-marker-opacity: 58%; }
:root[data-theme="dark"] .uben-themen { --reference-marker-opacity: 100%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .uben-themen { --reference-marker-opacity: 100%; }
}
.uben-themen > :is([data-kind="vocab"], [data-kind="conjugation"], [data-kind="possessive"]) {
  --marker-opacity: var(--reference-marker-opacity);
}
.uben-themen > [data-kind="vocab"] {
  --marker-start: #68744b;
  --marker-middle: #606f48;
  --marker-end: #5b6c46;
  --marker-outset: -.38em;
  --marker-contour: polygon(
    0 53%, .5% 39%, 1.2% 30%, 2% 25%, 3.5% 22%, 8% 21%,
    24% 16%, 44% 8%, 65% 2%, 83% 4%, 95% 11%, 97.3% 13%,
    98.6% 21%, 99.5% 33%, 100% 46%, 100% 64%, 99.4% 77%,
    98.5% 87%, 97% 94%, 94% 94%, 84% 86%, 70% 82%, 54% 81%,
    34% 85%, 15% 94%, 5% 99%, 2.8% 100%, 1.6% 94%, .7% 85%, 0 67%
  );
}
.uben-themen > [data-kind="conjugation"] {
  --marker-start: #4b5379;
  --marker-middle: #464f73;
  --marker-end: #495279;
  --marker-outset: -.36em;
}
.uben-themen > [data-kind="possessive"] {
  --marker-start: #8d5833;
  --marker-middle: #8e5933;
  --marker-end: #8f5b34;
  --marker-outset: -.03em;
  --marker-height: .59em;
  --marker-contour: polygon(
    0 50%, .4% 39%, 1% 33%, 2% 30%, 5% 26%, 15% 25%,
    25% 16%, 40% 5%, 54% 0, 64% 0, 75% 4%, 89% 15%, 97% 22%,
    98.6% 26%, 99.5% 35%, 100% 46%, 100% 61%, 99.6% 74%,
    98.8% 85%, 97.7% 92%, 95% 90%, 84% 81%, 74% 75%, 61% 72%,
    51% 73%, 34% 81%, 17% 91%, 6% 98%, 2% 100%, 1% 95%, .3% 85%, 0 75%
  );
}
.uben-themen > .mode-card[data-action="choose-mode"] > .mode-card-title {
  position: relative;
  isolation: isolate;
  width: fit-content;
}
.uben-themen > .mode-card > .mode-card-title > .marker-label { position: relative; }
.uben-themen > .mode-card[data-action="choose-mode"] > .mode-card-title:not(:has(> .marker-label))::after,
.uben-themen > .mode-card[data-action="choose-mode"] > .mode-card-title > .marker-label::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: -.1em var(--marker-outset, -.36em);
  inset-block-end: -.16em;
  height: var(--marker-height, .56em);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--marker-start, var(--c)) var(--marker-opacity, 50%), transparent),
    color-mix(in srgb, var(--marker-middle, var(--c)) var(--marker-opacity, 50%), transparent) 58%,
    color-mix(in srgb, var(--marker-end, var(--c)) var(--marker-opacity, 50%), transparent)
  );
  clip-path: var(--marker-contour, polygon(
    0 48%, .6% 35%, 1.4% 27%, 2.5% 22%, 5% 24%, 15% 21%,
    25% 15%, 44% 6%, 63% 0, 79% 2%, 91% 7%, 96.5% 9%,
    98% 15%, 99% 23%, 99.8% 34%, 100% 47%, 100% 60%, 99.5% 74%,
    98.6% 85%, 97% 91%, 94% 89%, 83% 83%, 66% 77%, 53% 77%,
    42% 80%, 24% 88%, 12% 95%, 4% 99%, 2.5% 100%, 1.4% 94%, .5% 83%, 0 73%
  ));
  pointer-events: none;
}
.uben-group { margin: 18px 0 -8px; color: var(--ink-2); }
.thema-card .mode-card-title { font-size: 1.5rem; }
.cov i { font-style: normal; } .cov .n { opacity: .35; text-decoration: line-through; }
.thema-screen .page-heading h1 { min-width: 0; font-size: clamp(2.1rem, 9vw, 3.6rem); }
.thema-levels { flex-wrap: wrap; }
.thema-levels .chapter-tab.locked { opacity: .6; } .thema-levels .lock-glyph svg { width: 12px; height: 12px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 2; }
.stop.soon { opacity: .5; cursor: default; }
.stop.soon:active { background: none; }

/* ---- Thema parts (Wörter, Redemittel, Grammatik) and their quiz: the app's glossary table, panel and quiz card ---- */
.thema-goal { margin-top: -6px; }
.thema-part .gl-de { display: grid; gap: 2px; min-width: 0; }
.thema-part .gl-de .ex { color: var(--ink-2); font-family: var(--font-italic); font-style: italic; font-size: .82rem; }
.glossary-table .gl-group th { padding-top: 16px; color: var(--act-ink); }
.rule-panel { display: grid; gap: 8px; }
.rule-panel p { margin: 0; line-height: 1.5; font-size: .98rem; color: var(--ink); }
.rule-panel .rule-en { color: var(--ink-2); font-family: var(--font-italic); font-style: italic; font-size: .88rem; }
.grammar-table { width: 100%; table-layout: fixed; border-collapse: collapse; border-top: 1px solid var(--hair); }
.grammar-table th, .grammar-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.4; color: var(--ink); }
.grammar-table thead th { color: var(--ink-2); font-family: var(--font-mono); font-weight: 500; font-size: .7rem; text-transform: uppercase; }
.grammar-table tbody th { font-weight: 700; }
.thema-eyebrow { margin: 6px 0 -10px; color: var(--ink-2); }
.thema-q .gap-fill { padding: 0 .12em; border-bottom: 2px solid currentColor; }
.thema-q .gap-fill.ok { color: var(--sage-ink); } .thema-q .gap-fill.bad { color: var(--clay-ink); text-decoration: line-through; }
.tile-line { min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 2px solid var(--act); font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.tile-line.ok { border-bottom-color: var(--sage); color: var(--sage-ink); } .tile-line.bad { border-bottom-color: var(--clay); color: var(--clay-ink); }
.tile-line .tile-hint { color: var(--ink-3); font-weight: 500; font-size: .9rem; }
.tile-line .tile-end { font-weight: 700; margin-left: -4px; }
.thema-q .konj-tiles { margin: 4px 0 2px; }
.thema-q .primary-button:disabled { opacity: .45; cursor: default; }

/* ---- Konjugation: Spickzettel on the station page as Kacheln (owner picked mockup-konj-spickzettel-v3.html, 1, 2026-11-09) ---- */
.konj-cheat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.konj-cheat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.konj-cheat-t { font-family: var(--font-display); font-stretch: 74%; font-weight: 800; font-size: 1.3rem; line-height: 1.05; text-transform: uppercase; color: var(--ink); }
.konj-cheat-t em { font-style: normal; color: var(--act-ink); }
.konj-cheat-lab { flex: none; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.konj-cheat i { font-style: normal; color: var(--act-ink); }
/* Tiles in the Genauso list's look (owner pick D, mockup-konj-spickzettel-farben.html): one box with thin lines,
   grey labels, dark forms, terrakotta only on what changes. */
.konj-cheat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.konj-cheat-tiles.wide { grid-template-columns: 1fr; }
.konj-cheat-tiles.odd > :last-child { grid-column: 1 / -1; }
.konj-cheat-tile { display: grid; align-content: start; gap: 4px; padding: 11px 14px; min-width: 0; }
.konj-cheat-tiles:not(.wide) > .konj-cheat-tile:nth-child(even) { box-shadow: inset 1px 0 0 var(--hair); }
.konj-cheat-tiles:not(.wide) > .konj-cheat-tile:nth-child(n+3), .konj-cheat-tiles.wide > .konj-cheat-tile + .konj-cheat-tile { border-top: 1px solid var(--hair); }

.konj-cheat-tile .p { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.konj-cheat-tile .f { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.45rem; line-height: 1.05; color: var(--ink); overflow-wrap: anywhere; }
.konj-cheat-tiles.wide .f { font-family: var(--font-body); font-stretch: 100%; font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.konj-cheat-n { margin: 6px 0 0; font-size: .88rem; line-height: 1.45; color: var(--ink-2); }
/* a second form under the first (two tenses in one station, or haben · werden under sein) */
.konj-cheat-tile .f2 { display: block; margin-top: 3px; font-family: var(--font-body); font-stretch: 100%; font-size: .82rem; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
/* person tables: singular (ich, du, er) slate on the left, plural (wir, ihr, sie) sage on the right (owner pick A, mockup-konj-spickzettel-farbe.html) */
.konj-gl-cap { margin: 6px 2px -4px; line-height: 1; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.konj-gl { list-style: none; margin: 0; padding: 0; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--hair); }
.konj-gl li { display: grid; grid-template-columns: 34% minmax(0, 1fr); align-items: baseline; gap: 2px 10px; padding: 9px 12px; }
.konj-gl li + li { border-top: 1px solid var(--hair); }
.konj-gl b { font-size: .86rem; font-weight: 650; color: var(--ink-2); overflow-wrap: anywhere; }
.konj-gl .tg { grid-column: 1; font-family: var(--font-mono); font-size: .58rem; color: var(--ink-3); }
.konj-gl .kfs { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.konj-gl .kf { font-weight: 700; font-size: .95rem; color: var(--ink); }
.konj-gl .kf small { font-family: var(--font-mono); font-size: .58rem; font-weight: 500; color: var(--ink-3); }
.konj-gl i { font-style: normal; color: var(--act-ink); }
@media (prefers-reduced-motion: reduce) { .konj-cheat-lab svg { transition: none; } }

/* Pfad (owner 2026-11-10, mockup-pfad.html C): level switch, then that level's Themen as a staggered two-column board */
.pfad-seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--track); }
.pfad-seg button { min-height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 700 .78rem var(--font-mono); }
.pfad-seg button.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.pfad-count { margin: 0; font: 500 .72rem var(--font-mono); color: var(--ink-2); }
.pfad-board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 30px; }
.pfad-tile { position: relative; min-height: 96px; padding: 12px; border-radius: var(--r-md); border: 1.5px solid var(--hair); background: var(--bg); color: var(--ink); text-align: left; display: grid; align-content: space-between; gap: 8px; }
.pfad-board .pfad-tile:nth-child(even) { transform: translateY(28px); }
.pfad-tile .n { font: 500 .64rem var(--font-mono); color: var(--ink-3); }
.pfad-tile b { font: 700 .9rem/1.15 var(--font-body); padding-right: 18px; }
.pfad-tile .mini { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.pfad-tile .mini i { display: block; height: 100%; background: var(--sage); }
.pfad-tile.done { background: var(--sage-field); border-color: transparent; }
.pfad-tile svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pfad-tile .ck { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; color: var(--sage-ink); }
.pfad-tile.now { background: var(--surface-2); border-color: transparent; box-shadow: 0 0 0 2px var(--act-fill), 0 10px 26px -16px rgba(0, 0, 0, .5); }
.pfad-tile.now .mini { margin-right: 40px; }
.pfad-tile .go { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--act-fill); color: var(--on-accent); }
.pfad-tile .go svg { width: 16px; height: 16px; }
.pfad-tile.locked { color: var(--ink-2); }
.pfad-tile.locked .lock-glyph { position: absolute; right: 10px; bottom: 10px; }
.pfad-next { justify-self: center; margin: 14px 0 6px; border: 0; background: transparent; color: var(--ink-2); font: italic 400 .95rem var(--font-italic); }

/* Dein Niveau (owner 2026-11-10, mockup-niveau.html): one level chip on Üben, Wortschatz, Konjugation, Possessivartikel */
/* The level chip stays on the right of the subtitle at every level and width; the subtitle wraps beside it (owner 2026-11-16). */
.nv-row { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.nv-row .page-copy { flex: 1 1 auto; min-width: 0; }
.nv-row .nv-chip { margin-left: auto; }
.nv-row .page-copy { margin: 0; }
.nv-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border: 1.5px solid var(--hair); border-radius: 999px; background: var(--bg); color: var(--ink-2); font: 500 .72rem var(--font-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; justify-self: start; }
.nv-chip b, .lvl-mark { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 700 .74rem var(--font-mono); letter-spacing: 0; }
.nv-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* C4 "quiet outline" (owner 2026-11-16, mockup-level-chip-c.html): only the level code, same width at every level, 44 px tap area. */
.nv-chip { position: relative; justify-content: center; min-width: 72px; height: 34px; padding: 0 10px 0 14px; border-color: color-mix(in oklab, var(--ink) 30%, transparent); background: transparent; color: var(--ink); }
/* Sage like the cards' arrow circle (owner 2026-11-16: "change this color also to this color"). */
.nv-chip { border-color: var(--hair); background: var(--sage-field); color: var(--sage-ink); }
.nv-chip::before { content: ""; position: absolute; inset: -6px -4px; }
.nv-chip b { min-width: 0; height: auto; padding: 0; background: none; color: inherit; font-size: .84rem; }
/* Wortschatz direction pill (owner 2026-11-16, mockup-vocab-richtung.html A): small, on the left under the subtitle, 44 px tap area. */
.dir-row { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-top: -2px; }
.dir-row .nv-chip { margin-left: auto; }
.dir-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--hair); border-radius: 999px; background: transparent; }
.dir-switch button { position: relative; display: inline-flex; align-items: center; gap: 3px; min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 .74rem/1 var(--font-mono); letter-spacing: .04em; cursor: pointer; }
.dir-switch button::before { content: ""; position: absolute; inset: -7px 0; }
.dir-switch button .arw { width: 11px; height: 11px; vertical-align: 0; }
/* Two colours (owner 2026-11-16, mockup-vocab-pill-farbe.html 5): DE → EN sage, EN → DE slate, on the pill and the card labels. */
.dir-switch button[data-dir="de-en"][aria-checked="true"] { background: var(--sage-field); color: var(--sage-ink); }
.dir-switch button[data-dir="en-de"][aria-checked="true"] { background: var(--slate-field); color: var(--slate-ink); }
.dir-switch button:focus-visible { outline: 2px solid var(--clay-ink); outline-offset: 2px; }
.dir-tag { font-family: var(--font-mono); }
.dir-tag.de-en { color: var(--sage-ink); }
.dir-tag.en-de { color: var(--slate-ink); }
.pfad-label { margin: 0 0 -4px; font: 500 .7rem var(--font-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.thema-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; font: 500 .74rem var(--font-mono); color: var(--ink-2); }
.thema-meta span + span::before { content: "·"; margin-right: 10px; }
/* the level sheet sits at the bottom like a sheet */
.nv-modal { align-items: flex-end; }
.nv-sheet { width: 100%; max-width: 520px; padding: 18px 20px max(22px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
.nv-sheet p { margin: 0 0 12px; color: var(--ink-2); font-size: .88rem; }
/* The level menu (owner 2026-11-20, mockup-level-dropdown.html B "kompakt"): under the chip, right-aligned; chooseLevel places it. */
.nv-chip svg { transition: transform .16s ease; }
.nv-chip[aria-expanded="true"] svg { transform: rotate(180deg); }
.lv-menu { position: fixed; z-index: 7; width: 236px; max-width: calc(100vw - 16px); padding: 6px; border: 1px solid color-mix(in srgb, var(--sage-ink) 22%, transparent); border-radius: var(--r-md); background: color-mix(in srgb, var(--sage-field) 50%, var(--bg)); /* light sage (owner 2026-11-20) */ box-shadow: 0 10px 28px rgba(20, 24, 26, .14), 0 2px 6px rgba(20, 24, 26, .08); transform-origin: top right; animation: lv-in .14s ease-out; }
.lv-menu.up { transform-origin: bottom right; }
@keyframes lv-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.lv-title { margin: 4px 8px 6px; font: 500 .66rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.lv-opt { display: grid; grid-template-columns: 40px 1fr 18px; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); text-align: left; font: inherit; font-size: .88rem; cursor: pointer; }
.lv-opt b { font: 700 .84rem var(--font-mono); }
.lv-opt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.lv-opt:hover, .lv-opt:focus-visible { background: color-mix(in srgb, var(--sage-field) 80%, var(--bg)); outline: none; }
.lv-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--clay-ink); }
.lv-opt[aria-checked="true"] { background: color-mix(in srgb, var(--sage-ink) 16%, var(--sage-field)); color: var(--sage-ink); }
.lv-opt[aria-checked="true"] svg { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .lv-menu { animation: none; } .nv-chip svg { transition: none; } }
.nv-sheet small { display: block; margin-top: 10px; font: 500 .7rem var(--font-mono); color: var(--ink-3); }

/* Thema page parts as Pfad tiles (owner 2026-11-10, mockup-thema-kacheln.html A) */
.thema-tile .tm { margin-top: -4px; font: 500 .7rem var(--font-mono); color: var(--ink-2); }
.thema-tile.soon { border-style: dashed; color: var(--ink-2); }
.thema-tile.soon .mini { visibility: hidden; }
.thema-tile.now .mini { margin-right: 40px; }

/* Big headings have line-height .88, so the dots of Ä/Ö/Ü stood above the line box and the scroller cut them off
   (seen on "BEGRÜSSUNG", 2026-11-10). A little room inside the heading keeps them. */
.page-heading h1 { padding-top: .12em; }

/* Noten: your level as a ring, its three parts, all five levels as a row (owner 2026-11-10, mockup-noten.html B) */
.nt-ring-wrap { display: grid; justify-items: center; gap: 6px; margin: 4px 0; }
.nt-ring { position: relative; width: 168px; height: 168px; border-radius: 50%; background: conic-gradient(var(--sage) calc(var(--p, 0) * 1turn), var(--track) 0); display: grid; place-items: center; }
.nt-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--bg); }
.nt-ring div { position: relative; display: grid; justify-items: center; }
.nt-ring b { font: 800 3rem/.9 var(--font-display); font-stretch: 62%; }
.nt-ring span { font: 700 .9rem var(--font-mono); color: var(--ink-2); }
.nt-ring i { margin: 4px 0 2px; font: 500 .6rem var(--font-mono); font-style: normal; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.nt-ring-wrap small { font: italic 400 .9rem var(--font-italic); color: var(--ink-2); }
.nt-parts { display: grid; gap: 10px; }
.nt-part { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font: 600 .8rem var(--font-body); }
.nt-part em { font: 500 .72rem var(--font-mono); font-style: normal; color: var(--ink-2); }
.nt-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.nt-bar i { display: block; height: 100%; border-radius: 2px; background: var(--sage); }
.nt-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.nt-chips li { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--r-sm); border: 1.5px solid var(--hair); font: 700 .72rem var(--font-mono); }
.nt-chips em { font: 500 .64rem var(--font-mono); font-style: normal; color: var(--ink-2); }
.nt-chips .on { border-color: var(--act-fill); }
.nt-chips .done { background: var(--sage-field); border-color: transparent; }
.nt-chips .on.done { border-color: var(--act-fill); }
.nt-cap { margin: 8px 0 0; font: 500 .7rem var(--font-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }

/* Thema fertig / Niveau geschafft sheet and the badge board on Abzeichen (owner 2026-11-10, mockup-belohnungen.html 2-4) */
.fx-sheet { display: grid; justify-items: center; gap: 10px; padding-top: 26px; text-align: center; }
.fx-eyebrow { font: 500 .7rem var(--font-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.fx-sheet h2 { margin: 0; font: 800 2.1rem/.95 var(--font-display); font-stretch: 66%; text-transform: uppercase; overflow-wrap: anywhere; }
.fx-sheet p { margin: 0; max-width: 28ch; font: italic 400 .98rem var(--font-italic); color: var(--ink-2); }
.fx-medal { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin: 2px 0 4px; }
.fx-rays { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-rays path { fill: none; stroke-width: 3.2; stroke-linecap: round; }
.fx-disc { position: relative; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: var(--sage-field); box-shadow: inset 0 0 0 3px var(--sage); }
.fx-disc b { font: 800 2rem/.9 var(--font-display); font-stretch: 62%; color: var(--sage-ink); }
.fx-disc span { font: 600 .56rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sage-ink); }
.fx-medal.gold .fx-disc { background: var(--sand-field); box-shadow: inset 0 0 0 3px var(--sand); }
.fx-medal.gold .fx-disc b, .fx-medal.gold .fx-disc span { color: var(--sand-ink); }
.fx-gain { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fx-gain span { padding: 5px 10px; border-radius: 999px; background: var(--track); font: 700 .72rem var(--font-mono); }
.fx-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.fx-trio div { display: grid; gap: 2px; padding: 10px 4px; border-radius: var(--r-md); border: 1.5px solid var(--hair); }
.fx-trio b { font: 800 1.25rem var(--font-display); font-stretch: 72%; }
.fx-trio span { font: 500 .6rem var(--font-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.fx-go { width: 100%; min-height: 52px; margin-top: 6px; border: 0; border-radius: var(--r-md); background: var(--act-fill); color: var(--on-accent); font: 700 .95rem var(--font-body); }
.fx-later { min-height: 44px; border: 0; background: transparent; color: var(--ink-2); font: 500 .74rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .fx-sheet { animation: fx-up .45s cubic-bezier(.2, .8, .2, 1) both; }
  .fx-rays { animation: fx-pop .7s .25s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes fx-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fx-pop { from { transform: scale(.5); opacity: 0; } }
.bz-cap { display: flex; justify-content: space-between; margin: 6px 0 0; font: 500 .7rem var(--font-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.bz-levels, .bz-topics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.bz-lv { display: grid; justify-items: center; gap: 5px; font: 500 .62rem var(--font-mono); color: var(--ink-2); }
.bz-lv i { position: relative; isolation: isolate; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--track); color: var(--ink-3); font: 800 1.05rem var(--font-display); font-stretch: 66%; font-style: normal; }
.bz-lv.got i { background: var(--sand-field); color: var(--sand-ink); box-shadow: inset 0 0 0 2.5px var(--sand); }
.bz-lv.now i { background: conic-gradient(var(--sage) calc(var(--p, 0) * 1turn), var(--track) 0); color: var(--ink); }
.bz-lv.now i::before { content: ""; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; background: var(--bg); }
.bz-tp { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--track); color: var(--ink-3); font: 700 .8rem var(--font-mono); }
.bz-tp.got { background: var(--sage-field); color: var(--sage-ink); box-shadow: inset 0 0 0 2px var(--sage); }

/* A long one-word title (PLUSQUAMPERFEKT) must not make the page wider than the phone: break it with a hyphen. */
.thema-part { grid-template-columns: minmax(0, 1fr); }
.thema-part .page-heading h1 { min-width: 0; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }

/* ===== Lesson look (owner pick 2026-11-14, mockup-lektion-premium.html, -knopf C Salbei, -feedback B) =====
   Answer cards with an edge and a pressed state; after an answer one panel (dock) with the verdict, the answer as a
   small vocabulary card and the green "Weiter" (centred label, arrow chip); the round summary with three rings; the
   daily-goal moment. The XP Rider rail at the top stays as approved. */
.question-card .options { gap: 10px; border-top: 0; }
.question-card .option-button { grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; min-height: 56px; padding: 10px 14px;
  border: 1px solid var(--hair); border-bottom-width: 3px; border-radius: var(--r-md); background: var(--surface-1); font-weight: 600; box-shadow: none;
  transition: transform 90ms ease-out, background-color .2s ease, border-color .2s ease, opacity .2s ease; }
.question-card .option-button .option-key { width: 26px; height: 26px; border-radius: 8px; }
.question-card .option-button:not(:disabled):active { transform: translateY(2px); border-bottom-width: 1px; margin-bottom: 2px; background: var(--surface-2); }
.question-card .option-button.correct { background: var(--sage-field); border-color: var(--sage); box-shadow: none; }
.question-card .option-button.wrong { background: var(--clay-field); border-color: var(--clay); box-shadow: none; color: var(--ink); text-decoration: none; }
.question-card .option-button.wrong .option-key { border-color: var(--clay); background: var(--clay); color: var(--on-accent); }
.question-card .option-button.muted-option { opacity: .45; }
.question-card:has(.fb-dock:not(.is-miss)) .option-button.correct { animation: lesson-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes lesson-pop { 45% { transform: scale(1.035); } }
@media (max-height: 700px) { .question-card .option-button { min-height: 48px; padding-block: 8px; } }

.fb-dock { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 2; display: grid; gap: 14px; padding: 16px; border-radius: 22px;
  border-top: 2px solid var(--sage); background: var(--sage-field); box-shadow: 0 -12px 26px -20px rgb(0 0 0 / .45); animation: lesson-rise .28s cubic-bezier(.2, .9, .3, 1); }
.fb-dock.is-miss { border-top-color: var(--clay); background: var(--clay-field); }
@keyframes lesson-rise { from { opacity: 0; transform: translateY(14px); } }
.fb-dock .feedback.fb { display: block; padding: 0; border-radius: 0; background: transparent; }
.fb-head { display: flex; align-items: center; gap: 10px; }
.fb-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sage); color: var(--on-accent); }
.wrong-feedback .fb-ic { background: var(--clay); }
.fb-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.feedback.fb .fb-head strong { flex: 1; min-width: 0; font-size: 1.3rem; font-stretch: 80%; line-height: 1.1; letter-spacing: 0; text-transform: none; }
.fb-lead { margin: 4px 0 0; color: var(--ink-2); font-size: .88rem; }
.fb-ans { display: grid; gap: 2px; margin-top: 10px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.fb-w { display: flex; align-items: center; gap: 10px; }
.fb-de { flex: 1; min-width: 0; font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.35rem; line-height: 1.15; padding-top: .08em; overflow-wrap: anywhere; }
.fb-de.is-sentence { font-family: var(--font-body); font-stretch: 100%; font-weight: 700; font-size: 1.02rem; line-height: 1.35; padding-top: 0; }
.fb-en { margin: 0; color: var(--ink-2); font-size: .92rem; }
.fb-ex, .fb-note { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--hair); color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.fb-ex { font-family: var(--font-italic); font-style: italic; font-size: .98rem; }
.fb-ex + .fb-note, .fb-ans > .fb-note:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.question-card .fb-ans .icon-button.speaker-btn { flex: none; width: 36px; min-width: 36px; height: 36px; border: 0; background: color-mix(in srgb, var(--sage) 22%, transparent); color: var(--sage-ink); box-shadow: none; }
.question-card .wrong-feedback .fb-ans .icon-button.speaker-btn { background: color-mix(in srgb, var(--clay) 22%, transparent); color: var(--clay-ink); }
.fb-ans .speaker-btn svg { width: 17px; height: 17px; }

/* "Weiter": Salbei, label centred, bold arrow in a round chip at the right edge (same shape everywhere in the lesson) */
.primary-button.next-go, body .results.screen > .action-bar.next-pill { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 8px; border: 0; border-radius: 14px; background: var(--sage-ink); color: var(--on-accent); text-align: center; font-size: 1rem; font-weight: 700;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .34), inset 0 -1px 0 rgb(0 0 0 / .12), 0 18px 28px -16px color-mix(in srgb, var(--sage) 70%, #000); }
.next-go .t, .results .action-bar.next-pill .t { grid-column: 2; }
.next-go .ar, .results .action-bar.next-pill .ar { grid-column: 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, currentColor 16%, transparent); }
.next-go .ar svg, .results .action-bar.next-pill .ar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease-out; }
.primary-button.next-go:active, body .results.screen > .action-bar.next-pill:active { transform: scale(.985); filter: brightness(.92); }
@media (hover: hover) {
  .primary-button.next-go:hover, body .results.screen > .action-bar.next-pill:hover { background: color-mix(in srgb, var(--sage-ink) 90%, var(--ink)); }
  .next-go:hover .ar svg, .results .action-bar.next-pill:hover .ar svg { transform: translateX(2px); }
}

/* End of a practice round */
.round-summary { display: grid; justify-items: center; gap: 4px; padding: 2px 0 4px; text-align: center; }
.sum-mascot { width: 108px; height: 108px; object-fit: contain; animation: sum-hop 1.6s ease-in-out .3s 2; }
@keyframes sum-hop { 30% { transform: translateY(-14px) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } }
.sum-title { margin: 8px 0 0; padding-top: .12em; font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: clamp(1.9rem, 7vw, 2.4rem); line-height: 1.05; text-transform: uppercase; }
.sum-sub { margin: 0; color: var(--ink-2); font-size: .9rem; }
.sum-rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 360px; margin: 14px 0 2px; }
.sum-ring { position: relative; display: grid; justify-items: center; gap: 6px; }
.sum-ring svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.sum-ring circle { fill: none; stroke-width: 7; }
.sum-ring .bg { stroke: var(--track); }
.sum-ring .fg { stroke: var(--tone); stroke-linecap: round; stroke-dasharray: var(--p) 100; animation: sum-fill 1s cubic-bezier(.3, .8, .3, 1) .25s backwards; }
@keyframes sum-fill { from { stroke-dasharray: 0 100; } }
.sum-ring b { position: absolute; top: 0; display: block; width: 100%; height: 78px; line-height: 78px; text-align: center; font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.sum-ring b small { color: var(--ink-3); font-size: .7em; }
.sum-ring > span { color: var(--ink-2); font-size: .76rem; font-weight: 600; line-height: 1.25; }
.sum-xp { margin: 8px 0 0; padding: 5px 12px; border-radius: 99px; background: var(--sand-field); color: var(--sand-ink); font-family: var(--font-mono); font-size: .78rem; }

/* Short rounds: the break after every 10 questions (same summary, plus where you are in the whole part) */
.sum-kick { margin: 10px 0 0; color: var(--ink-2); font: 500 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.round-break .sum-title { margin-top: 2px; }
.rb-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: 320px; margin: 16px 0 0; }
.rb-steps i { width: 22px; height: 6px; border-radius: 99px; background: var(--track); }
.rb-steps i.done { background: var(--sage); }
.rb-steps i.next { background: color-mix(in srgb, var(--sage) 35%, var(--track)); }
.round-break > .text-button { justify-self: center; align-self: center; }
.modal-card .rb-steps { justify-content: flex-start; max-width: none; margin: 2px 0 22px; } /* the resume prompt: round dots instead of the bar */

/* Daily goal reached in this round: one calm moment over the results */
.goal-moment { position: fixed; z-index: 7; inset: 0; display: grid; align-items: end; justify-items: center; padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--scrim); animation: gm-fade .25s ease; }
@keyframes gm-fade { from { opacity: 0; } }
.gm-card { display: grid; justify-items: center; gap: 6px; width: min(420px, 100%); padding: 26px 22px 16px; border-radius: 26px; background: var(--bg); color: var(--ink); text-align: center;
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .5); animation: lesson-rise .35s cubic-bezier(.2, .9, .3, 1); }
.gm-num { position: relative; display: grid; place-items: center; width: 132px; height: 132px; }
.gm-num::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sand) 45%, transparent), transparent 70%); animation: gm-glow 2.4s ease-in-out infinite; }
@keyframes gm-glow { 50% { transform: scale(1.12); opacity: .7; } }
.gm-num b { position: relative; color: var(--sand-ink); font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 4.8rem; line-height: 1; }
.gm-card h2 { margin: 0; padding-top: .1em; font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 1.9rem; text-transform: uppercase; }
.gm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; width: 100%; margin: 14px 0 8px; }
.gm-week span { display: grid; justify-items: center; gap: 6px; color: var(--ink-3); font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; }
.gm-week i { display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px dashed var(--hair); border-radius: 50%; }
.gm-week .full i { border: 0; background: var(--sand); color: var(--on-accent); }
.gm-week .t { color: var(--ink); }
.gm-week .t.full i { box-shadow: 0 0 0 4px var(--sand-field); animation: lesson-pop .5s cubic-bezier(.3, 1.6, .5, 1) .4s both; }
.gm-week i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gm-copy { max-width: 290px; margin: 0 0 12px; color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.gm-card .text-button { justify-self: center; }

@media (prefers-reduced-motion: reduce) {
  .question-card .option-button, .fb-dock, .sum-mascot, .sum-ring .fg, .goal-moment, .gm-card, .gm-num::before, .gm-week .t.full i { animation: none; transition: none; }
}

/* ===== Noten: levels to tap, "Alle" lists (owner pick 2026-11-14, mockup-noten-alle.html) ===== */
.nt-chips-cap { margin: 10px 0 -8px; font: 500 .7rem var(--font-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.nt-chips li { display: block; padding: 0; border: 0; }
.nt-chips li button { position: relative; display: grid; justify-items: center; gap: 4px; width: 100%; min-height: 50px; padding: 8px 2px; border: 1.5px solid var(--hair); border-radius: var(--r-sm);
  background: transparent; color: var(--ink); font: 700 .72rem var(--font-mono); cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform 90ms ease-out; }
.nt-chips li button:active { transform: scale(.96); }
.nt-chips li button.done { background: var(--sage-field); border-color: transparent; }
.nt-chips li button[aria-pressed="true"] { border-color: var(--act-fill); background: var(--act-field); }
.nt-chips .nt-mine { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--act-fill); }
@media (hover: hover) { .nt-chips li button:hover { border-color: color-mix(in srgb, var(--act-fill) 50%, var(--hair)); } }

.section-title .see-all { --tone: var(--sage); --tone-ink: var(--sage-ink); display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 2.5px solid var(--tone); border-radius: 999px;
  background: var(--surface-1); color: var(--ink); font: 600 .78rem var(--font-body); letter-spacing: 0; text-transform: none; cursor: pointer; }
.section-title .see-all.is-bad { --tone: var(--clay); --tone-ink: var(--clay-ink); }
.section-title .see-all .sa-ar svg { display: block; width: 14px; height: 14px; fill: none; stroke: var(--tone-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .section-title .see-all:hover { background: color-mix(in srgb, var(--tone) 14%, var(--surface-1)); } }
@media (max-width: 620px) { .section-title:has(.see-all) { flex-direction: row; align-items: center; } }

/* The full list: a floating sheet rounded on all four corners; the ✕ draws itself in and turns on hover/press */
.al-modal { align-items: end; padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.al-modal.out { animation: al-fade-out .2s ease-in forwards; }
@keyframes al-fade-out { to { opacity: 0; } }
.al-sheet { --tone: var(--sage); --tone-ink: var(--sage-ink); --tone-field: var(--sage-field);
  position: relative; width: min(460px, 100%); max-height: 86vh; max-height: 86dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 10px 0 0; overflow: hidden;
  border-radius: 28px; box-shadow: 0 30px 70px -24px rgb(0 0 0 / .55), inset 0 2px 0 rgb(255 255 255 / .35); animation: al-rise .42s cubic-bezier(.2, .95, .3, 1.04); }
.al-sheet.bad { --tone: var(--clay); --tone-ink: var(--clay-ink); --tone-field: var(--clay-field); }
.al-modal.out .al-sheet { animation: al-sink .22s cubic-bezier(.5, 0, .9, .5) forwards; }
@keyframes al-rise { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes al-sink { to { opacity: 0; transform: translateY(40px) scale(.97); } }
.al-grab { justify-self: center; width: 38px; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.al-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 12px 18px 0 22px; }
.al-top h2 { margin: 0; padding-top: .08em; font-family: var(--font-display); font-stretch: 78%; font-weight: 800; font-size: 1.5rem; line-height: 1.05; text-transform: uppercase; }
.al-top h2 .cnt { display: inline-grid; place-items: center; min-width: 28px; height: 24px; margin-left: 8px; padding: 0 8px; border-radius: 99px; vertical-align: 4px; background: var(--tone-field); color: var(--tone-ink); font: 600 .74rem var(--font-mono); }
.al-sub { grid-column: 1; margin: 0; color: var(--ink-2); font-size: .86rem; }
.al-x { grid-row: 1 / span 2; grid-column: 2; position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); cursor: pointer; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background-color .2s ease, color .2s ease; }
.al-x svg { width: 18px; height: 18px; overflow: visible; }
.al-x path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 20; animation: al-draw .34s cubic-bezier(.4, 0, .2, 1) .22s backwards; }
.al-x path + path { animation-delay: .34s; }
@keyframes al-draw { from { stroke-dashoffset: 20; } }
.al-x::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--tone); border-radius: 50%; opacity: 0; transform: scale(.85); transition: opacity .2s ease, transform .25s ease; }
@media (hover: hover) { .al-x:hover { transform: rotate(90deg); background: var(--tone-field); color: var(--tone-ink); } }
.al-x:active { transform: rotate(90deg) scale(.88); transition-duration: .12s; }
.al-x:focus-visible { outline: 2px solid var(--act-ink); outline-offset: 2px; }
.al-x:focus-visible::after { opacity: 1; transform: none; }
.al-list { margin: 14px 0 0; padding: 4px 12px 14px; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent); }
.al-list:focus-visible { outline: 2px solid var(--act-ink); outline-offset: -4px; border-radius: 16px; }
.al-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 10px; border-radius: 16px;
  animation: al-row-in .36s cubic-bezier(.2, .9, .3, 1) backwards; animation-delay: calc(.12s + var(--i, 0) * .035s); }
.al-row:nth-child(even) { background: color-mix(in srgb, var(--ink) 5%, transparent); }
@keyframes al-row-in { from { opacity: 0; transform: translateY(10px); } }
.al-row .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-3); font: 600 .72rem var(--font-mono); }
.al-row:nth-child(-n+3) .n { background: var(--tone); color: var(--on-accent); }
.al-row .w { min-width: 0; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.al-row .w small { display: block; margin-top: 2px; color: var(--ink-2); font: italic 400 .86rem var(--font-italic); }
.al-row .c { display: grid; justify-items: end; gap: 5px; min-width: 64px; }
.al-row .c strong { color: var(--tone-ink); font: 600 .82rem var(--font-mono); }
.al-row .b { width: 64px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.al-row .b i { display: block; height: 100%; border-radius: inherit; background: var(--tone); transform-origin: left; animation: al-bar .6s cubic-bezier(.3, .8, .3, 1) backwards; animation-delay: calc(.2s + var(--i, 0) * .035s); }
@keyframes al-bar { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .al-sheet, .al-modal.out, .al-modal.out .al-sheet, .al-row, .al-row .b i, .al-x path { animation: none; }
  .al-x, .al-x::after, .nt-chips li button { transition: none; }
}

/* ===== Polish (owner "Yes, build them" 2026-11-15, mockup-polish-app.html, Icons8 ui-polish pass) =====
   Small text that measured under 4.5:1 gets a stronger ink from the existing tokens (after: 5.0–11:1, light and dark),
   the button arrow is one drawn icon (index.html ARROW_ICON), and photos get an edge that flips with the theme. */
.week > div > span { color: var(--ink-2); }
.pfad-tile .n { color: var(--ink-2); }
.pfad-seg button:not(.on) { color: var(--ink); }
.lb-row.is-me .k, .lb-row.is-me .c, .mx-xp-t small { color: color-mix(in srgb, var(--act-ink) 78%, var(--ink)); }
.mx-row.is-danger .mx-t strong { color: color-mix(in srgb, var(--mx-danger) 75%, var(--ink)); }
.arw { display: inline-block; flex: none; width: 1.05em; height: 1.05em; vertical-align: -.16em; }
.arw path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
:root { --outline-image: oklch(0 0 0 / .1); }
:root[data-theme="dark"] { --outline-image: oklch(1 0 0 / .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --outline-image: oklch(1 0 0 / .12); } }
.lb-av, .mx-face { outline: 1px solid var(--outline-image); outline-offset: -1px; }

/* ---- Modal Verbs (A2): Option F Cheat Sheet (annotated bracket + swipe carousel) & Master Table ---- */
.screen > .mode-card[data-action="choose-mode"][data-kind="modal"] { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.cheat-sheet.mod-sheet { padding-bottom: 10px; }
.mod-f-sent { margin: 8px 0 6px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); font-size: .88rem; line-height: 1.5; text-align: center; }
.mod-ann { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 2px; }
.mod-ann b { padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--clay-field) 60%, var(--bg)); color: var(--clay-ink); line-height: 1.25; }
.mod-ann small { font-family: var(--font-mono); font-size: .5rem; text-transform: uppercase; color: var(--clay-ink); margin-top: 1px; }
.mod-f-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.mod-f-track::-webkit-scrollbar { display: none; }
.mod-f-slide { flex: 0 0 100%; scroll-snap-align: start; padding: 8px 9px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--slate-field) 30%, var(--surface-1)); border: 1px solid var(--hair); box-sizing: border-box; }
.mod-f-shead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.mod-f-shead strong { font-size: .92rem; }
.mod-f-shead span { font-size: .72rem; color: var(--ink-2); }
.mod-sg-pl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
.mod-sg-cell { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 5px 8px; border-radius: 6px; font-size: .78rem; background: color-mix(in srgb, var(--slate-field) 52%, var(--surface-1)); }
.mod-sg-cell.pl { background: color-mix(in srgb, var(--sage-field) 52%, var(--surface-1)); }
.mod-sg-cell span { color: var(--ink-2); font-size: .7rem; }
.mod-sg-cell b { color: var(--slate-ink); font-weight: 800; }
.mod-sg-cell.pl b { color: var(--sage-ink); }
.mod-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0 2px; }
.mod-dot { width: 6px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: var(--track); cursor: pointer; transition: width .2s, background .2s; }
.mod-dot[aria-current="true"] { width: 16px; background: var(--act); }
@media (prefers-reduced-motion: reduce) { .mod-dot { transition: none; } }
.mod-sheet-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 6px 0 8px; border-bottom: 1px solid var(--hair); }
.mod-tbtn { position: relative; min-height: 36px; padding: 6px 8px 8px; border: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: transparent; color: var(--ink-2); font-family: var(--font-body); font-size: .8rem; font-weight: 600; cursor: pointer; text-align: center; }
.mod-tbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--act-field) 65%, transparent); color: var(--act-ink); font-weight: 700; }
.mod-tbtn[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 0; border-block-end: 3px solid var(--act); }
.mod-sheet-scroll { display: grid; gap: 8px; align-content: start; }
.mod-mcard { border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); padding: 9px 10px; display: grid; gap: 6px; }
.mod-mcard-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mod-mcard-title { display: flex; align-items: baseline; gap: 6px; }
.mod-mcard-title strong { font-size: .96rem; font-weight: 800; color: var(--ink); }
.mod-mcard-title span { font-size: .74rem; color: var(--ink-2); }
.mod-mcard-rule { font-family: var(--font-mono); font-size: .6rem; color: var(--clay-ink); background: color-mix(in srgb, var(--clay-field) 55%, transparent); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.mod-mcard-ex { font-size: .75rem; color: var(--ink-2); line-height: 1.3; padding-top: 4px; border-top: 1px solid var(--hair); }

/* ---- Comp & Sup Degree (A2): C3.1 cheat sheet, All 40 modal, and 2-step feedback ---- */
.screen > .mode-card[data-action="choose-mode"][data-kind="degree"] { --c: var(--sand); --c-ink: var(--sand-ink); --c-field: var(--sand-field); }
.screen > .mode-card[data-action="choose-mode"][data-kind="reflexive"] { --c: var(--sage); --c-ink: var(--sage-ink); --c-field: var(--sage-field); }
.cheat-sheet .r-pro, .cs-steps.r-pro { --d-ink: var(--slate-ink); --d-field: var(--slate-field); --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.cheat-sheet .r-dat, .cs-steps.r-dat { --d-ink: var(--sand-ink); --d-field: var(--sand-field); --g-ink: var(--sand-ink); --g-field: var(--sand-field); }
.cheat-sheet .r-akk, .cs-steps.r-akk { --d-ink: var(--clay-ink); --d-field: var(--clay-field); --g-ink: var(--clay-ink); --g-field: var(--clay-field); }
.cheat-sheet .r-bau, .cs-steps.r-bau { --d-ink: var(--sage-ink); --d-field: var(--sage-field); --g-ink: var(--sage-ink); --g-field: var(--sage-field); }
.cs-ref-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-slot .sub { font-size: .74rem; color: var(--ink-2); }
.ref-formula { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-3); margin: 1px 0 2px; }
.cs-slot .sample b.dat { color: var(--sand-ink); font-weight: 800; }
.cs-slot .sample b.akk { color: var(--clay-ink); font-weight: 800; }
.cs-slot .sample b.bau { color: var(--sage-ink); font-weight: 800; }
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody td { text-align: center; font-size: .86rem; }
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody td.pro { text-align: left; padding-left: 9px; background: var(--surface-1); color: var(--ink); font-weight: 700; }
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody td.diff { font-weight: 800; }
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody td.r-dat { color: var(--sand-ink); }
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody td.r-akk { color: var(--clay-ink); }
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody tr.is-diff td.r-dat,
.cheat-sheet .cs-tab.deg-tab.ref-tab tbody tr.is-diff td.r-akk { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--d-ink) 45%, transparent); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.ref-list-tab tbody td { text-align: left; font-size: .78rem; padding: 6px 7px; vertical-align: top; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.ref-list-tab tbody td.ref-case-cell { text-align: center; font-family: var(--font-mono); font-size: .68rem; font-weight: 700; color: var(--d-ink); }
.screen > .mode-card[data-action="choose-mode"][data-kind="connectors"] { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.cheat-sheet .c-list, .cs-steps.c-list { --d-ink: var(--slate-ink); --d-field: var(--slate-field); --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.cheat-sheet .c-bau,  .cs-steps.c-bau  { --d-ink: var(--sage-ink);  --d-field: var(--sage-field);  --g-ink: var(--sage-ink);  --g-field: var(--sage-field); }
.cheat-sheet .c-pair, .cs-steps.c-pair { --d-ink: var(--clay-ink);  --d-field: var(--clay-field);  --g-ink: var(--clay-ink);  --g-field: var(--clay-field); }
.cs-con-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-slot .sample b.pair { color: var(--clay-ink); font-weight: 800; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td { text-align: left; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.de { font-weight: 800; color: var(--ink); background: color-mix(in srgb, var(--slate-field) 55%, transparent); }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.pos { text-align: center; font-family: var(--font-mono); font-size: .62rem; font-weight: 700; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.pos.end  { color: var(--sage-ink); background: color-mix(in srgb, var(--sage-field) 55%, transparent); }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.pos.p2   { color: var(--sand-ink); background: color-mix(in srgb, var(--sand-field) 55%, transparent); }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.pos.p0   { color: var(--act-ink);  background: color-mix(in srgb, var(--act-field) 55%, transparent); }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.pos.prep { color: var(--clay-ink); background: color-mix(in srgb, var(--clay-field) 55%, transparent); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.con-list-tab tbody td { font-size: .76rem; padding: 6px 7px; vertical-align: top; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.ex-cell { white-space: normal; overflow-wrap: break-word; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.ex-cell .v-end  { color: var(--sage-ink); background: color-mix(in srgb, var(--sage-field) 65%, transparent); font-weight: 800; padding: 0 3px; border-radius: 3px; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.ex-cell .v-p2   { color: var(--sand-ink); background: color-mix(in srgb, var(--sand-field) 65%, transparent); font-weight: 800; padding: 0 3px; border-radius: 3px; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.ex-cell .v-p0   { color: var(--act-ink);  background: color-mix(in srgb, var(--act-field) 65%, transparent);  font-weight: 800; padding: 0 3px; border-radius: 3px; }
.cheat-sheet .cs-tab.deg-tab.con-tab tbody td.ex-cell .v-prep { color: var(--clay-ink); background: color-mix(in srgb, var(--clay-field) 65%, transparent); font-weight: 800; padding: 0 3px; border-radius: 3px; }
.cheat-sheet .d-pos, .cs-steps.d-pos { --d-ink: var(--sage-ink); --d-field: var(--sage-field); --g-ink: var(--sage-ink); --g-field: var(--sage-field); }
.cheat-sheet .d-kom, .cs-steps.d-kom { --d-ink: var(--slate-ink); --d-field: var(--slate-field); --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.cheat-sheet .d-sup, .cs-steps.d-sup { --d-ink: var(--clay-ink); --d-field: var(--clay-field); --g-ink: var(--clay-ink); --g-field: var(--clay-field); }
.cheat-sheet .d-all { --d-ink: var(--act-ink); --d-field: var(--act-field); --g-ink: var(--act-ink); --g-field: var(--act-field); }
.cheat-sheet.deg-sheet { padding-bottom: 10px; overflow: hidden; }
.cheat-sheet .cs-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.cheat-sheet .cs-head-row .cs-head { border: 0; padding: 0; margin: 0; }
.cs-all-btn { min-height: 36px; padding: 4px 12px; border: 1px solid var(--hair); border-radius: 999px; background: var(--surface-1); color: var(--act-ink); font-family: var(--font-mono); font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .cs-all-btn:hover { background: var(--surface-2); } }
.cs-all-btn:focus-visible { outline: 2px solid var(--act-ink); outline-offset: 2px; }
.cs-deg-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 10px 0 8px; border-bottom: 1px solid var(--hair); }
.cs-deg-tabs button[role="tab"] { position: relative; min-width: 0; min-height: 44px; padding: 6px 2px 9px; border: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: transparent; font-family: var(--font-body); font-size: .74rem; font-weight: 600; line-height: 1.15; color: var(--ink-2); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cs-deg-tabs button[role="tab"] small { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: .58rem; font-weight: 500; color: var(--ink-3); }
.cs-deg-tabs button[role="tab"][aria-selected="true"] { background: color-mix(in srgb, var(--d-field, var(--act-field)) 65%, transparent); color: var(--d-ink, var(--act-ink)); font-weight: 700; }
.cs-deg-tabs button[role="tab"][aria-selected="true"] small { color: var(--d-ink, var(--act-ink)); }
.cs-deg-tabs button[role="tab"][aria-selected="true"]::after { content: ""; position: absolute; inset: auto 0 0; border-block-end: 3px solid var(--d-ink, var(--act)); }
.cs-deg-tabs button[role="tab"]:focus-visible { outline: 2px solid var(--act-ink); outline-offset: -2px; }
.cs-deg-strip { display: grid; gap: 6px; margin: 0 0 8px; padding: 9px 11px; border-left: 3px solid var(--d-ink, var(--act)); border-radius: var(--r-sm); background: color-mix(in srgb, var(--d-field, var(--act-field)) 52%, transparent); }
.cs-deg-strip .say { font-size: .88rem; line-height: 1.35; color: var(--ink); font-weight: 600; }
.cs-deg-strip .ex { font-size: .92rem; line-height: 1.35; color: var(--ink); }
.cs-deg-strip .ex b { color: var(--d-ink, var(--act-ink)); text-decoration: underline 2px; text-underline-offset: 2px; }
.cs-split { display: grid; gap: 5px; margin-top: 2px; }
.cs-slot { display: grid; gap: 2px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); font-size: .8rem; line-height: 1.3; }
.cs-slot .when { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; color: var(--ink-2); }
.cs-slot .sample { font-size: .88rem; color: var(--ink); }
.cs-slot .sample b { color: var(--d-ink, var(--act-ink)); font-weight: 800; }
.cs-deg-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.cs-deg-wrap:focus-visible { outline: 2px solid var(--act-ink); outline-offset: 2px; border-radius: var(--r-sm); }
.cheat-sheet .cs-tab.deg-tab { width: 100%; margin: 0; border-spacing: 3px; table-layout: fixed; }
.cheat-sheet .cs-tab.deg-tab thead th { padding: 0 0 2px; text-align: center; }
.cheat-sheet .cs-tab.deg-tab .cs-g { display: inline-block; max-width: 100%; padding: 2px 7px; border-radius: 999px; background: var(--d-field); color: var(--d-ink); font-family: var(--font-mono); font-size: .62rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.cheat-sheet .cs-tab.deg-tab tbody td { padding: 6px; background: color-mix(in srgb, var(--d-field) 50%, transparent); font-size: .8rem; line-height: 1.24; white-space: normal; overflow-wrap: break-word; }
.cheat-sheet .cs-tab.deg-tab tbody td b { color: var(--d-ink); font-weight: 800; }
.cheat-sheet .cs-tab.deg-tab tbody td.lbl { text-align: left; background: var(--surface-1); color: var(--ink-2); font-size: .74rem; font-weight: 500; }
.cheat-sheet .cs-tab.deg-tab tbody td.lbl strong { display: block; font-size: .82rem; font-weight: 700; color: var(--ink); }

.deg-cheat-body { display: flex; align-items: flex-start; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; transition: height .22s cubic-bezier(.2, .8, .2, 1); }
.deg-cheat-body::-webkit-scrollbar { display: none; }
.deg-cheat-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; box-sizing: border-box; }
.deg-cheat-body .cs-tab { touch-action: auto; }
.deg-cheat-body .cs-deg-wrap { overflow-x: visible; }
.deg-sheet-overlay { padding: 10px; align-items: flex-end; }
.deg-sheet-card { width: 100%; max-width: 520px; height: 88dvh; max-height: 88dvh; min-height: 0; background: var(--bg); color: var(--ink); border-radius: 28px; padding: 10px 14px 12px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--hair); animation: al-rise .42s cubic-bezier(.2, .95, .3, 1.04); }
.deg-sheet-overlay.out .deg-sheet-card { animation: al-sink .22s cubic-bezier(.5, 0, .9, .5) forwards; }
.deg-sheet-head { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; margin: 6px 0 4px; gap: 8px; }
.deg-sheet-head strong { font-family: var(--font-display); font-stretch: 72%; font-size: 1.12rem; text-transform: uppercase; }
.deg-sheet-sub { flex: 0 0 auto; font-size: .76rem; color: var(--ink-2); margin: 0 0 6px; line-height: 1.32; }
.deg-sheet-search { flex: 0 0 auto; width: 100%; min-height: 38px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; color: var(--ink); padding: 2px 2px 4px; font-size: .9rem; margin-bottom: 8px; }
.deg-sheet-search::placeholder { color: var(--ink-3); }
.deg-sheet-filters { flex: 0 0 auto; display: flex; gap: 4px; flex-wrap: wrap; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid var(--hair); }
.deg-fbtn { flex: none; min-height: 34px; padding: 4px 10px; border: 1px solid var(--hair); border-radius: 999px; background: var(--surface-1); color: var(--ink-2); font-family: var(--font-mono); font-size: .64rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.deg-fbtn[aria-pressed="true"] { border-color: var(--act); background: var(--act-field); color: var(--act-ink); }
.deg-sheet-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 8px; }
.deg-sheet-scroll::-webkit-scrollbar { display: none; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab { border-spacing: 3px; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab thead th { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 6px 0; box-shadow: 0 1px 0 var(--hair); }
.deg-en { font-size: .7rem; color: var(--ink-2); font-weight: 400; }
.screen > .mode-card[data-action="choose-mode"][data-kind="imperative"] { --c: var(--clay); --c-ink: var(--clay-ink); --c-field: var(--clay-field); }
.cheat-sheet .i-form, .cs-steps.i-form { --d-ink: var(--clay-ink);  --d-field: var(--clay-field);  --g-ink: var(--clay-ink);  --g-field: var(--clay-field); }
.cheat-sheet .i-stem, .cs-steps.i-stem { --d-ink: var(--slate-ink); --d-field: var(--slate-field); --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.cheat-sheet .i-spec, .cs-steps.i-spec { --d-ink: var(--sage-ink);  --d-field: var(--sage-field);  --g-ink: var(--sage-ink);  --g-field: var(--sage-field); }
.cs-imp-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cheat-sheet .cs-tab.deg-tab.imp-mini thead th,
.cheat-sheet .cs-tab.deg-tab.imp-tab thead th { text-align: left; }
.cheat-sheet .cs-tab.deg-tab.imp-mini tbody td { padding: 7px; font-size: .8rem; line-height: 1.28; vertical-align: middle; text-align: left; }
.cheat-sheet .cs-tab.deg-tab.imp-mini tbody td.lbl { background: var(--surface-1); color: var(--ink-2); font-size: .74rem; }
.cheat-sheet .cs-tab.deg-tab.imp-mini tbody td.lbl strong { display: block; font-size: .84rem; font-weight: 800; color: var(--ink); }
.cheat-sheet .cs-tab.deg-tab.imp-mini tbody td.rule { background: var(--surface-1); color: var(--ink-2); font-size: .76rem; }
.cheat-sheet .cs-tab.deg-tab.imp-mini tbody td.rule s { color: var(--ink-3); opacity: .85; text-decoration: line-through; }
.cheat-sheet .cs-tab.deg-tab.imp-mini tbody td small { display: block; margin-top: 2px; font-size: .7rem; color: var(--ink-2); font-weight: 400; }
.cheat-sheet .cs-tab.deg-tab.imp-tab tbody td { text-align: left; vertical-align: top; }
.cheat-sheet .cs-tab.deg-tab.imp-tab tbody td.de { font-weight: 800; color: var(--ink); background: color-mix(in srgb, var(--clay-field) 50%, transparent); }
.cheat-sheet .cs-tab.deg-tab.imp-tab tbody td.du-cell { font-weight: 700; color: var(--clay-ink); background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.cheat-sheet .cs-tab.deg-tab.imp-tab tbody td.pl-cell { color: var(--ink); }
.cheat-sheet .cs-tab.deg-tab.imp-tab tbody td.pl-cell small { display: block; color: var(--ink-2); margin-top: 2px; font-size: .72rem; }
.imp-tag { display: inline-block; margin-top: 3px; padding: 1px 5px; border-radius: 999px; font-family: var(--font-mono); font-size: .56rem; font-weight: 700; text-transform: uppercase; }
.imp-tag.reg  { color: var(--ink-2);     background: var(--surface-2); }
.imp-tag.stem { color: var(--slate-ink); background: color-mix(in srgb, var(--slate-field) 65%, transparent); }
.imp-tag.sep  { color: var(--sage-ink);  background: color-mix(in srgb, var(--sage-field) 65%, transparent); }
.imp-tag.irr  { color: var(--clay-ink);  background: color-mix(in srgb, var(--clay-field) 65%, transparent); }

/* ---- Sprachbausteine (B1+): 2-tab cheat sheet & interactive cloze trainer ---- */
.screen > .mode-card[data-action="choose-mode"][data-kind="sprachbausteine"] { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.cheat-sheet .sb-t1 { --d-ink: var(--slate-ink); --d-field: var(--slate-field); }
.cheat-sheet .sb-t2 { --d-ink: var(--sage-ink);  --d-field: var(--sage-field); }
.cs-sb-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-sb-strip { display: grid; gap: 6px; padding: 10px 12px; border-left: 3px solid var(--d-ink, var(--act)); border-radius: var(--r-sm); background: color-mix(in srgb, var(--d-field, var(--act-field)) 50%, transparent); font-size: .82rem; line-height: 1.38; color: var(--ink); }
.cs-sb-strip strong { color: var(--d-ink, var(--act-ink)); }

body.session-open main:has(.sb-screen) { padding: 0; overflow-y: hidden; }
body.session-open:has(.sb-screen) .app-shell { padding-bottom: 0; }
body.session-open .screen.sb-screen, .screen.sb-screen { padding: 0; gap: 0; height: 100%; min-height: 0; overflow: hidden; }
.sb-trainer { display: flex; flex-direction: column; width: 100%; max-width: 100%; min-width: 0; height: 100%; min-height: 0; overflow: hidden; }
.sb-top { flex: 0 0 auto; min-width: 0; padding: 10px 20px 8px; border-bottom: 1px solid var(--hair); background: var(--bg); }
.sb-scroll { flex: 1 1 auto; min-width: 0; min-height: 0; overflow-y: auto; padding: 12px 20px 28px; display: grid; gap: 10px; align-content: start; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%); }
.sb-scroll::-webkit-scrollbar { display: none; }
.sb-ad { padding: 9px 11px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.sb-ad-title { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: .92rem; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.sb-ad-sub { font-size: .74rem; color: var(--ink-2); line-height: 1.3; margin-top: 2px; }
.sb-letter { padding: 14px 14px 16px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); font-size: .92rem; line-height: 1.65; color: var(--ink); }
.sb-letter p { margin: 0 0 10px; }
.sb-letter p:last-child { margin-bottom: 0; }
.sb-sign { font-style: italic; color: var(--ink-2); }

.sb-gap { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px; margin: 0 2px; border: 1.5px solid var(--hair); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-body); font-size: .84rem; font-weight: 700; line-height: 1.2; cursor: pointer; vertical-align: baseline; }
.sb-gap .num { font-family: var(--font-mono); font-size: .64rem; font-weight: 700; color: var(--ink-3); }
.sb-gap.is-filled { background: color-mix(in srgb, var(--slate-field) 70%, transparent); border-color: var(--slate-ink); color: var(--slate-ink); }
.sb-gap.is-filled .num { color: var(--slate-ink); }
.sb-gap.is-active { border-color: var(--act); background: var(--act-field); color: var(--act-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--act) 28%, transparent); }
.sb-gap.is-active .num { color: var(--act-ink); }
.sb-gap.is-ok { background: color-mix(in srgb, var(--sage-field) 80%, transparent); border-color: var(--sage-ink); color: var(--sage-ink); }
.sb-gap.is-bad { background: color-mix(in srgb, var(--clay-field) 80%, transparent); border-color: var(--clay-ink); color: var(--clay-ink); }
.sb-gap.is-bad s { opacity: .7; margin-right: 3px; text-decoration: line-through; }
.sb-gap.is-bad b { color: var(--sage-ink); }
.sb-ex-pill { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-mono); font-size: .74rem; font-weight: 600; text-decoration: line-through; }

.sb-dock { flex: 0 0 auto; min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; margin: 0; border-top: 1px solid var(--hair); border-left: 0; border-right: 0; border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--surface-1); padding: 12px 20px max(14px, env(safe-area-inset-bottom)); display: grid; gap: 8px; box-shadow: 0 -6px 24px color-mix(in srgb, var(--ink) 12%, transparent); }
@container (max-width: 360px) { .sb-top { padding-inline: 12px; } .sb-scroll { padding-inline: 12px; } .sb-dock { padding-inline: 12px; } }
.sb-dock-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-dock-title { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--act-ink); }
.sb-dock-nav { display: inline-flex; gap: 6px; align-items: center; }
.sb-nav-btn { min-width: 30px; min-height: 28px; padding: 0 8px; border: 1px solid var(--hair); border-radius: 999px; background: var(--bg); color: var(--ink); font-family: var(--font-mono); font-size: .72rem; font-weight: 700; cursor: pointer; }
.sb-nav-btn:disabled { opacity: .38; cursor: default; }

.sb-abc { display: grid; gap: 6px; }
.sb-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 5px 10px; border: 1px solid var(--hair); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: .86rem; font-weight: 600; text-align: left; cursor: pointer; }
.sb-opt .idx { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); font-family: var(--font-mono); font-size: .66rem; font-weight: 700; color: var(--ink-2); flex: none; }
.sb-opt[aria-pressed="true"] { border-color: var(--act); background: var(--act-field); color: var(--act-ink); }
.sb-opt[aria-pressed="true"] .idx { background: var(--act); color: var(--on-accent); }

.sb-bank { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; min-width: 0; max-width: 100%; max-height: 172px; overflow-y: auto; scrollbar-width: none; padding-right: 2px; }
.sb-bank::-webkit-scrollbar { display: none; }
@container (min-width: 520px) { .sb-bank { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; overflow-y: visible; padding-right: 0; } }
.sb-chip { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 38px; padding: 5px 8px; border: 1px solid var(--hair); border-radius: 8px; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: .78rem; font-weight: 600; text-align: left; cursor: pointer; overflow: hidden; }
.sb-chip .let { font-family: var(--font-mono); font-size: .6rem; font-weight: 700; color: var(--ink-3); flex: none; }
.sb-chip span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-chip.is-used { opacity: .4; text-decoration: line-through; background: var(--surface-2); }
.sb-chip.is-current { border-color: var(--act); background: var(--act-field); color: var(--act-ink); opacity: 1; text-decoration: none; }

.sb-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-width: 0; }
.sb-check-btn { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--act); color: var(--on-accent); font-family: var(--font-body); font-size: .84rem; font-weight: 700; cursor: pointer; }
.sb-check-btn:disabled { border: 1px solid var(--hair); background: var(--surface-2); color: var(--ink-2); opacity: 1; cursor: default; }
.sb-clear-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--hair); border-radius: 999px; background: var(--bg); color: var(--ink-2); font-size: .78rem; font-weight: 600; cursor: pointer; }

.sb-clue { padding: 9px 11px; border-left: 3px solid var(--clay-ink); border-radius: var(--r-sm); background: color-mix(in srgb, var(--clay-field) 45%, transparent); font-size: .8rem; line-height: 1.38; color: var(--ink); }
.sb-clue strong { color: var(--clay-ink); }
.sb-clue.ok { border-left-color: var(--sage-ink); background: color-mix(in srgb, var(--sage-field) 45%, transparent); }
.sb-clue.ok strong { color: var(--sage-ink); }
.deg-clue { display: block; font-size: .64rem; color: var(--ink-3); margin-top: 2px; font-weight: 400; }
.deg-empty { padding: 14px; text-align: center; color: var(--ink-2); }

.cs-steps { display: grid; gap: 5px; margin: 10px 0 0; text-align: left; }
.cs-step-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 9px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--d-field, var(--act-field)) 45%, transparent); }
.cs-step-num { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--d-ink, var(--act)); color: var(--on-accent); font-family: var(--font-mono); font-size: .66rem; font-weight: 700; margin-top: 1px; }
.cs-step-body { font-size: .82rem; line-height: 1.35; color: var(--ink); }
.dv-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 6px 12px; border-left: 3px solid var(--dv-c, var(--slate)); margin-bottom: 10px; text-align: left; }
.dv-hero.uml { --dv-c: var(--slate); --dv-ink: var(--slate-ink); }
.dv-hero.tricky { --dv-c: var(--clay); --dv-ink: var(--clay-ink); }
.dv-hero.reg { --dv-c: var(--sage); --dv-ink: var(--sage-ink); }
.dv-hero-main { min-width: 0; }
.dv-kicker { display: block; font-family: var(--font-mono); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--dv-ink, var(--slate-ink)); margin-bottom: 2px; }
.dv-word { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: clamp(1.85rem, 6.8vw, 2.25rem); line-height: 1.02; color: var(--ink); }
.dv-en { font-size: .92rem; color: var(--ink-2); font-weight: 500; margin-top: 3px; }
.dv-trail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0 12px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 0 0 12px; }
.dv-step { display: grid; gap: 3px; padding-bottom: 6px; border-bottom: 2.5px solid transparent; text-align: center; }
.dv-step small { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; color: var(--ink-3); }
.dv-step b { font-size: .92rem; color: var(--ink); overflow-wrap: anywhere; }
.dv-step.ok { border-color: var(--sage); }
.dv-step.ok small { color: var(--sage-ink); }
.dv-step.picked { border-color: var(--ink-2); background: transparent; border-top: 0; border-left: 0; border-right: 0; font: inherit; color: inherit; cursor: pointer; padding-inline: 2px; border-radius: var(--r-sm) var(--r-sm) 0 0; }
@media (hover: hover) and (pointer: fine) { .dv-step.picked:hover { background: var(--surface-2); } }
.dv-step.picked small { color: var(--ink-2); }
.dv-step.active { border-color: var(--act); }
.dv-step.active small, .dv-step.active b { color: var(--act-ink); }
.dv-step.bad { border-color: var(--clay); }
.dv-step.bad small, .dv-step.bad b { color: var(--clay-ink); }
.dv-step-lbl { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); margin: 0 0 8px; text-align: left; }
.dv-step-lbl b { color: var(--ink); }
.dv-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dv-opt { width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; text-align: center; cursor: pointer; transition: background .12s ease, border-color .12s ease; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .dv-opt:hover { background: var(--surface-2); border-color: var(--ink-3); }
}
.dv-opt:active { background: var(--surface-2); }
.dv-opt:focus, .dv-opt:focus:not(:focus-visible) { outline: none; }
.dv-opt:focus-visible { outline: 2px solid var(--act-ink); outline-offset: 2px; }
@media (max-width: 340px) { .dv-opts { grid-template-columns: 1fr; } .hs-grid { grid-template-columns: 1fr; } }

/* Das Perfekt (A2): Satzklammer, haben/sein & Partizip II cheat sheet */
.perf-sheet .p-kl, .cs-steps.p-kl { --d-ink: var(--slate-ink); --d-field: var(--slate-field); --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.perf-sheet .p-hs { --d-ink: var(--sage-ink); --d-field: var(--sage-field); --g-ink: var(--sage-ink); --g-field: var(--sage-field); }
.perf-sheet .p-p2 { --d-ink: var(--clay-ink); --d-field: var(--clay-field); --g-ink: var(--clay-ink); --g-field: var(--clay-field); }
.cs-deg-tabs.cs-perf-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kl-legend { display: flex; align-items: center; gap: 6px; padding: 6px 0 8px; font-family: var(--font-mono); font-size: .64rem; color: var(--ink-2); border-bottom: 1px solid var(--hair); }
.kl-legend .kl-line { flex: 1; height: 2px; background: linear-gradient(90deg, var(--clay-ink), var(--slate-ink)); opacity: .45; border-radius: 2px; }
.kl-list { display: grid; }
.kl-card { padding: 8px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 3px; }
.kl-card:last-child { border-bottom: 0; }
.kl-type { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.kl-sent { font-size: .88rem; line-height: 1.4; color: var(--ink); }
.kl-v2 { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--clay-field); color: var(--clay-ink); font-weight: 700; }
.kl-end { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--slate-field); color: var(--slate-ink); font-weight: 700; }
.hs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.hs-box { border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--surface-1); overflow: hidden; }
.hs-head { padding: 5px 8px; font-family: var(--font-mono); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hs-box.haben .hs-head { background: var(--slate-field); color: var(--slate-ink); }
.hs-box.sein .hs-head { background: var(--clay-field); color: var(--clay-ink); }
.hs-rows { padding: 4px 8px 6px; display: grid; gap: 2px; font-size: .78rem; }
.hs-row { display: flex; justify-content: space-between; gap: 4px; padding: 2px 0; border-bottom: 1px solid color-mix(in srgb, var(--hair) 55%, transparent); }
.hs-row:last-child { border-bottom: 0; }
.hs-row b { font-weight: 700; }
.hs-box.haben .hs-row b { color: var(--slate-ink); }
.hs-box.sein .hs-row b { color: var(--clay-ink); }
.hs-rules { display: grid; gap: 6px; }
.hs-rule { padding: 8px 10px; border-radius: var(--r-sm); border-left: 3px solid var(--clay-ink); background: color-mix(in srgb, var(--clay-field) 45%, transparent); font-size: .78rem; line-height: 1.38; }
.hs-rule.haben { border-left-color: var(--slate-ink); background: color-mix(in srgb, var(--slate-field) 45%, transparent); }
.hs-rule strong { display: block; font-size: .74rem; font-family: var(--font-mono); text-transform: uppercase; margin-bottom: 3px; }
.p2-list { display: grid; }
.p2-item { padding: 8px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 3px; }
.p2-item:last-child { border-bottom: 0; }
.p2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.p2-name { font-size: .82rem; font-weight: 700; color: var(--ink); }
.p2-formula { font-family: var(--font-mono); font-size: .64rem; color: var(--clay-ink); font-weight: 600; }
.p2-formula.grp-b { color: var(--slate-ink); }
.p2-prefixes { font-family: var(--font-mono); font-size: .64rem; color: var(--ink-2); }
.p2-ex { font-size: .8rem; color: var(--ink-2); line-height: 1.38; }
.p2-ex b { color: var(--ink); font-weight: 700; }
.perf-sein-key { color: var(--clay-ink); font-weight: 700; }
.blank.active { border-bottom-color: var(--act); color: var(--act-ink); }
.m-poss.perf-picked { background: var(--act-field); color: var(--act-ink); padding: 0 5px; border-radius: 4px; }
.dv-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.perf-steps { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 6px 0 12px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); }
.perf-step { display: grid; gap: 2px; text-align: center; padding: 4px 6px; border-radius: var(--r-sm); border-bottom: 2.5px solid transparent; }
.perf-step small { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.perf-step b { font-size: .9rem; color: var(--ink); overflow-wrap: anywhere; }
.perf-step.active { border-bottom-color: var(--act); background: color-mix(in srgb, var(--act-field) 45%, transparent); }
.perf-step.active small, .perf-step.active b { color: var(--act-ink); }
.perf-step.picked { border: 0; border-bottom: 2.5px solid var(--ink-2); background: var(--surface-2); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .perf-step.picked:hover { background: color-mix(in srgb, var(--ink) 8%, var(--surface-2)); }
}
.perf-step.picked small { color: var(--ink-2); }
.perf-step.ok { border-bottom-color: var(--sage); background: color-mix(in srgb, var(--sage-field) 45%, transparent); }
.perf-step.ok small { color: var(--sage-ink); }
.perf-step.bad { border-bottom-color: var(--clay); background: color-mix(in srgb, var(--clay-field) 45%, transparent); }
.perf-step.bad small { color: var(--clay-ink); }
.perf-arrow { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.perf-list-tab tbody td { text-align: left; font-size: .78rem; padding: 7px 6px; vertical-align: top; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.perf-list-tab tbody td.lbl strong { font-size: .82rem; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.perf-list-tab tbody td.lbl span { display: block; font-size: .68rem; color: var(--ink-2); margin-top: 1px; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.perf-list-tab tbody td.perf-col b.sein { color: var(--clay-ink); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.perf-list-tab tbody td.perf-col b.haben { color: var(--slate-ink); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.perf-list-tab tbody td.perf-pat { font-family: var(--font-mono); font-size: .66rem; color: var(--ink-2); }
.screen > div > .page-heading h1 { font-size: clamp(1.45rem, 6.8vw, 3.2rem); font-stretch: 64%; line-height: .94; }

/* ---- Feste Präpositionen (A2): Dativ vs. Akkusativ cheat sheet & Alle 14 modal ---- */
.screen > .mode-card[data-action="choose-mode"][data-kind="prepositions"] { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.prep-sheet .pr-dat, .cs-steps.pr-dat { --p-ink: var(--slate-ink); --p-field: var(--slate-field); --d-ink: var(--slate-ink); --d-field: var(--slate-field); --g-ink: var(--slate-ink); --g-field: var(--slate-field); }
.prep-sheet .pr-akk, .cs-steps.pr-akk { --p-ink: var(--clay-ink); --p-field: var(--clay-field); --d-ink: var(--clay-ink); --d-field: var(--clay-field); --g-ink: var(--clay-ink); --g-field: var(--clay-field); }
.prep-sheet .pr-art { --p-ink: var(--sage-ink); --p-field: var(--sage-field); --d-ink: var(--sage-ink); --d-field: var(--sage-field); }
.cs-deg-tabs.cs-prep-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-mnemonic { margin: 0 0 8px; padding: 8px 10px; border-radius: var(--r-sm); border-left: 3px solid var(--p-ink, var(--act)); background: color-mix(in srgb, var(--p-field, var(--act-field)) 50%, transparent); display: grid; gap: 2px; }
.pr-mnemonic small { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .04em; color: var(--p-ink, var(--act-ink)); font-weight: 700; }
.pr-mnemonic strong { font-size: .82rem; line-height: 1.35; color: var(--ink); font-weight: 700; }
.pr-mnemonic span { font-size: .74rem; color: var(--ink-2); }
.pr-list { display: grid; }
.pr-item { padding: 7px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 2px; }
.pr-item:last-child { border-bottom: 0; }
.pr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pr-word { font-size: .92rem; font-weight: 800; color: var(--p-ink, var(--ink)); }
.pr-mean { font-size: .76rem; color: var(--ink-2); text-align: right; }
.pr-ex { font-size: .8rem; line-height: 1.35; color: var(--ink); }
.pr-ex b { color: var(--p-ink, var(--ink)); font-weight: 800; background: color-mix(in srgb, var(--p-field, var(--act-field)) 65%, transparent); padding: 0 4px; border-radius: 4px; }
.pr-ex small { color: var(--ink-2); font-style: italic; margin-left: 4px; }
.pr-tag { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-mono); font-size: .56rem; font-weight: 700; vertical-align: middle; }
.pr-case-table { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; margin-bottom: 8px; }
.pr-case-table th { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; color: var(--ink-2); padding: 4px 2px; text-align: center; }
.pr-case-table th:first-child { text-align: left; }
.pr-case-table td { padding: 6px 4px; border-radius: 4px; background: var(--surface-1); font-size: .78rem; text-align: center; font-weight: 700; }
.pr-case-table td.lbl { text-align: left; font-family: var(--font-mono); font-size: .66rem; font-weight: 700; }
.pr-case-table tr.dat td { background: color-mix(in srgb, var(--slate-field) 50%, var(--surface-1)); color: var(--slate-ink); }
.pr-case-table tr.akk td { background: color-mix(in srgb, var(--clay-field) 50%, var(--surface-1)); color: var(--clay-ink); }
.pr-case-table td.diff { outline: 1.5px solid currentColor; outline-offset: -1.5px; }
.pr-short-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.pr-short-box { padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); font-size: .78rem; display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.pr-short-box b { color: var(--slate-ink); font-weight: 800; }
.pr-short-box span { color: var(--ink-2); font-size: .7rem; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.pr-list-tab tbody td { text-align: left; font-size: .75rem; line-height: 1.28; padding: 6px 5px; vertical-align: top; }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.pr-list-tab tbody td.p-dat { color: var(--slate-ink); font-weight: 800; background: color-mix(in srgb, var(--slate-field) 42%, var(--surface-1)); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.pr-list-tab tbody td.p-akk { color: var(--clay-ink); font-weight: 800; background: color-mix(in srgb, var(--clay-field) 42%, var(--surface-1)); }
.deg-sheet-scroll .cheat-sheet .cs-tab.deg-tab.pr-list-tab tbody td small { display: block; color: var(--ink-2); font-weight: 400; font-size: .65rem; margin-top: 2px; }

/* ---- Adjektivdeklination (A2): 4-tab Spickzettel & Alle Endungen unified table ---- */
.screen > .mode-card[data-action="choose-mode"][data-kind="adjdecl"] { --c: var(--act); --c-ink: var(--act-ink); --c-field: var(--act-field); }
.adj-sheet .adj-t1, .cs-steps.adj-t1 { --p-ink: var(--slate-ink); --p-field: var(--slate-field); --d-ink: var(--slate-ink); --d-field: var(--slate-field); }
.adj-sheet .adj-t2, .cs-steps.adj-t2 { --p-ink: var(--sage-ink);  --p-field: var(--sage-field);  --d-ink: var(--sage-ink);  --d-field: var(--sage-field); }
.adj-sheet .adj-t3, .cs-steps.adj-t3 { --p-ink: var(--clay-ink);  --p-field: var(--clay-field);  --d-ink: var(--clay-ink);  --d-field: var(--clay-field); }
.adj-sheet .adj-t4, .cs-steps.adj-t4 { --p-ink: var(--sand-ink);  --p-field: var(--sand-field);  --d-ink: var(--sand-ink);  --d-field: var(--sand-field); }
.cs-deg-tabs.cs-adj-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.adj-rule { margin: 0 0 8px; padding: 8px 10px; border-radius: var(--r-sm); border-left: 3px solid var(--p-ink, var(--act)); background: color-mix(in srgb, var(--p-field, var(--act-field)) 48%, transparent); display: grid; gap: 2px; }
.adj-rule small { font-family: var(--font-mono); font-size: .56rem; text-transform: uppercase; letter-spacing: .04em; color: var(--p-ink, var(--act-ink)); font-weight: 700; }
.adj-rule strong { font-size: .8rem; line-height: 1.32; color: var(--ink); font-weight: 700; }
.adj-rule span { font-size: .73rem; line-height: 1.35; color: var(--ink-2); }
.adj-legend { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; }
.adj-lg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: .64rem; font-weight: 700; border: 1px solid var(--hair); background: var(--surface-1); color: var(--ink-2); }
.adj-lg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.adj-lg.ref-e i { background: var(--slate-ink); }
.adj-lg.sig i { background: var(--act); }
.adj-lg.en i { background: var(--ink-3); opacity: .45; }
.adj-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; margin-bottom: 6px; }
.adj-grid th { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; padding: 4px 1px; text-align: center; color: var(--ink-2); border-radius: 4px; }
.adj-grid th:first-child { text-align: left; width: 17%; background: transparent; }
.adj-grid th.g-m { color: var(--slate-ink); background: color-mix(in srgb, var(--slate-field) 55%, transparent); }
.adj-grid th.g-f { color: var(--clay-ink);  background: color-mix(in srgb, var(--clay-field) 55%, transparent); }
.adj-grid th.g-n { color: var(--sage-ink);  background: color-mix(in srgb, var(--sage-field) 55%, transparent); }
.adj-grid th.g-p { color: var(--sand-ink);  background: color-mix(in srgb, var(--sand-field) 55%, transparent); }
.adj-grid td { padding: 0; border-radius: 6px; background: var(--surface-1); border: 1px solid var(--hair); text-align: center; font-size: .74rem; line-height: 1.15; }
.adj-grid td.kas { padding: 4px 2px; text-align: left; border: 0; background: transparent; font-family: var(--font-mono); font-size: .62rem; font-weight: 700; color: var(--ink-2); }
.adj-grid td.kas small { display: block; font-family: var(--font-body); font-size: .54rem; font-weight: 500; color: var(--ink-3); margin-top: 1px; }
button.adj-cell-btn { width: 100%; height: 100%; margin: 0; padding: 5px 2px; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit; display: grid; place-items: center; gap: 1px; cursor: pointer; }
button.adj-cell-btn small { display: block; font-size: .58rem; color: var(--ink-2); font-weight: 500; }
button.adj-cell-btn b { font-size: .84rem; font-weight: 800; color: var(--ink); }
.adj-grid td.hl-e { background: color-mix(in srgb, var(--slate-field) 58%, var(--surface-1)); border-color: color-mix(in srgb, var(--slate) 40%, var(--hair)); }
.adj-grid td.hl-e button.adj-cell-btn b { color: var(--slate-ink); }
.adj-grid td.hl-sig { background: color-mix(in srgb, var(--act-field) 72%, var(--surface-1)); border-color: var(--act); }
.adj-grid td.hl-sig button.adj-cell-btn b { color: var(--act-ink); }
.adj-grid td.is-picked { outline: 2px solid var(--ink); outline-offset: -2px; }
.adj-cell-ex { margin-bottom: 6px; padding: 7px 9px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--hair); display: flex; flex-direction: column; gap: 2px; font-size: .76rem; }
.adj-cell-ex b { color: var(--ink); font-size: .84rem; }
.adj-cell-ex small { color: var(--ink-2); font-size: .7rem; }
.adj-triggers { font-size: .72rem; line-height: 1.4; color: var(--ink-2); padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); }
.adj-triggers b { color: var(--ink); }
.adj-tips { display: grid; gap: 6px; }
.adj-tip { padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); display: grid; gap: 3px; }
.adj-tip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.adj-tip-h b { font-size: .8rem; color: var(--ink); }
.adj-tip-h span { font-family: var(--font-mono); font-size: .58rem; color: var(--sand-ink); background: var(--sand-field); padding: 1px 6px; border-radius: 999px; font-weight: 700; }
.adj-tip p { margin: 0; font-size: .74rem; line-height: 1.38; color: var(--ink-2); }
.adj-tip em { font-style: normal; font-weight: 700; color: var(--ink); }
.adj-tip .no { color: var(--clay-ink); text-decoration: line-through; margin-left: 5px; }
#adj-all-modal .deg-sheet-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#adj-all-modal .deg-sheet-filters::-webkit-scrollbar { display: none; }
.master-tbl { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.master-tbl thead th { position: sticky; top: 0; z-index: 2; padding: 6px 3px; background: var(--bg); font-family: var(--font-mono); font-size: .56rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); text-align: center; box-shadow: 0 1px 0 var(--hair); }
.master-tbl thead th:first-child { text-align: left; width: 15%; }
.master-tbl thead th:nth-child(2) { width: 30%; color: var(--slate-ink); }
.master-tbl thead th:nth-child(3) { width: 31%; color: var(--sage-ink); }
.master-tbl thead th:nth-child(4) { width: 24%; color: var(--clay-ink); }
.master-tbl tr.k-band th { padding: 7px 6px 3px; text-align: left; font-family: var(--font-mono); font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--hair); }
.master-tbl tr.k-band th small { font-family: var(--font-body); font-weight: 500; text-transform: none; color: var(--ink-2); margin-left: 4px; font-size: .64rem; }
.master-tbl td { padding: 5px 4px; border-radius: 5px; background: var(--surface-1); border: 1px solid var(--hair); text-align: center; font-size: .69rem; line-height: 1.2; color: var(--ink); }
.master-tbl td .w { white-space: nowrap; }
.master-tbl td.gen-c { border: 0; background: transparent; padding: 3px 1px; text-align: left; }
.g-tag { display: inline-block; min-width: 32px; padding: 2px 5px; border-radius: 6px; text-align: center; font-family: var(--font-mono); font-size: .6rem; font-weight: 800; }
.g-tag.m { background: var(--slate-field); color: var(--slate-ink); }
.g-tag.f { background: var(--clay-field); color: var(--clay-ink); }
.g-tag.n { background: var(--sage-field); color: var(--sage-ink); }
.g-tag.p { background: var(--sand-field); color: var(--sand-ink); }
.master-tbl td.hl-e { background: color-mix(in srgb, var(--slate-field) 58%, var(--surface-1)); border-color: color-mix(in srgb, var(--slate) 40%, var(--hair)); }
.master-tbl td.hl-sig { background: color-mix(in srgb, var(--act-field) 72%, var(--surface-1)); border-color: var(--act); }
.master-tbl td b { font-weight: 800; color: var(--act-ink); }
.master-tbl td.plain b { color: var(--ink); font-weight: 700; }
.spell-bar { margin-top: 8px; padding: 7px 9px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); font-size: .69rem; line-height: 1.45; color: var(--ink-2); }
.spell-bar b { color: var(--ink); }
.case-exs { display: grid; gap: 5px; margin-top: 8px; }
.case-exs-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 0; }
.case-exs-head b { font-size: .76rem; font-weight: 800; color: var(--ink); }
.case-exs-head small { font-family: var(--font-mono); font-size: .56rem; color: var(--ink-2); text-transform: uppercase; }
.case-ex { padding: 7px 9px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--hair); display: grid; gap: 3px; }
.ce-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ce-rule { font-family: var(--font-mono); font-size: .58rem; font-weight: 700; color: var(--act-ink); }
.case-ex p { margin: 0; font-size: .78rem; line-height: 1.35; color: var(--ink); }
.case-ex p b { color: var(--act-ink); font-weight: 800; background: color-mix(in srgb, var(--act-field) 65%, transparent); padding: 0 4px; border-radius: 4px; }
.case-ex small { font-size: .68rem; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .deg-cheat-body { transition: none; }
  .deg-cheat-body.deg-swap, .deg-sheet-card, .deg-sheet-overlay.out .deg-sheet-card { animation: none; }
}
@media (max-width: 360px) {
  .cs-deg-tabs button[role="tab"] { font-size: .66rem; }
  .cs-deg-tabs button[role="tab"] small { font-size: .52rem; }
  .cheat-sheet .cs-tab.deg-tab tbody td { font-size: .72rem; padding: 5px 4px; }
  .cheat-sheet .cs-tab.deg-tab tbody td.lbl strong { font-size: .74rem; }
}

.screen > .mode-card[data-kind="reading-match"] { --c: var(--sage); --c-ink: var(--sage-ink); --c-field: var(--sage-field); }
.screen > .mode-card[data-kind="reiseprospekte"] { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.screen > .mode-card[data-kind="writing"] { --c: var(--clay); --c-ink: var(--clay-ink); --c-field: var(--clay-field); }
.writing-screen { padding-bottom: var(--writing-end-padding, 20px); }
.app-shell:has(.writing-compact) .tabbar { display: none; }
main:has(.writing-compact) { overscroll-behavior-y: none; }
.writing-panel { display: grid; min-width: 0; gap: 12px; padding: 16px; }
.writing-panel[hidden] { display: none; }
.writing-panel :is(p, h2, h3, ol, ul, dl) { margin: 0; }
.writing-panel :is(ol, ul) { padding-left: 1.35em; }
.writing-panel li + li { margin-top: .35em; }
.writing-panel label { font-weight: 700; }
.writing-panel textarea { width: 100%; resize: vertical; background: var(--bg); color: var(--ink); padding: 12px; border: 1px solid var(--ink-2); border-radius: var(--r-md); font-family: inherit; line-height: 1.5; }
.writing-panel :is(textarea, summary):focus-visible { outline: 2px solid var(--act-ink); outline-offset: 3px; }
.writing-panel summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
.writing-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.writing-comparison-answer { display: grid; align-content: start; gap: 8px; min-width: 0; }
.writing-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.writing-comparison-answer { padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-md); }
@container (max-width: 520px) {
  .writing-compare { grid-template-columns: minmax(0, 1fr); }
}
.writing-scores { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
.writing-scores dd { margin: 0; }
.writing-reason { display: block; overflow-wrap: anywhere; }
.writing-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.b1-reading { --reading-ink: var(--sage-ink); --reading-field: var(--sage-field); gap: 12px; }
.b1-brochure { --reading-ink: var(--slate-ink); --reading-field: var(--slate-field); }
:root[data-theme="dark"] .b1-brochure { --reading-ink: #e8c5fb; --reading-field: #473953; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .b1-brochure { --reading-ink: #e8c5fb; --reading-field: #473953; }
}
.b1-reading-topic { margin: 8px 0 3px; color: var(--ink); font-size: 1.05rem; font-weight: 700; }
.b1-reading-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.b1-statement-report, .b1-statement-feedback { padding: 14px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); }
.b1-statement-report h2 { margin: 0 0 6px; color: var(--reading-ink); font-size: 1.05rem; }
.b1-statement-report p, .b1-statement-feedback p { margin: 0; font-size: .95rem; line-height: 1.55; }
.b1-statement .b1-reading-options { grid-template-columns: 1fr; }
.b1-statement .b1-reading-option { display: block; }
.b1-statement .b1-reading-option.is-right { border-color: var(--sage-ink); background: var(--sage-field); color: var(--ink); }
.b1-statement .b1-reading-option.is-wrong { border-color: var(--clay-ink); background: var(--clay-field); color: var(--ink); }
.b1-statement-feedback { border-inline-start: 3px solid var(--reading-ink); }
.b1-statement-feedback p { margin-top: 5px; }
.b1-statement > .primary-button { justify-content: center; }
.b1-reading-meter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--reading-ink); }
.b1-reading-progress { width: 100%; height: 5px; accent-color: var(--reading-ink); }
.b1-reading-question { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.b1-reading-question legend { width: 100%; padding: 10px 0 14px; font-size: clamp(1.1rem, 4vw, 1.45rem); font-weight: 700; line-height: 1.3; }
.b1-brochure .b1-reading-question legend { margin: 8px 0 12px; padding: 14px; border: 1px solid var(--reading-ink); border-radius: var(--r-md); background: var(--reading-field); }
.b1-reading-error { margin: 0 0 10px; color: var(--clay-ink); }
.b1-reading-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.b1-reading-option { min-height: 48px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--surface-1); text-align: start; display: grid; align-items: baseline; grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; color: var(--ink); overflow-wrap: anywhere; }
.b1-reading-option .kicker { color: var(--reading-ink); }
.b1-reading-option[aria-pressed="true"] { border-color: var(--reading-ink); background: var(--reading-field); }
.b1-reading-option:disabled { color: var(--ink-2); background: transparent; cursor: default; }
.b1-reading-option:disabled .kicker { color: var(--ink-2); }
.b1-brochure .b1-reading-option { min-height: 92px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.b1-brochure .b1-reading-option [lang="de"] { font-family: var(--font-italic); font-style: italic; font-size: clamp(1.05rem, 4vw, 1.3rem); line-height: 1.16; }
.b1-reading-option small { color: var(--ink-2); font-size: .72rem; }
.b1-reading-clear { justify-self: start; color: var(--reading-ink); }
.b1-reading-controls .primary-button { justify-content: center; }


.screen > .mode-card[data-kind="leseverstehen"] { --c: var(--slate); --c-ink: var(--slate-ink); --c-field: var(--slate-field); }
.lese-goethe { --reading-ink: var(--slate-ink); --reading-field: var(--slate-field); }
.lese-telc { --reading-ink: var(--sand-ink); --reading-field: var(--sand-field); }
.lese-format { min-inline-size: 0; }
.lese-format header { padding: 14px; background: var(--reading-field); color: var(--reading-ink); border-radius: var(--r-md) var(--r-md) 0 0; }
.lese-format h2 { margin: 0 0 5px; color: var(--ink); }
.lese-format p { margin: 0; }
.lese-topic { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; border: 0; border-top: 1px solid var(--hair); padding: 10px 14px; background: transparent; color: var(--ink); text-align: start; font-weight: 700; }
.lese-topic svg { flex: none; color: var(--reading-ink); width: 20px; height: 20px; }
.lese-topic:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.lese-topic:focus-visible { outline-offset: -3px; }
@media (hover: hover) { .lese-topic:hover { background: var(--reading-field); } }
.lese-round .b1-reading-question legend { padding: 14px; border: 1px solid var(--reading-ink); border-radius: var(--r-md); background: var(--reading-field); }
.lese-round legend .kicker { display: block; margin-bottom: 6px; color: var(--reading-ink); }
.lese-rules { margin: 4px 0 8px; }
.lese-rules summary { min-height: 48px; padding-block: 12px; font-weight: 700; cursor: pointer; }
.lese-rules p { margin: 0 0 8px; font-size: .95rem; }
.lese-ads { display: grid; gap: 8px; max-height: min(23rem, 48dvh); overflow: auto; scrollbar-gutter: stable; padding: 4px; margin: 4px 0 8px; }
.lese-round .b1-reading-option { width: 100%; padding: 10px; }
.lese-round .b1-reading-option small, .lese-ad-copy { display: block; margin-top: 3px; }
.lese-ad-copy { font-size: .95rem; line-height: 1.5; color: var(--ink-2); }

/* Very narrow pages (owner 2026-11-12, /break-ui: a 375 px phone at 200 % zoom lays out at 188 px): the tab labels and the
   card titles get smaller so nothing runs together or under the arrow. Last in the file so it wins over the rules above. */
@media (max-width: 300px) {
  .tabbar button { letter-spacing: 0; font-size: .56rem; }
  .mode-card-title { font-size: 1.3rem; overflow-wrap: anywhere; }
}
