/* ---------- Standard: Mitternacht (dunkelblau) ---------- */
:root {
  --bg: #0a0e14;
  /* Derselbe Ton als Komponenten: Verlaeufe brauchen ihn mit Alpha
     (rgba(var(--bg-rgb), 0.4)) — mit #rrggbb ginge das nicht. Jedes
     Theme setzt beide, sonst blendet der Hero in Dunkelblau statt in
     den eigenen Grundton. */
  --bg-rgb: 10, 14, 20;
  --bg-2: #0f1620;
  --surface: #141c28;
  --surface-2: #1a2432;
  --surface-3: #222e40;
  --sidebar: #0c1219;
  --accent: #1ecad3;
  --accent-2: #16a6b8;
  --accent-soft: rgba(30, 202, 211, 0.14);
  --on-accent: #06222a;
  --on-bright: #0a0e14;
  --text: #f2f6fb;
  --muted: #9fb0c5;
  --muted-2: #6b7d94;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --tb-height: 32px;
}

/* ---------- Weitere Themes ---------- */
[data-theme="onyx"] {
  --bg: #08080a; --bg-rgb: 8, 8, 10; --bg-2: #0e0e11; --surface: #141417; --surface-2: #1c1c21;
  --surface-3: #26262d; --sidebar: #0a0a0c;
  --text: #f4f4f6; --muted: #a8a8b2; --muted-2: #71717d;
}
[data-theme="graphite"] {
  --bg: #16181d; --bg-rgb: 22, 24, 29; --bg-2: #1b1e24; --surface: #22252c; --surface-2: #2a2e37;
  --surface-3: #343945; --sidebar: #131519;
  --text: #eef0f4; --muted: #a4abb8; --muted-2: #737b8a;
  --border: rgba(255,255,255,0.08); --border-2: rgba(255,255,255,0.14);
}
[data-theme="plum"] {
  --bg: #120b18; --bg-rgb: 18, 11, 24; --bg-2: #180f20; --surface: #1f1429; --surface-2: #281a34;
  --surface-3: #342344; --sidebar: #0e0813;
  --text: #f5f0f8; --muted: #b6a6c2; --muted-2: #83738f;
}
[data-theme="forest"] {
  --bg: #08130f; --bg-rgb: 8, 19, 15; --bg-2: #0c1a14; --surface: #11241c; --surface-2: #172e24;
  --surface-3: #1f3d30; --sidebar: #060f0c;
  --text: #eff7f2; --muted: #9dbaad; --muted-2: #6b877b;
}
[data-theme="nord"] {
  --bg: #2e3440; --bg-rgb: 46, 52, 64; --bg-2: #333a47; --surface: #3b4252; --surface-2: #434c5e;
  --surface-3: #4c566a; --sidebar: #292f3a;
  --text: #eceff4; --muted: #c2ccd9; --muted-2: #8f9bb0;
  --border: rgba(255,255,255,0.09); --border-2: rgba(255,255,255,0.16);
}
[data-theme="light"] {
  --bg: #f4f6fa; --bg-rgb: 244, 246, 250; --bg-2: #eaeef5; --surface: #ffffff; --surface-2: #f2f5fa;
  --surface-3: #e4e9f2; --sidebar: #ffffff;
  --text: #161c26; --muted: #4e5a6c; --muted-2: #6d7889;
  --border: rgba(10, 20, 40, 0.1); --border-2: rgba(10, 20, 40, 0.16);
  --shadow-lg: 0 24px 60px rgba(20, 30, 50, 0.18);
  --on-bright: #ffffff;
}
/* Im hellen Theme müssen die "hellen" Knöpfe dunkel werden */
[data-theme="light"] .play-btn,
[data-theme="light"] .card-play,
[data-theme="light"] .icon-btn.play,
[data-theme="light"] .icon-btn.big { background: #161c26; }
[data-theme="light"] .play-btn:hover,
[data-theme="light"] .card-play:hover,
[data-theme="light"] .icon-btn.play:hover,
[data-theme="light"] .icon-btn.big:hover { background: #2a3242; }
[data-theme="light"] .card-badge { background: #161c26; color: #fff; }
[data-theme="light"] .navbar.solid { background: rgba(255,255,255,0.92); }
[data-theme="light"] .dropdown-menu,
[data-theme="light"] .season-menu,
[data-theme="light"] .vp-menu { background: rgba(255,255,255,0.98); }
[data-theme="light"] .icon-btn:hover,
[data-theme="light"] .nav-btn:hover,
[data-theme="light"] .nav-brand:hover { background: rgba(10,20,40,0.07); }
[data-theme="light"] .nav-btn.active { background: rgba(10,20,40,0.1); }
/* Die eigenen Verlaeufe fuer .hero-slide::after und .detail-hero::after
   sind entfallen: beide Grundregeln rechnen ueber --bg-rgb und treffen
   damit auch das helle Theme. Blieben sie stehen, ueberschrieben sie
   den weichen Uebergang und der harte Schnitt waere hier weiterhin
   zu sehen. */
[data-theme="light"] .hero-content h2,
[data-theme="light"] .hero-overview { text-shadow: none; }
[data-theme="light"] .tb-btn:hover { background: rgba(10,20,40,0.08); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow: hidden; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

.hidden { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--text);
  position: relative;
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(255,255,255,0.1); }
.icon-btn:active { transform: scale(0.94); }

.text-btn {
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.16s var(--ease);
}
.text-btn:hover { background: rgba(255,255,255,0.1); }

/* ============================ TITLE BAR ============================ */
.titlebar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: stretch;
  height: var(--tb-height);
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

/* Ziehbereich zum Verschieben des Fensters */
.tb-drag {
  flex: 1;
  display: flex; align-items: center;
  padding-left: 13px;
  -webkit-app-region: drag;
  min-width: 0;
}
.tb-title {
  font-size: 0.74rem;
  color: var(--muted-2);
  letter-spacing: 0.03em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tb-controls {
  display: flex;
  -webkit-app-region: no-drag;
}

.tb-btn {
  display: grid; place-items: center;
  width: 46px;
  color: var(--muted);
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.tb-btn svg { width: 12px; height: 12px; }
.tb-btn:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.tb-btn.danger:hover { background: #e0303f; color: #fff; }

/* macOS bringt eigene Fensterknöpfe mit — dann nur der Ziehbereich */
body.is-mac .tb-controls { display: none; }
body.is-mac .tb-drag { padding-left: 80px; justify-content: center; }

/* ============================== LOGIN ============================== */
/* Flach und ruhig: eine Flaeche, keine Verlaeufe, kein Leuchten,
   keine Effektebenen. Nur Text, Felder und ein Knopf. */
.login-screen {
  position: fixed; inset: var(--tb-height) 0 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: var(--bg);
}

.login-header {
  display: flex; align-items: center; gap: 12px;
  padding: 28px 40px 0;
}

.login-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: block;
}

.login-wordmark {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.login-stage {
  width: min(380px, calc(100% - 56px));
  justify-self: center;
  align-self: center;
  padding: 16px 0 28px;
}

.login-intro { margin-bottom: 26px; }
.login-intro h2 {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}
.login-intro p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.login-footer {
  padding: 0 40px 20px;
  font-size: 0.75rem;
  color: var(--muted-2);
}

@media (max-width: 620px) {
  .login-header { padding: 22px 24px 0; }
  .login-footer { padding: 0 24px 18px; }
  .login-stage { width: calc(100% - 44px); }
}

/* Flache Fenster: oben ausrichten, sonst rutscht das Formular
   unter den unteren Rand. */
@media (max-height: 700px) {
  .login-stage { align-self: start; padding-top: 6px; }
  .login-header { padding-top: 18px; }
  .login-intro { margin-bottom: 20px; }
}

.connect-form { display: grid; gap: 15px; }

.field { display: grid; gap: 7px; }
.field label {
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted-2);
}

.field-input {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--border);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.field-input:focus-within {
  border-color: var(--accent);
  background: rgba(255,255,255,0.06);
}

/* Ohne Karte brauchen die Felder etwas mehr Eigenkontrast */
.login-stage .field-input {
  background: var(--surface);
  border-color: var(--border-2);
}
.login-stage .field-input:focus-within {
  background: var(--surface);
  border-color: var(--accent);
}
[data-theme="light"] .login-stage .field-input {
  background: #fff;
  border-color: rgba(10, 20, 40, 0.18);
}

.field-input input {
  flex: 1; min-width: 0;
  padding: 13px 0;
  background: none; border: none; outline: none;
  font-size: 0.95rem;
}
.field-input input::placeholder { color: var(--muted-2); }

.ghost-icon {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--muted-2);
  flex-shrink: 0;
}
.ghost-icon svg { width: 19px; height: 19px; }
.ghost-icon:hover { color: var(--text); background: rgba(255,255,255,0.07); }

.remember {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--muted);
  cursor: pointer; user-select: none;
  margin-top: 2px;
}
.remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkmark {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-2);
  background: transparent;
  display: grid; place-items: center;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease);
  flex-shrink: 0;
}
.checkmark::after {
  content: ''; width: 5px; height: 9px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -2px;
  transition: transform 0.16s var(--ease);
}
.remember input:checked + .checkmark { background: var(--accent); border-color: var(--accent); }
.remember input:checked + .checkmark::after { transform: rotate(45deg) scale(1); }

.primary-btn {
  position: relative;
  margin-top: 6px;
  padding: 13px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.95rem; font-weight: 600;
  transition: background 0.14s var(--ease), opacity 0.14s var(--ease);
}
.primary-btn:hover:not(:disabled) { background: var(--accent-2); }
.primary-btn:disabled { opacity: 0.65; cursor: default; }
.primary-btn.loading .btn-label { opacity: 0; }
.primary-btn.loading .btn-spinner { opacity: 1; }

.btn-spinner {
  position: absolute; inset: 0; margin: auto;
  width: 19px; height: 19px;
  border: 2.4px solid rgba(4, 34, 42, 0.28);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ============================== SHELL ============================== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--tb-height));
  margin-top: var(--tb-height);
  background: var(--bg);
}

/* ============================== NAVBAR ============================== */
.navbar {
  position: fixed; top: var(--tb-height); left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  height: 62px;
  padding: 0 26px;
  background: linear-gradient(180deg, rgba(10,14,20,0.92) 12%, rgba(10,14,20,0.55) 70%, transparent);
  transition: background 0.28s var(--ease), backdrop-filter 0.28s var(--ease), border-color 0.28s var(--ease);
  border-bottom: 1px solid transparent;
}
/* Wird beim Scrollen gesetzt — über dem Hero bleibt die Leiste transparent */
.navbar.solid {
  background: rgba(12, 17, 24, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

/* min-width:0 erlaubt dem Kind zu schrumpfen; ohne das drueckt eine
   lange Reiterliste die rechte Seite (Suche, Profil) aus dem Fenster —
   genau das passierte, als die Bibliotheken dazukamen. */
.nav-left { display: flex; align-items: center; gap: 26px; min-width: 0; flex: 1 1 auto; }

.nav-brand {
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0;
  padding: 5px 9px 5px 5px;
  border-radius: 8px;
  transition: background 0.15s var(--ease);
}
.nav-brand:hover { background: rgba(255,255,255,0.09); }
.brand-logo {
  width: 27px; height: 27px;
  flex-shrink: 0;
  border-radius: 6px;
  display: block;
}
.brand-word {
  font-size: 1.06rem; font-weight: 700; letter-spacing: -0.025em;
}

/* Die Leiste darf die rechte Seite nicht wegschieben — aber das
   Aufklappmenü hängt unter ihr und muss sichtbar bleiben.

   `overflow: hidden` erschlug beides: Es kappte auch das Menü, das
   sich dann zwar öffnete, aber unsichtbar blieb. Stattdessen wird gar
   nicht gekappt; die Reiter dürfen stattdessen schrumpfen (flex-shrink
   am .nav-btn) und lange Namen kürzen. Was nicht mehr sinnvoll passt,
   liegt ohnehin im Bibliotheken-Menü. */
.nav-links {
  display: flex; align-items: center; gap: 2px;
  min-width: 0;
}

.nav-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.94rem; font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
  /* Bei Platzmangel lieber lange Namen kürzen als die rechte Seite
     (Suche, Profil) aus dem Fenster drücken. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Der Bibliotheken-Knopf ist der Ausweg für alles, was nicht in die
   Leiste passt — er darf nie derjenige sein, der weggekürzt wird. */
#library-toggle { flex-shrink: 0; }
.nav-links .nav-dropdown { flex-shrink: 0; }

/* Trennt im Bibliotheken-Menü das, was oben schon als Reiter steht,
   von dem, was es nur hier gibt. */
.menu-separator {
  height: 1px;
  margin: 6px 8px;
  background: var(--border);
}
.nav-btn svg { width: 16px; height: 16px; opacity: 0.85; transition: transform 0.2s var(--ease); }
.nav-btn .grid-icon { width: 17px; height: 17px; }
.nav-btn:hover { background: rgba(255,255,255,0.13); }
/* Aktiver Punkt als gefüllte Pille — wie im Prime-Header */
.nav-btn.active {
  background: rgba(255,255,255,0.17);
  font-weight: 700;
}
.nav-btn.open svg { transform: rotate(180deg); }

.nav-divider {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.2);
  margin: 0 7px;
  flex-shrink: 0;
}

.nav-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Suche: nur ein Icon, das sich beim Klick zum Feld öffnet */
.search-box {
  display: flex; align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: width 0.26s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
  overflow: hidden;
}
.search-box.collapsed { width: 40px; background: transparent; }
.search-box:not(.collapsed) {
  width: 268px;
  background: rgba(255,255,255,0.1);
  border-color: var(--border-2);
  padding-right: 12px;
}

.search-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  color: var(--text);
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.15s var(--ease);
}
.search-icon svg { width: 19px; height: 19px; }
.search-box.collapsed .search-icon:hover { background: rgba(255,255,255,0.13); }

.search-box input {
  flex: 1; min-width: 0;
  padding: 9px 0;
  background: none; border: none; outline: none;
  font-size: 0.89rem;
  opacity: 1;
  transition: opacity 0.18s var(--ease);
}
.search-box.collapsed input { opacity: 0; width: 0; padding: 0; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box input::-webkit-search-cancel-button { filter: invert(0.6); cursor: pointer; }

/* --------------------------- DROPDOWNS --------------------------- */
.nav-dropdown { position: relative; }

.dropdown-menu {
  position: absolute; top: calc(100% + 9px); right: 0;
  min-width: 210px;
  padding: 7px;
  border-radius: 13px;
  background: rgba(20, 27, 37, 0.97);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: menuIn 0.16s var(--ease);
  max-height: 70vh; overflow-y: auto;
}
.nav-links .dropdown-menu { left: 0; right: auto; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.menu-item, .library-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem; font-weight: 500;
  text-align: left;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-item:hover, .library-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.menu-item.danger:hover { color: #ff8b8b; }
.library-btn.active { color: var(--accent); font-weight: 600; }
.library-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

.profile-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 7px 4px 4px;
  border-radius: 999px;
  transition: background 0.15s var(--ease);
}
.profile-btn:hover { background: rgba(255,255,255,0.09); }
.profile-btn .caret-icon { width: 15px; height: 15px; color: var(--muted); transition: transform 0.2s var(--ease); }
.profile-btn.open .caret-icon { transform: rotate(180deg); }

.user-avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), #5b5be0);
  color: var(--on-accent);
  font-weight: 700; font-size: 0.88rem;
  flex-shrink: 0;
}
.user-avatar.big { width: 42px; height: 42px; font-size: 1.05rem; }

/* Profilbild aus Jellyfin. Liegt über dem Buchstaben, statt ihn zu
   ersetzen: fehlt das Bild oder wurde es gelöscht, nimmt onerror das
   <img> heraus und der Buchstabe steht wieder da. */
.user-avatar { position: relative; overflow: hidden; }
.user-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Kleinere Ausgabe in den Serverlisten */
.user-avatar.server-face {
  width: 34px; height: 34px;
  font-size: 0.9rem;
}
.user-avatar.server-face.dim { opacity: 0.45; }

.profile-head {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px 11px;
}
.profile-id { min-width: 0; }
.profile-id strong {
  display: block; font-size: 0.93rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-id small {
  display: block; color: var(--muted-2); font-size: 0.78rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.main-panel {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding-bottom: 100px;
}

.view-root { padding: 0 44px; animation: fade 0.28s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
/* Views ohne Hero brauchen Abstand unter der fixierten Navbar */
.view-root.with-top-gap { padding-top: 88px; }

/* ========================== HERO SLIDER ========================== */
.hero-slider {
  position: relative;
  height: min(560px, 68vh);
  margin: 0 -44px 14px;
  overflow: hidden;
}

/* Der Wechsel läuft in zwei Ebenen, nicht als eine Blende.

   Vorher lag beides auf derselben Kurve: --ease ist eine
   Ausklingkurve und legt den Großteil der Änderung in die ersten
   ~250ms — gemessen war nach 90ms bereits ein Drittel umgeblendet.
   Dazu stand die Summe beider Deckungen konstant bei 1.00, beide
   Titel schwebten also gleichzeitig halbdurchsichtig übereinander.
   Das liest das Auge als Schnitt mit Geisterbild.

   Jetzt: das BILD blendet lang und gleichmäßig (linear, 1.1s), der
   TEXT geht vorher schnell weg und kommt danach neu herein. So
   überlagern sich nie zwei Schriften. */
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s linear;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }

/* Die abtretende Folie: Text zuerst raus, kürzer als die Bildblende,
   damit er verschwunden ist, bevor der neue erscheint. */
.hero-slide:not(.active) .hero-content {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.28s ease-in, transform 0.28s ease-in;
}

/* Die langsame Fahrt lief bisher in ALLEN Folien gleichzeitig ab —
   die Regel darunter setzte zwar `running` für die aktive, ein
   `paused` für die inaktiven gab es aber nirgends (gemessen: beide
   play-state "running"). Nach 18s standen dadurch alle Bilder am
   Endpunkt still, und spätere Wechsel zeigten ein unbewegtes Bild.
   Jetzt ist es umgekehrt herum verankert: angehalten ist der
   Normalfall, nur die sichtbare Folie fährt. */
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 16%;
  transform: scale(1.06);
  animation: kenburns 18s ease-out both paused;
}
.hero-slide.active .hero-bg { animation-play-state: running; }

@keyframes kenburns {
  from { transform: scale(1.13) translate3d(1.4%, 0.7%, 0); }
  to   { transform: scale(1.02) translate3d(0, 0, 0); }
}

/* Der Verlauf nach unten lief frueher erst bei 1% auf volle Deckung
   und sprang dort auf --bg: das Bild endete sichtbar als Kante. Jetzt
   traegt er ueber rund ein Drittel der Hoehe, mit Zwischenstufen —
   ohne sie legt der Browser eine gerade Rampe, die man als Band sieht.
   Die Farbe kommt aus --bg-rgb, damit jedes Theme seinen eigenen
   Grundton einblendet statt des dunkelblauen aus dem Standard. */
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb),0.97) 0%, rgba(var(--bg-rgb),0.82) 30%, rgba(var(--bg-rgb),0.24) 62%, transparent 82%),
    linear-gradient(0deg,
      rgb(var(--bg-rgb)) 0%,
      rgba(var(--bg-rgb),0.98) 6%,
      rgba(var(--bg-rgb),0.88) 13%,
      rgba(var(--bg-rgb),0.66) 21%,
      rgba(var(--bg-rgb),0.40) 29%,
      rgba(var(--bg-rgb),0.18) 38%,
      rgba(var(--bg-rgb),0.05) 48%,
      transparent 62%);
}

/* Keine Animation am Container: `heroIn ... both` hielt hier
   opacity auf dem Animationswert fest, und ein Animationswert
   schlägt jede normale Deklaration. Das Ausblenden der abtretenden
   Folie (.hero-slide:not(.active) .hero-content) konnte deshalb nie
   greifen — gemessen liefen beide Texte exakt parallel zur Bildblende.
   Der Einlauf sitzt jetzt an den einzelnen Zeilen, siehe unten. */
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  height: 100%;
  padding: 0 44px 62px;
  max-width: 660px;
}

/* Der Text der ankommenden Folie setzt erst ein, wenn das Bild schon
   zu zwei Dritteln steht (0.34s Verzug bei 1.1s Blende). Die Zeilen
   folgen kurz versetzt aufeinander — das ist der Teil, der den
   Wechsel getragen wirken lässt statt geschnitten.

   Als eigene Animation und nicht als Transition, damit sie bei jedem
   Wechsel neu anläuft; goTo() erzwingt dafür einen Reflow. */
.hero-slide.active .hero-content > * {
  animation: heroLineIn 0.62s cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
.hero-slide.active .hero-badge    { animation-delay: 0.34s; }
.hero-slide.active .hero-content h2 { animation-delay: 0.40s; }
.hero-slide.active .hero-facts    { animation-delay: 0.46s; }
.hero-slide.active .hero-overview { animation-delay: 0.52s; }
.hero-slide.active .hero-actions  { animation-delay: 0.58s; }

@keyframes heroLineIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.hero-badge {
  display: inline-flex; align-items: center;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.11em; text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-content h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  letter-spacing: -0.035em; line-height: 1.03;
  margin-bottom: 13px;
  text-shadow: 0 4px 26px rgba(0,0,0,0.6);
}
.hero-facts {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  color: var(--muted); font-size: 0.88rem;
  margin-bottom: 13px;
}
.hero-facts .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.hero-facts .rating {
  padding: 2px 7px;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  font-size: 0.76rem;
}
.hero-overview {
  color: rgba(242, 246, 251, 0.82);
  font-size: 0.97rem; line-height: 1.58;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 24px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero-actions { display: flex; gap: 11px; }

/* --- Slider-Steuerung --- */
.hero-dots {
  position: absolute; z-index: 3;
  right: 44px; bottom: 62px;
  display: flex; gap: 8px;
}
.hero-dot {
  width: 30px; height: 3.5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.28);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  position: relative; overflow: hidden;
}
.hero-dot:hover { background: rgba(255,255,255,0.5); transform: scaleY(1.5); }
.hero-dot.active { background: rgba(255,255,255,0.34); }
.hero-dot.active::after {
  content: ''; position: absolute; inset: 0;
  background: var(--text);
  transform-origin: left;
  animation: dotFill var(--slide-duration, 8s) linear forwards;
}
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-slider.paused .hero-dot.active::after { animation-play-state: paused; }

.hero-arrow {
  position: absolute; z-index: 3; top: 50%;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(10,14,20,0.55);
  backdrop-filter: blur(8px);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.22s var(--ease), background 0.16s var(--ease);
}
.hero-arrow svg { width: 24px; height: 24px; }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
.hero-slider:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(10,14,20,0.85); }

.play-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 26px;
  border-radius: 10px;
  background: var(--text);
  color: var(--on-bright);
  font-size: 0.95rem; font-weight: 700;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease);
}
.play-btn svg { width: 21px; height: 21px; }
.play-btn:hover { transform: scale(1.03); background: #fff; }

.outline-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.09);
  font-size: 0.95rem; font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.16s var(--ease);
}
.outline-btn:hover { background: rgba(255,255,255,0.16); }

/* ============================ ROWS ============================ */
.row { margin-bottom: 34px; }
.row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 13px;
}
.row-head h3 { font-size: 1.22rem; letter-spacing: -0.015em; }
.row-count { color: var(--muted-2); font-size: 0.82rem; }

/* Reichlich vertikale Polsterung: overflow-x kappt sonst die vergrößerte Karte */
/* Waagerecht scrollbar, aber ohne sichtbare Leiste — geblättert wird
   mit den Pfeilen links und rechts. Die Polsterung gibt der beim
   Hovern vergrößerten Karte Luft, ohne das Layout zu verschieben. */
/* overflow:hidden statt auto — geblättert wird nur über die Pfeile.
   scrollBy() aus dem Skript funktioniert weiterhin; Mausrad und Wischen
   greifen nicht mehr in die Reihe ein und scrollen die Seite. */
/* Zwei Bedingungen, die sich zunächst widersprechen:

   1. Der Kasten muss scrollbar bleiben — die Blätterpfeile rufen
      scrollBy() auf, und ein per `overflow: clip` gekappter Kasten
      scrollt nicht mehr (das kostete beim ersten Versuch vier Tests).
   2. Das aufgeklappte Panel unter der Kachel darf nicht abgeschnitten
      werden.

   Beides geht, weil `overflow: hidden` am *Polsterrand* kappt, nicht
   am Inhaltsrand: Was in der unteren Polsterung liegt, bleibt sichtbar.
   Also unten so viel Polsterung, dass das Panel hineinpasst
   (190px + Innenabstand), und derselbe Betrag als negativer Rand
   zurück — damit steht die Reihe im Layout genau wie vorher. */
.row-scroll {
  display: flex; gap: 14px;
  overflow: hidden;
  padding: 22px 44px 220px;
  margin: -22px -44px -212px;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* alte Edge */
}
.row-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.row-scroll > * { flex: 0 0 auto; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 22px 16px;
  padding-bottom: 14px;
}
.grid.posters { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.grid.squares { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }

/* ============ LIVE TV: KANÄLE ============
   Eine Zeile pro Sender statt einer Bildkachel: Ein Senderlogo ist
   ein freistehendes Bild mit Rand, kein formatfüllendes Plakat. In
   einer 16:9-Kachel würde es beschnitten oder verzerrt. */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  padding-bottom: 14px;
}
.channel-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease),
              transform 0.16s var(--ease);
}
.channel-card:hover {
  background: var(--surface-2, rgba(255,255,255,0.05));
  border-color: var(--accent);
  transform: translateY(-2px);
}
.reduce-motion .channel-card:hover { transform: none; }

.channel-logo {
  width: 56px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
/* contain, nicht cover: das ganze Logo soll zu sehen sein */
.channel-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.channel-initial { font-size: 1.1rem; font-weight: 700; color: var(--muted-2); }

.channel-body { flex: 1; min-width: 0; }
.channel-body strong {
  display: block; font-size: 0.9rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.channel-body small {
  display: block; margin-top: 2px;
  color: var(--muted-2); font-size: 0.78rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.channel-quiet { opacity: 0.7; font-style: italic; }

/* Die Nummer ist eine Zeichenkette („10.1" bei DVB) und steht vor
   dem Namen, wie auf der Fernbedienung. */
.channel-number {
  display: inline-block; min-width: 2.1em; margin-right: 7px;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

.channel-bar {
  display: block; margin-top: 7px; height: 3px;
  border-radius: 2px; background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.channel-bar i {
  display: block; height: 100%;
  background: var(--accent); border-radius: 2px;
}

/* Prime-Video-Kachel: 16:9-Bild, das beim Hovern aufklappt */
.card {
  position: relative;
  width: 252px;
  cursor: pointer;
}
.grid .card { width: 100%; }
.card.poster { width: 168px; }
.card.square { width: 178px; }

.card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(140deg, var(--surface-2), var(--surface));
  transition: box-shadow 0.2s var(--ease);
}
.card.poster .card-art { aspect-ratio: 2 / 3; border-radius: 7px; }
.card.square .card-art { aspect-ratio: 1 / 1; border-radius: 7px; }

.card-art img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* Notnagel: ein Hochkant-Poster in der 16:9-Kachel. Oben ausrichten,
   damit Titel und Gesichter sichtbar bleiben statt mittig zu beschneiden. */
.card-art img.from-poster { object-position: 50% 22%; }

.card-art .fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--muted-2);
}
.card-art .fallback svg { width: 34px; height: 34px; }

/* Ecken-Badge oben rechts: "NEUE FOLGE", "NEU HINZUGEFÜGT", ... */
.card-badge {
  position: absolute; top: 0; right: 0;
  padding: 4px 9px;
  background: rgba(255,255,255,0.94);
  color: var(--on-bright);
  font-size: 0.63rem; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom-left-radius: 5px;
  z-index: 2;
  max-width: 80%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Die Hover-Karte hebt sich aus dem Raster heraus */
.card-inner {
  position: relative;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  transform-origin: center center;
}
/* Sanfter als früher (war 1.13): die Kachel wuchs so weit, dass sie
   Nachbarreihen verdeckte und die Blätterpfeile unerreichbar machte.
   Die Verzögerung sorgt dafür, dass ein Mauszeiger, der die Reihe nur
   überquert, nicht jede Kachel unterwegs aufklappt. */
.card:hover .card-inner {
  transform: scale(1.06);
  box-shadow: 0 16px 34px rgba(0,0,0,0.6);
  z-index: 5;
  transition-delay: 0.28s;
}
.card:hover { z-index: 10; }

/* Beim Verlassen sofort zurück — nur das Aufklappen wartet */
.card .card-inner { transition-delay: 0s; }

.card-hover {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.1));
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.card:hover .card-hover { opacity: 1; }
.card-hover .play-circle {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  transform: scale(0.82);
  transition: transform 0.2s var(--ease);
}
.card:hover .card-hover .play-circle { transform: scale(1); }
.card-hover .play-circle svg { width: 22px; height: 22px; fill: #0a0e14; margin-left: 2px; }

/* Details klappen erst beim Hovern auf — wie bei Prime.

   Absolut positioniert, nicht im normalen Fluss: Ein wachsender Block
   innerhalb der Reihe schob früher alles darunter nach unten, sobald
   die Maus eine Kachel berührte. So legt sich der Block über den
   Inhalt darunter, und das Layout bleibt ruhig. */
.card-body {
  position: absolute;
  top: 100%; left: 0; right: 0;
  z-index: 6;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 11px;
  border-radius: 0 0 6px 6px;
  background: var(--surface);
  transition: max-height 0.22s var(--ease), opacity 0.18s var(--ease), padding 0.22s var(--ease);
}
.card:hover .card-body {
  max-height: 190px;
  opacity: 1;
  padding: 10px 11px 12px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.6);
  transition-delay: 0.28s;
}

.card-actions {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 8px;
}

/* Hochkant-Kacheln sind schmal: 168px fassen bei 30px Knopf und 7px
   Abstand genau vier, gezeigt werden aber fuenf bis sieben (Abspielen,
   Merken, Liste, Gesehen, optional Laden und Wegblenden, Info). Der
   Rest lief frueher stumm ueber den Rand hinaus — zuerst traf es
   "Info", weil der Knopf zuletzt steht. Sie duerfen deshalb umbrechen
   statt abgeschnitten zu werden. Nur hier: quer ist genug Platz, dort
   bliebe die Reihe wie sie ist. */
.card.poster .card-actions,
.card.square .card-actions {
  flex-wrap: wrap;
  row-gap: 6px;
}
/* Die zweite Reihe braucht Luft, sonst klebt der Titel darunter */
.card.poster:hover .card-body,
.card.square:hover .card-body { max-height: 232px; }

.card-play {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: var(--on-bright);
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}
.card-play svg { width: 16px; height: 16px; margin-left: 1px; }
.card-play:hover { transform: scale(1.1); }

.card-icon-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--text);
  flex-shrink: 0;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.card-icon-btn svg { width: 15px; height: 15px; }
.card-icon-btn:hover { border-color: #fff; background: rgba(255,255,255,0.14); }
.card-icon-btn.on { border-color: var(--accent); color: var(--accent); }

.card-title {
  font-size: 0.86rem; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-facts {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 5px;
  font-size: 0.74rem; color: var(--muted-2);
}
.card-facts .chip {
  padding: 1px 5px;
  border: 1px solid var(--border-2);
  border-radius: 3px;
  font-size: 0.68rem;
}
.card-sub {
  margin-top: 5px;
  font-size: 0.76rem; color: var(--muted);
  line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Titel unter der Kachel, solange nicht gehovert wird */
.card-label {
  padding: 8px 2px 0;
  font-size: 0.84rem; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  transition: opacity 0.16s var(--ease);
}
.card:hover .card-label { opacity: 0; }

.progress-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3.5px;
  background: rgba(0,0,0,0.55);
}
.progress-bar > div { height: 100%; background: var(--accent); }

.section-title {
  font-size: 1.5rem; letter-spacing: -0.02em;
  margin: 6px 0 16px;
}

.empty-state {
  padding: 54px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.94rem;
}

.loader { display: grid; place-items: center; padding: 70px; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ========================= SERIES DETAIL ========================= */
.detail-hero { position: relative; margin: 0 -44px 22px; padding: 0; }
.detail-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
}
/* Wie beim Hero-Slider: Zwischenstufen statt einer geraden Rampe,
   und die Farbe aus --bg-rgb, damit jedes Theme in seinen eigenen
   Grundton ausblendet. */
.detail-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg,
    rgb(var(--bg-rgb)) 0%,
    rgba(var(--bg-rgb),0.97) 7%,
    rgba(var(--bg-rgb),0.90) 15%,
    rgba(var(--bg-rgb),0.80) 26%,
    rgba(var(--bg-rgb),0.68) 40%,
    rgba(var(--bg-rgb),0.58) 60%,
    rgba(var(--bg-rgb),0.50) 100%);
}
.detail-inner {
  position: relative; z-index: 1;
  display: flex; gap: 28px;
  padding: 104px 44px 30px;
}
.detail-poster {
  width: 194px; flex-shrink: 0;
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  background: var(--surface-2);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Serienname ueber dem Folgentitel: fuehrt zurueck zur Serie, damit
   die Folgenseite keine Sackgasse ist. */
.detail-parent {
  display: block;
  margin-bottom: 4px;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem; font-weight: 600;
  text-align: left;
  transition: color 0.15s var(--ease);
}
.detail-parent:hover { color: var(--text); text-decoration: underline; }

.detail-info { flex: 1; min-width: 0; padding-top: 6px; }
.detail-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 10px;
}

/* ========================= INFO-SEITE ========================= */
.detail-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 11px;
  margin: 20px 0 18px;
}

.detail-tags {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 16px;
}
.genre-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 0.8rem;
  transition: all 0.15s var(--ease);
}
.genre-chip:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.detail-overview {
  color: rgba(242,246,251,0.86);
  font-size: 0.98rem; line-height: 1.62;
  max-width: 780px;
  margin-bottom: 18px;
}

.detail-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 26px;
  max-width: 860px;
}
.fact-row { font-size: 0.88rem; line-height: 1.5; }
.fact-row dt {
  color: var(--muted-2);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 3px;
}
.fact-row dd { margin: 0; color: var(--text); }

/* --- Reiter der Infoseite --- */
.detail-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 8px 0 22px;
}
.detail-tab {
  position: relative;
  padding: 13px 18px;
  color: var(--muted);
  font-size: 0.95rem; font-weight: 600;
  transition: color 0.15s var(--ease);
}
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--text); }
.detail-tab.active::after {
  content: ''; position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2.5px; border-radius: 2px;
  background: var(--accent);
}

.tab-panel { animation: fade 0.22s var(--ease); padding-bottom: 24px; }

/* --- Besetzung --- */
.cast-row {
  display: flex; gap: 16px;
  overflow-x: auto;
  padding: 4px 44px 16px;
  margin: 0 -44px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cast-row::-webkit-scrollbar { width: 0; height: 0; display: none; }
.cast-card {
  flex: 0 0 auto;
  width: 116px;
  text-align: center;
}
.cast-photo {
  width: 116px; height: 116px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  margin-bottom: 9px;
  display: block;
}
.cast-photo.placeholder {
  display: grid; place-items: center;
  color: var(--muted-2);
  font-size: 1.7rem; font-weight: 700;
}
.cast-name {
  font-size: 0.84rem; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cast-role {
  margin-top: 2px;
  font-size: 0.76rem; color: var(--muted-2); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* --- Technische Details --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1000px;
}
.tech-block {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.tech-block h4 {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.tech-block h4 svg { width: 16px; height: 16px; }
.tech-line {
  display: flex; align-items: baseline; gap: 9px;
  padding: 6px 0;
  font-size: 0.86rem;
  border-top: 1px solid var(--border);
}
.tech-line:first-of-type { border-top: none; }
.tech-line .k { color: var(--muted-2); min-width: 74px; flex-shrink: 0; }
.tech-line .v { color: var(--text); word-break: break-word; }
.tech-badge {
  display: inline-block;
  padding: 2px 7px;
  margin: 2px 4px 2px 0;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-2);
  font-size: 0.76rem;
}

/* -------- Staffelauswahl: Dropdown wie bei Prime Video -------- */
.season-bar {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.season-bar h3 { font-size: 1.3rem; letter-spacing: -0.02em; }

.season-select { position: relative; }

.season-trigger {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.9rem; font-weight: 600;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.season-trigger:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.24); }
.season-trigger svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.season-trigger.open svg { transform: rotate(180deg); }

.season-menu {
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 40;
  min-width: 230px;
  max-height: 340px; overflow-y: auto;
  padding: 6px;
  border-radius: 11px;
  background: rgba(20, 27, 37, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: menuIn 0.16s var(--ease);
}
.season-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.season-option:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.season-option.active { color: var(--accent); font-weight: 700; }
.season-option small { color: var(--muted-2); font-size: 0.76rem; flex-shrink: 0; }

.episode-list { display: grid; padding-bottom: 20px; }

/* Prime-Stil: durchgehende Liste mit Trennlinien statt Karten */
.episode {
  display: flex; gap: 18px;
  padding: 18px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.16s var(--ease);
}
.episode:hover { background: rgba(255,255,255,0.035); }
.episode:last-child { border-bottom: none; }

/* Die Folge, deren Seite gerade offen ist: sonst sucht man in der
   Staffelliste, wo man selbst steht. */
.episode.current {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ep-index {
  width: 22px; flex-shrink: 0;
  padding-top: 2px;
  color: var(--muted-2);
  font-size: 1rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ep-thumb {
  position: relative;
  width: 210px; flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-3);
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-thumb .card-hover { border-radius: 7px; }
.ep-thumb .play-circle { width: 40px; height: 40px; }
.ep-thumb .play-circle svg { width: 20px; height: 20px; }

.ep-body { flex: 1; min-width: 0; padding-top: 1px; }
.ep-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 6px;
}
.ep-title {
  font-size: 1rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ep-runtime { color: var(--muted-2); font-size: 0.82rem; flex-shrink: 0; }
.ep-overview {
  color: var(--muted); font-size: 0.87rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-meta {
  display: flex; align-items: center; gap: 9px;
  margin-top: 8px;
  color: var(--muted-2); font-size: 0.78rem;
}
.ep-watched {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent);
}
.ep-watched svg { width: 14px; height: 14px; }

.ep-resume {
  width: 132px; height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
}
.ep-resume > div { height: 100%; background: var(--accent); }

/* ========================= VIDEO PLAYER ========================= */
/* Über der Titelleiste (z-index 300), damit Video wirklich alles überdeckt */
.video-player {
  position: fixed; inset: 0; z-index: 400;
  background: #000;
  animation: fade 0.24s var(--ease);
}
.video-player video {
  width: 100%; height: 100%;
  display: block;
  background: #000;
}

.video-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}

.video-ui {
  position: absolute; inset: 0;
  opacity: 1;
  transition: opacity 0.3s var(--ease);
}
.video-ui.idle { opacity: 0; }
.video-player.cursor-hidden { cursor: none; }

.vp-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 13px;
  padding: 18px 22px 50px;
  background: linear-gradient(180deg, rgba(0,0,0,0.82), transparent);
}
.vp-titles { min-width: 0; }
.vp-titles strong {
  display: block; font-size: 1.06rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vp-titles span { color: var(--muted); font-size: 0.85rem; }

.vp-center-play {
  position: absolute; inset: 0; margin: auto;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: all 0.22s var(--ease);
}
.vp-center-play svg { width: 40px; height: 40px; margin-left: 4px; }
.vp-center-play.show { opacity: 1; transform: scale(1); pointer-events: auto; }

.vp-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px 22px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
}

.vp-scrub {
  position: relative;
  padding: 9px 0;
  cursor: pointer;
}

/* ============ LIVE: was es nicht gibt, wird nicht angeboten ============
   Ein Kanal hat keine Dauer und keine Stelle, an die man springen
   koennte. Eine Leiste, die sich nicht bewegen laesst, und Knoepfe,
   die nichts tun, sind schlechter als keine. */
.is-live .vp-scrub { cursor: default; pointer-events: none; }
.is-live .vp-track { opacity: 0.5; }
.is-live .vp-knob,
.is-live .vp-buffered,
.is-live .vp-hover-time,
.is-live #vp-chapter-marks { display: none; }
.is-live #vp-back10,
.is-live #vp-fwd10,
.is-live #vp-chapters { display: none; }

/* Die verstrichene Zeit heisst hier „Live" — in der Akzentfarbe,
   damit klar ist, dass es keine Position ist. */
.is-live #vp-current {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.vp-track {
  position: relative;
  height: 4px;
  border-radius: 3px;
  background: rgba(255,255,255,0.26);
  transition: height 0.14s var(--ease);
}
.vp-scrub:hover .vp-track { height: 6px; }
.vp-buffered {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  width: 0;
}
.vp-progress {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 3px;
  width: 0;
}
.vp-knob {
  position: absolute; right: -7px; top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%) scale(0);
  transition: transform 0.14s var(--ease);
  box-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.vp-scrub:hover .vp-knob { transform: translateY(-50%) scale(1); }

.vp-hover-time {
  position: absolute; bottom: 26px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.88);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s var(--ease);
}
.vp-scrub:hover .vp-hover-time { opacity: 1; }

.vp-controls {
  display: flex; align-items: center; gap: 5px;
  margin-top: 3px;
}
.vp-spacer { flex: 1; }

.skip-num {
  position: absolute;
  font-size: 0.52rem; font-weight: 800;
  top: 50%; left: 50%;
  transform: translate(-50%, -32%);
  pointer-events: none;
}

.vp-volume { display: flex; align-items: center; gap: 3px; }
.vp-volume input, .mf-volume input {
  width: 0; opacity: 0;
  transition: width 0.2s var(--ease), opacity 0.2s var(--ease);
}
.vp-volume:hover input { width: 82px; opacity: 1; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 4px;
  border-radius: 3px;
  background: rgba(255,255,255,0.28);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

.vp-time {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-left: 8px;
  white-space: nowrap;
}

.vp-menu-wrap { position: relative; }
.vp-menu {
  position: absolute; bottom: calc(100% + 9px); right: 0;
  min-width: 106px;
  padding: 6px;
  border-radius: 11px;
  background: rgba(18, 24, 33, 0.97);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
}
.vp-menu.wide { min-width: 236px; max-height: 320px; overflow-y: auto; }
.vp-menu .menu-head {
  padding: 7px 13px 8px;
  color: var(--muted-2);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.vp-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 8px 13px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.86rem; text-align: left;
  transition: all 0.14s var(--ease);
}
.vp-menu button:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.vp-menu button.active { color: var(--accent); font-weight: 700; }
.vp-menu .check {
  width: 15px; height: 15px;
  flex-shrink: 0;
  opacity: 0;
}
.vp-menu button.active .check { opacity: 1; }
.vp-menu .label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vp-menu .tag {
  font-size: 0.68rem;
  color: var(--muted-2);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
}

/* Untertitel-Darstellung im Video */
video::cue {
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  font-size: 1.02em;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* ========================== MINI PLAYER ========================== */
.mini-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: flex; align-items: center; gap: 16px;
  height: 78px;
  padding: 0 18px;
  background: rgba(16, 22, 31, 0.93);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border-2);
  animation: slideUp 0.3s var(--ease);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

.mini-progress {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2.5px;
  background: rgba(255,255,255,0.1);
}
.mini-progress > div { height: 100%; width: 0; background: var(--accent); }

.mini-left {
  display: flex; align-items: center; gap: 13px;
  min-width: 0; flex: 1;
  cursor: pointer;
  padding: 6px; margin: -6px;
  border-radius: 10px;
  transition: background 0.15s var(--ease);
}
.mini-left:hover { background: rgba(255,255,255,0.055); }
.mini-left img {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.mini-meta { min-width: 0; }
.mini-meta strong {
  display: block; font-size: 0.92rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-meta small {
  display: block; color: var(--muted-2); font-size: 0.81rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.mini-controls { display: flex; align-items: center; gap: 4px; }
.icon-btn.play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--on-bright);
}
.icon-btn.play:hover { background: #fff; transform: scale(1.05); }
.icon-btn.play svg { width: 21px; height: 21px; }

.mini-right { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: flex-end; }
.mini-time {
  font-size: 0.82rem; color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* ===================== MUSIC FULLSCREEN + LYRICS ===================== */
.music-full {
  position: fixed; inset: var(--tb-height) 0 0; z-index: 150;
  overflow: hidden;
  animation: slideUp 0.34s var(--ease);
}
.mf-backdrop {
  position: absolute; inset: -25%;
  background-size: cover; background-position: center;
  filter: blur(72px) saturate(1.7) brightness(0.5);
  transform: scale(1.15);
  transition: background-image 0.5s var(--ease);
}
.music-full::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(10,14,20,0.72), rgba(10,14,20,0.9));
}

.mf-collapse { position: absolute; top: 20px; left: 22px; z-index: 3; }

.mf-body {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) 1fr;
  gap: 52px;
  height: 100%;
  padding: 74px 58px 48px;
  align-items: center;
}

.mf-left { display: flex; flex-direction: column; align-items: center; max-width: 420px; }

.mf-art-wrap {
  width: 100%; max-width: 340px;
  aspect-ratio: 1/1;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,0.62);
  background: var(--surface-2);
  transition: transform 0.35s var(--ease);
}
.music-full.playing .mf-art-wrap { transform: scale(1); }
.music-full.paused .mf-art-wrap { transform: scale(0.9); }
.mf-art-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mf-meta { text-align: center; margin: 26px 0 20px; width: 100%; }
.mf-meta h2 {
  font-size: 1.5rem; letter-spacing: -0.02em;
  margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mf-meta p { color: var(--muted); font-size: 1rem; }

.mf-scrub { width: 100%; cursor: pointer; padding: 5px 0; }
.mf-track {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.2);
}
.mf-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 3px;
  background: var(--text);
}
.mf-knob {
  position: absolute; right: -6px; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text);
  transform: translateY(-50%) scale(0);
  transition: transform 0.15s var(--ease);
}
.mf-scrub:hover .mf-knob { transform: translateY(-50%) scale(1); }
.mf-times {
  display: flex; justify-content: space-between;
  margin-top: 7px;
  font-size: 0.78rem; color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.mf-controls {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  margin: 18px 0 14px;
}
.icon-btn.big {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--text);
  color: var(--on-bright);
}
.icon-btn.big:hover { background: #fff; transform: scale(1.05); }
.icon-btn.big svg { width: 28px; height: 28px; }
.icon-btn.small { width: 36px; height: 36px; color: var(--muted); }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn.small.active { color: var(--accent); }

.mf-volume { display: flex; align-items: center; gap: 9px; width: 100%; max-width: 200px; }
.mf-volume svg { width: 17px; height: 17px; color: var(--muted-2); flex-shrink: 0; }
.mf-volume input { flex: 1; width: auto; opacity: 1; }

.mf-right {
  display: flex; flex-direction: column;
  height: 100%;
  min-height: 0;
  padding-top: 8px;
}

.mf-tabs { display: flex; gap: 7px; margin-bottom: 14px; flex-shrink: 0; }
.mf-tab {
  padding: 8px 17px;
  border-radius: 9px;
  color: var(--muted-2);
  font-size: 0.88rem; font-weight: 600;
  transition: all 0.15s var(--ease);
}
.mf-tab:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.mf-tab.active { background: rgba(255,255,255,0.12); color: var(--text); }

.mf-lyrics, .mf-queue {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 12px;
  scrollbar-width: thin;
}
.mf-lyrics {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 11%, #000 84%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 11%, #000 84%, transparent);
  padding: 40px 12px 40px 0;
}

.lyric-line {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.34;
  color: rgba(255,255,255,0.32);
  padding: 9px 0;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease), filter 0.3s var(--ease);
  transform-origin: left center;
  filter: blur(0.7px);
}
.lyric-line.synced { cursor: pointer; }
.lyric-line.synced:hover { color: rgba(255,255,255,0.6); }
.lyric-line.active {
  color: #fff;
  transform: scale(1.045);
  filter: blur(0);
  text-shadow: 0 2px 26px rgba(255,255,255,0.24);
}
.lyric-line.passed { color: rgba(255,255,255,0.2); }

.lyrics-plain .lyric-line {
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--muted);
  filter: none;
  padding: 5px 0;
  line-height: 1.62;
}

.lyrics-empty {
  display: grid; place-items: center;
  height: 100%;
  color: var(--muted-2);
  text-align: center;
  gap: 12px;
}
.lyrics-empty svg { width: 44px; height: 44px; opacity: 0.4; }

.queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.14s var(--ease);
}
.queue-item:hover { background: rgba(255,255,255,0.07); }
.queue-item.active { background: rgba(255,255,255,0.11); }
.queue-item.active .queue-title { color: var(--accent); }
.queue-num {
  width: 22px; flex-shrink: 0;
  color: var(--muted-2); font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.queue-art {
  width: 42px; height: 42px;
  border-radius: 7px; object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.queue-body { flex: 1; min-width: 0; }
.queue-title {
  font-size: 0.9rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.queue-artist {
  font-size: 0.79rem; color: var(--muted-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.queue-dur { color: var(--muted-2); font-size: 0.79rem; font-variant-numeric: tabular-nums; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1080px) {
  .mf-body { grid-template-columns: 1fr; gap: 26px; padding: 66px 30px 32px; overflow-y: auto; }
  .mf-left { max-width: none; }
  .mf-art-wrap { max-width: 230px; }
  .mf-right { height: auto; min-height: 320px; }
  .lyric-line { font-size: 1.3rem; }
}

@media (max-width: 1000px) {
  .navbar { padding: 0 18px; gap: 12px; }
  .nav-left { gap: 14px; }
  .nav-brand span { display: none; }
  .nav-btn { padding: 8px 9px; font-size: 0.87rem; }
  .search-box { width: 150px; }
  .search-box:focus-within { width: 210px; }

  .view-root { padding: 0 22px; }
  .view-root.with-top-gap { padding-top: 80px; }
  .row-scroll { padding: 4px 22px 14px; margin: 0 -22px; }
  .hero-slider { margin: 0 -22px 14px; height: min(440px, 62vh); }
  .hero-content { padding: 0 22px 52px; }
  .hero-dots { right: 22px; bottom: 52px; }
  .hero-arrow { display: none; }

  .detail-hero { margin: 0 -22px 22px; }
  .detail-inner { flex-direction: column; padding: 92px 22px 26px; }
  .detail-poster { width: 148px; }
  .ep-thumb { width: 128px; }
}

/* ============================== MODALS ============================== */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  padding: 28px;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade 0.18s var(--ease);
}

.modal-card {
  width: min(720px, 100%);
  max-height: 86vh;
  display: flex; flex-direction: column;
  border-radius: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: rise 0.22s var(--ease);
  overflow: hidden;
}
.modal-card.small { width: min(440px, 100%); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head h2 { font-size: 1.28rem; letter-spacing: -0.02em; }

.modal-body {
  padding: 22px;
  overflow-y: auto;
  display: grid;
  gap: 15px;
}

.settings-section { padding-bottom: 6px; }
.settings-section + .settings-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.settings-section h3 { font-size: 1rem; margin-bottom: 4px; }
.settings-hint { color: var(--muted-2); font-size: 0.83rem; margin-bottom: 13px; }

/* --- Theme-Auswahl --- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 11px;
}
.theme-card {
  padding: 0;
  border-radius: 11px;
  border: 2px solid var(--border);
  overflow: hidden;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
  text-align: left;
}
.theme-card:hover { transform: translateY(-2px); border-color: var(--border-2); }
.theme-card.active { border-color: var(--accent); }
.theme-preview {
  height: 52px;
  display: flex; align-items: flex-end; gap: 4px;
  padding: 7px;
}
.theme-preview i {
  display: block;
  border-radius: 3px;
  flex: 1;
}
.theme-preview i:nth-child(1) { height: 60%; }
.theme-preview i:nth-child(2) { height: 85%; }
.theme-preview i:nth-child(3) { height: 40%; }
.theme-name {
  display: block;
  padding: 8px 10px 9px;
  font-size: 0.82rem; font-weight: 600;
  background: var(--surface);
}

/* --- Akzentfarbe --- */
.accent-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.accent-swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.accent-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--border-2) inset;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
}
.accent-dot:hover { transform: scale(1.12); }
.accent-dot.active { border-color: var(--text); transform: scale(1.12); }

.accent-custom {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.84rem; color: var(--muted);
  cursor: pointer;
}
.accent-custom input[type="color"] {
  width: 32px; height: 32px;
  padding: 0; border: none; border-radius: 50%;
  background: none; cursor: pointer;
}
.accent-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.accent-custom input[type="color"]::-webkit-color-swatch {
  border: 2px solid var(--border-2); border-radius: 50%;
}

/* --- Schalter --- */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 0;
  cursor: pointer;
}
.setting-row + .setting-row { border-top: 1px solid var(--border); }
.setting-row strong { display: block; font-size: 0.91rem; font-weight: 600; }
.setting-row small { display: block; color: var(--muted-2); font-size: 0.79rem; margin-top: 2px; }

/* Eine Zeile, die von einem uebergeordneten Schalter abhaengt.
   Sichtbar bleiben, aber erkennbar wirkungslos — ein Schalter, der
   nichts tut, verwirrt sonst mehr, als er nuetzt. */
.setting-row.disabled { opacity: 0.45; cursor: default; }
.setting-row.disabled .switch { pointer-events: none; }

/* Ein Feld mit Beschriftung und Erklaerung untereinander — anders als
   .setting-row, wo Text und Schalter nebeneinander stehen. */
.setting-stack {
  display: flex; flex-direction: column; gap: 6px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.setting-stack > label { font-size: 0.91rem; font-weight: 600; }
.setting-stack .settings-hint { margin: 0; }
.setting-stack .field-input { margin-top: 2px; }
.setting-stack.disabled { opacity: 0.45; }
.setting-stack.disabled input,
.setting-stack.disabled .settings-link { pointer-events: none; }

.settings-link {
  align-self: flex-start;
  font-size: 0.79rem; color: var(--accent);
  text-decoration: none;
}
.settings-link:hover { text-decoration: underline; }

.switch {
  appearance: none; -webkit-appearance: none;
  position: relative;
  width: 42px; height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s var(--ease);
}
.switch::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.18s var(--ease);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); background: var(--on-accent); }

/* --- Serverliste --- */
.server-list { display: grid; gap: 2px; }
.server-entry {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.87rem;
  text-align: left;
  transition: background 0.14s var(--ease);
}
.server-entry:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.server-entry.active { color: var(--accent); }
.server-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted-2); flex-shrink: 0;
}
.server-entry.active .server-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.server-meta { flex: 1; min-width: 0; }
.server-meta strong {
  display: block; font-size: 0.87rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.server-meta small {
  display: block; color: var(--muted-2); font-size: 0.75rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Kachelform je Bibliothek: eingerückt unter der allgemeinen Wahl,
   damit sichtbar ist, dass sie diese nur verfeinert. */
.shape-libraries {
  margin: 2px 0 4px 14px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.shape-libraries .settings-hint { margin: 10px 0 2px; }
.shape-libraries .setting-row { padding: 9px 0; border-bottom: none; }
.shape-libraries .setting-row strong { font-weight: 500; }

/* Rueckmeldung der beiden Abgleich-Knoepfe. Steht nichts an, nimmt
   sie keinen Platz ein. */
.sync-status {
  font-size: 0.79rem;
  color: var(--muted-2);
  line-height: 1.45;
}
.sync-status:empty { display: none; }
.sync-status.ok { color: var(--accent); }
.sync-status.bad { color: var(--danger); }

/* Plugin-Liste: Name und Fassung links, was Jellystream davon nutzt
   rechts. */
.settings-plugins { display: grid; gap: 8px; }
.plugin-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.plugin-meta { flex: 1; min-width: 0; }
.plugin-meta strong {
  display: block; font-size: 0.86rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plugin-meta small { display: block; color: var(--muted-2); font-size: 0.75rem; }
.plugin-use {
  flex-shrink: 0;
  font-size: 0.74rem;
  color: var(--muted-2);
}
.plugin-use.used { color: var(--accent); font-weight: 600; }

.settings-servers { display: grid; gap: 9px; }
.settings-server-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.settings-server-row .remove-server {
  color: var(--muted-2);
  padding: 6px;
  border-radius: 7px;
  flex-shrink: 0;
}
.settings-server-row .remove-server:hover { color: var(--danger); background: rgba(255,107,107,0.12); }
.settings-server-row .remove-server svg { width: 17px; height: 17px; }

/* Umbenennen: der Stift sitzt neben dem Kreuz und verhaelt sich
   genauso — nur ohne die Warnfarbe, denn er zerstoert nichts. */
.settings-server-row .rename-server {
  color: var(--muted-2);
  padding: 6px;
  border-radius: 7px;
  flex-shrink: 0;
}
.settings-server-row .rename-server:hover { color: var(--accent); background: rgba(255,255,255,0.07); }
.settings-server-row .rename-server svg { width: 16px; height: 16px; }

/* Das Feld nimmt den Platz ein, den sonst Name und Adresse belegen —
   deshalb dieselbe flex-Aufteilung wie .server-meta. */
.settings-server-row .server-rename { flex: 1; min-width: 0; }
.settings-server-row .server-rename input {
  width: 100%;
  padding: 7px 0;
  font-size: 0.87rem;
  font-weight: 600;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 13px;
}
.about-grid dt {
  color: var(--muted-2);
  font-size: 0.71rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 3px;
}
.about-grid dd { margin: 0; font-size: 0.88rem; word-break: break-word; }

/* --- Playlist-Dialog --- */
.playlist-picker { display: grid; gap: 3px; max-height: 300px; overflow-y: auto; }
.playlist-option {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.89rem;
  text-align: left;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.playlist-option:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.playlist-option svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted-2); }
.playlist-option .count { margin-left: auto; color: var(--muted-2); font-size: 0.78rem; }

.new-playlist { margin-top: 6px; }
.new-playlist .field-input { padding-right: 4px; }

/* ============================== TOAST ============================== */
.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 600;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 11px;
  background: rgba(20, 27, 37, 0.97);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  font-size: 0.89rem;
  animation: toastIn 0.24s var(--ease);
  max-width: 76vw;
}
.toast.error { border-color: rgba(255,107,107,0.5); color: #ffb3b3; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Playlist-Knopf auf der Karte */
.card-icon-btn.list.on { border-color: var(--accent); color: var(--accent); }

/* ====================== A1: SICHTBARER FOKUS ====================== */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.card:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.card:focus-visible .card-inner { transform: scale(1.05); }
.nav-btn:focus-visible, .tb-btn:focus-visible { outline-offset: -2px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
  transition: top 0.16s var(--ease);
}
.skip-link:focus { top: calc(var(--tb-height) + 8px); }

/* ================== A3: BEWEGUNG REDUZIEREN ================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg { animation: none !important; transform: scale(1.02) !important; }
  .login-aurora { animation: none !important; }
  .hero-dot.active::after { animation: none !important; transform: scaleX(1) !important; }
  .card:hover .card-inner { transform: none; }
}

/* ====================== U4: SKELETONS ====================== */
@keyframes sk-pulse { 0%,100% { opacity: .55; } 50% { opacity: .28; } }

.sk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 22px 16px;
  padding-top: 88px;
}
.sk-grid.inline { padding-top: 0; }
.sk-card { animation: sk-pulse 1.5s ease-in-out infinite; }
.sk-card.poster { width: 100%; }
.sk-art {
  width: 100%; aspect-ratio: 16/9;
  border-radius: 6px;
  background: var(--surface-2);
}
.sk-card.poster .sk-art { aspect-ratio: 2/3; }
.sk-card.square .sk-art { aspect-ratio: 1/1; }
.sk-line {
  height: 11px; margin-top: 9px; width: 72%;
  border-radius: 4px; background: var(--surface-2);
}
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w90 { width: 90%; }

.sk-hero {
  height: min(560px, 68vh);
  margin: 0 -44px 22px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2));
  animation: sk-pulse 1.5s ease-in-out infinite;
}
.sk-row { margin-bottom: 34px; }
.sk-heading {
  width: 190px; height: 20px; border-radius: 5px;
  background: var(--surface-2); margin-bottom: 15px;
  animation: sk-pulse 1.5s ease-in-out infinite;
}
.sk-strip { display: flex; gap: 14px; overflow: hidden; }
.sk-strip .sk-card { flex: 0 0 252px; }

.sk-episode {
  display: flex; gap: 18px; padding: 18px 10px;
  border-bottom: 1px solid var(--border);
  animation: sk-pulse 1.5s ease-in-out infinite;
}
.sk-thumb {
  width: 210px; aspect-ratio: 16/9; flex-shrink: 0;
  border-radius: 7px; background: var(--surface-2);
}
.sk-ep-body { flex: 1; padding-top: 4px; }

/* ====================== F4: FEHLER MIT AUSWEG ====================== */
.error-state {
  display: grid; place-items: center; gap: 14px;
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.error-state.compact { padding: 34px 20px; }
.error-state svg { width: 40px; height: 40px; color: var(--muted-2); }
.error-msg { max-width: 46ch; font-size: 0.95rem; }

/* ==================== U1: FILTERLEISTE ==================== */
.catalog-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 14px;
}
.catalog-count {
  font-size: 0.83rem; color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-bottom: 18px;
  margin-bottom: 4px;
}

.drop { position: relative; }
.drop-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-size: 0.87rem; font-weight: 600;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.drop-trigger:hover { background: var(--surface-2); }
.drop-trigger svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.drop-trigger.open svg:last-child { transform: rotate(180deg); }

.drop-menu {
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 40;
  min-width: 220px; max-height: 340px; overflow-y: auto;
  padding: 6px;
  border-radius: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: menuIn 0.16s var(--ease);
}
.drop-option {
  display: block; width: 100%;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.87rem; text-align: left;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.drop-option:hover { background: rgba(127,127,127,0.14); color: var(--text); }
.drop-option.active { color: var(--accent); font-weight: 700; }

.seg {
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.seg-btn {
  padding: 7px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.85rem; font-weight: 600;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent); color: var(--on-accent); }

.load-more { display: grid; place-items: center; padding: 34px 0 10px; min-height: 60px; }
.spinner.small { width: 22px; height: 22px; border-width: 2.5px; }

/* ==================== U3: REIHEN-PFEILE ==================== */
/* Blätterpfeile im Prime-Stil: volle Höhe der Kachelreihe, am Rand
   angesetzt, mit Verlauf statt sichtbarem Kasten. */
.row-track {
  position: relative;
  margin: 0 -44px;
  padding: 0 44px;
}

/* z-index 20 hält die Pfeile über der aufgeklappten Kachel (z-index 10) —
   sonst schiebt sich eine gehoverte Karte davor und schluckt den Klick. */
.row-arrow {
  position: absolute; top: 0; z-index: 20;
  display: grid; place-items: center;
  width: 54px;
  /* Nur so hoch wie das Bild — der aufklappende Bereich bleibt frei */
  height: calc(100% - 30px);
  border: none;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.row-arrow svg {
  width: 30px; height: 30px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
  transition: transform 0.16s var(--ease);
}
.row-arrow.prev {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 24%, rgba(10,14,20,0.72) 62%, transparent);
}
.row-arrow.next {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 24%, rgba(10,14,20,0.72) 62%, transparent);
}

/* Erst beim Überfahren der Reihe einblenden */
.row-track:hover .row-arrow:not(.off) {
  opacity: 1;
  pointer-events: auto;
}
.row-arrow:hover svg { transform: scale(1.25); }
.row-arrow.off { opacity: 0; pointer-events: none; }

/* Für Tastaturbedienung immer erreichbar */
.row-arrow:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2.5px solid var(--accent);
  outline-offset: -4px;
}

[data-theme="light"] .row-arrow { color: #161c26; }
[data-theme="light"] .row-arrow.prev {
  background: linear-gradient(90deg, var(--bg) 24%, rgba(244,246,250,0.72) 62%, transparent);
}
[data-theme="light"] .row-arrow.next {
  background: linear-gradient(270deg, var(--bg) 24%, rgba(244,246,250,0.72) 62%, transparent);
}
[data-theme="light"] .row-arrow svg { filter: none; }

/* ============ U5/U6: KARTEN- UND FOLGEN-AKTIONEN ============ */
.card-icon-btn.seen.on { border-color: var(--accent); color: var(--accent); }
.card-icon-btn.dismiss:hover { border-color: var(--danger); color: var(--danger); }

.ep-seen {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.6px solid var(--border-2);
  color: var(--muted-2);
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.ep-seen svg { width: 15px; height: 15px; }
.ep-seen:hover { border-color: var(--text); color: var(--text); }
.ep-seen.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ============ X2: KAPITELMARKEN ============ */
.vp-chapter-marks { position: absolute; inset: 0; pointer-events: none; }
.chapter-mark {
  position: absolute; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.65);
  transform: translateX(-1px);
}

/* ============ U8: NAECHSTE FOLGE ============ */
.vp-nextup {
  position: absolute; right: 26px; bottom: 118px; z-index: 8;
  width: min(380px, 44vw);
  padding: 18px 20px;
  border-radius: 13px;
  background: rgba(14,19,26,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: rise 0.28s var(--ease);
}
.nextup-label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--accent);
}
.vp-nextup strong {
  display: block; margin: 7px 0 15px;
  font-size: 1.02rem; line-height: 1.35;
}
.nextup-actions { display: flex; gap: 9px; }
.nextup-actions .play-btn { padding: 10px 18px; font-size: 0.88rem; }
.nextup-actions .outline-btn { padding: 10px 16px; font-size: 0.88rem; }

/* ============ INTRO ÜBERSPRINGEN ============
   Gleiche Ecke wie „Als Nächstes", aber tiefer: Beide erscheinen nie
   gleichzeitig — das eine gilt am Anfang, das andere am Ende. */
.vp-skip {
  position: absolute; right: 26px; bottom: 108px; z-index: 8;
  display: flex; align-items: center; gap: 9px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text);
  background: rgba(14,19,26,0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: rise 0.28s var(--ease);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.vp-skip:hover {
  background: rgba(20,28,38,0.97);
  border-color: var(--accent);
}
.vp-skip svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Im Vollbild auf dem Handy naeher an den Rand: dort liegt die
   Bedienleiste hoeher, und der Daumen erreicht die Ecke schlechter. */
@media (max-width: 700px) {
  .vp-skip {
    right: 14px; bottom: 92px;
    padding: 11px 16px; font-size: 0.85rem;
  }
}

/* ============ U7: TASTENKUERZEL ============ */
.keys { display: grid; gap: 9px; margin: 0; }
.keys > div {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 0.88rem;
}
.keys dt { flex: 0 0 148px; display: flex; gap: 5px; flex-wrap: wrap; }
.keys dd { margin: 0; color: var(--muted); }
kbd {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text);
}

/* ============ X3: WARTESCHLANGE SORTIEREN ============ */
.queue-item { position: relative; }
.queue-grip {
  display: grid; place-items: center;
  width: 18px; flex-shrink: 0;
  color: var(--muted-2);
  cursor: grab;
  opacity: 0;
  transition: opacity 0.14s var(--ease);
}
.queue-grip svg { width: 15px; height: 15px; }
.queue-item:hover .queue-grip { opacity: 1; }
.queue-item.dragging { opacity: 0.4; }
.queue-item.drop-target { box-shadow: inset 0 2px 0 var(--accent); }

.queue-remove {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  color: var(--muted-2);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.14s var(--ease), color 0.14s var(--ease), background 0.14s var(--ease);
}
.queue-remove svg { width: 14px; height: 14px; }
.queue-item:hover .queue-remove { opacity: 1; }
.queue-remove:hover { color: var(--danger); background: rgba(255,107,107,0.14); }

/* ============ X5: UNTERTITEL-DARSTELLUNG ============ */
.sub-preview {
  display: grid; place-items: center;
  height: 84px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1b2432, #0d131c);
  border: 1px solid var(--border);
  margin-bottom: 13px;
  overflow: hidden;
}
.sub-preview span {
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--sub-color, #fff);
  background: rgba(0,0,0,var(--sub-bg, 0.76));
  font-size: calc(0.95rem * var(--sub-scale, 1));
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}
.slider-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
}
.slider-row + .slider-row { border-top: 1px solid var(--border); }
.slider-row label { flex: 0 0 130px; font-size: 0.88rem; font-weight: 600; }
.slider-row input[type="range"] { flex: 1; opacity: 1; width: auto; }
.slider-row .val {
  flex: 0 0 60px; text-align: right;
  font-size: 0.83rem; color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* ============ X8: QUICK CONNECT ============ */
.qc-box {
  display: grid; gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(127,127,127,0.08);
  border: 1px solid var(--border-2);
  text-align: center;
  margin-top: 4px;
}
.qc-hint { font-size: 0.84rem; color: var(--muted); }
.qc-code {
  font-size: 1.7rem; font-weight: 600;
  letter-spacing: 0.2em;
  padding: 8px 0 4px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.qc-status { font-size: 0.82rem; color: var(--muted-2); }
.qc-box .ghost-btn { margin-top: 2px; }

/* ============================================================
   OFFLINE-DOWNLOADS
   ============================================================ */

.offline-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 20px;
}
.offline-meta {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 0.86rem;
}

.outline-btn.small {
  padding: 8px 14px;
  font-size: 0.84rem;
  border-radius: 9px;
}
.primary-btn.small {
  padding: 9px 18px;
  font-size: 0.86rem;
  width: auto;
}

.offline-list { display: grid; gap: 10px; padding-bottom: 20px; }

.offline-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.offline-row:hover { border-color: var(--border-2); background: var(--surface-2); }
.offline-row.done { cursor: pointer; }
.offline-row.failed { border-color: rgba(255, 107, 107, 0.34); }

.offline-art {
  width: 64px; height: 42px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--muted-2);
}
.offline-art img { width: 100%; height: 100%; object-fit: cover; }
.offline-art svg { width: 22px; height: 22px; }

.offline-body { min-width: 0; }
.offline-title {
  font-weight: 600; font-size: 0.94rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.offline-sub {
  color: var(--muted-2); font-size: 0.79rem; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.offline-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 8px;
}
.offline-progress .bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s linear;
}
.offline-bytes {
  font-size: 0.75rem; color: var(--muted-2);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.offline-state {
  font-size: 0.82rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  max-width: 190px;
}
.offline-row.failed .offline-state { color: var(--danger); }
.offline-row.done .offline-state { color: var(--muted-2); }

.offline-actions { display: flex; gap: 6px; align-items: center; }
.offline-actions .card-icon-btn {
  position: static;
  width: 32px; height: 32px;
  opacity: 1; transform: none;
}

/* ---------- Gruppen: Album oder Staffel ---------- */

.offline-group { cursor: pointer; }
.offline-group:hover { border-color: var(--accent); }

/* Der Zähler ist die Hauptaussage der Zeile — er darf nicht wie eine
   Nebenbemerkung aussehen. */
.group-count {
  display: block;
  font-size: 0.95rem; font-weight: 600;
  color: var(--text);
}
.group-failed {
  display: block;
  font-size: 0.74rem; color: var(--danger);
  margin-top: 2px;
}
.group-arrow {
  width: 20px; height: 20px;
  color: var(--muted-2);
  flex: none;
}
.offline-group:hover .group-arrow { color: var(--accent); }

/* ---------- Kopf der Gruppenseite ---------- */

.group-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.group-head-art {
  width: 56px; height: 56px; flex: none;
  border-radius: 10px; overflow: hidden;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--muted-2);
}
.group-head-art img { width: 100%; height: 100%; object-fit: cover; }
.group-head-art svg { width: 24px; height: 24px; }
.group-head-sub {
  font-size: 0.82rem; color: var(--muted);
  margin-top: 3px;
}

/* Download-Symbol in der Titelliste eines Albums */
.queue-dl {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted-2);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.queue-item:hover .queue-dl { opacity: 1; }
.queue-dl:hover { background: var(--surface-3); color: var(--text); }
.queue-dl svg { width: 17px; height: 17px; }
/* Fertig geladen: dauerhaft sichtbar, in Akzentfarbe */
.queue-dl.on { opacity: 1; color: var(--accent); }
.queue-dl.busy { opacity: 1; color: var(--muted); }

/* Im Offline-Modus alles ausblenden, was einen Server braucht */
body.offline-mode .nav-btn.hidden,
body.offline-mode .search-box,
body.offline-mode #library-toggle.hidden { display: none; }

/* ---------------- Download-Dialog ---------------- */

.dl-options { display: grid; gap: 9px; }

.dl-option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.dl-option:hover { border-color: var(--accent); background: var(--surface-2); }
.dl-opt-main strong { display: block; font-size: 0.92rem; font-weight: 600; }
.dl-opt-main small { display: block; color: var(--muted-2); font-size: 0.78rem; margin-top: 2px; }
.dl-opt-size {
  color: var(--muted); font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Download-Symbol auf Karten und Folgen */
.card-icon-btn.dl.on,
.ep-dl.on { color: var(--accent); }
.card-icon-btn.dl.busy,
.ep-dl.busy {
  color: var(--accent);
  animation: dl-pulse 1.4s ease-in-out infinite;
}
@keyframes dl-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}
.ep-dl svg { width: 17px; height: 17px; }

/* ============================================================
   ERWEITERTE EINSTELLUNGEN
   ============================================================ */

.select-input {
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 150px;
}
.select-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.dl-dir-actions { display: flex; gap: 7px; flex-shrink: 0; }

#dl-dir-path {
  word-break: break-all;
  max-width: 340px;
}

/* ---------------- CSS-Editor ---------------- */

.css-editor-wrap { position: relative; margin-top: 4px; }

.css-editor {
  width: 100%;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  font-family: "Cascadia Code", Consolas, "SF Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 190px;
  tab-size: 2;
}
.css-editor:focus { outline: none; border-color: var(--accent); }
.css-editor::placeholder { color: var(--muted-2); }

.css-status {
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-top: 7px;
  min-height: 1.1em;
}
.css-status.ok { color: var(--accent); }
.css-status.pending { color: #e5a00d; }

.css-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 11px;
}

.css-save-theme { margin-top: 13px; }

/* Eigene Themes in der Auswahl */
.theme-card.custom { position: relative; }
.theme-card .theme-del {
  position: absolute; top: 5px; right: 5px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.theme-card.custom:hover .theme-del { opacity: 1; }
.theme-card .theme-del:hover { background: var(--danger); }

/* ---------------- Kartengrößen ---------------- */

[data-cards="compact"] .grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
[data-cards="compact"] .grid.posters { grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); }
[data-cards="compact"] .grid.squares { grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); }
[data-cards="compact"] .card { width: 196px; }
[data-cards="compact"] .card.poster { width: 134px; }
[data-cards="compact"] .card.square { width: 142px; }

[data-cards="large"] .grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
[data-cards="large"] .grid.posters { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); }
[data-cards="large"] .grid.squares { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
[data-cards="large"] .card { width: 310px; }
[data-cards="large"] .card.poster { width: 208px; }
[data-cards="large"] .card.square { width: 220px; }

/* ---------------- Animationen reduzieren ---------------- */

/* Auch die Reihen: sonst bliebe deren scroll-behavior:smooth aktiv */
.reduce-motion .row-scroll { scroll-behavior: auto; }

/* Kachel klappt ohne Verzögerung auf, wenn Bewegung reduziert ist */
.reduce-motion .card:hover .card-inner,
.reduce-motion .card:hover .card-body { transition-delay: 0s; }

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Untertitel-Höhe: der Cue-Container wird angehoben */
video::-webkit-media-text-track-container {
  transform: translateY(calc(var(--sub-lift, 0px) * -1));
}

/* ============================================================
   EINSTELLUNGEN — VOLLBILD MIT SEITENLEISTE
   ============================================================ */

.settings-overlay {
  position: fixed;
  inset: var(--tb-height) 0 0 0;
  z-index: 480;
  background: var(--bg);
  animation: fade 0.16s var(--ease);
}

.settings-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100%;
}

/* ---------------- Seitenleiste ---------------- */

.settings-nav {
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  min-height: 0;
}

.settings-nav-head {
  padding: 26px 22px 18px;
  flex-shrink: 0;
}
.settings-nav-head h2 {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.settings-cats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.settings-cat {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.settings-cat svg {
  width: 19px; height: 19px;
  flex-shrink: 0;
}
.settings-cat:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}
.settings-cat.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

[data-theme="light"] .settings-cat:hover { background: rgba(10, 20, 40, 0.06); }

/* ---------------- Footer mit Projektlinks ---------------- */

.settings-footer {
  display: flex;
  gap: 8px;
  padding: 16px 16px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.link-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.16s var(--ease);
}
.link-badge svg { width: 15px; height: 15px; flex-shrink: 0; }
.link-badge:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: var(--border-2);
}
.link-badge.github:hover { background: #24292e; color: #fff; border-color: #24292e; }
.link-badge.kofi:hover { background: #ff5e5b; color: #fff; border-color: #ff5e5b; }

/* Solange keine Adresse hinterlegt ist */
.link-badge.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ---------------- Inhaltsbereich ---------------- */

.settings-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.settings-close {
  position: absolute;
  top: 20px; right: 26px;
  z-index: 3;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.16s var(--ease);
}
.settings-close svg { width: 19px; height: 19px; }
.settings-close:hover {
  color: var(--text);
  background: var(--surface-2);
  transform: rotate(90deg);
}

.settings-panels {
  overflow-y: auto;
  padding: 30px 42px 60px;
  flex: 1;
  min-height: 0;
}

.settings-panel { display: none; max-width: 780px; }
.settings-panel.active {
  display: block;
  animation: panelIn 0.2s var(--ease);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Im Vollbild ist der erste Abschnitt schon überschrieben */
.settings-panel .settings-section:first-child { padding-top: 4px; }

/* Kein Zurückscrollen der Seite, solange die Einstellungen offen sind */
body.settings-open .app-shell { overflow: hidden; }

/* ============================================================
   SPRACHAUSWAHL
   ============================================================ */

.language-list {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.language-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.language-card:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}
.language-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  cursor: default;
}

.lang-flag {
  font-size: 1.7rem;
  line-height: 1;
  text-align: center;
}

.lang-body { min-width: 0; }

.lang-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}
.lang-name small {
  color: var(--muted-2);
  font-weight: 400;
  font-size: 0.8rem;
  margin-left: 7px;
}

.lang-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted-2);
}
.lang-author {
  color: var(--muted-2);
  text-decoration: none;
}
a.lang-author:hover {
  color: var(--accent);
  text-decoration: underline;
}
.lang-source {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.71rem;
}
.language-card.active .lang-source { background: var(--surface); }

/* Fortschritt nur bei unvollständigen Übersetzungen */
.lang-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.lang-bar {
  flex: 1;
  max-width: 160px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.lang-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.lang-progress small {
  font-size: 0.72rem;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.lang-active {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.language-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lang-status {
  font-size: 0.8rem;
  color: var(--muted-2);
}
.lang-status.ok { color: var(--accent); }
.lang-status.error { color: var(--danger); }

.language-contribute {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 0;
}

/* ---------------- Schmale Fenster ---------------- */

@media (max-width: 900px) {
  .settings-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }

  .settings-nav {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .settings-nav-head { padding: 18px 18px 12px; }

  /* Kategorien werden zur waagerechten Leiste */
  .settings-cats {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 12px 12px;
    gap: 6px;
  }
  .settings-cat { flex-shrink: 0; }
  .settings-cat span { white-space: nowrap; }

  .settings-footer { padding: 12px 16px; }
  .settings-panels { padding: 24px 20px 50px; }
  .settings-close { top: 14px; right: 16px; }
}

/* ============================================================
   UPDATES
   ============================================================ */

.update-status {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0 4px;
  font-size: 0.87rem;
  color: var(--muted);
}

.update-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted-2);
  flex-shrink: 0;
}
.update-dot.checking { background: #e5a00d; animation: pulse-dot 1.3s ease-in-out infinite; }
.update-dot.downloading { background: var(--accent); animation: pulse-dot 1.3s ease-in-out infinite; }
.update-dot.current { background: #3ddc97; }
.update-dot.ready { background: #3ddc97; box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18); }
.update-dot.error { background: var(--danger); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.update-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 4px 0 12px;
}
.update-progress .bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s linear;
}

#update-install { margin: 4px 0 14px; }

.update-note {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  line-height: 1.5;
  margin-bottom: 0;
}

#update-current { word-break: break-all; }

/* ============================================================
   WIEDERGABE-ART UND FEHLER IM PLAYER
   ============================================================ */

.vp-method {
  margin-left: auto;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
/* Nur zeigen, solange die Bedienleiste sichtbar ist */
.video-ui:not(.idle) .vp-method { opacity: 0.85; }
.vp-method.transcoding { background: rgba(229, 160, 13, 0.32); }
.vp-method.direct { background: rgba(61, 220, 151, 0.24); }
.vp-method:empty { display: none; }

.vp-error {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  max-width: min(560px, 82%);
  padding: 16px 22px;
  border-radius: 12px;
  background: rgba(10, 14, 20, 0.92);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  backdrop-filter: blur(10px);
}

/* ============================================================
   PERSONEN UND SAMMLUNGEN
   ============================================================ */

.cast-card {
  background: none;
  border: none;
  padding: 0;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s var(--ease);
}
.cast-card:hover { transform: translateY(-3px); }
.cast-card:hover .cast-photo { border-color: var(--accent); }
.cast-card:hover .cast-name { color: var(--accent); }
.cast-photo {
  border: 2px solid transparent;
  transition: border-color 0.16s var(--ease);
}
.cast-name { transition: color 0.16s var(--ease); }

.person-head {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.person-photo {
  width: 168px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}
.person-meta { flex: 1; min-width: 260px; }
.person-meta h2 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.person-bio {
  color: var(--muted);
  line-height: 1.65;
  max-width: 74ch;
  font-size: 0.94rem;
}

/* Genre-Chips sind jetzt Knöpfe */
.genre-chip {
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.genre-chip:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

@media (max-width: 700px) {
  .person-photo { width: 118px; }
  .person-meta h2 { font-size: 1.5rem; }
}

/* ============================================================
   MUSIK: INTERPRET UND ALBUM
   ============================================================ */

/* Runde Portraits sind bei Interpreten üblich und unterscheiden
   sie auf einen Blick von Album-Kacheln. */
.artist-portrait {
  width: 190px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}
.artist-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.artist-hero .detail-inner { align-items: center; }

/* Biografien sind oft lang — nach vier Zeilen abschneiden, sonst
   drückt der Text die Knöpfe aus dem Bild. */
.artist-bio {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 70ch;
}

/* Der Interpret über dem Album führt auf dessen Seite */
.album-artist-link {
  display: inline-block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s var(--ease);
}
.album-artist-link:hover { color: var(--text); text-decoration: underline; }

/* Titelzeilen: Nummer schmal, Dauer rechtsbündig */
.queue-item .queue-num {
  width: 26px;
  text-align: right;
  color: var(--muted-2);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .artist-portrait { width: 130px; }
  .artist-bio { -webkit-line-clamp: 3; }
}

/* ==================================================================
   WEB-FASSUNG — angehaengt von tools/build-web.js

   Im Browser gibt es kein eigenes Fenster: die selbstgezeichnete
   Titelleiste haette nichts zu steuern. Sie wird ausgeblendet, und
   --tb-height faellt auf 0 — das gesamte Layout rechnet mit dieser
   Variablen (inset, margin-top, calc(100vh - ...)), deshalb genuegt
   dieser eine Wert, statt jede Regel einzeln anzufassen.
   ================================================================== */
html.is-web { --tb-height: 0px; }
html.is-web .titlebar { display: none; }
