/* Examwerk – Design-Tokens & Komponenten
   Leitlinien: Aurora-Hintergrund, Glas nur auf der Bedienebene (Kopf-/Tab-Leiste, Sheets),
   ruhige Inhaltsflächen, 44px-Touchziele, WCAG-AA-Kontraste, Hell/Dunkel, reduzierte Bewegung. */

:root {
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #08080a;
  --text: #f4f4f5;          /* 18:1 auf #08080a */
  --text-2: #b4b4bc;        /* 9.5:1 */
  --text-3: #8b8b95;        /* 5.6:1 auf Kartenfläche */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --surface: #111113;
  --surface-solid: #111113;
  --surface-2: #18181b;
  --surface-3: #1f1f23;
  --accent: #f6bf96;        /* Pfirsich – 11:1 auf Dunkel */
  --accent-2: #f3dd8f;      /* Gold */
  --accent-3: #f5a3a3;      /* Rosé */
  --grad: linear-gradient(92deg, #f5a3a3 0%, #f6bf96 45%, #f3dd8f 100%);
  --accent-soft: rgba(246, 191, 150, .12);
  --on-accent: #1c130d;
  --signal: #fbbf24;
  --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .13);
  --warn: #facc15; --warn-bg: rgba(250, 204, 21, .12);
  --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .14);
  --info: #f6c9a8; --info-bg: rgba(246, 191, 150, .11);
  --neutral-bg: rgba(255, 255, 255, .07);

  --glass: rgba(16, 16, 18, .74);
  --glass-edge: rgba(255, 255, 255, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -22px rgba(0, 0, 0, .9);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .5), 0 26px 50px -24px rgba(246, 191, 150, .22);
  --glow: 0 0 46px rgba(246, 191, 150, .22);

  --r-sm: 12px; --r: 18px; --r-lg: 26px;
  /* ruhiger, warmer Schein auf fast schwarzem Grund */
  --blob-1: #3a2418; --blob-2: #2b2113; --blob-3: #0b0b0d; --blob-4: #33201c;
  --blob-opacity: .55;
  --dots-opacity: .025;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

:root { --blocks-bg: #0c0c0e; --primary-bg: #ffffff; --primary-fg: #0b0b0d; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5f2;
  --text: #18181b;
  --text-2: #4b4b55;
  --text-3: #66666f;
  --line: rgba(24, 24, 27, .09);
  --line-strong: rgba(24, 24, 27, .17);
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f5f3ef;
  --surface-3: #ece9e4;
  --accent: #b4532a;
  --accent-2: #a16207;
  --accent-3: #be4b5c;
  --grad: linear-gradient(92deg, #d24d63 0%, #d9733c 45%, #c1901a 100%);
  --accent-soft: rgba(217, 115, 60, .11);
  --on-accent: #ffffff;
  --ok: #15803d;   --ok-bg: #dcfce7;
  --warn: #a16207; --warn-bg: #fef3c7;
  --bad: #b91c1c;  --bad-bg: #fee2e2;
  --info: #9a4a22; --info-bg: #fbeee4;
  --neutral-bg: rgba(24, 24, 27, .06);
  --glass: rgba(255, 255, 255, .74);
  --glass-edge: rgba(255, 255, 255, .85);
  --shadow: 0 1px 2px rgba(24, 24, 27, .05), 0 14px 34px -18px rgba(120, 60, 20, .22);
  --shadow-lift: 0 2px 4px rgba(24, 24, 27, .06), 0 24px 46px -20px rgba(180, 83, 42, .30);
  --glow: 0 0 40px rgba(217, 115, 60, .18);
  --blob-1: #fde2cf; --blob-2: #fdf0d5; --blob-3: #f7f5f2; --blob-4: #fbd9d9;
  --blob-opacity: .65;
  --dots-opacity: .035;
  --blocks-bg: #faf9f7;
  --primary-bg: #18181b; --primary-fg: #ffffff;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --bg: #f7f5f2;
    --text: #18181b;
    --text-2: #4b4b55;
    --text-3: #66666f;
    --line: rgba(24, 24, 27, .09);
    --line-strong: rgba(24, 24, 27, .17);
    --surface: #ffffff;
    --surface-solid: #ffffff;
    --surface-2: #f5f3ef;
    --surface-3: #ece9e4;
    --accent: #b4532a;
    --accent-2: #a16207;
    --accent-3: #be4b5c;
    --grad: linear-gradient(92deg, #d24d63 0%, #d9733c 45%, #c1901a 100%);
    --accent-soft: rgba(217, 115, 60, .11);
    --on-accent: #ffffff;
    --ok: #15803d;   --ok-bg: #dcfce7;
    --warn: #a16207; --warn-bg: #fef3c7;
    --bad: #b91c1c;  --bad-bg: #fee2e2;
    --info: #9a4a22; --info-bg: #fbeee4;
    --neutral-bg: rgba(24, 24, 27, .06);
    --glass: rgba(255, 255, 255, .74);
    --glass-edge: rgba(255, 255, 255, .85);
    --shadow: 0 1px 2px rgba(24, 24, 27, .05), 0 14px 34px -18px rgba(120, 60, 20, .22);
    --shadow-lift: 0 2px 4px rgba(24, 24, 27, .06), 0 24px 46px -20px rgba(180, 83, 42, .30);
    --glow: 0 0 40px rgba(217, 115, 60, .18);
    --blob-1: #fde2cf; --blob-2: #fdf0d5; --blob-3: #f7f5f2; --blob-4: #fbd9d9;
    --blob-opacity: .65;
    --dots-opacity: .035;
    --blocks-bg: #faf9f7;
    --primary-bg: #18181b; --primary-fg: #ffffff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
body.student { font-size: 17px; }
a { color: var(--accent); }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
/* Grundgröße für alle Symbole – spezifischere Regeln weiter unten überschreiben sie */
svg[viewBox="0 0 24 24"] { width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Aurora-Hintergrund ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora::after { /* feines Punktraster für Tiefe */
  content: ""; position: absolute; inset: 0; opacity: var(--dots-opacity);
  background-image: radial-gradient(currentColor 1px, transparent 1px); background-size: 22px 22px; color: var(--text);
}
.aurora i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(110px);
  opacity: var(--blob-opacity); will-change: transform; animation: drift 34s var(--ease) infinite alternate;
}
.aurora i:nth-child(1) { background: var(--blob-1); top: -22vmax; left: -14vmax; }
.aurora i:nth-child(2) { background: var(--blob-2); top: 18vh; right: -24vmax; animation-duration: 40s; animation-delay: -8s; }
.aurora i:nth-child(3) { background: var(--blob-3); bottom: -34vmax; left: 18vw; animation-duration: 28s; animation-delay: -14s; }
.aurora i:nth-child(4) { background: var(--blob-4); bottom: -10vmax; right: 30vw; width: 36vmax; height: 36vmax; opacity: calc(var(--blob-opacity) * .6); animation-duration: 36s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.95); }
}

/* ---------- Glas (nur Bedienebene) ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow);
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .aurora { display: none; }
}

/* ---------- Kopfleiste ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-left)); min-height: 60px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6366f1, #06b6d4); box-shadow: 0 4px 14px -4px rgba(79,70,229,.6); }
.brand-mark svg { width: 18px; height: 18px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 15px; transition: background .2s var(--ease), color .2s; }
.nav a:hover { background: var(--accent-soft); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; }
.topbar .spacer { flex: 1; }
.user-pill { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }

/* Tab-Leiste unten auf schmalen Bildschirmen */
.tabbar { display: none; }
@media (max-width: 760px) {
  .topbar .nav { display: none; }
  .user-pill .who { display: none; }
  .tabbar {
    display: flex; position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
    border-radius: 24px; padding: 6px; justify-content: space-around;
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 50px; justify-content: center; border-radius: 18px; text-decoration: none; color: var(--text-2); font-size: 12px; font-weight: 600; }
  .tabbar a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .tabbar svg { width: 22px; height: 22px; }
  main.page { padding-bottom: 110px; }
}

/* ---------- Layout ---------- */
main.page { max-width: 1180px; margin: 0 auto; padding: 28px 20px 64px; }
main.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
h1.gradient { background: linear-gradient(120deg, var(--text) 10%, var(--accent) 60%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 22px; font-weight: 750; }
h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--text-3); }
p { margin: 0 0 12px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- Inhaltsflächen ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow);
}
.card.pad-lg { padding: 28px; }
.card.tight { padding: 14px 16px; }
.card h2 + p, .card h3 + p { margin-top: 6px; }
a.card, button.card { display: block; text-align: left; text-decoration: none; color: inherit; cursor: pointer; width: 100%; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
a.card:hover, button.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
a.card:active, button.card:active { transform: scale(.985); }
.card.highlight { box-shadow: var(--shadow), var(--glow); }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* Einblenden beim Laden */
.reveal > * { animation: rise .45s var(--ease) both; }
.reveal > *:nth-child(2) { animation-delay: 50ms; }
.reveal > *:nth-child(3) { animation-delay: 100ms; }
.reveal > *:nth-child(4) { animation-delay: 150ms; }
.reveal > *:nth-child(5) { animation-delay: 200ms; }
.reveal > *:nth-child(n+6) { animation-delay: 250ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface-solid); --b-fg: var(--text); --b-line: var(--line-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--b-line);
  background: var(--b-bg); color: var(--b-fg); font-weight: 650; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s; white-space: nowrap; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary {
  --b-fg: #fff; border-color: transparent;
  background: linear-gradient(135deg, #4f46e5, #0e7490); box-shadow: 0 6px 20px -6px rgba(79, 70, 229, .6);
}
.btn.primary::after { /* Lichtlauf */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
}
.btn.primary:hover::after { transform: translateX(120%); transition: transform .7s var(--ease); }
.btn.primary:hover { box-shadow: 0 10px 28px -8px rgba(79, 70, 229, .7), var(--glow); }
.btn.ghost { --b-bg: transparent; --b-line: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--text); box-shadow: none; }
.btn.danger { --b-fg: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.icon { width: 44px; padding: 0; }
.btn.large { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn.block { width: 100%; }

/* ---------- Formulare ---------- */
label.field { display: block; }
.field > span { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.field > small { display: block; color: var(--text-3); font-size: 13px; margin-top: 6px; }
input[type="text"], input[type="number"], input[type="search"], input:not([type]), textarea, select {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-solid); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 14px; min-height: 260px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.code-input { font-family: var(--mono); font-size: 26px !important; letter-spacing: .25em; text-align: center; text-transform: uppercase; }

.dropzone {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 18px; min-height: 130px;
  border: 2px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone > svg { width: 30px; height: 30px; color: var(--accent); }
.dropzone .file-name { font-weight: 650; color: var(--text); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; user-select: none; }
.switch input { appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--neutral-bg); position: relative; transition: background .25s var(--ease); cursor: pointer; flex: none; border: 1px solid var(--line); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s var(--spring); }
.switch input:checked { background: #22c55e; }
.switch input:checked::after { transform: translateX(20px); }

.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--neutral-bg); gap: 2px; flex-wrap: wrap; }
.segmented button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font-weight: 650; font-size: 14px; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.segmented button[aria-selected="true"] { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ---------- Chips & Status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--neutral-bg); color: var(--text-2); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.plain::before { display: none; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.busy::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--accent-soft); }
td .name { font-weight: 650; }

/* ---------- Kennzahlen ---------- */
.stat { padding: 16px 18px; }
.stat .value { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .label { font-size: 13px; color: var(--text-2); font-weight: 600; }

/* Verständnis-Ring (Signatur des Protokolls) */
.ring { --p: 0; --c: var(--accent); width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--neutral-bg) 0); box-shadow: 0 0 40px -6px color-mix(in srgb, var(--c) 45%, transparent); }
.ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface-solid); }
.ring > div { position: relative; text-align: center; }
.ring .value { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ring .label { font-size: 12px; color: var(--text-2); font-weight: 650; margin-top: 2px; }

/* ---------- Scratch-Blöcke ---------- */
.blocks-view { overflow-x: auto; padding: 12px; border-radius: var(--r); background: var(--blocks-bg); border: 1px solid var(--line); }
.blocks-view { background: var(--blocks-bg); }
.blocks-view svg { max-width: none; display: block; }
.blocks-view .sb-src { margin: 0; font-family: var(--mono); font-size: 13px; white-space: pre; color: var(--text-2); }
.sprite-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 14px 0 8px; }
.scripts { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.scripts > .blocks-view { flex: 0 1 auto; max-width: 100%; }

/* ---------- Fragen ---------- */
.q-card { padding: 22px; }
.q-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.q-num { font-size: 13px; font-weight: 750; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.q-prompt { font-size: 19px; font-weight: 650; line-height: 1.4; margin: 4px 0 14px; letter-spacing: -.01em; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 14px; min-height: 56px; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line-strong); background: var(--surface-solid); cursor: pointer; text-align: left; width: 100%;
  transition: border-color .2s, background .2s, transform .15s var(--ease);
}
.option:hover { border-color: var(--accent); }
.option:active { transform: scale(.99); }
.option .key { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 750; font-size: 14px; background: var(--neutral-bg); color: var(--text-2); transition: background .2s, color .2s; }
.option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.option[aria-checked="true"] .key { background: var(--accent); color: var(--on-accent); }
.option.correct { border-color: var(--ok); background: var(--ok-bg); }
.option.correct .key { background: var(--ok); color: #fff; }
.option.wrong { border-color: var(--bad); background: var(--bad-bg); }
.option.wrong .key { background: var(--bad); color: #fff; }
.option.static { cursor: default; }
.option.static:hover { border-color: var(--line-strong); }
.option.static.correct:hover { border-color: var(--ok); }
.option.static.wrong:hover { border-color: var(--bad); }

.answer-box { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; }

/* Fortschritt */
.progress { height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); position: relative; transition: width .4s var(--ease); }
.progress > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 2s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots button { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface-solid); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--text-2); }
.dots button.answered { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.dots button[aria-current="step"] { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }

.timer { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 700; font-size: 18px; padding: 8px 16px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.timer svg { width: 18px; height: 18px; }
.timer.low { color: var(--bad); animation: glowpulse 1s ease-in-out infinite; }
@keyframes glowpulse { 50% { box-shadow: 0 0 0 4px var(--bad-bg); } }

/* ---------- Sheet / Dialog ---------- */
dialog.sheet {
  border: 0; padding: 0; border-radius: 26px; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 40px);
  color: var(--text); background: var(--glass); overflow: auto;
}
dialog.sheet.wide { width: min(920px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(6, 9, 20, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: sheetin .32s var(--spring); }
@keyframes sheetin { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px 12px; }
.sheet-body { padding: 4px 22px 22px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; flex-wrap: wrap; }

/* Toasts */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: max(24px, env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 16px; font-weight: 600; font-size: 15px; animation: rise .3s var(--spring); display: flex; gap: 10px; align-items: center; }
.toast svg { width: 20px; height: 20px; flex: none; }
.chip svg { width: 14px; height: 14px; }
.toast.bad { color: var(--bad); }
.toast.ok { color: var(--ok); }
@media (max-width: 760px) { .toasts { bottom: 100px; } }

/* Leere Zustände */
.empty { text-align: center; padding: 48px 20px; }
.empty > svg { width: 54px; height: 54px; color: var(--accent); margin-bottom: 10px; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.center-screen { min-height: calc(100dvh - 60px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(460px, 100%); text-align: center; }
.auth-card .brand-mark { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 18px; }
.auth-card .brand-mark svg { width: 34px; height: 34px; }

.big-code { font-family: var(--mono); font-size: clamp(34px, 9vw, 52px); font-weight: 800; letter-spacing: .14em; text-align: center; padding: 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); }
.qr-box { background: #fff; border-radius: var(--r); padding: 14px; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: auto; max-width: 420px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 600; }

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.bullets { margin: 6px 0 0; padding-left: 20px; }
ul.bullets li + li { margin-top: 4px; }

.callout { padding: 14px 16px; border-radius: 14px; background: var(--info-bg); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); }
.callout.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

.copy-line { display: flex; gap: 8px; align-items: center; }
.copy-line input { font-family: var(--mono); font-size: 14px; }

/* Konfetti / Erfolg */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.burst i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.6s var(--ease) forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .aurora i { animation: none; }
}

/* ---------- Druck (Protokoll, QR-Karten) ---------- */
@media print {
  :root { --surface: #fff; --surface-2: #f6f7f9; --text: #000; --text-2: #333; --text-3: #555; }
  body { background: #fff; font-size: 12pt; }
  .aurora, .topbar, .tabbar, .no-print, .toasts { display: none !important; }
  main.page { padding: 0; max-width: none; }
  .card, .table-wrap { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .q-card { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .ring { box-shadow: none; }
  .ring::before { background: #fff; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }

.qr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.qr-card { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 14px; text-align: center; background: var(--surface-solid); break-inside: avoid; }
.qr-card svg { width: 150px; height: 150px; }
.qr-card .code { font-family: var(--mono); font-weight: 800; font-size: 20px; letter-spacing: .12em; }
@media print { .qr-cards { grid-template-columns: repeat(3, 1fr); } .qr-card { border-color: #999; } }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 640px) {
  main.page { padding: 18px 14px 110px; }
  .page-head .segmented { width: 100%; flex-wrap: nowrap; }
  .page-head .segmented button { flex: 1; padding: 0 8px; }
  .grid.stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .value { font-size: 22px; }
  .stat .label { font-size: 12px; line-height: 1.25; }
  .hide-sm { display: none; }
  th, td { padding: 10px 12px; }
  .card { padding: 16px; }
  .card.pad-lg { padding: 20px; }
  .q-prompt { font-size: 18px; }
  .ring { width: 108px; height: 108px; }
  .ring .value { font-size: 28px; }
}
[hidden] { display: none !important; }

/* ---------- Reihenfolge-Puzzle ---------- */
.parsons { display: grid; gap: 10px; }
.parsons-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface-solid); cursor: grab; transition: box-shadow .2s, transform .15s var(--ease); }
.parsons-item:hover { box-shadow: var(--shadow); }
.parsons-item.dragging { opacity: .5; transform: scale(.98); }
.parsons-pos { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 750; font-size: 14px; background: var(--accent-soft); color: var(--accent); }
.parsons-code { flex: 1; min-width: 0; }
.parsons-code .blocks-view { padding: 6px; background: transparent; border: 0; }
.parsons-btns { display: flex; flex-direction: column; gap: 6px; }
.btn.icon.small { width: 40px; min-height: 40px; }

/* ---------- Klassenübersicht ---------- */
.heat { font-variant-numeric: tabular-nums; font-weight: 700; text-align: center; border-radius: 10px; padding: 6px 4px; min-width: 52px; }
.heat.h0 { background: var(--bad-bg); color: var(--bad); }
.heat.h1 { background: var(--warn-bg); color: var(--warn); }
.heat.h2 { background: var(--ok-bg); color: var(--ok); }
.heat.none { color: var(--text-3); font-weight: 500; }
table.matrix th.rot { white-space: nowrap; font-size: 12px; text-transform: none; letter-spacing: 0; }
table.matrix td, table.matrix th { padding: 8px 10px; }
table.matrix tfoot td { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--line-strong); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-2); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--info); background: var(--info-bg); border-radius: 999px; padding: 2px 8px; }
.ai-badge svg { width: 12px; height: 12px; }
@media print { .page-break { break-before: page; } }
.inline-ico { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Namensauswahl (Klassenliste) ---------- */
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.name-chip { min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface-solid); font-weight: 600; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.name-chip:hover { border-color: var(--accent); }
.name-chip[aria-checked="true"], .name-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.name-chip[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Prüfungsmodus ---------- */
.lock-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(6, 9, 20, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lock-screen .card { max-width: 460px; text-align: center; }
.lock-screen svg.big { width: 56px; height: 56px; color: var(--bad); }
.chip.locked { background: var(--bad-bg); color: var(--bad); }
.callout.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }

/* ---------- Vorschau ---------- */
.preview-banner { padding: 8px 16px; background: var(--warn-bg); color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: 14px; }
.callout > svg, .callout > span > svg { width: 18px; height: 18px; vertical-align: -3px; flex: none; }
.parsons { grid-template-columns: minmax(0, 1fr); }
.parsons-item { min-width: 0; }
.parsons-code { overflow-x: auto; }
.parsons { padding: 0; margin: 0; list-style: none; }
.parsons-code svg { max-width: 100% !important; height: auto; }

/* ---------- Hinweis „Neue Version“ ---------- */
.update-bar { position: fixed; z-index: 120; top: 72px; left: 12px; right: 12px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 18px; font-weight: 600; font-size: 15px; width: max-content; max-width: calc(100vw - 24px); animation: rise .3s var(--spring); }
.update-bar > svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ---------- Live-Hinweis (statisch, ohne Dauerbewegung) ---------- */
.live-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ok); }
.live-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--ok-bg); }

/* ---------- Vorschau: Kachelübersicht ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
button.tile { display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: inherit; padding: 16px; min-height: 280px; }
.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; background: var(--accent); color: var(--on-accent); flex: none; }
.tile-concept { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tile-prompt { font-weight: 650; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-thumb { position: relative; flex: 1; min-height: 96px; max-height: 130px; overflow: hidden; border-radius: 12px; background: #f9f9fb; border: 1px solid var(--line); padding: 8px;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.tile-thumb { background: var(--blocks-bg); }
.tile-thumb .blocks-view { padding: 0; border: 0; background: transparent; overflow: hidden; }
.tile-thumb.text { -webkit-mask-image: none; mask-image: none; background: var(--surface-2); }
.tile-options { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text-2); list-style: upper-alpha; }
.tile-options li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-solution { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--ok-bg); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-open { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent); margin-top: auto; }
.tile-open svg { width: 16px; height: 16px; }
.preview-sheet .sheet-body .q-card { box-shadow: none; }
.preview-banner .segmented button { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* ---------- E-Mail-Versand ---------- */
.mail-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding: 2px; }
.mail-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); cursor: pointer; }
.mail-row.disabled { opacity: .6; cursor: default; }
.mail-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.mail-name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.mail-name .tiny { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Musterlösung ---------- */
.sol-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.sol-nav { position: sticky; top: 84px; padding: 16px; display: grid; gap: 12px; }
.sol-nav-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sol-nav-list { display: grid; gap: 2px; }
.sol-nav-item { text-align: left; border: 0; background: transparent; min-height: 40px; padding: 0 12px; border-radius: 10px; font-weight: 600; color: var(--text-2); cursor: pointer; font-size: 15px; }
.sol-nav-item:hover { background: var(--accent-soft); color: var(--text); }
.sol-nav-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.sol-nav-actions { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.sol-nav-actions .btn { justify-content: flex-start; }
.sol-section { scroll-margin-top: 84px; padding: 24px; display: grid; gap: 16px; }
.sol-head { display: flex; align-items: center; gap: 12px; }
.sol-head h2 { font-size: 20px; }
.sol-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.sol-icon svg { width: 20px; height: 20px; }
.sol-lead { font-size: 18px; line-height: 1.55; margin: 0; max-width: 75ch; }
.sol-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sol-stat { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; }
.sol-stat strong { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.1; }
.sol-stat span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.req-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.45; }
.req-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--accent); color: var(--on-accent); }
.prose p { margin: 0 0 12px; max-width: 75ch; line-height: 1.65; font-size: 16px; }
.prose p:last-child { margin-bottom: 0; }
.setup-box { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); }
.setup-box > svg { width: 22px; height: 22px; color: var(--info); }
.setup-box p { margin: 4px 0 0; }
.tab-count { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.script-grid { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.script-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); padding: 10px; max-width: 100%; }
.script-card .blocks-view { border: 0; padding: 4px; }
.script-label { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 2px 4px 6px; }
.sol-code { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; line-height: 1.55; overflow-x: auto; white-space: pre; }
.concept-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.concept-grid li { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.concept-grid strong { color: var(--accent); font-size: 15px; }
.concept-grid span { color: var(--text-2); font-size: 14.5px; }
.mistake-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mistake-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.mistake-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.sol-icon.warn { background: var(--warn-bg); color: var(--warn); }
.sol-editbar { position: sticky; top: 72px; z-index: 5; }
@media (max-width: 900px) {
  .sol-layout { grid-template-columns: 1fr; }
  .sol-nav { position: sticky; top: 60px; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px; overflow-x: auto; border-radius: 16px; }
  .sol-nav-title, .sol-nav > .tiny { display: none; }
  .sol-nav-list { display: flex; gap: 4px; }
  .sol-nav-item { white-space: nowrap; min-height: 36px; font-size: 14px; }
  .sol-nav-actions { display: flex; border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 8px; }
  .sol-nav-actions .btn { white-space: nowrap; }
  .sol-section { padding: 18px; }
}
.sol-layout > *, .sol-content { min-width: 0; }
@media (max-width: 640px) {
  .page-head .segmented { overflow-x: auto; scrollbar-width: none; }
  .page-head .segmented button { flex: 0 0 auto; padding: 0 12px; }
}

/* ---------- Prüfen: Musterlösungen & Fragen ---------- */
.review-overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.review-sol { display: grid; gap: 12px; padding: 20px; }
.review-sol-title { font-size: 19px; line-height: 1.3; }
.review-sol-title a { color: inherit; text-decoration: none; }
.review-sol-title a:hover { color: var(--accent); }
.review-sol-summary { margin: 0; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.review-sol-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.review-sol-meta .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.review-progress { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.review-sol-actions { gap: 8px; }
.hint-note { margin: 0; display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.hint-note > svg { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.card.review-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; position: sticky; top: 88px; z-index: 6; min-height: 64px; background: var(--surface-solid); transition: border-color .2s, box-shadow .2s; }
.review-toolbar.has-selection { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.review-all { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; min-height: 40px; padding-right: 4px; }
.review-toolbar .spacer { flex: 1; }
.review-item { padding: 0; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.review-item.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.review-item.is-checked .review-item-head { background: color-mix(in srgb, var(--ok-bg) 55%, transparent); }
.review-item-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.review-select { display: grid; place-items: center; width: 32px; height: 32px; cursor: pointer; }
.review-item-title { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 6px 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.review-item-title .name { font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.review-item-title .name svg { width: 18px; height: 18px; color: var(--text-3); }
.review-item-title > svg { width: 16px; height: 16px; color: var(--text-3); margin-left: auto; flex: none; }
.review-item-actions { gap: 6px; }
.btn.ok-btn { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.review-item-body { display: grid; gap: 12px; padding: 4px 18px 18px 56px; }
.review-summary { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.rq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rq { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.rq-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: var(--accent-soft); color: var(--accent); }
.rq-body { display: grid; gap: 8px; min-width: 0; }
.rq-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rq-prompt { margin: 0; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.rq-answer { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.rq-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rq-options li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 5px 8px; border-radius: 9px; font-size: 14.5px; color: var(--text-2); }
.rq-options li.correct { background: var(--ok-bg); color: var(--text); font-weight: 600; }
.rq-options li.correct svg { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.rq-letter { font-weight: 700; color: var(--text-3); font-size: 13px; }
.rq-code summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.rq-code[open] summary { margin-bottom: 8px; }
.rq-code .blocks-view { overflow-x: auto; }
.rq-code-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.rq-code-pair > div { min-width: 0; display: grid; gap: 4px; }
@media (max-width: 640px) {
  .review-item-body { padding: 4px 12px 14px; }
  }

/* ---------- Notenbuch ---------- */
.gradebook-card { padding: 20px; }
.gradebook-card h2 { font-size: 20px; }
.gradebook-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); }
table.gradebook { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-variant-numeric: tabular-nums; }
.gradebook th, .gradebook td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: center; font-size: 14px; }
.gradebook thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); vertical-align: bottom; }
.gradebook .gb-name { position: sticky; left: 0; z-index: 1; background: var(--surface-solid); text-align: left; padding: 9px 14px; font-weight: 600; white-space: nowrap; min-width: 180px; box-shadow: 1px 0 0 var(--line-strong); }
.gradebook thead .gb-name { z-index: 3; background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 800; }
.gradebook tbody tr:nth-child(even) td:not([class*="g-"]), .gradebook tbody tr:nth-child(even) .gb-name { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface-solid)); }
.gradebook tbody tr:hover .gb-name { color: var(--accent); }
.gb-head { width: 112px; min-width: 112px; max-width: 112px; padding: 8px 8px 10px !important; }
.gb-idx { display: block; font-size: 11px; font-weight: 800; color: var(--text-3); letter-spacing: .05em; }
.gb-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--text); text-decoration: none; margin: 2px 0; }
.gb-title:hover { color: var(--accent); }
.gb-date { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.gb-avg-head { width: 76px; min-width: 76px; font-size: 13px; padding: 8px !important; }
.gb-cell a { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 40px; padding: 0 6px; color: inherit; text-decoration: none; font-weight: 700; position: relative; }
.gb-cell a:hover { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.gb-missing { color: var(--text-3); }
.gb-pending a { font-size: 12px; font-weight: 600; color: var(--text-3); }
.g-ok { background: var(--ok-bg); color: var(--ok); }
.g-mid { background: var(--warn-bg); color: var(--warn); }
.g-bad { background: var(--bad-bg); color: var(--bad); }
.gb-mark { font-size: 10px; font-weight: 800; position: absolute; top: 3px; right: 5px; opacity: .8; }
.gb-mark.static { position: static; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--neutral-bg); color: var(--text-2); }
.gb-avg { font-weight: 800; padding: 9px 8px !important; }
.gradebook tfoot th, .gradebook tfoot td { background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.gb-sub { font-size: 12px !important; color: var(--text-3); font-weight: 600; padding: 6px 8px !important; }
.gb-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
@media (max-width: 640px) { .gradebook .gb-name { min-width: 130px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; } }
.gradebook tbody th.gb-name, .gradebook tfoot th.gb-name { text-transform: none; letter-spacing: 0; font-size: 14.5px; color: var(--text); }
.gradebook tfoot th.gb-name.gb-sub { font-size: 12px; color: var(--text-3); }
.gradebook thead th { text-transform: none; letter-spacing: 0; }
.gb-title { text-transform: none; }


/* ===================================================================
   Gesamtlayout: dunkles Pfirsich-Gold-Design, schwebende Pillen-Navigation
   =================================================================== */
body { letter-spacing: .005em; }
.topbar {
  position: sticky; top: 12px; width: calc(100% - 32px); max-width: 1240px; margin: 12px auto 0;
  border-radius: 999px; border: 1px solid var(--line); padding: 8px 10px 8px 18px; min-height: 64px;
}
.brand { font-weight: 700; font-size: 20px; }
.brand-mark { background: var(--grad); color: #1c130d; box-shadow: 0 6px 20px -6px rgba(246, 191, 150, .55); }
.nav { margin: 0 auto; }
.nav a { font-weight: 500; font-size: 15.5px; letter-spacing: .01em; }
.nav a:hover { background: var(--neutral-bg); }
.nav a[aria-current="page"] { background: var(--neutral-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav a[aria-current="page"] svg { color: var(--accent); }
.topbar .spacer { display: none; }
.user-pill { gap: 4px; }
.user-pill .who { margin-right: 6px; }
main.page { padding-top: 36px; }
@media (max-width: 760px) {
  .topbar { width: calc(100% - 20px); top: 8px; margin-top: 8px; min-height: 56px; padding: 6px 8px 6px 14px; justify-content: space-between; }
  .tabbar { border: 1px solid var(--line); border-radius: 28px; }
  .tabbar a[aria-current="page"] { color: var(--text); background: var(--neutral-bg); }
  .tabbar a[aria-current="page"] svg { color: var(--accent); }
}

h1 { font-weight: 600; letter-spacing: -.035em; }
h1.gradient { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-weight: 600; letter-spacing: -.02em; }
h3 { font-weight: 600; }
.eyebrow { color: var(--accent); letter-spacing: .08em; }

.card { border-radius: var(--r-lg); }
a.card:hover, button.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }

.btn { --b-bg: var(--surface-2); --b-line: var(--line-strong); font-weight: 600; letter-spacing: .01em; }
.btn:hover { box-shadow: var(--shadow); border-color: var(--line-strong); background: var(--surface-3); }
.btn.primary { --b-fg: var(--primary-fg); background: var(--primary-bg); color: var(--primary-fg); border-color: transparent; box-shadow: 0 10px 30px -14px rgba(246, 191, 150, .55); }
.btn.primary:hover { background: var(--primary-bg); box-shadow: 0 16px 36px -14px rgba(246, 191, 150, .7), var(--glow); }
.btn.primary::after { background: linear-gradient(100deg, transparent 30%, rgba(246, 191, 150, .45) 50%, transparent 70%); }
.btn.ghost:hover { background: var(--neutral-bg); }
.btn.danger:hover { background: var(--bad-bg); }

input[type="text"], input[type="number"], input[type="search"], input[type="email"], input[type="password"], input:not([type]), textarea, select {
  background: var(--surface-2); border-color: var(--line-strong); border-radius: 14px; color: var(--text);
}
input[type="email"], input[type="password"] { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.segmented { background: var(--surface-2); border: 1px solid var(--line); }
.segmented button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong), 0 2px 8px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--accent); }
.chip.info { background: var(--info-bg); color: var(--info); }
th { background: var(--surface-2); }
.stat .value { font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sol-icon, .x-icon-sm { background: var(--surface-3); color: var(--accent); border: 1px solid var(--line); }
dialog.sheet { border: 1px solid var(--line); }
::selection { background: rgba(246, 191, 150, .35); }

/* Passkey-Liste */
.key-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.key-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-3); border: 1px solid var(--line); color: var(--accent); }
.key-ico svg { width: 22px; height: 22px; }

/* Darstellung */
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
.theme-opt { display: grid; gap: 10px; padding: 10px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.theme-opt:hover { transform: translateY(-2px); }
.theme-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-preview { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 10px 1fr; gap: 5px; height: 64px; padding: 7px; border-radius: 12px; }
.theme-preview i { border-radius: 4px; }
.theme-preview i:first-child { grid-column: span 2; border-radius: 999px; }
.theme-dark .theme-preview { background: #08080a; border: 1px solid #222; }
.theme-dark .theme-preview i { background: #1f1f23; } .theme-dark .theme-preview i:last-child { background: linear-gradient(92deg, #f5a3a3, #f3dd8f); opacity: .8; }
.theme-light .theme-preview { background: #f7f5f2; border: 1px solid #e4e1dc; }
.theme-light .theme-preview i { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .theme-light .theme-preview i:last-child { background: linear-gradient(92deg, #d24d63, #c1901a); opacity: .75; }
.theme-auto .theme-preview { background: linear-gradient(135deg, #f7f5f2 50%, #08080a 50%); border: 1px solid var(--line-strong); }
.theme-auto .theme-preview i { background: rgba(127, 127, 127, .35); }
.theme-label { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; }
.theme-label svg { width: 16px; height: 16px; color: var(--accent); }

/* Auswahlmenüs */
.xs { position: relative; width: 100%; }
.xs-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.xs-btn { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px 9px 14px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: border-color .2s, box-shadow .2s, background .2s; }
.xs-btn:hover { background: var(--surface-3); }
.xs-btn:focus-visible, .xs.open .xs-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.xs-btn[disabled] { opacity: .55; cursor: not-allowed; }
.xs-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.xs-chev { width: 18px; height: 18px; color: var(--text-3); flex: none; transition: transform .25s var(--ease); }
.xs.open .xs-chev { transform: rotate(180deg); color: var(--accent); }
.xs-list { position: fixed; z-index: 1000; margin: 0; padding: 6px; list-style: none; overflow-y: auto; overscroll-behavior: contain;
  max-width: min(440px, calc(100vw - 16px)); border-radius: 18px; border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .2); outline: none;
  transform-origin: top center; animation: xs-pop .16s var(--ease); }
.xs-list.up { transform-origin: bottom center; }
.xs-list.closing { animation: xs-out .12s ease forwards; }
@keyframes xs-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes xs-out { to { opacity: 0; transform: scale(.97); } }
.xs-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 10px 8px 12px; border-radius: 11px; cursor: pointer; color: var(--text-2); font-size: 15px; line-height: 1.3; }
.xs-list li.active { background: var(--neutral-bg); color: var(--text); }
.xs-list li[aria-selected="true"] { color: var(--text); font-weight: 600; }
.xs-check { width: 16px; height: 16px; color: var(--accent); opacity: 0; flex: none; }
.xs-list li[aria-selected="true"] .xs-check { opacity: 1; }
.xs-list li[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .xs-list, .xs-list.closing { animation: none; } }


/* ---------- Klassenübersicht (aufklappbar) ---------- */
.page-head.top { align-items: flex-start; }
.cls-item { padding: 0; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.cls-item.open { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.cls-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cls-head:hover { background: var(--neutral-bg); }
.cls-badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.02em; color: #1c130d; background: var(--grad); box-shadow: 0 8px 20px -10px rgba(246, 191, 150, .6); }
.cls-badge.muted-badge { background: var(--surface-3); color: var(--text-3); box-shadow: none; }
.cls-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cls-title strong { font-size: 18px; font-weight: 600; }
.cls-head-meta { display: flex; align-items: center; gap: 10px; }
.cls-chev { width: 20px; height: 20px; color: var(--text-3); transition: transform .3s var(--ease); }
.cls-item.open .cls-chev { transform: rotate(180deg); color: var(--accent); }
.cls-avg { font-weight: 700; font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--neutral-bg); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cls-avg.g-ok { background: var(--ok-bg); color: var(--ok); } .cls-avg.g-mid { background: var(--warn-bg); color: var(--warn); } .cls-avg.g-bad { background: var(--bad-bg); color: var(--bad); }
.cls-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.cls-item.open .cls-collapse { grid-template-rows: 1fr; }
.cls-collapse > div { overflow: hidden; min-height: 0; }
.cls-body { padding: 4px 18px 18px; display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.cls-asg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cls-asg { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.cls-asg:hover { border-color: var(--line-strong); background: var(--surface-3); }
.cls-asg-main { display: grid; gap: 2px; min-width: 0; text-decoration: none; color: inherit; }
.cls-asg-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls-asg-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cls-metric { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cls-metric svg { width: 15px; height: 15px; color: var(--text-3); }
.cls-asg-actions { display: flex; gap: 2px; }
.cls-asg-actions .btn.icon.small { width: 36px; min-height: 36px; }
.cls-foot { gap: 8px; }
@media (prefers-reduced-motion: reduce) { .cls-collapse { transition: none; } }
@media (max-width: 860px) {
  .cls-asg { grid-template-columns: minmax(0, 1fr) auto; }
  .cls-asg-meta { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .cls-head { padding: 14px; gap: 10px; }
  .cls-badge { width: 40px; height: 40px; font-size: 13px; }
  .cls-head-meta .chip { display: none; }
  .cls-body { padding: 12px 12px 14px; }
}


/* ---------- Kontrollkästchen ---------- */
input[type="checkbox"]:not(.switch input) { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border-radius: 6px; border: 1.5px solid var(--line-strong);
  background: var(--surface-2); display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
input[type="checkbox"]:not(.switch input)::after { content: ""; width: 10px; height: 6px; border: 2.2px solid var(--primary-fg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--spring); }
input[type="checkbox"]:not(.switch input):checked { background: var(--primary-bg); border-color: var(--primary-bg); }
input[type="checkbox"]:not(.switch input):checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input[type="checkbox"]:not(.switch input):hover { border-color: var(--accent); }
input[type="checkbox"]:not(.switch input):focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); }
input[type="checkbox"]:not(.switch input):disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Aufgabenkarten mit Fortschritt ---------- */
.asg-card { display: grid; gap: 14px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.asg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.asg-title { font-size: 20px; margin: 0; }
.asg-title a { color: inherit; text-decoration: none; }
.asg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.asg-steps li { display: grid; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-3); min-width: 0; }
.asg-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-steps i { height: 6px; border-radius: 999px; background: var(--neutral-bg); position: relative; overflow: hidden; }
.asg-steps .st-done i { background: var(--grad); }
.asg-steps .st-done { color: var(--text-2); }
.asg-steps .st-part i { background: linear-gradient(90deg, var(--accent) 50%, var(--neutral-bg) 50%); }
.asg-steps .st-busy i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: shimmer 1.6s infinite; }
.asg-steps .st-bad i { background: var(--bad); }
.asg-steps .st-skip i { background: repeating-linear-gradient(90deg, var(--neutral-bg) 0 4px, transparent 4px 7px); }
.asg-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.asg-next { display: flex; }
.asg-next .btn { max-width: 100%; }
.spinner.small-spin { width: 14px; height: 14px; border-width: 2px; }


/* ---------- Beamer-Ansicht (ruhiges Bild) ---------- */
.bm { position: fixed; inset: 0; overflow: hidden; font-family: var(--font-display); color: #f4f4f5; z-index: 10;
  --sky1: #070a1c; --sky2: #1c1838; --sky3: #4b2a45; --w1: rgba(72, 61, 139, .55); --w2: rgba(44, 38, 96, .75); --w3: #120f28; --orb: rgba(246, 191, 150, .9); --ink: #f4f4f5; --muted: rgba(244, 244, 245, .72); }
.bm-morgen { --sky1: #fbe3d3; --sky2: #fbd8c4; --sky3: #f8ecd0; --w1: rgba(126, 196, 196, .55); --w2: rgba(96, 166, 170, .65); --w3: #4f8f93; --orb: rgba(217, 115, 60, .85); --ink: #2a1d16; --muted: rgba(42, 29, 22, .72); }
.bm-wald { --sky1: #08140f; --sky2: #12261c; --sky3: #2a3f2a; --w1: rgba(46, 94, 64, .65); --w2: rgba(28, 66, 44, .85); --w3: #0b1c13; --orb: rgba(243, 221, 143, .9); }
.bm-sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 55%, var(--sky3) 100%); transition: background 1.5s; }
.bm-stars i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .7; animation: bm-twinkle 6s ease-in-out infinite; animation-delay: var(--d); }
.bm-morgen .bm-stars { display: none; }
.bm-wald .bm-stars i { background: #f3dd8f; box-shadow: 0 0 8px 2px rgba(243, 221, 143, .6); top: auto !important; bottom: calc(10% + var(--s) * 40); animation: bm-firefly 12s ease-in-out infinite; animation-delay: calc(var(--d) * -2); }
@keyframes bm-twinkle { 50% { opacity: .15; } }
@keyframes bm-firefly { 0%, 100% { transform: translate(0, 0); opacity: .2; } 40% { opacity: .9; } 50% { transform: translate(30px, -40px); } 80% { transform: translate(-20px, -10px); opacity: .5; } }
.bm-sun { position: absolute; left: 78%; top: 10%; width: 22vmin; height: 22vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 200, .95), rgba(255, 200, 150, .4) 55%, transparent 70%); filter: blur(2px); display: none; animation: bm-rise 60s ease-in-out infinite alternate; }
.bm-morgen .bm-sun { display: block; }
.bm-abend .bm-sun { display: block; width: 11vmin; height: 11vmin; left: 50%; top: 5%; background: radial-gradient(circle, rgba(255, 248, 230, .95) 40%, rgba(255, 240, 210, .15) 62%, transparent 70%); }
@keyframes bm-rise { to { transform: translateY(-4vh); } }
.bm-clouds i { position: absolute; height: 9vmin; border-radius: 999px; background: rgba(255, 255, 255, .55); filter: blur(8px); animation: bm-cloud 120s linear infinite; display: none; }
.bm-morgen .bm-clouds i { display: block; }
.bm-clouds i:nth-child(1) { width: 30vmin; top: 14%; animation-delay: -20s; }
.bm-clouds i:nth-child(2) { width: 20vmin; top: 26%; animation-duration: 160s; animation-delay: -90s; opacity: .7; }
.bm-clouds i:nth-child(3) { width: 26vmin; top: 8%; animation-duration: 200s; animation-delay: -140s; opacity: .5; }
@keyframes bm-cloud { from { transform: translateX(-40vw); } to { transform: translateX(140vw); } }
.bm-waves { position: absolute; left: 0; right: 0; bottom: 0; height: 42vh; }
.bm-wave { position: absolute; left: 0; bottom: 0; max-width: none; width: 200%; height: 100%; animation: bm-drift 60s linear infinite; }
.bm-wave path { transition: fill 1.5s; }
.bm-wave.w1 { height: 100%; } .bm-wave.w1 path { fill: var(--w1); }
.bm-wave.w2 { height: 78%; animation-duration: 80s; animation-direction: reverse; } .bm-wave.w2 path { fill: var(--w2); }
.bm-wave.w3 { height: 52%; animation-duration: 110s; } .bm-wave.w3 path { fill: var(--w3); }
@keyframes bm-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.bm-content { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 4vh 5vw; color: var(--ink); }
.bm-top { margin-bottom: 2vh; display: flex; justify-content: space-between; align-items: center; font-size: clamp(16px, 1.6vw, 26px); color: var(--muted); font-weight: 500; }
.bm-clock { font-variant-numeric: tabular-nums; }
.bm-bottom { display: flex; justify-content: center; }
.bm-join { display: grid; justify-items: center; gap: 4px; padding: 1.6vh 2.4vw; border-radius: 24px; background: rgba(10, 10, 14, .38); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #f4f4f5; }
.bm-morgen .bm-join { background: rgba(255, 255, 255, .55); border-color: rgba(0, 0, 0, .08); color: #2a1d16; }
.bm-join-k { font-size: clamp(12px, 1vw, 16px); text-transform: uppercase; letter-spacing: .1em; opacity: .7; font-weight: 700; }
.bm-join strong { font-size: clamp(22px, 2.6vw, 44px); font-weight: 600; letter-spacing: -.01em; }
.bm-join span:last-child { font-size: clamp(14px, 1.3vw, 22px); opacity: .8; }
.bm.no-join .bm-join { display: none; }
.bm-controls { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 8px; border-radius: 999px; background: rgba(10, 10, 14, .6); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .5s; z-index: 2; font-family: var(--font); }
.bm-seg { display: flex; gap: 4px; }
.bm-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #f4f4f5; font: 600 14px var(--font); cursor: pointer; text-decoration: none; }
.bm-btn svg { width: 16px; height: 16px; }
.bm-btn[aria-pressed="true"] { background: #fff; color: #0b0b0d; }
.bm.idle .bm-controls { opacity: 0; pointer-events: none; }
.bm.idle { cursor: none; }
@media (prefers-reduced-motion: reduce) { .bm *, .bm *::before { animation: none !important; } .bm-tipbox, .bm-c-inner { transition: none; } }


/* Beamer: Inhalte zur Aufgabe */
.bm-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4.5vw; align-items: center; padding-bottom: 4vh; }
.bm-left { display: grid; gap: 2.2vh; align-content: center; }
.bm-label { font-size: clamp(12px, 1vw, 17px); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orb); }
.bm-left h1 { margin: 0; font-size: clamp(40px, 5.2vw, 96px); font-weight: 500; letter-spacing: -.035em; line-height: 1.04;
  background: linear-gradient(92deg, #f5a3a3, #f6bf96 45%, #f3dd8f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bm-morgen .bm-left h1 { background: linear-gradient(92deg, #c2414f, #d9733c 45%, #b5861a); -webkit-background-clip: text; background-clip: text; }
.bm-summary { margin: 0; font-size: clamp(18px, 1.6vw, 30px); line-height: 1.45; color: var(--muted); max-width: 40ch; }
.bm-tipbox, .bm-card { border-radius: 28px; background: rgba(10, 10, 14, .42); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.bm-morgen .bm-tipbox, .bm-morgen .bm-card { background: rgba(255, 255, 255, .58); border-color: rgba(0, 0, 0, .07); box-shadow: 0 30px 60px -30px rgba(120, 60, 20, .35); }
.bm-tipbox { display: grid; grid-template-columns: auto 1fr; gap: 1.2vw; align-items: start; padding: 2.2vh 1.8vw; margin-top: 1vh; max-width: 46vw; transition: opacity .7s, transform .7s; }
.bm-tipbox.out, .bm-c-inner.out { opacity: 0; transform: translateY(10px); }
.bm-t-ico { width: clamp(36px, 3vw, 56px); height: clamp(36px, 3vw, 56px); border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #f5a3a3, #f3dd8f); color: #1c130d; }
.bm-t-ico svg { width: 55%; height: 55%; }
.bm-t-text { margin: .5vh 0 0; font-size: clamp(17px, 1.5vw, 28px); line-height: 1.4; color: var(--ink); }
.bm-card { padding: 3vh 2.4vw 2.6vh; display: grid; gap: 1.6vh; min-height: 44vh; align-content: start; }
.bm-card-top { display: flex; justify-content: space-between; align-items: center; }
.bm-c-count { font-size: clamp(13px, 1vw, 18px); color: var(--muted); font-variant-numeric: tabular-nums; }
.bm-c-inner { display: grid; gap: 1.6vh; transition: opacity .7s, transform .7s; }
.bm-c-name { margin: 0; font-size: clamp(30px, 3.2vw, 60px); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; color: var(--ink); }
.bm-c-text { margin: 0; font-size: clamp(17px, 1.45vw, 28px); line-height: 1.45; color: var(--muted); }
.bm-c-blocks .blocks-view { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 1.6vh 1.2vw; overflow: hidden; }
.bm-morgen .bm-c-blocks .blocks-view { background: rgba(255, 255, 255, .7); border-color: rgba(0, 0, 0, .06); }
.bm-c-blocks svg { max-width: 100%; height: auto; }
.bm-dots { display: flex; gap: 8px; margin-top: auto; }
.bm-dots i { width: 8px; height: 8px; border-radius: 999px; background: currentColor; opacity: .25; color: var(--ink); transition: width .4s, opacity .4s; }
.bm-dots i.on { width: 26px; opacity: .85; background: var(--orb); }
@media (max-width: 900px) { .bm-main { grid-template-columns: 1fr; } .bm-tipbox { max-width: none; } .bm-card { min-height: 0; } }


/* ---------- Rückfrage-Dialog (statt OK/Abbrechen) ---------- */
dialog.ask-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 28px; color: var(--text); background: color-mix(in srgb, var(--surface-solid) 92%, transparent); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .15); }
dialog.ask-dialog::backdrop { background: rgba(4, 4, 8, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: ask-fade .2s ease; }
dialog.ask-dialog[open] { animation: ask-in .28s var(--spring); }
@keyframes ask-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes ask-fade { from { opacity: 0; } }
.ask-body { display: grid; gap: 12px; padding: 28px 26px 22px; }
.ask-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #1c130d; box-shadow: 0 12px 26px -12px rgba(246, 191, 150, .65); margin-bottom: 4px; }
.ask-ico svg { width: 26px; height: 26px; }
.tone-danger .ask-ico { background: var(--bad-bg); color: var(--bad); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bad) 30%, transparent); }
.ask-body h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.ask-msg { margin: 0; color: var(--text-2); line-height: 1.55; font-size: 15.5px; }
.ask-field { margin-top: 4px; }
.ask-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn.danger-solid { --b-fg: #fff; background: #dc2626; color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(220, 38, 38, .7); }
.btn.danger-solid:hover { background: #b91c1c; }
@media (max-width: 520px) {
  dialog.ask-dialog { margin: auto auto 12px; width: calc(100vw - 20px); }
  .ask-actions { flex-direction: column-reverse; }
  .ask-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { dialog.ask-dialog[open], dialog.ask-dialog::backdrop { animation: none; } }

/* ---------- Startseite (dunkles Layout) ---------- */
html.x-dark { color-scheme: dark; background: #08080a; }
html.x-dark body { background: #08080a; }
.x-landing {
  --x-bg: #08080a; --x-card: #111113; --x-card-2: #18181b; --x-line: rgba(255,255,255,.08); --x-line-2: rgba(255,255,255,.14);
  --x-text: #f4f4f5; --x-muted: #a1a1aa; --x-dim: #52525b;
  --x-grad: linear-gradient(92deg, #f5a3a3 0%, #f6bf96 45%, #f3dd8f 100%);
  position: relative; z-index: 1; min-height: 100vh; background: var(--x-bg); color: var(--x-text); overflow-x: clip;
  font-family: var(--font-display); -webkit-font-smoothing: antialiased;
}
.x-landing .icon, .x-landing svg { flex: none; }
.x-glow { position: absolute; inset: 0 0 auto; height: 1100px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 40% at 50% 0%, rgba(246,191,150,.13), transparent 70%), radial-gradient(40% 30% at 15% 20%, rgba(245,163,163,.07), transparent 70%), radial-gradient(40% 30% at 85% 25%, rgba(243,221,143,.06), transparent 70%); }
.x-landing main, .x-footer { position: relative; z-index: 1; }
.x-grad { background: var(--x-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Navigation als schwebende Pille */
.x-nav { position: sticky; top: 0; z-index: 40; padding: 16px 20px 0; }
.x-nav-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 22px; border-radius: 999px;
  background: rgba(20,20,22,.72); border: 1px solid var(--x-line); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  transition: background .3s, box-shadow .3s, max-width .4s cubic-bezier(.2,.8,.2,1); }
.x-nav.scrolled .x-nav-in { background: rgba(14,14,16,.86); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); max-width: 1180px; }
.x-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--x-text); text-decoration: none; }
.x-brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--x-grad); color: #2a1a12; box-shadow: 0 6px 20px -6px rgba(246,191,150,.6); }
.x-links { display: flex; gap: 4px; margin: 0 auto; }
.x-links a { color: var(--x-muted); text-decoration: none; font-size: 16px; font-weight: 500; letter-spacing: .01em; padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.x-links a:hover { color: var(--x-text); background: rgba(255,255,255,.06); }
.x-nav-code { color: var(--x-muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 10px; }
.x-nav-code:hover { color: var(--x-text); }

/* Buttons */
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 32px; border-radius: 999px; font-size: 18px; font-weight: 600; letter-spacing: .01em; text-decoration: none; cursor: pointer; border: 1px solid transparent; position: relative; overflow: hidden; transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s; font-family: inherit; }
.x-btn.small { min-height: 46px; padding: 0 22px; font-size: 16px; }
.x-btn.light { background: #fff; color: #0b0b0d; box-shadow: 0 10px 30px -12px rgba(255,255,255,.35); }
.x-btn.dark { background: #232326; color: var(--x-text); border-color: var(--x-line-2); }
.x-btn:hover { transform: translateY(-2px); }
.x-btn.light:hover { box-shadow: 0 16px 40px -12px rgba(246,191,150,.55); }
.x-btn.dark:hover { background: #2b2b2f; }
.x-btn:active { transform: scale(.97); }
.x-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.x-btn.light::after { background: linear-gradient(110deg, transparent 30%, rgba(246,191,150,.35) 50%, transparent 70%); }
.x-btn:hover::after { transform: translateX(120%); }

/* Hero */
.x-hero { max-width: 1280px; margin: 0 auto; padding: 72px 20px 0; text-align: center; display: grid; justify-items: center; }
.x-award { display: inline-flex; align-items: center; gap: 6px; color: #d4d4d8; margin-bottom: 34px; }
.x-award > div { display: grid; line-height: 1.15; }
.x-award strong { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 700; }
.x-award strong svg { width: 18px; height: 18px; }
.x-award span { font-size: 14px; color: var(--x-muted); }
.x-laurel { display: block; width: 26px; height: 52px; color: #d4d4d8; }
.x-laurel svg { width: 100%; height: 100%; }
.x-laurel.flip { transform: scaleX(-1); }
.x-hero h1 { font-size: clamp(44px, 7.4vw, 104px); line-height: 1.04; font-weight: 500; letter-spacing: -.035em; margin: 0 0 22px; }
.x-sub { font-size: clamp(18px, 2vw, 22px); color: var(--x-muted); max-width: 620px; line-height: 1.5; margin: 0 0 36px; letter-spacing: .01em; }
.x-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.x-in { opacity: 0; transform: translateY(18px); filter: blur(8px); animation: x-in .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0ms); }
@keyframes x-in { to { opacity: 1; transform: none; filter: none; } }
.x-stage { width: 100%; margin-top: 56px; perspective: 1600px; }

/* Laptop-Mockup */
.x-laptop { width: min(1080px, 100%); margin: 0 auto; }
.x-laptop.x-tilt { transform: rotateX(var(--tilt, 28deg)) scale(var(--scale, .88)); transform-origin: 50% 100%; transition: transform .1s linear; will-change: transform; }
.x-lid { position: relative; padding: 14px 14px 18px; border-radius: 28px 28px 10px 10px; background: #050506; border: 2px solid #2a2a2e; box-shadow: 0 0 0 1px #000, 0 60px 120px -40px rgba(246,191,150,.25), 0 40px 80px -30px rgba(0,0,0,.9); }
.x-notch { position: absolute; top: 14px; left: 50%; width: 120px; height: 22px; transform: translateX(-50%); background: #050506; border-radius: 0 0 12px 12px; z-index: 3; }
.x-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #1b1638; display: grid; place-items: center; }
.x-wall { position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 0% 100%, #e03a5c 0%, transparent 45%),
  radial-gradient(90% 80% at 15% 10%, #1fb5d4 0%, transparent 45%),
  radial-gradient(80% 70% at 100% 0%, #2c2a7a 0%, transparent 60%),
  linear-gradient(160deg, #3b2f9a, #241b5e 50%, #5a1440); }
.x-menubar { position: absolute; top: 0; left: 0; right: 0; height: 26px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font: 500 12px/1 var(--font); color: #fff; background: rgba(0,0,0,.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); z-index: 2; }
.x-menubar b { margin-right: 10px; }
.x-base { height: 18px; margin: 0 -5%; border-radius: 0 0 22px 22px; background: linear-gradient(#3a3a3f, #18181b 60%, #0c0c0e); position: relative; }
.x-base::before { content: ""; position: absolute; top: 0; left: 50%; width: 16%; height: 7px; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: #1f1f23; }

/* App-Fenster im Mockup */
.x-app { position: relative; z-index: 1; width: 62%; border-radius: 12px; overflow: hidden; background: #161618; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); text-align: left; font-family: var(--font); margin-top: 26px; }
.x-winbar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #202023; border-bottom: 1px solid rgba(255,255,255,.06); }
.x-winbar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.x-winbar i:nth-child(2) { background: #febc2e; } .x-winbar i:nth-child(3) { background: #28c840; }
.x-winbar span { margin: 0 auto; font-size: 11px; color: #8b8b93; background: #161618; padding: 3px 14px; border-radius: 6px; }
.x-app-body { padding: 18px 20px 20px; display: grid; gap: 12px; color: #e4e4e7; }
.x-app-top { display: flex; justify-content: space-between; align-items: center; }
.x-pill { font-size: 12px; font-weight: 600; color: #d4d4d8; background: #26262a; padding: 4px 10px; border-radius: 999px; }
.x-title { font-size: 15px; }
.x-timer { display: inline-flex; align-items: center; gap: 6px; font: 700 14px var(--mono); color: #2a1a12; background: var(--x-grad); padding: 4px 11px; border-radius: 999px; }
.x-timer svg { width: 14px; height: 14px; }
.x-progress { height: 4px; border-radius: 4px; background: #26262a; overflow: hidden; }
.x-progress i { display: block; width: 50%; height: 100%; background: var(--x-grad); }
.x-q { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.x-blocks { display: grid; gap: 2px; justify-items: start; font: 600 11.5px var(--font); }
.x-blocks span { padding: 5px 9px; border-radius: 5px; color: #fff; }
.x-blocks .in { margin-left: 16px; }
.b-ctl { background: #ffab19; color: #2b1a00 !important; }
.b-op { background: #59c059; padding: 1px 7px; border-radius: 10px; color: #fff; }
.b-var { background: #ff8c1a; }
.b-look { background: #9966ff; }
.x-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.x-opt { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: #1f1f22; border: 1px solid rgba(255,255,255,.06); font-size: 12.5px; color: #d4d4d8; }
.x-opt b { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #2c2c30; font-size: 11px; flex: none; }
.x-opt.on { border-color: #f6bf96; box-shadow: 0 0 0 3px rgba(246,191,150,.15); color: #fff; }
.x-opt.on b { background: var(--x-grad); color: #2a1a12; }
.x-ok { font-size: 12px; font-weight: 700; color: #4ade80; background: rgba(74,222,128,.12); padding: 4px 10px; border-radius: 999px; }
.x-score { display: flex; align-items: baseline; gap: 4px; }
.x-score b { font: 700 40px/1 var(--font-display); background: var(--x-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.x-score span { font-size: 18px; color: var(--x-muted); }
.x-score small { margin-left: 10px; color: var(--x-muted); font-size: 12px; }
.x-bar { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: 12px; color: #a1a1aa; }
.x-bar div { height: 6px; border-radius: 6px; background: #26262a; overflow: hidden; }
.x-bar i { display: block; height: 100%; width: 0; background: var(--x-grad); border-radius: inherit; transition: width 1.2s cubic-bezier(.2,.8,.2,1) .2s; }
.in .x-bar i { width: var(--w); }
.x-bar b { text-align: right; color: #e4e4e7; }
.x-note { font-size: 12px; line-height: 1.5; color: #a1a1aa; background: #1d1d20; padding: 10px 12px; border-radius: 10px; }
.x-note b { color: #e4e4e7; }
.x-ask, .x-ph-cta { text-align: center; font-weight: 700; font-size: 13px; color: #2a1a12; background: var(--x-grad); padding: 10px; border-radius: 10px; }
.x-table { display: grid; gap: 3px; font-size: 12px; }
.x-tr { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 3px; align-items: center; }
.x-tr > span:first-child { color: #e4e4e7; font-weight: 600; padding: 7px 4px; }
.x-th span { color: #71717a !important; font-weight: 700 !important; font-size: 11px; text-align: center; }
.x-th span:first-child { text-align: left; }
.x-c { text-align: center; padding: 7px 0; border-radius: 6px; font-weight: 700; }
.x-c.g { background: rgba(74,222,128,.13); color: #4ade80; } .x-c.m { background: rgba(250,204,21,.12); color: #facc15; } .x-c.b { background: rgba(248,113,113,.13); color: #f87171; } .x-c.n { color: #71717a; font-weight: 500; }
.x-c.avg { outline: 1px solid rgba(255,255,255,.12); }

/* Wort-für-Wort-Text */
.x-statement { height: 220vh; position: relative; }
.x-statement-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; padding: 0 20px; }
.x-words { max-width: 1180px; margin: 0; text-align: center; font-size: clamp(30px, 4.6vw, 64px); line-height: 1.32; font-weight: 600; letter-spacing: -.02em; }
.x-words span { color: #26262a; transition: color .35s, text-shadow .35s; }
.x-words span.on { color: #e4e4e7; text-shadow: 0 0 24px rgba(255,255,255,.18); }
.x-words span.edge { color: #fff; text-shadow: 0 0 30px rgba(246,191,150,.6); }

/* Abschnitte & Karten */
.x-section { max-width: 1280px; margin: 0 auto; padding: 120px 20px 0; display: grid; gap: 48px; scroll-margin-top: 90px; }
.x-head { display: grid; gap: 16px; justify-items: center; text-align: center; max-width: 820px; margin: 0 auto; }
.x-head h2, .x-split h2, .x-final h2 { font-size: clamp(34px, 4.6vw, 62px); font-weight: 500; letter-spacing: -.03em; line-height: 1.08; margin: 0; }
.x-head p, .x-split p, .x-final p { color: var(--x-muted); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; margin: 0; letter-spacing: .01em; }
.x-tag { display: inline-flex; align-items: center; padding: 8px 22px; border-radius: 999px; border: 1px solid var(--x-line-2); background: rgba(255,255,255,.03); font-size: 18px; font-weight: 600; }
.x-tag { color: #f6bf96; }
.x-card { position: relative; background: var(--x-card); border: 1px solid var(--x-line); border-radius: 26px; overflow: hidden; isolation: isolate; transition: border-color .3s, transform .3s cubic-bezier(.2,.8,.2,1); }
.x-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(246,191,150,.10), transparent 60%); }
.x-card:hover { border-color: var(--x-line-2); }
.x-card:hover::before { opacity: 1; }
.x-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: #1f1f22; border: 1px solid var(--x-line-2); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.x-icon svg { width: 24px; height: 24px; }
.x-feat { padding: 28px; display: grid; gap: 10px; align-content: start; }
.x-feat h3 { font-size: 23px; font-weight: 500; letter-spacing: -.01em; margin: 24px 0 0; }
.x-feat p, .x-step p, .x-format p { margin: 0; color: var(--x-muted); font-size: 17px; line-height: 1.5; letter-spacing: .01em; font-family: var(--font); }
.x-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1), border-color .3s; transition-delay: var(--d, 0ms); }
.x-reveal.in { opacity: 1; transform: none; }

/* Bento */
.x-bento { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.x-col { display: grid; gap: 24px; align-content: start; }
.x-col:nth-child(2) .x-card:nth-child(2) { --d: 120ms; }
.x-phone-card { padding: 30px 30px 0; display: grid; gap: 26px; justify-items: center; text-align: center; }
.x-phone-card:last-child { padding: 0 30px 30px; }
.x-phone-card > p { margin: 0; color: var(--x-muted); font-size: 17px; line-height: 1.5; font-family: var(--font); }
.x-phone { width: 250px; padding: 14px 14px 10px; border-radius: 42px 42px 0 0; background: #0d0d0f; border: 6px solid #2a2a2e; border-bottom: 0; display: grid; gap: 12px; font-family: var(--font); box-shadow: 0 -20px 60px -30px rgba(246,191,150,.3); text-align: left; }
.x-phone-card:last-child .x-phone { border-radius: 0 0 42px 42px; border-top: 0; border-bottom: 6px solid #2a2a2e; padding: 18px 14px 12px; box-shadow: 0 20px 60px -30px rgba(246,191,150,.3); }
.x-phone-card:last-child .x-phone-top { display: none; }
.x-phone-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: #fff; padding: 0 8px; }
.x-island { width: 80px; height: 22px; background: #000; border-radius: 999px; }
.x-phone-top span:last-child { font-size: 9px; letter-spacing: 1px; }
.x-ph-head { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 6px 0 10px; border-bottom: 1px solid var(--x-line); }
.x-ph-head strong { font-size: 18px; font-weight: 600; }
.x-ph-q { font-size: 13px; line-height: 1.5; color: #d4d4d8; background: #18181b; border: 1px solid var(--x-line); border-radius: 14px; padding: 12px; }
.x-ph-input { display: flex; align-items: center; gap: 2px; min-height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid #f6bf96; background: #141416; font: 700 18px var(--mono); margin-bottom: 8px; }
.x-caret { width: 2px; height: 20px; background: #f6bf96; animation: x-blink 1s steps(1) infinite; }
@keyframes x-blink { 50% { opacity: 0; } }
.x-chat { display: grid; gap: 10px; }
.x-bubble { font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: 14px; max-width: 86%; }
.x-bubble.q { background: #1f1f22; color: #d4d4d8; border: 1px solid var(--x-line); justify-self: start; transform: rotate(-1.5deg); }
.x-bubble.a { background: #fafafa; color: #18181b; justify-self: end; font-weight: 600; transform: rotate(1deg); }
.x-homebar { justify-self: center; width: 90px; height: 4px; border-radius: 4px; background: #e4e4e7; margin-top: 4px; }
.x-phone-card:first-of-type .x-homebar { display: none; }

/* Split-Abschnitte */
.x-split { max-width: 1280px; margin: 0 auto; padding: 140px 20px 0; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.x-split.rev { grid-template-columns: .85fr 1.15fr; }
.x-split.rev .x-split-media { order: 2; }
.x-split-text { display: grid; gap: 22px; justify-items: start; }
.x-split-media { padding: 40px 0; }
.x-laptop.x-side .x-app { width: 76%; }
.x-laptop.x-side .x-app-body { padding: 14px 16px 16px; gap: 9px; }
.x-laptop.x-side .x-lid { box-shadow: 0 0 0 1px #000, 0 50px 100px -40px rgba(246,191,150,.2); }
.x-split-media.x-reveal { transform: translateX(-40px); }
.x-split.rev .x-split-media.x-reveal { transform: translateX(40px); }
.x-split-media.x-reveal.in { transform: none; }

/* Zahlen */
.x-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.x-num { padding: 30px; display: grid; gap: 6px; }
.x-num strong { font-size: clamp(48px, 5vw, 72px); font-weight: 600; letter-spacing: -.04em; line-height: 1; background: var(--x-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.x-num span { font-size: 20px; font-weight: 600; margin-top: 8px; }
.x-num small { color: var(--x-muted); font-size: 15px; font-family: var(--font); line-height: 1.4; }

/* Ablauf, Formate, Datenschutz, FAQ */
.x-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.x-step { padding: 24px; display: grid; gap: 10px; align-content: start; }
.x-step-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.x-step-top b { font-size: 38px; font-weight: 600; color: #2a2a2e; letter-spacing: -.03em; }
.x-step h3, .x-format h3 { font-size: 21px; font-weight: 500; margin: 0; }
.x-step p, .x-format p { font-size: 15.5px; }
.x-formats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.x-format { padding: 24px; display: grid; gap: 10px; align-content: start; }
.x-sym { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--x-grad); color: #2a1a12; font: 800 16px var(--mono); margin-bottom: 14px; box-shadow: 0 14px 30px -12px rgba(246,191,150,.5); }
.x-privacy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.x-faq { display: grid; gap: 14px; max-width: 900px; width: 100%; margin: 0 auto; }
.x-faq-item { padding: 0; border-radius: 22px; }
.x-faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; font-size: 20px; font-weight: 500; }
.x-faq-item summary::-webkit-details-marker { display: none; }
.x-plus { position: relative; width: 18px; height: 18px; flex: none; }
.x-plus::before, .x-plus::after { content: ""; position: absolute; left: 0; top: 8px; width: 18px; height: 2px; background: var(--x-muted); border-radius: 2px; transition: transform .3s; }
.x-plus::after { transform: rotate(90deg); }
.x-faq-item[open] .x-plus::after { transform: rotate(0); }
.x-faq-item p { margin: 0; padding: 0 26px 24px; color: var(--x-muted); font-size: 17px; line-height: 1.6; font-family: var(--font); }

/* Abschluss & Fußzeile */
.x-final { max-width: 1080px; margin: 140px auto 0; padding: 72px 24px; text-align: center; display: grid; gap: 22px; justify-items: center; border-radius: 36px; border: 1px solid var(--x-line);
  background: radial-gradient(70% 90% at 50% 0%, rgba(246,191,150,.16), transparent 70%), var(--x-card); }
.x-code { display: grid; gap: 8px; justify-items: center; margin-top: 10px; }
.x-code label { color: var(--x-muted); font-size: 15px; font-family: var(--font); }
.x-code > div { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: #0c0c0e; border: 1px solid var(--x-line-2); }
.x-code input { background: transparent; border: 0; color: var(--x-text); font: 700 17px var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 0 16px; width: 210px; outline: none; box-shadow: none; min-height: 46px; }
.x-code input::placeholder { letter-spacing: .02em; text-transform: none; color: var(--x-dim); font-weight: 500; font-family: var(--font); }
.x-footer { max-width: 1280px; margin: 100px auto 0; padding: 30px 20px 48px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; border-top: 1px solid var(--x-line); color: var(--x-muted); font-size: 15px; }
.x-footer .x-brand { font-size: 18px; }
.x-footer .x-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.x-footer-links { display: flex; gap: 20px; }
.x-footer a { color: var(--x-muted); text-decoration: none; }
.x-footer a:hover { color: var(--x-text); }

@media (prefers-reduced-motion: reduce) {
  .x-in, .x-reveal { animation: none; opacity: 1; transform: none; filter: none; transition: none; }
  .x-laptop.x-tilt { transform: none; }
  .x-btn::after, .x-caret { display: none; }
}
@media (max-width: 1100px) {
  .x-links { display: none; }
  .x-nav-in { justify-content: space-between; }
  .x-bento { grid-template-columns: 1fr 1fr; }
  .x-col:nth-child(2) { grid-column: span 2; grid-template-columns: 1fr 1fr; order: 3; }
  .x-steps, .x-formats { grid-template-columns: repeat(3, 1fr); }
  .x-privacy, .x-numbers { grid-template-columns: repeat(2, 1fr); }
  .x-split, .x-split.rev { grid-template-columns: 1fr; gap: 24px; padding-top: 110px; }
  .x-split.rev .x-split-media { order: 0; }
}
@media (max-width: 720px) {
  .x-nav { padding: 10px 12px 0; }
  .x-nav-in { padding: 8px 8px 8px 16px; }
  .x-nav-code { display: none; }
  .x-brand { font-size: 19px; }
  .x-hero { padding-top: 56px; }
  .x-cta .x-btn { flex: 1 1 100%; }
  .x-stage { margin-top: 48px; }
  .x-app { width: 86%; margin-top: 22px; }
  .x-laptop .x-app-body { padding: 10px; gap: 7px; }
  .x-laptop .x-q { font-size: 11px; }
  .x-laptop .x-blocks, .x-laptop .x-opts { display: none; }
  .x-laptop .x-bar { grid-template-columns: 80px 1fr 32px; font-size: 10px; }
  .x-laptop .x-note, .x-laptop .x-ask { display: none; }
  .x-laptop .x-tr { font-size: 10px; }
  .x-laptop .x-tr > span { padding: 3px 0; }
  .x-laptop .x-score b { font-size: 26px; }
  .x-menubar { font-size: 9px; height: 18px; }
  .x-lid { padding: 8px 8px 10px; border-radius: 16px 16px 6px 6px; }
  .x-notch { top: 8px; width: 60px; height: 12px; }
  .x-bento, .x-col:nth-child(2) { grid-template-columns: 1fr; }
  .x-col:nth-child(2) { grid-column: auto; }
  .x-steps, .x-formats, .x-privacy, .x-numbers { grid-template-columns: 1fr; }
  .x-section { padding-top: 88px; }
  .x-statement { height: 180vh; }
  .x-final { margin: 100px 16px 0; padding: 48px 20px; }
  .x-code input { width: 150px; }
  .x-faq-item summary { font-size: 17px; padding: 18px 20px; }
}

/* Druck immer hell */
@media print {
  :root, :root[data-theme] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-solid: #fff; --surface-2: #f6f6f6; --surface-3: #eee; --text: #000; --text-2: #333; --text-3: #555;
    --line: rgba(0,0,0,.12); --line-strong: rgba(0,0,0,.2); --accent: #9a4a22; --neutral-bg: #eee; --blocks-bg: #fff; --ok-bg: #e7f7ec; --warn-bg: #fdf6d8; --bad-bg: #fde8e8; --info-bg: #f8ece3; --info: #7a3a1a; --ok: #166534; --warn: #854d0e; --bad: #991b1b; }
  h1.gradient, .stat .value { background: none; color: #000; -webkit-text-fill-color: #000; }
  .topbar, .tabbar, .xs-list { display: none !important; }
}

/* ---------- Ladebalken & Fortschritt ---------- */
.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000; pointer-events: none; opacity: 0; transition: opacity .25s; }
.loadbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); box-shadow: 0 0 12px rgba(246, 191, 150, .7); }
.loadbar.on { opacity: 1; }
.loadbar.on i { animation: loadbar-run 8s cubic-bezier(.1, .7, .2, 1) forwards; }
.loadbar.done i { animation: none; width: 100%; transition: width .3s ease; }
@keyframes loadbar-run { from { width: 0; } 10% { width: 35%; } 50% { width: 70%; } to { width: 92%; } }
.pbar { display: grid; gap: 8px; width: 100%; }
.pbar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.pbar-label { font-weight: 600; color: var(--text); }
.pbar-pct { font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 600; font-size: 13px; }
.pbar-track { position: relative; height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.pbar-track i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--grad); transition: width .35s var(--ease); }
.pbar-track i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shimmer 1.6s infinite; }
.pbar.indeterminate .pbar-track i { width: 40% !important; animation: pbar-indet 1.3s ease-in-out infinite; }
@keyframes pbar-indet { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.pbar.bad .pbar-track i { background: var(--bad); }
.pbar.bad .pbar-label { color: var(--bad); }
.mail-progress { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 6px; }
.ptoast { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 1500; width: min(380px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line-strong); animation: ask-in .28s var(--spring); }
@media (max-width: 760px) { .ptoast { bottom: 96px; } }
.ai-progress { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
@media (prefers-reduced-motion: reduce) { .loadbar.on i { animation: none; width: 60%; } .pbar-track i::after { animation: none; } .pbar.indeterminate .pbar-track i { animation: none; } }
.timer.paused { color: var(--text-3); }
.timer.paused::after { content: "angehalten"; font: 600 12px var(--font); letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--neutral-bg); }
.fs-hint { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 150; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); font: 600 15px var(--font); cursor: pointer; animation: ask-in .28s var(--spring); }
.fs-hint svg { width: 18px; height: 18px; color: var(--accent); }

/* ---------- Anforderungsbereiche & Noten ---------- */
:root { --afb1: #60a5fa; --afb2: #f6bf96; --afb3: #c084fc; }
:root[data-theme="light"] { --afb1: #2563eb; --afb2: #c2410c; --afb3: #7e22ce; }
@media (prefers-color-scheme: light) { :root[data-theme="auto"] { --afb1: #2563eb; --afb2: #c2410c; --afb3: #7e22ce; } }
.chip.afb { font-weight: 700; letter-spacing: .02em; }
.chip.afb1 { color: var(--afb1); background: color-mix(in srgb, var(--afb1) 14%, transparent); }
.chip.afb2 { color: var(--afb2); background: color-mix(in srgb, var(--afb2) 14%, transparent); }
.chip.afb3 { color: var(--afb3); background: color-mix(in srgb, var(--afb3) 14%, transparent); }
.afb-meter { display: grid; gap: 8px; min-width: 0; }
.afb-meter-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.afb-level { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--neutral-bg); }
.afb-level.lvl-leicht { color: var(--ok); background: var(--ok-bg); }
.afb-level.lvl-mittel { color: var(--warn); background: var(--warn-bg); }
.afb-level.lvl-anspruchsvoll, .afb-level.lvl-schwer { color: var(--afb3); background: color-mix(in srgb, var(--afb3) 14%, transparent); }
.afb-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; gap: 2px; }
.afb-bar i { display: grid; place-items: center; min-width: 0; font-style: normal; font-size: 12.5px; font-weight: 700; color: #0b0b0d; white-space: nowrap; overflow: hidden; transition: flex-grow .3s var(--ease); }
.afb-bar i.afb1 { background: var(--afb1); } .afb-bar i.afb2 { background: var(--afb2); } .afb-bar i.afb3 { background: var(--afb3); }
:root[data-theme="light"] .afb-bar i { color: #fff; }
.afb-scale { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--text-3); }
.afb-scale-track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--ok), var(--warn), var(--afb3)); opacity: .8; }
.afb-scale-track i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 3px solid var(--surface-solid); transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.afb-custom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 460px; }
.afb-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.grade-scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 640px; }
.grade-scale .field > span { font-size: 12.5px; }
.pct-input { display: flex; align-items: center; gap: 4px; }
.pct-input input { min-width: 0; padding-right: 6px; }
.chip.grade-chip { background: var(--grad); color: #1c130d; font-weight: 800; }
.afb-rows { display: grid; gap: 6px; margin-top: 14px; max-width: 560px; }
.afb-row { display: grid; grid-template-columns: 62px 90px 1fr auto; gap: 10px; align-items: center; }
.afb-row .progress { height: 8px; }
@media (max-width: 640px) { .grade-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); } .afb-row { grid-template-columns: 56px 1fr auto; } .afb-row .tiny { display: none; } }
.offline-bar { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--warn-bg); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: 14.5px; line-height: 1.45; }
.offline-bar svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 2px; }
.offline-bar[hidden] { display: none; }

/* ---------- Live-Konsole ---------- */
.lv-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.card.lv-stat { display: grid; gap: 2px; padding: 14px 16px; text-align: left; cursor: pointer; color: var(--text); font: inherit; border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); }
.lv-stat strong { font: 600 28px/1.1 var(--font-display); }
.lv-stat span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.lv-stat.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lv-stat.alert strong { color: var(--bad); }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.lv-tile { display: grid; gap: 12px; padding: 16px; transition: border-color .2s, box-shadow .2s; }
.lv-tile.st-angehalten { border-color: color-mix(in srgb, var(--bad) 60%, transparent); box-shadow: 0 0 0 3px var(--bad-bg); }
.lv-tile.st-offline { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.lv-tile.st-fertig { opacity: .78; }
.lv-head { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.lv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); }
.lv-dot.st-laeuft, .lv-dot.st-nachfragen { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); animation: pulse 2s ease-in-out infinite; }
.lv-dot.st-angehalten { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.lv-dot.st-offline { background: var(--warn); }
.lv-dot.st-fertig { background: var(--ok); }
.lv-name { display: grid; min-width: 0; }
.lv-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-progress { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.lv-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lv-foot .spacer { flex: 1; }
.lv-left { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.lv-left svg { width: 16px; height: 16px; color: var(--text-3); }
.lv-time { font: 700 17px var(--mono); }
.lv-time.low { color: var(--bad); }
@media (max-width: 900px) { .lv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Ablaufprotokoll ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 74px 18px 1fr; gap: 8px; align-items: start; padding: 6px 0; position: relative; font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; left: 82px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline time { font: 600 13px var(--mono); color: var(--text-3); padding-top: 1px; }
.tl-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin: 4px 0 0 1px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--text-3); }
.tl-ok .tl-dot { border-color: var(--ok); background: var(--ok-bg); }
.tl-warn .tl-dot { border-color: var(--warn); background: var(--warn-bg); }
.tl-bad .tl-dot { border-color: var(--bad); background: var(--bad-bg); }
.tl-info .tl-dot, .tl-accent .tl-dot { border-color: var(--accent); background: var(--accent-soft); }
.timeline .tl-gap { display: block; padding: 6px 0 6px 100px; color: var(--text-3); font-size: 13px; }
.timeline .tl-gap::before { display: none; }

/* ---------- KI-Kosten ---------- */
.usage-block { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.usage-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.budget-cell { display: grid; gap: 6px; min-width: 150px; }
.progress.over > i { background: var(--bad); }

/* ---------- Aktionsleiste der Aufgabe ---------- */
.asg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.asg-toolbar .switch { flex: 0 1 auto; }
.asg-actions { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.asg-actions::-webkit-scrollbar { display: none; }
.asg-actions .btn { flex: none; }

/* ---------- Live-Konsole als Tabelle ---------- */
.lv-table td, .lv-table th { white-space: nowrap; }
.lv-table td { padding-top: 10px; padding-bottom: 10px; }
.lv-who { display: flex; align-items: center; gap: 10px; }
.lv-who > div { display: flex; align-items: center; gap: 8px; }
.lv-who .name { color: var(--text); text-decoration: none; font-weight: 650; }
.lv-who .name:hover { color: var(--accent); }
.lv-extra { font-size: 12px; }
.lv-prog { min-width: 150px; }
.lv-progress { display: grid; grid-template-columns: minmax(80px, 1fr) auto; gap: 8px; align-items: center; }
.lv-actions { display: flex; gap: 6px; justify-content: flex-end; }
.lv-row.st-angehalten td { background: color-mix(in srgb, var(--bad-bg) 70%, transparent); }
.lv-row.st-offline td { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
.lv-row.st-fertig td { color: var(--text-2); }
.lv-row.st-fertig .lv-dot { opacity: .7; }
.lv-progress { grid-template-columns: minmax(70px, 1fr) auto; }
.lv-progress .lv-sub { grid-column: 1 / -1; margin-top: -2px; }
.lv-prog { min-width: 140px; width: 28%; }
.lv-table td:last-child { width: 1%; }

/* ---------- Aufgabenübersicht als Tabelle ---------- */
.asg-table td { vertical-align: middle; }
.asg-table th.num, .asg-table td.num { text-align: center; font-variant-numeric: tabular-nums; }
.asg-row-title { color: var(--text); text-decoration: none; font-weight: 650; font-size: 15.5px; }
.asg-row-title:hover { color: var(--accent); }
.asg-steps.compact { width: 130px; gap: 3px; }
.asg-steps.compact li { gap: 0; }
.asg-row-next { text-align: right; white-space: nowrap; }
.segmented button svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
@media (max-width: 900px) { .asg-table th:nth-child(4), .asg-table td:nth-child(4), .asg-table th:nth-child(5), .asg-table td:nth-child(5) { display: none; } }
