/* undertekst — „Nordisk Nat" (Design System v0.3, E-0019)
   Nachtblaue, opake Flächen statt Glas, warmes Papierweiß als Schrift, EIN Akzent: Rav (Bernstein).
   Eine Schrift (Inter) für alles; Fraunces nur in der Wortmarke. Tiefe über Flächenstufen, nicht über Blur und Glow.
   Bewegung nur als Rückmeldung auf eine Handlung: kurz, ohne Überschwingen, keine Auftritte beim Laden. */

:root {
  color-scheme: dark;

  /* Flächen, von tief nach hoch */
  --dyb:   #0E1015;
  --nat:   #14161C;
  --kort:  #1B1F27;
  --kort-hi: #1E222B;   /* Karte unter dem Zeiger, Rückseite der Karteikarte */
  --svaev: #232834;
  --linje: #2E3442;
  --linje-hi: #3A4152;

  /* Tinte (warm) */
  --papir: #F2EFE9;
  --stoev: #B9B6AD;
  --aske:  #83817B;
  --blaek: #241A08;

  /* Akzent + Status (Status nie ohne Label) */
  --rav:       #F5B84C;
  --rav-hover: #FFC96A;
  --rav-press: #E8A93A;
  --rav-dim:   rgba(245, 184, 76, .13);
  --soegroen:  #3EB8A2;
  --rosen:     #DF5A6A;
  --syren:     #9D89E8;

  /* Mastery-Ramp (eine Hue, monoton, validiert) + Grau für Stufe 0 */
  --trin0: #3A4050; --trin1: #6B5330; --trin2: #9C742E;
  --trin3: #CE9733; --trin4: #E4A93D; --trin5: #F5B84C;

  /* Form & Tiefe: Schatten nur für Ebenen, die über der Seite liegen (Menü, Blatt, Tooltip) */
  --r-s: 6px; --r-m: 10px; --r-l: 14px; --pill: 999px;
  --shadow-pop: 0 4px 12px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.35);

  /* Bewegung: Rückmeldung, kein Auftritt */
  --t-micro: 120ms; --t-std: 200ms; --t-scene: 360ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --brand: 'Fraunces', Georgia, 'Iowan Old Style', serif;   /* nur die Wortmarke /undertekst/ */
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --gap: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* das Attribut gewinnt gegen display: grid/flex (Profil-Formular war sonst immer offen) */

html { scroll-behavior: smooth; scrollbar-color: var(--linje) var(--nat); }
body {
  margin: 0;
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--nat);
  color: var(--papir);
  font: 15px/1.55 var(--body);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  caret-color: var(--rav);
}
::selection { background: rgba(245, 184, 76, .28); color: var(--papir); }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rav); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { text-wrap: balance; }

/* ---------- Kopf ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px clamp(16px, 3vw, 36px);
  background: var(--nat);
  border-bottom: 1px solid var(--linje);
}
.brand { text-decoration: none; }
.brand__name {
  font-family: var(--brand); font-weight: 600; font-size: 21px; letter-spacing: -.2px;
  display: inline-block; white-space: nowrap;
}
.brand__name i { font-style: normal; color: var(--rav); font-weight: 500; margin: 0 1px; }
.nav { display: flex; gap: 4px; }
.nav button {
  background: none; border: 0; color: var(--stoev);
  font: 500 13.5px/1 var(--body); padding: 8px 12px; border-radius: var(--r-s);
  transition: color var(--t-micro) var(--ease-out), background var(--t-micro) var(--ease-out);
}
.nav button:hover { color: var(--papir); background: var(--svaev); }
.nav button.is-active { color: var(--papir); background: var(--svaev); }

.top__left { display: flex; align-items: center; gap: 22px; min-width: 0; }
.pnav { display: flex; gap: 2px; }
.pnav button {
  position: relative;
  background: none; border: 0; color: var(--stoev);
  font: 500 13.5px/1 var(--body); padding: 8px 12px; border-radius: var(--r-s);
  transition: color var(--t-micro) var(--ease-out), background var(--t-micro) var(--ease-out);
}
.pnav button:hover { color: var(--papir); background: var(--kort); }
.pnav button.is-active { color: var(--papir); background: var(--svaev); }
.top__right { display: flex; align-items: center; gap: 12px; }
/* Handy (NIK-83): Plattform-Reiter in eine eigene, wischbare Zeile unter Logo, Suche und Profil; sonst rutscht „YouTube“ unter die Suche */
@media (max-width: 640px) {
  .top { flex-wrap: wrap; row-gap: 8px; gap: 10px; padding-top: 10px; padding-bottom: 8px; }
  .top__left { display: contents; }
  .brand { order: 1; }
  .top__right { order: 2; gap: 10px; margin-left: auto; }
  .pnav { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; min-height: 31px; }
  .pnav::-webkit-scrollbar { display: none; }
  .pnav.is-none { display: none; }
  .brand__name { font-size: 19px; }
  .top .search input { width: 140px; }   /* .top davor: die Grundregel steht weiter unten und gewänne sonst */
  .top .search input:focus { width: 170px; }
}
.streak {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-size: 12px; color: var(--aske);
  border: 1px solid var(--linje); border-radius: var(--pill); padding: 5px 11px;
}
.streak b { font-size: 13px; color: var(--rav); font-variant-numeric: tabular-nums; }
.tally { display: flex; gap: 18px; margin: 0; }
.tally div { text-align: right; }
.tally dt { font-size: 12px; color: var(--aske); }
.tally dd { margin: 0; font: 600 16px/1.2 var(--body); font-variant-numeric: tabular-nums; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-s);
  background: none; border: 1px solid var(--linje); color: var(--stoev);
  transition: color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out);
}
.icon-btn:hover { color: var(--papir); border-color: var(--linje-hi); }
.icon-btn.is-active { color: var(--rav); border-color: var(--rav); }

/* ---------- Aufbau ---------- */
main { padding: 28px clamp(16px, 3vw, 36px) 48px; flex: 1; }

.sect { margin-bottom: 40px; }
.sect__head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 14px;
}
.sect__title { font-weight: 600; font-size: 17px; letter-spacing: -.01em; margin: 0; }
.sect__meta { font-size: 13px; color: var(--aske); font-variant-numeric: tabular-nums; }

.season__title { font-size: 13px; font-weight: 500; color: var(--stoev); margin: 20px 0 10px; }
.sect__head + .season__title { margin-top: 0; }

.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 28px; flex-wrap: wrap; }
.tab {
  background: none; border: 1px solid var(--linje); color: var(--stoev);
  font: 500 13px/1 var(--body);
  padding: 8px 14px; border-radius: var(--pill);
  display: inline-flex; gap: 8px; align-items: baseline;
  transition: color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out), background var(--t-micro) var(--ease-out);
}
.tab span { font-size: 12px; color: var(--aske); font-variant-numeric: tabular-nums; }
.tab:hover { color: var(--papir); border-color: var(--linje-hi); }
.tab.is-active { background: var(--papir); border-color: var(--papir); color: var(--nat); }
.tab.is-active span { color: var(--nat); opacity: .6; }

.poster img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Ohne Bild: der Titel auf ruhiger Fläche, normal gesetzt */
.thumb__fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
  background: var(--svaev);
  color: var(--stoev);
  font-size: 13px; font-weight: 500; line-height: 1.45;
}

/* ---------- Wortstreifen: ein Strich pro Wort, Bernstein = Beherrschung ---------- */
.strip { display: flex; gap: 2px; height: 18px; align-items: flex-end; }
.strip i { flex: 1; min-width: 1px; border-radius: 1px 1px 0 0; background: var(--trin0); }
.strip i[data-l="0"] { height: 26%; opacity: .8; }
.strip i[data-l="1"] { height: 40%; background: var(--trin1); }
.strip i[data-l="2"] { height: 54%; background: var(--trin2); }
.strip i[data-l="3"] { height: 68%; background: var(--trin3); }
.strip i[data-l="4"] { height: 84%; background: var(--trin4); }
.strip i[data-l="5"] { height: 100%; background: var(--trin5); }

/* ---------- Sterne: Stand einer Folge (NIK-95) ----------
   Drei Sterne, der nächste füllt sich in Dritteln. Bernstein ist hier Fortschritt; Gold = alle drei. */
.ms { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.ms__star { display: inline-block; width: 15px; height: 15px; flex: none; }
.ms__star svg { display: block; width: 100%; height: 100%; fill: var(--linje-hi); overflow: visible; }
.ms__star.is-on svg { fill: var(--rav); }
/* Der Stern, an dem man gerade arbeitet: Bernsteinkontur; die Striche daneben sagen, wie weit (in Dritteln) */
.ms__star.is-now svg { fill: var(--rav-dim); stroke: var(--rav); stroke-width: 1.3; stroke-linejoin: round; }
.ms__pips { display: inline-flex; gap: 2px; margin-left: 5px; }
.ms__pips i { width: 7px; height: 3px; border-radius: 2px; background: var(--linje-hi); }
.ms__pips i.on { background: var(--rav); }
.ms__lbl { margin-left: 8px; font-size: 13px; color: var(--stoev); }

/* ---------- Detailansicht ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; margin-bottom: 20px;
  font-size: 13px; font-weight: 500; color: var(--stoev);
  transition: color var(--t-micro) var(--ease-out);
}
.back:hover { color: var(--papir); }

.detail { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 40px; align-items: start; }
@media (max-width: 780px) { .detail { grid-template-columns: 1fr; gap: 28px; } }

.poster {
  display: block; width: 100%; position: relative;
  border: 1px solid var(--linje); border-radius: var(--r-m);
  aspect-ratio: 16 / 9; overflow: hidden; background: var(--dyb);
}
.poster::after {
  content: attr(data-label);   /* „Auf DRTV ansehen“ / „Watch on YouTube“, aus i18n.js je Plattform */
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  background: rgba(14, 16, 21, .86);
  color: var(--papir);
  font-size: 12px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--r-s);
  transition: background var(--t-micro) var(--ease-out);
}
.poster:hover::after { background: var(--nat); color: var(--rav); }

.detail h2 { font-weight: 600; font-size: 22px; letter-spacing: -.015em; margin: 18px 0 4px; line-height: 1.25; }
.detail__series { font-size: 13px; color: var(--aske); }
.detail__seen { font-size: 13px; color: var(--stoev); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* Knöpfe: Bernstein = die eine Haupthandlung, ruhig = alles daneben */
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 18px; padding: 10px 18px;
  background: var(--rav); color: var(--blaek); border: 1px solid var(--rav); border-radius: var(--r-s);
  font: 600 13.5px/1 var(--body); text-decoration: none;
  transition: background var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out), color var(--t-micro) var(--ease-out);
}
.act:hover:not(:disabled) { background: var(--rav-hover); border-color: var(--rav-hover); }
.act:active:not(:disabled) { background: var(--rav-press); }
.act:disabled { background: var(--svaev); border-color: var(--svaev); color: var(--aske); cursor: default; }
.act--quiet { background: transparent; color: var(--papir); border-color: var(--linje-hi); }
.act--quiet:hover:not(:disabled) { background: var(--svaev); border-color: var(--linje-hi); }
.act--quiet:active:not(:disabled) { background: var(--linje); }
.act--danger { margin-left: 8px; background: transparent; color: var(--rosen); border-color: rgba(223, 90, 106, .55); }
.act--danger:hover:not(:disabled) { background: rgba(223, 90, 106, .12); border-color: var(--rosen); }
.act--danger.is-armed { background: var(--rosen); border-color: var(--rosen); color: #fff; }

/* ---------- Wortliste ---------- */
.words__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; }
.words__count { font-size: 13px; color: var(--aske); }
.linky {
  background: none; border: 0; padding: 0;
  font-size: 13px; font-weight: 500; color: var(--stoev);
  text-decoration: underline; text-decoration-color: var(--linje-hi); text-underline-offset: 3px;
  transition: color var(--t-micro) var(--ease-out);
}
.linky:hover { color: var(--papir); text-decoration-color: var(--stoev); }

.words { border-top: 1px solid var(--linje); }
.word {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--linje);
}
.word__lemma { font-weight: 600; }
.word__pos { font-size: 12.5px; color: var(--aske); margin-left: 8px; }
.word__tr { color: var(--papir); font-weight: 500; display: inline-block; }
.word__ctx { grid-column: 1 / -1; font-size: 13px; color: var(--stoev); }
.word__ctx .word__tr { font-style: italic; color: var(--stoev); }

/* Verdeckt, bis man draufklickt */
.word__tr.is-masked {
  color: transparent; border-bottom: 1px dashed var(--linje-hi);
  cursor: pointer; user-select: none;
  transition: border-color var(--t-micro) var(--ease-out);
}
.word__tr.is-masked:hover { border-bottom-color: var(--rav); }

.word__side { display: flex; align-items: center; gap: 8px; }
.word__lvl { font-size: 12px; color: var(--aske); white-space: nowrap; font-variant-numeric: tabular-nums; }
.word__lvl.is-known { color: var(--soegroen); }
.word__del {
  background: none; border: 1px solid var(--linje); border-radius: var(--r-s);
  color: var(--aske); line-height: 1; padding: 3px 7px 4px;
  transition: color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out);
}
.word__del:hover { color: var(--rosen); border-color: var(--rosen); }

/* ---------- Karteikarten: echter 3D-Flip (Einzelkarte) ---------- */
.learn { max-width: 620px; margin: 0 auto; }
.learn__meter {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--stoev); margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
.learn__bar { height: 2px; background: var(--linje); border-radius: 1px; margin-bottom: 32px; }
.learn__bar span { display: block; height: 100%; background: var(--rav); border-radius: 1px; transition: width var(--t-std) var(--ease-out); }

.flip { perspective: 1200px; cursor: pointer; }
.flip__inner {
  position: relative; width: 100%; min-height: 300px;
  transform-style: preserve-3d;
  transition: transform 480ms var(--ease-out);
  display: grid;
}
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  border-radius: var(--r-l);
  background: var(--kort);
  border: 1px solid var(--linje);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 30px; gap: 12px;
  position: relative;
}
.face--back { transform: rotateY(180deg); }
.face__label { position: absolute; top: 16px; left: 20px; font-size: 12px; color: var(--aske); }
.face__hint { position: absolute; bottom: 14px; font-size: 12px; color: var(--aske); }

.flash__word { font-weight: 600; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.flash__ctx { font-size: 14px; color: var(--stoev); font-style: italic; max-width: 420px; }
.flash__tr { font-size: 24px; color: var(--papir); font-weight: 600; letter-spacing: -.01em; }
.flash__infl { font-size: 13px; color: var(--aske); }
.flash__sent { font-size: 14.5px; color: var(--stoev); max-width: 420px; }
.flash__note { font-size: 13px; color: var(--syren); max-width: 420px; }

.rate {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-std) var(--ease-out);
}
.rate.is-on { opacity: 1; pointer-events: auto; }
.rate button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px;
  padding: 10px 6px;
  background: var(--kort); border: 1px solid var(--linje); border-radius: var(--r-s);
  color: var(--papir); font: 600 13.5px/1.2 var(--body);
  transition: background var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out), color var(--t-micro) var(--ease-out);
}
.rate button small { display: block; font-size: 12px; font-weight: 400; color: var(--stoev); margin-top: 3px; line-height: 1.25; }
.rate button kbd { font: 500 11px/1 var(--body); color: var(--aske); margin-left: 6px; }
.rate button[data-r="again"]:hover { background: rgba(223, 90, 106, .12); border-color: var(--rosen); }
.rate button[data-r="hard"]:hover  { background: rgba(206, 151, 51, .12); border-color: var(--trin3); }
.rate button[data-r="good"]:hover  { background: var(--rav-dim); border-color: var(--rav); }
.rate button[data-r="easy"]:hover  { background: rgba(62, 184, 162, .12); border-color: var(--soegroen); }

/* ---------- Seiten: Profil, Statistik, Einstellungen ---------- */
.page { max-width: 860px; }
.page__title { font-weight: 600; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; }
.page__sub { font-size: 14px; color: var(--stoev); margin: 0; }
.page__title + .page__sub { margin-bottom: 24px; }
.page__sub + .page__sub { margin-top: -18px; margin-bottom: 24px; }

.profil__head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 32px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: var(--rav);
  background: var(--svaev);
}

/* Kennzahlen: EINE Leiste mit Trennlinien statt einzelner Kacheln (Linien rechts und unten, der Rand schneidet die äußeren ab) */
.stats {
  display: flex; flex-wrap: wrap;   /* flex statt grid: eine angebrochene letzte Reihe füllt die Breite, keine leeren Zellen */
  background: var(--kort); border: 1px solid var(--linje); border-radius: var(--r-m); overflow: hidden;
  margin-bottom: 30px;
}
.stat { flex: 1 1 150px; padding: 16px 18px; min-width: 0; box-shadow: 1px 0 0 var(--linje), 0 1px 0 var(--linje); }
.chart .stats { background: transparent; border: 0; border-top: 1px solid var(--linje); border-radius: 0; margin: 12px -18px -12px; }
.stat b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.2; }
.stat b em { font-style: normal; color: var(--rav); }
.stat span { display: block; margin-top: 2px; font-size: 13px; color: var(--stoev); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.badge {
  background: var(--kort); border: 1px solid var(--linje); border-radius: var(--r-m);
  padding: 18px 16px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.badge b { font-weight: 600; font-size: 14.5px; }
.badge span { font-size: 13px; color: var(--stoev); line-height: 1.45; }
.badge.is-locked { background: transparent; }
.badge.is-locked b { color: var(--stoev); }

.placeholder {
  border: 1px solid var(--linje); border-radius: var(--r-m);
  padding: 28px 24px; color: var(--stoev); font-size: 14px; line-height: 1.7;
  background: var(--kort);
}
.placeholder strong { display: block; font-size: 15px; font-weight: 600; color: var(--papir); margin-bottom: 6px; }
.placeholder .act { margin-top: 14px; }

/* ---------- So geht's: eine nummerierte Liste, keine Kartenstapel ---------- */
.steps__list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--linje); }
.step {
  display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--linje);
}
.step__n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px;
  font-size: 13px; font-weight: 600; color: var(--rav); border: 1px solid rgba(245, 184, 76, .5);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-weight: 600; font-size: 16px; letter-spacing: -.01em; margin: 2px 0 6px; }
.step p { margin: 0 0 8px; font-size: 14px; line-height: 1.65; color: var(--stoev); max-width: 68ch; }
.step p:last-child { margin-bottom: 0; }
.step a { color: var(--rav); }
.step code { font-family: var(--mono); font-size: 12.5px; background: var(--svaev); padding: 1px 6px; border-radius: 4px; color: var(--papir); }
.step__hint { font-size: 13px; color: var(--aske); }
.step__rule { padding: 12px 14px; background: var(--kort); border: 1px solid var(--linje); border-radius: var(--r-s); color: var(--papir); }
.steps__after { margin: 20px 0 0; font-size: 14px; color: var(--stoev); max-width: 68ch; }
.steps__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.steps__actions .act { margin-top: 0; }

/* Einwilligung in Forschungsdaten (NIK-14): aktives Häkchen, sofort gespeichert */
.consent {
  margin-top: 24px; padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  border: 1px solid var(--linje); border-radius: var(--r-m); background: var(--kort);
}
.consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--rav); cursor: pointer; }
.consent__title { display: block; font-weight: 600; font-size: 15px; margin: 0 0 6px; cursor: pointer; color: var(--papir); }
.consent p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--stoev); max-width: 68ch; }
.consent a { color: var(--rav); }
.consent__state { display: block; margin-top: 8px; font-size: 12.5px; color: var(--aske); }

/* Schalter (Einstellungen), gleich wie im Popup */
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--stoev); }
.sw input {
  appearance: none; -webkit-appearance: none; width: 34px; height: 20px; margin: 0; cursor: pointer; flex: none;
  border-radius: 999px; background: var(--linje); position: relative; transition: background var(--t-std) var(--ease-out);
}
.sw input::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px;
  background: var(--stoev);
  transition: left var(--t-std) var(--ease-out), background var(--t-std) var(--ease-out);
}
.sw input:checked { background: var(--rav); }
.sw input:checked::after { left: 16px; background: var(--blaek); }
.sw input:disabled { background: transparent; box-shadow: inset 0 0 0 1px var(--linje-hi); cursor: default; }
.sw input:disabled::after { background: var(--linje-hi); }
.sw.is-soon { cursor: default; }
.empty .act { margin-top: 16px; }

/* ---------- Toast (Extension verbunden u. ä.) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 8px);
  padding: 10px 16px; border-radius: var(--r-s); font-size: 13.5px; color: var(--papir);
  background: var(--svaev); border: 1px solid var(--linje-hi); box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; transition: opacity var(--t-std) var(--ease-out), transform var(--t-std) var(--ease-out);
  z-index: 50;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Zustände & Fuß ---------- */
.empty {
  border: 1px solid var(--linje); border-radius: var(--r-m); background: var(--kort);
  padding: 44px 24px; text-align: center; color: var(--stoev);
}
.empty strong { display: block; font-size: 16px; font-weight: 600; color: var(--papir); margin-bottom: 6px; }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 26px;
  padding: 22px clamp(16px, 3vw, 36px) 30px;
  border-top: 1px solid var(--linje);
  font-size: 12.5px; color: var(--aske);
}
.foot__brand b { color: var(--stoev); font-weight: 600; }
.foot__links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.foot__links a { color: var(--aske); text-decoration: none; transition: color var(--t-micro) var(--ease-out); }
.foot__links a:hover { color: var(--papir); }

/* ---------- Suche ---------- */
.search { position: relative; display: flex; align-items: center; }
.search__ic { position: absolute; left: 11px; pointer-events: none; color: var(--aske); }
.search input {
  width: 190px; padding: 7px 12px 7px 31px; border-radius: var(--r-s);
  background: var(--kort); border: 1px solid var(--linje);
  color: var(--papir); font: 400 13.5px var(--body);
  transition: width var(--t-std) var(--ease-out), border-color var(--t-micro) var(--ease-out);
}
.search input::placeholder { color: var(--stoev); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:hover { border-color: var(--linje-hi); }
.search input:focus { outline: none; width: 250px; border-color: var(--rav); }
.sresults {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  width: 300px; max-height: 330px; overflow: auto; padding: 6px;
  border-radius: var(--r-m);
  background: var(--svaev); border: 1px solid var(--linje-hi);
  box-shadow: var(--shadow-pop);
}
.sresults button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--papir);
  padding: 9px 10px; border-radius: var(--r-s);
  font: 500 13.5px/1.4 var(--body);
}
.sresults button:hover { background: var(--linje); }
.sresults small { display: block; color: var(--stoev); font-size: 12px; font-weight: 400; }
.sresults .none { padding: 12px; color: var(--stoev); font-size: 13px; }

/* ---------- Profil-Menü ---------- */
.profile { position: relative; }
.avatar--sm {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--svaev); border: 1px solid var(--linje); color: var(--stoev); cursor: pointer;
  transition: color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out);
}
.avatar--sm:hover, .avatar--sm.is-open { color: var(--papir); border-color: var(--linje-hi); }
.pmenu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 220px; padding: 6px; border-radius: var(--r-m);
  background: var(--svaev); border: 1px solid var(--linje-hi);
  box-shadow: var(--shadow-pop);
  opacity: 0; translate: 0 -4px; visibility: hidden;
  transition: opacity var(--t-micro) var(--ease-out), translate var(--t-micro) var(--ease-out), visibility 0s linear var(--t-micro);
}
.pmenu.open { opacity: 1; translate: 0 0; visibility: visible; transition-delay: 0s; }
.pmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; color: var(--papir);
  font: 500 13.5px/1 var(--body); padding: 10px 10px; border-radius: var(--r-s);
  text-align: left;
}
.pmenu button:hover { background: var(--linje); }
.pmenu button svg { color: var(--stoev); flex: none; }

#view { min-height: calc(100vh - 160px); min-height: calc(100dvh - 160px); }   /* ohne Mindesthöhe springt die Fußzeile (CLS, NIK-82) */

/* ---------- Staffel-Reihen: eine Reihe pro Serie, horizontal scrollbar ---------- */
.sect__nav { margin-left: auto; display: flex; gap: 6px; }
.sect:not(.can-l):not(.can-r) .sect__nav { visibility: hidden; }
.row-btn {
  width: 30px; height: 30px; border-radius: var(--r-s);
  border: 1px solid var(--linje); background: transparent;
  color: var(--stoev); font-size: 15px; line-height: 1;
  transition: color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out), background var(--t-micro) var(--ease-out);
}
.row-btn:hover { color: var(--papir); border-color: var(--linje-hi); background: var(--kort); }

.srow { position: relative; }
.scroller {
  overflow-x: auto; scrollbar-width: none;
  cursor: grab; padding: 2px 0 6px; scroll-behavior: smooth;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.scards { display: flex; gap: 16px; width: max-content; }



/* ---------- Karteikarten: Bogen-Karussell ---------- */
.learn { max-width: 760px; margin: 0 auto; }
.lc { position: relative; }
.lc-track { position: relative; height: 340px; perspective: 1400px; }
.lc-card {
  position: absolute; left: 50%; top: 46%;
  --w: min(380px, calc((100vw - 40px) / 1.14));   /* die aktive Karte wird in app.js um 1,14 vergrößert */
  width: var(--w); height: 240px; margin: -120px 0 0 calc(var(--w) / -2);
  cursor: pointer; border-radius: var(--r-l);
  background: var(--kort);
  border: 1px solid var(--linje);
  transition: transform 520ms var(--ease-out), opacity 520ms var(--ease-out), border-color var(--t-std) var(--ease-out);
  will-change: transform;
}
.lc-card.is-active { border-color: var(--linje-hi); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lc-card:not(.is-active) .lc-flip { opacity: 0; transition: opacity var(--t-std) var(--ease-out); }   /* Nachbarkarten nur als Form, ihr Text schien sonst durch */
.lc-card.is-active .lc-flip { transition: transform 480ms var(--ease-out), opacity var(--t-std) var(--ease-out); }
.lc-flip {
  position: absolute; inset: 0; border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform 480ms var(--ease-out);
}
.lc-card.is-flipped .lc-flip { transform: rotateY(180deg); }
.lc-f, .lc-b {
  position: absolute; inset: 0; border-radius: inherit;
  backface-visibility: hidden;
  padding: 24px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center;
  background: var(--kort);
}
.lc-b { transform: rotateY(180deg); background: var(--kort-hi); }
.lc-label { position: absolute; top: 14px; left: 18px; font-size: 12px; color: var(--aske); }
.lc-word { font-weight: 600; font-size: clamp(26px, 3.2vw, 32px); line-height: 1.1; letter-spacing: -.025em; }
.lc-ctx, .lc-sent {
  font-size: 13.5px; color: var(--stoev); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lc-ctx { font-style: italic; }
.lc-tr { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.lc-boej { font-size: 13px; color: var(--papir); opacity: .85; font-variant-numeric: tabular-nums; }
.lc-infl { font-size: 12.5px; color: var(--aske); }
.lc-note {
  font-size: 12.5px; color: var(--syren);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lc-note--aske { color: var(--aske); -webkit-line-clamp: 1; }

/* Eben bewertete Karten tragen eine farbige Kante: Nochmal = Rosen, Leicht = Søgrøn */
.lc-card.was-again { border-color: rgba(223, 90, 106, .55); }
.lc-card.was-easy { border-color: rgba(62, 184, 162, .55); }
.lc-hint { text-align: center; font-size: 12.5px; color: var(--aske); margin-top: 14px; }

/* ---------- Tooltip ---------- */
.tip {
  position: fixed; z-index: 90; max-width: 260px; pointer-events: none;
  background: var(--svaev); border: 1px solid var(--linje-hi); border-radius: var(--r-s);
  box-shadow: var(--shadow-pop);
  padding: 7px 10px; font-size: 12.5px; color: var(--stoev); line-height: 1.5;
}
.tip b { color: var(--papir); font-variant-numeric: tabular-nums; }

/* ---------- Statistik ---------- */
.page--wide { max-width: none; }
.charts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); margin-top: 22px; }   /* min(): auf dem Handy nicht breiter als der Schirm (NIK-83) */
.chart--full { grid-column: 1 / -1; }
.chart {
  min-width: 0;   /* im Grid sonst so breit wie die breiteste Tabelle (Schalter auf dem Handy) */
  background: var(--kort); border: 1px solid var(--linje); border-radius: var(--r-m);
  padding: 16px 18px 12px;
}
.chart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.chart__title { font-weight: 600; font-size: 15px; letter-spacing: -.01em; margin: 0; }
.chart__sub { font-size: 12.5px; color: var(--stoev); }
.chart svg { display: block; width: 100%; height: auto; }
.chart svg text { font-family: var(--body); font-variant-numeric: tabular-nums; }
.chart .ax { fill: var(--aske); font-size: calc(12px * var(--k, 1)); }
.chart .val { fill: var(--stoev); font-size: calc(12px * var(--k, 1)); font-weight: 600; }
.chart .lbl { fill: var(--stoev); font-size: calc(12.5px * var(--k, 1)); }
.chart .gridline { stroke: var(--linje); stroke-width: 1; }

/* ---------- Admin-Blick (NIK-26): Tabellen und Pillen ---------- */
.stats--kpi { margin: 4px 0 6px; }
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl tr.is-off td { color: var(--aske); }   /* Einladung abgelaufen oder voll (NIK-71) */
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--aske); padding: 8px 10px; border-bottom: 1px solid var(--linje); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--linje); font-variant-numeric: tabular-nums; vertical-align: top; color: var(--stoev); }
.frm .tbl td { vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(35, 40, 52, .45); }
.tbl td:first-child { color: var(--papir); }
.tbl th.num, .tbl td.num { text-align: right; white-space: nowrap; }
.tbl td small { color: var(--aske); font-size: 12px; }
.tbl td.msg { max-width: 460px; }
.tbl td.msg code { font-size: 12px; color: var(--papir); word-break: break-word; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--linje-hi); color: var(--stoev); white-space: nowrap; }
.pill--on { color: var(--rav); border-color: rgba(245, 184, 76, .5); }
.pill--off { color: var(--rosen); border-color: rgba(223, 90, 106, .55); }
.admin select { background: var(--dyb); border: 1px solid var(--linje); border-radius: var(--r-s); color: var(--papir); font: 13px var(--body); padding: 5px 9px; }
.admin__tabs { margin-top: 14px; }
.page--wide > .chart + .chart, .page--wide > .chart + .charts, .page--wide > .charts + .chart, .page--wide > .charts + .charts { margin-top: 16px; }
.page--wide > .cbtns + .chart, .page--wide > .cbtns + .charts, .page--wide > .cbtns + .stats { margin-top: 18px; }
.admin .budgetbar { display: block; width: 100%; height: auto; }
/* Kosten-Regler (NIK-62): Formular auf der Kartenfläche, Overrides in der Tabelle */
.frm h4 { font-weight: 600; font-size: 14px; margin: 18px 0 8px; color: var(--papir); }
.frm__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; }
.frm__grid label, .frm__sw { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--stoev); }
.frm__sw span { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--stoev); font-size: 13px; min-height: 36px; }
.frm__sw input { accent-color: var(--rav); width: 16px; height: 16px; }
.frm input[type=number], .frm input[type=text], .frm input[type=url], .frm input[type=date], .ovr input {
  background: var(--dyb); border: 1px solid var(--linje); border-radius: var(--r-s); color: var(--papir);
  font: 13.5px/1.4 var(--body); padding: 7px 10px; font-weight: 400; width: 100%;
}
.frm input:hover, .ovr input:hover { border-color: var(--linje-hi); }
.frm input:focus, .ovr input:focus { outline: none; border-color: var(--rav); }
.frm .tbl input[type=number] { width: 96px; padding: 4px 8px; font-size: 13px; }
.frm__add { display: flex; gap: 8px; margin-top: 10px; max-width: 460px; }
.frm__add input { flex: 1; min-width: 0; }
.frm__add .act { flex: none; margin: 0; padding: 7px 12px; white-space: nowrap; }
.frm .tbl .act, .ovr .act { margin: 0; padding: 5px 9px; font-size: 12.5px; }
.ovr { white-space: nowrap; }
/* Nutzer-Dashboard (NIK-63): Ampel und Kohorten-Heatmap */
.kpi b { display: flex; align-items: center; gap: 10px; }
.kpi__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aske); flex: none; }
.kpi--green .kpi__dot { background: var(--soegroen); } .kpi--amber .kpi__dot { background: var(--rav); } .kpi--red .kpi__dot { background: var(--rosen); }
.cohorts td.cell { text-align: center; font-size: 12px; font-weight: 600; color: var(--papir); background: var(--c, var(--dyb)); border: 2px solid var(--kort); border-radius: 6px; min-width: 40px; }
.cohorts td.cell--partial { outline: 1px dashed var(--aske); outline-offset: -3px; }
.cohorts td.cell--none { background: transparent; }
.ovr input { width: 110px; padding: 4px 8px; font-size: 13px; margin-right: 6px; }

/* ---------- Blatt über der Seite (Feedback, NIK-18) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(8, 9, 13, .7); }
.sheet[hidden] { display: none; }
.sheet__box {
  width: min(440px, 100%); padding: 22px;
  background: var(--kort); border: 1px solid var(--linje-hi); border-radius: var(--r-l);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: sheet-in 200ms var(--ease-out) both;
}
@keyframes sheet-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet__head h2 { font: 600 18px/1.2 var(--body); margin: 0; letter-spacing: -.01em; }
.sheet .x { background: none; border: 0; color: var(--stoev); font-size: 20px; line-height: 1; padding: 3px 7px; border-radius: var(--r-s); cursor: pointer; }
.sheet .x:hover { color: var(--papir); background: var(--svaev); }
.sheet__hint { margin: 10px 0 8px; font-size: 13px; color: var(--stoev); line-height: 1.5; }
.sheet .field { margin-bottom: 10px; }
.sheet textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; min-height: 110px;
  color: var(--papir); background: var(--dyb); border: 1px solid var(--linje); border-radius: var(--r-s);
  transition: border-color var(--t-micro) var(--ease-out);
}
.sheet textarea:focus { outline: none; border-color: var(--rav); }
.field--row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--stoev); }
.fb__file { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--stoev); }
.fb__file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fb__file span { border: 1px solid var(--linje); border-radius: var(--r-s); padding: 6px 10px; transition: border-color var(--t-micro) var(--ease-out), color var(--t-micro) var(--ease-out); }
.fb__file:hover span, .fb__file:focus-within span { border-color: var(--linje-hi); color: var(--papir); }
.fb__filename { font-size: 12px; color: var(--aske); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.fb__reply { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--stoev); margin: 4px 0 6px; cursor: pointer; }
.fb__reply input { accent-color: var(--rav); width: 15px; height: 15px; }
.sheet__terms { margin: 12px 0 0; font-size: 12px; color: var(--aske); line-height: 1.5; }
.sheet__terms a { color: var(--stoev); text-decoration: underline; text-decoration-color: var(--linje-hi); }
.sheet__terms a:hover { color: var(--papir); }

/* Umfrage-Banner (NIK-29): eine Zeile über der Seite */
.survey { display: flex; align-items: center; gap: 14px; margin: 14px clamp(16px, 3vw, 36px) 0; padding: 10px 12px 10px 16px; background: var(--kort); border: 1px solid rgba(245, 184, 76, .45); border-radius: var(--r-m); font-size: 14px; color: var(--stoev); }
.survey__text { flex: 1; min-width: 0; }
.survey__text b { color: var(--papir); }
.survey .act { margin: 0; padding: 7px 14px; font-size: 13px; }
.survey .x { background: none; border: 0; color: var(--stoev); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: var(--r-s); cursor: pointer; }
.survey .x:hover { color: var(--papir); background: var(--svaev); }

/* Feedback-Liste im Überblick (NIK-18): Logauszug einklappbar */
.ad-log { margin-top: 6px; font-size: 12px; color: var(--aske); }
.ad-log summary { cursor: pointer; color: var(--stoev); }
.ad-log code { display: block; margin-top: 4px; font-size: 12px; color: var(--stoev); white-space: pre-wrap; }

/* Schalter (NIK-27): Kill-Switch je Adapter, Hinweis im Überblick, Notiz-Feld in der Tabelle */
.admin__paused, .admin__note { margin: 12px 0 0; font-size: 13.5px; color: var(--stoev); }
.admin__paused a { color: var(--rav); }
.frm .tbl .sw-note { width: 100%; min-width: 220px; margin: 0; }
.frm .tbl .frm__sw span { min-height: 0; }
.frm__grid label small { font-weight: 400; color: var(--aske); font-size: 12px; }

/* Segmentknöpfe (Zeitraum, Admin-Reiter, Feedback-Art) */
.cbtns { display: flex; gap: 2px; padding: 2px; background: var(--dyb); border: 1px solid var(--linje); border-radius: 8px; width: max-content; max-width: 100%; flex-wrap: wrap; }
.cbtn {
  background: none; border: 0; border-radius: 6px; color: var(--stoev);
  font: 500 12.5px/1 var(--body); padding: 6px 10px; cursor: pointer;
  transition: color var(--t-micro) var(--ease-out), background var(--t-micro) var(--ease-out);
}
.cbtn:hover { color: var(--papir); }
.cbtn.is-active { color: var(--papir); background: var(--svaev); }
[data-tip] { cursor: default; }

/* ---------- Auszeichnungen ---------- */
.badge__medal { width: 44px; height: 44px; margin-bottom: 6px; }

.badge__bar { width: 100%; height: 3px; background: var(--linje); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.badge__bar span { display: block; height: 100%; background: var(--rav); border-radius: 2px; }
.badge.is-locked .badge__bar span { background: var(--stoev); }
.badge__prog { font-size: 12px; color: var(--aske); margin-top: 4px; font-variant-numeric: tabular-nums; }
.badges__head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 14px; }
.badges__count { font-size: 13px; color: var(--stoev); }
.badges__count b { color: var(--papir); }

/* ---------- Profil ---------- */
.pf-learn { margin-top: 8px; font-size: 13.5px; color: var(--stoev); }
.pf-learn b { color: var(--papir); }
.pf-head-act { margin-left: auto; align-self: flex-start; }
.pf-form { display: grid; gap: 10px; max-width: 460px; margin: 6px 0 26px; }
.pf-form label { font-size: 12.5px; font-weight: 500; color: var(--stoev); }
.pf-form input, .pf-form textarea {
  background: var(--dyb); border: 1px solid var(--linje); border-radius: var(--r-s);
  color: var(--papir); font: 14px/1.5 var(--body); padding: 9px 12px; resize: vertical;
  transition: border-color var(--t-micro) var(--ease-out);
}
.pf-form input:focus, .pf-form textarea:focus { outline: none; border-color: var(--rav); }
.pf-facts { margin-top: 26px; }

/* Self-Report „Dein Dänisch“ (NIK-20): vier Felder, zweispaltig */
.sr { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--linje); border-radius: var(--r-m); background: var(--kort); }
.sr h3 { font-weight: 600; font-size: 15px; margin: 0 0 4px; color: var(--papir); }
.sr > p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--stoev); }
.sr > p a { color: var(--rav); }
.sr__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.sr__grid label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--stoev); }
.sr__grid select, .sr__grid input {
  background: var(--dyb); border: 1px solid var(--linje); border-radius: var(--r-s); color: var(--papir);
  font: 14px/1.4 var(--body); padding: 8px 11px; font-weight: 400;
  transition: border-color var(--t-micro) var(--ease-out);
}
.sr__grid select:focus, .sr__grid input:focus { outline: none; border-color: var(--rav); }
.sr__foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.sr__foot .act { margin: 0; padding: 8px 16px; }
.sr__state { font-size: 12.5px; color: var(--aske); }
@media (max-width: 560px) { .sr__grid { grid-template-columns: 1fr; } }

/* ---------- Einstellungen ---------- */
.set { max-width: 720px; }
.set__group { padding: 4px 0 8px; margin-bottom: 28px; }
.set__group h3 { font-weight: 600; font-size: 15px; letter-spacing: -.01em; margin: 0 0 4px; }
.set__group > p { font-size: 13.5px; color: var(--stoev); margin: 0 0 10px; }
.set__row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--linje);
}
.set__row:last-child { border-bottom: 1px solid var(--linje); }
.set__row .cbtns { flex: none; flex-wrap: nowrap; }
.set__row > span { font-size: 14px; color: var(--papir); }
.set__row > b { font-size: 13.5px; color: var(--stoev); font-weight: 500; word-break: break-all; text-align: right; }
.set__row small { display: block; font-size: 12.5px; color: var(--stoev); margin-top: 2px; }
.soon {
  font-size: 11.5px; font-weight: 500;
  color: var(--stoev); border: 1px solid var(--linje-hi);
  padding: 1px 7px; border-radius: var(--pill); white-space: nowrap; margin-left: 4px;
}
.is-soon { opacity: .45; pointer-events: none; }
/* Experiment andere Untertitelsprachen (NIK-77): Sprachkürzel am Wort, Hinweis auf der Statistik */
.exp-tag {
  font-size: 11px; font-weight: 600; color: var(--syren);
  border: 1px solid rgba(157, 137, 232, .4); padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: 1px;
}
.exp-note { margin-top: 6px; color: var(--aske); }
.set select, .set input[type=text] {
  background: var(--dyb); border: 1px solid var(--linje); border-radius: var(--r-s);
  color: var(--papir); font: 13.5px var(--body); padding: 7px 10px; min-width: 200px;
}
.set select:focus, .set input[type=text]:focus { outline: none; border-color: var(--rav); }

/* ========== Neue Mediathek (Labor, Flag `browse`, NIK-89) ==========
   Kopfzeile liegt über dem großen Bild und wird beim Scrollen fest; Reihen ohne Rahmen, Bilder führen.
*/
body.stream { --top-h: 64px; }
body.stream .top {
  min-height: var(--top-h); padding-top: 14px; padding-bottom: 14px;
  background: transparent;
  border-bottom-color: transparent;
  transition: background-color var(--t-std) var(--ease-out), border-color var(--t-std) var(--ease-out);
}
/* Lesbarkeits-Verlauf über dem Bild: reicht weit unter die Kopfzeile, sonst entsteht an ihrer Unterkante eine Kante */
body.stream .top::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 96px); z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,16,21,.82) 0%, rgba(14,16,21,.5) 40%, rgba(14,16,21,.18) 72%, rgba(14,16,21,0) 100%);
  transition: opacity var(--t-std) var(--ease-out);
}
body.stream .top.is-solid { background: var(--nat); border-bottom-color: var(--linje); }
body.stream .top.is-solid::before { opacity: 0; }
body.stream .pnav { gap: 4px; }
body.stream .pnav button { background: none; color: var(--stoev); font-weight: 500; font-size: 14px; padding: 8px 10px; }
body.stream .pnav button:hover { background: none; color: var(--papir); }
body.stream .pnav button.is-active { background: none; color: var(--papir); font-weight: 600; }
/* Suche als Symbol, das sich beim Antippen öffnet */
body.stream .search input { width: 36px; padding-left: 30px; background: transparent; border-color: transparent; cursor: pointer; }
body.stream .search input::placeholder { color: transparent; }
body.stream .search input:focus, body.stream .search input:not(:placeholder-shown) { width: 250px; background: var(--dyb); border-color: var(--linje-hi); cursor: text; }
body.stream .search input:focus::placeholder { color: var(--stoev); }
body.stream .search__ic { color: var(--papir); }
body.stream .avatar--sm { background: transparent; border-color: rgba(242,239,233,.25); color: var(--papir); }
body.stream main:has(> .browse) { padding-top: 0; }
body.stream .survey { position: relative; z-index: 15; }   /* liegt über dem hochgezogenen Titelbild */
@media (max-width: 640px) {
  body.stream { --top-h: 104px; }
  body.stream .top .search input { width: 36px; }
  body.stream .top .search input:focus, body.stream .top .search input:not(:placeholder-shown) { width: 170px; }
}

.browse { --gutter: clamp(16px, 3vw, 36px); }
.bb {
  position: relative; overflow: hidden;
  margin: calc(-1 * var(--top-h, 64px)) calc(-1 * var(--gutter)) 0;
  min-height: min(76vh, 700px);
  display: flex; align-items: flex-end;
  background: var(--dyb);
}
.bb--none { min-height: calc(var(--top-h, 64px) + 24px); background: none; }
.bb__media { position: absolute; inset: 0; }
.bb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); }
.bb__media.is-soft .bb__img { filter: blur(14px) brightness(.72); transform: scale(1.1); }   /* kleines Vorschaubild: weich statt verpixelt */
.bb__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,22,28,.94) 0%, rgba(20,22,28,.7) 32%, rgba(20,22,28,.15) 68%, rgba(20,22,28,0) 100%),
    linear-gradient(0deg, var(--nat) 0%, rgba(20,22,28,.6) 18%, rgba(20,22,28,0) 42%);
}
.bb__body { position: relative; z-index: 2; max-width: 680px; padding: 0 var(--gutter) clamp(72px, 11vh, 120px); }
.bb__title { margin: 0; font-weight: 700; font-size: clamp(40px, 5.6vw, 76px); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.bb__meta { margin-top: 14px; font-size: 15px; color: var(--stoev); font-variant-numeric: tabular-nums; }
.bb__progress { width: min(260px, 60%); height: 3px; margin-top: 14px; border-radius: 2px; background: rgba(242,239,233,.22); overflow: hidden; }
.bb__progress span { display: block; height: 100%; background: var(--rav); }
.bb__words { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.bb__words-lbl { font-size: 13px; color: var(--stoev); margin-right: 4px; }
.bb__chip { font-size: 13.5px; font-weight: 500; color: var(--papir); padding: 4px 10px; border-radius: var(--pill); background: rgba(14,16,21,.55); border: 1px solid rgba(242,239,233,.16); }
.bb__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.bb .act { margin: 0; padding: 12px 22px; font-size: 15px; }
.bb .act--quiet { background: rgba(14,16,21,.5); border-color: rgba(242,239,233,.3); }
.bb .act--quiet:hover:not(:disabled) { background: rgba(35,40,52,.85); }

.browse .row { position: relative; z-index: 2; margin-bottom: 40px; }
.browse .bb + .row { margin-top: -48px; }   /* die erste Reihe ragt ins Bild, wie bei Streamingdiensten */
.browse .row .sect__head { margin-bottom: 12px; }
.browse .row .sect__title { font-size: 19px; letter-spacing: -.015em; }
.browse .scards { gap: 12px; padding: 2px 0 4px; }
.browse .row-btn { display: inline-grid; place-items: center; }

.tile {
  flex: none; width: clamp(220px, 21vw, 300px);
  display: flex; flex-direction: column; gap: 0;
  background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer;
}
.tile__img {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 8px; background: var(--svaev);
  transition: box-shadow var(--t-std) var(--ease-out);
}
.tile__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease-out), filter 320ms var(--ease-out); }
.tile__img.is-soft img { filter: blur(5px) brightness(.85); transform: scale(1.08); }
.tile:hover .tile__img img { transform: scale(1.05); }
.tile:hover .tile__img.is-soft img { transform: scale(1.12); }
.tile:hover .tile__img { box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile__img { outline: 2px solid var(--rav); outline-offset: 2px; }
.tile__badge { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 12px; font-weight: 600; color: var(--blaek); background: var(--rav); border-radius: 4px; padding: 2px 7px; }
.tile__progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgba(14,16,21,.6); }
.tile__progress span { display: block; height: 100%; background: var(--rav); }
.tile__title { display: block; margin-top: 10px; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 13px; color: var(--stoev); font-variant-numeric: tabular-nums; }
.tile .thumb__fallback { font-size: 14px; font-weight: 600; color: var(--stoev); }
.tile__meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__meta .ms { margin-left: auto; }
/* Gold (NIK-95): alle drei Sterne. Bernsteinrand ums Bild und eine kleine Medaille, sonst bleibt die Karte ruhig */
.tile.is-gold .tile__img { box-shadow: 0 0 0 2px var(--rav); }
.tile.is-gold:hover .tile__img { box-shadow: 0 0 0 2px var(--rav), 0 10px 28px rgba(0,0,0,.45); }
.tile__medal {
  position: absolute; right: 8px; top: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--rav); box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.tile__medal svg { width: 15px; height: 15px; fill: var(--blaek); }

/* Heute wiederholen (NIK-95): kleiner Kartenstapel statt Videokachel */
.scards--rev { gap: 12px; }
.rev {
  flex: none; width: 272px; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px;
  background: var(--kort); border: 1px solid var(--linje); border-radius: var(--r-m);
  color: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--t-micro) var(--ease-out), background var(--t-micro) var(--ease-out);
}
.rev:hover { border-color: var(--linje-hi); background: var(--kort-hi); }
.rev:focus-visible { outline: 2px solid var(--rav); outline-offset: 2px; }
.rev__stack { position: relative; flex: none; width: 58px; height: 58px; margin: 4px 6px 0 0; }
.rev__stack::before, .rev__stack::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--r-s); border: 1px solid var(--linje-hi); background: var(--svaev);
}
.rev__stack::before { transform: translate(6px, -4px); opacity: .55; }
.rev__stack::after { transform: translate(3px, -2px); opacity: .85; }
.rev__thumb { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: var(--r-s); background: var(--svaev); border: 1px solid var(--linje-hi); }
.rev__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rev__body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.rev__n { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rev__from { font-size: 13px; color: var(--stoev); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rev__go { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--rav); }

/* Stand im Titelbild und auf der Detailseite (NIK-95) */
.bb__mast { margin-top: 12px; }
.bb__mast .ms__star { width: 18px; height: 18px; }
.bb__mast .ms__lbl { font-size: 14px; color: var(--papir); }
.mast { margin: 18px 0 4px; padding: 14px 16px; border: 1px solid var(--linje); border-radius: var(--r-m); background: var(--kort); }
.mast.is-gold { border-color: var(--rav); }
.mast__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.mast__head > span:first-child { font-size: 14.5px; font-weight: 600; }
.mast__now { font-size: 13px; color: var(--stoev); }
.mast__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mast__steps li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--linje); color: var(--aske); }
.mast__steps li .ms__star { width: 18px; height: 18px; }
.mast__steps li.is-done, .mast__steps li.is-now { color: var(--papir); }
.mast__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mast__txt b { font-size: 13.5px; font-weight: 600; }
.mast__txt small { font-size: 12.5px; color: var(--stoev); }
.mast__steps li:not(.is-done):not(.is-now) .mast__txt small { color: var(--aske); }
.mast .ms__pips { gap: 3px; flex: none; }
.mast .ms__pips i { width: 14px; height: 4px; }
.detail__count { margin-top: 8px; font-size: 12.5px; color: var(--stoev); font-variant-numeric: tabular-nums; }

.teaser .sect__head { align-items: center; }
.teaser__body { max-width: 620px; padding: 18px 20px; border: 1px dashed var(--linje-hi); border-radius: var(--r-m); color: var(--stoev); font-size: 14px; line-height: 1.6; }
.teaser__body p { margin: 0; }

@media (max-width: 640px) {
  .bb { min-height: 72vh; }
  .bb__shade { background: linear-gradient(0deg, var(--nat) 0%, rgba(20,22,28,.75) 40%, rgba(20,22,28,.2) 75%, rgba(20,22,28,.45) 100%); }
  .bb__body { padding-bottom: 64px; }
  .tile { width: 72vw; max-width: 280px; }
  .rev { width: 78vw; max-width: 272px; }
}

@media (max-width: 520px) {
  .set__row { flex-wrap: wrap; }
  .set__row select { flex: 1 1 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
