/* ============================================================
   RealityStars Wiki – Design System
   Clean, hell/dunkel (System + Umschalter), Inter (selbst gehostet)
   ============================================================ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations'),
         url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations'),
         url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Tokens ──────────────────────────────────────────────── */
:root {
    color-scheme: light;
    --bg:            #f7f7f9;
    --surface:       #ffffff;
    --surface-2:     #f2f2f6;
    --surface-3:     #e8e8ee;
    --border:        #e4e4ea;
    --border-strong: #d2d2db;
    --text:          #4b4b57;
    --text-strong:   #23232b;
    --heading:       #111118;
    --muted:         #6c6c7a;

    --accent:        #6d4aff;
    --accent-hover:  #5a36f2;
    --accent-soft:   rgba(109, 74, 255, 0.10);
    --accent-border: rgba(109, 74, 255, 0.28);
    --accent-text:   #5534e6;
    --accent-2:      #ff4f9a;

    --green:  #15803d; --green-bg:  rgba(22, 163, 74, 0.12);
    --red:    #c81e1e; --red-bg:    rgba(220, 38, 38, 0.10);
    --yellow: #a16207; --yellow-bg: rgba(202, 138, 4, 0.14);
    --blue:   #1d4ed8; --blue-bg:   rgba(37, 99, 235, 0.10);
    --gold:   #a66b00; --gold-bg:   rgba(234, 170, 0, 0.16);

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-sm: 0 1px 2px rgba(17, 17, 24, 0.05);
    --shadow:    0 1px 2px rgba(17, 17, 24, 0.04), 0 6px 20px rgba(17, 17, 24, 0.06);
    --shadow-lg: 0 18px 50px rgba(17, 17, 24, 0.14);
    --font:      'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --container: 1200px;
    --header-h:  64px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0b0b10; --surface: #13131a; --surface-2: #1a1a23; --surface-3: #24242f;
        --border: #262631; --border-strong: #363642;
        --text: #b3b3c0; --text-strong: #e4e4ec; --heading: #fafafc; --muted: #8b8b9a;
        --accent: #8b72ff; --accent-hover: #a08cff; --accent-soft: rgba(139, 114, 255, 0.16);
        --accent-border: rgba(139, 114, 255, 0.4); --accent-text: #b8a9ff;
        --green: #4ade80; --green-bg: rgba(74, 222, 128, 0.12);
        --red: #f87171; --red-bg: rgba(248, 113, 113, 0.12);
        --yellow: #facc15; --yellow-bg: rgba(250, 204, 21, 0.12);
        --blue: #60a5fa; --blue-bg: rgba(96, 165, 250, 0.12);
        --gold: #fbbf24; --gold-bg: rgba(251, 191, 36, 0.14);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b0b10; --surface: #13131a; --surface-2: #1a1a23; --surface-3: #24242f;
    --border: #262631; --border-strong: #363642;
    --text: #b3b3c0; --text-strong: #e4e4ec; --heading: #fafafc; --muted: #8b8b9a;
    --accent: #8b72ff; --accent-hover: #a08cff; --accent-soft: rgba(139, 114, 255, 0.16);
    --accent-border: rgba(139, 114, 255, 0.4); --accent-text: #b8a9ff;
    --green: #4ade80; --green-bg: rgba(74, 222, 128, 0.12);
    --red: #f87171; --red-bg: rgba(248, 113, 113, 0.12);
    --yellow: #facc15; --yellow-bg: rgba(250, 204, 21, 0.12);
    --blue: #60a5fa; --blue-bg: rgba(96, 165, 250, 0.12);
    --gold: #fbbf24; --gold-bg: rgba(251, 191, 36, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
}

/* ── Basis ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-feature-settings: 'cv11', 'ss01';
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
p  { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 200;
    background: var(--accent); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--heading); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { color: var(--heading); }
.brand-mark {
    width: 32px; height: 32px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; box-shadow: 0 4px 14px rgba(109, 74, 255, 0.35);
}
.brand-mark .icon { width: 18px; height: 18px; fill: currentColor; stroke-width: 1.2; }
.brand-sm .brand-mark { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.brand-sm .brand-mark .icon { width: 14px; height: 14px; }

.main-nav { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.main-nav a {
    padding: 0.5rem 0.875rem; border-radius: 999px;
    color: var(--text); font-size: 0.9375rem; font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { color: var(--heading); background: var(--surface-2); }
.main-nav a.active { color: var(--accent-text); background: var(--accent-soft); }

.icon-btn {
    width: 40px; height: 40px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border); color: var(--text-strong);
    cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn .icon { width: 18px; height: 18px; }
.theme-toggle { margin-left: auto; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 720px) {
    .header-inner { flex-wrap: wrap; height: auto; gap: 0; padding-top: 0.625rem; }
    .main-nav {
        order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none;
        margin: 0.375rem -1.25rem 0; padding: 0 1.25rem 0.625rem;
    }
    .main-nav::-webkit-scrollbar { display: none; }
    .main-nav a { white-space: nowrap; font-size: 0.875rem; padding: 0.4375rem 0.8125rem; }
}

/* ── Main / Footer ───────────────────────────────────────── */
.site-main { flex: 1; width: 100%; max-width: var(--container); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
@media (min-width: 768px) { .site-main { padding: 3rem 2rem 5rem; } }
.site-main.is-wide { max-width: none; padding: 0; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-top: 2rem; padding-bottom: 2rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-nav a { color: var(--text); font-size: 0.875rem; }
.footer-nav a:hover { color: var(--heading); }
.footer-meta { flex-basis: 100%; font-size: 0.8125rem; color: var(--muted); }

.credits { padding-top: 2rem; padding-bottom: 2.5rem; border-top: 1px solid var(--border); }
.credits h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; font-weight: 600; }
.credits ul { list-style: none; columns: 2 320px; column-gap: 2rem; }
.credits li { font-size: 0.75rem; color: var(--muted); line-height: 1.5; padding: 0.15rem 0; break-inside: avoid; }
.credits-label { color: var(--text-strong); font-weight: 500; }
.credits a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.credits a:hover { color: var(--accent-text); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.125rem; border-radius: 999px;
    font: 500 0.9375rem/1.2 var(--font); letter-spacing: -0.01em;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(109, 74, 255, 0.3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text-strong); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--heading); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--heading); }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.btn-danger:hover { background: var(--red-bg); color: var(--red); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.8125rem 1.5rem; font-size: 1rem; }

.link-more { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.9375rem; font-weight: 500; white-space: nowrap; }
.link-more .icon { transition: transform 0.15s; }
.link-more:hover .icon { transform: translateX(3px); }

/* ── Badges & Chips ──────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.125rem 0.625rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; line-height: 1.6; letter-spacing: 0.01em;
    background: var(--surface-2); color: var(--text-strong); border: 1px solid var(--border);
    white-space: nowrap;
}
.badge .icon { width: 0.95em; height: 0.95em; }
.badge-status-laufend, .badge-status-bestaetigt { background: var(--green-bg); color: var(--green); border-color: transparent; }
.badge-status-laufend::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status-beendet, .badge-status-unbekannt { background: var(--surface-2); color: var(--muted); }
.badge-status-pausiert, .badge-status-geruecht { background: var(--yellow-bg); color: var(--yellow); border-color: transparent; }
.badge-status-angekuendigt { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.badge-status-dementiert, .badge-status-abgesagt { background: var(--red-bg); color: var(--red); border-color: transparent; }
.badge-status-aktiv { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge-land { background: var(--surface); }
.badge-gold { background: #f5b301; color: #2b1d00; border-color: #c98f00; font-weight: 600; }   /* gut lesbar auf Fotos und in beiden Themes */
.hof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.hof-list { padding: 1.25rem; }
.hof-list h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; margin: 0 0 .25rem; }
.hof-list ol { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .5rem; }
.hof-list li { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .75rem; }
.hof-rang { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.hof-rang.is-top { background: #f5b301; color: #2b1d00; }
.hof-star { display: flex; align-items: center; gap: .6rem; min-width: 0; color: inherit; text-decoration: none; }
.hof-star:hover .hof-name { text-decoration: underline; }
.hof-avatar { width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; overflow: hidden; display: grid; }
.hof-avatar img, .hof-avatar .placeholder { width: 100%; height: 100%; object-fit: cover; font-size: .75rem; }
.hof-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hof-wert { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.badge-hauptrolle { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge-rolle { background: var(--surface); color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }

.count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem;
    padding: 0 0.5rem; margin-left: 0.5rem; height: 1.5rem; border-radius: 999px;
    background: var(--surface-2); color: var(--muted); font-size: 0.8125rem; font-weight: 600;
    vertical-align: middle; letter-spacing: 0;
}

/* ── Hero (Startseite) ───────────────────────────────────── */
.hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: center;
    padding: 3.5rem; margin-bottom: 4rem;
    border-radius: var(--radius-xl); border: 1px solid var(--border);
    background:
        radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%),
        radial-gradient(70% 90% at 0% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
        var(--surface);
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-text);
    background: var(--accent-soft); padding: 0.3rem 0.75rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.08; margin-bottom: 1.125rem; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.125rem; line-height: 1.65; color: var(--text); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.5rem; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 0.8125rem; color: var(--muted); }
.hero-stats dd { font-size: 1.75rem; font-weight: 700; color: var(--heading); letter-spacing: -0.03em; line-height: 1.1; }

.hero-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; transform: rotate(-4deg); }
.hero-mosaic > * { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.hero-mosaic > :nth-child(3n+2) { transform: translateY(1.5rem); }
.hero-mosaic img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; padding: 2.25rem 1.5rem; }
    .hero-mosaic { display: none; }
}

/* ── Abschnitte ──────────────────────────────────────────── */
.section { margin-bottom: 4rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); font-size: 0.9375rem; margin-top: 0.25rem; }

.page-head { margin-bottom: 2rem; }
.page-head h1 { margin-bottom: 0.5rem; }
.page-head p { color: var(--muted); font-size: 1.0625rem; }

/* ── Toolbar: Filter-Chips + Suche ───────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips a {
    padding: 0.4375rem 0.9375rem; border-radius: 999px;
    font-size: 0.875rem; font-weight: 500; color: var(--text);
    background: var(--surface); border: 1px solid var(--border);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chips a:hover { border-color: var(--border-strong); color: var(--heading); }
.chips a.active { background: var(--heading); border-color: var(--heading); color: var(--bg); }

.search { position: relative; flex: 0 1 320px; min-width: 220px; }
.search .icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
    width: 100%; padding: 0.625rem 1rem 0.625rem 2.5rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--heading);
    font: 400 0.9375rem var(--font); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ── Platzhalter & Avatare ───────────────────────────────── */
.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, hsl(var(--hue, 260) 62% 88%), hsl(calc(var(--hue, 260) + 35) 55% 76%));
    color: hsl(var(--hue, 260) 45% 30%); font-weight: 700; letter-spacing: 0.02em; user-select: none;
}
:root[data-theme="dark"] .placeholder {
    background: linear-gradient(135deg, hsl(var(--hue, 260) 32% 26%), hsl(calc(var(--hue, 260) + 35) 36% 19%));
    color: hsl(var(--hue, 260) 70% 84%);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .placeholder {
        background: linear-gradient(135deg, hsl(var(--hue, 260) 32% 26%), hsl(calc(var(--hue, 260) + 35) 36% 19%));
        color: hsl(var(--hue, 260) 70% 84%);
    }
}
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex-shrink: 0; font-size: 0.8125rem; }
img.avatar { background: var(--surface-2); }
.avatar.placeholder { font-size: 0.75rem; }
.avatar-lg { width: 44px; height: 44px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack > * { width: 32px; height: 32px; margin-left: -8px; border: 2px solid var(--surface); box-sizing: content-box; }
.avatar-stack > :first-child { margin-left: 0; }
.avatar-more { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 0.6875rem; font-weight: 600; }

/* ── Karten-Grids ────────────────────────────────────────── */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.star-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 1.25rem; }
@media (max-width: 540px) {
    .star-grid { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
    .show-grid { grid-template-columns: 1fr; }
}

.show-card, .star-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    color: inherit; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.show-card:hover, .star-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); color: inherit; }

.show-card-media { aspect-ratio: 16 / 9; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.show-card-media img.is-logo { max-width: 78%; max-height: 70%; object-fit: contain; }
.show-card-media img.is-photo, .show-card-media .placeholder { width: 100%; height: 100%; object-fit: cover; }
.show-card-media .placeholder { font-size: 2rem; }
.show-card-body { padding: 1rem 1.125rem 1.125rem; display: flex; flex-direction: column; gap: 0.375rem; flex: 1; }
.show-card-title { font-size: 1rem; line-height: 1.3; }
.show-card-meta { font-size: 0.8125rem; color: var(--muted); }
.show-card .badges { margin-top: auto; padding-top: 0.5rem; }

.star-card-media { aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; position: relative; }
.star-card-media img, .star-card-media .placeholder { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 0.4s ease; }
.star-card:hover .star-card-media img { transform: scale(1.04); }
.star-card-media .placeholder { font-size: 2.25rem; }
.star-card-media .badge { position: absolute; top: 0.625rem; left: 0.625rem; box-shadow: var(--shadow-sm); }
.star-card-body { padding: 0.75rem 0.875rem 0.875rem; }
.star-card-name { font-size: 0.9375rem; line-height: 1.3; }
.star-card-meta { font-size: 0.8125rem; color: var(--muted); margin-top: 0.125rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Detailseiten ────────────────────────────────────────── */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted); margin-bottom: 1.75rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--heading); }
.breadcrumb span[aria-hidden] { opacity: 0.5; }

.detail-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-bottom: 3rem; }
.detail-hero.is-show { grid-template-columns: 380px minmax(0, 1fr); }
.detail-media { margin: 0; }
.detail-media > img, .detail-media > .placeholder {
    width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.detail-media > img { background: var(--surface-2); }
.is-star .detail-media > img, .is-star .detail-media > .placeholder { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.is-star .detail-media > .placeholder { font-size: 4rem; }
.is-show .detail-media > img, .is-show .detail-media > .placeholder { aspect-ratio: 16 / 10; object-fit: contain; padding: 2rem; }
.is-show .detail-media > img.is-photo { object-fit: cover; padding: 0; }
.is-show .detail-media > .placeholder { font-size: 3.5rem; padding: 0; }
.detail-media figcaption { margin-top: 0.625rem; font-size: 0.75rem; color: var(--muted); line-height: 1.5; }
.detail-media figcaption a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }

.detail-info h1 { margin: 0.75rem 0 0.5rem; }
.detail-info .subtitle { font-size: 1.0625rem; color: var(--muted); }
.detail-info .lead { margin-top: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-top: 1.75rem; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 0.875rem 1rem; }
.facts dt { font-size: 0.75rem; color: var(--muted); font-weight: 500; margin-bottom: 0.125rem; }
.facts dd { color: var(--heading); font-weight: 600; font-size: 0.9375rem; }
.facts dd a { color: var(--heading); }
.facts dd a:hover { color: var(--accent-text); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.5rem; }
.social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.social a { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; padding: 0.375rem 0.75rem; border-radius: 999px; background: var(--surface-2); color: var(--text-strong); }
.social a:hover { background: var(--surface-3); color: var(--heading); }

@media (max-width: 860px) {
    .detail-hero, .detail-hero.is-show { grid-template-columns: 1fr; gap: 1.75rem; }
    .is-star .detail-media { max-width: 260px; }
}

.content-section { margin-bottom: 3rem; }
.content-section > h2 { margin-bottom: 1.25rem; display: flex; align-items: center; }
.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--text-strong); max-width: 46rem; }
.prose p + p { margin-top: 1rem; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state p { color: var(--muted); }

/* Staffel-Liste (Show-Seite) */
.season-list { display: flex; flex-direction: column; gap: 0.75rem; }
.season-card {
    display: flex; align-items: center; gap: 1.25rem; padding: 1rem 1.25rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    color: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.season-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow); color: inherit; }
.season-num {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 1.25rem; line-height: 1;
}
.season-num small { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem; }
.season-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.season-body h3 { font-size: 1rem; }
.season-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; font-size: 0.8125rem; color: var(--muted); }
.season-meta .sep { opacity: 0.5; }
.season-card > .icon { color: var(--muted); }
@media (max-width: 600px) { .season-card .avatar-stack { display: none; } }

/* Teilnahmen (Star-Seite) */
.appearance-list { display: flex; flex-direction: column; gap: 0.625rem; }
.appearance {
    display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem 0.75rem 0.75rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    color: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.appearance:hover { border-color: var(--accent-border); box-shadow: var(--shadow); color: inherit; }
.appearance-logo { width: 72px; height: 48px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.appearance-logo img.is-logo { max-width: 85%; max-height: 75%; object-fit: contain; }
.appearance-logo img.is-photo, .appearance-logo .placeholder { width: 100%; height: 100%; object-fit: cover; font-size: 1rem; }
.appearance-body { flex: 1; min-width: 0; }
.appearance-body strong { display: block; color: var(--heading); font-weight: 600; font-size: 0.9375rem; line-height: 1.35; }
.appearance-body span { font-size: 0.8125rem; color: var(--muted); }

/* Beziehungen */
.relation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }
.relation {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: inherit;
    border-left: 3px solid var(--rel-color, var(--border-strong));
    transition: box-shadow 0.15s;
}
.relation:hover { box-shadow: var(--shadow); color: inherit; }
.relation strong { display: block; color: var(--heading); font-size: 0.9375rem; font-weight: 600; }
.relation span { font-size: 0.8125rem; color: var(--muted); }
.rel-romantik { --rel-color: #e64992; }
.rel-familie { --rel-color: #e0a100; }
.rel-freundschaft { --rel-color: #22a35a; }
.rel-konflikt { --rel-color: #e5484d; }
.rel-beruflich { --rel-color: #3b82f6; }
.rel-show { --rel-color: #8e8ea0; }

.costar-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.costar-group h3 { font-size: 0.875rem; font-weight: 600; color: var(--text-strong); margin-bottom: 0.625rem; }
.costar-group h3 a { color: var(--text-strong); }
.costar-group h3 a:hover { color: var(--accent-text); }
.person-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.person-chip {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.875rem 0.25rem 0.25rem;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text-strong); font-size: 0.875rem; font-weight: 500; transition: border-color 0.15s, background 0.15s;
}
.person-chip:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--heading); }
.person-chip .avatar { width: 28px; height: 28px; font-size: 0.6875rem; }

/* Staffel-Navigation */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.pager a { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Ankündigungen */
.news-list { display: flex; flex-direction: column; }
.news-list.panel { padding: 0.25rem 1.5rem; }
.news-item { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.5rem; }
.news-meta a { color: var(--text-strong); font-weight: 500; }
.news-item h3 { font-size: 1.0625rem; margin-bottom: 0.375rem; }
.news-item p { font-size: 0.9375rem; color: var(--text); }
.news-item.compact p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Startseite: Netzwerk-Teaser + News nebeneinander */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.5rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.teaser {
    position: relative; overflow: hidden; padding: 2rem; border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #2a1a78, #6d4aff 55%, #ff4f9a); color: #fff;
    display: flex; flex-direction: column; gap: 1rem; min-height: 280px;
}
.teaser .eyebrow { align-self: flex-start; margin-bottom: 0; background: rgba(255, 255, 255, 0.16); color: #fff; }
.teaser h2 { color: #fff; font-size: 1.625rem; }
.teaser p { color: rgba(255, 255, 255, 0.85); max-width: 26rem; }
.teaser .btn { align-self: flex-start; margin-top: auto; background: #fff; color: #2a1a78; }
.teaser .btn:hover { background: rgba(255, 255, 255, 0.9); color: #2a1a78; }
.teaser-art { position: absolute; right: -40px; bottom: -40px; width: 260px; height: 260px; opacity: 0.25; color: #fff; }
.teaser-art .icon { width: 100%; height: 100%; stroke-width: 0.8; }

/* ── Netzwerk ────────────────────────────────────────────── */
.network-page { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - var(--header-h)); min-height: 560px; }
.network-sidebar { border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.5rem; }
.network-sidebar h1 { font-size: 1.375rem; }
.network-sidebar .intro { font-size: 0.875rem; color: var(--muted); margin-top: 0.375rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label, .field-title { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.field select, .field input[type="search"] {
    width: 100%; padding: 0.5625rem 0.75rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg); color: var(--heading); font: 400 0.9375rem var(--font);
}
.field select:focus, .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.legend { display: flex; flex-direction: column; gap: 0.25rem; }
.legend label { display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; color: var(--text-strong); cursor: pointer; padding: 0.3rem 0; text-transform: none; letter-spacing: 0; font-weight: 450; }
.legend input { accent-color: var(--accent); width: 16px; height: 16px; }
.legend .swatch { width: 22px; height: 0; border-top: 3px solid var(--rel-color); border-radius: 2px; }
.legend .swatch.is-dotted { border-top-style: dotted; }
.legend small { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.network-hint { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.network-stage { position: relative; background: var(--bg); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; }
#graph { position: absolute; inset: 0; }
.stage-tools { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; z-index: 5; }
.stage-tools .icon-btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.stage-status { position: absolute; left: 1rem; bottom: 1rem; z-index: 5; max-width: min(34rem, calc(100% - 2rem)); font-size: 0.8125rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 0.375rem 0.75rem; border-radius: 999px; }
.stage-status:has(.stage-hint) { border-radius: var(--radius); }
.stage-hint { display: block; margin-top: 0.125rem; font-size: 0.75rem; line-height: 1.4; }
.graph-tooltip {
    position: absolute; z-index: 20; pointer-events: none; max-width: 280px;
    background: var(--surface); color: var(--text-strong); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.625rem 0.75rem; font-size: 0.8125rem; line-height: 1.45;
}
.graph-tooltip strong { color: var(--heading); display: block; font-size: 0.875rem; margin-bottom: 0.125rem; }
.info-card {
    position: absolute; top: 1rem; left: 1rem; z-index: 6; width: min(320px, calc(100% - 2rem));
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; max-height: calc(100% - 2rem); overflow-y: auto;
}
.info-card-head { display: flex; align-items: center; gap: 0.75rem; }
.info-card-head img, .info-card-head .placeholder { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; object-position: center 20%; font-size: 1.125rem; flex-shrink: 0; }
.info-card-head strong { display: block; color: var(--heading); font-size: 1rem; line-height: 1.3; }
.info-card-head span { font-size: 0.8125rem; color: var(--muted); }
.info-card .close { position: absolute; top: 0.5rem; right: 0.5rem; width: 32px; height: 32px; border: none; }
.info-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.375rem; font-size: 0.8125rem; }
.info-card li { display: flex; gap: 0.5rem; align-items: baseline; }
.info-card li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rel-color); flex-shrink: 0; transform: translateY(-1px); }
.info-card li button { background: none; border: none; color: var(--accent-text); font: inherit; cursor: pointer; padding: 0; text-align: left; }
.info-card li button:hover { text-decoration: underline; }
.info-card .btn { align-self: stretch; justify-content: center; }   /* direkt unter dem Kopf, ohne Scrollen sichtbar */

.field-row { display: flex; flex-direction: column; gap: 1.5rem; }

@media (max-width: 900px) {
    .network-page { grid-template-columns: 1fr; grid-template-rows: auto minmax(520px, 1fr); height: auto; }
    .network-sidebar { border-right: none; border-bottom: 1px solid var(--border); padding: 1.25rem; gap: 1rem; }
    .network-sidebar .intro, .network-hint .hint-extra { display: none; }
    .field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
    .field-row select { padding: 0.5rem 0.5rem; font-size: 0.875rem; }
    .legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
    .legend label { min-width: 0; }
    .network-filters, .network-filters-body, .field, .field-row > * { min-width: 0; }
    .field select { width: 100%; min-width: 0; }
    .network-stage { min-height: 72vh; }
}
@media (max-width: 560px) {           /* Handy, auch mit großer Systemschrift: alles untereinander */
    .field-row { grid-template-columns: 1fr; gap: 0.75rem; }
    .field-row select { font-size: 1rem; padding: 0.625rem 0.75rem; }
    .legend { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .search { flex: 1 1 100%; }
}

/* ── Tabellen ────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
    padding: 0.75rem 1.125rem; text-align: left; white-space: nowrap;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border);
}
td { padding: 0.8125rem 1.125rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-strong); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* ── Formulare ───────────────────────────────────────────── */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; max-width: 760px; }
.form-group { margin-bottom: 1.25rem; }
.form-label, .form-group > label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-strong); margin-bottom: 0.375rem; }
.form-control,
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], input[type="url"], input[type="file"], select, textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--border-strong); color: var(--heading);
    padding: 0.5625rem 0.875rem; border-radius: var(--radius-sm);
    font: 400 0.9375rem var(--font); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.form-hint { font-size: 0.8125rem; color: var(--muted); margin-top: 0.3rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* ── Hinweise ────────────────────────────────────────────── */
.alert { padding: 0.875rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.5rem; border: 1px solid transparent; }
.alert ul { margin-left: 1.25rem; }
.alert-success { background: var(--green-bg); color: var(--green); }
.alert-error   { background: var(--red-bg); color: var(--red); }
.alert-info    { background: var(--blue-bg); color: var(--blue); }
.alert-warn    { background: var(--yellow-bg); color: var(--yellow); }

/* ── Allgemeine Karten (u. a. Admin) ─────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.375rem; display: flex; flex-direction: column; gap: 0.625rem; }
.card h3 { font-size: 0.9375rem; }
.card h3 a { color: var(--heading); }
.card .card-meta { font-size: 0.8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.card-box, .detail-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.detail-section h2 { font-size: 1rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; align-items: start; }

/* ── Login ───────────────────────────────────────────────── */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.login-card .subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* ── Admin ───────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; width: 100%; }
.admin-sidebar {
    width: 232px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar-logo {
    padding: 1.125rem 1.25rem; font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.02em; color: var(--heading);
    border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.625rem;
}
.admin-sidebar-logo > span:first-child {
    width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 0.75rem;
}
.admin-sidebar-nav { padding: 0.75rem 0.625rem; flex: 1; }
.admin-sidebar-nav a {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; margin-bottom: 2px;
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.875rem; font-weight: 500;
    transition: background 0.12s, color 0.12s;
}
.admin-sidebar-nav a:hover { background: var(--surface-2); color: var(--heading); }
.admin-sidebar-nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.admin-sidebar-section { padding: 1rem 0.75rem 0.375rem; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.admin-content { flex: 1; min-width: 0; padding: 2rem 2.5rem; }
.admin-page-header, .admin-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.admin-page-header h1, .admin-topbar h1 { font-size: 1.5rem; margin: 0; }
.admin-page-header-right, .admin-topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.admin-topbar .theme-toggle { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: transparent; cursor: pointer; }

.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
.admin-filter { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; max-width: 420px; }
.admin-filter .form-label { margin: 0; white-space: nowrap; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.form-row input { min-width: 0; }
.kat { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.kat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rel-color, var(--muted)); }
.rel-arrow { color: var(--muted); font-weight: 600; }
tr.is-editing td { background: var(--accent-soft); }
@media (max-width: 1100px) { .admin-split { grid-template-columns: 1fr; } }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.375rem; display: flex; flex-direction: column; gap: 0.25rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--heading); letter-spacing: -0.03em; line-height: 1; }
.stat-label { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.stat-change { font-size: 0.75rem; color: var(--green); }

/* ── Sonstiges ───────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.text-muted  { color: var(--muted); }
.text-strong { color: var(--text-strong); }
.text-accent { color: var(--accent-text); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.8125rem; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.1em 0.4em; font-size: 0.85em; font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace; color: var(--accent-text); }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; overflow-x: auto; font-size: 0.8125rem; line-height: 1.7; color: var(--text-strong); }
details summary { cursor: pointer; user-select: none; }

.error-page { text-align: center; padding: 5rem 1rem; }
.error-page .code { font-size: 5rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { margin: 1rem 0 0.5rem; font-size: 1.75rem; }
.error-page p { color: var(--muted); margin-bottom: 1.75rem; }
.error-page .hero-actions { justify-content: center; margin-top: 0; }

@media (max-width: 900px) {
    .admin-sidebar { display: none; }
    .admin-content { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Quellen ── */
.source-note { margin: -0.25rem 0 0.75rem; font-size: 0.875rem; }
.source-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.375rem; font-size: 0.875rem; }
.source-list li { color: var(--muted); }
.source-list a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; word-break: break-word; }
.source-list a:hover { text-decoration-color: currentColor; }
.source-host { margin-left: 0.375rem; font-size: 0.75rem; color: var(--muted); }

/* Vollständigkeit der Teilnehmerliste je Staffel */
.badge-vollst { font-weight: 600; }
.badge-vollst-vollstaendig  { background: #dcf5e3; color: #0f5b2a; border-color: #8fd3a5; }
.badge-vollst-teilweise     { background: #fff1d6; color: #6b4300; border-color: #f0c36b; }
.badge-vollst-unbekannt     { background: #eef0f4; color: #3c4250; border-color: #c9ced8; }
.badge-vollst-nicht-erfasst { background: #fde4e4; color: #7a1616; border-color: #f0a3a3; }

/* Instagram-Zwei-Klick-Einbettung */
.ig-embed { max-width: 540px; overflow: hidden; }
.ig-embed iframe { max-width: 100% !important; }
.ig-consent { border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ig-consent p { font-size: 0.875rem; color: var(--muted); margin: 0; }
.ig-consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.ig-remember { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--muted); cursor: pointer; }
.ig-direct { font-size: 0.8125rem; }
.ig-revoke { margin-top: 0.5rem; }
.ig-embed .instagram-media { min-width: 0 !important; width: 100% !important; }

/* Netzwerk: Filter-Block (auf Mobile zuklappbar) */
.network-filters > summary { display: none; }
.network-filters-body { display: flex; flex-direction: column; gap: 1.5rem; }
@media (max-width: 900px) {
    .network-filters { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
    .network-filters > summary { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.875rem; cursor: pointer;
        font-weight: 600; color: var(--heading); list-style: none; }
    .network-filters > summary::-webkit-details-marker { display: none; }
    .network-filters > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
    .network-filters[open] > summary::after { transform: rotate(-135deg); }
    .network-filters > summary small { font-weight: 500; color: var(--accent-text); }
    .network-filters-body { padding: 0 0.875rem 0.875rem; gap: 1rem; }
}

/* Impressum / Datenschutz */
.legal h2 { font-size: 1.125rem; margin: 2rem 0 0.5rem; }
.legal h2:first-child { margin-top: 0; }
.legal a { color: var(--accent-text); overflow-wrap: anywhere; }
.legal mark.fehlt { background: #fde4e4; color: #7a1616; padding: 0 0.25rem; border-radius: 4px; }

/* Lange Bildnachweis-Listen (z. B. Netzwerk) zugeklappt */
.credits details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.credits details > summary::-webkit-details-marker { display: none; }
.credits details > summary h2 { margin: 0; }
.credits details > summary::after { content: "anzeigen"; font-size: 0.8125rem; color: var(--accent-text); }
.credits details[open] > summary::after { content: "ausblenden"; }
.credits details[open] > summary { margin-bottom: 0.75rem; }
