/* Aussehen wie die Android-App (ui/theme/Duo.kt): dunkel, runde Nunito-Schrift, 3D-Knöpfe mit "Lippe". */
@font-face { font-family: "Nunito"; src: url("nunito.ttf") format("truetype"); font-weight: 200 1000; font-style: normal; font-display: swap; }
:root {
  --bg: #131F24; --surface: #1B2A31; --surface-hi: #22343C; --border: #37464F;
  --text: #F1F7FB; --muted: #8FA3AE;
  --green: #58CC02; --green-lip: #46A302; --green-dark: #203A12;
  --blue: #1CB0F6; --blue-lip: #1899D6; --blue-dark: #12364A;
  --red: #FF4B4B; --red-lip: #D33131; --red-dark: #3F1A1C;
  --gold: #FFC800; --gold-lip: #E0A800; --orange: #FF9600; --purple: #CE82FF;
  --gray-lip: #2A363D;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 600 16px/1.4 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; overflow-wrap: break-word;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, b { font-weight: 800; }
small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.ic { display: block; flex: none; }
.boot { padding: 48px 16px; text-align: center; color: var(--muted); }
#app { max-width: 640px; margin: 0 auto; }
.page { padding: calc(16px + var(--sat)) 16px calc(100px + var(--sab)); }
.page.learn { padding: 0 0 calc(100px + var(--sab)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.gap-l > * + * { margin-top: 20px; }
.cap { display: block; color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }

/* Dicker 3D-Knopf: sitzt auf einer dunkleren Lippe und sinkt beim Drücken ein */
.btn {
  display: block; width: 100%; min-height: 52px; padding: 14px 18px; border-radius: 16px; text-align: center;
  font-weight: 800; letter-spacing: .8px; text-transform: uppercase; font-size: 16px; line-height: 24px;
  background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-lip); margin-bottom: 4px;
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--green-lip); }
.btn.blue { background: var(--blue); box-shadow: 0 4px 0 var(--blue-lip); }
.btn.red { background: var(--red); box-shadow: 0 4px 0 var(--red-lip); }
.btn.white { background: #fff; box-shadow: 0 4px 0 rgba(255, 255, 255, .6); }
.btn.quiet { background: var(--bg); color: var(--blue); box-shadow: 0 4px 0 var(--border); min-height: 44px; padding: 10px 14px; font-size: 14px; }
.btn.ghost { background: var(--bg); color: var(--text); box-shadow: 0 4px 0 var(--border); border: 2px solid var(--border); }
.btn[disabled] { background: var(--border); color: var(--muted); box-shadow: 0 4px 0 var(--gray-lip); cursor: default; transform: none; }
.btn.slim { min-height: 44px; padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.link { color: var(--blue); font-weight: 800; padding: 10px; display: block; width: 100%; }
.link.danger { color: var(--red); letter-spacing: .8px; }

.card { background: var(--surface); border: 2px solid var(--border); border-radius: 18px; padding: 16px; }
button.card { display: block; width: 100%; background: var(--bg); box-shadow: 0 4px 0 var(--border); margin-bottom: 4px; transition: transform .06s, box-shadow .06s; }
button.card:active { transform: translateY(4px); box-shadow: 0 0 0 var(--border); }
.big-ico { font-size: 28px; }

/* Lena */
.lena { display: inline-block; flex: none; position: relative; vertical-align: middle; transform-origin: 50% 100%; }
.lena svg { display: block; width: 100%; height: 100%; overflow: visible; animation: l-bob var(--bd) cubic-bezier(.4, 0, .2, 1) var(--ph) infinite alternate; }
@keyframes l-bob { from { transform: translateY(0); } to { transform: translateY(calc(var(--bob) * var(--u))); } }
.l-eye { transform-box: fill-box; transform-origin: center; animation: l-blink 3.4s linear var(--ph-blink) infinite; }
@keyframes l-blink { 0%, 89.7% { transform: scaleY(1); } 92.6% { transform: scaleY(.1); } 95.6%, 100% { transform: scaleY(1); } }
.l-bun { transform-origin: 0 0; animation: l-bun 2.9s linear var(--ph-bun) infinite; }
@keyframes l-bun { 0% { transform: rotate(0); } 4.8% { transform: rotate(6deg); } 10.3% { transform: rotate(-4deg); } 15.5% { transform: rotate(3deg); } 21.4%, 100% { transform: rotate(0); } }
.l-tw, .l-tw2 { transform-origin: 0 0; animation: l-tw .65s linear var(--ph-tw) infinite alternate; }
.l-tw2 { animation-name: l-tw2; }
@keyframes l-tw { from { transform: scale(.65); } to { transform: scale(1); } }
@keyframes l-tw2 { from { transform: scale(1); } to { transform: scale(.77); } }
.l-rise { animation: l-rise .65s linear var(--ph-tw) infinite alternate; }
@keyframes l-rise { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.l-talk { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; animation: l-talk .76s linear 2; }
.lena.speaking .l-mouth { animation: l-hide 1.52s steps(1) 1; }
@keyframes l-hide { from, to { opacity: 0; } }
@keyframes l-talk {
  0%, 100% { opacity: 1; transform: scaleY(.27); } 16% { opacity: 1; transform: scaleY(1); } 32% { opacity: 1; transform: scaleY(.49); }
  50% { opacity: 1; transform: scaleY(.89); } 68% { opacity: 1; transform: scaleY(.35); } 83% { opacity: 1; transform: scaleY(.78); }
}
/* Freudenhüpfer: kurz ducken, springen, landen */
.lena.react-joy { animation: l-hop .58s linear 1; }
@keyframes l-hop {
  0%, 16%, 84%, 100% { transform: translateY(0) scale(1, 1); }
  8% { transform: translateY(0) scale(1.1, .9); }
  33%, 67% { transform: translateY(calc(-11.3 * var(--u))) scale(.979, 1.035); }
  50% { transform: translateY(calc(-16 * var(--u))) scale(.97, 1.05); }
  92% { transform: translateY(0) scale(1.08, .92); }
}
.lena.react-sad { animation: l-sad .7s linear 1; }
@keyframes l-sad { 0%, 25%, 50%, 75%, 100% { transform: rotate(0); } 12.5% { transform: rotate(7deg); } 37.5% { transform: rotate(-5deg); } 62.5% { transform: rotate(3deg); } 87.5% { transform: rotate(-1deg); } }

/* Sprechblase mit Spitze */
.bubble { position: relative; background: var(--bg); border: 2px solid var(--border); border-radius: 16px; padding: 14px; font-weight: 700; font-size: 14px; line-height: 19px; }
.bubble p + p { margin-top: 6px; }
.bubble.big { font-size: 17px; line-height: 23px; }
.bubble::before, .bubble::after { content: ""; position: absolute; width: 0; height: 0; border: 8px solid transparent; }
.tail-start { margin-left: 10px; }
.tail-start::before, .tail-start::after { top: 50%; margin-top: -8px; border-left-width: 0; border-right-width: 10px; }
.tail-start::before { left: -12px; border-right-color: var(--border); }
.tail-start::after { left: -9px; border-right-color: var(--bg); }
.tail-top { margin-top: 10px; }
.tail-top::before, .tail-top::after { left: 50%; margin-left: -8px; border-top-width: 0; border-bottom-width: 10px; }
.tail-top::before { top: -12px; border-bottom-color: var(--border); }
.tail-top::after { top: -9px; border-bottom-color: var(--bg); }
.tail-bottom { margin-bottom: 10px; }
.tail-bottom::before, .tail-bottom::after { left: 50%; margin-left: -8px; border-bottom-width: 0; border-top-width: 10px; }
.tail-bottom::before { bottom: -12px; border-top-color: var(--border); }
.tail-bottom::after { bottom: -9px; border-top-color: var(--bg); }
.say { display: flex; align-items: center; gap: 4px; }
.bubble.pop { transform-origin: 0 50%; animation: bubble-in .35s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes bubble-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }

/* Fortschrittsbalken mit Glanzlicht und durchlaufendem Schimmer */
.bar { height: 16px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar > i { display: block; position: relative; overflow: hidden; height: 100%; min-width: 4%; background: var(--green); border-radius: 999px; transition: width .5s cubic-bezier(.34, 1.4, .64, 1), background-color .3s; }
.bar > i::before { content: ""; position: absolute; left: 7px; right: 7px; top: 20%; height: 26%; border-radius: 99px; background: rgba(255, 255, 255, .3); }
.bar > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-100%); animation: shine 3.6s linear infinite; }
@keyframes shine { 0%, 61% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.bar.big { height: 18px; }
.bar.slim { height: 12px; }
.bar.thin { height: 8px; margin-top: 6px; }
.bar.plain > i::before, .bar.plain > i::after { display: none; }
.bar.gold > i { background: var(--gold); }
.bar.fire > i { background: var(--orange); }

/* Anmeldung */
.onb { min-height: 100vh; min-height: 100dvh; padding: calc(20px + var(--sat)) 20px calc(28px + var(--sab)); }
.lena-top { padding-top: 24px; }
.onb h1.cap, .onb h2.cap { margin-top: 22px; }
.feat { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.feat b { display: block; }
.appear { animation: appear .4s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.field { width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 17px; }
textarea.field { min-height: 110px; font-size: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; resize: vertical; }

/* Kopf + untere Leiste */
.top { margin-bottom: 14px; }
.top h1 { font-size: 26px; font-weight: 900; }
.top p { font-size: 14px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--bg); border-top: 2px solid var(--border); padding: 6px 6px calc(6px + var(--sab)); }
.tabs > div { max-width: 640px; margin: 0 auto; display: flex; }
.tab { flex: 1; min-width: 0; min-height: 56px; margin: 0 3px; padding: 6px 0; border-radius: 14px; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--muted); }
.tab .ic { opacity: .9; filter: saturate(.7); }
.tab.on { color: var(--blue); background: var(--blue-dark); border-color: var(--blue); }
.tab.on .ic { opacity: 1; filter: none; }
.tab.pop .ic { animation: tab-pop .45s cubic-bezier(.34, 2.2, .64, 1); }
@keyframes tab-pop { from { transform: translateY(4px) scale(.72); } to { transform: none; } }

/* Statusleiste im Lernpfad */
.status { position: sticky; top: 0; z-index: 4; background: var(--bg); padding: calc(6px + var(--sat)) 0 0; border-bottom: 2px solid var(--border); }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 10px; border: 2px solid var(--border); border-radius: 12px; font-size: 20px; }
.badge b { font-size: 16px; }
.stat-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; }
.stat-chip.fire { color: var(--orange); } .stat-chip.xp { color: var(--gold); }
.stat-chip.dim { color: var(--muted); } .stat-chip.dim .ic { filter: grayscale(1); opacity: .55; }
.course { color: var(--muted); font-weight: 800; font-size: 13px; padding: 0 16px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; font-size: 14px; }
.goal small { font-size: 11px; font-weight: 700; white-space: nowrap; }

/* Abschnitts-Banner */
.unit { display: flex; align-items: center; gap: 10px; margin: 14px; padding: 14px 10px 14px 16px; border-radius: 18px; background: var(--c); box-shadow: 0 5px 0 var(--lip); color: #fff; }
.unit-top { display: flex; align-items: center; gap: 8px; }
.u-cap { font-weight: 800; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: .88; }
.u-count { font-weight: 800; font-size: 12px; background: rgba(0, 0, 0, .18); border-radius: 8px; padding: 1px 7px; }
.unit h2 { font-size: 19px; line-height: 23px; margin-top: 3px; }
.unit p { font-size: 13px; line-height: 17px; margin-top: 4px; opacity: .92; }
.u-bar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .18); margin-top: 10px; overflow: hidden; }
.u-bar i { display: block; height: 100%; border-radius: 4px; background: #fff; }
.u-bar i.gold { background: var(--gold); }
.u-sign { flex: none; width: 60px; height: 60px; display: grid; place-items: center; background: #fff; font-size: 28px; box-shadow: 0 3px 0 rgba(0, 0, 0, .22), inset 0 0 0 4px #fff, inset 0 0 0 8px #14B8A6; }
.u-sign.round { border-radius: 50%; transform: rotate(-8deg); }
.u-sign.square { border-radius: 22%; transform: rotate(7deg); }

/* Lernpfad: Schlangenlinie mit runden Knoten */
.prow, .ch-row { position: relative; }
.trail { position: absolute; left: 50%; top: 0; margin-left: -180px; overflow: visible; pointer-events: none; }
.ch-row { height: 46px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
.learn section { overflow-x: clip; }
.ch-pill { position: relative; display: flex; align-items: baseline; gap: 8px; min-width: 0; max-width: calc(100% - 28px); padding: 5px 12px; border-radius: 999px; background: var(--bg); border: 2px solid var(--border); font-size: 13px; }
.ch-pill b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-pill small { font-size: 11px; white-space: nowrap; font-weight: 700; }
.pnode-wrap { position: absolute; left: 50%; width: 74px; height: 70px; margin-left: calc(var(--x) - 37px); }
.pnode { position: relative; display: grid; place-items: center; width: 74px; height: 63px; border-radius: 50%; background: var(--face); box-shadow: 0 7px 0 var(--lip); color: #fff; font-size: 28px; line-height: 1; transition: transform .06s, box-shadow .06s; }
.pnode:active { transform: translateY(7px); box-shadow: 0 0 0 var(--lip); }
.pnode::before { content: ""; position: absolute; left: 20%; top: 10%; width: 42%; height: 26%; border-radius: 50%; background: rgba(255, 255, 255, .2); pointer-events: none; }
.pnode .ic { position: relative; }
.pstars { position: absolute; left: 50%; width: 74px; margin-left: calc(var(--x) - 37px); display: flex; justify-content: center; pointer-events: none; }
.ring { position: absolute; left: 50%; top: 31.5px; width: 94px; height: 94px; margin: -47px 0 0 -47px; border-radius: 50%; border: 4px solid var(--c); box-shadow: 0 0 0 1.5px var(--border), inset 0 0 0 1.5px var(--border); pointer-events: none; }
.ring::before { content: ""; position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(closest-side, var(--c), transparent); opacity: .32; z-index: -1; }
.ring::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--c); animation: pulse 1.5s linear infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .5; } to { transform: scale(1.34); opacity: 0; } }
.start-pos { position: absolute; top: 0; left: 50%; transform: translateX(calc(-50% + var(--x))); z-index: 2; pointer-events: none; }
.start-bubble { padding: 8px 14px; font-weight: 900; font-size: 15px; letter-spacing: .5px; animation: start-bounce .65s ease-in-out infinite alternate; }
@keyframes start-bounce { from { transform: translateY(0); } to { transform: translateY(-7px); } }
.plena { position: absolute; left: 50%; pointer-events: none; }
.always { padding: 18px 16px; }
.always h2 { font-size: 20px; font-weight: 900; }

/* Lektionskarte über der unteren Leiste */
.sheet-pos { position: fixed; left: 0; right: 0; bottom: calc(72px + var(--sab)); z-index: 6; padding: 14px; pointer-events: none; }
.sheet { pointer-events: auto; cursor: pointer; max-width: 612px; margin: 0 auto; padding: 18px; border-radius: 22px; background: var(--c); box-shadow: 0 5px 0 var(--lip); color: #fff; animation: sheet-in .32s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(50%); } to { opacity: 1; transform: none; } }
.sheet small { color: rgba(255, 255, 255, .85); font-weight: 800; }
.sh-title { display: block; font-size: 19px; }
.sheet p { font-size: 14px; line-height: 18px; opacity: .92; margin-top: 4px; }
.sh-ico { flex: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 26px; }
.sheet .sh-info { font-size: 13px; font-weight: 800; opacity: 1; margin: 8px 0 14px; }

/* Listenzeilen (Üben, Lernzettel, Prüfungsversuche) */
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--bg); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); margin-bottom: 11px; transition: transform .06s, box-shadow .06s; }
button.lrow:active { transform: translateY(3px); box-shadow: 0 0 0 var(--border); }
.lrow .ico { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--surface-hi); }
.lrow .ico.good { background: var(--green); color: #fff; } .lrow .ico.bad { background: var(--red); color: #fff; }
.lrow b { display: block; }
.lrow .pct { font-weight: 800; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Sitzung */
.ses { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(10px + var(--sat)) 18px 0; }
.ses-top { display: flex; align-items: center; gap: 10px; margin: 0 -10px 12px; }
.x { width: 44px; height: 44px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; flex: none; }
.count { font-weight: 800; font-size: 14px; color: var(--muted); padding-right: 8px; font-variant-numeric: tabular-nums; }
.timer { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); padding-right: 8px; }
.timer.low { color: var(--red); }
.tag { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--purple); margin-bottom: 4px; }
.retry { color: var(--orange); font-weight: 800; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 4px; }
.qhead { font-size: 21px; line-height: 26px; margin-bottom: 14px; }
.qtext { font-size: 16px; font-weight: 600; line-height: 22px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }
.answers { margin-top: 18px; }
.shake { animation: shake .27s linear; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 17% { transform: translateX(-14px); } 33% { transform: translateX(12px); } 50% { transform: translateX(-9px); } 67% { transform: translateX(6px); } 83% { transform: translateX(-3px); } }
.opts { display: grid; gap: 13px; grid-template-columns: minmax(0, 1fr); }
/* Antwortkarte: Rand und Lippe in derselben Farbe */
.opt { display: flex; gap: 12px; align-items: center; width: 100%; min-width: 0; padding: 14px; border-radius: 14px; background: var(--bg); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); font-size: 16px; line-height: 1.35; font-weight: 700; transition: transform .06s, box-shadow .06s; }
.opt:not([disabled]):active { transform: translateY(3px); box-shadow: 0 0 0 var(--border); }
.opt .k { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 2px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); }
.opt.sel { border-color: var(--blue); background: var(--blue-dark); box-shadow: 0 3px 0 var(--blue); }
.opt.sel .k { border-color: var(--blue); color: var(--blue); }
.opt.good { border-color: var(--green); background: var(--green-dark); box-shadow: 0 3px 0 var(--green); }
.opt.good .k { border-color: var(--green); color: var(--green); }
.opt.bad { border-color: var(--red); background: var(--red-dark); box-shadow: 0 3px 0 var(--red); }
.opt.bad .k { border-color: var(--red); color: var(--red); }
.opt[disabled] { cursor: default; }
.opt .grow, .qtext, .lz td, .lz th { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.opts.tf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tf .opt { justify-content: center; font-weight: 800; padding: 22px 10px; }
.opt.seg { padding: 12px; text-align: center; }
.slot-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 14px 0 8px; }
.slot-title:first-child { margin-top: 0; }
.empty { border: 2px dashed var(--border); border-radius: 14px; padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 10px; align-items: start; }
.cols > * { min-width: 0; }
.cols .opts { gap: 11px; }
.cols .opt { padding: 10px 8px; gap: 8px; font-size: 15px; min-height: 58px; }
.cols .opt .k { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.opt.pair-0 { border-color: var(--blue); } .pair-0 .k { background: var(--blue); color: #04263a; border-color: var(--blue); }
.opt.pair-1 { border-color: var(--purple); } .pair-1 .k { background: var(--purple); color: #2a0a40; border-color: var(--purple); }
.opt.pair-2 { border-color: var(--gold); } .pair-2 .k { background: var(--gold); color: #3a2c00; border-color: var(--gold); }
.opt.pair-3 { border-color: var(--orange); } .pair-3 .k { background: var(--orange); color: #3a1f00; border-color: var(--orange); }
.opt.pair-4 { border-color: #2DD4BF; } .pair-4 .k { background: #2DD4BF; color: #00302a; border-color: #2DD4BF; }
.opt.good { border-color: var(--green); }
.opt.bad { border-color: var(--red); }
.ses-body { flex: 1; padding-bottom: 24px; }

/* Unterer Bereich und Feedback-Blatt */
.foot { position: sticky; bottom: 0; margin: 0 -18px; padding: 14px 18px calc(14px + var(--sab)); background: var(--bg); }
.foot.good, .foot.bad { border-radius: 22px 22px 0 0; padding-top: 16px; box-shadow: 0 -8px 24px rgba(0, 0, 0, .45); }
.foot.good { background: #1D3311; --accent: var(--green); }
.foot.bad { background: #3A1416; --accent: var(--red); }
.foot.in { animation: foot-in .34s cubic-bezier(.2, .9, .3, 1.08) both; }
@keyframes foot-in { from { transform: translateY(100%); } to { transform: none; } }
.fb-head { display: flex; align-items: center; gap: 12px; }
.fb-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.foot.in .fb-ico { animation: ico-pop .5s cubic-bezier(.34, 1.9, .64, 1) both; }
.foot.in.bad .fb-ico { animation: ico-pop .5s cubic-bezier(.34, 1.9, .64, 1) both, shake .27s linear .16s; }
@keyframes ico-pop { from { transform: scale(0) rotate(-50deg); } to { transform: none; } }
.foot h3 { font-size: 20px; color: var(--accent); }
.foot.in h3 { animation: title-slide .26s ease-out .08s both; }
@keyframes title-slide { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.foot .sol { margin-top: 6px; color: var(--accent); font-size: 15px; font-weight: 700; line-height: 20px; }
.foot .sol ol, .foot .sol ul { margin: 0; padding-left: 22px; }
.foot .exp { font-size: 13px; line-height: 18px; margin-top: 6px; opacity: .9; }
.foot .src { font-size: 12px; font-weight: 700; color: var(--muted); margin: 4px 0 12px; }
.foot .fb { max-height: 38vh; overflow-y: auto; }
.foot .btn + .btn { margin-top: 10px; }

/* Serien-Banner */
.combo { position: fixed; top: calc(70px + var(--sat)); left: 50%; z-index: 25; white-space: nowrap; background: var(--orange); color: #fff; font-weight: 900; font-size: 18px; padding: 10px 20px; border-radius: 20px; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); animation: combo 1.9s both; pointer-events: none; }
@keyframes combo { 0% { transform: translateX(-50%) scale(.3); opacity: 0; } 10% { transform: translateX(-50%) scale(1.12); opacity: 1; } 17% { transform: translateX(-50%) scale(1); } 85% { transform: translateX(-50%) scale(1); opacity: 1; } 100% { transform: translateX(-50%) scale(1); opacity: 0; } }

/* Dialoge */
.modal-bg { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; gap: 12px; background: var(--surface); border-radius: 26px; padding: 22px; animation: appear .22s ease-out; }
.m-title { display: block; font-size: 19px; line-height: 23px; }
.modal-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.modal-scroll > :first-child { margin-top: 0; }

/* Ergebnis */
.result { text-align: center; padding-top: calc(20px + var(--sat)); position: relative; }
.hero { position: relative; width: 230px; height: 230px; margin: 0 auto -10px; display: grid; place-items: center; }
.rays { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 200, 0, .28) 0 14deg, transparent 14deg 30deg); -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent); animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop-in { display: inline-block; position: relative; animation: pop-in .6s cubic-bezier(.34, 1.7, .64, 1) both; }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.result h1 { font-size: 28px; font-weight: 900; }
.result h1.gold { color: var(--gold); }
.title-in { animation: pop-in .5s cubic-bezier(.34, 1.7, .64, 1) .25s both; }
.quote { font-size: 14px; line-height: 19px; }
.rstars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.streakline { font-weight: 800; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { border: 2px solid var(--c, var(--border)); border-radius: 16px; overflow: hidden; background: var(--c, var(--border)); text-align: center; }
.stat small { color: #fff; font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .6px; padding: 3px 4px; }
.stat b { display: block; font-size: 18px; padding: 12px 4px; background: var(--bg); border-radius: 13px; color: var(--c, var(--text)); }
.stat.gold { --c: var(--gold); } .stat.green { --c: var(--green); } .stat.blue { --c: var(--blue); }
.stat.gold small { color: #3a2c00; }
.review { text-align: left; }
.review .card + .card { margin-top: 10px; }
.review .card p + p { margin-top: 6px; }
.ok { color: var(--green); font-weight: 800; } .no { color: var(--red); font-weight: 800; }
.confetti { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -24px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear both; }
@keyframes fall { to { transform: translateY(112vh) rotate(720deg); } }
.result > :not(.confetti) { position: relative; z-index: 2; }

/* Einstellungen */
.setting b { display: block; }
.switch { flex: none; width: 54px; height: 32px; border-radius: 99px; background: var(--border); position: relative; transition: background-color .15s; }
.switch i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(22px); }

/* Lernzettel */
.lz h1 { font-size: 24px; font-weight: 900; }
.lz h2 { font-size: 19px; margin: 26px 0 8px; color: var(--blue); }
.lz p { margin: 10px 0; }
.lz ul, .lz ol { margin: 10px 0; padding-left: 22px; }
.lz li + li { margin-top: 5px; }
.lz .tbl { overflow-x: auto; margin: 12px 0; border: 2px solid var(--border); border-radius: 14px; }
.lz table { border-collapse: collapse; width: 100%; font-size: 15px; }
.lz th, .lz td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.lz th { background: var(--surface-hi); }
.lz tr:last-child td { border-bottom: 0; }
.note { border-radius: 14px; padding: 12px 14px; margin: 12px 0; border: 2px solid var(--blue); background: var(--blue-dark); }
.note b { display: block; font-size: 12px; letter-spacing: .06em; margin-bottom: 2px; color: var(--blue); }
.note.WICHTIG { border-color: var(--gold); background: #3a3000; } .note.WICHTIG b { color: var(--gold); }
.note.ACHTUNG { border-color: var(--red); background: var(--red-dark); } .note.ACHTUNG b { color: var(--red); }
.back { color: var(--blue); font-weight: 800; padding: 8px 8px 8px 0; margin-bottom: 8px; display: inline-block; }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--sab)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 800; z-index: 40; max-width: 90vw; text-align: center; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.pstars { z-index: 1; }
.bar.plain > i { min-width: 0; }
