/* Englisch A1 – Weltraum-Design (Standard) mit heller Variante. Mobile first. */

/* ---------- Farben ---------- */

:root,
:root[data-theme="dark"] {
  --bg: #0a0c29;
  --bg-2: #171b4f;
  --surface: rgb(24 29 78 / 72%);
  --surface-solid: #161a47;
  --surface-2: rgb(255 255 255 / 6%);
  --surface-3: rgb(255 255 255 / 11%);
  --input-bg: rgb(5 7 30 / 55%);
  --text: #eef0ff;
  --muted: #a9aed9;
  --faint: #737aac;
  --border: rgb(160 175 255 / 18%);
  --border-strong: rgb(170 185 255 / 32%);
  --accent: #36e2f2;
  --accent-2: #2aa2ff;
  --accent-soft: rgb(54 226 242 / 12%);
  --on-accent: #07102c;
  --en: #8ee8f6;
  --ok: #4be6a4;
  --ok-soft: rgb(75 230 164 / 13%);
  --warn: #ffca62;
  --warn-soft: rgb(255 202 98 / 13%);
  --bad: #ff8193;
  --bad-soft: rgb(255 129 147 / 13%);
  --oops: #ffa45c;
  --oops-soft: rgb(255 164 92 / 14%);
  --focus: #b9f6ff;
  --glow: 0 0 18px rgb(54 226 242 / 45%);
  --shadow: 0 12px 32px rgb(0 0 0 / 28%);
  --topbar-bg: rgb(10 12 41 / 74%);
  --sky: 1;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef1fb;
  --bg-2: #dce3f8;
  --surface: rgb(255 255 255 / 92%);
  --surface-solid: #ffffff;
  --surface-2: #eef1f9;
  --surface-3: #e1e6f5;
  --input-bg: #ffffff;
  --text: #141a3c;
  --muted: #4d5479;
  --faint: #868cae;
  --border: #d3d9ef;
  --border-strong: #b6bfe2;
  --accent: #077d92;
  --accent-2: #2f63d8;
  --accent-soft: #dcf2f6;
  --on-accent: #ffffff;
  --en: #1b4bb0;
  --ok: #12804a;
  --ok-soft: #e1f5e9;
  --warn: #8a5300;
  --warn-soft: #fdf1da;
  --bad: #b42d3d;
  --bad-soft: #fbe6e9;
  --oops: #a34f00;
  --oops-soft: #fdeedd;
  --glow: none;
  --shadow: 0 2px 12px rgb(20 26 60 / 8%);
  --topbar-bg: rgb(238 241 251 / 86%);
  --sky: 0;
  --focus: #1a5fd0;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --bg: #eef1fb;
    --bg-2: #dce3f8;
    --surface: rgb(255 255 255 / 92%);
    --surface-solid: #ffffff;
    --surface-2: #eef1f9;
    --surface-3: #e1e6f5;
    --input-bg: #ffffff;
    --text: #141a3c;
    --muted: #4d5479;
    --faint: #868cae;
    --border: #d3d9ef;
    --border-strong: #b6bfe2;
    --accent: #077d92;
    --accent-2: #2f63d8;
    --accent-soft: #dcf2f6;
    --on-accent: #ffffff;
    --en: #1b4bb0;
    --ok: #12804a;
    --ok-soft: #e1f5e9;
    --warn: #8a5300;
    --warn-soft: #fdf1da;
    --bad: #b42d3d;
    --bad-soft: #fbe6e9;
    --oops: #a34f00;
    --oops-soft: #fdeedd;
    --glow: none;
    --shadow: 0 2px 12px rgb(20 26 60 / 8%);
    --topbar-bg: rgb(238 241 251 / 86%);
    --sky: 0;
    --focus: #1a5fd0;
    color-scheme: light;
  }
}

:root {
  --radius: 18px;
  --radius-small: 12px;
  --gutter: 16px;
  --max: 680px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Grundlagen ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) fixed var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Nebel und Verlauf */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: var(--sky);
  background:
    radial-gradient(ellipse 70% 42% at 88% 6%, rgb(126 87 214 / 38%), transparent 70%),
    radial-gradient(ellipse 80% 45% at 0% 72%, rgb(46 96 214 / 30%), transparent 70%),
    radial-gradient(ellipse 60% 30% at 70% 100%, rgb(54 226 242 / 12%), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* Sterne */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: calc(var(--sky) * 0.9);
  background-image:
    radial-gradient(circle, rgb(255 255 255 / 90%) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgb(170 220 255 / 70%) 0 0.8px, transparent 1.4px),
    radial-gradient(circle, rgb(255 255 255 / 45%) 0 0.6px, transparent 1.1px),
    radial-gradient(circle, rgb(255 230 250 / 65%) 0 0.9px, transparent 1.5px),
    radial-gradient(circle, rgb(255 255 255 / 50%) 0 0.7px, transparent 1.2px);
  background-size: 211px 197px, 287px 263px, 149px 163px, 353px 331px, 127px 239px;
  background-position: 13px 27px, 71px 133px, 41px 87px, 150px 60px, 97px 181px;
  animation: funkeln 7s ease-in-out infinite alternate;
}

@keyframes funkeln {
  from { opacity: calc(var(--sky) * 0.65); }
  to { opacity: calc(var(--sky) * 1); }
}

a {
  color: var(--accent);
}

h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 0.75em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.center {
  text-align: center;
}

/* ---------- Kopfzeile ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: env(safe-area-inset-top) calc(10px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 26px;
  filter: drop-shadow(0 0 6px rgb(54 226 242 / 45%));
}

.logo-text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.logo-text b {
  margin-left: 0.35em;
  color: var(--accent);
}

.topbar-back {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 6px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.topbar-back:first-letter {
  font-size: 1.7rem;
  line-height: 1;
}

.topbar-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
}

.topnav {
  display: none;
}

.topbar-menu {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.topbar-menu svg {
  width: 26px;
  height: 26px;
}

.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: calc(10px + env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  min-width: 270px;
  padding: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgb(0 0 0 / 35%);
}

.menu a {
  padding: 13px 14px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-small);
}

.menu a:hover {
  background: var(--surface-3);
  color: var(--accent);
}

@media (min-width: 880px) {
  .topnav {
    display: flex;
  }

  .topnav a {
    padding: 8px 16px;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
  }

  .topnav a + a {
    border-left: 1px solid var(--border-strong);
  }

  .topnav a:hover {
    color: var(--accent);
  }

  .topbar-menu,
  .menu {
    display: none !important;
  }
}

.storage-warning {
  margin: 0;
  padding: 10px var(--gutter);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- Seitenrahmen ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px calc(var(--gutter) + env(safe-area-inset-right)) calc(36px + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
}

main:focus,
main:focus-visible {
  outline: none;
}

[id^="teil-"] {
  scroll-margin-top: 76px;
}

.loading {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-weight: 300;
  font-size: 1.5rem;
}

.card.error h2 {
  color: var(--bad);
}

.page-title {
  margin: 6px 0 14px;
  font-size: 1.7rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.page-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: var(--glow);
}

.kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  text-align: center;
}

.hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.warning {
  color: var(--warn);
  background: var(--warn-soft);
  padding: 10px 12px;
  border-radius: var(--radius-small);
}

.big-number {
  font-size: 3.4rem;
  font-weight: 200;
  line-height: 1.05;
  margin: 6px 0 10px;
  text-shadow: var(--glow);
}

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: box-shadow 0.2s, transform 0.1s, border-color 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  box-shadow: var(--glow);
}

.btn-primary:hover {
  box-shadow: 0 0 26px rgb(54 226 242 / 55%);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: var(--bad);
}

.btn:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: default;
}

.btn-small {
  width: auto;
  min-height: 40px;
  padding: 6px 16px;
  font-size: 0.72rem;
  margin-bottom: 14px;
}

.btn-wide {
  max-width: 380px;
}

.btn-compact {
  width: auto;
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.btn .speaker-icon {
  width: 22px;
  height: 22px;
}

/* Pill mit Pfeil (wie „MORE INFO“ in der Vorlage) */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px 0 20px;
  border: 1.5px solid rgb(120 235 250 / 85%);
  border-radius: 999px;
  background: rgb(8 12 40 / 45%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 18px rgb(54 226 242 / 35%), inset 0 0 12px rgb(54 226 242 / 15%);
}

.pill-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #36e2f2;
  color: #07102c;
  font-size: 1.1rem;
  line-height: 1;
}

.btn-pill:hover {
  box-shadow: 0 0 28px rgb(54 226 242 / 60%), inset 0 0 12px rgb(54 226 242 / 25%);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 8px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  margin: 16px calc(-1 * var(--gutter)) 0;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}

.button-row {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.button-row .btn {
  flex: 1;
}

.button-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Lautsprecher */
.speak {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
  touch-action: manipulation;
  transition: box-shadow 0.2s;
}

.speak:hover {
  box-shadow: var(--glow);
}

.speak-small {
  width: 38px;
  height: 38px;
}

.speak:active {
  transform: scale(0.94);
}

.speaker-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.speak-small .speaker-icon {
  width: 19px;
  height: 19px;
}

.en,
.en-inline {
  color: var(--en);
  font-weight: 600;
}

.en-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.de {
  color: var(--muted);
}

/* ---------- Kugel ---------- */

.orb {
  position: relative;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 138%, rgb(95 238 255 / 90%) 0%, rgb(40 150 225 / 50%) 22%, rgb(25 60 150 / 18%) 42%, transparent 60%),
    radial-gradient(circle at 72% 22%, rgb(150 170 255 / 30%), transparent 45%),
    radial-gradient(circle at 40% 42%, #1c2468 0%, #121747 55%, #090c2e 100%);
  box-shadow:
    0 0 0 1px rgb(150 230 255 / 38%),
    0 0 30px rgb(54 226 242 / 30%),
    0 0 90px rgb(90 120 255 / 20%),
    inset 0 0 40px rgb(54 226 242 / 24%),
    inset 0 -30px 60px rgb(54 226 242 / 18%);
}

/* Lichtkante oben rechts */
.orb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgb(225 250 255 / 95%) 32deg, rgb(120 220 255 / 50%) 64deg, transparent 105deg, transparent 360deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 1px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 1px));
}

.orb-stars {
  position: absolute;
  inset: 0;
  opacity: 0.85;
  background-image:
    radial-gradient(circle, rgb(255 255 255 / 85%) 0 0.8px, transparent 1.3px),
    radial-gradient(circle, rgb(170 220 255 / 60%) 0 0.6px, transparent 1.1px),
    radial-gradient(circle, rgb(255 255 255 / 45%) 0 0.5px, transparent 1px);
  background-size: 97px 89px, 131px 113px, 61px 149px;
  background-position: 7px 11px, 53px 67px, 23px 31px;
}

.orb-horizon {
  position: absolute;
  left: -18%;
  right: -18%;
  bottom: -40%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 28%, rgb(185 248 255 / 60%), rgb(60 165 235 / 38%) 32%, rgb(30 70 160 / 16%) 58%, transparent 72%);
  filter: blur(3px);
}

.orb-flare {
  position: absolute;
  top: 4%;
  right: 12%;
  z-index: 4;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 3%, rgb(215 247 255 / 92%) 7%, rgb(120 210 255 / 32%) 24%, transparent 60%);
  animation: aufleuchten 5s ease-in-out infinite alternate;
}

@keyframes aufleuchten {
  from { opacity: 0.75; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1.06); }
}

.orb-figure {
  position: absolute;
  left: 58%;
  bottom: 12%;
  z-index: 2;
  height: 30%;
  fill: #0a0e30;
  filter: drop-shadow(1px -1px 1px rgb(150 235 255 / 55%));
}

.orb-mini {
  flex: none;
  width: 78px;
  height: 78px;
}

.orb-mini .orb-flare {
  width: 40%;
}

/* ---------- Startseite: Kugel ---------- */

.hero {
  position: relative;
  margin: 4px 0 8px;
}

.hero-stage {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin: 0 auto;
}

/* Wolken um die Kugel */
.hero-stage::before {
  content: "";
  position: absolute;
  inset: -14% -18%;
  z-index: -1;
  background:
    radial-gradient(ellipse 40% 26% at 12% 72%, rgb(150 155 235 / 38%), transparent 70%),
    radial-gradient(ellipse 34% 22% at 92% 30%, rgb(130 100 225 / 34%), transparent 70%),
    radial-gradient(ellipse 50% 20% at 70% 92%, rgb(90 140 235 / 28%), transparent 70%);
  filter: blur(10px);
  opacity: calc(0.35 + var(--sky) * 0.65);
}

.orb-hero {
  position: absolute;
  inset: 0;
}

.hero-text {
  position: absolute;
  top: 21%;
  left: 13%;
  right: 8%;
  z-index: 5;
  color: #fff;
}

.hero-eyebrow {
  margin: 0 0 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 78%);
}

.hero-title {
  margin: 0 0 16px;
  line-height: 0.98;
  text-shadow: 0 2px 18px rgb(0 0 0 / 35%);
}

.hero-bold {
  display: block;
  font-size: clamp(1.9rem, 9.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-thin {
  display: block;
  font-size: clamp(2.5rem, 12.4vw, 3.9rem);
  font-weight: 200;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-note {
  max-width: 44%;
  margin-top: 18px;
}

.hero-note-title {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
}

.hero-note-text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgb(235 240 255 / 82%);
}

.hero-floor {
  width: 72%;
  height: 46px;
  margin: -14px auto 0;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgb(54 226 242 / 38%), transparent 72%);
  filter: blur(2px);
}

/* ---------- Startseite: Heute ---------- */

.today {
  margin: 26px 0 10px;
}

.quote-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-align: center;
}

.quote-title::before,
.quote-title::after {
  font-size: 1.5em;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0;
  vertical-align: -0.28em;
  color: var(--text);
}

.quote-title::before {
  content: "\201C";
  margin-right: 0.3em;
}

.quote-title::after {
  content: "\201D";
  margin-left: 0.08em;
}

.quote-sub {
  margin: 8px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.columns3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 26px 0 20px;
  border-bottom: 1px solid var(--border-strong);
}

.col {
  padding: 4px 6px 20px;
  text-align: center;
}

.col + .col {
  border-left: 1px solid var(--border-strong);
}

.col-head {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.col-num {
  margin: 0 0 4px;
  font-size: 2.4rem;
  font-weight: 200;
  line-height: 1;
  text-shadow: var(--glow);
}

.col-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.done-today {
  color: var(--ok);
  font-weight: 700;
}

/* ---------- Startseite: Lektionen ---------- */

.lessons {
  margin: 40px 0 10px;
}

.section-heading {
  margin: 0 0 22px;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: center;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.lesson-grid > li {
  border-bottom: 1px solid var(--border);
}

.lesson-grid > li:not(:nth-child(3n)) {
  border-right: 1px solid var(--border);
}

.lesson-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 20px 6px 16px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}

a.lesson-tile:hover {
  background: var(--accent-soft);
}

.figure {
  width: 50px;
  height: 50px;
  margin-bottom: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  transition: transform 0.4s ease, color 0.2s;
}

.figure .hidden-edge {
  stroke-dasharray: 2.4 2.4;
  opacity: 0.55;
}

a.lesson-tile:hover .figure {
  color: var(--accent);
  transform: rotate(10deg) scale(1.06);
}

.tile-line {
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 8px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}

.tile-line-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: var(--glow);
}

.tile-num {
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.tile-title {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tile-sub {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.tile-status {
  margin-top: auto;
  padding-top: 6px;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-tile.passed .tile-status {
  color: var(--ok);
}

.lesson-tile.locked {
  opacity: 0.45;
}

/* ---------- Startseite: Motto ---------- */

.motto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  margin: 44px 0 10px;
}

.motto-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgb(0 0 0 / 35%);
}

.motto-en {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 5.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.motto-en .speak {
  margin-left: 8px;
  vertical-align: -0.2em;
}

.motto-de {
  color: var(--muted);
  font-size: 0.85rem;
}

.motto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 400px) {
  .motto {
    grid-template-columns: 46% 1fr;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links a {
  padding: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Senkrechte Abschnittsnummern (breite Bildschirme) */
.side-index {
  display: none;
}

@media (min-width: 1100px) {
  .side-index {
    position: fixed;
    top: 50%;
    left: 28px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transform: translateY(-50%);
  }

  .side-index-item {
    padding: 4px;
    border: 0;
    background: none;
    color: var(--faint);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    cursor: pointer;
  }

  .side-index-item.active {
    color: var(--accent);
  }

  .side-index-item.active::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: var(--glow);
  }
}

/* ---------- Lektion ---------- */

.lesson-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 6px 0 18px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.lesson-name {
  margin: 2px 0 2px;
  font-size: 2.3rem;
  font-weight: 200;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lesson-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.3;
}

.goal {
  border-color: var(--border-strong);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}

.goal-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.goal p:last-child {
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.step:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.step-icon {
  flex: none;
  color: var(--text);
}

.step-icon .figure {
  width: 42px;
  height: 42px;
  margin: 0;
}

.step.done .step-icon {
  color: var(--accent);
}

.step-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.step-num {
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.step-title {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.step-detail {
  color: var(--muted);
  font-size: 0.88rem;
}

.step-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 800;
}

.step.done .step-check {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: var(--glow);
}

/* ---------- Vokabeln ---------- */

.vocab-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vocab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
}

.vocab-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.vocab-en {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--en);
}

.vocab-main .speak {
  margin-left: auto;
}

.vocab-de {
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.vocab-pos {
  display: inline-block;
  padding: 1px 9px;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.vocab-list.hide-de .vocab-de {
  color: transparent;
  background: var(--surface-3);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.vocab-list.hide-de .vocab-de .vocab-pos {
  visibility: hidden;
}

.vocab-list.hide-de .vocab-de.peek {
  color: inherit;
  background: none;
}

.vocab-list.hide-de .vocab-de.peek .vocab-pos {
  visibility: visible;
}

.vocab-example {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
}

.vocab-example p {
  margin: 0;
}

.vocab-example .de {
  font-size: 0.98rem;
}

.vocab-note {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.badge {
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.src {
  font-size: 0.72rem;
  color: var(--faint);
}

.reference {
  margin-top: 22px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.grid-zahlen {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.grid-item:hover,
.grid-item:active {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.grid-label {
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1.1;
}

.grid-en {
  color: var(--en);
  font-weight: 600;
  font-size: 0.92rem;
}

.grid-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.notes {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.notes li {
  margin-bottom: 6px;
}

/* ---------- Grammatik ---------- */

.grammar-heading {
  margin-top: 26px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  padding: 10px 12px 0;
  text-align: left;
  color: var(--muted);
  font-size: 0.9rem;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

td .en-line {
  justify-content: flex-start;
}

.examples {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.examples li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 10px 14px;
}

.examples p {
  margin: 0;
}

.callout {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--radius-small);
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.callout.mistake {
  background: var(--bad-soft);
  border-left-color: var(--bad);
}

.callout.mistake .callout-title {
  color: var(--bad);
}

.callout.mistake .wrong {
  color: var(--bad);
  font-weight: 600;
  margin: 0;
}

.callout.mistake .wrong s {
  text-decoration-thickness: 2px;
}

.callout.mistake .wrong::before {
  content: "✗ ";
}

.callout.mistake .right {
  justify-content: flex-start;
  color: var(--ok);
  font-weight: 600;
  margin-bottom: 8px;
}

.callout.mistake .right::before {
  content: "✓";
}

.callout.tip {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.callout.tip .callout-title {
  color: var(--accent);
}

.callout.words {
  background: var(--surface-2);
  border-left-color: var(--faint);
}

.callout dl {
  margin: 0;
}

.callout dt {
  font-weight: 800;
}

.callout dd {
  margin: 0 0 8px;
}

/* ---------- Übungs-Player ---------- */

.player-head {
  margin-bottom: 12px;
}

.bar {
  height: 6px;
  margin-top: 6px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  box-shadow: var(--glow);
  transition: width 0.3s ease;
}

.player-head .bar {
  height: 8px;
  margin: 0 0 8px;
}

.step-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.task {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
}

.prompt {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
}

.question {
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 8px 0 14px;
}

.en-sentence {
  color: var(--en);
}

.de-sentence {
  color: var(--text);
}

.answer-input {
  width: 8ch;
  min-width: 6ch;
  max-width: 100%;
  min-height: 48px;
  padding: 6px 12px;
  margin: 0 4px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  vertical-align: middle;
}

.answer-input.wide {
  display: block;
  width: 100%;
  margin: 8px 0;
}

.answer-input:focus {
  border-color: var(--accent);
  box-shadow: var(--glow);
  outline: none;
}

.answer-input[readonly] {
  background: var(--surface-2);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.option {
  min-height: 56px;
  padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.option:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--glow);
}

.option.is-correct {
  border-color: var(--ok);
  background: var(--ok-soft);
  box-shadow: none;
}

.option.is-wrong {
  border-color: var(--oops);
  background: var(--oops-soft);
  box-shadow: none;
}

.option:disabled {
  color: var(--text);
  cursor: default;
}

.listen-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 14px;
}

.listen-controls .btn {
  flex: 1 1 140px;
}

.btn-listen {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  box-shadow: var(--glow);
}

.listen-fallback {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-small);
}

.sound-help {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.sound-help summary {
  width: fit-content;
  padding: 10px 0;
  color: var(--accent);
  cursor: pointer;
}

.sound-help ul {
  margin: 0 0 10px;
  padding-left: 1.2em;
}

.sound-help li {
  margin: 4px 0;
}

.sound-help .btn {
  margin-top: 4px;
}

.order-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 66px;
  padding: 10px;
  margin: 8px 0 14px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  align-items: center;
}

.order-placeholder {
  color: var(--muted);
  font-size: 0.95rem;
}

.order-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile {
  min-height: 46px;
  padding: 8px 16px;
  border: 1.5px solid var(--border-strong);
  border-bottom-width: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.tile.placed {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tile.used {
  visibility: hidden;
}

.match {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-item {
  min-height: 54px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  cursor: pointer;
  touch-action: manipulation;
  overflow-wrap: anywhere;
}

.match-item[lang="en"] {
  color: var(--en);
  font-weight: 600;
}

.match-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--glow);
}

.match-item.done {
  border-color: var(--ok);
  background: var(--ok-soft);
  opacity: 0.7;
  cursor: default;
}

.match-item.is-wrong {
  border-color: var(--oops);
  background: var(--oops-soft);
  animation: wackeln 0.35s;
}

@keyframes wackeln {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.feedback:empty {
  display: none;
}

.feedback {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.feedback p:last-child {
  margin-bottom: 0;
}

.feedback-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.feedback-correct {
  background: var(--ok-soft);
  border-left-color: var(--ok);
}

.feedback-correct .feedback-title {
  color: var(--ok);
}

.feedback-typo {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.feedback-typo .feedback-title {
  color: var(--accent);
}

/* Fehler sind Lernmomente: neutral in Orange, nicht rot */
.feedback-wrong {
  background: var(--oops-soft);
  border-left-color: var(--oops);
}

.feedback-wrong .feedback-title {
  color: var(--oops);
}

.solution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 1.15rem;
}

.explanation {
  margin-top: 8px;
}

/* ---------- Lesetext ---------- */

.reading-text {
  font-size: 1.15rem;
}

.reading-sentence {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 8px;
  padding: 6px 8px;
  margin: 0 -8px 4px;
  border-radius: var(--radius-small);
  transition: background 0.2s;
}

.reading-sentence .speak {
  margin-left: 0;
}

.speaker {
  font-weight: 800;
}

.reading-de {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.98rem;
}

.reading-text.hide-de .reading-de {
  display: none;
}

.reading-now {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------- Ergebnisse ---------- */

.result {
  text-align: center;
}

.result.passed .big-number {
  color: var(--ok);
}

.result.failed .big-number {
  color: var(--oops);
}

.intro h2 {
  font-weight: 300;
}

.topic-links {
  margin: 0;
  padding-left: 1.2em;
}

.topic-links li {
  margin-bottom: 6px;
}

.mistake-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mistake-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mistake-list li:last-child {
  border-bottom: 0;
}

.mistake-list p {
  margin: 0 0 4px;
}

/* ---------- Vokabeltrainer ---------- */

.flashcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 24px 18px;
  box-shadow: var(--shadow), 0 0 40px rgb(54 226 242 / 10%);
}

.card-direction {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
}

.card-question {
  font-size: 2rem;
  font-weight: 300;
  text-align: center;
  margin: 10px 0 6px;
}

.card-question.en-line {
  justify-content: center;
}

.flashcard > .vocab-pos {
  display: table;
  margin: 0 auto 14px;
}

.card-back {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.card-back .vocab-pos {
  margin-bottom: 8px;
}

.card-back .vocab-example {
  text-align: left;
}

.card-answer {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.grades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 6px 2px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.grade-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grade-interval {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.grade-again {
  border-color: var(--oops);
}

.grade-again .grade-label {
  color: var(--oops);
}

.grade-hard .grade-label {
  color: var(--warn);
}

.grade-good {
  border-color: var(--ok);
}

.grade-good .grade-label {
  color: var(--ok);
}

.grade-easy .grade-label {
  color: var(--accent);
}

.flashcard .feedback {
  text-align: left;
}

/* ---------- Einstellungen ---------- */

.setting h3 {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.setting label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
}

.setting select,
.setting input[type="range"] {
  width: 100%;
  min-height: 44px;
  font: inherit;
  accent-color: var(--accent);
}

.setting select {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--input-bg);
  color: var(--text);
}

.setting .btn {
  margin-top: 8px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stepper .btn {
  width: 60px;
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
}

.stepper-value {
  min-width: 3ch;
  font-size: 2rem;
  font-weight: 200;
  text-align: center;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting label.radio,
.setting label.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 4px 0;
  font-weight: 400;
}

.radio input,
.checkbox input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

/* ---------- Quellen ---------- */

blockquote {
  margin: 8px 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.sources-table td {
  font-size: 0.92rem;
  vertical-align: top;
}

.sources-table small {
  color: var(--faint);
}

/* ---------- Meldung ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: var(--glow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s, transform 0.2s;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 560px) {
  .actions {
    flex-direction: row;
  }

  .actions .btn {
    flex: 1;
  }

  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }
}

@media (max-width: 359px) {
  .lesson-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lesson-grid > li:not(:nth-child(3n)) {
    border-right: 0;
  }

  .lesson-grid > li:nth-child(odd) {
    border-right: 1px solid var(--border);
  }
}

/* ================================================================
   Motivation & Belohnungen
   ================================================================ */

/* ---------- Hintergrundmotive (nur im dunklen Design sichtbar) ---------- */

:root[data-bg="aurora"] body::before {
  background:
    radial-gradient(ellipse 80% 40% at 70% 4%, rgb(60 230 170 / 34%), transparent 70%),
    radial-gradient(ellipse 60% 30% at 20% 12%, rgb(90 140 255 / 28%), transparent 70%),
    radial-gradient(ellipse 80% 45% at 0% 80%, rgb(40 120 160 / 26%), transparent 70%),
    linear-gradient(180deg, #071a26 0%, #0d1f45 100%);
}

:root[data-bg="sunset"] body::before {
  background:
    radial-gradient(ellipse 90% 35% at 50% 100%, rgb(255 120 140 / 36%), transparent 70%),
    radial-gradient(ellipse 60% 30% at 85% 85%, rgb(255 170 90 / 26%), transparent 70%),
    radial-gradient(ellipse 70% 40% at 10% 10%, rgb(126 87 214 / 34%), transparent 70%),
    linear-gradient(180deg, #120c2e 0%, #3a1e4f 100%);
}

:root[data-bg="ocean"] body::before {
  background:
    radial-gradient(ellipse 70% 40% at 80% 0%, rgb(40 200 220 / 26%), transparent 70%),
    radial-gradient(ellipse 80% 45% at 10% 90%, rgb(20 90 160 / 34%), transparent 70%),
    linear-gradient(180deg, #03141f 0%, #06283d 100%);
}

/* ---------- Kopfzeile: Serie, Level, Avatar ---------- */

.topstats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 2px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.streak-chip {
  color: #ff9a5c;
}

.level-chip {
  color: #ffd166;
}

:root[data-theme="light"] .streak-chip {
  color: #b4400c;
}

:root[data-theme="light"] .level-chip {
  color: #7a5200;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .streak-chip {
    color: #b4400c;
  }

  :root[data-theme="system"] .level-chip {
    color: #7a5200;
  }
}

.chip-xp {
  display: none;
}

.topstats .avatar {
  display: none;
}

@media (min-width: 880px) {
  .chip-xp {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 6px;
    min-width: 92px;
  }

  .chip-bar {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
  }

  .chip-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    box-shadow: var(--glow);
  }

  .chip-xp-text {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .topstats .avatar {
    display: inline-grid;
  }
}

@media (max-width: 380px) {
  .logo-text {
    display: none;
  }
}

/* ---------- Avatar mit Rahmen ---------- */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--surface-3), var(--surface-solid));
  color: var(--accent);
}

.avatar svg {
  width: 52%;
  height: auto;
  margin-top: 6%;
}

.avatar-notch {
  fill: var(--surface-solid);
}

.avatar-large {
  width: 86px;
  height: 86px;
  border-width: 2px;
}

.frame-glow {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 18px var(--accent);
}

.frame-gold {
  border: 3px double #ffd166;
  box-shadow: 0 0 0 3px rgb(255 209 102 / 25%), 0 0 14px rgb(255 209 102 / 35%);
}

.frame-stars {
  border-color: #fff3b0;
  outline: 2px dotted #fff3b0;
  outline-offset: 3px;
}

/* ---------- Player: Combo, XP, Hinweis ---------- */

.player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}

.player-meta .step-count {
  margin: 0;
}

.player-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session-xp {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(255 140 60 / 16%);
  color: #ffb36b;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.combo-5 {
  font-size: 0.95rem;
  background: rgb(255 120 50 / 24%);
  box-shadow: 0 0 12px rgb(255 140 60 / 45%);
}

.combo-10 {
  font-size: 1.05rem;
  color: #fff1d6;
  background: linear-gradient(90deg, #ff7a3d, #ffb33d);
  box-shadow: 0 0 20px rgb(255 150 60 / 70%);
}

.combo-pop {
  animation: combo-pop 0.5s ease;
}

@keyframes combo-pop {
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.feedback-xp {
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.btn-hint {
  margin: 12px 0 0;
}

.hint-box {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  color: var(--text);
}

.option-removed {
  opacity: 0.25;
  text-decoration: line-through;
}

.intro-badge {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
}

.task-intro .card-answer {
  text-align: center;
}

.xp-float {
  position: fixed;
  z-index: 70;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 900;
  text-shadow: 0 0 12px var(--accent-soft), 0 2px 6px rgb(0 0 0 / 40%);
  pointer-events: none;
  transform: translate(-50%, 0);
  animation: xp-hoch 1s ease-out forwards;
}

@keyframes xp-hoch {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -54px) scale(1); }
}

.flash-ok {
  animation: flash-ok 0.7s ease;
}

.flash-oops {
  animation: flash-oops 0.7s ease;
}

@keyframes flash-ok {
  30% { box-shadow: 0 0 0 2px var(--ok), 0 0 26px rgb(75 230 164 / 45%); }
}

@keyframes flash-oops {
  30% { box-shadow: 0 0 0 2px var(--oops), 0 0 20px rgb(255 164 92 / 35%); }
}

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.result-xp {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mastered-note,
.levelup-note {
  padding: 8px 12px;
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  font-weight: 700;
}

/* ---------- Lernrunde ---------- */

.round-intro {
  text-align: center;
}

.round-intro .orb-mini,
.onboarding .orb-mini,
.result-orb .orb-mini {
  margin: 0 auto 12px;
}

.round-mix {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 auto 14px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.round-mix li::before {
  content: "✦ ";
  color: var(--accent);
}

.round-result h2 {
  margin-bottom: 4px;
}

.result-orb .orb-mini {
  animation: orb-schweben 3s ease-in-out infinite alternate;
}

@keyframes orb-schweben {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-6px) scale(1.04); }
}

.round-xp {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 200;
  text-shadow: var(--glow);
}

.round-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.round-stat {
  display: flex;
  flex-direction: column;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-2);
}

.round-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
}

.round-stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.word-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}

.chip-toggle {
  min-height: 44px;
  padding: 6px 16px;
  cursor: pointer;
}

.chip-toggle.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: var(--glow);
}

.mission-done-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--ok);
  font-weight: 700;
}

.goal-note {
  margin: 10px 0 0;
  font-weight: 700;
}

.goal-note.done,
.goal-done {
  color: var(--ok);
  font-weight: 800;
}

.repeat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.repeat-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.repeat-list .en-line {
  flex: 1;
  justify-content: flex-start;
}

/* ---------- Truhe ---------- */

.chest-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
}

.chest-stage {
  display: grid;
  place-items: center;
}

.chest-icon {
  width: 112px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 6px 14px rgb(0 0 0 / 35%));
}

.chest-lid {
  transform-box: fill-box;
  transform-origin: 0% 100%;
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.chest-open .chest-lid {
  transform: rotate(-24deg) translate(-4px, -8px);
}

.chest-rays {
  transition: opacity 0.4s;
}

.chest-open .chest-rays {
  opacity: 0.85;
}

.chest-idle .chest-icon {
  opacity: 0.85;
}

.btn-glow {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--glow);
}

.reward-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reward-big {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
}

.reward-emoji {
  font-size: 2rem;
}

.reward-fact {
  font-size: 1rem;
  line-height: 1.45;
}

.reward-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--muted);
}

.reward-symbol {
  margin-right: 6px;
}

.swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  vertical-align: middle;
}

/* ---------- Dashboard ---------- */

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.dashboard > * {
  min-width: 0;
  margin: 0;
}

/* Reihenfolge am Handy wie im Auftrag */
.dash-level { order: 1; }
.dash-streak { order: 2; }
.dash-hero { order: 3; }
.dash-goal { order: 4; }
.dash-missions { order: 5; }
.dash-words { order: 6; }
.dash-skills { order: 7; }
.dash-path { order: 8; }
.dash-lesson { order: 9; }
.dash-chest { order: 10; }
.dash-today { order: 11; }

.dash-card {
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card-heading {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card .card-heading {
  font-size: 0.78rem;
  font-weight: 800;
}

.symbol {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.small {
  font-size: 0.82rem;
}

.card-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Level */
.dash-level {
  display: flex;
  align-items: center;
  gap: 18px;
}

.level-text {
  flex: 1;
  min-width: 0;
}

.level-number {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.level-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 300;
}

.level-xp {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.level-total {
  color: var(--faint);
}

.dash-level .bar {
  height: 9px;
}

/* Serie */
.streak-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.streak-flame {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 10px rgb(255 120 40 / 55%));
}

.streak-number {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}

.streak-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.week-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  text-align: center;
}

.week-dots li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.week-dots .dot {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
}

.week-dots .on .dot {
  border-color: transparent;
  background: var(--accent);
  box-shadow: var(--glow);
}

.week-dots .is-today .dot {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dot-label {
  color: var(--muted);
  font-size: 0.72rem;
}

.shield-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Tagesziel */
.goal-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.goal-rounds {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
}

.ring {
  display: block;
  flex: none;
}

.ring-track {
  fill: none;
  stroke: var(--surface-3);
}

.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--accent));
  transition: stroke-dasharray 0.6s ease;
}

.ring-text {
  fill: var(--text);
  font-size: 20px;
  font-weight: 800;
}

/* Missionen */
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-2);
}

.mission-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 800;
}

.mission.done .mission-icon {
  border-color: transparent;
  background: var(--ok);
  color: var(--on-accent);
}

.mission-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.mission .bar {
  height: 5px;
  margin-top: 6px;
}

.mission.done .bar-fill {
  background: var(--ok);
}

.mission-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.mission-bonus {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.mission-bonus.done {
  color: var(--ok);
  font-weight: 800;
}

.week-label {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.week-mission {
  margin-bottom: 14px;
}

/* Wörter */
.dash-words {
  text-align: center;
}

.words-big {
  margin: 0;
  font-size: 2.9rem;
  font-weight: 200;
  line-height: 1.1;
}

.words-number {
  text-shadow: var(--glow);
}

.union-jack {
  width: 46px;
  height: auto;
  margin-right: 12px;
  vertical-align: 0.12em;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
}

.words-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.stage-track {
  display: flex;
  height: 10px;
  border-radius: 10px;
  background: var(--surface-3);
  overflow: hidden;
}

.stage-bar {
  display: block;
  height: 100%;
}

.stage-beherrscht,
.lg-beherrscht::before {
  background: var(--ok);
}

.stage-sicher,
.lg-sicher::before {
  background: var(--accent);
}

.stage-bekannt,
.lg-bekannt::before {
  background: var(--accent-2);
}

.stage-neu,
.lg-neu::before {
  background: var(--surface-3);
}

.stage-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.lg::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
}

/* Fertigkeiten */
.dash-skills .card-head {
  flex-wrap: wrap;
  justify-content: space-between;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tabs-wrap {
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-radius: var(--radius-small);
}

.tab {
  min-height: 36px;
  padding: 4px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 8px;
}

@media (min-width: 520px) {
  .skills {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skill {
  text-align: center;
}

.skill-ring {
  position: relative;
  width: 92px;
  margin: 0 auto 6px;
}

.skill-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.95rem;
  font-weight: 800;
}

.skill-center .symbol {
  width: 20px;
  height: 20px;
}

.skill-name {
  margin: 0;
  font-weight: 800;
}

.skill-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.badge-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-small);
  text-align: center;
  opacity: 0.45;
}

.badge-grid li.owned {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  opacity: 1;
}

.badge-emoji {
  font-size: 1.7rem;
}

.badge-name {
  font-size: 0.7rem;
  line-height: 1.2;
}

/* Lernpfad */
.path-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin: 0 -18px -18px;
  padding: 0 0 6px;
  border-radius: 0 0 var(--radius) var(--radius);
  scrollbar-width: thin;
}

.path-track {
  position: relative;
}

.path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.path-moon {
  fill: #c9d2ff;
  opacity: 0.8;
  filter: drop-shadow(0 0 12px rgb(200 210 255 / 60%));
}

.path-mountains {
  stroke: rgb(150 170 255 / 25%);
  stroke-width: 1;
}

.path-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 4 6;
  opacity: 0.85;
}

.path-line-glow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  opacity: 0.15;
}

.path-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 84px;
  margin: -17px 0 0 -42px;
  color: var(--text);
  text-decoration: none;
}

.node-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-solid);
  font-size: 0.85rem;
  font-weight: 800;
}

.node-label {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 4px rgb(0 0 0 / 70%);
}

.path-node.passed .node-dot {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.path-node.current .node-dot {
  width: 42px;
  height: 42px;
  margin-top: -4px;
  border-color: #fff;
  background: radial-gradient(circle, var(--accent-2), #0b1a5a);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px var(--accent);
  animation: puls 2.4s ease-in-out infinite;
}

.path-node.locked {
  opacity: 0.55;
}

.path-node.locked .node-dot {
  font-size: 0.7rem;
}

@keyframes puls {
  50% { box-shadow: 0 0 0 8px var(--accent-soft), 0 0 30px var(--accent); }
}

/* Aktuelle Lektion */
.lesson-feature {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 14px;
  align-items: center;
}

.lesson-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-small);
  box-shadow: 0 10px 24px rgb(0 0 0 / 30%);
}

.lesson-feature-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.lesson-feature .lesson-progress {
  margin: 4px 0 10px;
}

.dash-today {
  margin: 0;
}

/* Mittelgroße Bildschirme: zwei Spalten */
@media (min-width: 760px) {
  .dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .dash-hero,
  .dash-missions,
  .dash-path,
  .dash-today,
  .dash-skills {
    grid-column: 1 / -1;
  }
}

/* Breite Bildschirme: Raster wie in der Vorlage */
@media (min-width: 1180px) {
  main:has(.dashboard) {
    max-width: 1520px;
  }

  .dashboard {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.92fr) minmax(0, 0.66fr);
    grid-template-areas:
      "level  hero  goal     streak"
      "skills hero  missions missions"
      "path   words missions missions"
      "lesson today chest    chest";
  }

  .dashboard > * {
    grid-column: auto;
  }

  .dash-level { grid-area: level; }
  .dash-streak { grid-area: streak; }
  .dash-hero { grid-area: hero; }
  .dash-goal { grid-area: goal; }
  .dash-missions { grid-area: missions; }
  .dash-words { grid-area: words; }
  .dash-skills { grid-area: skills; }
  .dash-path { grid-area: path; }
  .dash-lesson { grid-area: lesson; }
  .dash-chest { grid-area: chest; }
  .dash-today { grid-area: today; }

  .dash-goal .goal-body {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Begrüßung ---------- */

.onboarding {
  text-align: center;
}

.onboarding .chip-group {
  justify-content: center;
}

.field-label {
  display: block;
  margin: 16px 0 4px;
  font-weight: 700;
  text-align: left;
}

/* ---------- Wörterbuch ---------- */

.word-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.word-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.word-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.word-main .de {
  font-size: 0.9rem;
}

.stage-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-pill.stage-neu {
  border: 1px solid var(--border-strong);
  color: var(--muted);
  background: none;
}

.stage-pill.stage-bekannt {
  color: var(--on-accent);
}

.stage-pill.stage-sicher {
  color: var(--on-accent);
}

.stage-pill.stage-beherrscht {
  color: var(--on-accent);
}

/* ---------- Einstellungen: Aussehen ---------- */

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setting .choice-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  margin: 0;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-small);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.setting .choice-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-item:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice-item.locked {
  opacity: 0.45;
  cursor: default;
}

.choice-name {
  font-size: 0.75rem;
  line-height: 1.2;
}

.bg-preview {
  display: block;
  width: 44px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.bg-space {
  background: radial-gradient(ellipse at 80% 10%, #7e57d6, transparent 60%), linear-gradient(#0a0c29, #171b4f);
}

.bg-aurora {
  background: radial-gradient(ellipse at 70% 10%, #3ce6aa, transparent 60%), linear-gradient(#071a26, #0d1f45);
}

.bg-sunset {
  background: radial-gradient(ellipse at 50% 100%, #ff788c, transparent 60%), linear-gradient(#120c2e, #3a1e4f);
}

.bg-ocean {
  background: radial-gradient(ellipse at 80% 0%, #28c8dc, transparent 60%), linear-gradient(#03141f, #06283d);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
