/* Good Movie Club – Schwarz-Weiß-Design nach dem Vorbild von nimbus
   (Inter für Text, Poppins für Überschriften, Pill-Buttons, weiße Karten mit feiner Linie) */

:root {
  --bg: #ffffff;
  --bg-2: #f2f2f2;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --accent: #111111;
  --accent-ink: #ffffff;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, 0.88);
  --ink-hover: #262626;
  color-scheme: light;
  --radius: 16px;
  --radius-sm: 12px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
  --shadow-card: 0 1px 2px rgba(20, 33, 61, 0.04);
  --shadow-btn: 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, 0.25);
}

/* Dark Mode: per Einstellung (data-theme) oder Systemvorgabe; „glass“ baut auf dark auf */
:root[data-theme="dark"],
:root[data-theme="glass"],
:root:not([data-theme="light"]):not([data-theme="dark"]):not([data-theme="glass"]).system-dark {
  --bg: #0f0f10;
  --bg-2: #1c1c1e;
  --ink: #f2f2f2;
  --muted: #9a9a9a;
  --line: #2a2a2c;
  --accent: #f2f2f2;
  --accent-ink: #111111;
  --card: #151517;
  --glass: rgba(15, 15, 16, 0.88);
  --ink-hover: #d9d9d9;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 6px 20px -8px rgba(0, 0, 0, 0.8);
  --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.logo {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 700;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

/* ---------- Buttons (nimbus: btn-primary / btn-secondary / btn-ghost) ---------- */

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--ink-hover);
}

.btn-secondary {
  background: var(--glass);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  background: var(--card);
  border-color: var(--muted);
}

.btn-ghost {
  background: none;
  color: var(--ink);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--bg-2);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

/* ---------- Kopfzeile (sticky, wie nimbus Nav) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  min-height: 56px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Schalter exakt mittig */
  align-items: center;
  gap: 12px;
}

.nav-actions {
  justify-self: end;
}

/* Feste Breiten in der Kopfzeile, damit der mittige Schalter nie springt */
#add-btn {
  min-width: 150px;
}

.category-switch {
  justify-self: center;
}

@media (max-width: 720px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
    padding-top: 8px;
    padding-bottom: 8px;
    row-gap: 8px;
  }
  .category-switch {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.logo span {
  color: var(--muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page-title {
  font-size: 1.6rem;
  line-height: 1.15;
}

.tagline {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.demo-banner {
  margin: 0 0 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.demo-banner a {
  color: var(--ink);
}

/* ---------- Toolbar: Titel + Tabs ---------- */

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 7px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  background: var(--accent);
  color: var(--accent-ink);
}

@media (max-width: 640px) {
  .nav-actions .btn-ghost {
    display: none;
  }
}

/* ---------- Dialoge ---------- */

dialog {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  width: min(680px, calc(100vw - 24px));
  max-height: min(85dvh, 760px);
  margin: 6vh auto auto;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: var(--shadow-pop);
}

@media (max-width: 640px) {
  dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 16px;
  }
}

dialog::backdrop {
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(2px);
  transition: opacity 0.6s ease;
}

/* Hinzufügen-Animation: Dialog fliegt in den Ziel-Tab, der Screen dahinter blendet ein */
dialog.leaving {
  transform-origin: center center;
  overflow: hidden;
  will-change: transform, opacity;
}
dialog.leaving::backdrop {
  opacity: 0;
}

.dialog-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--bg-2);
}

#dialog-close,
.dialog-close-abs {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

#add-dialog,
#watched-dialog {
  position: fixed;
  padding-top: 56px; /* Luft zwischen Schließen-X und Suchfeld */
}

#add-dialog #dialog-close {
  top: 14px;
  right: 14px;
}

.dialog-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 10px;
}

.confirm-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.confirm-adds {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 640px) {
  .confirm-adds {
    order: 1;
    flex-basis: 100%;
    margin-left: 0;
  }
  .confirm-adds > * {
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }
  #confirm-back {
    order: 2;
    flex-basis: 100%;
  }
}

.small-dialog {
  width: min(440px, calc(100vw - 24px));
}

.small-dialog .settings-note {
  margin: 10px 0 4px;
}

/* ---------- Suche im Dialog ---------- */

.search-wrapper {
  position: relative;
  width: 100%;
}

#search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

#search-input:focus {
  border-color: var(--accent);
}

.suggestions {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  list-style: none;
  max-height: min(52dvh, 480px);
  overflow-y: auto;
}

@media (max-width: 640px) {
  .suggestions {
    max-height: calc(100dvh - 210px);
  }
}

.suggestions li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.suggestions li + li {
  border-top: 1px solid var(--line);
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--bg-2);
}

.suggestions img,
.suggestions .poster-placeholder {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.poster-placeholder {
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  filter: grayscale(1);
}

.suggestion-title {
  font-weight: 600;
}

.suggestion-year {
  color: var(--muted);
  font-size: 0.85rem;
}

.suggestions .status-line {
  color: var(--muted);
  cursor: default;
  justify-content: center;
  font-size: 0.9rem;
}

/* ---------- Bestätigungsansicht ---------- */

.confirm-movie {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Angedeuteter Player oben im Dialog */
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.5);
}

/* Ambilight: gestreckte Randspalten des Covers, weichgezeichnet; leicht überzeichnet,
   damit der Blur keine hellen Ränder erzeugt */
.player-ambient {
  position: absolute;
  inset: calc(var(--amb-overscan) * -1%);
  width: calc(100% + var(--amb-overscan) * 2%);
  height: calc(100% + var(--amb-overscan) * 2%);
  filter: blur(var(--amb-blur)) saturate(var(--amb-sat)) brightness(var(--amb-bright));
}

.player-ambient[hidden] {
  display: none;
}

/* Vordergrund: Cover in voller Höhe, mittig, ungeschnitten */
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.55));
}

.player-poster[hidden] {
  display: none;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b2f3a, #111);
}

.player-placeholder[hidden] {
  display: none;
}

.player-placeholder .emoji {
  font-size: 3rem;
  filter: grayscale(1);
  opacity: 0.6;
}

/* Eingebetteter Trailer im Player */
.player-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

.player-embed[hidden] {
  display: none;
}

.player.playing .play-overlay,
.player.playing .player-bar,
.player.playing .player-ambient,
.player.playing .player-poster {
  display: none;
}

/* Angedeutete Fortschrittsleiste am unteren Rand */
.player-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.player-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3%;
  min-width: 8px; /* Video steht praktisch am Anfang */
  border-radius: 2px;
  background: var(--card);
}

.confirm-details {
  flex: 1;
  min-width: 0;
}

.poster-button {
  position: relative;
  align-self: stretch;
  width: 140px;
  min-height: 180px;
  overflow: hidden;
  background: none;
  border: 1px solid var(--line);
  padding: 0;
  cursor: zoom-in;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  line-height: 0;
}

.poster-button:disabled {
  cursor: default;
}

.poster-button img.poster,
.poster-button .poster-placeholder.big {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.15s;
}

.poster-button:not(:disabled):hover img.poster {
  transform: scale(1.03);
}

img.poster.zoomable {
  cursor: zoom-in;
}

.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
}

.movie-plot.loading {
  font-style: italic;
  opacity: 0.7;
}

.credits {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin-top: 10px;
  font-size: 0.85rem;
}

.credits dt {
  color: var(--muted);
}

.credits dd {
  margin: 0;
}

@media (max-width: 640px) {
  .confirm-movie {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .confirm-details {
    width: 100%;
  }
  .player {
    border-radius: 12px;
  }
  .genre-chips {
    justify-content: center;
  }
  .credits {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .credits dt {
    margin-top: 6px;
  }
  .confirm-details .ratings {
    justify-content: center;
  }
}

/* ---------- Cover-Lightbox ---------- */

.lightbox {
  background: transparent;
  border: none;
  padding: 0;
  width: fit-content;
  height: fit-content;
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  inset: 0;
  overflow: visible;
  cursor: zoom-out;
  box-shadow: none;
}

.lightbox::backdrop {
  background: rgba(17, 17, 17, 0.85);
}

.lightbox img {
  display: block;
  max-width: min(92vw, 720px);
  max-height: 90dvh;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 12px;
  right: 16px;
  color: #fff;
  font-size: 2.2rem;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ---------- Dialog: Gesehen + eigene Bewertung ---------- */

.watched-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.watched-head img.poster,
.watched-head .poster-placeholder.big {
  width: 60px;
  height: 90px;
}

.field-label,
.filter-field > label,
.label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 14px 0 6px;
}

.field-label .optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.my-rating-label {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin-left: 6px;
}

.star-picker {
  display: flex;
  gap: 4px;
}

.pick-star {
  position: relative;
  width: 40px;
  height: 40px;
  display: block;
}

.pick-star svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pick-star .star-bg {
  fill: var(--line);
}

.pick-star .star-half,
.pick-star .star-full {
  fill: var(--ink);
  display: none;
}

.pick-star .star-half {
  clip-path: inset(0 50% 0 0);
}

.pick-star.half .star-half,
.pick-star.full .star-full {
  display: block;
}

.pick-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.pick-zone.zone-l {
  left: 0;
}

.pick-zone.zone-r {
  right: 0;
}

#review-text {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
}

#review-text:focus {
  border-color: var(--accent);
}

.my-review {
  margin-top: 8px;
}

.my-review .stars {
  margin-top: 0;
  cursor: default;
}

.logo-me {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--ink);
}

.my-review blockquote {
  margin: 6px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--ink);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Im Log nur der Anfang der Review (zwei Zeilen) */
.review-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

/* ---------- GMC-Sterne ---------- */

.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  cursor: help;
}

.logo-gmc {
  background: var(--ink);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
  margin-right: 5px;
}

.stars svg {
  width: 20px;
  height: 20px;
}

.stars.compact svg {
  width: 17px;
  height: 17px;
}

.stars .star-bg {
  fill: var(--line);
}

.stars .star-fg {
  fill: var(--ink);
}

.stars b {
  margin-left: 6px;
  font-size: 0.92rem; /* identisch mit .rating b */
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Bewertungs-Badges (monochrom, verlinkt) ---------- */

.ratings {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 4px 18px 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

a.rating:hover {
  border-color: var(--ink);
}

.rating b {
  font-weight: 700;
  font-size: 0.92rem;
}

/* Plattform-Icons in den Originalfarben (IMDb-Gelb, Tomate, Metacritic-Ampel) –
   der Rest der Oberfläche bleibt schwarz-weiß. */
.logo-imdb {
  background: #f5c518;
  color: #000;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: -0.02em;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1.2;
}

.logo-rt {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--ink);
}

.logo-mc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
}

.mc-good {
  background: #66cc33;
  color: #0b2a00;
}

.mc-mixed {
  background: #ffcc33;
  color: #332600;
}

.mc-bad {
  background: #ff0000;
  color: #fff;
}

.mc-label {
  font-size: 0.82rem;
}

.logo-mc-mark {
  width: 18px; /* etwas kleiner, passend zu IMDb-Kästchen und Tomate */
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  display: block;
}

/* ---------- Filter ---------- */

.filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 20px 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.filters-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter-field > label output {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin-left: 4px;
  font-weight: 600;
}

.filters input[type="text"],
.filters input[type="number"] {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  height: 40px;
}

.filters input[type="text"]:focus,
.filters input[type="number"]:focus {
  border-color: var(--accent);
}

.genre-field {
  flex: 1 1 200px;
  min-width: 170px;
}

.combobox {
  position: relative;
}

.combobox input {
  width: 100%;
  padding-right: 34px;
}

.combobox-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 6px 8px;
  cursor: pointer;
}

.combobox-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
}

.combobox-options li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.9rem;
}

.combobox-options li small {
  color: var(--muted);
}

.combobox-options li:hover,
.combobox-options li.active {
  background: var(--bg-2);
}

.combobox-options li.selected {
  font-weight: 600;
}

.combobox-options .status-line {
  color: var(--muted);
  cursor: default;
  font-size: 0.85rem;
}

.year-range {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.year-range input {
  width: 84px;
  -moz-appearance: textfield;
}

.year-range input::-webkit-outer-spin-button,
.year-range input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.runtime-field {
  flex: 1 1 160px;
  min-width: 150px;
}

.filters input[type="range"] {
  accent-color: var(--ink);
  width: 100%;
  height: 40px;
  margin: 0;
}

/* Zweite Zeile: „Erweitert“ links unter dem Genre, „Zurücksetzen“ rechts unter der Laufzeit */
.filters-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.filters-foot [hidden] {
  display: none;
}

.text-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 4px 0;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  font-family: inherit;
}

.text-btn:hover {
  color: var(--ink);
  text-decoration: underline;
}

.text-btn.has-active {
  color: var(--ink);
  font-weight: 600;
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 28px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.advanced-filters[hidden],
.filter-count[hidden],
.combobox-options[hidden] {
  display: none;
}

.filters-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Doppel-Slider */
.range2 {
  --lo: 0%;
  --hi: 100%;
}

.range2 > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.range2 > label output {
  margin-left: auto;
  color: var(--muted);
}

.range2.touched > label output {
  color: var(--ink);
  font-weight: 600;
}

.range2-track {
  position: relative;
  height: 34px;
}

.range2-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--line) var(--lo),
    var(--ink) var(--lo),
    var(--ink) var(--hi),
    var(--line) var(--hi)
  );
}

.range2-track input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 34px;
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  z-index: 2;
}

.range2-track input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}

.range2-track input[type="range"]::-moz-range-track {
  background: transparent;
  height: 4px;
}

.range2-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--ink);
  cursor: grab;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.range2-track input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--ink);
  cursor: grab;
}

/* Sortierung rechts über der Liste */
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  min-height: 34px;
}

.filter-count {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

.sort-inline {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.sort-dir {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

.sort-dir:hover {
  border-color: var(--ink);
}

#sort-select {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
}

@media (max-width: 640px) {
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  .filters-row .filter-field {
    flex: none; /* sonst wird flex-basis zur Höhe */
  }
  .year-range input {
    flex: 1;
    width: auto;
  }
}

/* ---------- Watchlist ---------- */

.watchlist {
  display: grid;
  gap: 14px;
}

.movie-card {
  display: flex;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.movie-card {
  cursor: pointer; /* Karte öffnet die Detailansicht */
}

/* Detailansicht eines Listen-/Log-Eintrags: keine Suche dahinter */
.add-dialog.entry-mode #confirm-back,
#add-dialog.entry-mode #confirm-back {
  display: none;
}
#add-dialog.entry-mode .confirm-adds {
  margin-left: 0;
  width: 100%;
}
#add-dialog.entry-mode .confirm-adds > * {
  flex: 1;
}
/* Weiß gefüllte Pille wirkt neben Outline-Pillen optisch höher (Irradiation):
   1 px weniger Innenabstand oben/unten, Reihe zentriert statt gestreckt */
.confirm-adds,
.idea-actions {
  align-items: center;
}
.confirm-adds .btn-primary,
.idea-actions .btn-primary {
  padding-top: 9px;
  padding-bottom: 9px;
}
@media (max-width: 720px) {
  .idea-full .idea-actions .btn-primary {
    padding-top: 7px;
    padding-bottom: 7px;
  }
}
.confirm-adds .is-current {
  opacity: 1; /* disabled, aber als Zustand gemeint – nicht ausgegraut */
  cursor: default;
}

/* Häkchen statt Plus im Kreis: kurzer Strich links unten, langer Strich nach oben rechts */
.plus-circle.is-check::before {
  width: 5px;
  transform: translate(calc(-50% - 2.5px), calc(-50% + 1.5px)) rotate(45deg);
}
.plus-circle.is-check::after {
  height: 9px;
  transform: translate(calc(-50% + 1.5px), calc(-50% - 0.5px)) rotate(45deg);
}

.movie-card:hover {
  border-color: #cfcfcf;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.2);
}

.card-poster {
  position: relative;
  align-self: stretch;
  width: 92px;
  min-height: 138px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.card-poster img.poster,
.card-poster .poster-placeholder.big {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-seen {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

img.poster,
.poster-placeholder.big {
  width: 92px;
  height: 138px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.poster-placeholder.big {
  font-size: 2rem;
}

.movie-info {
  flex: 1;
  min-width: 0;
}

.movie-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.movie-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.movie-plot {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.card-actions button {
  min-width: 190px;
}

.card-actions .danger-outline {
  color: var(--muted);
}

.card-actions .danger-outline:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
  font-size: 1rem;
}

@media (max-width: 560px) {
  .movie-card {
    flex-direction: row;
  }
  .card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .card-actions button {
    min-width: 0;
    flex: 1;
  }
}

/* ---------- Einstellungen (Seite) ---------- */

.settings-page {
  max-width: 720px;
}

.settings-page .page-title {
  margin-top: 4px;
}

.settings-page .tagline {
  margin-bottom: 20px;
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.settings-card h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.settings-note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.weight-rows {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.weight-row {
  display: grid;
  grid-template-columns: 20px 130px 1fr 64px 48px;
  align-items: center;
  gap: 10px;
}

.weight-row.disabled label,
.weight-row.disabled .weight-effective {
  color: var(--muted);
  text-decoration: line-through;
}

.weight-row input[type="checkbox"] {
  accent-color: var(--ink);
  width: 16px;
  height: 16px;
}

.weight-row input[type="range"] {
  accent-color: var(--ink);
  width: 100%;
}

.weight-row input[type="number"] {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 64px;
}

.weight-effective {
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
}

.settings-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.settings-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .weight-row {
    grid-template-columns: 20px 1fr 64px 48px;
  }
  .weight-row input[type="range"] {
    grid-column: 1 / -1;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--accent-ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  z-index: 100;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.toast[hidden] {
  display: none;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}
/* Mobil: kleine Pille knapp über der Tab-Bar (Variante D, 2026-09-26) */
@media (max-width: 720px) {
  .toast {
    bottom: calc(64px + env(safe-area-inset-bottom));
    padding: 7px 14px;
    font-size: 0.74rem;
    font-weight: 600;
  }
}

/* Neu hinzugefügte Karte rutscht ein und leuchtet kurz (Variante D) */
.movie-card.is-new {
  animation: card-slidein 0.6s cubic-bezier(0.2, 0.9, 0.2, 1), card-glow 2.4s ease-out;
}
@keyframes card-slidein {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
  }
}
@keyframes card-glow {
  0%,
  25% {
    box-shadow: 0 0 0 2px var(--ink) inset;
  }
  100% {
    box-shadow: 0 0 0 0 transparent inset;
  }
}
@media (prefers-reduced-motion: reduce) {
  .movie-card.is-new,
  .toast {
    animation: none;
  }
}


/* ======================================================================
   Emojis in Kategorie-Schaltern: aktiv farbig, inaktiv grau
   ====================================================================== */

.emoji {
  font-size: 1em;
  line-height: 1;
  filter: grayscale(1) contrast(0.85);
  opacity: 0.5;
  transition: filter 0.15s, opacity 0.15s;
}

.tab .emoji {
  margin-right: 7px;
}

.tab.active .emoji,
.tabbar-item.active .emoji {
  filter: none;
  opacity: 1;
}

/* Emoji als quadratische Box, damit die Lottie-Animation exakt zentriert liegt */
.emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
  transform-origin: center;
}

.mobile-only {
  display: none !important;
}

.icon-btn-black {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--accent-ink);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  align-items: center;
  justify-content: center;
}

.movie-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.movie-title-row .movie-title {
  flex: 1;
  min-width: 0;
}

/* ======================================================================
   Mobil (≤ 720 px): Konzept A – Bottom-Tab-Bar, Chips + Bottom-Sheets,
   kompakte Karten mit „···“-Menü. Desktop bleibt unverändert.
   ====================================================================== */

@media (max-width: 720px) {
  .mobile-only {
    display: initial !important;
  }
  .icon-btn-black.mobile-only,
  .chips.mobile-only,
  .tabbar.mobile-only {
    display: flex !important;
  }
  .kebab.mobile-only {
    display: inline-block !important;
  }

  /* Variante 2: keine Leiste. Burger links, Emoji-Segment mittig, Plus rechts – alle
     schweben (Glas) über dem Inhalt. Der Titel steht groß im Inhalt. */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30; /* über dem angepinnten Block, damit die Schatten der Pillen nicht abgeschnitten werden */
    background: var(--bg); /* deckend, nichts scheint hinter den Pillen durch */
    border-bottom: none;
    backdrop-filter: none;
    pointer-events: none;
    height: calc(62px + env(safe-area-inset-top));
  }
  /* Titel + Chips: sticky direkt an der Unterkante der Kopfzeile (lückenlos), eigener
     Innenabstand oben statt Abstand im Fluss → keine Verschiebung, keine Lücke */
  .mobile-pinned {
    display: block !important;
    position: sticky;
    top: calc(62px + env(safe-area-inset-top));
    z-index: 25;
    background: var(--bg);
    margin: 0 -16px;
    padding: 6px 16px 0;
  }
  .mobile-pinned .chips {
    display: flex !important;
  }
  .nav-inner {
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    min-height: 0;
    padding: calc(10px + env(safe-area-inset-top)) 14px 0;
    row-gap: 0;
  }
  .nav-inner > * {
    pointer-events: auto;
  }
  .logo,
  .category-switch,
  .nav-actions .btn-ghost,
  #add-btn {
    display: none;
  }
  #avatar-btn,
  .magic-btn,
  #magic-link {
    display: none !important;
  }
  #avatar-btn-mobile {
    display: inline-flex !important;
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5);
  }
  .mobile-top {
    display: flex !important;
    justify-content: center;
  }
  /* Pfeil-Button: gleiche Position, Größe und Optik wie der schwebende Burger */
  .drawer-head {
    height: 40px;
    padding: 0;
  }
  .drawer-back {
    position: fixed;
    left: 14px;
    top: calc(10px + env(safe-area-inset-top));
    width: 40px;
    height: 40px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.35);
  }
  .drawer-back svg {
    width: 20px;
    height: 20px;
  }
  /* Schalter exakt 40 px hoch, damit Burger und Plus (40 px) auf derselben Oberkante sitzen
     wie der Pfeil-Button der Schublade */
  .category-switch-mobile {
    height: 40px;
    box-sizing: border-box;
    padding: 3px;
    gap: 0;
    background: var(--bg-2);
    backdrop-filter: none;
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.35);
  }
  .category-switch-mobile .tab {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 11px;
    font-size: 1.3rem;
    line-height: 1;
  }
  .nav-inner {
    align-items: start;
  }
  .category-switch-mobile .tab .emoji {
    margin: 0;
  }
  .nav-actions {
    gap: 0;
  }
  #add-btn-mobile {
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5);
  }
  .mobile-big-title {
    display: block !important;
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 4px 0 5px; /* Box-Abstand 7px + ~5px Unterlänge der Zeile = optisch 12px, wie Chips → Karte */
  }
  .nav-actions {
    gap: 8px;
  }


  /* Titelzeile + Liste/Log-Segment entfallen mobil (Bottom-Bar übernimmt) */
  .toolbar {
    display: none;
  }

  main {
    padding: calc(62px + env(safe-area-inset-top)) 16px calc(64px + env(safe-area-inset-bottom));
  }

  /* Titelzeile: „Watchlist“ + Zähler, darunter Liste/Log in voller Breite */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .title-block {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }
  .title-block .tagline {
    display: none;
  }
  .page-title {
    font-size: 1.4rem;
  }
  .title-count {
    color: var(--muted);
    font-size: 0.8rem;
  }
  .toolbar .tabs {
    display: flex;
    width: 100%;
  }
  .toolbar .tab {
    flex: 1;
    text-align: center;
  }

  /* Chips statt Filterkasten */
  .filters,
  .list-head {
    display: none;
  }
  .chips {
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 2px 16px 12px;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    flex: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 7px 12px;
    font-family: inherit;
  }
  .chip.on {
    background: var(--ink);
    color: var(--accent-ink);
    border-color: var(--ink);
  }
  .chip-reset {
    color: var(--muted);
    border-style: dashed;
  }
  /* Zähler-Chip: ohne Filter passiv (grau), mit Filter schwarz und als Reset tippbar */
  /* Zähler-Chip: fast schwarz mit weißer Schrift; mit aktivem Filter voll schwarz (Reset) */
  .chip-count {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    font-weight: 600;
  }
  .chip-count:disabled {
    cursor: default;
  }
  .chip-count.on {
    background: var(--ink);
    color: var(--accent-ink);
    border-color: var(--ink);
  }

  /* Karten (Variante A4 „Hero“): Poster als weichgezeichneter Hintergrund,
     kleines Poster links, weißer Text als Overlay, Aktionen im Sheet */
  .watchlist {
    gap: 12px;
  }
  .movie-card {
    position: relative;
    overflow: hidden;
    flex-direction: row;
    align-items: flex-start;
    min-height: 170px;
    padding: 14px;
    gap: 14px;
    border-radius: 18px;
    border-color: rgba(0, 0, 0, 0.15);
    background: #2a2a2c;
    color: #fff;
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.5);
  }
  .movie-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.5);
  }
  .card-bg {
    display: block !important;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) brightness(0.5) saturate(1.1);
    transform: scale(1.2);
    z-index: 0;
  }
  .card-poster {
    position: relative;
    z-index: 1;
    width: 94px; /* app.js passt die Breite an die Inhaltshöhe an (2:3) */
    min-height: 142px;
    align-self: stretch; /* bis zur Unterkante der Badges */
    border-radius: 10px;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
  .movie-info {
    position: relative;
    z-index: 1;
  }
  /* Nur innerhalb der Hero-Karten weiß – Dialoge/Sheets behalten dunkle Schrift */
  .movie-card .movie-title {
    font-size: 1.05rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
  .movie-card .movie-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
  }
  .movie-card .movie-plot {
    display: none;
  }
  .stars {
    margin-top: 8px;
  }
  .stars.compact svg {
    width: 15px;
    height: 15px;
  }
  .movie-card .stars .star-fg {
    fill: #fff;
  }
  .movie-card .stars .star-bg {
    fill: rgba(255, 255, 255, 0.3);
  }
  .movie-card .stars b {
    color: #fff;
    font-size: 0.78rem; /* identisch mit .movie-card .rating b */
  }
  .movie-card .logo-gmc {
    background: var(--card);
    color: var(--ink);
  }
  .movie-card .logo-me {
    background: transparent !important;
    color: #fff !important;
    border-color: #fff;
  }
  /* Badges kompakt, damit alle drei auf gängigen Handys in eine Reihe passen */
  .movie-card .ratings {
    gap: 5px;
    margin-top: 8px;
    flex-wrap: nowrap;
  }
  .movie-card .rating {
    gap: 5px;
    padding: 2px 8px 2px 6px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
  }
  .movie-card .rating b {
    font-size: 0.78rem;
  }
  .movie-card .logo-imdb {
    font-size: 0.56rem;
    padding: 2px 4px;
  }
  .movie-card .logo-rt {
    width: 16px;
    height: 16px;
  }
  .movie-card .logo-mc-mark {
    width: 14px;
    height: 14px;
  }
  .movie-card .logo-mc-mark {
    width: 20px;
    height: 20px;
  }
  .movie-card .movie-seen {
    color: rgba(255, 255, 255, 0.82);
  }
  .movie-card .my-review blockquote {
    font-size: 0.82rem;
    color: #fff;
    border-left-color: #fff;
  }
  .card-actions {
    display: none;
  }
  .kebab {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 2px;
    line-height: 1;
    cursor: pointer;
    flex: none;
  }

  /* Bottom-Tab-Bar */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 3px 8px calc(3px + env(safe-area-inset-bottom)); /* flach */
    justify-content: space-around;
  }
  .tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    text-decoration: none;
    padding: 2px 0;
    cursor: pointer;
  }
  .tabbar-item svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tabbar-item.active svg {
    stroke-width: 2.2;
  }
  .tabbar-item.active {
    color: var(--ink);
  }
  .site-footer {
    display: none;
  }
}

/* Bottom-Sheets (immer definiert, genutzt nur mobil) */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  max-height: 85dvh;
  height: auto;
  border: none;
  border-radius: 22px 22px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.25);
  animation: sheet-up 0.22s ease-out;
}

@keyframes sheet-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 4px auto 10px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sheet-head h2 {
  font-size: 1.05rem;
}

.sheet-body {
  padding: 6px 0 4px;
}

.sheet-body .filter-field > label {
  margin-top: 4px;
}

.sheet-body .sort-inline {
  display: flex;
  margin: 0;
  gap: 10px;
}

.sheet-body #sort-select {
  flex: 1;
  height: 42px;
  font-size: 0.95rem;
}

.sheet-body .sort-dir {
  width: 42px;
  height: 42px;
}

.sheet-body .advanced-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
}

.sheet-body .combobox-options {
  position: static;
  margin-top: 8px;
  box-shadow: none;
  max-height: 40dvh;
}

.sheet-body .year-range input {
  flex: 1;
  width: auto;
  height: 44px;
  font-size: 1rem;
}

.sheet-body input[type="text"],
.sheet-body input[type="number"] {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  height: 44px;
}

.sheet-body .combobox input {
  width: 100%;
}

.sheet-body input[type="range"] {
  accent-color: var(--ink);
  width: 100%;
  height: 40px;
  margin: 0;
}

.sheet-body .filters-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.sheet-foot {
  margin-top: 14px;
}

.sheet-foot .btn-primary {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
}

.action-list {
  display: grid;
  gap: 8px;
  padding: 4px 0 6px;
}

.action-item {
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.action-item.primary {
  background: var(--ink);
  color: var(--accent-ink);
  border-color: var(--ink);
}

.action-item.danger {
  color: var(--muted);
}


/* Magic-Match-Sheet */
.magic-pick {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 4px 0 8px;
}

.magic-pick img.poster,
.magic-pick .poster-placeholder.big {
  width: 96px;
  height: 144px;
  border-radius: 10px;
  flex-shrink: 0;
}

.magic-pick .movie-plot {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
}

.magic-foot {
  display: flex;
  gap: 10px;
}

.magic-foot .btn-secondary,
.magic-foot .btn-primary {
  flex: 1;
  padding: 13px;
}

.magic-foot [hidden] {
  display: none;
}


/* ---------- Inbox ---------- */

.inbox-link {
  position: relative;
}

.inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--accent-ink);
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 4px;
}

.inbox-badge[hidden] {
  display: none;
}

.inbox-tab {
  position: relative;
}

.inbox-tab .inbox-badge {
  position: absolute;
  top: 0;
  left: calc(50% + 8px);
  margin: 0;
}

.nav-spacer {
  display: block;
}

.inbox-from {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.inbox-card.unread {
  border-color: var(--ink);
}

.inbox-note {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.inbox-list {
  margin-bottom: 18px;
}

.inbox-list .card-poster {
  width: 92px;
  align-self: stretch;
}

@media (max-width: 720px) {
  .inbox-list .movie-card .card-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    position: relative;
    z-index: 1;
    width: 100%;
  }
  .inbox-list .movie-card {
    flex-wrap: wrap;
  }
  .inbox-list .card-actions button {
    min-width: 0;
    flex: 1;
  }
  .inbox-list .card-actions .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
  }
  .inbox-list .card-poster {
    width: 84px;
    min-height: 126px;
    align-self: flex-start;
  }
  .inbox-from {
    color: rgba(255, 255, 255, 0.82);
  }
  .inbox-note {
    color: #fff;
    border-left-color: #fff;
  }
  .settings-page .title-block .tagline {
    display: block;
  }
}


/* ---------- Burger-Menü ---------- */

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 20px;
  height: 20px;
}

.burger i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.icon-btn-outline {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn-outline:hover {
  border-color: var(--ink);
}

.tabbar-item .burger {
  height: 1.35rem;
  width: 22px;
  gap: 4px;
}

/* Burger-Menü: Schublade von links, ohne Icons */
.menu-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  margin: 0;
  width: max-content; /* nur so breit wie der längste Menüpunkt */
  min-width: 0;
  max-width: 85vw;
  height: 100dvh;
  max-height: 100dvh;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: calc(10px + env(safe-area-inset-top)) 28px calc(20px + env(safe-area-inset-bottom)) 12px;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.2);
  /* keine Einblend-Animation: der Pfeil soll exakt an der Stelle des Burgers stehen */
}

.menu-drawer::backdrop {
  background: rgba(17, 17, 17, 0.35);
}

.drawer-head {
  display: flex;
  align-items: center;
  padding: 0 0 8px 2px; /* Pfeil-Kreis liegt exakt auf dem Burger-Button (links 14 px, oben 10 px) */
  margin-bottom: 4px;
}

/* Schließen per Pfeil nach links (schiebt die Schublade gedanklich zurück) */
.drawer-back {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-back:hover {
  background: var(--bg-2);
}

/* Kein blauer Fokusring: dezent grau, nur bei Tastaturfokus */
.drawer-back:focus {
  outline: none;
}

.drawer-back:focus-visible {
  outline: 2px solid #cfcfcf;
  outline-offset: 2px;
}

/* Pfeil in derselben Farbe und Strichstärke wie die Burger-Striche */
.drawer-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawer-head .logo {
  font-size: 1.15rem;
}

.menu-list {
  display: grid;
  gap: 4px;
  padding-top: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 10px;
  white-space: nowrap;
  border-radius: 14px;
  border: none;
  background: none;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--bg-2);
}

.menu-item b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.menu-item small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 1px;
}

.menu-static {
  cursor: default;
  opacity: 0.7;
}

.menu-static:hover {
  background: none;
}



/* ---------- Startseite ---------- */

.start-main {
  text-align: center;
  padding-top: 40px;
}

.start-hero {
  margin-bottom: 36px;
}

.start-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.start-icons {
  display: inline-flex;
  gap: 6px;
}

.start-emoji {
  font-size: 3.2rem;
  width: 1.25em;
  height: 1.25em;
  filter: none;
  opacity: 1;
  cursor: pointer;
}

.start-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 4rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.start-tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 14px;
}

.start-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
  margin-bottom: 32px;
}

.start-tile {
  flex-direction: column;
  gap: 12px;
}

.start-tile .movie-title {
  font-size: 1.3rem;
}

.start-tile .stars {
  cursor: default;
}

.start-tile .stars b {
  color: var(--muted);
}

.start-poster {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-poster .emoji {
  font-size: 2.6rem;
  width: auto;
  height: auto;
  filter: none;
  opacity: 1;
}

.start-tom {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fa320a;
  display: inline-block;
}

.start-mc {
  background: var(--bg-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.start-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.start-cta .btn-primary {
  padding: 13px 22px;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .start-main {
    padding-top: 24px;
    padding-bottom: 48px;
  }
  .start-emoji {
    font-size: 2.4rem;
  }
  .start-word {
    font-size: 3rem;
  }
  .start-tiles {
    grid-template-columns: 1fr;
  }
  .start-page .movie-card {
    background: var(--card);
    color: var(--ink);
    min-height: 0;
    box-shadow: var(--shadow-card);
    border-color: var(--line);
    border-radius: var(--radius);
  }
  .start-page .movie-card .movie-title {
    color: var(--ink);
    text-shadow: none;
  }
  .start-page .movie-card .movie-meta,
  .start-page .movie-card .movie-plot {
    color: var(--muted);
    display: block;
  }
  .start-page .movie-card .logo-gmc {
    background: var(--ink);
    color: #fff;
  }
  .start-page .movie-card .stars .star-bg {
    fill: var(--line);
  }
  .start-page .movie-card .rating {
    background: var(--card);
    border-color: var(--line);
    color: var(--ink);
  }
  .start-page .mc-label {
    display: inline;
  }
  .start-page .nav-actions .btn-ghost {
    display: none;
  }
  .start-page .nav-inner {
    grid-template-columns: 1fr auto;
  }
  .start-page .logo {
    display: block;
  }
  .start-cta {
    flex-direction: column;
  }
}


/* ---------- Profil ---------- */

.profile-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: none;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--bg-2) center / cover no-repeat;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--muted);
}

.avatar.has-image span {
  display: none;
}

.avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.avatar-upload {
  cursor: pointer;
}

.profile-fields {
  flex: 1;
  min-width: 0;
}

.profile-fields .field-label:first-child {
  margin-top: 0;
}

.profile-fields input[type="text"],
.profile-fields textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
}

.profile-fields input[type="text"]:focus,
.profile-fields textarea:focus {
  border-color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.stat-head .emoji {
  filter: none;
  opacity: 1;
}

.stat-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  margin-top: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.stat-rows {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  margin-top: 10px;
  font-size: 0.82rem;
}

.stat-rows dt {
  color: var(--muted);
}

.stat-rows dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.stat-total {
  grid-column: 1 / -1;
  margin-top: 2px;
}

@media (max-width: 720px) {
  /* Unterseiten (settings, profile, list score): keine Bedienelemente oben, nur der
     Seitentitel groß an exakt der Stelle von „filmlist“ (gleicher Abstand nach oben) */
  .subpage .site-header {
    position: fixed;
    z-index: 24; /* unter dem Titelblock (25), damit dessen fixer Zurück-Pfeil sichtbar bleibt */
    height: calc(62px + env(safe-area-inset-top));
    background: var(--bg);
    border-bottom: none;
    backdrop-filter: none;
    pointer-events: none;
  }
  .subpage .nav-inner > * {
    display: none !important;
  }
  .subpage main {
    padding-top: calc(62px + env(safe-area-inset-top));
    max-width: none;
  }
  .subpage .title-block {
    position: sticky;
    top: calc(62px + env(safe-area-inset-top));
    z-index: 25;
    background: var(--bg);
    margin: 0 -16px;
    padding: 6px 16px 0;
  }
  .subpage .title-block .page-title {
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 4px 0 12px;
  }
  .subpage .title-block .tagline {
    display: none;
  }
  .subpage .info-page .page-title .logo-gmc {
    font-size: 0.8rem;
  }
  .profile-head {
    flex-direction: column;
    align-items: center;
  }
  .profile-fields {
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- Trailer ---------- */

.confirm-tools {
  margin-top: 10px;
}

/* Play-Button auf dem Cover */
.poster-stack {
  position: relative;
  display: flex;
  align-self: stretch;
  flex-shrink: 0;
}

.poster-stack .poster-button {
  align-self: stretch;
}

/* Play-Button und Ambient-Licht sind über Variablen abstimmbar (siehe /player-tuning.html) */
:root {
  /* Werte von Niklas aus /player-tuning.html (2026-09-25) */
  --play-size: 56px;
  --play-bg-alpha: 0.41;
  --play-blur: 1px;
  --play-icon-alpha: 0.84;
  --play-border-alpha: 0.32;
  --play-icon-scale: 1;
  --play-shadow-alpha: 0.38;
  --amb-blur: 13px;
  --amb-sat: 1;
  --amb-bright: 0.9;
  --amb-strip: 0.15;
  --amb-overscan: 2;
}

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--play-size);
  height: var(--play-size);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, var(--play-border-alpha));
  background: rgba(17, 17, 17, var(--play-bg-alpha));
  color: rgba(255, 255, 255, var(--play-icon-alpha)); /* liegt immer auf dem Cover */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, var(--play-shadow-alpha));
  backdrop-filter: blur(var(--play-blur));
  transition: transform 0.15s, background 0.15s;
}

.play-overlay:hover {
  background: rgba(17, 17, 17, min(1, calc(var(--play-bg-alpha) + 0.2)));
  transform: translate(-50%, -50%) scale(1.06);
}

.play-overlay svg {
  width: calc(26px * var(--play-icon-scale));
  height: calc(26px * var(--play-icon-scale));
  fill: currentColor;
  display: block; /* Dreieck ist im Pfad optisch zentriert */
}

.play-overlay[hidden] {
  display: none;
}

/* Player: Cover weichgezeichnet als Hintergrund hinter dem Video */
.trailer-bg {
  position: fixed;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(40px) brightness(0.45);
  z-index: -1;
  pointer-events: none;
}

.trailer-bg[hidden] {
  display: none;
}

.trailer-lightbox {
  width: min(92vw, 960px);
}

.trailer-frame {
  width: min(92vw, 960px);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.trailer-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


.magic-note {
  font-size: 0.95rem;
  color: var(--ink);
  padding: 6px 0 4px;
}


/* ---------- Unterseiten mit Listen-Kopf (inflow, friends) ---------- */

.desktop-only {
  display: block;
}

@media (max-width: 720px) {
  .desktop-only {
    display: none !important;
  }
  .shell-page main {
    max-width: none;
  }
  .shell-page .mobile-pinned {
    margin-bottom: 0;
  }
  .shell-page .inbox-list .movie-card {
    min-height: 0;
  }
}


/* ---------- Avatar-Button + Dropdown ---------- */

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--accent-ink);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.avatar-btn svg,
.profile-menu-avatar svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-ink);
}

.avatar-btn img,
.profile-menu-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-btn img[hidden],
.profile-menu-avatar img[hidden] {
  display: none;
}

.avatar-btn.has-image svg,
.profile-menu-avatar.has-image svg {
  display: none;
}

.profile-menu {
  position: fixed;
  z-index: 60;
  width: max-content; /* nur so breit wie der längste Eintrag plus Luft */
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 6px;
}

.profile-menu[hidden] {
  display: none;
}

/* Aus-/Einrollen */
.profile-menu.rolling {
  overflow: hidden;
  transition: height 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: top;
}

@media (prefers-reduced-motion: reduce) {
  .profile-menu.rolling {
    transition: none;
  }
}

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.profile-menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex: none;
}

.profile-menu-head b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.profile-menu-head small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.profile-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px; /* so breit wie der Text, gleiche Luft links und rechts */
  white-space: nowrap;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.profile-menu-item:hover {
  background: var(--bg-2);
}

.profile-menu-item[hidden] {
  display: none;
}


/* ---------- Infoseite list score ---------- */

a.logo-gmc {
  text-decoration: none;
}

a.logo-gmc:hover {
  background: #333;
}

.info-page .page-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-page .page-title .logo-gmc {
  font-size: 0.9rem;
  padding: 4px 10px;
}

.info-link {
  margin-left: auto;
  font-weight: 500;
  text-decoration: underline;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.88rem;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.info-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-weights {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.info-weight {
  display: grid;
  grid-template-columns: 130px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.info-weight i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--ink);
}

.info-weight b {
  text-align: right;
}

.settings-note a {
  color: var(--ink);
}


/* ---------- Darstellung (Theme-Schalter) ---------- */

.theme-switch {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin-top: 12px;
}

.theme-switch button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
}

.theme-switch button.active {
  background: var(--accent);
  color: var(--accent-ink);
}


/* Plus im Kreis (Button „⊕ filmlist“) */
.plus-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 0; /* Glyph ausblenden – das Plus wird aus zwei Balken gezeichnet, exakt zentriert */
  line-height: 1;
  margin-right: 3px;
  position: relative;
  flex: none;
  vertical-align: middle;
}

.plus-circle::before,
.plus-circle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.6px;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.plus-circle::after {
  width: 1.6px;
  height: 10px;
}


/* Drei-Punkte-Ladeanimation in der Suche */
.loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 14px !important;
}

.loading-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: dot-bounce 0.9s infinite ease-in-out;
}

.loading-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}


/* ---------- Profil ohne Kasten, Zurück-Pfeil ---------- */

.profile-plain {
  background: none;
  border: none;
  box-shadow: none;
  padding: 4px 0 8px;
  margin-bottom: 8px;
  align-items: flex-start;
}

.profile-plain .avatar-wrap {
  align-items: flex-start;
}

.profile-plain .avatar-actions {
  align-items: flex-start;
}

.profile-plain .settings-actions {
  border-top: none;
  padding-top: 4px;
  justify-content: flex-start;
}

.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 0 6px -6px;
  color: var(--ink);
  border-radius: 999px;
  text-decoration: none;
}

.back-arrow:hover {
  background: none;
  opacity: 0.7;
}

.back-arrow svg {
  width: 24px;
  height: 24px;
  margin-left: -7px; /* Pfeilspitze (x=8 im 24er-Raster) auf die linke Kante des Icons ziehen */
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  .profile-plain {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Pfeil sitzt exakt an der Stelle des Avatar-Buttons (links 14 px, oben 10 px, 40 px),
     der Titel bleibt an der Position von „filmlist“ */
  /* Pfeil bündig mit dem linken Content-Rand (16 px): das Icon selbst beginnt bei 16 px */
  .subpage .title-block .back-arrow {
    position: fixed;
    left: 16px;
    top: calc(10px + env(safe-area-inset-top));
    width: 24px;
    height: 40px;
    margin: 0;
    justify-content: flex-start;
    z-index: 31;
    pointer-events: auto;
    background: none;
    border: none;
    border-radius: 0;
  }
  .subpage .title-block .back-arrow:hover {
    background: none;
  }
}


/* ---------- Gleitender Hintergrund im Kategorie-Schalter ---------- */

.category-switch,
.category-switch-mobile {
  position: relative;
  touch-action: pan-y; /* horizontales Ziehen gehört dem Schalter, vertikal darf die Seite scrollen */
  user-select: none;
  -webkit-user-select: none;
}

.seg-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.category-switch .tab,
.category-switch-mobile .tab {
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

/* Hat der Schalter einen Indikator, übernimmt der den schwarzen Hintergrund */
.category-switch.has-indicator .tab.active,
.category-switch-mobile.has-indicator .tab.active {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .seg-indicator {
    transition: none;
  }
}

/* Unterseiten: Zurück-Pfeil über dem Titel, nicht daneben */
@media (max-width: 720px) {
  .subpage .title-block {
    display: block;
  }
}


/* ---------- Leerzustand: gestrichelter Pfeil zum Plus (mobil) ---------- */

.empty-arrow,
.empty-arrow-top {
  display: none;
}

@media (max-width: 720px) {
  /* Unterer Teil: über der Seite, unter dem angepinnten Block (25) und dem Kopf (30) */
  .empty-arrow {
    display: block !important;
    position: fixed;
    left: 0;
    top: 0;
    /* Breite/Höhe setzt app.js in px (iOS: 100vh ≠ sichtbare Höhe → sonst verzerrt) */
    color: var(--muted);
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
  }
  /* Oberer Teil: in der Kopfzeile, hinter Avatar/Schalter/Plus (DOM-Reihenfolge) */
  .empty-arrow-top {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden; /* SVG-Box endet 14 px unter der Kopfzeile (Höhe setzt app.js) */
    color: var(--muted);
    opacity: 0.45;
    pointer-events: none;
  }
  .empty-arrow[hidden],
  .empty-arrow-top[hidden] {
    display: none !important;
  }
  .empty-state {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 96px 0 0;
    max-width: none;
    line-height: 1.6;
  }
  /* Kopie im angepinnten Block: über dem Block-Hintergrund, unter Titel und Chips –
     so verschwindet die Linie nur hinter den Chip-Pillen selbst */
  .empty-arrow-mid {
    display: block !important;
    position: absolute;
    top: 0;
    color: var(--muted);
    opacity: 0.45;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }
  .empty-arrow-mid[hidden] {
    display: none !important;
  }
  .mobile-pinned .mobile-big-title,
  .mobile-pinned .chips {
    position: relative;
    z-index: 1;
  }
  /* Die ganze Chip-Zeile ist ein deckendes Band (3 px über, 4 px unter den Pillen) –
     darin ist die gestrichelte Linie nicht sichtbar */
  .mobile-pinned .chips {
    background: var(--bg);
    padding: 3px 16px 4px;
    margin-bottom: 8px; /* + 4 px Band = 12 px bis zur ersten Karte */
  }
}


/* ---------- Hinzufügen-Dialog mobil: zweite Top-Bar mit Zurück-Pfeil ---------- */

.dialog-back {
  display: none;
}

@media (max-width: 720px) {
  #add-dialog {
    padding-top: calc(72px + env(safe-area-inset-top)); /* Suchfeld auf Höhe der Überschriften */
  }
  #add-dialog #dialog-close {
    display: none;
  }
  #add-dialog .dialog-back {
    display: inline-flex !important;
    position: fixed;
    left: 16px;
    top: calc(10px + env(safe-area-inset-top));
    width: 24px;
    height: 40px;
    margin: 0;
    z-index: 2;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--ink);
    justify-content: flex-start;
  }
  #add-dialog .dialog-back:hover {
    background: none;
    opacity: 0.7;
  }
}


/* ======================================================================
   Theme „glass“: Apple-Liquid-Glass-Look – Milchglas-Flächen (Blur + Sättigung),
   feine helle Kanten mit Lichtkante oben, darunter weiche Farbverläufe.
   ====================================================================== */

:root[data-theme="glass"] {
  --bg: #0b0b10;
  --card: rgba(255, 255, 255, 0.07);
  --bg-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(20, 20, 28, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

:root[data-theme="glass"] body {
  background: var(--bg);
}

/* Farbige Lichtquellen im Hintergrund (fix, bewegen sich langsam) */
:root[data-theme="glass"] body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 14% 18%, rgba(110, 130, 255, 0.75), transparent 70%),
    radial-gradient(34% 30% at 86% 12%, rgba(255, 100, 170, 0.6), transparent 70%),
    radial-gradient(44% 40% at 72% 88%, rgba(50, 210, 200, 0.55), transparent 70%),
    radial-gradient(30% 30% at 22% 82%, rgba(255, 175, 70, 0.45), transparent 70%);
  filter: blur(30px) saturate(1.3);
  animation: glass-drift 40s ease-in-out infinite alternate;
}

@keyframes glass-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(3%, -2%) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="glass"] body::before {
    animation: none;
  }
}

/* Glasflächen */
:root[data-theme="glass"] .movie-card,
:root[data-theme="glass"] .settings-card,
:root[data-theme="glass"] .filters,
:root[data-theme="glass"] .stat-card,
:root[data-theme="glass"] dialog:not(.lightbox),
:root[data-theme="glass"] .profile-menu,
:root[data-theme="glass"] .combobox-options,
:root[data-theme="glass"] .suggestions,
:root[data-theme="glass"] .chip,
:root[data-theme="glass"] .rating,
:root[data-theme="glass"] .tabs,
:root[data-theme="glass"] .btn-secondary,
:root[data-theme="glass"] .icon-btn-outline,
:root[data-theme="glass"] #sort-select,
:root[data-theme="glass"] .sort-dir,
:root[data-theme="glass"] .action-item,
:root[data-theme="glass"] .theme-switch,
:root[data-theme="glass"] .filters input[type="text"],
:root[data-theme="glass"] .filters input[type="number"],
:root[data-theme="glass"] #search-input,
:root[data-theme="glass"] #review-text,
:root[data-theme="glass"] .profile-fields input[type="text"],
:root[data-theme="glass"] .profile-fields textarea {
  background: var(--glass-strong);
  border-color: var(--glass-edge);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: var(--glass-highlight), 0 10px 30px -12px rgba(0, 0, 0, 0.55);
}

:root[data-theme="glass"] .chip,
:root[data-theme="glass"] .rating,
:root[data-theme="glass"] .btn-secondary,
:root[data-theme="glass"] #sort-select,
:root[data-theme="glass"] .sort-dir {
  box-shadow: var(--glass-highlight);
}

/* Hero-Karten mobil: Poster-Unschärfe bleibt, dazu Glaskante */
:root[data-theme="glass"] .movie-card {
  border-color: var(--glass-edge);
}

/* Schwarze Akzente werden zu hellem Glas mit dunkler Schrift */
:root[data-theme="glass"] .btn-primary,
:root[data-theme="glass"] .icon-btn-black,
:root[data-theme="glass"] .avatar-btn,
:root[data-theme="glass"] .tab.active,
:root[data-theme="glass"] .seg-indicator,
:root[data-theme="glass"] .chip.on,
:root[data-theme="glass"] .chip-count,
:root[data-theme="glass"] .toast,
:root[data-theme="glass"] .logo-gmc,
:root[data-theme="glass"] .inbox-badge,
:root[data-theme="glass"] .action-item.primary {
  background: rgba(255, 255, 255, 0.88);
  color: #0b0b10;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

:root[data-theme="glass"] .avatar-btn svg {
  fill: #0b0b10;
}

:root[data-theme="glass"] .btn-primary:hover {
  background: #fff;
}

/* Kopfzeile, angepinnter Block, Bottom-Bar: Glas über dem Inhalt statt deckend */
:root[data-theme="glass"] .site-header,
:root[data-theme="glass"] .tabbar {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border-color: var(--glass-edge);
}

@media (max-width: 720px) {
  :root[data-theme="glass"] .site-header,
  :root[data-theme="glass"] .mobile-pinned,
  :root[data-theme="glass"] .mobile-pinned .chips,
  :root[data-theme="glass"] .subpage .site-header,
  :root[data-theme="glass"] .subpage .title-block {
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
  }
  :root[data-theme="glass"] .category-switch-mobile {
    background: var(--glass-strong);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-highlight), 0 8px 24px -10px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
  }
  :root[data-theme="glass"] .card-bg {
    filter: blur(16px) brightness(0.45) saturate(1.2);
  }
}

:root[data-theme="glass"] .sheet {
  background: rgba(20, 20, 28, 0.7);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  border-top: 1px solid var(--glass-edge);
  box-shadow: var(--glass-highlight), 0 -20px 60px rgba(0, 0, 0, 0.5);
}

:root[data-theme="glass"] dialog::backdrop {
  background: rgba(5, 5, 10, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

:root[data-theme="glass"] .player {
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-highlight), 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}

:root[data-theme="glass"] .stars .star-fg,
:root[data-theme="glass"] .pick-star .star-half,
:root[data-theme="glass"] .pick-star .star-full {
  fill: #fff;
}

:root[data-theme="glass"] .site-footer {
  border-color: var(--glass-edge);
}

.tmdb-credit img {
  height: 12px;
  vertical-align: middle;
  margin-right: 4px;
}


/* ---------- Coins ---------- */

.coins-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.coins-row .coin {
  font-size: 1.2rem;
}

.coins-row b {
  font-family: var(--font-display);
  font-size: 1.4rem;
}


/* Einstellung: Rating-Pillen auf Karten ausblenden */
body.hide-ratings .movie-card .ratings .rating {
  display: none;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
}

.toggle-row input {
  accent-color: var(--ink);
  width: 18px;
  height: 18px;
}


/* ---------- Ideen: Karten ohne Buttons, Detail-Overlay ---------- */

.idea-card {
  cursor: pointer;
}

.idea-card .card-actions {
  display: none;
}

.idea-dialog {
  position: fixed;
  z-index: 40;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #0f0f10;
  color: #f2f2f2;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.idea-dialog[hidden] {
  display: none;
}

body.idea-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0, 0, 0, 0.55);
}

.idea-close {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 17, 17, 0.6);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.idea-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.idea-scroll {
  overflow-y: auto;
  flex: 1;
}

.idea-dialog .player {
  border-radius: 0;
  box-shadow: none;
}

.idea-body {
  padding: 16px 18px 12px;
}

.idea-body .movie-title {
  color: #fff;
  font-size: 1.3rem;
}

.idea-body .movie-meta,
.idea-body .movie-plot,
.idea-body .inbox-from,
.idea-body .credits dt {
  color: rgba(255, 255, 255, 0.72);
}

.idea-body .credits dd {
  color: #fff;
}

.idea-body .movie-plot {
  display: block;
  margin-top: 10px;
}

.idea-body .chip {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.idea-body .stars {
  margin-top: 8px;
}

.idea-body .stars .star-fg {
  fill: #fff;
}

.idea-body .stars .star-bg {
  fill: rgba(255, 255, 255, 0.3);
}

.idea-body .stars b {
  color: #fff;
}

.idea-body .logo-gmc {
  background: #fff;
  color: #111;
}

.idea-body .rating {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.idea-actions {
  display: grid;
  grid-template-columns: 1fr 1fr; /* ⊕ filmlist | not for me – gleiche Höhe */
  gap: 10px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f0f10;
}

.idea-actions .btn-primary {
  padding: 10px 14px;
  background: #fff;
  color: #111;
  border-color: #fff;
}

.idea-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.idea-actions .idea-never {
  color: rgba(255, 255, 255, 0.7);
}

.idea-actions .idea-never:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

@media (max-width: 720px) {
  /* mobil: eigene dunkle Seite – nur Zurück-Pfeil oben, Inhalt beginnt auf Höhe der
     ersten Karte (--idea-top setzt inbox.js), Aktionen unten */
  .idea-dialog {
    left: 0;
    right: 0;
    transform: none;
    width: 100vw;
    max-height: none;
    border: none;
    border-radius: 0;
    z-index: 50;
  }
  .idea-scroll {
    padding-top: var(--idea-top, 175px);
  }
  body.idea-open::after {
    display: none;
  }
  body.idea-open .site-header,
  body.idea-open .mobile-pinned,
  body.idea-open .tabbar {
    visibility: hidden; /* Seite „wechselt“, Layout bleibt stehen */
  }
  .idea-close {
    position: fixed;
    left: 16px;
    top: calc(10px + env(safe-area-inset-top));
    width: 24px;
    height: 40px;
    background: none;
    backdrop-filter: none;
    justify-content: flex-start;
    color: #fff;
  }
  .idea-close svg {
    margin-left: -7px;
  }
  /* Freunde (ohne Chips): Abstand unter der Überschrift wie bei einer Chip-Reihe */
  .friends-page .mobile-pinned {
    padding-bottom: 46px;
  }
}


/* ---------- Ideen mobil: Vollbild-Karten mit Scroll-Snap ---------- */

@media (max-width: 720px) {
  body.ideas-full .inbox-list {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--ideas-top, 180px);
    bottom: var(--ideas-bottom, 60px);
    margin: 0;
    padding: 0 16px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    display: block;
    z-index: 5;
  }
  body.ideas-full .inbox-list::-webkit-scrollbar {
    display: none;
  }
  /* Seite selbst scrollt nicht (die Kartenliste übernimmt); Erklärkarte ausblenden */
  html:has(body.ideas-full),
  body.ideas-full {
    overflow: hidden;
    height: 100%;
  }
  body.ideas-full .settings-card,
  body.ideas-full .site-footer {
    display: none;
  }
  .idea-full {
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    background: #0f0f10;
    color: #f2f2f2;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 12px;
  }
  .idea-full-player {
    border-radius: 0;
    box-shadow: none;
    /* Bei wenig Höhe (kleine Handys, Safari-Leisten) darf der Player schrumpfen */
    flex: 0 1 auto;
    min-height: 150px;
  }
  .idea-full-body {
    flex: 1 1 auto;
    min-height: 190px;
    overflow-y: auto; /* Worst Case: Mittelteil scrollt, Buttons bleiben stehen */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 12px 14px 6px;
  }
  .idea-full-body::-webkit-scrollbar {
    display: none;
  }
  .idea-full-body .movie-title {
    color: #fff;
    font-size: 1.2rem;
  }
  .idea-full-body .movie-meta,
  .idea-full-body .inbox-from {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
  }
  .idea-full-body .stars {
    margin-top: 6px;
  }
  .idea-full-body .stars .star-fg {
    fill: #fff;
  }
  .idea-full-body .stars .star-bg {
    fill: rgba(255, 255, 255, 0.3);
  }
  .idea-full-body .stars b {
    color: #fff;
  }
  .idea-full-body .logo-gmc {
    background: #fff;
    color: #111;
  }
  .idea-full-body .genre-chips {
    margin-top: 8px;
  }
  .idea-full-body .chip {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
  .idea-full-body .movie-plot {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 8px;
  }
  .idea-full-body .ratings {
    margin-top: 8px;
    flex-wrap: nowrap;
  }
  .idea-full-body .rating {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    padding: 3px 10px 3px 6px;
    font-size: 0.74rem;
  }
  .idea-full .idea-actions {
    padding: 10px 14px 12px;
    flex: none;
  }
  .idea-full .idea-actions .btn-primary,
  .idea-full .idea-actions .btn-secondary {
    padding: 10px 12px;
  }
  .idea-full {
    margin-bottom: 10px; /* Abstand zwischen den Karten = Abstand zur Bottom-Bar */
  }
}


/* Ideen-Vollbildkarte: kompakter, alle Details sichtbar */
@media (max-width: 720px) {
  .idea-full-body {
    display: flex;
    flex-direction: column;
    padding: 10px 14px 4px;
  }
  .idea-full-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  .idea-full-left {
    min-width: 0;
    flex: 1;
  }
  .idea-full-body .movie-title {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  .idea-full-genres {
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: 2px;
  }
  .idea-full-genres .chip {
    font-size: 0.68rem;
    padding: 2px 8px;
  }
  .idea-full-body .movie-plot {
    display: block; /* kein Clamp mehr: ganzer Text, bei Bedarf scrollbar */
    -webkit-line-clamp: unset;
    font-size: 0.85rem;
    margin-top: 8px;
    flex: none;
  }
  .idea-full-body .ratings {
    margin-top: 8px;
    flex: none;
  }
  .idea-full-foot {
    margin-top: auto;
    padding-top: 4px;
    flex: none;
  }
  .idea-full-foot .inbox-from {
    margin-top: 0;
    padding-bottom: 4px;
    font-size: 0.72rem;
  }
  .idea-full .idea-actions {
    padding: 8px 14px 10px;
    gap: 8px;
  }
  .idea-full .idea-actions .btn-primary,
  .idea-full .idea-actions .btn-secondary {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

/* =====================================================================
   Liquid Glass (iOS-26-Look wie im WhatsApp-Anrufbildschirm), 2026-09-26
   Dunkles Glas mit feinem hellem Rand an der Oberkante, weiches Licht von
   oben, Tiefe durch Schatten; aktiver Zustand = weiße Pille mit Glanzkante.
   Gilt für Chips, Zähler-Chip, Avatar, Plus, Kategorie-Schalter, Outline-
   Buttons und die Tab-Bar. Tokens pro Theme, Regeln einmal.
   ===================================================================== */
:root {
  --lg-bg: linear-gradient(180deg, rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.04));
  --lg-rim: rgba(0, 0, 0, 0.12);
  --lg-hi: rgba(255, 255, 255, 0.75);
  --lg-lo: rgba(0, 0, 0, 0.05);
  --lg-fg: #111111;
  --lg-on: linear-gradient(180deg, #1c1c1c, #0c0c0c);
  --lg-on-rim: #111111;
  --lg-on-hi: rgba(255, 255, 255, 0.16);
  --lg-on-fg: #ffffff;
  --lg-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.35);
  --lg-blur: 18px;
  --lg-bg-strong: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.09));
}
:root[data-theme="dark"],
:root[data-theme="glass"],
:root:not([data-theme="light"]):not([data-theme="dark"]):not([data-theme="glass"]).system-dark {
  --lg-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  --lg-rim: rgba(255, 255, 255, 0.16);
  --lg-hi: rgba(255, 255, 255, 0.3);
  --lg-lo: rgba(255, 255, 255, 0.04);
  --lg-fg: #f2f2f2;
  --lg-on: linear-gradient(180deg, #ffffff, #e8e8e8);
  --lg-on-rim: rgba(255, 255, 255, 0.85);
  --lg-on-hi: #ffffff;
  --lg-on-fg: #111111;
  --lg-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.9);
  --lg-bg-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.13));
}

/* Glas (Ruhezustand) */
.chip,
.chip-count,
.btn-secondary,
.category-switch,
.category-switch-mobile,
.drawer-back {
  background: var(--lg-bg);
  border: 1px solid var(--lg-rim);
  color: var(--lg-fg);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 -1px 0 var(--lg-lo), var(--lg-shadow);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
  backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
}
/* Zähler-Chip eine Stufe kräftiger als die anderen Chips (wie vorher „fast schwarz“) */
.chip-count {
  background: var(--lg-bg-strong, var(--lg-bg));
}
.chip-reset {
  border-style: solid;
  color: var(--lg-fg);
  opacity: 0.8;
}
.btn-secondary:hover,
.chip:hover {
  filter: brightness(1.12);
}

/* Glas (aktiv / hell) = Weiß mit Glanzkante – auch Avatar und Plus (Farben wie zuvor) */
.avatar-btn,
#avatar-btn-mobile,
.icon-btn-black,
#add-btn-mobile,
.chip.on,
.chip-count.on,
.seg-indicator,
.category-switch:not(.has-indicator) .tab.active,
.category-switch-mobile:not(.has-indicator) .tab.active,
.btn-primary {
  background: var(--lg-on);
  border-color: var(--lg-on-rim);
  color: var(--lg-on-fg);
  box-shadow: inset 0 1px 0 var(--lg-on-hi), var(--lg-shadow);
}
.seg-indicator {
  border: 1px solid var(--lg-on-rim);
  box-sizing: border-box;
}
.avatar-btn,
#avatar-btn-mobile,
.icon-btn-black,
#add-btn-mobile {
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
  backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
}
.avatar-btn svg,
.icon-btn-black {
  color: var(--lg-on-fg);
}
.btn-primary:hover {
  filter: brightness(0.96);
}

/* Schalter: die Pille selbst ist Glas, die Tabs bleiben transparent */
.category-switch .tab,
.category-switch-mobile .tab {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Tab-Bar: Glasfläche mit feiner Lichtkante oben */
@media (max-width: 720px) {
  .tabbar {
    background: var(--glass);
    border-top: 1px solid transparent; /* keine Linie über der Tab-Bar (Niklas, 2026-09-26) */
    box-shadow: none;
    -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
    backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
  }
  .category-switch-mobile {
    background: var(--lg-bg);
    -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
    backdrop-filter: blur(var(--lg-blur)) saturate(1.4);
  }
}


/* =====================================================================
   Filter-Panel (mobil, 2026-09-26): statt Bottom-Sheet ein Panel exakt
   zwischen Chip-Reihe und Tab-Bar; Inhalt scrollt bei Bedarf, unten immer
   der Sortier-Block mit Richtung ↑/↓ und „done“.
   ===================================================================== */
.sort-dir-seg {
  display: none;
}
.sheet .sort-dir-seg {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}
.sheet .sort-dir-seg button {
  flex: 1;
  height: 40px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--lg-bg);
  border: 1px solid var(--lg-rim);
  color: var(--lg-fg);
  box-shadow: inset 0 1px 0 var(--lg-hi);
}
.sheet .sort-dir-seg button.on {
  background: var(--lg-on);
  border-color: var(--lg-on-rim);
  color: var(--lg-on-fg);
  box-shadow: inset 0 1px 0 var(--lg-on-hi);
}
.sheet .sort-inline .sort-dir {
  display: none; /* im Panel ersetzt das Segment den Umschalter */
}
.sheet-body .sort-inline {
  flex-wrap: wrap;
}
.sheet-sort {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 8px;
}
.sheet-sort-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 0 4px;
}
.sheet-sort .sort-inline > span {
  display: none; /* „sort by“ steht schon als Blocktitel */
}
.chip.open {
  background: var(--lg-on);
  border-color: var(--lg-on-rim);
  color: var(--lg-on-fg);
  box-shadow: inset 0 1px 0 var(--lg-on-hi), var(--lg-shadow);
}

@media (max-width: 720px) {
  .sheet.panel {
    inset: var(--panel-top, 130px) 12px var(--panel-bottom, 72px) 12px;
    width: auto;
    max-width: none;
    max-height: none;
    height: auto;
    margin: 0;
    border: 1px solid var(--lg-rim);
    border-radius: 18px;
    padding: 6px 16px 12px;
    background: var(--card);
    box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow);
    animation: panel-in 0.22s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 40;
  }
  .sheet.panel:not([open]) {
    display: none;
  }
  .sheet.panel .sheet-handle {
    display: none;
  }
  .sheet.panel .sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sheet.panel .sheet-sort,
  .sheet.panel .sheet-foot {
    flex: none;
  }
  .sheet.panel .sheet-sort .sheet-body {
    flex: none;
    overflow: visible;
  }
  .sheet.panel .sheet-foot {
    padding-top: 10px;
  }
  .sheet.panel .sheet-body .combobox-options {
    max-height: none; /* das Panel selbst scrollt */
  }
  body.sheet-open {
    overflow: hidden;
  }
  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }
}


/* =====================================================================
   Seitenwechsel über die Tab-Bar (2026-09-26): Cross-Document View
   Transitions. Kopf, fixierte Titelzeile und Tab-Bar bleiben stehen,
   nur der Inhalt blendet kurz über – kein weißer/leerer Zwischenzustand.
   ===================================================================== */
@view-transition {
  navigation: auto;
}
@media (max-width: 720px) {
  .site-header {
    view-transition-name: site-header;
  }
  .mobile-pinned {
    view-transition-name: pinned;
  }
  .tabbar {
    view-transition-name: tabbar;
  }
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.16s;
}
::view-transition-group(site-header),
::view-transition-group(tabbar) {
  animation-duration: 0s;
}
::view-transition-old(site-header),
::view-transition-old(tabbar) {
  display: none;
}
::view-transition-new(site-header),
::view-transition-new(tabbar) {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}


/* „friends“-Score ohne Bewertung: leere Sterne, gedämpfter Strich */
.stars.empty b {
  opacity: 0.55;
}
.stars.empty .star-bg {
  opacity: 0.7;
}


/* =====================================================================
   friends-Bewertung als Pill in der Bewertungsreihe (2026-09-26): gleiche
   Form wie IMDb/RT/MC, Signet links, kleine Sterne, Zahl rechts. Die Reihe
   rückt näher an Jahr/Laufzeit; auf der Hero-Karte darf sie umbrechen.
   ===================================================================== */
.ratings .stars {
  margin-top: 0;
  gap: 1px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px 3px 4px;
  white-space: nowrap;
}
.ratings .stars svg {
  width: 13px;
  height: 13px;
}
.ratings .stars .logo-gmc {
  margin-right: 5px;
}
.ratings .stars b {
  margin-left: 5px;
  font-size: 0.85em;
}
.ratings {
  margin-top: 6px; /* näher an Jahr · Laufzeit */
}
.confirm-details .ratings {
  margin-top: 8px;
}
@media (max-width: 720px) {
  .movie-card .ratings {
    flex-wrap: wrap; /* friends-Pill + drei Plattformen: zwei Reihen erlaubt */
    margin-top: 5px;
    row-gap: 5px;
  }
  .movie-card .ratings .stars {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    padding: 2px 8px 2px 3px;
    gap: 0;
  }
  .movie-card .ratings .stars svg {
    width: 12px;
    height: 12px;
  }
  .movie-card .ratings .stars b {
    font-size: 0.72rem;
  }
  .idea-full-body .ratings {
    margin-top: 5px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .idea-full-body .ratings .stars {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    padding: 2px 9px 2px 3px;
  }
  .idea-full-body .ratings .stars svg {
    width: 12px;
    height: 12px;
  }
}


/* Alle Pills einer Bewertungsreihe gleich hoch (friends-Pill hat kleinere Inhalte) */
.ratings .stars,
.ratings .rating {
  box-sizing: border-box;
  height: 28px;
  padding-top: 0;
  padding-bottom: 0;
}
@media (max-width: 720px) {
  .movie-card .ratings .stars,
  .movie-card .ratings .rating {
    height: 26px;
  }
  /* Ideas-Vollbildkarte: Reihe steht links unter Jahr · Laufzeit, neben den Genres → kompakter */
  .idea-full-left .ratings {
    margin-top: 6px;
    gap: 5px;
    row-gap: 5px;
    flex-wrap: wrap;
  }
  .idea-full-left .ratings .stars,
  .idea-full-left .ratings .rating {
    height: 26px;
    font-size: 0.7rem;
  }
  .idea-full-left .ratings .rating {
    padding-left: 5px;
    padding-right: 8px;
    gap: 4px;
  }
  .idea-full-left .ratings .stars {
    padding-left: 3px;
    padding-right: 8px;
  }
  .idea-full-left .ratings .stars svg {
    width: 11px;
    height: 11px;
  }
  .idea-full-left .ratings .logo-gmc {
    font-size: 0.62rem;
    padding: 1px 5px;
  }
}

/* friends-Signet immer weiß mit schwarzer Schrift (Niklas, 2026-09-26) – in allen Themes
   und auch auf der Hero-Karte, wo das Signet vorher dunkel war. „you“ im Log bleibt Outline. */
.logo-gmc:not(.logo-me),
.movie-card .logo-gmc:not(.logo-me),
.idea-full-body .logo-gmc:not(.logo-me) {
  background: #ffffff;
  color: #111111;
}
