:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --ink-2: rgba(0, 0, 0, 0.62);
  --ink-3: rgba(0, 0, 0, 0.4);
  --line: #e5e5e5;
  --line-2: #f2f2f2;
  --chip: #f2f2f2;
  --dark: #383838;
  --dark-edge: #000000;
  --grey-btn: #e5e5e5;
  --grey-edge: #c4c4c4;
  --blue: #2945c9;
  --blue-soft: #eef1fd;
  --blue-edge: #1c2f8f;
  --green: #5ed981;
  --green-btn: #58d27c;
  --green-edge: #2ba152;
  --green-ink: #138a3b;
  --green-soft: #e3f8e9;
  --green-bubble: #c9f1d5;
  --yellow: #f9d25c;
  --yellow-btn: #f9cd4a;
  --yellow-edge: #d9a514;
  --yellow-ink: #7a5a00;
  --yellow-soft: #fff7dc;
  --yellow-bubble: #fde5a0;
  --red: #f0675a;
  --gold-1: #ffd451;
  --gold-2: #f2b21c;
  --gold-3: #c98a00;
  --purple: #b38cff;
  --code-bg: #fafafa;
  --kw: #7a3fd1;
  --ty: #2945c9;
  --str: #b4561b;
  --num: #0f8a7e;
  --com: #8a8a8a;
  --fn: #a2305e;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1b1b1b; --ink: #ffffff; --ink-2: rgba(255,255,255,0.68); --ink-3: rgba(255,255,255,0.42);
    --line: #333333; --line-2: #262626; --chip: #2a2a2a; --dark: #f2f2f2; --dark-edge: #8c8c8c; --grey-btn: #3a3a3a; --grey-edge: #1f1f1f;
    --blue: #7d93ff; --blue-soft: #1c2346; --blue-edge: #4e63cc; --green-soft: #143222; --green-bubble: #1f5b35; --green-ink: #7ef0a0;
    --yellow-soft: #3a3014; --yellow-bubble: #6b5414; --yellow-ink: #ffe08a; --code-bg: #171717;
    --kw: #c49bff; --ty: #8fa6ff; --str: #f0a46b; --num: #5fd3c4; --com: #8a8a8a; --fn: #f08bb6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1b1b1b; --ink: #ffffff; --ink-2: rgba(255,255,255,0.68); --ink-3: rgba(255,255,255,0.42);
  --line: #333333; --line-2: #262626; --chip: #2a2a2a; --dark: #f2f2f2; --dark-edge: #8c8c8c; --grey-btn: #3a3a3a; --grey-edge: #1f1f1f;
  --blue: #7d93ff; --blue-soft: #1c2346; --blue-edge: #4e63cc; --green-soft: #143222; --green-bubble: #1f5b35; --green-ink: #7ef0a0;
  --yellow-soft: #3a3014; --yellow-bubble: #6b5414; --yellow-ink: #ffe08a; --code-bg: #171717;
  --kw: #c49bff; --ty: #8fa6ff; --str: #f0a46b; --num: #5fd3c4; --com: #8a8a8a; --fn: #f08bb6;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
code, pre, .code, .gap, .chip, .tile, .answer, .stg, .umlbox, table.trace, .anat-part button, .var, .sort-item .what, .tline { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--chip); padding: 0.12em 0.4em; border-radius: 4px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; color: var(--ink-3); }

/* ---------- 3D-Buttons (gesichtsflaeche + kante) ---------- */
.b3 { --face: var(--dark); --edge: var(--dark-edge); --fg: var(--bg); appearance: none; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 56px; display: inline-block; text-decoration: none; position: relative; min-width: 0; }
.b3 > span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 28px; border-radius: 56px; background: var(--face); color: var(--fg); font-weight: 600; font-size: 16px; white-space: nowrap; box-shadow: 0 4px 0 var(--edge); transform: translateY(-4px); transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background-color 0.3s; }
.b3:hover:not(:disabled) > span { filter: brightness(1.06); }
.b3:active:not(:disabled) > span { transform: translateY(0); box-shadow: 0 0 0 var(--edge); }
.b3:disabled { cursor: default; }
.b3:disabled > span { --face: var(--line-2); --edge: var(--line-2); --fg: var(--ink-3); transform: translateY(0); box-shadow: none; }
.b3.green { --face: var(--green-btn); --edge: var(--green-edge); --fg: #fff; }
.b3.yellow { --face: var(--yellow-btn); --edge: var(--yellow-edge); --fg: #3d2c00; }
.b3.grey { --face: var(--grey-btn); --edge: var(--grey-edge); --fg: var(--ink); }
.b3.blue { --face: var(--blue); --edge: var(--blue-edge); --fg: #fff; }
.b3.gold { --face: linear-gradient(180deg, #ffd955, #f7bd23); --edge: var(--gold-3); --fg: #3d2c00; }
.b3.gold > span { background: linear-gradient(180deg, #ffd955, #f7bd23); }
.b3.white { --face: var(--surface); --edge: var(--line); --fg: var(--ink); }
.b3.white > span { border: 2px solid var(--line); }
.b3.wide { width: 100%; }
.b3.wide > span { width: 100%; }
.b3.sm > span { height: 38px; padding: 0 18px; font-size: 15px; }

/* ---------- Top-Navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.brand-mark { width: 26px; height: 26px; border: 3px solid var(--ink); border-radius: 5px; position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; left: 0; right: 0; top: 7px; border-top: 3px solid var(--ink); }
.nav { display: flex; gap: 22px; height: 100%; }
.nav a { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink-2); font-size: 16px; position: relative; }
.nav a svg { width: 18px; height: 18px; }
.nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ink); border-radius: 3px 3px 0 0; }
.top-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; font-size: 18px; background: var(--surface); cursor: default; }
.pill svg { width: 18px; height: 18px; }
.pill.streak svg { color: #ff9600; }
.pill.streak.off svg { color: var(--ink-3); }
.pill.xp svg { color: var(--green-btn); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Startseite ---------- */
.home { max-width: 1000px; margin: 0 auto; padding: 40px 16px 80px; }
.welcome { font-size: 22px; font-weight: 700; margin: 0 0 18px; }
.dash { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.card-b { background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 20px; }
.card-b h2 { font-size: 20px; margin: 0 0 4px; }
.card-b p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.streak-big { display: flex; align-items: center; gap: 8px; font-size: 34px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.streak-big svg { width: 30px; height: 30px; color: #ff9600; }
.streak-big.off svg { color: var(--ink-3); }
.week { display: flex; gap: 6px; margin: 14px 0 6px; }
.week .d { flex: 1; display: grid; justify-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.week .d i { width: 30px; height: 30px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; }
.week .d i svg { width: 16px; height: 16px; color: #fff; opacity: 0; }
.week .d.on i { background: #ff9600; }
.week .d.on i svg { opacity: 1; }
.week .d.today { color: var(--ink); }
.week .d.today i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #ffc46b; }
.goal { margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--line-2); }
.goal-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.bar { height: 12px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--green-btn); border-radius: 99px; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.continue-card { text-align: center; padding: 26px 24px 22px; position: relative; overflow: hidden; }
.continue-card .lvl { font-size: 12px; font-weight: 700; color: var(--gold-3); letter-spacing: 0.04em; }
.continue-card h3 { font-size: 26px; margin: 6px 0 2px; }
.next-list { text-align: left; margin: 16px 0 18px; display: grid; gap: 4px; }
.next-list div { display: flex; align-items: center; gap: 12px; padding: 8px 6px; font-weight: 600; }
.next-list div.dim { color: var(--ink-3); font-weight: 500; }
.next-list .disc-s { width: 40px; height: 30px; flex: none; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.mini-grid .card-b { display: flex; flex-direction: column; }
.mini-grid .card-b .b3 { margin-top: auto; }
.tagline { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 4px; display: block; }
.warn-card { border-color: #ffe08a; background: var(--yellow-soft); }

/* ---------- Kurs-Karte ---------- */
.course { max-width: 1000px; margin: 0 auto; padding: 32px 16px 160px; display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.course-info { position: sticky; top: 96px; }
.course-info .ico { width: 84px; height: 84px; margin-bottom: 14px; }
.course-info h1 { font-size: 26px; margin: 0 0 6px; }
.course-info p { color: var(--ink-2); margin: 0 0 14px; }
.course-meta { display: flex; gap: 18px; font-size: 14px; color: var(--ink-2); }
.path-col { display: grid; gap: 28px; }
.level-pill { position: sticky; top: 80px; z-index: 5; text-align: center; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 10px 16px; box-shadow: 0 4px 0 var(--line); max-width: 460px; margin: 0 auto; width: 100%; }
.level-pill.cur { border-color: var(--yellow); box-shadow: 0 4px 0 var(--yellow); }
.level-pill .lvl { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.04em; }
.level-pill.cur .lvl { color: var(--gold-3); }
.level-pill.mastered .lvl { color: var(--green-ink); }
.level-pill h2 { font-size: 18px; font-weight: 600; margin: 0; }
.nodes { display: grid; gap: 18px; padding: 22px 0 4px; }
.node-row { display: flex; align-items: center; gap: 22px; max-width: 460px; margin: 0 auto; width: 100%; }
.node-row[data-off="0"] { padding-left: 40px; }
.node-row[data-off="1"] { padding-left: 100px; }
.node-row[data-off="2"] { padding-left: 150px; }
.node-row[data-off="3"] { padding-left: 100px; }
.disc { width: 92px; height: 68px; flex: none; border: 0; background: none; cursor: pointer; position: relative; padding: 0; }
.disc svg.dsc { width: 100%; height: 100%; overflow: visible; transition: transform 0.12s; }
.disc:active svg.dsc { transform: translateY(3px); }
.disc .mascot-on { position: absolute; left: 50%; bottom: 34px; width: 52px; height: 52px; transform: translateX(-50%); animation: floaty 1.2s linear infinite; pointer-events: none; }
.disc .ring { position: absolute; inset: -8px -12px -2px; border-radius: 50%; border: 3px solid var(--gold-1); opacity: 0.8; transform: scaleY(0.62) translateY(18%); pointer-events: none; }
.node-label { background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer; font-size: 16px; line-height: 1.3; color: var(--ink); }
.node-label.done { color: var(--ink-3); }
.node-label span { display: block; font-size: 13px; color: var(--ink-3); }
@keyframes floaty { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }
.just-done svg.dsc { animation: discPop 0.7s cubic-bezier(.3,1.6,.5,1) 0.3s both; }
@keyframes discPop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }

.popover { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 30; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.popover-card { pointer-events: auto; width: min(450px, 100%); background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 20px; text-align: center; box-shadow: 0 16px 50px -12px rgba(0, 0, 0, 0.25); animation: popIn 0.25s cubic-bezier(.2,.9,.3,1.2); }
.popover-card h3 { font-size: 20px; margin: 0 0 4px; }
.popover-card p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.popover-card .lvl { font-size: 12px; font-weight: 700; color: var(--ink-3); }
@keyframes popIn { from { transform: translateY(16px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.scrim { position: fixed; inset: 0; z-index: 25; }
.footer-links { max-width: 1000px; margin: 0 auto; padding: 0 16px 40px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.footer-links button { background: none; border: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; padding: 0; font-size: 13px; }

/* ---------- Lern-Player ---------- */
.player { height: 100vh; height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.player::before { content: ""; position: fixed; inset: auto 0 0 0; height: 45vh; pointer-events: none; opacity: 0; transition: opacity 0.5s, background 0.5s; z-index: 0; }
.player.tint-ok::before { opacity: 1; background: linear-gradient(to top, rgba(94, 217, 129, 0.16), rgba(94, 217, 129, 0)); }
.player.tint-hint::before { opacity: 1; background: linear-gradient(to top, rgba(249, 210, 92, 0.2), rgba(249, 210, 92, 0)); }
.player-top { position: relative; z-index: 2; height: 60px; display: grid; grid-template-columns: 1fr minmax(0, 590px) 1fr; align-items: center; padding: 0 24px; gap: 16px; }
.player-top .left { display: flex; gap: 8px; }
.prog { display: flex; align-items: center; gap: 8px; }
.prog .track { flex: 1; height: 12px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.prog .track i { display: block; height: 100%; width: 0; background: #2fcf62; border-radius: 99px; transition: width 0.5s cubic-bezier(.3,.8,.3,1); }
.prog .dot { width: 14px; height: 10px; border-radius: 99px; background: var(--line-2); transition: background 0.3s, width 0.3s; flex: none; }
.prog .dot.cur { width: 20px; background: #cfcfcf; }
.prog .dot.ok { background: #2fcf62; }
.prog .dot.bad { background: var(--yellow); }
.top-stats { justify-self: end; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.xpc { display: flex; align-items: center; gap: 4px; color: var(--ink-3); transition: color 0.3s; }
.xpc.has { color: var(--ink); }
.xpc svg { width: 22px; height: 22px; color: var(--ink-3); transition: color 0.3s; }
.xpc.has svg { color: #2fcf62; }
.xpc.pulse { animation: xpPulse 0.58s linear; }
@keyframes xpPulse { 0%, 100% { transform: scale(1); } 60% { transform: scale(1.2); } }
.combo { display: flex; align-items: center; gap: 3px; color: #ff9600; font-weight: 800; opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.3s cubic-bezier(.3,1.8,.5,1); }
.combo.on { opacity: 1; transform: scale(1); }
.combo svg { width: 18px; height: 18px; }

.stage { position: relative; z-index: 1; flex: 1; min-height: 0; margin: 0 32px 32px; background: var(--surface); border: 2px solid var(--line); border-radius: 24px; display: flex; flex-direction: column; transition: border-color 0.5s ease; --border-glow-color: var(--green); }
.stage.ok { border-color: var(--green); animation: borderGlow 1s linear; }
.stage.hint { border-color: var(--yellow); --border-glow-color: var(--yellow); }
.stage.bad { border-color: var(--yellow); }
@keyframes borderGlow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--border-glow-color) 40%, transparent); } 50% { box-shadow: 0 0 20px 8px color-mix(in srgb, var(--border-glow-color) 30%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.stage-body { flex: 1; min-height: 0; overflow: auto; padding: 48px 24px 24px; }
.card { max-width: 560px; margin: 0 auto; }
.card.wide { max-width: 780px; }
.card.enter { animation: cardIn 0.35s cubic-bezier(.2,.8,.2,1); }
.card.leave { animation: cardOut 0.18s ease-in forwards; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cardOut { to { opacity: 0; transform: translateY(-6px); } }
.card h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 18px; }
.card .q { font-weight: 700; font-size: 17px; margin: 0 0 18px; }
.card p { margin: 0 0 16px; }
.card ul, .card ol { margin: 0 0 16px; padding-left: 1.25em; }
.card li { margin-bottom: 6px; }
.lead { font-size: 17px; }
.note { background: var(--chip); padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-size: 15px; }
.note.warn { background: var(--yellow-soft); }
.note.tip { background: var(--blue-soft); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; letter-spacing: 0.03em; }
.tag.try { color: #b26b00; background: var(--yellow-soft); padding: 3px 10px; border-radius: 99px; }
.tag.tryok { color: var(--green-ink); background: var(--green-soft); padding: 3px 10px; border-radius: 99px; }
.card.shake { animation: shakeX 0.45s linear; }
.stage-foot.shake { animation: shakeXInv 0.45s linear; }
@keyframes shakeX { 0% { transform: translate(0); } 12% { transform: translate(-9px); } 30% { transform: translate(9px); } 48% { transform: translate(-7px); } 65% { transform: translate(5px); } 80% { transform: translate(-3px); } 90% { transform: translate(2px); } 100% { transform: translate(0); } }
@keyframes shakeXInv { 0% { transform: translate(0); } 12% { transform: translate(9px); } 30% { transform: translate(-9px); } 48% { transform: translate(7px); } 65% { transform: translate(-5px); } 80% { transform: translate(3px); } 90% { transform: translate(-2px); } 100% { transform: translate(0); } }

.stage-foot { position: relative; min-height: 96px; display: flex; align-items: center; justify-content: center; padding: 14px 24px 18px; }
.foot-actions { display: flex; gap: 10px; justify-content: center; width: min(420px, 100%); }
.foot-actions.out { position: absolute; pointer-events: none; animation: slideOut 0.2s linear forwards; }
.foot-actions.in { animation: slideIn 0.2s cubic-bezier(.25,.1,.25,1) 0.2s both; }
@keyframes slideOut { to { opacity: 0; transform: translateY(12px); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.foot-actions .b3 { flex: 1; }
.foot-actions .b3.grow { flex: 2.2; }
.foot-actions.single .b3 { max-width: 367px; }
.mascot { position: absolute; left: -26px; bottom: -26px; width: 82px; height: 82px; z-index: 3; transition: transform 0.3s; }
.mascot.hop { animation: hop 0.6s cubic-bezier(.3,1.5,.5,1); }
@keyframes hop { 0% { transform: translateY(0); } 35% { transform: translateY(-14px) rotate(-6deg); } 70% { transform: translateY(0) rotate(3deg); } 100% { transform: none; } }
.bubble { position: absolute; left: 66px; bottom: 88px; max-width: min(320px, 40%); padding: 10px 14px; border-radius: 14px; font-size: 14.5px; font-weight: 600; line-height: 1.4; background: var(--chip); color: var(--ink); animation: bubbleIn 0.38s ease-out 0.1s both; z-index: 3; }
.bubble.ok { background: var(--green-bubble); }
.bubble.hint { background: var(--yellow-bubble); }
.bubble code { background: rgba(255,255,255,0.55); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
.verdict { position: absolute; left: 40px; bottom: 30px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; animation: bubbleIn 0.3s ease-out both; }
.verdict svg { width: 30px; height: 30px; }
.verdict.ok { color: var(--ink); }
.verdict.bad { color: var(--ink); }
.verdict small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }

.flyxp { position: fixed; z-index: 60; pointer-events: none; display: flex; gap: 4px; align-items: center; background: var(--green-bubble); color: var(--green-ink); font-weight: 800; font-size: 16px; padding: 6px 12px; border-radius: 99px; }
.flyxp svg { width: 16px; height: 16px; }
.badge { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; animation: scaleIn 0.3s cubic-bezier(.3,1.6,.5,1) both; z-index: 2; box-shadow: 0 0 0 2px var(--surface); }
.badge svg { width: 13px; height: 13px; }
.badge.ok { background: #2fcf62; }
.badge.hint { background: var(--yellow-btn); color: #3d2c00; }
@keyframes scaleIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

/* Antwortoptionen */
.opts { display: grid; gap: 12px; }
.opts.cols-2 { grid-template-columns: 1fr 1fr; }
.opt { position: relative; text-align: left; cursor: pointer; width: 100%; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 13px 16px; font-size: 16px; line-height: 1.45; box-shadow: 0 4px 0 var(--line); transform: translateY(-2px); transition: border-color 0.15s, background-color 0.15s, box-shadow 0.1s, transform 0.1s; display: flex; gap: 12px; align-items: center; color: var(--ink); }
.opt:hover:not(:disabled) { border-color: #cfcfcf; box-shadow: 0 4px 0 #cfcfcf; }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 var(--line); }
.opt.sel { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 4px 0 var(--blue); }
.opt.mark-ok { border-color: #2fcf62; background: var(--green-soft); box-shadow: 0 4px 0 #2fcf62; }
.opt.mark-bad, .opt.mark-hint { border-color: var(--yellow); background: var(--yellow-soft); box-shadow: 0 4px 0 var(--yellow-edge); }
.opt:disabled { cursor: default; }
.opt .code { margin: 0; flex: 1; border: 0; background: none; padding: 0; font-size: 14px; }
.opt .code .ln { padding-left: 0; }
.opt-letter { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.opt.sel .opt-letter { border-color: var(--blue); background: var(--blue); color: #fff; }
.opts.multi .opt-letter { border-radius: 6px; }

/* Code */
.code { font-family: var(--mono); font-size: 14px; line-height: 1.65; background: var(--code-bg); border: 2px solid var(--line-2); border-radius: 14px; padding: 12px 0; margin: 0 0 18px; overflow-x: auto; white-space: pre; tab-size: 4; }
.code .ln { display: block; padding: 0 16px 0 0; min-height: 1.65em; }
.code .ln::before { content: attr(data-n); display: inline-block; width: 2.6em; padding-right: 1em; text-align: right; color: var(--ink-3); opacity: 0.6; user-select: none; }
.code.nonum .ln::before { display: none; }
.code.nonum .ln { padding-left: 16px; }
.code .ln.hl { background: color-mix(in srgb, var(--yellow) 30%, transparent); box-shadow: inset 4px 0 0 var(--yellow-btn); }
.t-kw { color: var(--kw); font-weight: 600; } .t-ty { color: var(--ty); } .t-str { color: var(--str); } .t-num { color: var(--num); } .t-com { color: var(--com); font-style: italic; } .t-fn { color: var(--fn); }

/* Fehlerjagd: Zeile antippen */
.tap-code { padding: 8px 0; }
.tline { display: block; width: 100%; text-align: left; border: 0; background: none; font-family: var(--mono); font-size: 14px; line-height: 1.65; white-space: pre; padding: 1px 16px 1px 0; cursor: pointer; color: var(--ink); position: relative; }
.tline::before { content: attr(data-n); display: inline-block; width: 2.6em; padding-right: 1em; text-align: right; color: var(--ink-3); opacity: 0.6; }
.tline:hover:not(:disabled) { background: var(--line-2); }
.tline.sel { background: var(--blue-soft); box-shadow: inset 4px 0 0 var(--blue); }
.tline.mark-ok { background: var(--green-soft); box-shadow: inset 4px 0 0 #2fcf62; }
.tline.mark-bad, .tline.mark-hint { background: var(--yellow-soft); box-shadow: inset 4px 0 0 var(--yellow-btn); }
.tline:disabled { cursor: default; }

/* Luecken */
.gap { position: relative; font-family: var(--mono); font-size: 14px; min-width: 3.4em; padding: 2px 9px; margin: 0 1px; border: 2px dashed #bdbdbd; border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--ink); line-height: 1.35; }
.gap.active { border-style: solid; border-color: var(--blue); background: var(--blue-soft); }
.gap.filled { border-style: solid; border-color: #9e9e9e; }
.gap.mark-ok { border: 2px solid #2fcf62; background: var(--green-soft); }
.gap.mark-bad, .gap.mark-hint { border: 2px solid var(--yellow-btn); background: var(--yellow-soft); }
input.gap { cursor: text; width: 7em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; min-height: 48px; }
.chip { font-family: var(--mono); font-size: 15px; cursor: pointer; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 7px 14px; box-shadow: 0 4px 0 var(--line); transform: translateY(-2px); transition: transform 0.1s, box-shadow 0.1s; color: var(--ink); }
.chip:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.chip:hover:not(:disabled) { border-color: #cfcfcf; }
.chips-label { font-size: 14px; color: var(--ink-3); margin: 0 0 8px; }

/* Reihenfolge (Parsons) */
.order-slots { min-height: 66px; border: 2px dashed var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 8px; margin-bottom: 14px; }
.order-slots.inline { display: flex; flex-wrap: wrap; }
.order-slots:empty::before { content: attr(data-empty); color: var(--ink-3); font-size: 14px; align-self: center; padding: 6px; }
.order-pool { display: grid; gap: 10px; }
.order-pool.inline { display: flex; flex-wrap: wrap; }
.tile { font-family: var(--mono); font-size: 14px; text-align: left; white-space: pre; cursor: pointer; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; box-shadow: 0 4px 0 var(--line); transform: translateY(-2px); overflow-x: auto; color: var(--ink); transition: transform 0.1s, box-shadow 0.1s; animation: tileIn 0.2s ease-out; }
@keyframes tileIn { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.tile.plain { font-family: var(--font); white-space: normal; font-size: 15px; }
.tile:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.tile:disabled { opacity: 0.4; cursor: default; }
.tile.mark-ok { border-color: #2fcf62; background: var(--green-soft); box-shadow: 0 4px 0 #2fcf62; }
.tile.mark-bad, .tile.mark-hint { border-color: var(--yellow); background: var(--yellow-soft); box-shadow: 0 4px 0 var(--yellow-edge); }

/* Zuordnen */
.sort-list { display: grid; gap: 10px; }
.sort-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.sort-item .what { font-family: var(--mono); font-size: 14px; overflow-x: auto; }
.sort-item .what.plain { font-family: var(--font); font-size: 15.5px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 11px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); border-radius: 8px; transition: background 0.15s; }
.seg button.sel { background: var(--surface); color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.sort-item.mark-ok { border-color: #2fcf62; background: var(--green-soft); }
.sort-item.mark-bad, .sort-item.mark-hint { border-color: var(--yellow); background: var(--yellow-soft); }
.sort-item .fix { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--green-ink); }

/* Tracetabelle */
.trace-wrap { overflow-x: auto; margin-bottom: 16px; }
table.trace { border-collapse: separate; border-spacing: 0; font-family: var(--mono); font-size: 14px; min-width: 100%; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
table.trace th, table.trace td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px 8px; text-align: center; white-space: nowrap; }
table.trace tr:last-child td { border-bottom: 0; }
table.trace th:last-child, table.trace td:last-child { border-right: 0; }
table.trace th { background: var(--line-2); font-weight: 700; font-family: var(--font); }
table.trace td:first-child, table.trace th:first-child { text-align: left; font-family: var(--font); color: var(--ink-2); }
table.trace input { width: 100%; min-width: 4.2em; font-family: var(--mono); font-size: 14px; text-align: center; border: 2px dashed #bdbdbd; border-radius: 8px; padding: 4px; background: var(--surface); color: var(--ink); }
table.trace input:focus { border-style: solid; border-color: var(--blue); outline: none; }
table.trace input.mark-ok { border: 2px solid #2fcf62; background: var(--green-soft); }
table.trace input.mark-bad, table.trace input.mark-hint { border: 2px solid var(--yellow-btn); background: var(--yellow-soft); }

/* Texteingabe */
.answer-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.answer-row label { font-weight: 600; min-width: 5.5em; }
.answer { flex: 1; min-width: 160px; font-family: var(--mono); font-size: 17px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.answer:focus { outline: none; border-color: var(--blue); }
.answer.mark-ok { border-color: #2fcf62; background: var(--green-soft); }
.answer.mark-bad, .answer.mark-hint { border-color: var(--yellow-btn); background: var(--yellow-soft); }
.solution { font-size: 14px; font-weight: 700; color: var(--green-ink); margin: -4px 0 10px; }
textarea.answer.mono { font-family: var(--mono); font-size: 14px; min-height: 180px; tab-size: 4; }
.model .umls, .model .stg { margin-top: 8px; }
.model .umlbox, .model .stg { background: var(--surface); }
.paper-task { border: 2px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.paper-task h3 { font-size: 16px; margin: 0 0 8px; }
.paper-task .pts { float: right; font-size: 13px; color: var(--ink-3); font-weight: 700; }
.paper-task details { margin-top: 10px; }
.paper-task summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.paper-task details > div { background: var(--green-soft); border-radius: 12px; padding: 12px 14px; margin-top: 8px; }
@media print { .topbar, .footer-links, .noprint { display: none !important; } .paper-task { break-inside: avoid; } details > div { display: none; } }
textarea.answer { width: 100%; min-height: 140px; font-family: var(--font); font-size: 16px; line-height: 1.5; resize: vertical; }
.rubric { border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; animation: cardIn 0.3s ease-out; }
.rubric h4 { margin: 0 0 8px; font-size: 15px; }
.rubric label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-size: 15px; }
.rubric input { width: 20px; height: 20px; margin-top: 2px; accent-color: #2fcf62; flex: none; }
.model { background: var(--green-soft); border-radius: 14px; padding: 14px 16px; margin-top: 14px; font-size: 15px; animation: cardIn 0.3s ease-out; }
.model b { display: block; margin-bottom: 4px; }

/* Sicherheit */
.conf { margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.conf .seg button.sel { color: var(--ink); }

/* Stepper */
.stepper { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(190px, 1fr); gap: 16px; align-items: start; }
.vars { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.vars h4 { margin: 0; padding: 8px 12px; font-size: 12px; color: var(--ink-3); background: var(--line-2); font-weight: 700; letter-spacing: 0.03em; }
.var { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; font-family: var(--mono); font-size: 14px; border-top: 1px solid var(--line); }
.var b { font-weight: 600; color: var(--ink-2); }
.var.changed { background: var(--yellow-soft); }
.var.changed span { animation: scaleIn 0.3s cubic-bezier(.3,1.6,.5,1); display: inline-block; }
.out { margin-top: 10px; border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; font-family: var(--mono); font-size: 14px; background: var(--code-bg); min-height: 2.4em; white-space: pre-wrap; }
.out:empty::before { content: "Ausgabe"; color: var(--ink-3); font-family: var(--font); }
.step-note { min-height: 3.2em; font-size: 15.5px; margin: 6px 0 12px; }
.step-ctrl { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.step-count { font-size: 13px; color: var(--ink-3); margin-left: auto; }

/* Anatomie */
.anat { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; justify-content: center; margin: 8px 0 20px; }
.anat-part { display: grid; justify-items: center; gap: 8px; }
.anat-part button { font-family: var(--mono); font-size: 18px; padding: 10px 14px; border-radius: 12px; cursor: pointer; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transform: translateY(-2px); white-space: pre; color: var(--ink); transition: transform 0.1s, box-shadow 0.1s, border-color 0.2s; }
.anat-part button:active { transform: translateY(2px); box-shadow: none; }
.anat-part button.seen { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue); }
.anat-part .lab { font-size: 13px; font-weight: 700; color: var(--blue); max-width: 11em; text-align: center; min-height: 1.4em; }
.anat-part .lab.hidden { color: transparent; }
.anat-part .lab.hidden::before { content: "?"; color: var(--ink-3); }
.anat-part .lab:not(.hidden) { animation: scaleIn 0.25s ease-out; }

/* UML */
.umlbox { display: inline-block; min-width: 230px; max-width: 100%; border: 2px solid var(--ink); background: var(--surface); font-family: var(--mono); font-size: 13.5px; margin: 0 12px 16px 0; vertical-align: top; border-radius: 4px; }
.umlbox > div { padding: 7px 12px; border-top: 2px solid var(--ink); white-space: pre; overflow-x: auto; line-height: 1.6; }
.umlbox > div:first-child { border-top: 0; text-align: center; font-weight: 700; font-family: var(--font); font-size: 15.5px; }
.umlbox.obj > div:first-child { text-decoration: underline; text-underline-offset: 3px; }
.umls { display: flex; flex-wrap: wrap; align-items: flex-start; }

/* Struktogramm */
.stg { border: 2px solid var(--ink); background: var(--surface); margin: 0 0 18px; max-width: 560px; border-radius: 3px; }
.stg-title { font-weight: 700; padding: 6px 10px; border-bottom: 2px solid var(--ink); font-family: var(--mono); font-size: 13.5px; }
.stg .s { padding: 8px 10px; border-top: 1.5px solid var(--ink); font-family: var(--mono); font-size: 13.5px; }
.stg .seq > :first-child { border-top: 0; }
.stg .seq { display: flex; flex-direction: column; }
.stg .if, .stg .loop, .stg .sw { border-top: 1.5px solid var(--ink); }
.stg .seq > .if:first-child, .stg .seq > .loop:first-child, .stg .seq > .sw:first-child { border-top: 0; }
.stg .if-head { position: relative; height: 64px; }
.stg .if-head svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stg .if-head svg line { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stg .if-cond { position: absolute; left: 0; right: 0; top: 6px; text-align: center; font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.stg .if-w, .stg .if-f { position: absolute; bottom: 4px; font-size: 12.5px; color: var(--ink-2); }
.stg .if-w { left: 8px; } .stg .if-f { right: 8px; }
.stg .if-body { display: grid; grid-template-columns: 1fr 1fr; border-top: 1.5px solid var(--ink); }
.stg .if-body > .seq + .seq { border-left: 1.5px solid var(--ink); }
.stg .if-body .seq:empty::before { content: "∅"; padding: 8px; color: var(--ink-3); text-align: center; }
.stg .loop-head { padding: 8px 10px; font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.stg .loop-body { margin-left: 26px; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.stg .sw-head { padding: 6px 10px; text-align: center; font-family: var(--mono); font-weight: 600; font-size: 13.5px; border-bottom: 1.5px solid var(--ink); }
.stg .sw-cases { display: grid; }
.stg .sw-case { border-left: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.stg .sw-case:first-child { border-left: 0; }
.stg .sw-lab { padding: 4px 6px; text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); border-bottom: 1.5px solid var(--ink); }
.stg .sw-case .s { border-top: 0; text-align: center; padding: 6px 4px; }

/* Bits */
.bitgroup { display: inline-block; margin: 0 10px 12px 0; }
.bitgroup small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.bits { display: inline-flex; gap: 3px; }
.bits span { width: 26px; height: 44px; border: 2px solid var(--ink); border-radius: 3px; display: grid; place-items: end center; font-family: var(--mono); font-size: 12px; padding-bottom: 2px; }
.bits span.b1 { background: var(--ink); color: var(--bg); }

table.cmp { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 15px; }
table.cmp th, table.cmp td { border-bottom: 2px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }
table.cmp th { font-size: 13px; color: var(--ink-3); }
table.cmp td code { white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.subgoal { display: inline-block; font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 6px; padding: 1px 8px; margin-right: 6px; }

/* Zwischenbildschirm + Endbildschirme */
.full { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: safe center; padding: 32px 16px 120px; text-align: center; overflow-y: auto; }
.full > * { flex-shrink: 0; }
.full .foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 28px 16px 32px; background: linear-gradient(to bottom, transparent, var(--bg) 45%); }
.full .foot .b3 { width: min(367px, 100%); }
.full .foot .b3 > span { width: 100%; }
.full h1 { font-size: 34px; font-weight: 800; margin: 18px 0 6px; letter-spacing: -0.01em; }
.full .title-in { animation: titleIn 0.5s ease-in-out 0.9s both; }
@keyframes titleIn { from { opacity: 0; transform: translateY(30%); } to { opacity: 1; transform: none; } }
.full .fade-in { animation: fadeIn 0.5s cubic-bezier(0,0,.2,1) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pedestal { position: relative; width: 240px; height: 230px; }
.pedestal .beam { position: absolute; left: 50%; bottom: 46px; width: 130px; height: 190px; transform: translateX(-50%); background: linear-gradient(to top, rgba(255, 214, 80, 0.55), rgba(255, 214, 80, 0)); clip-path: polygon(18% 100%, 82% 100%, 100% 0, 0 0); opacity: 0; animation: beam 0.8s ease-out 0.35s forwards; }
@keyframes beam { to { opacity: 1; } }
.pedestal .base { position: absolute; left: 50%; bottom: 0; width: 170px; transform: translateX(-50%); }
.pedestal .glow { position: absolute; left: 50%; bottom: 8px; width: 240px; height: 90px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 80, 0.55), rgba(255, 214, 80, 0)); animation: glowPulse 2.4s ease-in-out infinite; }
@keyframes glowPulse { 50% { transform: translateX(-50%) scale(1.08); opacity: 0.8; } }
.pedestal .coin { position: absolute; left: 50%; top: 0; width: 86px; height: 86px; margin-left: -43px; animation: coinDrop 1.1s cubic-bezier(.3,1.4,.5,1) 0.2s both, coinSpin 3s ease-in-out 1.3s infinite; }
@keyframes coinDrop { 0% { transform: translateY(-120px) scale(0.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(40px) scale(1); opacity: 1; } }
@keyframes coinSpin { 0%, 100% { transform: translateY(40px) rotateY(0); } 50% { transform: translateY(32px) rotateY(180deg); } }
.pedestal .hopper { position: absolute; right: 6px; bottom: 54px; width: 70px; height: 70px; animation: hopIn 0.9s cubic-bezier(.3,1.5,.5,1) 0.7s both; }
@keyframes hopIn { 0% { transform: translate(60px, 30px) scale(0.4) rotate(20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.total-xp { margin-top: 10px; }
.total-xp small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; }
.total-xp .num { font-size: 52px; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; gap: 6px; }
.total-xp .num svg { width: 22px; height: 22px; color: #2fcf62; }
.total-xp .num.pulse { animation: xpPulse 0.58s linear; }
.end-stats { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.end-stats div { border: 2px solid var(--line); border-radius: 14px; padding: 8px 16px; min-width: 110px; }
.end-stats b { display: block; font-size: 22px; }
.end-stats span { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.end-list { text-align: left; max-width: 480px; margin: 20px auto 0; border: 2px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.end-list h3 { font-size: 15px; margin: 0 0 6px; }
.end-list ul { margin: 0; padding-left: 1.2em; font-size: 14.5px; }
.end-list li { margin-bottom: 4px; }
.end-list.warn { border-color: var(--yellow); background: var(--yellow-soft); }
.topic-res { display: grid; gap: 8px; text-align: left; max-width: 480px; margin: 18px auto 0; }
.topic-res div { display: flex; justify-content: space-between; gap: 10px; border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; font-size: 14.5px; }
.topic-res .weak { border-color: var(--yellow); background: var(--yellow-soft); }
.topic-res .good { border-color: #b9ebc8; }
.streak-hero { font-size: 96px; font-weight: 800; line-height: 1; display: flex; align-items: center; gap: 10px; animation: scaleIn 0.5s cubic-bezier(.3,1.6,.5,1) 0.2s both; }
.streak-hero svg { width: 80px; height: 80px; color: #ff9600; animation: flame 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flame { 50% { transform: scale(1.06) rotate(-3deg); } }
.streak-week { display: flex; gap: 10px; margin: 26px auto 0; }
.streak-week .d { display: grid; gap: 6px; justify-items: center; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.streak-week .d i { width: 40px; height: 40px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; }
.streak-week .d i svg { width: 20px; height: 20px; color: #fff; opacity: 0; }
.streak-week .d.on i { background: #ff9600; }
.streak-week .d.on i svg { opacity: 1; }
.streak-week .d.today i { animation: dayBounce 0.9s 0.9s both; }
.streak-week .d.today.on i { background: var(--line-2); animation: dayFill 0.5s ease-out 1s forwards, dayBounce 0.9s 1s; }
.streak-week .d.today.on i svg { animation: fadeIn 0.3s 1.2s both; }
@keyframes dayFill { to { background: #ff9600; } }
@keyframes dayBounce { 0% { transform: translateY(0); animation-timing-function: cubic-bezier(.5,0,0,1); } 40% { transform: translateY(-14px); animation-timing-function: cubic-bezier(.5,0,1,1); } 100% { transform: translateY(0); } }
.interstitial .ic { width: 150px; height: 120px; position: relative; }
.interstitial .ic .m { position: absolute; left: 0; top: 10px; width: 70px; height: 70px; animation: icM 1.6s ease-in-out both; }
.interstitial .ic .c { position: absolute; right: 10px; top: 20px; width: 70px; height: 70px; animation: coinSpinOnly 1.4s ease-in-out infinite; }
@keyframes icM { 0% { transform: translate(30px, 20px) scale(0.3); opacity: 0; } 40% { transform: none; opacity: 1; } 100% { transform: translate(6px, -6px); } }
@keyframes coinSpinOnly { 50% { transform: rotateY(180deg) translateY(-6px); } }
.interstitial h2 { font-size: 20px; margin: 10px 0 4px; animation: fadeIn 0.4s 0.3s both; }
.interstitial p { color: var(--ink-2); margin: 0; animation: fadeIn 0.4s 0.5s both; }
.sparkle { position: absolute; width: 10px; height: 10px; background: var(--gold-1); transform: rotate(45deg); border-radius: 2px; animation: spark 1.6s ease-in-out infinite; }
@keyframes spark { 0%, 100% { opacity: 0; transform: rotate(45deg) scale(0.3); } 50% { opacity: 1; transform: rotate(45deg) scale(1); } }
canvas.confetti { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

/* Modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fadeIn 0.15s; }
.modal { background: var(--surface); border-radius: 24px; padding: 22px 24px; max-width: 580px; width: 100%; max-height: 85vh; overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); animation: popIn 0.22s ease-out; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h3 { margin: 0; font-size: 20px; }

/* Anlage */
.page { max-width: 780px; margin: 0 auto; padding: 32px 16px 80px; }
.page h1 { font-size: 30px; }
.page h2 { font-size: 20px; margin-top: 0; }
.page .card-b { margin-bottom: 16px; }

@media (max-width: 900px) {
  .dash, .course { grid-template-columns: 1fr; }
  .course-info { position: static; }
  .stepper { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-in { gap: 12px; height: 56px; padding: 0 12px; }
  .nav { gap: 14px; }
  .nav a span { display: none; }
  .brand { font-size: 19px; gap: 7px; }
  .brand-mark { width: 22px; height: 22px; }
  .top-right { gap: 6px; }
  .pill { height: 34px; padding: 0 10px; font-size: 15px; gap: 4px; }
  .pill svg { width: 16px; height: 16px; }
  .home { padding-top: 24px; }
  .mini-grid { grid-template-columns: 1fr; }
  .player-top { grid-template-columns: auto 1fr auto; padding: 0 10px; gap: 10px; }
  .stage { margin: 0 8px 12px; border-radius: 20px; }
  .stage-body { padding: 26px 16px 16px; }
  .card h1 { font-size: 26px; }
  .stage-foot { min-height: 0; flex-direction: column; gap: 10px; padding: 10px 14px 14px; }
  .bubble { position: static; max-width: none; align-self: stretch; margin-left: 54px; }
  .mascot { left: -6px; bottom: auto; top: -8px; width: 56px; height: 56px; }
  .stage-foot.has-bubble .mascot { top: 2px; }
  .verdict { position: static; align-self: flex-start; }
  .foot-actions .b3 > span { padding: 0 12px; }
  .opts.cols-2 { grid-template-columns: 1fr; }
  .node-row[data-off="0"] { padding-left: 10px; }
  .node-row[data-off="1"], .node-row[data-off="3"] { padding-left: 50px; }
  .node-row[data-off="2"] { padding-left: 90px; }
  .sort-item { grid-template-columns: 1fr; }
  .code, .tline { font-size: 12.5px; }
  .full h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
