/* Hell, Salbeigrün, Glas. Mobile first. */
:root {
  --bg: #eef1ea;
  --ink: #16201a;
  --ink-2: #3c473f;
  --muted: #6b766c;
  --sage: #6f8c62;
  --sage-d: #56744c;
  --sage-dd: #3f5a38;
  --sage-l: #dfe9d7;
  --sage-ll: #eef4ea;
  --lime: #9fcf62;
  --glass: rgba(255, 255, 255, .56);
  --glass-2: rgba(255, 255, 255, .78);
  --stroke: rgba(255, 255, 255, .8);
  --line: rgba(22, 32, 26, .08);
  --ok: #3b8a57;
  --ok-soft: rgba(59, 138, 87, .1);
  --bad: #c0503f;
  --bad-soft: rgba(192, 80, 63, .09);
  --warm: #b8743f;
  --warm-soft: rgba(184, 116, 63, .1);
  --ev-belegt: #3b8a57;
  --ev-teilweise: #b8891f;
  --ev-tradition: #5b6f8b;
  --ev-widerlegt: #c0503f;
  --r: 26px;
  --r-s: 16px;
  --shadow: 0 1px 1px rgba(30, 45, 25, .03), 0 12px 32px -12px rgba(30, 45, 25, .18);
  --blur: saturate(170%) blur(22px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
/* Weicher Hintergrund, damit das Glas etwas zum Durchscheinen hat */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.bg::before, .bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); }
.bg::before { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(circle, rgba(143, 176, 120, .55), rgba(143, 176, 120, 0) 70%); }
.bg::after { width: 60vmax; height: 60vmax; right: -22vmax; bottom: -26vmax; background: radial-gradient(circle, rgba(175, 214, 120, .45), rgba(175, 214, 120, 0) 70%); }

h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif; font-weight: 600; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .35em; }
h1 { font-size: 2.1rem; }
h1 .soft, h2 .soft { color: var(--sage); font-weight: 500; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.06rem; letter-spacing: -.015em; }
a { color: var(--sage-d); }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; }
.narrow { max-width: 720px; margin: 0 auto; }

/* ───────── Top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(238, 241, 234, .66);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(145deg, var(--sage), var(--sage-dd)); color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .04em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 12px -4px rgba(63, 90, 56, .6); }
.brand-name { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
.brand-name small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); letter-spacing: 0; margin-top: -1px; }
.topnav { display: none; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); }
.topnav a { text-decoration: none; color: var(--ink-2); font-size: .88rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; transition: background .2s var(--ease); display: inline-flex; align-items: center; gap: 6px; }
.topnav a.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(30, 45, 25, .15); }
.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); flex: none; }
.lang button { border: 0; background: transparent; color: var(--muted); padding: 5px 11px; font-size: .76rem; font-weight: 600; border-radius: 999px; }
.lang button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(30, 45, 25, .12); }

/* ───────── Tab bar (mobil) */
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 24px)); bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px; border-radius: 26px;
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 36px -12px rgba(30, 45, 25, .3);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; text-decoration: none; color: var(--muted); font-size: .66rem; font-weight: 600; border-radius: 20px; transition: color .2s, background .2s; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--sage-dd); background: rgba(111, 140, 98, .14); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warm); color: #fff; font-size: .66rem; font-weight: 700; line-height: 1; }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .top { padding-left: max(24px, calc((100vw - 1040px) / 2 + 16px)); padding-right: max(24px, calc((100vw - 1040px) / 2 + 16px)); }
}

/* ───────── Glass surfaces */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title { font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 30px 4px 12px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 14px; text-decoration: none; color: var(--sage-d); font-size: .92rem; font-weight: 500; }

/* ───────── Hero */
.hero-card {
  position: relative; overflow: hidden;
  border-radius: 32px; padding: 26px 22px 22px; margin-top: 8px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(190, 225, 140, .55), rgba(190, 225, 140, 0) 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(40, 70, 35, .55), rgba(40, 70, 35, 0) 60%),
    linear-gradient(160deg, #86a577 0%, #6a8a5d 45%, #4c6a44 100%);
  box-shadow: 0 24px 50px -24px rgba(50, 80, 40, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.hero-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 60%, transparent 70%); pointer-events: none; }
.hero-card h1 { color: #fff; font-size: 2.2rem; position: relative; z-index: 1; }
.hero-card h1 .soft { color: rgba(255, 255, 255, .72); }
.hero-card p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 34ch; position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ring { flex: none; width: 76px; height: 76px; position: relative; z-index: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.next {
  position: relative; z-index: 1; margin-top: 22px;
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: 22px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.next .dot { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--sage-d); font-weight: 700; }
.next small { display: block; font-size: .74rem; color: rgba(255, 255, 255, .75); }
.next b { display: block; font-weight: 600; line-height: 1.25; }
.hero-card .slide { margin-top: 14px; }

/* ───────── Buttons */
.slide {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 6px 20px 6px 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .25s var(--ease), background .25s;
}
.slide .knob { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--sage-d); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); transition: transform .35s var(--ease); }
.slide .knob svg { width: 20px; height: 20px; }
.slide .chev { margin-left: auto; letter-spacing: -2px; opacity: .55; font-weight: 400; }
.slide:hover .knob { transform: translateX(4px); }
.slide:active { transform: scale(.98); }
.slide.solid { background: linear-gradient(160deg, #7c9a6e, var(--sage-d)); border-color: transparent; box-shadow: 0 14px 30px -14px rgba(63, 90, 56, .75); }
.slide:disabled { opacity: .45; cursor: not-allowed; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: linear-gradient(160deg, #7c9a6e, var(--sage-d)); color: #fff; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px -12px rgba(63, 90, 56, .8); transition: transform .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--glass-2); color: var(--sage-dd); border: 1px solid var(--stroke); box-shadow: none; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ───────── Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { text-decoration: none; color: inherit; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--stroke); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.45rem; font-weight: 600; letter-spacing: -.03em; }
.stat span { font-size: .76rem; color: var(--muted); }
.progress { height: 6px; background: rgba(22, 32, 26, .08); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sage), var(--lime)); border-radius: 999px; transition: width .5s var(--ease); }

/* ───────── Module & lesson cards */
.grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.mod { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s; padding: 18px; }
a.mod:hover { transform: translateY(-2px); box-shadow: 0 1px 1px rgba(30, 45, 25, .03), 0 20px 40px -16px rgba(30, 45, 25, .25); }
a.mod:active { transform: scale(.985); }
.mod .num { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 600; font-size: 1.05rem; background: linear-gradient(160deg, #fff, var(--sage-ll)); color: var(--sage-d); border: 1px solid var(--stroke); box-shadow: inset 0 -2px 6px rgba(111, 140, 98, .12); }
.mod.done .num { background: linear-gradient(160deg, #86a577, var(--sage-d)); color: #fff; border-color: transparent; }
.mod h3 { margin: 2px 0 3px; }
.mod p { margin: 0; font-size: .87rem; color: var(--muted); line-height: 1.4; }
.mod .meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.mod .meta .progress { flex: 1; }
.mod.locked, .mod.soon { opacity: .5; }
.pill { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: rgba(22, 32, 26, .06); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.go { background: rgba(111, 140, 98, .14); color: var(--sage-dd); }

.page-head { margin: 6px 0 18px; }
.page-head .eyebrow { font-size: .8rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--muted); }

/* ───────── Lesson reading */
.lesson { font-size: 1.02rem; line-height: 1.68; color: var(--ink-2); padding: 24px 22px; }
.lesson p { margin: 0 0 1.05em; }
.lesson b { color: var(--ink); }
.lesson ul, .lesson ol { padding-left: 1.2em; margin: 0 0 1.05em; }
.lesson li { margin-bottom: .45em; }
.lesson li::marker { color: var(--sage); }
.lesson h3 { margin: 1.7em 0 .55em; font-size: 1.18rem; color: var(--ink); }
.lesson > :first-child { margin-top: 0; }
.box { border-radius: 20px; padding: 16px 18px; margin: 0 0 1.2em; }
.box > b { display: flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 8px; }
.box p { margin: 0; }
.box ul { margin: 0; padding-left: 1.1em; }
.box li { margin-bottom: .35em; }
.box-key { background: linear-gradient(160deg, rgba(223, 233, 215, .9), rgba(238, 244, 234, .7)); border: 1px solid var(--stroke); }
.box-key > b { color: var(--sage-dd); }
.box-warn { background: var(--bad-soft); border: 1px solid rgba(192, 80, 63, .18); }
.box-warn > b { color: var(--bad); }
.box-tip { background: var(--warm-soft); border: 1px solid rgba(184, 116, 63, .16); }
.box-tip > b { color: var(--warm); }
.ev { --c: var(--ev-belegt); display: grid; gap: 6px; padding: 14px 16px; border-radius: 18px; margin: 0 0 1.1em; background: color-mix(in srgb, var(--c) 7%, rgba(255, 255, 255, .6)); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent); }
.ev p { margin: 0; }
.ev-tag { display: inline-flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.ev-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.ev-belegt { --c: var(--ev-belegt); }
.ev-teilweise { --c: var(--ev-teilweise); }
.ev-tradition { --c: var(--ev-tradition); }
.ev-widerlegt { --c: var(--ev-widerlegt); }
.tbl { overflow-x: auto; margin: 0 -4px 1.2em; padding: 0 4px; -webkit-overflow-scrolling: touch; }
.tbl table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; line-height: 1.45; min-width: 480px; background: rgba(255, 255, 255, .55); border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-weight: 600; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; background: rgba(223, 233, 215, .55); }
.src { margin-top: 1.8em; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.5; color: var(--muted); }
.src b { display: block; margin-bottom: 6px; color: var(--muted); }
.src ol { margin: 0; padding-left: 1.2em; }
.seq-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: #fff; background: linear-gradient(160deg, #86a577, var(--sage-d)); border-radius: 20px; padding: 16px 18px; margin: 0 0 1.2em; font-weight: 600; box-shadow: 0 12px 26px -14px rgba(63, 90, 56, .8); }
.seq-link span:last-child { font-weight: 500; opacity: .85; font-size: .9rem; }

/* ───────── Quiz */
.q-head { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.q-text { font-size: 1.32rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; margin: 18px 0 18px; color: var(--ink); }
.q-img { background: rgba(255, 255, 255, .7); border: 1px solid var(--stroke); border-radius: 20px; padding: 14px; margin-top: 16px; color: var(--ink); }
.q-img svg { display: block; width: 100%; max-width: 360px; margin: 0 auto; height: auto; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; background: rgba(255, 255, 255, .72); border: 1.5px solid rgba(255, 255, 255, .9); color: var(--ink); border-radius: 18px; padding: 15px 16px; line-height: 1.4; box-shadow: 0 2px 10px -6px rgba(30, 45, 25, .2); transition: border-color .15s, background .15s, transform .15s var(--ease); }
.opt::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(22, 32, 26, .2); transition: all .15s; }
.opt:hover:not(:disabled) { border-color: rgba(111, 140, 98, .5); }
.opt:active:not(:disabled) { transform: scale(.99); }
.opt.sel { border-color: var(--sage); background: rgba(223, 233, 215, .8); }
.opt.sel::before { border: 6px solid var(--sage); }
.opt.right { border-color: var(--ok); background: rgba(225, 241, 231, .9); }
.opt.right::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100%; border-color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: rgba(247, 225, 222, .9); }
.opt.wrong::before { background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 7l6 6M13 7l-6 6' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/100%; border-color: var(--bad); }
.opt:disabled { cursor: default; }
.explain { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .7); border: 1px solid var(--stroke); font-size: .95rem; line-height: 1.5; animation: rise .35s var(--ease); }
.explain b { display: block; margin-bottom: 3px; }
.explain.ok b { color: var(--ok); }
.explain.bad b { color: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.score { font-size: 3.4rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.score.ok { color: var(--ok); }
.score.bad { color: var(--bad); }
.review-item { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.review-item p { margin: 4px 0; }

/* ───────── Sequence */
.phase { margin-top: 14px; }
.phase-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.phase-head h2 { margin: 0; font-size: 1.2rem; }
.phase-note { font-size: .88rem; color: var(--muted); margin: 0 0 8px; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.phase-head + .step, .phase-note + .step { border-top: 0; }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(111, 140, 98, .13); color: var(--sage-dd); font-weight: 600; font-size: .8rem; }
.step h3 { margin: 4px 0 4px; }
.step p { margin: 0; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.chip { font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--stroke); color: var(--muted); }
.chip.hold { color: var(--sage-dd); background: rgba(223, 233, 215, .85); }
.option { font-size: .9rem; color: var(--muted) !important; margin-top: 6px !important; }
.option i { font-style: normal; font-weight: 600; color: var(--ink); }
.check { margin-top: 8px; padding: 9px 12px; border-radius: 12px; background: var(--warm-soft); font-size: .88rem; }
.check b { color: var(--warm); }
.block-ref { margin: 10px 0 10px 46px; background: rgba(255, 255, 255, .55); border: 1px solid var(--stroke); border-radius: 18px; padding: 12px 16px; }
.block-ref summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; color: var(--sage-dd); }
.block-ref summary::-webkit-details-marker { display: none; }
.block-ref summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.block-ref[open] summary::after { content: "–"; }
.block-ref ol { margin: 8px 0 0; padding-left: 1.2em; font-size: .93rem; color: var(--ink-2); }
.switch { margin: 12px 0 2px 46px; font-size: .86rem; font-weight: 600; color: var(--warm); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 4px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(22, 32, 26, .14); position: relative; transition: background .2s; cursor: pointer; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.toggle input:checked { background: var(--sage); }
.toggle input:checked::after { transform: translateX(18px); }

/* ───────── Logbook */
.task { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; padding-top: 0; }
.task input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(22, 32, 26, .25); margin: 1px 0 0; cursor: pointer; transition: all .15s; }
.task input[type=checkbox]:checked { background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; border-color: var(--sage); }
.task label { cursor: pointer; }
.task textarea { width: 100%; margin-top: 10px; min-height: 60px; border: 1px solid var(--stroke); border-radius: 14px; padding: 10px 12px; font: inherit; font-size: .93rem; background: rgba(255, 255, 255, .7); color: var(--ink); resize: vertical; }
.task textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px rgba(111, 140, 98, .15); }
.task.done label { color: var(--muted); text-decoration: line-through; }

.lockbox { text-align: center; padding: 32px 20px; }
.empty-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: rgba(223, 233, 215, .8); color: var(--sage-d); }
.empty-ico svg { width: 30px; height: 30px; }

@media (max-width: 520px) {
  h1 { font-size: 1.8rem; }
  .hero-card h1 { font-size: 1.9rem; }
  .brand-name { display: none; }
  .block-ref, .switch { margin-left: 0; }
  .lesson { padding: 20px 18px; font-size: 1rem; }
  .card { padding: 18px; }
  .q-text { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .top, .tabbar, .toolbar, .back, .btn-row, .bg { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; background: none; backdrop-filter: none; }
  .step, .block-ref { break-inside: avoid; }
}

/* ───────── Tagesziel */
.stat.goal { position: relative; }
.stat b small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.mini-ring { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--sage) calc(var(--p) * 360deg), rgba(22, 32, 26, .08) 0); -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat em { display: block; font-style: normal; font-size: .7rem; color: var(--ok); font-weight: 600; margin-top: 2px; }
@media (max-width: 520px) { .stats.four { grid-template-columns: repeat(2, 1fr); } }

/* ───────── Kacheln */
.tile { display: block; text-align: left; text-decoration: none; color: inherit; font: inherit; cursor: pointer; transition: transform .25s var(--ease); }
.tile:hover { transform: translateY(-2px); }
.tile h3 { margin: 12px 0 4px; }
.tile p { margin: 0; font-size: .87rem; color: var(--muted); }
.tile-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #86a577, var(--sage-d)); box-shadow: 0 8px 18px -8px rgba(63, 90, 56, .7); }
.tile-ico svg { width: 24px; height: 24px; }

/* ───────── Segmented control */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(22, 32, 26, .06); }
.seg > button, .seg > label { flex: 1; position: relative; border: 0; background: transparent; border-radius: 12px; padding: 9px 10px; font-size: .88rem; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: center; transition: background .2s, box-shadow .2s; }
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg > button.on, .seg > label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(30, 45, 25, .18); }
.seg.small > label { padding: 7px 6px; font-size: .78rem; }

/* ───────── Formulare */
.lbl { display: grid; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: rgba(255, 255, 255, .8); border: 1px solid rgba(22, 32, 26, .1); border-radius: 14px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
select.field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%236b766c' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
textarea.field { resize: vertical; min-height: 64px; line-height: 1.5; }
.field:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px rgba(111, 140, 98, .15); }
.focus-card { background: linear-gradient(160deg, rgba(223, 233, 215, .85), rgba(255, 255, 255, .6)); }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--sage-dd); }
.err-row { display: flex; gap: 12px; }
.err-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(111, 140, 98, .14); color: var(--sage-dd); font-weight: 700; font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500; }
.stepper > div { display: flex; align-items: center; gap: 4px; background: rgba(22, 32, 26, .06); border-radius: 999px; padding: 3px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; font-size: 1.2rem; font-weight: 500; color: var(--sage-dd); box-shadow: 0 1px 4px rgba(30, 45, 25, .12); }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.add-row .btn { padding: 10px 16px; font-size: .9rem; }
.entry p { margin: 8px 0 0; }
.entry-focus { font-size: .92rem; }
.entry-errs { margin: 8px 0 0; padding-left: 1.1em; font-size: .92rem; }
.entry-errs li { margin-bottom: 6px; }
.entry-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.entry-actions .btn svg { width: 16px; height: 16px; }

/* ───────── Finde den Fehler */
.spot { position: relative; aspect-ratio: 4 / 3; margin-top: 4px; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #fff, var(--sage-ll)); border: 1px solid var(--stroke); color: var(--ink); cursor: crosshair; touch-action: manipulation; }
.spot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spot-hint { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: .9rem; color: var(--muted); margin: 12px 0 0; }
.spot-hint svg { width: 20px; height: 20px; color: var(--sage); }
.tapmark { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(111, 140, 98, .35); border: 2.5px solid var(--sage-d); animation: pop .3s var(--ease); pointer-events: none; }
.tapmark.ok { background: rgba(59, 138, 87, .3); border-color: var(--ok); }
.tapmark.bad { background: rgba(192, 80, 63, .25); border-color: var(--bad); }
.hot { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 2.5px dashed var(--ok); background: rgba(59, 138, 87, .12); animation: pop .35s var(--ease); pointer-events: none; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.tapmark { transform: none; }
.tapmark { animation: none; }

/* ───────── Video */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #0e140f; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.ph { background: linear-gradient(160deg, #86a577, #4c6a44); display: grid; place-items: center; text-align: center; color: #fff; }
.ph-in { display: grid; gap: 4px; justify-items: center; padding: 20px; }
.ph-in b { font-size: 1.05rem; }
.ph-in span:last-child { font-size: .85rem; opacity: .8; max-width: 32ch; }
.ph-play { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); margin-bottom: 8px; }
.ph-play svg { width: 24px; height: 24px; margin-left: 3px; }
.video-sticky { position: sticky; top: 64px; z-index: 5; }
.chip.play { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; background: var(--sage); color: #fff; border-color: transparent; }
.chip.play svg { width: 11px; height: 11px; }
button.chip { font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; }
.pose-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pose-link span { color: var(--sage); font-weight: 400; transition: transform .2s var(--ease); }
.pose-link:hover span { transform: translateX(3px); }
.err-card { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .6); border: 1px solid var(--stroke); margin-bottom: 10px; }
.err-card p { margin: 4px 0 0; }
.fix { display: flex; gap: 6px; align-items: flex-start; color: var(--ok); font-weight: 500; }
.fix svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }

/* ───────── Karteikarten */
.flash-wrap { position: relative; height: 360px; margin-top: 6px; }
.flash-under { position: absolute; inset: 14px 16px -8px; border-radius: 28px; background: rgba(255, 255, 255, .45); border: 1px solid var(--stroke); }
.flash { position: absolute; inset: 0; border-radius: 28px; padding: 26px 24px; display: flex; flex-direction: column; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: 0 20px 44px -18px rgba(30, 45, 25, .35); cursor: grab; user-select: none; touch-action: pan-y; transition: transform .3s var(--ease); overflow: hidden; }
.flash:active { cursor: grabbing; }
.flash-tag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-dd); }
.flash-front { font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-top: 18px; }
.flash-back { margin-top: auto; padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, rgba(223, 233, 215, .95), rgba(238, 244, 234, .8)); font-size: 1.1rem; font-weight: 600; color: var(--sage-dd); animation: rise .3s var(--ease); }
.flash-hint { margin-top: auto; color: var(--muted); font-size: .88rem; text-align: center; }
.flash-stamp { position: absolute; top: 22px; padding: 6px 12px; border-radius: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; opacity: 0; transition: opacity .15s; border: 2.5px solid; }
.flash-stamp.no { right: 22px; color: var(--bad); transform: rotate(8deg); }
.flash-stamp.yes { left: 22px; color: var(--ok); transform: rotate(-8deg); }
.flash.go-no .flash-stamp.no, .flash.go-yes .flash-stamp.yes { opacity: 1; }
.flash-btns { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 28px; }
.round-btn { width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--stroke); background: rgba(255, 255, 255, .85); font-size: 1.4rem; display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .15s var(--ease); }
.round-btn:active { transform: scale(.92); }
.round-btn.no { color: var(--bad); }
.round-btn.yes { color: var(--ok); }
.round-btn svg { width: 26px; height: 26px; }

/* ───────── Ansagen-Trainer */
.rec-area { display: grid; justify-items: center; gap: 10px; margin: 22px 0 6px; }
.rec-btn { width: 84px; height: 84px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #86a577, var(--sage-d)); box-shadow: 0 14px 30px -12px rgba(63, 90, 56, .8); transition: transform .2s var(--ease); }
.rec-btn svg { width: 34px; height: 34px; }
.rec-btn.on { background: linear-gradient(160deg, #d9695a, var(--bad)); box-shadow: 0 0 0 10px rgba(192, 80, 63, .15), 0 14px 30px -12px rgba(192, 80, 63, .8); animation: pulse 1.6s ease-in-out infinite; }
.rec-btn .sq { width: 26px; height: 26px; border-radius: 7px; background: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(192, 80, 63, .06), 0 14px 30px -12px rgba(192, 80, 63, .8); } }
.rec-label { font-size: .92rem; color: var(--muted); }
.rec-area audio { width: 100%; max-width: 360px; }

/* ───────── Vorlesen */
.tts-btn svg { width: 14px; height: 14px; }
.tts-btn { padding: 9px 16px; }
.reading { background: rgba(223, 233, 215, .7); border-radius: 12px; box-shadow: 0 0 0 8px rgba(223, 233, 215, .7); transition: background .3s, box-shadow .3s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn { white-space: nowrap; }
.entry .spread { align-items: flex-start; }
a.chip { text-decoration: none; color: var(--sage-dd); background: rgba(223, 233, 215, .85); }

/* ═════════ Warung-Theme (Farben der Live-Startseite cinematic-v2: bone, jungle, deep, gold) ═════════ */
:root {
  --bg: #f4f1ea;
  --ink: #151515;
  --ink-2: #3a3833;
  --muted: #736d62;
  --sage: #3d5c47;
  --sage-d: #2a4433;
  --sage-dd: #1a2e22;
  --sage-l: #e3e6dc;
  --sage-ll: #eef0e8;
  --lime: #b59c7e;
  --gold: #b59c7e;
  --gold-deep: #7a6644;
  --glass: rgba(255, 253, 248, .6);
  --glass-2: rgba(255, 253, 248, .82);
  --line: rgba(21, 21, 21, .08);
  --warm: #7a6644;
  --warm-soft: rgba(181, 156, 126, .16);
}
body, button, input, select, textarea { font-family: Manrope, -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
h1, h2, h3 { font-family: Manrope, -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-weight: 800; letter-spacing: -.03em; }
.bg::before { background: radial-gradient(circle, rgba(61, 92, 71, .32), rgba(61, 92, 71, 0) 70%); }
.bg::after { background: radial-gradient(circle, rgba(181, 156, 126, .38), rgba(181, 156, 126, 0) 70%); }
.top { background: rgba(244, 241, 234, .7); }
.mark { background: linear-gradient(145deg, #2f4b3a, #0c0f0d); color: #f4f1ea; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 4px 12px -4px rgba(12, 15, 13, .6); font-family: Anton, Manrope, sans-serif; font-weight: 400; letter-spacing: .06em; font-size: .8rem; }
.hero-card {
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(181, 156, 126, .42), rgba(181, 156, 126, 0) 58%),
    radial-gradient(90% 80% at 0% 100%, rgba(12, 15, 13, .75), rgba(12, 15, 13, 0) 60%),
    linear-gradient(160deg, #3d5c47 0%, #1a2e22 55%, #0c0f0d 100%);
  box-shadow: 0 26px 54px -26px rgba(12, 15, 13, .85), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.hero-card h1 { font-family: Anton, Manrope, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1.02; font-size: 2.5rem; color: #f4f1ea; }
.hero-card h1 .soft { color: #b59c7e; font-weight: 400; }
.hero-card p { color: rgba(244, 241, 234, .78); }
.hero-card .hi { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b59c7e; }
.ring svg circle:last-child { stroke: #b59c7e; }
.next .dot { color: var(--sage-dd); }
.slide.solid, .btn { background: linear-gradient(160deg, #3d5c47, #1a2e22); box-shadow: 0 12px 26px -14px rgba(12, 15, 13, .75); }
.btn.ghost { background: var(--glass-2); color: var(--sage-dd); }
.slide .knob { color: var(--sage-dd); }
.progress > span { background: linear-gradient(90deg, #3d5c47, #b59c7e); }
.tile-ico, .rec-btn, .seq-link, .mod.done .num, .video.ph { background: linear-gradient(160deg, #3d5c47, #1a2e22); }
.box-key { background: linear-gradient(160deg, rgba(227, 230, 220, .95), rgba(244, 241, 234, .7)); }
.box-tip { background: rgba(181, 156, 126, .14); border-color: rgba(181, 156, 126, .3); }
.box-tip > b, .switch, .eyebrow.gold { color: #7a6644; }
.chip.hold, .chip.play { background: rgba(61, 92, 71, .12); color: var(--sage-dd); }
.chip.play { background: var(--sage-dd); color: #f4f1ea; }
.tabbar { background: rgba(255, 253, 248, .7); }
.tabbar a.on { color: var(--sage-dd); background: rgba(26, 46, 34, .09); }
.topnav a.on, .lang button.on, .seg > button.on, .seg > label:has(input:checked) { background: #fff; }
.badge { background: #7a6644; }
.score { font-family: Anton, Manrope, sans-serif; font-weight: 400; letter-spacing: 0; }
.stat b { font-weight: 800; }
.mini-ring { background: conic-gradient(#b59c7e calc(var(--p) * 360deg), rgba(21, 21, 21, .08) 0); }
.sync { font-size: .74rem; color: var(--bad); font-weight: 600; max-width: 160px; line-height: 1.2; }
.sync:empty { display: none; }
@media (max-width: 520px) { .hero-card h1 { font-size: 2.15rem; } }
