/* Klick-Tutorial (/anleitung, server/tutorial.mjs, public/anleitung/anleitung.js): ruhig wie die App. Inter, hellgrauer
   Grund, Flächen mit feiner Linie, Hauptaktion in Tinte. Hell und dunkel nach dem System oder fest über data-theme.
   Präfixe: kt- Seite, Anleitung und Rahmen der Übung; ks- nachgebaute Oberfläche; kw- Beispiel-Website (immer hell).
   Raster: ein Behälter von 1240 px (1288 mit 24 px Rand); Kopfzeile, Titel, Bühne, Liste und Fuß stehen an derselben
   linken und rechten Kante. In der Bühne gilt ein Einzug von 24 px für Leiste und Browser-Rahmen.
   Die Farbe einer Marke kommt als Variablen aus /anleitung/marke.css (--accent …) und setzt dort --kt-akz; ohne Marke
   ist die Farbe der Anleitung ein Violett, die nachgebaute Oberfläche bleibt in Tinte. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f5f6f8; --bg-2: #fbfbfc; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e5e8ee; --modal: #ffffff;
  --line: rgba(15, 23, 41, .13); --line-soft: rgba(15, 23, 41, .08); --line-strong: rgba(15, 23, 41, .24);
  --ink: #18202e; --ink-soft: #434c5b; --ink-faint: #5a6372;
  --fg: #0f1729; --on-fg: #ffffff; --fg-hover: #28344c; --hover: rgba(15, 23, 41, .05);
  --accent: #0f1729; --accent-strong: #0f1729; --accent-soft: rgba(15, 23, 41, .08); --accent-ink: #0f1729; --on-accent: #ffffff;
  --green: #18794e; --green-dot: #2b9a66; --orange-dot: #cc8000;
  --shadow-rgb: 15, 23, 41; --veil: rgba(15, 23, 41, .38);
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --feder: cubic-bezier(.34, 1.56, .64, 1);
  --kt-h: clamp(480px, calc(100svh - 408px), 640px);
  --kt-akz: #6d4dff; --kt-akz-2: #8b6bff; --kt-auf: #ffffff; --kt-dunkel: rgba(15, 23, 41, .11);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014; --bg-2: #121419; --surface: #171a20; --surface-2: #1f232b; --surface-3: #2a2f39; --modal: #1a1d24;
    --line: rgba(255, 255, 255, .13); --line-soft: rgba(255, 255, 255, .075); --line-strong: rgba(255, 255, 255, .26);
    --ink: #e7e9ee; --ink-soft: #b7bdc8; --ink-faint: #979eab;
    --fg: #f5f6f8; --on-fg: #0e1014; --fg-hover: #d9dde4; --hover: rgba(255, 255, 255, .06);
    --accent: #f5f6f8; --accent-strong: #f5f6f8; --accent-soft: rgba(255, 255, 255, .1); --accent-ink: #f5f6f8; --on-accent: #0e1014;
    --green: #4fc78e; --green-dot: #3dbb7f; --orange-dot: #e8a020;
    --shadow-rgb: 0, 0, 0; --veil: rgba(0, 0, 0, .55);
    --kt-akz: #a48bff; --kt-akz-2: #c3b3ff; --kt-auf: #14101f; --kt-dunkel: rgba(0, 0, 0, .3);
  }
  :root:not([data-theme="light"]) .kt-logo-h { display: none; }
  :root:not([data-theme="light"]) .kt-logo-d { display: block; }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #0e1014; --bg-2: #121419; --surface: #171a20; --surface-2: #1f232b; --surface-3: #2a2f39; --modal: #1a1d24;
  --line: rgba(255, 255, 255, .13); --line-soft: rgba(255, 255, 255, .075); --line-strong: rgba(255, 255, 255, .26);
  --ink: #e7e9ee; --ink-soft: #b7bdc8; --ink-faint: #979eab;
  --fg: #f5f6f8; --on-fg: #0e1014; --fg-hover: #d9dde4; --hover: rgba(255, 255, 255, .06);
  --accent: #f5f6f8; --accent-strong: #f5f6f8; --accent-soft: rgba(255, 255, 255, .1); --accent-ink: #f5f6f8; --on-accent: #0e1014;
  --green: #4fc78e; --green-dot: #3dbb7f; --orange-dot: #e8a020;
  --shadow-rgb: 0, 0, 0; --veil: rgba(0, 0, 0, .55);
  --kt-akz: #a48bff; --kt-akz-2: #c3b3ff; --kt-auf: #14101f; --kt-dunkel: rgba(0, 0, 0, .3);
  color-scheme: dark;
}
.kt-logo-d { display: none; }
:root[data-theme="dark"] .kt-logo-h { display: none; }
:root[data-theme="dark"] .kt-logo-d { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--kt-akz); outline-offset: 2px; }
.kt-ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.kt-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kt-skip { position: absolute; left: 12px; top: -48px; z-index: 30; padding: 8px 14px; border-radius: 999px; background: var(--fg); color: var(--on-fg); text-decoration: none; font-weight: 600; font-size: 14px; }
.kt-skip:focus { top: 10px; }

/* ---------- Seite: Kopf, Einleitung, Fuß ---------- */
.kt-seite { min-height: 100vh; display: flex; flex-direction: column; }
.kt-top { border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.kt-top-in { max-width: 1288px; height: 56px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 12px; }
.kt-marke { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.kt-marke img { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; }
.kt-marke b { font-weight: 650; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-top-z { color: var(--ink-faint); font-size: 14px; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.2; }
.kt-top-a { margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 560; text-decoration: none; white-space: nowrap; transition: background .15s; }
.kt-top-a:hover { background: var(--surface-2); }
.kt-main { flex: 1; width: 100%; max-width: 1288px; margin: 0 auto; padding: 0 24px 80px; }
/* Kopf: Titel, darunter ein Satz; die drei Fakten stehen in derselben Zeile an der rechten Kante */
.kt-kopf { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 30px 0 22px; }
.kt-kopf h1 { grid-column: 1 / -1; margin: 0; font-size: clamp(28px, 3.3vw, 42px); line-height: 1.08; font-weight: 680; letter-spacing: -.035em; color: var(--fg); text-wrap: balance; }
.kt-lede { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.45; text-wrap: pretty; }
.kt-fakten { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kt-fakten li { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink); font-size: 13.5px; font-weight: 560; white-space: nowrap; }
.kt-fakten .kt-ic { color: var(--kt-akz); }
.kt-fuss { border-top: 1px solid var(--line-soft); }
.kt-fuss-in { max-width: 1288px; margin: 0 auto; padding: 20px 24px 28px; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--ink-faint); font-size: 14px; }
.kt-fuss-in span { margin-right: auto; }
.kt-fuss-in a { text-decoration: none; }
.kt-fuss-in a:hover { color: var(--ink); text-decoration: underline; }

/* Alle Schritte zum Nachlesen (auch ohne Skript): eine Liste, jede Zeile im selben Raster und gleich hoch.
   Spalten: Nummer, Titel, bis zu drei Teilschritte nebeneinander, rechts der Sprung in die Übung. */
.kt-nl { margin-top: 72px; }
.kt-nl h2 { margin: 0 0 18px; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.15; font-weight: 680; letter-spacing: -.03em; color: var(--fg); }
.kt-nl-l { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: 1fr; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px 20px 0 0; }
.kt-nl-k { display: grid; grid-template-columns: 28px 176px minmax(0, 1fr) auto; column-gap: 16px; align-items: center; min-height: 72px; padding: 12px 24px; border-top: 1px solid var(--line-soft); }
.kt-nl-k:first-child { border-top: 0; }
.kt-nl-n { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--kt-akz) 12%, var(--surface)); color: var(--kt-akz); display: grid; place-items: center; font-size: 13px; font-weight: 650; }
.kt-nl-k h3 { margin: 0; font-size: 16px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; color: var(--fg); }
.kt-nl-p { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 24px; counter-reset: kt-p; color: var(--ink-soft); font-size: 14px; line-height: 1.4; }
.kt-nl-p li { counter-increment: kt-p; position: relative; padding-left: 20px; text-wrap: pretty; }
.kt-nl-p li::before { content: counter(kt-p) "."; position: absolute; left: 0; top: 0; color: var(--ink-faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.kt-nl-a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 560; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.kt-nl-a:hover { border-color: var(--kt-akz); color: var(--kt-akz); }
.kt-nl-a .kt-ic { transition: transform .2s var(--ease); }
.kt-nl-a:hover .kt-ic { transform: translateX(2px); }
.kt-nl-f { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 14px 24px; border: 1px solid var(--line-soft); border-top: 0; border-radius: 0 0 20px 20px; background: var(--surface-2); color: var(--ink-soft); font-size: 14.5px; }
.kt-nl-f span { margin-right: auto; font-weight: 560; color: var(--ink); }
.kt-nl-f a { color: var(--ink); text-underline-offset: 3px; }
.kt-ohne { margin: 0; padding: 18px 24px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--surface); color: var(--ink-soft); }

/* ---------- Übung: oben die Anleitung als Leiste, darunter die Bühne mit dem Browser-Rahmen ---------- */
.kt { container: kt / inline-size; scroll-margin-top: 8px; }
.kt-in { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 24px; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .04), 0 44px 80px -56px rgba(var(--shadow-rgb), .4); }

.kt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font: 560 14px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .18s var(--feder), filter .15s; }
.kt-btn:active { transform: scale(.96); }
.kt-pri { background: linear-gradient(100deg, var(--kt-akz-2), var(--kt-akz)); color: var(--kt-auf); box-shadow: 0 8px 22px -12px var(--kt-akz); }
.kt-pri:hover { filter: brightness(1.07); }
.kt-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.kt-ghost:hover { background: var(--surface-2); }
.kt-btn:disabled { opacity: .38; cursor: default; transform: none; }
.kt-btn:disabled:hover { background: var(--surface); }

/* Leiste: acht Schritte über die ganze Breite (sieben gleiche Spalten, der letzte Schritt schließt rechts bündig ab), darunter links der Satz zum Schritt, rechts Zurück und Weiter */
.kt-coach { min-width: 0; display: grid; gap: 14px; padding: 18px 24px; }
.kt-kap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) auto; }
.kt-kap li:last-child .kt-kap-b { padding-right: 0; }
.kt-kap li { position: relative; min-width: 0; }
.kt-kap-b { display: grid; justify-items: start; gap: 6px; max-width: 100%; padding: 0 8px 0 0; border: 0; border-radius: 10px; background: none; color: var(--ink-faint); font: 500 12.5px/1.25 var(--font); text-align: left; cursor: pointer; transition: color .15s; }
.kt-kap-b:hover { color: var(--ink); }
.kt-kap-n { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 650; color: var(--ink-faint); transition: background .25s, border-color .25s, color .25s, box-shadow .25s; }
.kt-kap-n svg { display: none; stroke-width: 2.8; }
.kt-kap-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.kt-kap-l { position: absolute; left: 34px; right: 8px; top: 12px; height: 2px; border-radius: 1px; background: var(--surface-3); overflow: hidden; }
.kt-kap-l i { display: block; height: 100%; border-radius: 1px; background: var(--kt-akz); transform: scaleX(var(--f, 0)); transform-origin: 0 50%; transition: transform .5s var(--ease); }
.kt-kap-b.is-fertig { color: var(--ink-soft); }
.kt-kap-b.is-fertig .kt-kap-n { background: color-mix(in srgb, var(--kt-akz) 14%, var(--surface)); border-color: transparent; color: var(--kt-akz); }
.kt-kap-b.is-fertig .kt-kap-n span { display: none; }
.kt-kap-b.is-fertig .kt-kap-n svg { display: block; }
.kt-kap-b.is-jetzt { color: var(--fg); font-weight: 650; }
.kt-kap-b.is-jetzt .kt-kap-n { background: var(--kt-akz); border-color: var(--kt-akz); color: var(--kt-auf); box-shadow: 0 0 0 4px color-mix(in srgb, var(--kt-akz) 20%, transparent); }
.kt-kap-b.kt-pop .kt-kap-n { animation: kt-pop .5s var(--feder); }
.kt-co { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; }
.kt-co-b { min-width: 0; display: grid; gap: 3px; }
.kt-co-x { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 650; letter-spacing: -.022em; color: var(--fg); hyphens: manual; }
.kt-co-tipp { margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); }
.kt-co-a { display: flex; gap: 8px; }
.kt-co-a .kt-btn:last-child { min-width: 152px; }
.kt-rein { animation: kt-rein .32s var(--ease) both; }
.kt-co-tipp.kt-rein { animation-delay: .05s; }

/* Bühne: der Browser-Rahmen steht auf einem leicht getönten Grund und wirft einen tiefen Schatten */
.kt-boden { padding: 20px 24px 28px; border-top: 1px solid var(--line-soft); background: radial-gradient(90% 120% at 50% 0%, color-mix(in srgb, var(--kt-akz) 10%, var(--surface-2)), var(--surface-2) 72%); }
.kt-screen { container: ks / inline-size; position: relative; min-width: 0; height: var(--kt-h); display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 1px rgba(var(--shadow-rgb), .06), 0 12px 22px -12px rgba(var(--shadow-rgb), .2), 0 40px 64px -40px rgba(var(--shadow-rgb), .5); }
.kt-chrom { position: relative; height: 40px; flex: none; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.kt-chrom-p { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.kt-adr { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; width: min(46%, 380px); height: 26px; padding: 0 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); font-size: 12px; }
.kt-adr-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-chrom-u { margin-left: auto; height: 22px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; background: color-mix(in srgb, var(--kt-akz) 12%, var(--surface)); color: var(--kt-akz); font-size: 11.5px; font-weight: 650; }
.kt-sicht { container: sicht / size; position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; isolation: isolate; }
.kt-flaeche { position: relative; flex: 1; min-width: 0; min-height: 0; font-size: 13px; line-height: 1.4; }
.kt-flaeche > :first-child { height: 100%; }

/* Das Ziel: fester Ring am Element; darüber der Lichtfleck, der den Rest leicht abdunkelt, pulsiert und beim
   Schrittwechsel zum nächsten Ziel gleitet. Ein Zeiger tippt darauf. */
.kt-ziel { position: relative; z-index: 1; outline: 2.5px solid var(--kt-akz); outline-offset: 3px; }
.kt-ziel:focus-visible { outline: 2.5px solid var(--kt-akz); outline-offset: 3px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--kt-akz) 30%, transparent); }
.kt-spot { position: absolute; z-index: 8; left: 0; top: 0; width: var(--w, 0); height: var(--h, 0); transform: translate3d(var(--x, 0), var(--y, 0), 0); border-radius: var(--r, 12px); box-shadow: 0 0 0 200vmax var(--kt-dunkel); pointer-events: none; opacity: 0; transition: transform .42s var(--ease), width .42s var(--ease), height .42s var(--ease), opacity .25s; }
.kt-spot.is-an { opacity: 1; }
.kt-spot.is-sofort { transition: opacity .25s; }
.kt-spot.is-dialog { box-shadow: none; }
.kt-spot-r { position: absolute; inset: 0; border-radius: inherit; animation: kt-puls 1.8s ease-out infinite; }
.kt-spot.kt-stups .kt-spot-r { animation: kt-stups .45s var(--feder); }
.kt-zeiger { position: absolute; left: calc(100% - 24px); top: calc(100% - 18px); width: 26px; height: 26px; overflow: visible; fill: #ffffff; stroke: #0f1729; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .28)); transform-origin: 20% 10%; animation: kt-tipp 1.8s var(--ease) infinite; transition: opacity .2s; }
.kt-spot.is-unten .kt-zeiger { top: calc(50% - 4px); }
.kt-spot.is-rechts .kt-zeiger { left: calc(50% - 4px); }
.kt-sicht:has(textarea.kt-ziel:focus, input.kt-ziel:focus) .kt-zeiger { opacity: 0; }
.kt-treffer { position: absolute; z-index: 9; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--kt-akz); color: var(--kt-auf); box-shadow: 0 8px 18px -8px var(--kt-akz); pointer-events: none; opacity: 0; transform: translate(var(--x, 0), var(--y, 0)) scale(.3); }
.kt-treffer svg { stroke-width: 3; }
.kt-treffer::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--kt-akz); opacity: 0; }
.kt-treffer.is-an { animation: kt-treffer .8s var(--ease) both; }
.kt-treffer.is-an::after { animation: kt-welle .6s ease-out both; }
@keyframes kt-puls { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kt-akz) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 16px transparent; } }
@keyframes kt-stups { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kt-akz) 75%, transparent); transform: scale(1); } 40% { transform: scale(1.06); } 100% { box-shadow: 0 0 0 20px transparent; transform: scale(1); } }
@keyframes kt-tipp { 0%, 100% { transform: translate(9px, 11px); } 38% { transform: translate(0, 0) scale(.86); } 54%, 70% { transform: translate(0, 0); } }
@keyframes kt-treffer { 0% { opacity: 0; transform: translate(var(--x, 0), var(--y, 0)) scale(.3); } 22% { opacity: 1; transform: translate(var(--x, 0), var(--y, 0)) scale(1.18); } 40% { transform: translate(var(--x, 0), var(--y, 0)) scale(1); } 70% { opacity: 1; transform: translate(var(--x, 0), calc(var(--y, 0) - 6px)) scale(1); } 100% { opacity: 0; transform: translate(var(--x, 0), calc(var(--y, 0) - 22px)) scale(.9); } }
@keyframes kt-welle { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(2.3); } }
@keyframes kt-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes kt-rein { from { opacity: 0; transform: translateY(6px); } }
@keyframes kt-konfetti { 0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.4); } 12% { opacity: 1; } 68% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 44px)) rotate(var(--dr)) scale(1); } }
@keyframes ks-neu { from { opacity: 0; transform: translateY(6px); } }
@keyframes ks-ein { from { opacity: 0; } }
@keyframes ks-auf { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes ks-toast { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes kt-strich { to { stroke-dashoffset: 0; } }
.ks-neu { animation: ks-neu .24s var(--ease) both; }

/* Eingebettet (?einbetten=1, im Rahmen einer anderen Seite): nur die Übung, randlos, feste Höhe */
.kt-einbetten { min-height: 0; background: transparent; --kt-h: 468px; }
.kt-einbetten .kt-main { max-width: none; padding: 0; }
.kt-einbetten .kt-in { border: 0; border-radius: 0; box-shadow: none; }
.kt-einbetten .kt-coach { padding: 14px 20px; gap: 12px; }
.kt-einbetten .kt-boden { padding: 14px 20px 20px; }

/* ---------- Bausteine der nachgebauten Oberfläche ---------- */
:where(.kt-flaeche) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; cursor: pointer; border-radius: 0; }
.ks-grow { flex: 1; }
.ks-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ks-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 560; white-space: nowrap; transition: background .15s; }
.ks-pri { background: var(--fg); color: var(--on-fg); }
.ks-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
button.ks-pri:hover { background: var(--fg-hover); }
button.ks-ghost:hover { background: var(--surface-2); }
.ks-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.ks-lg { height: 40px; }
.ks-block { display: flex; width: 100%; }
.ks-icb { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; color: var(--ink-soft); }
button.ks-icb:hover { background: var(--hover); }
.ks-in { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--ink); font-size: 13px; line-height: 1.4; }
.ks-in.has-ic > .kt-ic { color: var(--ink-faint); }
.ks-in.has-ic > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-ph { color: var(--ink-faint); }
textarea.ks-in { display: block; resize: none; font-family: inherit; }
textarea.ks-in:not(.kt-ziel):focus, .ks-titel:not(.kt-ziel):focus { outline: none; }
textarea.ks-in:not([readonly]):focus { border-color: var(--line-strong); background: var(--surface); }
.ks-in[readonly], .ks-titel[readonly] { cursor: default; }
.ks-ta { min-height: 54px; align-items: flex-start; }
.ks-fld { display: grid; gap: 6px; min-width: 0; }
.ks-lbl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.ks-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px; min-width: 0; }
.ks-card-k { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.ks-card-k b { font-weight: 650; }
.ks-h1 { font-size: 22px; line-height: 1.15; font-weight: 650; letter-spacing: -.025em; color: var(--fg); }
.ks-gross { font-size: 27px; letter-spacing: -.03em; }
.ks-h2 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; color: var(--fg); }
.ks-sub, .ks-datum { color: var(--ink-faint); font-size: 12.5px; }
.ks-pill { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-soft); background: var(--surface-2); color: var(--ink-soft); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ks-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ks-gruen { color: var(--green); background: color-mix(in srgb, var(--green-dot) 12%, var(--surface)); border-color: color-mix(in srgb, var(--green-dot) 24%, var(--surface)); }
.ks-gruen i { background: var(--green-dot); }
.ks-zahl { display: inline-grid; place-items: center; flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-strong); color: var(--on-accent); font-size: 11px; font-weight: 650; }
.ks-zahl.ks-grau { background: var(--surface-3); color: var(--ink-soft); }
.ks-av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 650; }
.ks-av-g { width: 36px; height: 36px; font-size: 13px; }
.ks-sq { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); }
.ks-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft); flex: none; max-width: 100%; }
.ks-segb { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; min-width: 32px; padding: 0 10px; border-radius: 999px; color: var(--ink-soft); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.ks-segb.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .12); }
.ks-segb em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-faint); }
.ks-zeile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; border-top: 1px solid var(--line-soft); min-width: 0; }
.ks-zeile-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ks-zeile-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.ks-zeile-t > span { color: var(--ink-faint); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-zeile > .kt-ic { color: var(--ink-faint); }
.ks-logo img { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; }
.ks-marke { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ks-marke-n { font-size: 14px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-marke-n b { font-weight: 650; }
.ks-browser { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf7; }
.ks-browser-k { height: 24px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 9px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.ks-browser-k span { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.ks-browser-k em { margin: 0 auto; transform: translateX(-13px); font-style: normal; font-size: 10px; color: var(--ink-faint); }

/* ---------- Beispiel-Website: immer hell, Maße in em, skaliert mit der eigenen Breite ---------- */
.kw { container-type: inline-size; width: 100%; background: #fbfaf7; color: #14211f; text-align: left; }
.kw-in { font-size: clamp(4px, 2.15cqw, 13px); line-height: 1.45; }
.kw-nav { display: flex; align-items: center; gap: 1.1em; padding: 1.3em 4.4em; border-bottom: 1px solid rgba(20, 33, 31, .06); }
.kw-logo { display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: .55em; background: #0f5f5c; color: #ffffff; font-size: .82em; font-weight: 700; }
.kw-nav b { font-size: .85em; font-weight: 700; }
.kw-links { margin-left: auto; display: flex; gap: 1.6em; font-size: .78em; font-weight: 500; }
.kw-cta { padding: .6em 1.15em; border-radius: 99em; background: #0f5f5c; color: #ffffff; font-size: .7em; font-weight: 650; white-space: nowrap; }
.kw-hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 3em; align-items: center; padding: 4.2em 4.4em 5em; background: linear-gradient(180deg, #fbf2e1 0%, #fbfaf7 42%); }
.kw-dach { display: block; font-size: .56em; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: #0f5f5c; }
.kw-h1 { margin: .22em 0 .42em; font-size: 2.55em; line-height: 1.08; font-weight: 700; letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: balance; min-height: 1.08em; }
.kw-t p { margin: 0 0 1.7em; max-width: 34em; font-size: .78em; line-height: 1.6; color: #4b5754; }
.kw-btns { display: flex; flex-wrap: wrap; gap: .6em; }
.kw-b1, .kw-b2 { padding: .72em 1.25em; border-radius: 99em; font-size: .7em; font-weight: 650; white-space: nowrap; }
.kw-b1 { background: #0f5f5c; color: #ffffff; }
.kw-b2 { box-shadow: inset 0 0 0 1px #0f5f5c; color: #0f5f5c; }
.kw-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1em; box-shadow: 0 1.6em 2.8em -1.6em rgba(13, 38, 36, .5); }
.kw-band { padding: 3.6em 4.4em 4em; background: #f0efe9; }
.kw-band > b { font-size: 1.4em; font-weight: 700; letter-spacing: -.025em; }
.kw-karten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; margin-top: 1.5em; }
.kw-karte { display: grid; gap: .55em; padding: 1.1em 1.1em 1.3em; border-radius: .7em; background: #fbfaf7; border: 1px solid rgba(20, 33, 31, .06); }
.kw-nr { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; background: #0f5f5c; color: #ffffff; font-size: .56em; font-weight: 700; }
.kw-karte b { font-size: .8em; font-weight: 700; }
.kw-karte i { height: .42em; border-radius: .2em; background: #dedbd0; }
.kw-karte i:last-child { width: 68%; }
/* Ansicht für das Handy (Vorschau im Gerät): eine Spalte */
.kw-handy .kw-in { font-size: clamp(8px, 3.9cqw, 14px); }
.kw-handy .kw-nav { padding: 1.1em 1.5em; }
.kw-handy .kw-links { display: none; }
.kw-handy .kw-cta { margin-left: auto; }
.kw-handy .kw-hero { grid-template-columns: minmax(0, 1fr); gap: 2em; padding: 2.4em 1.5em 2.8em; }
.kw-handy .kw-h1 { font-size: 2.2em; }
.kw-handy .kw-band { padding: 2.4em 1.5em; }
.kw-handy .kw-karten { grid-template-columns: minmax(0, 1fr); }

/* ---------- Anmelden ---------- */
.ks-login { display: grid; grid-template-columns: minmax(300px, 44%) minmax(0, 1fr); background: var(--surface); }
.ks-login-f { display: flex; flex-direction: column; padding: 22px 40px; min-height: 0; overflow: auto; }
.ks-login-m { width: 100%; max-width: 320px; margin: auto 0; padding: 18px 0; display: grid; gap: 12px; }
.ks-login-m .ks-h1 { font-size: 30px; letter-spacing: -.035em; margin-bottom: 6px; }
.ks-login-m .ks-lbl { color: var(--ink); font-weight: 560; }
.ks-oder { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.ks-oder::before, .ks-oder::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.ks-klein { margin: 4px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-faint); }
.ks-login-b { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 44px 36px 0; background: var(--bg); border-left: 1px solid var(--line-soft); overflow: hidden; }
.ks-dach { font-size: 10.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-faint); }
.ks-login-h { font-size: 21px; font-weight: 650; letter-spacing: -.025em; color: var(--fg); }
.ks-login-b p { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-soft); }
.ks-login-b .ks-browser { flex: 1; border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 18px 40px -24px rgba(var(--shadow-rgb), .3); }

/* ---------- Rahmen der App ---------- */
.ks-app { display: grid; grid-template-columns: 186px minmax(0, 1fr); background: var(--bg); }
.ks-sb { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px 10px 10px; background: var(--bg-2); border-right: 1px solid var(--line-soft); }
.ks-sb > .ks-marke { padding: 0 6px 2px; }
.ks-firma { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); font-size: 12.5px; }
.ks-firma b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-navs, .ks-sb-u { display: grid; gap: 2px; }
.ks-sb-u { margin-top: auto; }
.ks-nav { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 9px; border-radius: 8px; color: var(--ink-soft); font-size: 13px; transition: background .15s; }
.ks-nav > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-nav.on { background: var(--surface-2); color: var(--fg); font-weight: 560; }
button.ks-nav:hover { background: var(--surface-2); }
.ks-ich { display: flex; align-items: center; gap: 8px; padding: 10px 4px 0; border-top: 1px solid var(--line-soft); color: var(--ink-faint); }
.ks-ich-t { flex: 1; min-width: 0; display: grid; font-size: 12.5px; }
.ks-ich-t b { font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-ich-t span { font-size: 11.5px; }
.ks-main { min-width: 0; min-height: 0; }
.ks-page { max-width: 880px; margin: 0 auto; padding: 26px 28px 30px; display: grid; gap: 14px; align-content: start; }
.ks-page-breit { max-width: none; }
.ks-page-k { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ks-tabs { display: none; }

/* Startseite */
.ks-site { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; padding: 12px; }
.ks-site > .ks-browser { align-self: start; }
.ks-site > .ks-browser .kw { aspect-ratio: 16 / 10.4; overflow: hidden; }
.ks-site-t { display: flex; flex-direction: column; min-width: 0; padding: 8px 8px 6px 0; }
.ks-site-k { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.ks-fakt { display: grid; grid-template-columns: 16px 76px minmax(0, 1fr); align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-faint); }
.ks-fakt b { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-site-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 16px; }
.ks-ansteht { padding: 14px 16px 6px; }
.ks-ansteht .ks-card-k { margin-bottom: 6px; }

/* Editor: Arbeitsweise „Inhalt“ */
.ks-ed { position: relative; display: flex; flex-direction: column; background: var(--bg); }
.ks-ed-top { height: 46px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }
.ks-krume { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; white-space: nowrap; }
.ks-krume b { font-weight: 650; color: var(--fg); }
.ks-krume i, .ks-krume span { font-style: normal; color: var(--ink-faint); }
.ks-saved { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.ks-saved i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-dot); transition: background .2s; }
.ks-saved.is-laeuft i { background: var(--orange-dot); }
.ks-undo { display: flex; align-items: center; gap: 5px; margin: 0 4px; font-size: 12.5px; color: var(--ink-faint); opacity: .75; white-space: nowrap; }
.ks-auge { display: none; }
.ks-pub .ks-s { display: none; }
.ks-ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 150px minmax(270px, 38%) minmax(0, 1fr); }
.ks-ed-seiten { display: grid; gap: 2px; align-content: start; padding: 8px 8px 12px; background: var(--bg-2); border-right: 1px solid var(--line-soft); min-height: 0; overflow: hidden; }
.ks-kopf { padding: 10px 9px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.ks-ed-felder { display: grid; gap: 12px; align-content: start; min-height: 0; padding: 18px 14px 28px; }
.ks-seitenwahl { display: none; }
.ks-ed-h { font-size: 19px; padding: 0 2px; }
.ks-absch { display: grid; gap: 14px; padding: 12px 14px 16px; }
.ks-absch.zu { padding: 10px 14px; }
.ks-absch-k { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-faint); }
.ks-absch-k b { flex: 1; font-weight: 650; color: var(--fg); }
.ks-absch:not(.zu) > .ks-absch-k { margin: 0 -14px; padding: 0 14px 12px; border-bottom: 1px solid var(--line-soft); }
.ks-rich { border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); overflow: hidden; }
.ks-rich-k { display: flex; gap: 14px; padding: 8px 11px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.ks-rich p { margin: 0; padding: 8px 10px 10px; }
.ks-bild { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px 12px; align-items: start; }
.ks-bild-v { width: 76px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-soft); }
.ks-bild-t { display: grid; gap: 8px; min-width: 0; }
.ks-bild-a { display: flex; align-items: center; gap: 2px; }
.ks-datei { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-faint); }
.ks-alt { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.ks-alt .ks-in { display: block; min-height: 32px; padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-ed-prev { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-left: 1px solid var(--line-soft); }
.ks-prev-k { height: 44px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-faint); }
.ks-prev-k b { font-weight: 650; color: var(--fg); }
.ks-prev-f { flex: 1; min-height: 0; background: #fbfaf7; }
.ks-prev-f.is-handy { display: grid; justify-items: center; align-content: start; padding: 20px 0 24px; background: var(--surface-2); }
.ks-prev-f.is-handy .ks-geraet { width: 244px; overflow: hidden; border: 6px solid #14181f; border-radius: 28px; background: #fbfaf7; box-shadow: 0 22px 40px -24px rgba(var(--shadow-rgb), .5); animation: ks-neu .26s var(--ease) both; }

/* Dialoge und Meldung */
.ks-veil { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: var(--veil); animation: ks-ein .16s ease-out both; }
.ks-veil:has(> .ks-still) { animation: none; }
.ks-dlg { display: grid; gap: 10px; width: min(100%, 384px); max-height: 100%; overflow: auto; padding: 18px; border-radius: 18px; background: var(--modal); border: 1px solid var(--line-soft); box-shadow: 0 28px 60px -20px rgba(var(--shadow-rgb), .45); animation: ks-auf .22s var(--ease) both; }
.ks-dlg.ks-still { animation: none; }
.ks-dlg-k { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; }
.ks-dlg-k b { font-weight: 650; letter-spacing: -.02em; color: var(--fg); }
.ks-dlg p { margin: 0; color: var(--ink-soft); }
.ks-dlg-l { list-style: none; margin: 0; padding: 0; }
.ks-dlg-l li { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 9px; background: var(--surface-2); font-weight: 560; }
.ks-dlg-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ks-dlg-gross { width: min(100%, 680px); gap: 12px; }
.ks-med-s { display: flex; gap: 8px; }
.ks-med { display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 16px; }
.ks-med-r { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.ks-thumb { display: grid; gap: 6px; width: 100%; padding: 6px 6px 7px; border-radius: 11px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px transparent; color: var(--ink-soft); font-size: 11.5px; transition: box-shadow .15s, background .15s; }
/* Die vier Bilder passen immer ganz in die Fläche (cqh: Höhe der Fläche .kt-sicht) */
.ks-thumb img { width: 100%; aspect-ratio: 16 / 10; max-height: max(52px, calc((100cqh - 240px) / 2)); object-fit: cover; border-radius: 6px; }
.ks-thumb span { padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-thumb.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-strong); color: var(--fg); }
button.ks-thumb:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ks-thumb.kt-ziel { outline-offset: 1px; outline-width: 1.5px; outline-color: color-mix(in srgb, var(--kt-akz) 60%, transparent); }
.ks-med-d { display: grid; gap: 8px; align-content: start; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line-soft); font-size: 12.5px; }
.ks-med-d img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; }
.ks-med-d b { font-weight: 600; color: var(--fg); }
.ks-med-alt { color: var(--ink-faint); }
.ks-med-d .ks-btn { justify-self: start; margin-top: 4px; }
.ks-med-leer { height: 100%; min-height: 120px; display: grid; gap: 6px; justify-items: center; align-content: center; color: var(--ink-faint); }
.ks-toast { position: absolute; left: 50%; bottom: 18px; z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; max-width: calc(100% - 24px); padding: 8px 16px 8px 9px; border-radius: 999px; background: var(--fg); color: var(--on-fg); font-size: 12.5px; white-space: nowrap; box-shadow: 0 16px 34px -14px rgba(var(--shadow-rgb), .5); animation: ks-toast .28s var(--ease) both; }
.ks-toast.ks-still { animation: none; }
.ks-toast b { font-weight: 650; margin-right: 4px; }
.ks-toast-i { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--green-dot); color: #ffffff; }
.ks-toast-i svg { stroke-width: 3; }

/* Inhalte und Beitrag */
.ks-liste { padding: 10px 14px 4px; }
.ks-liste-k { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 10px; }
.ks-such { width: 168px; min-height: 32px; padding: 5px 10px; }
.ks-post-k { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.ks-post { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 14px; align-items: start; }
.ks-post-t { display: grid; gap: 14px; padding: 24px 26px 64px; }
.ks-titel { width: calc(100% + 12px); margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: 700 27px/1.2 var(--font); letter-spacing: -.03em; }
.ks-titel::placeholder { color: var(--ink-faint); opacity: 1; }
.ks-post-w { display: flex; align-items: center; gap: 13px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); overflow: hidden; }
.ks-post-w i { flex: none; width: 1px; height: 16px; background: var(--line); }
.ks-post-art { display: flex; align-items: center; gap: 22px; font-size: 12.5px; font-weight: 560; color: var(--fg); }
.ks-post-x { margin: 0; font-size: 14px; }
.ks-post-s { display: grid; gap: 12px; }
.ks-drop { display: grid; gap: 5px; justify-items: center; align-content: center; height: 88px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-faint); font-size: 12.5px; }

/* Postfach */
.ks-pf { display: grid; grid-template-columns: minmax(220px, 38%) minmax(0, 1fr); min-height: 340px; padding: 0; overflow: hidden; }
.ks-pf-l { display: grid; gap: 4px; align-content: start; padding: 12px; border-right: 1px solid var(--line-soft); min-width: 0; }
.ks-pf-l > .ks-seg { justify-self: start; margin-bottom: 6px; overflow: hidden; }
.ks-pf-z { align-items: flex-start; padding: 10px 8px; border-top: 0; border-radius: 10px; transition: background .15s; }
.ks-pf-z.on { background: var(--surface-2); }
button.ks-pf-z:hover { background: var(--surface-2); }
.ks-pf-z b em { margin-left: 8px; font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--ink-faint); }
.ks-pf-z .ks-zeile-t > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; }
.ks-punkt { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent-strong); }
.ks-uhr { flex: none; margin-top: 3px; color: var(--ink-faint); }
.ks-pf-d { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 14px 16px 16px; }
.ks-pf-leer { place-items: center; align-content: center; color: var(--ink-faint); }
.ks-pf-k { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ks-pf-zurueck { display: none; }
.ks-msg { display: grid; gap: 9px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.ks-msg dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; font-size: 12.5px; }
.ks-msg dt { color: var(--ink-faint); }
.ks-msg dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.ks-msg p { margin: 0; }
.ks-antwort { display: grid; gap: 6px; padding: 6px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.ks-antwort > .ks-in { min-height: 46px; padding: 6px; border: 0; background: none; }
.ks-antwort-a { display: flex; align-items: center; gap: 8px; }

/* Abschluss: Häkchen zeichnet sich, Konfetti fliegt einmal, dann die nächste Handlung */
.ks-ende { display: grid; justify-items: center; align-content: center; gap: 10px; padding: 28px 24px; overflow: auto; background: var(--surface); text-align: center; }
.ks-ende-m { position: relative; display: grid; place-items: center; margin-bottom: 6px; }
.kt-haken { width: 72px; height: 72px; fill: none; stroke: var(--green-dot); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: kt-pop .55s var(--feder) .5s both; }
.kt-haken circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: kt-strich .55s ease-out .05s forwards; }
.kt-haken path { stroke-width: 4; stroke-dasharray: 40; stroke-dashoffset: 40; animation: kt-strich .3s ease-out .5s forwards; }
.kt-feier { position: absolute; inset: 0; pointer-events: none; }
.kt-feier i { position: absolute; left: calc(50% - 4px); top: calc(50% - 6px); width: 8px; height: 12px; border-radius: 2px; background: var(--kt-akz); opacity: 0; animation: kt-konfetti 1.15s cubic-bezier(.15, .8, .3, 1) calc(.55s + var(--dz, 0ms)) both; }
.kt-feier i:nth-child(3n + 1) { background: var(--green-dot); }
.kt-feier i:nth-child(3n + 2) { background: var(--kt-akz-2); }
.kt-feier i:nth-child(4n) { width: 8px; height: 8px; border-radius: 50%; }
.kt-feier i:nth-child(5n) { background: var(--orange-dot); }
.ks-ende-h { font-size: 40px; line-height: 1.05; font-weight: 700; letter-spacing: -.04em; color: var(--fg); }
.ks-ende-x { margin: 0; max-width: 40ch; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: balance; }
.ks-ende-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.ks-ende-f { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; margin-top: 14px; padding: 10px 18px; border-radius: 14px; background: var(--surface-2); font-size: 14px; color: var(--ink-soft); }
.ks-ende-f span { font-weight: 560; color: var(--fg); }
.ks-ende-f a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Mittlere Breite der Fläche: weniger Spalten ---------- */
@container ks (max-width: 880px) {
  .ks-ed-body { grid-template-columns: minmax(240px, 42%) minmax(0, 1fr); }
  .ks-ed-seiten, .ks-nur-breit { display: none; }
  .ks-undo span, .ks-bild-a .ks-icb:last-child { display: none; }
  .ks-post { grid-template-columns: minmax(0, 1fr) 190px; }
  .ks-pf-l .ks-segb:nth-child(4) { display: none; }
  .ks-pf { grid-template-columns: minmax(200px, 36%) minmax(0, 1fr); }
  .ks-page { padding: 22px 20px 26px; }
}
@container ks (max-width: 760px) {
  .ks-app { grid-template-columns: 164px minmax(0, 1fr); }
  .ks-login-f { padding: 20px 28px; }
  .ks-login-b { padding: 36px 24px 0; }
  .ks-med { grid-template-columns: minmax(0, 1fr) 168px; }
  .ks-antwort-a .ks-seg { display: none; }
}

/* ---------- Schmale Fläche: die Oberfläche wie am Handy ---------- */
@container ks (max-width: 640px) {
  .ks-login { grid-template-columns: minmax(0, 1fr); }
  .ks-login-b { display: none; }
  .ks-login-f { padding: 18px 22px; }
  .ks-login-m { max-width: none; margin: 0; padding: 22px 0 8px; }
  .ks-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ks-sb { display: none; }
  .ks-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px 6px 7px; background: var(--bg-2); border-top: 1px solid var(--line); }
  .ks-tab { position: relative; display: grid; justify-items: center; gap: 3px; width: 100%; padding: 5px 0 4px; border-radius: 10px; color: var(--ink-soft); font-size: 10.5px; font-weight: 500; }
  .ks-tab.on { color: var(--fg); font-weight: 650; }
  .ks-tab .ks-zahl { position: absolute; top: 0; left: calc(50% + 4px); min-width: 16px; height: 16px; font-size: 10px; }
  .ks-page { padding: 18px 14px 22px; gap: 12px; }
  .ks-gross { font-size: 24px; }
  .ks-site { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ks-site-t { padding: 2px 6px 6px; }
  .ks-site-a .ks-btn { flex: 1; }
  .ks-ed-top { gap: 6px; padding: 0 8px; }
  .ks-ed-top .ks-logo, .ks-krume, .ks-saved span { display: none; }
  .ks-auge { display: inline-grid; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
  .ks-auge.on { background: var(--surface-3); color: var(--fg); }
  .ks-pub .ks-l { display: none; }
  .ks-pub .ks-s { display: inline; }
  .ks-pub { height: 34px; padding: 0 14px; }
  .ks-ed-body { grid-template-columns: minmax(0, 1fr); }
  .ks-ed-prev { display: none; border-left: 0; }
  .ks-ed.is-vorschau .ks-ed-felder { display: none; }
  .ks-ed.is-vorschau .ks-ed-prev { display: flex; }
  .ks-prev-k { display: none; }
  .ks-prev-f.is-handy { display: block; justify-items: normal; padding: 0; background: #fbfaf7; }
  .ks-prev-f.is-handy .ks-geraet { width: auto; border: 0; border-radius: 0; box-shadow: none; }
  .ks-ed-felder { padding: 12px 12px 24px; }
  .ks-seitenwahl { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 14px; color: var(--ink-soft); }
  .ks-seitenwahl b { flex: 1; font-weight: 600; color: var(--fg); }
  .ks-ed-h { display: none; }
  .ks-in { min-height: 40px; font-size: 14px; }
  .ks-dlg-gross { padding: 14px; }
  .ks-med { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ks-med-d { display: flex; align-items: center; gap: 10px; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .ks-med-d img { width: 56px; flex: none; }
  .ks-thumb img { max-height: max(48px, calc((100cqh - 312px) / 2)); }
  .ks-med-d b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .ks-med-alt { display: none; }
  .ks-med-d .ks-btn { margin: 0; }
  .ks-med-leer { flex: 1; height: auto; min-height: 42px; display: flex; justify-content: center; }
  .ks-toast { top: 58px; bottom: auto; }
  .ks-such { display: none; }
  .ks-seg-t { overflow: hidden; }
  .ks-page-k { align-items: center; }
  .ks-post { grid-template-columns: minmax(0, 1fr); }
  .ks-post-t { padding: 18px 16px 30px; }
  .ks-titel { font-size: 23px; }
  .ks-pf { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ks-pf-l { border-right: 0; }
  .ks-pf.is-offen .ks-pf-l, .ks-pf:not(.is-offen) .ks-pf-d { display: none; }
  .ks-pf-zurueck { display: inline-grid; margin-left: -6px; }
  .ks-pf-d { padding: 12px; }
  .ks-ende-h { font-size: 29px; }
  .ks-ende { padding: 22px 18px; }
}

/* ---------- Schmalere Übung: Schritte als Punkte ohne Namen, Liste zum Nachlesen einspaltig ---------- */
@container kt (max-width: 1040px) {
  .kt-kap { display: flex; }
  .kt-kap li { flex: 1 1 0; }
  .kt-kap li:last-child { flex: 0 0 auto; }
  .kt-kap-b { padding: 0; }
  .kt-kap-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kt-kap-l { left: 32px; right: 6px; }
}
@container kt (max-width: 700px) {
  .kt-chrom { display: none; }
  .kt-in { border-radius: 20px; }
  .kt-coach { padding: 14px 16px; gap: 12px; }
  .kt-boden { padding: 8px 8px 10px; }
  .kt-screen { border-radius: 12px; }
  .kt-kap-n { width: 24px; height: 24px; }
  .kt-kap-l { left: 28px; right: 4px; top: 11px; }
  .kt-co { grid-template-columns: minmax(0, 1fr); }
  .kt-co-b { min-height: 70px; align-content: start; }
  .kt-co-x { font-size: 18px; }
  .kt-co-tipp { font-size: 14px; }
  .kt-co-a .kt-btn:last-child { flex: 1; }
  .kt-einbetten .kt-coach { padding: 12px 14px; }
  .kt-einbetten .kt-boden { padding: 8px; }
}
@media (max-width: 900px) {
  .kt-nl-l { grid-auto-rows: auto; }
  .kt-nl-k { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 8px; padding: 14px 20px 16px; }
  .kt-nl-n { grid-area: 1 / 1; }
  .kt-nl-k h3 { grid-area: 1 / 2; }
  .kt-nl-a { grid-area: 1 / 3; }
  .kt-nl-p { grid-area: 2 / 2 / 3 / -1; grid-template-columns: minmax(0, 1fr); }
  .kt-kopf { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .kt-nl-f { padding: 14px 20px; }
}
@media (max-width: 700px) {
  :root { --kt-h: clamp(440px, calc(100svh - 252px), 600px); }
  .kt-einbetten { --kt-h: 500px; }
  .kt-top-in { padding: 0 16px; height: 52px; }
  .kt-top-z { display: none; }
  .kt-main { padding: 0 12px 56px; }
  .kt-kopf { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 22px 4px 18px; }
  .kt-lede { font-size: 16px; }
  .kt-fakten li { height: 30px; padding: 0 11px 0 9px; font-size: 13px; }
  .kt-nl { margin-top: 48px; }
  .kt-nl h2 { padding: 0 4px; }
  .kt-nl-k { padding: 14px 14px 16px; column-gap: 12px; }
  .kt-nl-f { padding: 14px; }
  .kt-fuss-in { padding: 18px 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .kt-haken circle, .kt-haken path { stroke-dashoffset: 0; }
  .kt-feier, .kt-treffer { display: none; }
}
