/* =============================================================================
   Seenit – Design-System der App (design-system/seenit/MASTER.md).

   Richtung: Kinosaal. Tiefes Blau-Schwarz, die Cover tragen die Farbe, ein
   Akzent in Leinwand-Rosé für die eine Hauptaktion je Ansicht. Grün heißt
   „gesehen“, Gelb gehört den externen Wertungen (IMDb), nie der Bedienung.
   Text und Überschriften in Inter, Zahlen mit tabular-nums.

   Zwei Themes (Entscheidung 20): Dunkel ist der Standard, Hell warm; ohne Wahl
   folgt Seenit dem System. Das Inline-Skript in index.html setzt data-theme
   vor dem ersten Zeichnen; theme.js übernimmt danach. Komponenten benutzen nur
   Tokens, nie Rohfarben – sonst passt eine Seite nur in einem Theme.

   Kontraste (WCAG, gerechnet am 30.11.2026):
     Dunkel  --text 17,6:1 · --muted 8,4:1 · --faint 6,3:1 auf --bg
             --accent 6,5:1 · --pos 11,0:1 · --gold 11,9:1 · --neg 7,7:1 auf --bg
             Weiß auf --accent-fill 4,7:1 · --on-gold auf --gold-fill 11,2:1
     Hell    --text 16,1:1 · --muted 6,2:1 · --faint 4,7:1 auf --bg
             --accent 5,8:1 · --pos 5,1:1 · --gold 5,9:1 · --neg 6,0:1 auf --bg
             Weiß auf --accent-fill 6,3:1
   Ränder (--border) tragen nie Text.
   ============================================================================= */

:root {
    /* --- Maße und Rhythmus (4/8-Raster) --- */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    --tap: 44px;              /* Mindestgröße für Tippziele */
    --tabbar-h: 64px;
    --topbar-h: 56px;
    --sidebar-w: 248px;
    --dock-h: 0px;            /* misst shell.js */
    --safe-b: env(safe-area-inset-bottom, 0px);

    --font:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    /* Überschriften und Zahlen: dieselbe Inter, schwer und eng gesetzt. */
    --font-zahl: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --ease:  cubic-bezier(.2, .8, .2, 1);
    --dauer: 180ms;

    --z-sheet: 100;
    --z-toast: 200;
}

/* --- Dunkel (Standard, falls das Skript im Kopf nicht läuft) --- */
:root, :root[data-theme="dark"] {
    --bg:        #0b0d14;
    --bg-2:      #07080d;   /* tiefer als bg: Eingabefelder, Vertiefungen */
    --surface:   #141824;   /* Karten, Listen */
    --surface-2: #1c2130;   /* gehobene Fläche, gedrückt */
    --surface-3: #252b3c;
    --border:    #262c3d;   /* nur Ränder */
    --border-2:  #343b50;
    --text:      #f2f4f8;
    --muted:     #a3abbe;
    --faint:     #8a93a8;

    --accent:      #ff5c7c; /* Leinwand-Rosé als Text/Symbol */
    --accent-fill: #e11d48; /* als Fläche, weiße Schrift */
    --accent-ink:  #ffffff;
    --accent-soft: rgba(255, 92, 124, .14);
    --accent-line: rgba(255, 92, 124, .40);

    --pos: #3ddc97;         /* gesehen */
    --pos-soft: rgba(61, 220, 151, .14);
    --neg: #ff7a7a;         /* Fehler */
    --neg-soft: rgba(255, 122, 122, .14);
    --warn: #f5c518;
    --warn-soft: rgba(245, 197, 24, .14);
    --gold: #f5c518;        /* externe Wertungen (IMDb) */
    --gold-fill: #f5c518;
    --on-gold: #1d1400;

    --scrim: rgba(3, 4, 8, .7);
    --shadow:    0 10px 30px -12px rgba(0, 0, 0, .75);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .85);
    --ring: 0 0 0 3px rgba(255, 92, 124, .5);
    --glass: rgba(11, 13, 20, .86);

    /* Datenreihe der Diagramme (Statistik): Blau, 5,2:1 auf --surface */
    --reihe:      #338ced;
    --reihe-wash: rgba(51, 140, 237, .14);

    color-scheme: dark;
}

/* --- Hell (warm) --- */
:root[data-theme="light"] {
    --bg:        #f7f5f2;
    --bg-2:      #eeebe6;
    --surface:   #ffffff;
    --surface-2: #f3f0eb;
    --surface-3: #e9e5de;
    --border:    #e3ded6;
    --border-2:  #cdc6bb;
    --text:      #171923;
    --muted:     #565c6b;
    --faint:     #686e7d;

    --accent:      #be123c;
    --accent-fill: #be123c;
    --accent-ink:  #ffffff;
    --accent-soft: rgba(190, 18, 60, .09);
    --accent-line: rgba(190, 18, 60, .32);

    --pos: #13774c;
    --pos-soft: rgba(19, 119, 76, .10);
    --neg: #b3261e;
    --neg-soft: rgba(179, 38, 30, .09);
    --warn: #7a5900;
    --warn-soft: rgba(245, 197, 24, .22);
    --gold: #7a5900;        /* als Text; als Fläche --gold-fill */
    --gold-fill: #f5c518;
    --on-gold: #1d1400;

    --scrim: rgba(23, 25, 35, .42);
    --shadow:    0 10px 28px -14px rgba(23, 25, 35, .25);
    --shadow-lg: 0 24px 56px -22px rgba(23, 25, 35, .3);
    --ring: 0 0 0 3px rgba(190, 18, 60, .35);
    --glass: rgba(247, 245, 242, .9);

    /* Datenreihe: Blau, 4,1:1 auf --surface */
    --reihe:      #257de0;
    --reihe-wash: rgba(37, 125, 224, .10);

    color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
    :root { --dauer: 0ms; }
    *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }
}

/* ----------------------------------------------------------------------------
   Grundlage
   ---------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* Das hidden-Attribut gewinnt immer – sonst überstimmt etwa .badge (inline-flex) es. */
[hidden] { display: none !important; }

html { height: 100%; -webkit-tap-highlight-color: transparent; }

body {
    height: 100dvh;
    margin: 0;
    overflow: hidden;              /* die SEITE scrollt nie – nur .content */
    overscroll-behavior: none;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;               /* unter 16px zoomt iOS beim Fokus */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font: 800 clamp(30px, 6vw, 40px)/1.05 var(--font-zahl); letter-spacing: -.025em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
button, .tab, .sb-link, .chip { user-select: none; touch-action: manipulation; }
img { max-width: 100%; display: block; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: var(--sp-3); top: -60px; z-index: 50;
    display: inline-flex; align-items: center; min-height: var(--tap);
    background: var(--accent-fill); color: var(--accent-ink); padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--sp-3); }

.row { display: flex; align-items: center; gap: var(--sp-2); }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack-lg { gap: var(--sp-5); }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.zahl { font-family: var(--font-zahl); font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }
.mittig { text-align: center; }
.text-danger { color: var(--neg); }

/* Strich und Füllung MÜSSEN hier stehen: Bei <use> auf eine externe Sprite
   erbt das Symbol nichts von deren Wurzel-<svg>, sondern nur vom <use>. */
.icon {
    width: 20px; height: 20px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ----------------------------------------------------------------------------
   Knöpfe
   ---------------------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    min-height: var(--tap); padding: 0 var(--sp-4);
    border: 1px solid transparent; border-radius: var(--radius);
    font-weight: 650; font-size: 15px; line-height: 1;
    cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: transform var(--dauer) var(--ease), background-color var(--dauer), border-color var(--dauer), opacity var(--dauer);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 6px 18px -8px var(--accent-line); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-2); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--neg-soft); color: var(--neg); border-color: var(--neg-soft); }
.btn-ok { background: var(--pos); color: var(--bg); }
/* Auch „klein“ bleibt eine volle Tippfläche (pro-rules: mindestens 44 px). */
.btn-sm { min-height: var(--tap); padding: 0 var(--sp-3); font-size: 14px; border-radius: var(--radius-sm); }
.btn-lg { min-height: 52px; font-size: 17px; padding: 0 var(--sp-6); }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: var(--tap); height: var(--tap); flex: none;
    border: 0; border-radius: var(--radius); background: transparent; color: var(--text);
    cursor: pointer; transition: background-color var(--dauer);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ----------------------------------------------------------------------------
   Formulare
   ---------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--muted); }
.hint { font-size: 13px; color: var(--faint); }
.field-error, .feld-fehler { color: var(--neg); font-size: 13px; }
.feld-fehler:empty { display: none; }

input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"],
input:not([type]), textarea, select {
    width: 100%; min-height: 46px;
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--border-2); border-radius: var(--radius);
    font: inherit; font-size: 16px;
    transition: border-color var(--dauer), box-shadow var(--dauer);
}
:root[data-theme="light"] :is(input, textarea, select) { background: var(--surface); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--neg); }
input::placeholder, textarea::placeholder { color: var(--faint); }

/* Schalter */
/* position: relative – der unsichtbare Input bleibt in seiner Zeile statt irgendwo auf der Seite. */
.schalter { position: relative; display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; min-height: var(--tap); }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter .bahn {
    width: 46px; height: 28px; flex: none; border-radius: var(--radius-pill);
    background: var(--surface-3); border: 1px solid var(--border-2); position: relative;
    transition: background-color var(--dauer);
}
.schalter .bahn::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--text); transition: transform var(--dauer) var(--ease);
}
.schalter input:checked + .bahn { background: var(--accent-fill); border-color: var(--accent-fill); }
.schalter input:checked + .bahn::after { transform: translateX(18px); background: var(--accent-ink); }
.schalter input:focus-visible + .bahn { box-shadow: var(--ring); }

/* Segmente (zwei bis vier Möglichkeiten) */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); }
.seg button {
    flex: 1 1 0; min-width: 0; min-height: var(--tap); padding: 0 var(--sp-3);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted);
    font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
    transition: background-color var(--dauer) var(--ease), color var(--dauer) var(--ease);
}
.seg button[aria-selected="true"], .seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--border), inset 0 0 0 1px var(--border-2); }
.seg button:focus-visible { outline: none; box-shadow: var(--ring); }

/* ----------------------------------------------------------------------------
   Karten, Listen, Kleinteile
   ---------------------------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4);
}

.list { display: flex; flex-direction: column; }
.list-row {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 56px; padding: var(--sp-3) var(--sp-2);
    color: var(--text); text-decoration: none !important;
    border: 0; border-bottom: 1px solid var(--border); background: none;
    width: 100%; text-align: left; cursor: pointer;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-title { font-weight: 600; display: block; }
.list-sub { font-size: 13px; color: var(--muted); display: block; }
.row-icon {
    display: grid; place-items: center; width: 40px; height: 40px; flex: none;
    border-radius: var(--radius); background: var(--surface-2); color: var(--muted);
}
.row-icon.is-gold { background: var(--warn-soft); color: var(--gold); }
.row-icon.is-accent { background: var(--accent-soft); color: var(--accent); }
.row-icon.is-neg { background: var(--neg-soft); color: var(--neg); }

.badge {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
    border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; letter-spacing: .02em;
    background: var(--surface-3); color: var(--muted);
}
.badge-gold, .badge-accent { background: var(--accent-fill); color: var(--accent-ink); }
.badge-ok { background: var(--pos-soft); color: var(--pos); }
.badge-bad { background: var(--neg-soft); color: var(--neg); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.avatar {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
    background: var(--surface-3); color: var(--text); font-size: 13px; font-weight: 700; object-fit: cover;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

.trenner { height: 1px; background: var(--border); margin: var(--sp-4) 0; border: 0; }

.error-box {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
    background: var(--neg-soft); border: 1px solid var(--neg-soft); color: var(--neg);
}
.info-box {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    display: flex; gap: var(--sp-3); align-items: flex-start;
}
.warn-box {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
    background: var(--warn-soft); border: 1px solid var(--warn-soft); color: var(--text);
    display: flex; gap: var(--sp-3); align-items: flex-start;
}
.warn-box > .icon { color: var(--warn); }

.spinner {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid var(--border-2); border-top-color: var(--accent);
    animation: drehen .8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); padding: var(--sp-10) var(--sp-4); }
.empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); }
.empty-icon .icon { width: 34px; height: 34px; }
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 42ch; margin-top: var(--sp-1); }

.skelett { display: flex; flex-direction: column; gap: var(--sp-3); }
.sk { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: schimmer 1.4s linear infinite; }
.sk-titel { height: 34px; width: 60%; }
.sk-zeile { height: 16px; width: 40%; }
.sk-karte { height: 88px; }
.sk-karte.hoch { height: 200px; }
@keyframes schimmer { to { background-position: -200% 0; } }

/* ----------------------------------------------------------------------------
   Toast, Banner und Blätter (ui.js)
   ---------------------------------------------------------------------------- */

.toast {
    position: fixed; left: 50%; z-index: var(--z-toast);
    bottom: calc(var(--dock-h) + var(--tabbar-off, 0px) + var(--safe-b) + 20px);
    transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
    /* max-content: Mit left 50 % hätte der Toast sonst nur die halbe Breite und
       bräche lange Texte („… gesehen“ + Rückgängig) in eine schmale Spalte. */
    width: max-content; max-width: min(92vw, 460px); padding: var(--sp-3) var(--sp-4);
    background: var(--text); color: var(--bg); border-radius: var(--radius);
    font-weight: 600; box-shadow: var(--shadow-lg);
    transition: transform 220ms var(--ease), opacity 220ms;
    display: flex; align-items: center; gap: var(--sp-3);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast.error { background: var(--neg); color: var(--bg); }
.toast-aktion { flex: none; min-height: var(--tap); white-space: nowrap; border: 0; background: none; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: var(--sp-1) var(--sp-2); }
.toast.mit-aktion { padding-top: var(--sp-1); padding-bottom: var(--sp-1); }

/* Neue Version bereit (sw-update.js) */
.action-banner {
    position: fixed; left: 0; right: 0; z-index: 80;
    bottom: calc(var(--dock-h) + var(--tabbar-off, 0px) + var(--safe-b) + 20px);
    display: flex; align-items: center; gap: var(--sp-2);
    width: min(100% - 2 * var(--sp-4), 460px); margin-inline: auto;
    padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
    border-radius: var(--radius-lg); border: 1px solid var(--accent-line);
    background: var(--surface); box-shadow: var(--shadow-lg);
    font-size: 14px; font-weight: 650;
}

.sheet-scrim {
    position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(3px);
    animation: einblenden 200ms ease both;
}
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    max-height: min(92dvh, 900px); display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border); border-bottom: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-lg);
    animation: hochfahren 260ms var(--ease) both; padding-bottom: var(--safe-b);
}
.sheet.is-closing, .sheet-scrim.is-closing { animation: ausblenden 180ms ease both; }
.sheet.is-dragging { transition: none; }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border-2); margin: var(--sp-2) auto 0; }
.sheet-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-5); }
.sheet-head .title { font-weight: 700; font-size: 18px; }
.sheet-body { padding: var(--sp-2) var(--sp-5) var(--sp-5); overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { padding: var(--sp-3) var(--sp-5) var(--sp-4); border-top: 1px solid var(--border); }
@media (min-width: 768px) {
    .sheet {
        left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw);
        transform: translate(-50%, -50%); border-radius: var(--radius-xl); border-bottom: 1px solid var(--border);
        animation: aufzoomen 220ms var(--ease) both;
    }
    .sheet-grab { display: none; }
}
@keyframes einblenden { from { opacity: 0; } }
@keyframes ausblenden { to { opacity: 0; } }
@keyframes hochfahren { from { transform: translateY(100%); } }
@keyframes aufzoomen { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }

.patchnotes { white-space: pre-line; color: var(--muted); }
.patchnotes p { margin: 0; }
.patchnotes p + p { margin-top: var(--sp-3); }
.patchnotes p:first-child { color: var(--text); font-weight: 700; }
.install-benefits, .install-steps {
    list-style: none; margin: 0; padding: 0; color: var(--muted);
    display: flex; flex-direction: column; gap: var(--sp-3); counter-reset: schritt;
}
.install-benefits li, .install-steps li { display: flex; align-items: flex-start; gap: var(--sp-3); line-height: 1.45; }
.install-benefits > li > .icon, .install-steps > li > .icon { flex: none; margin-top: 2px; color: var(--accent); }
.install-steps > li::before {
    counter-increment: schritt; content: counter(schritt);
    flex: none; width: 24px; height: 24px; display: grid; place-items: center;
    border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 700;
}

/* ----------------------------------------------------------------------------
   Anmeldung (modules/auth.js)
   ---------------------------------------------------------------------------- */

.auth { height: 100dvh; overflow-y: auto; }
.auth-shell {
    min-height: 100dvh; display: grid; align-content: center; gap: var(--sp-8);
    padding: max(var(--sp-8), env(safe-area-inset-top)) var(--sp-4) calc(var(--sp-8) + var(--safe-b));
    max-width: 1080px; margin: 0 auto;
}
.auth-pitch { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.auth-pitch h1 { font-size: clamp(36px, 8vw, 58px); }
.auth-pitch .unterzeile { color: var(--muted); max-width: 40ch; }
.auth-steps { display: none; list-style: none; padding: 0; margin: var(--sp-4) 0 0; gap: var(--sp-4); }
.auth-steps li { display: flex; gap: var(--sp-3); align-items: flex-start; text-align: left; }
.auth-steps b { display: block; }
.auth-steps span:not(.row-icon) { color: var(--muted); font-size: 14px; }
.auth-steps .row-icon { background: var(--accent-soft); color: var(--accent); }
.auth-card {
    width: 100%; max-width: 420px; margin: 0 auto; padding: var(--sp-6);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: var(--sp-3);
}
.auth-card.is-status { text-align: center; }
.auth-lead { color: var(--muted); }
.auth-note { padding: var(--sp-2) var(--sp-3); background: var(--warn-soft); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-2); }
.auth-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth-field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.auth-input-group { position: relative; }
.auth-input-group input { padding-right: 52px; }
.auth-reveal { position: absolute; right: 2px; top: 1px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); }
.auth-retry { margin-top: var(--sp-4); }
@media (min-width: 900px) {
    .auth-shell { grid-template-columns: 1.1fr 1fr; align-items: center; }
    .auth-pitch { text-align: left; align-items: flex-start; }
    .auth-steps { display: flex; flex-direction: column; }
}

/* Wortmarke: Zeichen + „Seenit“ */
.wortmarke {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    font: 800 28px/1 var(--font-zahl); letter-spacing: -.03em;
    color: var(--text); text-decoration: none !important;
}
.wortmarke img { width: 32px; height: 32px; }
.wortmarke b { color: var(--accent); font-weight: 800; }

/* ----------------------------------------------------------------------------
   App-Hülle
   Handy: Kopf / Inhalt / Tab-Leiste, exakt 100dvh, gescrollt wird nur .content.
   Ab 900 px: Seitenleiste links, Tab-Leiste aus.
   ---------------------------------------------------------------------------- */

.app { display: flex; height: 100dvh; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }

.topbar {
    position: relative; z-index: 20; flex: none;
    display: flex; align-items: center; gap: var(--sp-1);
    min-height: var(--topbar-h); padding: 6px var(--sp-2); padding-top: max(6px, env(safe-area-inset-top));
    background: var(--bg);
    border-bottom: 1px solid transparent; transition: border-color var(--dauer);
}
.topbar.is-scrolled { border-bottom-color: var(--border); }
.topbar .title { font-weight: 700; font-size: 17px; padding: 0 var(--sp-2); transition: opacity var(--dauer) var(--ease); }
/* Solange die große Überschrift im Bild ist, bleibt der Kopf ohne Titel (ui.js titelBeimScrollen). */
.topbar[data-titel="aus"] > .title { opacity: 0; }
.topbar-lead { display: flex; align-items: center; }
/* Tippflächen ab 44 px (pro-rules-Audit, Etappe 10) – auch die Wortmarken-Links. */
.topbar-lead > a { display: inline-flex; align-items: center; min-height: var(--tap); }
.kopf-marke { padding: 0 var(--sp-2); font-size: 26px; }
.kopf-marke img { width: 28px; height: 28px; }

.content { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scroll-padding-top: var(--sp-4); }
/* Der Router fokussiert den Inhalt nach jedem Wechsel (für Screenreader) – ein
   Ring um die ganze Fläche wäre dabei nur Rauschen. */
.content:focus, .content:focus-visible { outline: none; box-shadow: none; border-radius: 0; }
.seite { width: 100%; max-width: 860px; margin: 0 auto; padding: var(--sp-4) var(--sp-4) calc(var(--sp-12) + var(--dock-h)); }
.seite-breit { max-width: 1280px; }
.seite-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-2) 0 var(--sp-5); flex-wrap: wrap; }
.seite-kopf p { color: var(--muted); margin-top: var(--sp-1); }

.dock { flex: none; }
.actionbar:empty { display: none; }
.actionbar {
    display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4);
    background: var(--glass); border-top: 1px solid var(--border);
}

/* --- Tab-Leiste (Handy) --- */
.tabbar {
    flex: none; display: flex; align-items: stretch;
    min-height: var(--tabbar-h); padding-bottom: var(--safe-b);
    background: var(--bg); border-top: 1px solid var(--border);
}
.tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: var(--tap); padding: var(--sp-2) 2px;
    border: 0; background: none; color: var(--muted);
    font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .01em;
    text-decoration: none !important; cursor: pointer; position: relative;
    transition: color var(--dauer) var(--ease);
}
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::before {
    content: ''; position: absolute; top: 0; left: 50%;
    width: 28px; height: 3px; transform: translateX(-50%);
    border-radius: 0 0 3px 3px; background: var(--accent);
}
.tab:active .icon { transform: scale(.9); }
.tab .icon { width: 22px; height: 22px; transition: transform var(--dauer) var(--ease); }
.tab .badge { position: absolute; top: 4px; left: calc(50% + 6px); height: 18px; padding: 0 6px; font-size: 11px; }

/* --- Seitenleiste (Desktop) --- */
.sidebar { display: none; }
@media (min-width: 900px) {
    .tabbar { display: none; }
    .sidebar {
        display: flex; flex-direction: column; gap: var(--sp-1);
        width: var(--sidebar-w); flex: none; height: 100dvh;
        padding: var(--sp-4) var(--sp-3); border-right: 1px solid var(--border);
        background: var(--bg-2); overflow-y: auto;
    }
    :root[data-theme="light"] .sidebar { background: var(--surface-2); }
    .sb-marke { display: flex; align-items: center; min-height: var(--tap); margin: var(--sp-1) var(--sp-2) var(--sp-5); }
    .sb-link {
        display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); padding: 0 var(--sp-3);
        border-radius: var(--radius); color: var(--muted); text-decoration: none !important; font-weight: 600;
        border: 0; background: none; width: 100%; cursor: pointer; text-align: left;
        transition: background-color var(--dauer), color var(--dauer);
    }
    .sb-link:hover { background: var(--surface); color: var(--text); }
    .sb-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
    .sb-label { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin: var(--sp-4) var(--sp-3) var(--sp-1); }
    .sb-fuss { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-1); }
    .sb-neu { margin: 0 0 var(--sp-3); }
    .topbar .nur-mobil { display: none; }
    .content .seite { padding-left: var(--sp-6); padding-right: var(--sp-6); }
}
@media (min-width: 900px) { .nur-schmal { display: none !important; } }
@media (max-width: 899px) { .nur-breit { display: none !important; } }

/* ----------------------------------------------------------------------------
   Start
   ---------------------------------------------------------------------------- */

.start-hero {
    display: grid; gap: var(--sp-4); align-items: center;
    padding: var(--sp-6) var(--sp-5); border-radius: var(--radius-xl);
    background: radial-gradient(120% 120% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface);
    border: 1px solid var(--border);
}
.start-hero h1 { font-size: clamp(34px, 7vw, 48px); }
.start-hero p { color: var(--muted); max-width: 46ch; }
.abschnitt-titel { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; margin: var(--sp-8) 0 var(--sp-2); }

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

.seite > .profil-hero, .seite > .settings-label, .seite > .settings-group,
.seite > .seg, .seite > .profil-version { max-width: 560px; margin-inline: auto; }
.profil-hero {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
    padding: var(--sp-8) var(--sp-5) var(--sp-6);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
    background: radial-gradient(90% 80% at 50% 0%, var(--accent-soft), transparent 70%), var(--surface);
    text-align: center;
}
.profil-hero h1 { font-size: 30px; }
.avatar-xl { width: 88px; height: 88px; font-size: 28px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent-line); }
.profil-version { margin-top: var(--sp-6); text-align: center; font-size: 13px; color: var(--faint); }

.settings-label {
    margin-top: var(--sp-6); margin-bottom: var(--sp-2); padding-inline: var(--sp-1);
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
.settings-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.settings-row {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 56px; padding: var(--sp-3) var(--sp-4); width: 100%;
    background: none; border: 0; text-align: left; font: inherit;
    color: var(--text); text-decoration: none !important; cursor: pointer;
}
.settings-row + .settings-row { box-shadow: 0 -1px 0 var(--border); }
.settings-row:hover { background: var(--surface-2); }
.settings-row:focus-visible { outline: none; box-shadow: inset var(--ring); }
.chev { color: var(--faint); width: 18px; height: 18px; flex: none; }

/* ----------------------------------------------------------------------------
   Hilfe & Feedback (#/support) – die Meldungen liegen im Hub
   ---------------------------------------------------------------------------- */

.seite > .support-liste, .seite > .support-kopf, .seite > .thread, .seite > .support-form,
.seite > #antwort-form, .seite > .info-box { max-width: 720px; margin-inline: auto; }
.support-zeile { gap: var(--sp-3); }
.support-zeile.is-neu .list-title { color: var(--accent); }
.support-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); flex: none; }
.support-kopf { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; margin-bottom: var(--sp-4); }
.support-kopf h1 { font: 700 22px/1.25 var(--font); }
.thread { list-style: none; margin: var(--sp-4) auto; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.thread-msg { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); max-width: 92%; }
.thread-msg.is-ich { align-self: flex-end; background: var(--surface-2); }
.thread-msg.is-team { align-self: flex-start; border-left: 4px solid var(--accent); }
.thread-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-1); }
.thread-body { line-height: 1.5; overflow-wrap: anywhere; }
.thread-system { display: flex; align-items: center; gap: var(--sp-2); justify-content: center; font-size: 13px; color: var(--faint); }
.thread-bilder { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.thread-bild { display: grid; place-items: center; width: 88px; height: 88px; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); color: var(--faint); }
.thread-bild img { width: 100%; height: 100%; object-fit: cover; }
.typ-wahl { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.typ-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.typ-karte {
    position: relative; display: flex; flex-direction: column; gap: var(--sp-1); min-height: var(--tap);
    padding: var(--sp-3); border-radius: var(--radius-lg); border: 2px solid var(--border); background: var(--surface);
    cursor: pointer; transition: border-color var(--dauer);
}
.typ-karte:hover { border-color: var(--border-2); }
.typ-karte:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.typ-karte:has(input:focus-visible) { box-shadow: var(--ring); }
.typ-karte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.typ-karte > .icon { color: var(--accent); }
@media (max-width: 480px) { .typ-raster { grid-template-columns: 1fr; } }
.ablage {
    display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: var(--sp-3) var(--sp-4);
    border: 2px dashed var(--border-2); border-radius: var(--radius-lg); cursor: pointer; color: var(--muted);
    transition: border-color var(--dauer), background-color var(--dauer);
}
.ablage:hover, .ablage.is-ueber, .ablage:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.ablage > span { display: flex; flex-direction: column; gap: 2px; }
.ablage b { color: var(--text); }
.vorschau { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.vorschau li { position: relative; width: 88px; height: 88px; border-radius: var(--radius); overflow: hidden; }
.vorschau img { width: 100%; height: 100%; object-fit: cover; }
.vorschau .icon-btn { position: absolute; top: 2px; right: 2px; background: var(--glass); }
.diag-box summary { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); cursor: pointer; color: var(--muted); font-size: 14px; }
.diag { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-3); margin: var(--sp-2) 0; font-size: 13px; }
.diag dt { color: var(--faint); }
.diag dd { margin: 0; overflow-wrap: anywhere; }

/* Toast und Banner stehen auf dem Handy über der Tab-Leiste. */
@media (max-width: 899px) { :root { --tabbar-off: var(--tabbar-h); } }

/* ----------------------------------------------------------------------------
   Netz-Streifen (offline.js) – zwischen Kopf und Inhalt, nimmt Platz ein
   ---------------------------------------------------------------------------- */

.netz-streifen {
    flex: none; display: flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4); font-size: 13px; font-weight: 600; line-height: 1.35;
    background: var(--warn-soft); color: var(--text); border-bottom: 1px solid var(--border);
}
.netz-streifen > .icon { color: var(--warn); }
.netz-streifen.is-bad { background: var(--neg-soft); }
.netz-streifen.is-bad > .icon { color: var(--neg); }
.netz-streifen.is-info { background: var(--surface-2); }
.netz-streifen.is-info > .icon { color: var(--accent); animation: drehen 1.4s linear infinite; }

/* ----------------------------------------------------------------------------
   Chips (Filter in Bibliothek und Suche, ab Etappe 1/2)
   ---------------------------------------------------------------------------- */

.chip-leiste {
    display: flex; gap: var(--sp-2); overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: calc(-1 * var(--sp-4)); padding: 2px var(--sp-4) var(--sp-1);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--sp-4), #000 calc(100% - var(--sp-8)), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 var(--sp-4), #000 calc(100% - var(--sp-8)), transparent 100%);
}
.chip-leiste::-webkit-scrollbar { display: none; }
.chip {
    flex: none; scroll-snap-align: start; scroll-margin-inline: var(--sp-4);
    min-height: var(--tap); padding: 0 var(--sp-4); border-radius: var(--radius-pill);
    border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
    font: 600 14px/1 var(--font); white-space: nowrap; cursor: pointer;
    transition: background-color var(--dauer), border-color var(--dauer);
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }

/* ----------------------------------------------------------------------------
   Über Seenit (#/ueber) – Pflichthinweise der Datenquellen
   ---------------------------------------------------------------------------- */

.seite > .ueber-hero, .seite > .settings-group { max-width: 560px; margin-inline: auto; }
.ueber-marke { width: 72px; height: 72px; }
.ueber-hero p { max-width: 44ch; }
.settings-row.quelle { cursor: default; align-items: flex-start; }
.settings-row.quelle:hover { background: none; }
.settings-row.quelle .row-icon { margin-top: 2px; }
.pflicht { margin-top: var(--sp-1); font-style: italic; }

/* ----------------------------------------------------------------------------
   Cover und Poster-Raster (teile/karte.js)
   Ein Cover ist 2:3. Unter dem Bild liegt der Titel als Ersatz – er zeigt sich
   erst, wenn das Bild fehlt oder nicht lädt (.ohne-bild), nie ein leerer Rahmen.
   ---------------------------------------------------------------------------- */

.cover {
    position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden;
    border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-3), var(--surface-2) 55%, var(--surface));
    box-shadow: inset 0 0 0 1px var(--border);
}
.cover > img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 260ms var(--ease);
}
.cover-ersatz {
    position: absolute; inset: 0; display: grid; place-items: center; padding: var(--sp-2);
    color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center;
    overflow: hidden; overflow-wrap: anywhere;
}
.cover:not(.ohne-bild) > .cover-ersatz { visibility: hidden; }
.cover.sk { box-shadow: none; }

.raster {
    display: grid; gap: var(--sp-4) var(--sp-3);
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
@media (min-width: 600px) { .raster { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); } }
.karte {
    display: flex; flex-direction: column; gap: 6px; min-width: 0;
    color: var(--text); text-decoration: none !important;
}
.karte:hover .cover > img { transform: scale(1.04); }
.karte:focus-visible { box-shadow: none; }
.karte:focus-visible .cover { box-shadow: var(--ring); }
.karte-name {
    font-size: 14px; font-weight: 650; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.karte-sub { font-size: 12px; color: var(--muted); margin-top: -2px; }
.karte .sk-zeile { width: 80%; height: 12px; }

/* ----------------------------------------------------------------------------
   Suchen (#/suchen)
   ---------------------------------------------------------------------------- */

.suchfeld { position: relative; display: flex; align-items: center; }
.suchfeld > .icon { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.suchfeld input {
    min-height: 52px; padding-left: 46px; padding-right: 52px;
    border-radius: var(--radius-lg); font-size: 17px;
}
.suchfeld input::-webkit-search-cancel-button { display: none; }
.such-leeren { position: absolute; right: 4px; color: var(--muted); }
.such-arten { margin-top: var(--sp-3); }
.such-ergebnis { min-height: 40vh; }
.such-ergebnis > .abschnitt-titel { margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.such-ergebnis > .raster:first-child { margin-top: var(--sp-6); }
.such-fehler { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6); }
.mehr-laden { display: flex; justify-content: center; margin-top: var(--sp-6); }

/* ----------------------------------------------------------------------------
   Titelseite (#/titel/…)
   Das Hintergrundbild läuft auf dem Handy bis an den Rand und blendet nach
   unten in --bg aus – Name und Angaben stehen so immer auf ruhigem Grund.
   ---------------------------------------------------------------------------- */

.titel-held {
    position: relative; overflow: hidden;
    margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0;
    background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%), var(--bg);
}
.held-bild {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
    opacity: .7;
}
.titel-held::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--bg) 15%, transparent) 0%,
        color-mix(in srgb, var(--bg) 65%, transparent) 50%,
        var(--bg) 90%);
}
:root[data-theme="light"] .held-bild { opacity: .55; }
.held-inhalt {
    position: relative; z-index: 1;
    display: flex; align-items: flex-end; gap: var(--sp-4);
    padding: 112px var(--sp-4) var(--sp-2);
}
.titel-held.ohne-hintergrund .held-inhalt { padding-top: var(--sp-6); }
.held-cover { width: 112px; flex: none; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border); }
.held-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-bottom: var(--sp-1); }
.held-text h1 { font-size: clamp(26px, 6.4vw, 42px); overflow-wrap: anywhere; }
.held-art { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.held-original { color: var(--muted); font-size: 15px; }
.held-meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); }
.badge.status-laeuft { background: var(--pos-soft); color: var(--pos); }
.badge.status-abgesetzt, .badge.status-abgesagt { background: var(--neg-soft); color: var(--neg); }
.badge.status-kommt, .badge.status-geplant { background: var(--warn-soft); color: var(--warn); }

@media (min-width: 900px) {
    .titel-held { margin: 0; border-radius: var(--radius-xl); border: 1px solid var(--border); }
    .held-inhalt { padding: 180px var(--sp-6) var(--sp-5); gap: var(--sp-6); }
    .held-cover { width: 168px; }
}

.wertungen { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.wertung {
    display: inline-flex; align-items: baseline; gap: 6px; min-height: 34px; padding: 6px 12px;
    border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border);
    font-size: 14px;
}
.wertung b { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.wertung .zahl { font-weight: 800; }
.wertung-imdb { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--on-gold); }
.wertung-imdb b, .wertung-imdb .wertung-stimmen { color: var(--on-gold); }
.wertung-stimmen { font-size: 12px; font-weight: 600; }

.genre-leiste { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.genre-leiste li {
    padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-2);
    font-size: 13px; color: var(--muted);
}

.beschreibung {
    display: block; width: 100%; min-height: var(--tap); margin: var(--sp-4) 0 0; padding: 0;
    background: none; border: 0; text-align: left; cursor: pointer;
    color: var(--text); line-height: 1.6; font-size: 16px;
}
.beschreibung > span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.beschreibung[aria-expanded="true"] > span { display: block; }
.beschreibung.leer { color: var(--muted); cursor: default; }

.titel-aktionen { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }
.titel-abschnitt > .abschnitt-titel { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.abschnitt-zusatz { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }

.titel-hinweis {
    display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border);
}

.staffel-liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.staffel-liste li + li { border-top: 1px solid var(--border); }
.staffel-zeile {
    display: flex; align-items: center; gap: var(--sp-3); min-height: 76px;
    padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2);
    color: var(--text); text-decoration: none !important;
}
.staffel-zeile:hover { background: var(--surface-2); }
.staffel-zeile:focus-visible { box-shadow: inset var(--ring); border-radius: 0; }
.staffel-cover { width: 40px; flex: none; border-radius: 6px; }
.staffel-cover .cover-ersatz { font-size: 9px; padding: 2px; }

.fakten { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-4); margin: 0; }
.fakten dt { color: var(--muted); }
.fakten dd { margin: 0; font-weight: 600; }

/* --- Wo läuft es (teile/dienst-leiste.js) --- */
.dienst-leiste { display: flex; flex-direction: column; gap: var(--sp-4); }
.dienst-art { font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: var(--sp-2); }
.dienste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.dienst {
    display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 40px;
    padding: 5px 14px 5px 5px; border-radius: var(--radius-pill);
    background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 600;
}
.dienst img { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.dienst-ersatz { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 13px; }
.dienst-mehr > summary {
    display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap);
    cursor: pointer; color: var(--muted); font-weight: 600; list-style: none;
}
.dienst-mehr > summary::-webkit-details-marker { display: none; }
.dienst-mehr > summary .icon { transition: transform var(--dauer) var(--ease); }
.dienst-mehr[open] > summary .icon { transform: rotate(180deg); }
.dienst-mehr > .dienst-gruppe + .dienst-gruppe { margin-top: var(--sp-3); }
.dienst-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--sp-3); }
.quelle-klein { font-size: 12px; color: var(--faint); }
.dienst-link { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); color: var(--accent); font-weight: 600; }

/* --- Quellen-Fuß (teile/attribution.js) --- */
.quellen-fuss {
    margin-top: var(--sp-10); padding-top: var(--sp-4); border-top: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
    text-align: center; font-size: 12px; color: var(--faint);
}
.quellen-link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--sp-2); }
.tmdb-logo { height: 14px; width: auto; }
.ueber-logo { margin-top: var(--sp-3); height: 16px; }

/* ----------------------------------------------------------------------------
   Staffel (#/titel/serie-…/staffel/n)
   ---------------------------------------------------------------------------- */

.staffel-kopf { display: flex; flex-direction: column; gap: 2px; margin: 0 0 var(--sp-4); }
.staffel-serie { display: inline-flex; align-items: center; align-self: flex-start; min-height: var(--tap); font-weight: 650; }
.staffel-kopf h1 { font-size: clamp(28px, 6vw, 38px); }
.staffel-leer { margin: var(--sp-6) 0; }

.folgen-liste { list-style: none; margin: 0; padding: 0; }
/* Eine Folge: links Bild und Text (öffnet das Folgen-Blatt), rechts das Häkchen. */
.folge {
    display: flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-3) 0; border-bottom: 1px solid var(--border);
}
.folge:last-child { border-bottom: 0; }
.folge-oeffnen {
    flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 104px 1fr; gap: var(--sp-3); align-items: start;
    padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-sm);
}
.folge-oeffnen:hover .list-title { text-decoration: underline; text-decoration-color: var(--border-2); }
.folge-bild {
    position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
    border-radius: var(--radius-sm); background: var(--surface-2);
}
.folge-bild > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.folge-nr {
    position: absolute; left: 6px; bottom: 2px; font-size: 18px; font-weight: 800;
    color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}
.folge-bild:not(:has(img)) .folge-nr { inset: 0; display: grid; place-items: center; color: var(--muted); text-shadow: none; }
.folge-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.folge-beschreibung {
    margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.folge.kommt .folge-bild { opacity: .45; }
.folge.kommt .list-title { color: var(--muted); }
.folge.ist-gesehen .folge-bild::after {
    content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 35%, transparent);
}
.folge-wertung { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 700; }
.folge-wertung .icon { width: 13px; height: 13px; fill: currentColor; }
.haken-platz { width: var(--tap); flex: none; }
@media (min-width: 600px) { .folge-oeffnen { grid-template-columns: 168px 1fr; gap: var(--sp-4); } }

/* Kopf der Staffel: Zähler, Wertung, „Staffel komplett“ */
.staffel-eigen {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
    margin: 0 0 var(--sp-2); padding: var(--sp-2) 0 var(--sp-3); border-bottom: 1px solid var(--border);
}
.staffel-zaehler { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--muted); }
.staffel-zaehler.komplett { color: var(--pos); }

/* Folgen-Blatt */
.folge-gross { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-bottom: var(--sp-4); }
.folge-gross img { width: 100%; height: 100%; object-fit: cover; }
.folge-blatt-titel { font-size: 20px; margin-bottom: var(--sp-1); }
.folge-blatt-text { margin-top: var(--sp-3); line-height: 1.6; }
.folge-blatt-wertung { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-4); }

.staffel-nav { display: flex; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-6); }
.staffel-nav .btn { max-width: 48%; }

/* ----------------------------------------------------------------------------
   Eigener Stand (Etappe 2): Abzeichen, Häkchen, Fortschritt, Wertung
   Zustände nie nur über Farbe – immer mit Text oder Symbol (MASTER.md).
   ---------------------------------------------------------------------------- */

.badge.status-watchlist { background: var(--surface-3); color: var(--text); }
.badge.status-am_schauen { background: var(--accent-soft); color: var(--accent); }
.badge.status-aufgeholt, .badge.status-fertig, .badge.status-gesehen { background: var(--pos-soft); color: var(--pos); }
.badge.status-pausiert { background: var(--warn-soft); color: var(--warn); }
.badge.status-abgebrochen { background: var(--neg-soft); color: var(--neg); }

/* Das Häkchen: eine volle Tippfläche, gesehen = grün gefüllt mit Haken. */
.haken-knopf {
    width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center;
    border-radius: 50%; border: 2px solid var(--border-2); background: transparent; color: var(--faint);
    cursor: pointer; transition: background-color var(--dauer), border-color var(--dauer), color var(--dauer), transform var(--dauer) var(--ease);
}
.haken-knopf:hover { border-color: var(--pos); color: var(--pos); }
.haken-knopf:active { transform: scale(.92); }
.haken-knopf.an { background: var(--pos); border-color: var(--pos); color: var(--bg); }
.haken-knopf:disabled { opacity: .55; cursor: progress; }
.haken-knopf:focus-visible { box-shadow: var(--ring); border-radius: 50%; }

.icon.dreht { animation: drehen 1s linear infinite; }

/* Eigener Bereich auf der Titelseite */
.eigen { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.eigen-karte {
    padding: var(--sp-4); border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border);
}
.eigen-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
.eigen-kopf .muted { font-size: 14px; }
.eigen-aktionen { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.eigen-aktionen .btn-primary { flex: 1 1 auto; max-width: 320px; }
.eigen-zeile { display: flex; align-items: center; gap: var(--sp-2); }
.eigen-hinweis { display: flex; align-items: center; gap: var(--sp-2); color: var(--muted); font-size: 14px; }
.eigen-hinweis .icon { color: var(--accent); }

.fortschritt { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.fortschritt > span { display: block; height: 100%; border-radius: inherit; background: var(--accent-fill); transition: width 300ms var(--ease); }
.fortschritt-text { font-size: 13px; color: var(--muted); margin-top: calc(-1 * var(--sp-1)); }

.weiter-zeile {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); border-radius: var(--radius);
    background: var(--bg-2); border: 1px solid var(--border);
}
:root[data-theme="light"] .weiter-zeile { background: var(--surface-2); }
.weiter-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.weiter-zeile .list-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weiter-zeile .grow { min-width: 0; }

/* Eigene Wertung: Akzent (Gold gehört den externen) */
.wertung-eigen {
    display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 var(--sp-3);
    border-radius: var(--radius-pill); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent);
    font: 700 15px/1 var(--font); cursor: pointer;
}
.wertung-eigen .icon { fill: currentColor; }
.wertung-eigen .zahl { font-size: 17px; font-weight: 800; }
.wertung-von { font-size: 12px; opacity: .8; }
.wertung-eigen.leer { background: transparent; border-color: var(--border-2); color: var(--muted); }
.wertung-eigen.leer .icon { fill: none; }
.wertung-eigen.klein { padding: 0 10px; font-size: 14px; }
.wertung-eigen.klein .zahl { font-size: 15px; }

.wertung-frage { margin: 0 0 var(--sp-4); }
.wertung-tasten { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-2); }
.wertung-taste {
    min-height: 52px; border-radius: var(--radius); border: 1px solid var(--border-2);
    background: var(--surface-2); color: var(--text); font-size: 20px; font-weight: 800; cursor: pointer;
    transition: background-color var(--dauer), border-color var(--dauer), transform var(--dauer) var(--ease);
}
.wertung-taste:hover { border-color: var(--accent); }
.wertung-taste:active { transform: scale(.95); }
.wertung-taste[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.wertung-skala { display: flex; justify-content: space-between; margin: var(--sp-2) 0 0; font-size: 12px; }

/* Wann gesehen? */
.datum-wahl .list-row { border-radius: var(--radius); }
.datum-feld { cursor: default; flex-wrap: wrap; }
.datum-feld:hover { background: none; }
.datum-feld label { display: flex; flex-direction: column; gap: 6px; }
.datum-feld input[type="date"] { min-height: var(--tap); padding: var(--sp-2) var(--sp-3); }

/* Staffelzeilen auf der Titelseite: eigener Fortschritt */
.staffel-stand { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.staffel-stand.komplett { color: var(--pos); }

/* Karten mit Stand (teile/karte.js) */
.karte-bild { position: relative; display: block; }
.karte-stand {
    position: absolute; left: 6px; top: 6px; max-width: calc(100% - 12px);
    display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 750; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--glass); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.karte-stand .icon { width: 12px; height: 12px; stroke-width: 3; }
.karte-stand.stand-gesehen, .karte-stand.stand-fertig { background: var(--pos); color: var(--bg); }
.karte-stand.stand-am_schauen, .karte-stand.stand-aufgeholt { background: var(--accent-fill); color: var(--accent-ink); }
.karte-wertung {
    position: absolute; right: 6px; top: 6px; display: inline-flex; align-items: center; gap: 2px;
    padding: 3px 7px; border-radius: var(--radius-pill); background: var(--glass); color: var(--accent);
    font-size: 12px; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.karte-wertung .icon { width: 12px; height: 12px; fill: currentColor; }
.karte-fortschritt {
    position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
    background: rgba(0, 0, 0, .55); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
}
.karte-fortschritt > span { display: block; height: 100%; background: var(--accent-fill); }

/* ----------------------------------------------------------------------------
   Bibliothek (#/bibliothek)
   ---------------------------------------------------------------------------- */

.bib-segmente { margin-bottom: var(--sp-3); }
.seg-zahl { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.seg button[aria-selected="true"] .seg-zahl { color: var(--accent); }
.bib-chips { margin-bottom: var(--sp-3); }
.chip-zahl { font-weight: 700; opacity: .7; margin-left: 2px; }
.bib-filter { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.bib-auswahl { flex: 1 1 0; min-width: 0; }
.bib-auswahl select { min-height: var(--tap); padding: 0 var(--sp-3); font-size: 15px; }
.bib-raster { margin-top: var(--sp-2); }

/* ----------------------------------------------------------------------------
   Verlauf (#/verlauf)
   ---------------------------------------------------------------------------- */

.verlauf-tag + .verlauf-tag .abschnitt-titel { margin-top: var(--sp-6); }
.verlauf-liste { list-style: none; margin: 0; padding: 0; }
.verlauf-liste li + li { box-shadow: 0 -1px 0 var(--border); }
.verlauf-zeile { border-bottom: 0; padding: var(--sp-2) var(--sp-3); }
.verlauf-bild { width: 36px; height: 54px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.verlauf-zeit { font-size: 13px; color: var(--muted); flex: none; }
.seite > .verlauf-tag, .seite > .mehr-laden { max-width: 720px; margin-inline: auto; }

/* ----------------------------------------------------------------------------
   Etappe 3: Start, Kalender, Meine Dienste
   ---------------------------------------------------------------------------- */

.start-kopf h1 { font-size: clamp(28px, 6vw, 38px); }
.start-kopf p { text-transform: none; }

.start-abschnitt { margin-top: var(--sp-6); }
.start-abschnitt:first-child { margin-top: 0; }
.abschnitt-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.abschnitt-kopf .abschnitt-titel { margin: 0; }
.abschnitt-zahl { margin-left: 4px; color: var(--accent); letter-spacing: 0; }
.abschnitt-link {
    display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); padding-left: var(--sp-2);
    color: var(--accent); font-weight: 650; font-size: 14px; text-decoration: none !important;
}
.start-leerzeile { margin: var(--sp-2) 0 0; font-size: 14px; }
.start-mehr { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 14px; font-weight: 600; color: var(--accent); }
.start-ruhig { margin-top: 0; }
.start-hero + .start-hinweis, .start-ruhig + .start-abschnitt { margin-top: var(--sp-6); }
.start-hero h2 { font-size: clamp(26px, 6vw, 36px); }

/* Neu erschienen / Weiterschauen: Cover, Folge, Häkchen */
.start-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.start-zeile {
    display: flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border);
    transition: opacity var(--dauer) var(--ease);
}
.start-link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); color: inherit; text-decoration: none !important; border-radius: var(--radius); }
.start-link:hover .list-title { text-decoration: underline; text-decoration-color: var(--border-2); }
.start-cover { width: 56px; flex: none; border-radius: var(--radius-sm); }
.start-cover .cover-ersatz { font-size: 10px; padding: 2px; }
.start-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.start-text .list-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-folge { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-nr { font-weight: 750; }
.start-meta { font-size: 13px; color: var(--muted); }
.start-meta.ist-neu { color: var(--accent); font-weight: 650; }
.start-fortschritt { height: 4px; margin-top: 4px; max-width: 220px; }
.start-zeile.erledigt { opacity: .6; }
.start-zeile.erledigt .start-folge { text-decoration: line-through; text-decoration-color: var(--pos); }
.start-zeile .haken-knopf:disabled { cursor: default; opacity: 1; }

/* Termine (Demnächst, Kalender) */
.termin-liste { list-style: none; margin: 0; padding: 0; }
.termin-liste li + li { box-shadow: 0 -1px 0 var(--border); }
.termin {
    display: flex; align-items: center; gap: var(--sp-3); min-height: 64px; padding: var(--sp-2) var(--sp-1);
    color: inherit; text-decoration: none !important; border-radius: var(--radius-sm);
}
.termin:hover { background: var(--surface); }
.termin-tag {
    width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.05;
    padding: 4px 0; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted);
}
.termin-wt, .termin-mo { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.termin-tg { font-size: 19px; font-weight: 800; color: var(--text); }
.termin-cover { width: 36px; flex: none; border-radius: 6px; }
.termin-cover .cover-ersatz { font-size: 8px; padding: 1px; }
.termin-text { min-width: 0; flex: 1 1 auto; }
.termin-text .list-title, .termin-text .list-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.termin .badge { flex: none; }
.badge.termin-start { background: var(--accent-soft); color: var(--accent); }
.badge.termin-film { background: var(--surface-3); color: var(--text); }
.termin.ist-gesehen .list-title { color: var(--muted); }

/* Hinweis „Dienste wählen“ */
.start-hinweis {
    display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg);
    background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 65%), var(--surface);
    border: 1px solid var(--border); color: var(--text); text-decoration: none !important;
}
.start-hinweis:hover { border-color: var(--accent-line); }

/* Eine waagerechte Reihe von Karten (Auf deinen Diensten) */
.reihe {
    display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: var(--sp-3);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    margin-inline: calc(-1 * var(--sp-4)); padding: 0 var(--sp-4) var(--sp-2);
    scrollbar-width: thin;
}
.reihe > .karte { scroll-snap-align: start; }
@media (min-width: 600px) { .reihe { grid-auto-columns: 128px; } }
.karte-dienst {
    position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 8px;
    box-shadow: 0 0 0 2px var(--bg), 0 2px 8px rgba(0, 0, 0, .4);
}

/* Kalender */
.kalender-tag + .kalender-tag .abschnitt-titel { margin-top: var(--sp-6); }
.kalender-tag .abschnitt-titel { margin-top: 0; }
.kalender-spaeter .abschnitt-titel { color: var(--accent); }
.kalender-fuss { margin-top: var(--sp-8); font-size: 13px; color: var(--faint); max-width: 60ch; }

/* Meine Dienste auf der Titelseite */
.dienst.mein { border-color: var(--accent-line); background: var(--accent-soft); }
.dienst-mein-haken { color: var(--accent); stroke-width: 3; margin-left: -4px; }
.dienst-bei-dir { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-weight: 650; color: var(--accent); }

/* Meine Dienste (#/dienste) */
.dienste-kopf { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.dienste-status { margin: 0; font-size: 14px; font-weight: 650; color: var(--muted); }
.dienste-liste > .abschnitt-titel:first-child { margin-top: var(--sp-2); }
.dienst-raster {
    list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2);
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.dienst-wahl {
    width: 100%; min-height: 56px; display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    font: 600 14px/1.25 var(--font); text-align: left; cursor: pointer;
    transition: border-color var(--dauer), background-color var(--dauer);
}
.dienst-wahl:hover { border-color: var(--border-2); }
.dienst-wahl img, .dienst-wahl .dienst-ersatz { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.dienst-wahl-name { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.dienst-wahl-haken {
    width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%;
    border: 2px solid var(--border-2); color: transparent;
}
.dienst-wahl-haken .icon { width: 13px; height: 13px; stroke-width: 3.5; }
.dienst-wahl[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
.dienst-wahl[aria-pressed="true"] .dienst-wahl-haken { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.dienste-fuss { margin-top: var(--sp-6); }

/* Bibliothek: vier Auswahlfelder – auf dem Handy zwei je Zeile */
.bib-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .bib-filter { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ----------------------------------------------------------------------------
   Etappe 4: Schnellerfassung (#/schnell)
   Eine Kachel ist ein Knopf; der Zustand liegt als Marke über dem Cover –
   Symbol UND Text, nie nur Farbe. Der Stern zum Bewerten sitzt als eigener
   Knopf oben rechts (kein Knopf im Knopf).
   ---------------------------------------------------------------------------- */

.schnell-art { margin-bottom: var(--sp-3); }
.schnell-suche { margin-bottom: var(--sp-3); }
.schnell-filter { margin-bottom: var(--sp-2); }
.schnell-zaehler { margin: 0 0 var(--sp-4); font-size: 14px; font-weight: 600; color: var(--muted); min-height: 1.4em; }
.schnell-einstieg { margin: var(--sp-6) 0 0; }
.start-hero-knoepfe { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.schnell-karte { position: relative; min-width: 0; }
.schnell-tipp {
    display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0;
    padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.schnell-tipp .cover { transition: transform 140ms var(--ease); }
.schnell-tipp:active .cover { transform: scale(.96); }
.schnell-tipp:focus-visible { outline: none; }
.schnell-tipp:focus-visible .cover { box-shadow: var(--ring); }
.schnell-marke {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--radius); color: #fff; font-size: 13px; font-weight: 750; letter-spacing: .02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
    animation: schnell-marke 180ms var(--ease);
}
.schnell-marke .icon {
    width: 44px; height: 44px; padding: 10px; border-radius: 50%; stroke-width: 3;
    background: rgba(0, 0, 0, .35); box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.schnell-karte[data-zustand="gesehen"] .schnell-marke { background: color-mix(in srgb, var(--pos) 58%, transparent); }
.schnell-karte[data-zustand="gesehen"] .schnell-marke .icon { background: var(--pos); color: var(--bg); }
.schnell-karte[data-zustand="watchlist"] .schnell-marke { background: color-mix(in srgb, var(--accent-fill) 52%, transparent); }
.schnell-karte[data-zustand="watchlist"] .schnell-marke .icon { background: var(--accent-fill); color: var(--accent-ink); }
@keyframes schnell-marke { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

.schnell-wertung {
    position: absolute; right: 4px; top: 4px; min-width: var(--tap); height: var(--tap);
    display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 8px;
    border: 0; border-radius: var(--radius-pill); background: var(--glass); color: var(--accent);
    font: 800 14px/1 var(--font); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.schnell-wertung .icon { fill: currentColor; }
.schnell-wertung.leer { color: var(--text); }
.schnell-wertung.leer .icon { fill: none; }
.schnell-wertung:focus-visible { box-shadow: var(--ring); }
/* Die Profil-Regel (.seite > .seg zentriert, 560 px) gilt hier nicht: links, wie die Filter darunter. */
.seite > .schnell-art { max-width: 420px; margin-inline: 0; }

/* ----------------------------------------------------------------------------
   Glocke (Etappe 7): Abzeichen im Kopf, #/meldungen, Uhrzeit im Profil
   ---------------------------------------------------------------------------- */

.glocke { position: relative; }
.glocke[aria-current="page"] { color: var(--accent); }
.glocke-zahl {
    position: absolute; top: 4px; right: 2px;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--accent-fill); color: var(--accent-ink);
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--bg); pointer-events: none;
}
.glocke-zahl[hidden] { display: none; }

.seite > .meldung, .seite > .meldung-fuss { max-width: 720px; margin-inline: auto; }
/* Die Überschrift steht bündig über der schmalen Liste (auch im Verlauf). */
.seite:has(> .meldung, > .verlauf-tag) > .seite-kopf { max-width: 720px; margin-inline: auto; }
.meldung + .meldung .meldung-kopf { margin-top: var(--sp-6); }
.meldung-kopf { display: flex; align-items: center; gap: var(--sp-2); }
.meldung-liste { list-style: none; margin: 0; padding: 0; }
.meldung-liste li + li { box-shadow: 0 -1px 0 var(--border); }
.meldung-zeile { gap: var(--sp-3); border-bottom: 0; padding: var(--sp-2) var(--sp-3); text-decoration: none; color: inherit; }
.meldung-zeile .list-sub { white-space: normal; }
.meldung-bild { width: 40px; height: 60px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.meldung.is-neu .meldung-liste { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.meldung-fuss { margin-top: var(--sp-6); font-size: 14px; text-align: center; }

.zeit-feld {
    width: auto; min-height: var(--tap); flex: none;
    padding: var(--sp-2) var(--sp-3);
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--border-2); border-radius: var(--radius);
    font: inherit; font-size: 16px; font-variant-numeric: tabular-nums;
}
:root[data-theme="light"] .zeit-feld { background: var(--surface); }
:root[data-theme="dark"] .zeit-feld { color-scheme: dark; }

/* ----------------------------------------------------------------------------
   Freunde, Empfehlungen, Gemeinsam schauen (Etappe 8)
   ---------------------------------------------------------------------------- */

.avatar-xs { width: 20px; height: 20px; font-size: 9px; flex: none; }

/* Freundesblock auf der Titelseite */
.freunde-liste {
    list-style: none; margin: 0; padding: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.freund-zeile { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: var(--sp-2) var(--sp-4); }
.freund-zeile + .freund-zeile { box-shadow: 0 -1px 0 var(--border); }
.freund-zeile .avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.freund-wertung { display: inline-flex; align-items: center; gap: 4px; flex: none; font-weight: 750; color: var(--accent); }
.freunde-leer { margin: 0; font-size: 14px; }
.freunde-abschnitt .abschnitt-titel { display: flex; align-items: baseline; gap: var(--sp-2); }

/* Offene Empfehlung an mich (oben auf der Titelseite) */
.empfehlung-banner {
    display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg);
    background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 65%), var(--surface);
    border: 1px solid var(--accent-line);
}
.empfehlung-kopf { display: flex; align-items: flex-start; gap: var(--sp-3); }
.empfehlung-kopf .avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.empfehlung-kopf .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.empfehlung-notiz { font-style: italic; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.empfehlung-knoepfe { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* Start: Empfehlungen */
.empfehlung-von { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.empfehlung-zeile .empfehlung-notiz { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empfehlung-zeile-knoepfe { display: flex; align-items: center; gap: var(--sp-1); flex: none; }
.empfehlung-zeile .haken-knopf:hover { border-color: var(--accent); color: var(--accent); }

/* Blatt „Empfehlen“ */
.empfehlen-liste {
    list-style: none; margin: 0; padding: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.empfehlen-liste li + li { box-shadow: 0 -1px 0 var(--border); }
.empfehlen-wahl { position: relative; }
.empfehlen-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.haken-feld {
    width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px;
    border: 2px solid var(--border-2); color: transparent; transition: background-color var(--dauer), border-color var(--dauer);
}
.empfehlen-wahl input:checked + .haken-feld { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.empfehlen-wahl input:focus-visible + .haken-feld { box-shadow: var(--ring); }

/* Gemeinsam schauen */
.seite > .gemeinsam-wahl, .seite > .gemeinsam-ergebnis { max-width: 720px; margin-inline: auto; }
.seite:has(> .gemeinsam-wahl) > .seite-kopf { max-width: 720px; margin-inline: auto; }
.gemeinsam-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.freund-chip { display: inline-flex; align-items: center; gap: var(--sp-2); padding-left: var(--sp-2); }
.freund-chip:disabled { opacity: .45; cursor: not-allowed; }
.gemeinsam-wahl .hint { margin: var(--sp-2) 0 0; }
.gemeinsam-abo {
    margin-top: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.gemeinsam-ergebnis { margin-top: var(--sp-6); }
.gemeinsam-hinweis { text-align: center; }
.gemeinsam-kopf { margin-bottom: var(--sp-3); }
.gemeinsam-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.gemeinsam-zeile {
    display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2);
    border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
    color: inherit; text-decoration: none !important;
}
.gemeinsam-zeile:hover { border-color: var(--border-2); }
.gemeinsam-zeile .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gemeinsam-cover { width: 56px; flex: none; border-radius: var(--radius-sm); }
.gemeinsam-wer { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.gemeinsam-abo-liste { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: 2px; }
.dienst-marke {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 4px; border-radius: var(--radius-pill);
    background: var(--surface-2); font-size: 12px; font-weight: 600;
}
.dienst-marke img { border-radius: 5px; }
.dienst-marke:not(:has(img)) { padding-left: 8px; }
.gemeinsam-zeile.is-zufall {
    margin-bottom: var(--sp-4); padding: var(--sp-3);
    background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 65%), var(--surface);
    border-color: var(--accent-line);
}
.gemeinsam-zeile.is-zufall .gemeinsam-cover { width: 84px; }
.gemeinsam-zeile.is-zufall .list-title { font-size: 18px; }
.gemeinsam-vorschlag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* Suchen: zwei Einstiege untereinander */
.schnell-einstieg + .gemeinsam-einstieg { margin-top: var(--sp-2); }

/* Glocke: „Anna empfiehlt dir …“ über der Zeile */
.meldung-titel { margin: 0 0 var(--sp-2); font-weight: 650; }

/* ----------------------------------------------------------------------------
   Statistik (#/statistik, Etappe 9) – Kennzahlen, Karten, Diagramme
   Eine Datenreihe in --reihe; Texte nie in der Datenfarbe (diagramme.js).
   ---------------------------------------------------------------------------- */

.st-filter:not(:empty) { margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); }
.st-inhalt { position: relative; transition: opacity var(--dauer); }
.st-inhalt.is-laedt { opacity: .5; pointer-events: none; }
.st-stand { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }

.st-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@media (min-width: 720px) { .st-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.st-kachel {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
    padding: var(--sp-3) var(--sp-4); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.st-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.st-wert { font: 800 26px/1.15 var(--font-zahl); letter-spacing: -.02em; overflow-wrap: anywhere; }
.st-kachel small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.st-ohne-datum { display: flex; gap: var(--sp-2); align-items: flex-start; margin-top: var(--sp-3); font-size: 13px; color: var(--muted); }
.st-ohne-datum .icon { margin-top: 1px; }

.st-raster { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
@media (min-width: 1100px) { .st-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.st-karte {
    min-width: 0; padding: var(--sp-4); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    container: st-karte / inline-size;
}
.st-karte-kopf { display: flex; gap: var(--sp-3); align-items: flex-start; margin-bottom: var(--sp-3); }
.st-karte h2 { font-size: 17px; font-weight: 700; }
.st-karte-kopf p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.st-leer { font-size: 14px; }
.st-umschalter { margin-bottom: var(--sp-4); }
.seg-klein button { font-size: 14px; }

.st-liste { list-style: none; margin: 0 calc(-1 * var(--sp-2)); padding: 0; }
.st-liste li + li { box-shadow: 0 -1px 0 var(--border); }
.st-zeile { min-height: 0; padding: var(--sp-2); border-bottom: 0; border-radius: var(--radius-sm); }
.cover.st-bild { width: 36px; flex: none; border-radius: 6px; }
.st-bild-leer {
    display: grid; place-items: center; width: 36px; aspect-ratio: 2 / 3; flex: none; border-radius: 6px;
    background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border);
}
.st-zeit { flex: none; font-size: 14px; font-weight: 600; }

/* --- Diagramme (diagramme.js) --- */
.dg { position: relative; }
.dg-plot { position: relative; height: 168px; margin: 22px 0 0 44px; }
.dg-gitter { position: absolute; left: 0; right: 0; bottom: var(--y); height: 0; border-top: 1px solid var(--border); pointer-events: none; }
.dg-gitter.is-basis { border-top-color: var(--border-2); }
.dg-gitter > span {
    position: absolute; right: calc(100% + 6px); top: -8px;
    font-size: 11px; line-height: 16px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dg-spalten { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.dg-spalte { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 100%; outline: none; }
.dg-spalte:focus-visible { box-shadow: var(--ring); border-radius: var(--radius-sm); }
.dg-saeule { position: relative; width: min(24px, 72%); height: var(--h); background: var(--reihe); border-radius: 4px 4px 0 0; transition: filter var(--dauer); }
.dg-saeule.is-null { height: 0; }
.dg-spalte:hover .dg-saeule, .dg-spalte:focus-visible .dg-saeule { filter: brightness(1.18); }
/* Der Höchstwert sitzt oft genau auf der obersten Gitterlinie – ein Grund in
   Kartenfarbe hält die Ziffern lesbar; am Rand wird er nach innen gerückt. */
.dg-wert {
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    padding: 0 3px; border-radius: 3px; background: var(--surface);
    font-size: 12px; font-weight: 700; color: var(--text);
    white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none;
}
.dg-spalte:first-child .dg-wert { left: 0; transform: none; }
.dg-spalte:last-child .dg-wert { left: auto; right: 0; transform: none; }
.dg-x {
    display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 6px 0 0 44px;
    font-size: 11px; color: var(--faint); text-align: center; font-variant-numeric: tabular-nums;
}
.dg-x > span { overflow: hidden; white-space: nowrap; }

/* Ein Tooltip je Ansicht – Wert vorn, Beschriftung dahinter. */
.dg-tip {
    position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 1px;
    padding: 6px 10px; border-radius: var(--radius-sm); pointer-events: none;
    background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 12px; white-space: nowrap;
}
.dg-tip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.dg-tip span { opacity: .82; }

/* Rangliste: Name, Balken, Wert – die Balken auf einer gemeinsamen Grundlinie. */
.dg-balken { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.dg-balken-zeile { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; align-items: center; gap: var(--sp-1) var(--sp-3); }
.dg-balken-name { font-size: 14px; font-weight: 600; }
.dg-balken-spur { display: block; height: 12px; }
.dg-balken-wert { display: block; height: 100%; width: max(var(--w), 2px); background: var(--reihe); border-radius: 0 4px 4px 0; }
.dg-balken-text { min-width: 6.5ch; text-align: right; font-size: 14px; font-weight: 600; line-height: 1.25; }
.dg-balken-text small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
/* Schmal: Name und Wert oben, der Balken darunter in voller Breite. */
@container st-karte (max-width: 440px) {
    .dg-balken-zeile { grid-template-columns: minmax(0, 1fr) auto; }
    .dg-balken-spur { grid-column: 1 / -1; grid-row: 2; }
}

.dg-tabelle { margin-top: var(--sp-2); }
.dg-tabelle summary { display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.dg-tabelle summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
.tabelle-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabelle th, .tabelle td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); font-size: 14px; }
.tabelle tbody tr:last-child > * { border-bottom: 0; }
.tabelle thead th { font-weight: 700; color: var(--muted); }
.tabelle th[scope="row"] { text-align: left; font-weight: 600; color: var(--text); }
