/*
 * Wortwege – Design „Salbei“ (seit 16.11.2026)
 * Creme, Dunkelgrün und sanftes Grün, anthrazitfarbene Schrift, große runde Karten, viel Weißraum.
 * Wird NACH styles.css und theme.css geladen und überschreibt deren Farben und Formen.
 *
 * Erscheinungsbild: html[data-theme="light" | "dark"] erzwingt hell/dunkel; ohne Attribut gilt das System.
 * Bewegung: alle zusätzlichen Animationen nur bei prefers-reduced-motion: no-preference.
 */

/* ═════════════ Farben ═════════════ */
:root {
  color-scheme: light;
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --surface-2: #f0eadc;
  --text: #2b2d2a;
  --muted: #5f655c;
  --line: #e4dccb;
  --primary: #1f5c45;
  --primary-ink: #fffdf8;
  --primary-soft: #e2ede5;
  --primary-2: #2f7a58;
  --accent: #d99a2b;
  --accent-soft: #f8ecd3;
  --mint: #3f9c6f;
  --mint-soft: #e0f0e6;
  --ok: #1d6a46;
  --ok-soft: #e0f0e6;
  --bad: #ad3a2e;
  --bad-soft: #f8e3de;
  --info: #2c5a82;
  --info-soft: #e4edf5;
  --focus: #2a6db0;
  --star: #e0a43a;
  --star-off: #e2dac8;
  --gold: #946210; /* ≥ 4.5:1 auf Creme und Weiß (auch als Schriftfarbe) */

  --tone-1: #f7ecd4; --tone-1-b: #e8d3a6;
  --tone-2: #e4ede5; --tone-2-b: #c3d8c8;
  --tone-3: #f5e4dc; --tone-3-b: #e5c3b4;
  --tone-4: #ddeee3; --tone-4-b: #b6d8c2;
  --tone-5: #ebe7dc; --tone-5-b: #d4ccb8;
  --tone-6: #f1e5d1; --tone-6-b: #dcc6a0;

  --aurora: linear-gradient(135deg, #2f7a58 0%, #1f5c45 60%, #173f31 100%);
  --aurora-soft: linear-gradient(135deg, #eef3ea 0%, #f6f1e7 100%);
  --cta: #1f5c45;
  --glow: 0 10px 24px -14px rgba(31, 92, 69, 0.55);

  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 1px 2px rgba(43, 45, 42, 0.04), 0 8px 24px -14px rgba(43, 45, 42, 0.18);
  --shadow-lift: 0 2px 6px rgba(43, 45, 42, 0.06), 0 20px 40px -20px rgba(43, 45, 42, 0.3);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dunkel: wie das System (falls nicht ausdrücklich hell gewählt) oder ausdrücklich dunkel */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131714; --surface: #1b201c; --surface-2: #242a25; --text: #ece8de; --muted: #a9aea3; --line: #2e352f;
    --primary: #8fd1ab; --primary-ink: #0f231a; --primary-soft: #213529; --primary-2: #a9dfbf;
    --accent: #e9b44c; --accent-soft: #39301d; --mint: #7fd6a7; --mint-soft: #1d3527;
    --ok: #86d9ab; --ok-soft: #1d3527; --bad: #ff9d90; --bad-soft: #3b221f; --info: #a3c6ea; --info-soft: #1d2833;
    --focus: #9fd0ff; --star: #e9b44c; --star-off: #3a3f39; --gold: #e9b44c;
    --tone-1: #2f2a1c; --tone-1-b: #4f4528; --tone-2: #1f2b23; --tone-2-b: #34503d; --tone-3: #322420; --tone-3-b: #573a30;
    --tone-4: #1c2e24; --tone-4-b: #2f5a43; --tone-5: #26261f; --tone-5-b: #45443a; --tone-6: #2f271c; --tone-6-b: #54452c;
    --aurora: linear-gradient(135deg, #2c5a45 0%, #1e4234 60%, #15302a 100%);
    --aurora-soft: linear-gradient(135deg, #1d2620 0%, #181d19 100%);
    --cta: #8fd1ab; --glow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.35), 0 22px 44px -18px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131714; --surface: #1b201c; --surface-2: #242a25; --text: #ece8de; --muted: #a9aea3; --line: #2e352f;
  --primary: #8fd1ab; --primary-ink: #0f231a; --primary-soft: #213529; --primary-2: #a9dfbf;
  --accent: #e9b44c; --accent-soft: #39301d; --mint: #7fd6a7; --mint-soft: #1d3527;
  --ok: #86d9ab; --ok-soft: #1d3527; --bad: #ff9d90; --bad-soft: #3b221f; --info: #a3c6ea; --info-soft: #1d2833;
  --focus: #9fd0ff; --star: #e9b44c; --star-off: #3a3f39; --gold: #e9b44c;
  --tone-1: #2f2a1c; --tone-1-b: #4f4528; --tone-2: #1f2b23; --tone-2-b: #34503d; --tone-3: #322420; --tone-3-b: #573a30;
  --tone-4: #1c2e24; --tone-4-b: #2f5a43; --tone-5: #26261f; --tone-5-b: #45443a; --tone-6: #2f271c; --tone-6-b: #54452c;
  --aurora: linear-gradient(135deg, #2c5a45 0%, #1e4234 60%, #15302a 100%);
  --aurora-soft: linear-gradient(135deg, #1d2620 0%, #181d19 100%);
  --cta: #8fd1ab; --glow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.35), 0 22px 44px -18px rgba(0, 0, 0, 0.8);
}

/* ═════════════ Grundlayout & Schrift ═════════════ */
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .greet, .big, .tile-title, .card-title, .brand-name, .stat-num, .fb-head, .ex-question, .cc-title, .section-title, .kpi-num, .deck-title, .xp-total strong {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.4rem); font-weight: 600; line-height: 1.12; }
h2 { font-weight: 600; }
.card-title { font-size: 1.18rem; font-weight: 600; }
.section-title { font-size: 1.3rem; font-weight: 600; margin: 32px 0 14px; }
.eyebrow { color: var(--primary); font-family: var(--font); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 4px; }
.muted { color: var(--muted); }
a { color: var(--primary); }
.center { text-align: center; }
.between { justify-content: space-between; align-items: center; }
.page { padding-top: 8px; }

/* ═════════════ Kopfleiste ═════════════ */
.topbar {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.brand-mark { border-radius: 11px; box-shadow: none; }
.brand-name { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
.pill { background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: none; font-weight: 800; }
.pill-link { color: var(--primary); }
.streak-pill { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.xp-pill { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); background: var(--surface); }
.xp-pill .xp-lv { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 0.72rem; font-weight: 900; }
.xp-pill .xp-num::after { content: " XP"; font-size: 0.72rem; color: var(--muted); font-weight: 800; }
.theme-btn .i-sun { display: none; }
.theme-btn[aria-pressed="true"] .i-sun { display: block; }
.theme-btn[aria-pressed="true"] .i-moon { display: none; }
.icon-btn { color: var(--text); }
.icon-btn:hover { background: var(--primary-soft); }

/* ═════════════ Navigation ═════════════ */
.bottomnav {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  box-shadow: var(--shadow-lift);
}
.bottomnav a { color: var(--muted); font-weight: 800; gap: 4px; }
.bottomnav a:hover { background: var(--surface-2); color: var(--text); }
.bottomnav a.active { background: var(--primary-soft); color: var(--primary); }
.bottomnav a.active::after { background: var(--primary); }
.bottomnav .nav-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottomnav a.active .nav-ico { stroke-width: 2.1; }
@media (min-width: 1024px) { .bottomnav .nav-ico { width: 26px; height: 26px; } }

/* ═════════════ Schaltflächen ═════════════ */
.btn { border-radius: 16px; font-weight: 800; letter-spacing: 0; border-width: 1.5px; }
.btn.primary { background: var(--cta); color: var(--primary-ink); border-color: transparent; box-shadow: var(--glow); }
.btn.primary:hover:not([disabled]) { background: var(--cta); filter: brightness(1.08); }
.btn.primary::after { display: none; }
.btn.secondary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn.secondary:hover:not([disabled]) { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn.ghost:hover:not([disabled]) { border-color: var(--primary); background: var(--surface); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger.block { background: var(--bad); color: var(--surface); }
.audio-btn { background: var(--cta); color: var(--primary-ink); box-shadow: var(--glow); }
.audio-btn.secondary { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.say-btn { background: var(--primary-soft); color: var(--primary); }

/* ═════════════ Karten ═════════════ */
.card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head .card-title { margin: 0; }
.chip-count { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 900; font-size: 0.85rem; white-space: nowrap; }
.chip-count.is-done { background: var(--ok-soft); color: var(--ok); }
.tone-1, .tone-2, .tone-3, .tone-4, .tone-5, .tone-6 { background: var(--tone-c) !important; }
.notice-warn { background: var(--accent-soft); }
.lesson-row, .stat, .choice-card, .option, .steps li, .plan-card, .feature, .word-cards .word-item { border-color: var(--line); background: var(--surface); }
.lesson-row.is-next { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--aurora) border-box; }
.stat-num { color: var(--primary); }
.stat-xp .stat-num { color: var(--gold); }
.home-hero { background: var(--aurora); }
.toast { background: var(--text); color: var(--bg); border-radius: 16px; }
.toast.ok { background: var(--primary); color: var(--primary-ink); }
.toast.error { background: var(--bad); color: var(--surface); }
.text-input, .settings select, .settings input[type="text"], .settings input[type="search"] { background: var(--surface); border-color: var(--line); color: var(--text); }
.spinner { border-color: var(--primary-soft); border-top-color: var(--primary); }
.step-num { background: var(--primary); color: var(--primary-ink); }
.ob-progress span.on { background: var(--primary); }
.legal-links .cancel-link { color: var(--bad); }

/* Fortschrittsbalken (Breite über --w, wächst beim Erscheinen) */
.bar { height: 12px; border-radius: 999px; background: var(--surface-2); box-shadow: none; overflow: hidden; }
.bar.slim { height: 8px; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--mint)); }
.bar > span[style*="--w"] { width: var(--w); }
.bar > span::after { display: none; }
.xp-bar { height: 14px; }
.xp-bar > span { background: linear-gradient(90deg, var(--accent), #f0c46a); }
.challenge-row.done .bar > span { background: var(--ok); }

/* ═════════════ Startseite (Dashboard) ═════════════ */
.dash { display: grid; gap: 16px; }
.dash > * { margin: 0; }
.dash-head { display: flex; align-items: center; gap: 16px; padding: 10px 2px 0; }
.dash-head h1 { margin: 0 0 6px; }
.dash-head p { margin: 0; }
.dash-mascot { flex: none; width: 84px; height: auto; }
.continue-card {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center;
  padding: 18px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 70%, var(--surface)), var(--surface) 70%);
}
.continue-card .scene, .continue-card .scene-sm { margin: 0; width: 100%; }
.continue-card .scene-canvas { border-radius: 20px; aspect-ratio: 16 / 7; }
@media (min-width: 640px) { .continue-card .scene-canvas { aspect-ratio: 4 / 3; } }
.cc-art .lesson-icon { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 22px; }
.cc-title { font-size: 1.45rem; margin: 2px 0 4px; }
.cc-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cc-progress .bar { flex: 1; }
.cc-go { position: absolute; right: 26px; top: 26px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: 1.3rem; font-weight: 900; box-shadow: var(--glow); }
@media (min-width: 640px) {
  .continue-card { grid-template-columns: 220px 1fr; padding: 20px 76px 20px 20px; }
  .cc-go { top: 50%; margin-top: -22px; right: 22px; }
}
.dash-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .dash-grid { grid-template-columns: 1fr 1fr; } .dash-grid .xp-card { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: 1.4fr 1fr 1fr; } .dash-grid .xp-card { grid-column: auto; } }
.dash-grid .card { margin: 0; }
.big { font-size: 1.9rem; font-weight: 600; margin: 0; line-height: 1.1; }
.big .small { font-family: var(--font); font-weight: 800; }

/* XP-Karte */
.xp-card { display: grid; gap: 12px; }
.xp-head { display: flex; align-items: center; gap: 14px; }
.xp-head .card-title { margin: 0; font-size: 1.3rem; }
.xp-head .eyebrow { margin: 0; }
.lvl-badge { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--aurora); color: #fffdf8; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; box-shadow: var(--glow); transform: rotate(-4deg); }
.lvl-badge span { transform: rotate(4deg); }
.xp-total { margin: 0; font-weight: 800; color: var(--muted); white-space: nowrap; }
.xp-total strong { font-size: 1.6rem; color: var(--gold); margin-right: 2px; }
.xp-card p { margin: 0; }
.xp-card-big .lvl-badge { width: 68px; height: 68px; font-size: 1.9rem; border-radius: 22px; }

/* Lernserie */
.streak-card { display: grid; gap: 14px; align-content: start; }
.week-dots { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0; padding: 0; }
.week-dots li { display: grid; justify-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.week-dots .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); }
.week-dots li.on .dot { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
.week-dots li.today .wd { color: var(--text); }
.goal-card { display: flex; align-items: center; gap: 16px; }
.goal-card p { margin: 0; }
.ring-fg { stroke: var(--primary); }
.ring-bg { stroke: var(--surface-2); }

/* Tages-Challenges */
.challenge-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.challenge-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid transparent; }
.challenge-row.done { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.ch-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); }
.ch-text { margin: 0 0 8px; font-weight: 800; }
.challenge-row.done .ch-text { color: var(--ok); }
.ch-reward { display: grid; justify-items: end; gap: 2px; flex: none; text-align: end; }
.ch-val { font-weight: 900; font-size: 0.9rem; }
.ch-xp { font-size: 0.75rem; font-weight: 900; color: var(--gold); }
.ch-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: var(--surface); font-weight: 900; }

/* Zuletzt gelernte Wörter */
.recent-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.recent-words li { padding: 10px 12px; border-radius: 18px; background: var(--surface-2); }

/* Kacheln */
.tile-grid { gap: 14px; }
.tile { border-radius: 26px; border: 1px solid var(--tone-cb, var(--line)); box-shadow: none; min-height: 150px; }
.tile .ico { filter: none; }
.tile-title { font-weight: 600; }
.home-meta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* ═════════════ Seitenkopf ═════════════ */
.page-head { margin: 8px 0 18px; }
.page-head h1 { margin: 0 0 6px; }
.page-head p { margin: 0; }

/* ═════════════ Statistik & Erfolge ═════════════ */
.stats-page { display: grid; gap: 16px; }
.stats-page > * { margin: 0; }
.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: grid; gap: 4px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow); }
.kpi-num { font-size: 1.7rem; font-weight: 600; line-height: 1.1; color: var(--text); }
.kpi-num small { font-size: 0.95rem; color: var(--muted); font-family: var(--font); font-weight: 800; }
.kpi-label { font-size: 0.82rem; font-weight: 800; color: var(--muted); }
.chart-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .chart-grid { grid-template-columns: 1fr 1fr; } .chart-grid .accuracy-card { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .chart-grid { grid-template-columns: 1fr 1fr 0.8fr; } .chart-grid .accuracy-card { grid-column: auto; } }
.chart-grid .card { margin: 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .cb { fill: color-mix(in srgb, var(--primary) 28%, var(--surface-2)); }
.chart .cb.reached { fill: var(--primary); }
.chart .cb.today { stroke: var(--primary); stroke-width: 1.5; }
.chart .cv { font: 800 10px var(--font); fill: var(--muted); }
.chart .cl { font: 800 10px var(--font); fill: var(--muted); }
.chart .goal { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 4 4; }
.accuracy-card { display: grid; justify-items: center; text-align: center; gap: 6px; }
.donut { width: 140px; height: 140px; }
.donut circle { fill: none; stroke-width: 12; transform: rotate(-90deg); transform-origin: 50% 50%; }
.donut .d-bg { stroke: var(--surface-2); }
.donut .d-fg { stroke: var(--primary); stroke-linecap: round; }
.donut .d-txt { font: 600 20px var(--font-display); fill: var(--text); }
.ach-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ach { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow); }
.ach .grow { display: grid; gap: 4px; min-width: 0; }
.ach-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); }
.ach:not(.got) .ach-icon img { filter: grayscale(1); opacity: 0.55; }
.ach.got { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.ach.got .ach-icon { background: var(--accent-soft); }
.ach-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.ach-text { font-size: 0.88rem; color: var(--muted); }
.ach-meta { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.ach.got .ach-meta { color: var(--gold); }
.ach.got .bar > span { background: var(--gold); }

/* ═════════════ Vokabeltrainer ═════════════ */
.vocab { display: grid; gap: 16px; }
.vocab > * { margin: 0; }
.vp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.vp-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; margin: 0; line-height: 1; }
.vp-top p { margin: 0; }
.vp-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; font-size: 0.86rem; font-weight: 800; color: var(--muted); }
.vp-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-ok { background: var(--ok); } .dot-hard { background: var(--accent); } .dot-seen { background: var(--info); } .dot-new { background: var(--line); }
.deck-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .deck-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.deck-card { position: relative; display: grid; gap: 4px; align-content: start; min-height: 150px; padding: 16px; border-radius: 24px; text-decoration: none; color: var(--text); border: 1px solid var(--tone-cb, var(--line)); }
.deck-card.is-empty { background: var(--surface-2); border: 1px dashed var(--line); opacity: 0.75; }
.deck-title { font-weight: 600; font-size: 1.08rem; margin-top: 6px; }
.deck-sub { font-size: 0.84rem; color: var(--muted); font-weight: 700; }
.deck-count { position: absolute; top: 14px; right: 14px; min-width: 32px; padding: 3px 9px; border-radius: 999px; background: var(--surface); font-weight: 900; font-size: 0.85rem; text-align: center; }
.vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vlist-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; }
.empty-note { padding: 18px; border-radius: 20px; border: 1px dashed var(--line); }
.vocab-edit { display: grid; gap: 14px; }
.back-link { font-weight: 800; text-decoration: none; }
.pick-list { list-style: none; margin: 10px 0 0; padding: 4px; max-height: 340px; overflow: auto; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.pick-list label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; cursor: pointer; background: var(--surface); }
.pick-list label:has(input:checked) { background: var(--primary-soft); }
.pick-list input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.own-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.own-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); }
.own-list li .btn { margin-inline-start: auto; }
.own-add { display: grid; gap: 10px; }
@media (min-width: 640px) { .own-add { grid-template-columns: 1fr 1fr auto; align-items: end; } }

/* Karteikarte mit Umdreh-Animation */
.vocab-practice { max-width: 640px; }
.flashcard { position: relative; margin: 14px auto 12px; width: 100%; max-width: 460px; min-height: 340px; perspective: 1400px; cursor: pointer; border-radius: 30px; outline-offset: 6px; }
.fc-inner { position: relative; width: 100%; min-height: 340px; transform-style: preserve-3d; transition: transform 0.6s var(--ease); }
.flashcard.is-flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 28px 22px;
  border-radius: 30px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; text-align: center; overflow: auto;
}
.fc-back { transform: rotateY(180deg); background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); }
.fc-word { font-size: 1.5rem; }
.fc-word .term-text { font-size: 1.7rem; font-weight: 800; }
.small-word .term-text { font-size: 1.1rem; }
.fc-tag { position: absolute; top: 16px; left: 16px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 900; background: var(--surface-2); color: var(--muted); }
.fc-tag.fc-learned { background: var(--ok-soft); color: var(--ok); }
.fc-tag.fc-hard { background: var(--accent-soft); color: var(--gold); }
.fc-turn { position: absolute; bottom: 14px; right: 18px; font-size: 1.4rem; color: var(--muted); }
.fc-label { margin: 0; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.fc-gloss { margin: 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; }
.fc-example { width: 100%; padding: 12px; border-radius: 18px; background: var(--surface); }
.fc-actions { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 460px; margin: 0 auto; }
.fc-actions .btn { min-height: 56px; padding: 8px 6px; flex-direction: column; gap: 2px; font-size: 0.92rem; }
.fc-keys { margin-top: 14px; }
@media (hover: none) { .fc-keys { display: none; } }

/* ═════════════ Spiele: Zuordnen & Schreiben ═════════════ */
.match-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.match-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.match-board .match-btn { display: grid; gap: 2px; min-height: 58px; width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; hyphens: auto; padding: 10px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 800; text-align: start; cursor: pointer; }
.match-board .match-btn.selected { border-color: var(--primary); background: var(--primary-soft); }
.match-board .match-btn.is-right { border-color: var(--ok); background: var(--ok-soft); opacity: 0.7; }
.match-board .match-btn.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.type-prompt { display: flex; align-items: center; gap: 14px; margin: 8px 0 14px; }
.type-prompt .ex-source { margin: 0; flex: 1; }
.type-form { display: grid; gap: 10px; }
.type-input { font-size: 1.25rem; min-height: 58px; }

/* ═════════════ XP-Anzeige, Level-Aufstieg ═════════════ */
.xp-pop {
  position: fixed; z-index: 90; left: 50%; top: 84px; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; background: var(--gold); color: var(--surface);
  font: 700 1.05rem var(--font-display); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.45); pointer-events: none;
}
.levelup { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 55%, rgba(10, 20, 14, 0.55)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.levelup-card { position: relative; overflow: hidden; width: min(420px, 100%); padding: 30px 24px 22px; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-lift); text-align: center; }
.levelup-card h2 { margin: 4px 0 8px; font-size: 1.6rem; }
.levelup-badge { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 30px; background: var(--aurora); color: #fffdf8; font: 700 2.6rem var(--font-display); box-shadow: var(--glow); transform: rotate(-6deg); }
.levelup-badge span { transform: rotate(6deg); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; left: calc(var(--i) * 5.5% + 2%); width: 8px; height: 14px; border-radius: 3px; background: var(--gold); opacity: 0; }
.confetti i:nth-child(3n) { background: var(--mint); }
.confetti i:nth-child(3n + 1) { background: var(--primary); }

/* ═════════════ Gründer-Statistik ═════════════ */
.founder [data-stats] { display: grid; gap: 16px; }
.founder [data-stats] > * { margin: 0; }
.online-card { display: flex; align-items: center; gap: 22px; background: linear-gradient(140deg, var(--primary-soft), var(--surface) 70%); }
.online-card p { margin: 0; }
.online-num { font-family: var(--font-display); font-size: 4rem; font-weight: 600; line-height: 1; color: var(--primary); }
.live-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 6px color-mix(in srgb, #2fbf71 25%, transparent); }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: live 1.6s ease-in-out infinite; } }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, #2fbf71 30%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, #2fbf71 0%, transparent); } }
.pair-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pair-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-weight: 800; }

/* ═════════════ Unterstützen-Karte ═════════════ */
.support-card { display: grid; gap: 14px; background: linear-gradient(150deg, var(--accent-soft), var(--surface) 75%); }
.support-card p { margin: 4px 0 0; }

/* ═════════════ Handy ═════════════ */
@media (max-width: 480px) {
  .card { padding: 18px; border-radius: 24px; }
  .dash-mascot { width: 66px; }
  .cc-title { font-size: 1.25rem; }
  .ch-text { font-size: 0.92rem; }
  .fc-actions .btn { font-size: 0.82rem; }
  .xp-pill .xp-num::after { content: ""; }
  #topbar-course { padding: 4px 8px; }
}
@media (max-width: 400px) {
  .topbar .streak-pill { display: none; }
  .kpi-num { font-size: 1.45rem; }
}

/* ═════════════ Bewegung (nur ohne „Weniger Bewegung“) ═════════════ */
@media (prefers-reduced-motion: no-preference) {
  main.page-anim > * { animation: page-in 0.42s var(--ease) both; }
  .card, .tile, .deck-card, .kpi, .ach, .lesson-row, .continue-card { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s ease; }
  a.card:hover, .tile:hover, a.deck-card:hover, .continue-card:hover, .lesson-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
  .btn { transition: transform 0.18s var(--ease), filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
  .btn:active:not([disabled]) { transform: scale(0.97); }
  .bar > span[style*="--w"] { animation: bar-grow 0.9s var(--ease) both; }
  .chart .cb { transform-box: fill-box; transform-origin: bottom; animation: col-grow 0.7s var(--ease) both; animation-delay: var(--d, 0ms); }
  .donut .d-fg { animation: donut-in 1s var(--ease) both; }
  .xp-pop { animation: xp-rise 1.6s var(--ease) forwards; }
  .xp-pill.bump { animation: bump 0.5s var(--ease); }
  .levelup-card { animation: pop-in 0.5s var(--ease) both; }
  .levelup-badge { animation: badge-spin 0.9s var(--ease) both 0.1s; }
  .confetti i { animation: confetti 1.8s ease-in forwards; animation-delay: calc(var(--i) * 45ms); }
  .challenge-row.done .ch-check { animation: pop-in 0.4s var(--ease) both; }
  .cc-go { transition: transform 0.25s var(--ease); }
  .continue-card:hover .cc-go { transform: translateX(4px); }
  .dash-mascot { animation: float 5s ease-in-out infinite; }
  .match-board .match-btn.is-wrong { animation: shake 0.35s ease; }
  .bottomnav a .nav-ico { transition: transform 0.25s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  /* Karteikarte: ohne Drehung, nur Seitenwechsel */
  .fc-inner { transition: none; transform: none !important; }
  .fc-back { transform: none; visibility: hidden; }
  .flashcard.is-flipped .fc-front { visibility: hidden; }
  .flashcard.is-flipped .fc-back { visibility: visible; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bar-grow { from { width: 0; } }
@keyframes col-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes donut-in { from { stroke-dashoffset: 264; } }
@keyframes xp-rise { 0% { opacity: 0; transform: translate(-50%, 16px) scale(0.85); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 70% { opacity: 1; transform: translate(-50%, -6px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -28px) scale(0.96); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes badge-spin { from { transform: rotate(-200deg) scale(0.4); opacity: 0; } to { transform: rotate(-6deg) scale(1); opacity: 1; } }
@keyframes confetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(420px) rotate(540deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Hoher Kontrast */
@media (prefers-contrast: more) {
  .card, .kpi, .ach, .deck-card, .fc-face { border-width: 2px; border-color: var(--text); }
  .bar { outline: 1px solid var(--text); }
}

/* Android-App aus dem Play Store: keine Preis-/Abo-Links und keine Spendenkarte (Play-Richtlinien) */
.store-app a[href^="#/pricing"],
.store-app a[href^="#/billing"],
.store-app .support-card { display: none !important; }
