/* ==========================================================================
   Bambilearn – Design: Smaragdgrün mit Goldakzenten
   ========================================================================== */
:root {
  --em-950: #05211a;
  --em-900: #082d23;
  --em-800: #0b3b2e;
  --em-700: #0f4c3a;
  --em-600: #146149;
  --em-500: #1c7a5c;
  --em-400: #3f9a7a;
  --em-200: #bfe0d2;
  --em-100: #e2f1ea;
  --em-50: #f1f8f4;

  --gold: #c9a44a;
  --gold-l: #ead595;
  --gold-xl: #f7edcc;
  --gold-d: #9a7720;
  --gold-grad: linear-gradient(135deg, #f3e2a6 0%, #d4af37 45%, #b08a2a 100%);

  --ivory: #fbf8f1;
  --paper: #fffdf8;
  --ink: #1b2823;
  --ink-2: #3a4a43;
  --muted: #65756e;
  --line: #e7e0cf;
  --line-2: #efe9db;
  --rose: #c8655e;
  --rose-bg: #fbecea;
  --ok: #187451;
  --ok-bg: #e5f4ec;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 59, 46, .05), 0 8px 28px rgba(11, 59, 46, .08);
  --shadow-lg: 0 2px 6px rgba(5, 33, 26, .12), 0 24px 60px rgba(5, 33, 26, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16.5px/1.6 var(--sans);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(28, 122, 92, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(201, 164, 74, .10), transparent 60%),
    var(--ivory);
  background-attachment: fixed;
}
a { color: var(--em-600); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--em-800); letter-spacing: .005em; line-height: 1.15; }
h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 8px; }
h2 { font-size: 26px; margin: 0 0 10px; }
h3 { font-size: 22px; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
button, input { font: inherit; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 70%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Schaltflächen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px; font-weight: 650; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn-gold { background: var(--gold-grad); color: var(--em-950); box-shadow: 0 6px 18px rgba(176, 138, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-em { background: var(--em-700); color: #fff; box-shadow: 0 6px 16px rgba(15, 76, 58, .22); }
.btn-em:hover:not(:disabled) { background: var(--em-600); }
.btn-ghost { background: transparent; color: var(--em-700); box-shadow: inset 0 0 0 1.5px var(--em-200); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--em-400); }
.btn-done { background: var(--em-100); color: var(--em-700); box-shadow: inset 0 0 0 1.5px var(--em-200); }
.link { background: none; border: 0; padding: 4px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--em-700); }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Sprachumschalter ---------- */
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(234, 213, 149, .35); }
.lang button, .lang a { min-width: 40px; padding: 5px 9px; border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .78); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-align: center; cursor: pointer; }
.lang button:hover, .lang a:hover { color: #fff; }
.lang [aria-pressed="true"], .lang [aria-current="true"] { background: var(--gold-grad); color: var(--em-950); }
.lang-gate { position: fixed; top: 18px; right: 18px; z-index: 3; }

/* ==========================================================================
   Zugangsseite und Anmeldung (dunkles Smaragd)
   ========================================================================== */
body.gate, #app.is-login { min-height: 100vh; display: grid; place-items: center; padding: 72px 20px 40px; }
body.gate { background: var(--em-900); }
.gate-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(800px 500px at 15% 10%, rgba(63, 154, 122, .35), transparent 60%),
    radial-gradient(700px 520px at 90% 95%, rgba(201, 164, 74, .22), transparent 60%),
    radial-gradient(circle at 50% 50%, var(--em-800), var(--em-950));
}
.gate-bg::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(234, 213, 149, .25) 1px, transparent 1px); background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 40%, transparent 30%, #000 85%); -webkit-mask-image: radial-gradient(circle at 50% 40%, transparent 30%, #000 85%); }
.gate-card, .login-card {
  position: relative; z-index: 1; width: min(440px, 100%); padding: 40px 34px 30px; text-align: center; color: #eef5f1;
  border-radius: 28px; background: linear-gradient(180deg, rgba(15, 76, 58, .78), rgba(8, 45, 35, .86));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(234, 213, 149, .28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.login-card { width: min(520px, 100%); }
.gate-emblem { width: 74px; height: 74px; margin: 0 auto 10px; color: var(--gold-l); }
.gate-emblem svg { width: 100%; height: 100%; }
.gate-brand { margin: 0 0 18px; font-family: var(--serif); font-size: 15px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-l); }
.gate-card h1, .login-card h1 { color: #fff; font-size: clamp(32px, 6vw, 42px); font-style: italic; font-weight: 500; }
.gate-lead { margin: 0 auto 24px; max-width: 34ch; color: rgba(238, 245, 241, .78); }
.gate-card form, .login-form { text-align: left; }
.gate-card label, .login-form label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-l); }
.gate-card input, .login-form input {
  width: 100%; height: 52px; padding: 0 16px; border: 1px solid rgba(234, 213, 149, .35); border-radius: 14px;
  background: rgba(5, 33, 26, .45); color: #fff; font-size: 17px; letter-spacing: .04em; transition: border-color .2s, box-shadow .2s;
}
.gate-card input:focus, .login-form input:focus { outline: none; border-color: var(--gold-l); box-shadow: 0 0 0 4px rgba(234, 213, 149, .18); }
.gate-card .btn, .login-form .btn-gold { width: 100%; margin-top: 18px; min-height: 52px; font-size: 17px; }
.gate-card .err, .login-form .err { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(200, 101, 94, .18); color: #ffd9d4; font-weight: 600; font-size: 15px; }
.gate-ornament { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; }
.gate-ornament span { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-l)); }
.gate-ornament span:last-child { transform: scaleX(-1); }
.gate-ornament i { width: 7px; height: 7px; background: var(--gold-l); transform: rotate(45deg); }

.profiles { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 6px 0 22px; flex-wrap: wrap; }
.profile {
  display: grid; justify-items: center; gap: 10px; padding: 14px 16px 12px; border: 0; border-radius: 22px; background: transparent;
  color: #fff; font-family: var(--serif); font-size: 21px; cursor: pointer; transition: transform .2s ease, background .2s ease, opacity .2s;
}
.profile .ava { width: 118px; height: 118px; transition: box-shadow .25s, transform .25s; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.profile.small { font-size: 16px; color: rgba(255, 255, 255, .8); }
.profile.small .ava { width: 64px; height: 64px; }
.profile:hover { background: rgba(255, 255, 255, .06); transform: translateY(-2px); }
.profile:hover .ava { transform: scale(1.03); }
.profile.sel .ava { box-shadow: 0 0 0 4px var(--em-800), 0 0 0 6px var(--gold-l), 0 14px 34px rgba(0, 0, 0, .4); }
.profiles.has-sel .profile:not(.sel) { opacity: .45; }
.login-form { animation: rise .35s ease both; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 5px; width: 42px; height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--gold-l); cursor: pointer; display: grid; place-items: center; }
.login-form .link { display: block; margin: 14px auto 0; color: rgba(238, 245, 241, .7); }
.login-form .link:hover { color: #fff; }

/* ==========================================================================
   Lernbereich
   ========================================================================== */
.ava { display: block; border-radius: 50%; object-fit: cover; }
.ava-sm { width: 32px; height: 32px; }
.ava-md { width: 64px; height: 64px; }
.ava-lg { width: 132px; height: 132px; }

.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 22px;
  background: linear-gradient(90deg, var(--em-900), var(--em-700)); color: #fff;
  box-shadow: 0 1px 0 rgba(234, 213, 149, .4), 0 6px 22px rgba(5, 33, 26, .18);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand .emblem { width: 40px; height: 40px; color: var(--gold-l); }
.brand b { display: block; font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: .02em; line-height: 1.05; }
.brand small { display: block; font-size: 12px; color: rgba(234, 213, 149, .85); letter-spacing: .04em; }
.top-r { display: flex; align-items: center; gap: 12px; }
.me { display: flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 15px; }
.me .ava { box-shadow: 0 0 0 1.5px var(--gold-l); }
.menu-btn { display: none; }

.shell { display: grid; grid-template-columns: 270px 1fr; min-height: calc(100vh - 68px); }
.side {
  position: sticky; top: 68px; align-self: start; height: calc(100vh - 68px); overflow-y: auto; display: flex; flex-direction: column; gap: 3px;
  padding: 22px 14px; border-right: 1px solid var(--line); background: rgba(255, 253, 248, .7);
}
.nav-i { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 550; transition: background .15s, color .15s; }
.nav-i:hover { background: var(--em-50); color: var(--em-700); }
.nav-i.active { background: var(--em-700); color: #fff; box-shadow: 0 6px 16px rgba(15, 76, 58, .22); }
.nav-i.active .ic { color: var(--gold-l); }
.nav-i span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-i em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold-d); }
.nav-i.active em { color: var(--gold-l); }
.nav-h { margin: 20px 14px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-d); }
.nav-h:empty { margin: 10px 14px; height: 1px; background: var(--line); }
.nav-empty { margin: 4px 14px; font-size: 14px; color: var(--muted); font-style: italic; }
.side-foot { margin-top: auto; padding: 20px 10px 0; color: var(--gold); opacity: .55; }
.side-foot .branch { width: 100%; height: auto; }
.scrim { display: none; }

.main { min-width: 0; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 34px 32px 80px; outline: none; animation: fade .35s ease both; }

/* ---------- Startseite ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 30px; padding: 34px 36px; border-radius: 26px; color: #fff;
  background: radial-gradient(600px 300px at 0% 0%, rgba(63, 154, 122, .5), transparent 60%), linear-gradient(120deg, var(--em-800), var(--em-600));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(234, 213, 149, .3);
}
.hero-ava { position: relative; z-index: 1; flex: none; }
.hero-ava .ava { box-shadow: 0 0 0 5px rgba(234, 213, 149, .25), 0 16px 40px rgba(0, 0, 0, .35); }
.hero-txt { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-style: italic; font-weight: 500; font-size: clamp(32px, 4.4vw, 46px); }
.eyebrow { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-d); }
.hero .eyebrow { color: var(--gold-l); }
.quote { margin: 4px 0 0; font-family: var(--serif); font-size: 21px; color: rgba(255, 255, 255, .86); }
.quote::before { content: "“"; color: var(--gold-l); margin-right: 2px; }
.quote::after { content: "”"; color: var(--gold-l); margin-left: 2px; }
.hero .branch { position: absolute; right: -10px; bottom: -14px; width: 300px; height: auto; color: var(--gold-l); opacity: .45; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 18px; border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.stat .ic { grid-row: span 2; width: 38px; height: 38px; padding: 8px; border-radius: 12px; color: var(--gold-d); background: var(--gold-xl); }
.stat b { font-family: var(--serif); font-size: 28px; line-height: 1.1; color: var(--em-800); }
.stat b small { font-size: 17px; color: var(--muted); }
.stat span { font-size: 13px; color: var(--muted); line-height: 1.3; }

.continue {
  display: flex; align-items: center; gap: 16px; margin: 0 0 8px; padding: 16px 20px; border-radius: var(--r); text-decoration: none; color: var(--ink);
  background: linear-gradient(90deg, var(--gold-xl), var(--paper) 70%); box-shadow: var(--shadow), inset 0 0 0 1px rgba(201, 164, 74, .35); transition: transform .2s;
}
.continue:hover { transform: translateY(-2px); }
.continue .ct { flex: 1; display: grid; }
.continue small { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-d); }
.continue b { font-family: var(--serif); font-size: 22px; color: var(--em-800); }
.continue em { font-style: normal; font-size: 14px; color: var(--muted); }
.go { color: var(--gold-d); transition: transform .2s; }
a:hover > .go { transform: translateX(3px); }

.sec { display: flex; align-items: center; gap: 16px; margin: 34px 0 16px; font-size: 28px; }
.sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .6; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mi { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 16px; color: var(--gold-l); background: linear-gradient(140deg, var(--em-600), var(--em-800)); box-shadow: inset 0 0 0 1px rgba(234, 213, 149, .35); }
.mi .ic { width: 26px; height: 26px; }
.mi-lg { width: 72px; height: 72px; border-radius: 22px; }
.mi-lg .ic { width: 36px; height: 36px; }
.mcard { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 22px; text-decoration: none; color: var(--ink); background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); transition: transform .2s, box-shadow .2s; }
.mcard:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(11, 59, 46, .14), inset 0 0 0 1px rgba(201, 164, 74, .5); }
.mcard h3 { margin: 10px 0 0; }
.mcard p { margin: 0; color: var(--muted); font-size: 15px; }
.mcard-foot { margin-top: auto; padding-top: 14px; }
.mcard-foot small { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--em-100); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--em-500), var(--gold)); transition: width .5s ease; }

.slot {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; grid-column: 1 / -1; padding: 46px 28px 40px; text-align: center;
  border-radius: 24px; border: 2px dashed rgba(201, 164, 74, .55); background: repeating-linear-gradient(-45deg, rgba(201, 164, 74, .04) 0 14px, transparent 14px 28px), var(--paper);
}
.slot .mi { width: 76px; height: 76px; border-radius: 50%; margin-bottom: 8px; opacity: .9; }
.slot .mi .ic { width: 38px; height: 38px; }
.slot h3 { margin: 4px 0 0; font-style: italic; font-weight: 500; font-size: 28px; }
.slot p { max-width: 46ch; margin: 0; color: var(--muted); }
.slot-badge { position: absolute; top: 16px; right: 16px; padding: 4px 12px; border-radius: 99px; background: var(--gold-grad); color: var(--em-950); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Modulseite ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--em-600); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs i { font-style: normal; color: var(--gold); }
.mhead { display: flex; align-items: center; gap: 22px; padding: 26px 28px; margin-bottom: 22px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.mhead > div { flex: 1; }
.mhead p { margin: 0; color: var(--muted); }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--em-100); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring text { font: 700 11.5px var(--sans); fill: var(--em-800); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.chap { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 18px; text-decoration: none; color: var(--ink); background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); transition: transform .2s, box-shadow .2s; }
.chap:hover { transform: translateX(3px); box-shadow: 0 10px 28px rgba(11, 59, 46, .12), inset 0 0 0 1px rgba(201, 164, 74, .5); }
.num { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--em-700); box-shadow: inset 0 0 0 1.5px var(--em-200); }
.chap.done .num { background: var(--gold-grad); color: var(--em-950); box-shadow: none; }
.chap-t { flex: 1; min-width: 0; display: grid; }
.chap-t b { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--em-800); }
.chap-t small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.chap-t small .ic { width: 15px; height: 15px; }
.chap-t small i { width: 4px; height: 4px; margin: 0 4px; border-radius: 50%; background: var(--gold); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 4px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 650; color: var(--em-700); background: var(--em-100); }
.chip .ic { width: 14px; height: 14px; }
.chip.gold { color: #6e5312; background: var(--gold-xl); box-shadow: inset 0 0 0 1px rgba(201, 164, 74, .45); }
.note { padding: 18px 22px; border-radius: 16px; background: var(--paper); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-style: italic; }

/* ---------- Kapitel ---------- */
.khead { margin-bottom: 18px; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 22px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.tabs a:hover { color: var(--em-700); }
.tabs a.active { background: var(--em-700); color: #fff; }
.tabs a.active .ic { color: var(--gold-l); }
.tabs em { font-style: normal; font-size: 12px; padding: 1px 7px; border-radius: 99px; background: var(--gold-xl); color: #6e5312; }
.tabs a.active em { background: rgba(234, 213, 149, .25); color: var(--gold-l); }

.lesson { padding: 34px 40px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.lesson > :first-child { margin-top: 0; }
.lesson p { margin: 0 0 16px; }
.lesson h3 { color: var(--em-700); }
.b-note { display: flex; gap: 14px; margin: 22px 0; padding: 18px 20px; border-radius: 16px; background: linear-gradient(90deg, var(--gold-xl), #fffaf0); box-shadow: inset 3px 0 0 var(--gold); }
.b-note > .ic { color: var(--gold-d); margin-top: 3px; }
.b-note b { display: block; font-family: var(--serif); font-size: 19px; color: #6e5312; }
.b-example { margin: 22px 0; padding: 18px 20px; border-radius: 16px; background: var(--em-50); box-shadow: inset 3px 0 0 var(--em-400); }
.b-example > b { display: block; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--em-600); margin-bottom: 4px; }
.b-list { padding-left: 4px; list-style: none; }
.b-list li { position: relative; padding-left: 24px; margin: 6px 0; }
.b-list li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.b-terms { display: grid; gap: 10px; margin: 20px 0; }
.b-terms div { padding: 12px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.b-terms dt { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--em-700); }
.b-terms dd { margin: 0; }
.b-quote { margin: 26px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--em-800); }
.b-quote p { margin: 0; }
.b-quote cite { display: block; margin-top: 6px; font-family: var(--sans); font-size: 14px; font-style: normal; color: var(--muted); }
.b-fig { margin: 24px 0; text-align: center; }
.b-fig svg, .b-fig img { max-width: 100%; height: auto; }
.b-fig figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.actions.center { justify-content: center; }

/* ---------- Übung ---------- */
.quiz-start, .result { display: grid; justify-items: center; gap: 10px; padding: 40px 28px; text-align: center; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.quiz-start p { max-width: 48ch; margin: 6px 0 0; }
.quiz-start .btn { margin-top: 12px; }
.result h2 { margin: 6px 0 0; font-style: italic; font-weight: 500; font-size: 32px; }
.result-score { font-weight: 700; color: var(--em-700); }
.result p { max-width: 46ch; margin: 0; }
.quiz { display: grid; gap: 12px; }
.q-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.q-card { padding: 30px 32px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); animation: fade .3s ease both; }
.q-kind { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-d); }
.q { font-size: 26px; margin: 0 0 18px; }
.hint { margin: -8px 0 14px; font-size: 14px; color: var(--muted); }
.opts { display: grid; gap: 10px; }
.opts.tf { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; border: 0; border-radius: 14px; cursor: pointer;
  background: #fff; color: var(--ink); font-size: 16.5px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s, background .15s;
}
.opts.tf .opt { justify-content: center; font-weight: 650; font-size: 18px; min-height: 60px; }
.opt:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--em-400); }
.opt .box { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--em-200); color: transparent; }
.opt .box .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.opts[role="radiogroup"] .box { border-radius: 50%; }
.opt.sel { background: var(--em-50); box-shadow: inset 0 0 0 2px var(--em-600); }
.opt.sel .box { background: var(--em-600); color: #fff; box-shadow: none; }
.opt.right { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--ok); }
.opt.right .box { background: var(--ok); color: #fff; box-shadow: none; }
.opt.wrong { background: var(--rose-bg); box-shadow: inset 0 0 0 2px var(--rose); }
.opt.wrong .box { background: var(--rose); color: #fff; box-shadow: none; }
.opt.dim { opacity: .55; }
.opt:disabled { cursor: default; }
.answer-in input { width: 100%; height: 54px; padding: 0 16px; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 17px; color: var(--ink); }
.answer-in input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--em-500), 0 0 0 4px var(--em-100); }
.answer-in input.right { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--ok); }
.answer-in input.wrong { background: var(--rose-bg); box-shadow: inset 0 0 0 2px var(--rose); }
.fb { margin-top: 18px; padding: 16px 18px; border-radius: 14px; animation: fade .25s ease both; }
.fb b { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.fb p { margin: 6px 0 0; }
.fb.ok { background: var(--ok-bg); color: #0f4a35; }
.fb.no { background: var(--rose-bg); color: #7a2e29; }
.flash { perspective: 1200px; margin: 0 0 6px; }
.flash-in { position: relative; display: grid; min-height: 220px; transition: transform .6s cubic-bezier(.3, .7, .3, 1); transform-style: preserve-3d; }
.flash.flipped .flash-in { transform: rotateY(180deg); }
.flash-f, .flash-b { grid-area: 1 / 1; display: grid; place-items: center; align-content: center; gap: 8px; padding: 30px; border-radius: 20px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-family: var(--serif); font-size: 26px; }
.flash-f { background: linear-gradient(140deg, var(--em-700), var(--em-900)); color: #fff; box-shadow: inset 0 0 0 1px rgba(234, 213, 149, .4); }
.flash-f small { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-l); }
.flash-b { transform: rotateY(180deg); background: var(--gold-xl); color: var(--em-900); box-shadow: inset 0 0 0 1px rgba(201, 164, 74, .5); font-size: 21px; }

/* ---------- Admin-Übersicht ---------- */
.ov { display: grid; gap: 20px; }
.ov-card { padding: 24px 26px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.ov-card header { display: flex; align-items: center; gap: 16px; }
.ov-card h2 { margin: 0; }
.ov-card header p { margin: 0; font-size: 14px; }
.stats.mini { margin: 18px 0 8px; }
.ov-mod { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; align-items: center; gap: 14px; padding: 8px 0; font-size: 15px; }
.ov-mod em { font-style: normal; font-size: 13px; color: var(--muted); }

/* ---------- Hinweise, Laden ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 16px; border-radius: 14px; background: var(--em-800); color: #fff; box-shadow: var(--shadow-lg); font-size: 15px; animation: rise .3s ease both; transition: opacity .4s, transform .4s; }
.toast.warn { background: #5b3b12; }
.toast.out { opacity: 0; transform: translateY(8px); }
#app.is-loading { min-height: 100vh; display: grid; place-items: center; background: var(--em-900); }
.loader { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(234, 213, 149, .25); border-top-color: var(--gold-l); animation: spin 1s linear infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .menu-btn { display: grid; margin-left: -8px; }
  .shell { display: block; }
  .side { position: fixed; top: 68px; left: 0; bottom: 0; z-index: 30; width: 280px; height: auto; align-self: stretch; background: var(--paper); transform: translateX(-105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  .menu-open .side { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 68px 0 0; z-index: 25; background: rgba(5, 33, 26, .35); }
  .brand small { display: none; }
  .me b { display: none; }
  .me { padding: 4px; }
  .wrap { padding: 24px 18px 60px; }
}
@media (max-width: 600px) {
  .top { padding: 0 12px; gap: 6px; }
  .brand .emblem { width: 34px; height: 34px; }
  .brand b { font-size: 20px; }
  .top-r { gap: 6px; }
  .lang button { min-width: 32px; padding: 5px 6px; }
  .hero { flex-direction: column; text-align: center; padding: 28px 22px; gap: 16px; }
  .hero .branch { width: 200px; opacity: .18; }
  .ava-lg { width: 108px; height: 108px; }
  .stat { padding: 14px; }
  .stat b { font-size: 24px; }
  .mhead { flex-wrap: wrap; padding: 22px; }
  .lesson { padding: 24px 20px; font-size: 17px; }
  .q-card { padding: 22px 18px; }
  .q { font-size: 22px; }
  .chap { padding: 14px; gap: 12px; }
  .chips { display: none; }
  .ov-mod { grid-template-columns: 1fr auto; }
  .ov-mod .bar { grid-column: 1 / -1; grid-row: 2; }
  .profile .ava { width: 100px; height: 100px; }
  .gate-card, .login-card { padding: 32px 22px 24px; }
}
@media (max-width: 440px) {
  .brand b { display: none; }
}
