:root {
    /* ── Design Tokens: Space Scale (0.25rem Basis) ── */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* ── Design Tokens: Radius Scale ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* ── Design Tokens: Type Scale ── */
    --text-xs:   0.72rem;
    --text-sm:   0.85rem;
    --text-base: 0.95rem;
    --text-md:   1.05rem;
    --text-lg:   1.15rem;
    --text-xl:   1.35rem;
    --text-2xl:  1.6rem;
    --text-3xl:  2rem;
    --leading-tight:  1.2;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;

    /* ── Design Tokens: Shadow Scale ── */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 4px -1px rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.12), 0 8px 10px -6px rgba(0,0,0,0.06);
    /* Legacy-Aliase für bestehenden Code */
    --shadow-soft: var(--shadow-md);
    --shadow-hover: var(--shadow-lg);

    /* ── Design Tokens: Motion ── */
    --motion-fast:   120ms;
    --motion-normal: 200ms;
    --motion-slow:   320ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    /* ── Semantische Status-Farben ── */
    --success:      #10b981;
    --success-soft: rgba(16,185,129,0.15);
    --warning:      #f59e0b;
    --warning-soft: rgba(245,158,11,0.15);
    --info:         #3b82f6;
    --info-soft:    rgba(59,130,246,0.15);
    --danger:       #e11d48;
    --danger-soft:  rgba(225,29,72,0.15);

    /* ── Basis-Farben ── */
    --bg-color: #f0f2f5;
    --paper-color: #ffffff;
    --brand-dark: #1e293b;
    --sidebar-bg: #f1f5f9;
    --sidebar-text: #334155;
    --sidebar-hover: #e2e8f0;
    --sidebar-active-text: #0f172a;
    --sidebar-border: rgba(0,0,0,0.08);
    --sidebar-toggle-hover: rgba(0,0,0,0.04);
    --sidebar-switch-bg: rgba(0,0,0,0.15);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-red: #e11d48;
    --accent-red-hover: #be123c;
    --border-color: #e2e8f0;
    --focus-ring: 0 0 0 3px rgba(225,29,72,0.35);
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #b45309;
}

/* ── Dark Mode ── */
body.dark-mode {
    --bg-color: #0b1120;
    --paper-color: #1a2234;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #2d3f57;
    --sidebar-bg: #060c18;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #1a2234;
    --sidebar-active-text: #ffffff;
    --sidebar-border: rgba(255,255,255,0.1);
    --sidebar-toggle-hover: rgba(255,255,255,0.05);
    --sidebar-switch-bg: rgba(255,255,255,0.2);
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 4px -1px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.45);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.55);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6);
    --shadow-soft: var(--shadow-md);
    --shadow-hover: var(--shadow-lg);
    --success-soft: rgba(16,185,129,0.22);
    --warning-soft: rgba(245,158,11,0.22);
    --info-soft:    rgba(59,130,246,0.22);
    --danger-soft:  rgba(225,29,72,0.22);
    --focus-ring: 0 0 0 3px rgba(251,113,133,0.5);
}

/* ── Accessibility: Focus-Ringe ── */
:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* ── Accessibility: Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
body.dark-mode .data-table th           { background: var(--paper-color); color: #94a3b8; box-shadow: inset 0 -1px 0 var(--border-color); }
body.dark-mode .data-table th:hover     { background: #1f2937; color: #e2e8f0; }
body.dark-mode .data-table tbody tr:nth-child(even) td { background-color: rgba(255,255,255,0.025); }
body.dark-mode .data-table tbody tr:hover td { background: #1f2f45; }
body.dark-mode .data-table td           { color: var(--text-main); }
body.dark-mode .form-control            { background: #1a2234; color: var(--text-main); border-color: var(--border-color); }
body.dark-mode .rank-chart-card         { background: #1a2234; }
body.dark-mode .search-input            { background: #1a2234; color: var(--text-main); }
body.dark-mode .h2h-stat                { background: #131e30; }
body.dark-mode .tipper-toggle           { border-color: #334155; color: var(--text-main); }
body.dark-mode .tipper-toggle:not(.active) { opacity: 0.6; }
body.dark-mode .saison-table td         { color: var(--text-main); }
body.dark-mode .btn-sm                  { background: #1a2234; color: #94a3b8; border-color: #2d3f57; }
body.dark-mode .btn-sm:hover            { border-color: var(--accent-red); color: var(--accent-red); }
body.dark-mode .chip-vorstand           { background: #334155; }
body.dark-mode .chip-none               { background: var(--paper-color); border-color: var(--border-color); }
body.dark-mode .record-card             { background: var(--paper-color); }
body.dark-mode .record-card .rec-value  { color: #e2e8f0; }
body.dark-mode .season-nav-btn          { background: #1a2234; color: var(--text-main); border-color: #2d3f57; }
body.dark-mode .season-nav-btn:hover:not(:disabled) { background: #131e30; }
body.dark-mode .rank-gold   { background: rgba(245,158,11,0.25); color: #fcd34d; }
body.dark-mode .rank-silver { background: rgba(148,163,184,0.2);  color: #cbd5e1; }
body.dark-mode .rank-bronze { background: rgba(180,83,9,0.2);     color: #fbbf24; }
body.dark-mode .rank-last   { background: rgba(225,29,72,0.2);    color: #fb7185; }
body.dark-mode .penalty-table th       { background: #131e30; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: #e2e8f0; }

/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 0);
    background-size: 20px 20px;
    background-position: -10px -10px;
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width var(--motion-normal) var(--ease-out), background-color 0.3s;
}

.sidebar-header {
    padding: 1rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    min-height: 68px;
    gap: 0.5rem;
}
.header-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}
.sidebar-brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--motion-fast) var(--ease-out);
}
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--sidebar-text);
    transition: background var(--motion-fast) var(--ease-out), transform var(--motion-normal) var(--ease-out);
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: var(--sidebar-toggle-hover); color: var(--sidebar-active-text); }
.sidebar-collapse-btn svg { width: 16px; height: 16px; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 0.15rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    transition: background var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-active-text);
}
.sidebar-nav .nav-link.active .nav-icon { color: var(--accent-red); }

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
}
.nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--motion-fast) var(--ease-out);
}
.nav-kbd {
    font-size: 0.65rem;
    background: var(--sidebar-toggle-hover);
    border: 1px solid var(--sidebar-border);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
    font-family: inherit;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-divider { height: 1px; background: var(--sidebar-border); margin: 0.5rem 0.5rem; }

.sidebar-nav .nav-link.nav-sub {
    padding-left: 1.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.85;
    margin-top: -0.15rem;
}
.sidebar-nav .nav-link.nav-sub .nav-icon { width: 16px; height: 16px; }

/* ── Collapsed Sidebar (Icon-only) ── */
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-kbd,
.sidebar.collapsed .dm-label,
.sidebar.collapsed .toolbar-user { opacity: 0; pointer-events: none; width: 0; display: none; }

.sidebar.collapsed .sidebar-header { 
    padding: 1rem 0.25rem; 
    flex-direction: column-reverse; 
    justify-content: flex-start;
    gap: 1rem;
}
.sidebar.collapsed .header-toolbar {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.sidebar.collapsed .sidebar-collapse-btn { transform: rotate(180deg); margin-bottom: 0.5rem; }
.sidebar.collapsed .sidebar-nav { padding: 1rem 0.5rem; }
.sidebar.collapsed .sidebar-nav .nav-link {
    padding: 0.6rem;
    justify-content: center;
    gap: 0;
}
.sidebar.collapsed .sidebar-nav .nav-link.nav-sub { padding-left: 0.6rem; }
.sidebar.collapsed .nav-divider { margin: 0.5rem 0.25rem; }
.sidebar.collapsed .dark-mode-toggle { padding: 0.85rem; justify-content: center; gap: 0; }
.sidebar.collapsed .dm-switch { display: none; }
.sidebar.collapsed + .main-content,
.main-content.sidebar-collapsed { margin-left: 68px; }

/* Tooltip when collapsed */
.sidebar.collapsed .sidebar-nav .nav-link { position: relative; }
.sidebar.collapsed .sidebar-nav .nav-link::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-dark);
    color: #fff;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-fast) var(--ease-out);
    z-index: 200;
    box-shadow: var(--shadow-md);
}
.sidebar.collapsed .sidebar-nav .nav-link:hover::after { opacity: 1; }

/* ── Collapsible nav groups ── */
.nav-group { margin: 0; }
.nav-group summary {
    list-style: none;
    color: var(--sidebar-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    user-select: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after {
    content: '›';
    margin-left: auto;
    font-size: 1.1rem;
    transition: transform 0.2s;
    opacity: 0.6;
}
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group summary:hover { background-color: var(--sidebar-hover); color: var(--sidebar-active-text); }
.nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-bottom: 0.25rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.dark-mode-toggle:hover { background: var(--sidebar-toggle-hover); }
.dark-mode-toggle .dm-switch {
    margin-left: auto;
    width: 40px;
    height: 22px;
    background: var(--sidebar-switch-bg);
    border-radius: 11px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}
.dark-mode-toggle .dm-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}
body.dark-mode .dark-mode-toggle .dm-switch { background: var(--accent-red); }
body.dark-mode .dark-mode-toggle .dm-switch::after { transform: translateX(18px); }

/* ── Main Content ── */
.main-content { flex: 1; margin-left: 260px; padding: 2rem; position: relative; }
.container { max-width: 1400px; margin: 0 auto; }

h1, h2, h3 { font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem; }
/* Links sind standardmäßig neutral (erben Textfarbe), nur explizite Akzent-Links sind rot.
   Hover hebt mit Akzentfarbe hervor — WCAG-freundlicher als "alles rot". */
a { color: inherit; text-decoration: none; transition: color var(--motion-fast) var(--ease-out); }
a:hover { color: var(--accent-red); }
.link-accent { color: var(--accent-red); }
.link-accent:hover { color: var(--accent-red-hover); }
.back-link { font-size: 0.9rem; color: var(--text-muted); display: inline-block; margin-bottom: 0.25rem; }

/* ── Utilities ── */
.mt-2 { margin-top: 2rem; }
.card {
    background: var(--paper-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}
.card:hover { box-shadow: var(--shadow-hover); }
/* Dark Mode: Karten heben sich kaum vom Hintergrund ab → mehr Kontrast,
   subtiles Top-Highlight (inset weiß) für Tiefenwirkung, stärkerer Border. */
body.dark-mode .card {
    border-color: rgba(255,255,255,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        var(--shadow-soft);
}
body.dark-mode .card:hover {
    border-color: rgba(255,255,255,0.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        var(--shadow-hover);
}
.p-lg { padding: 2rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; }

/* ══════════════════════════════════════════════════════════════
   UTILITY-KLASSEN — ersetzen wiederkehrende Inline-Styles aus views.js
   ══════════════════════════════════════════════════════════════ */

/* Text-Farben (semantisch) */
.txt-muted   { color: var(--text-muted); }
.txt-main    { color: var(--text-main); }
.txt-accent  { color: var(--accent-red); }
.txt-success { color: var(--success); }
.txt-warning { color: var(--warning); }
.txt-info    { color: var(--info); }
.txt-danger  { color: var(--danger); }
.txt-bronze  { color: var(--bronze); }
.txt-orange  { color: #f97316; }

/* Schrift-Größen (an Type-Scale gekoppelt) */
.txt-xs { font-size: var(--text-xs); }
.txt-sm { font-size: var(--text-sm); }
.txt-md { font-size: var(--text-md); }
.txt-lg { font-size: var(--text-lg); }

/* Schrift-Gewicht / Stil */
.txt-bold     { font-weight: 700; }
.txt-semibold { font-weight: 600; }
.txt-italic   { font-style: italic; }

/* Flex-Layouts */
.row             { display: flex; align-items: center; }
.row-center      { display: flex; align-items: center; gap: 0.5rem; }
.row-between     { display: flex; justify-content: space-between; align-items: center; }
.row-between-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; }
.row-end         { display: flex; justify-content: flex-end; gap: 0.75rem; }
.row-wrap        { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.stack-xs        { display: flex; flex-direction: column; gap: 0.25rem; }
.stack-sm        { display: flex; flex-direction: column; gap: 0.4rem; }
.stack-md        { display: flex; flex-direction: column; gap: 0.75rem; }

/* Status-Pillen (Kastenwetten / Badges) */
.status-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    color: #fff;
}
.status-pill.success { background: var(--success); }
.status-pill.danger  { background: var(--danger); }
.status-pill.info    { background: var(--info); }
.status-pill.warning { background: var(--warning); color: #78350f; }

/* Buttons (Kastenwetten Modal/Cards) */
.btn-ghost,
.btn-primary,
.btn-danger {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: opacity var(--motion-fast), transform var(--motion-fast);
}
.btn-ghost {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-weight: 500;
}
.btn-primary {
    border: none;
    background: var(--info);
    color: #fff;
}
.btn-danger {
    border: none;
    background: var(--danger);
    color: #fff;
}
.btn-ghost:hover,
.btn-primary:hover,
.btn-danger:hover { opacity: 0.85; }
.btn-ghost:active,
.btn-primary:active,
.btn-danger:active { transform: scale(0.97); }
.btn-xs {
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: opacity var(--motion-fast);
}
.btn-xs.ghost  { border: 1px solid var(--border-color); background: transparent; color: var(--text-main); }
.btn-xs.danger { border: none; background: var(--danger); color: #fff; }
.btn-xs:hover  { opacity: 0.85; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-panel {
    background: var(--paper-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    width: min(560px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}
.modal-field        { margin-bottom: 0.9rem; }
.modal-field--last  { margin-bottom: 1.1rem; }
.modal-label        { display: block; font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.modal-input        { width: 100%; padding: 0.55rem 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--paper-color); color: var(--text-main); font-size: var(--text-sm); box-sizing: border-box; }
.modal-input:focus  { outline: none; border-color: var(--info); }

/* Detail-Block (Label + Value), z. B. Saison-Detail */
.detail-block       { margin-top: 0.75rem; }
.detail-label       { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value       { font-weight: 700; margin-top: 0.15rem; }
.detail-value--italic { font-style: italic; color: var(--accent-red); margin-top: 0.15rem; }

/* Helfer */
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 0.75rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 0.75rem; }

/* Highlight-Ticker (oben rechts in der Übersicht) */
.ticker-year   { font-size: 1.5rem; font-weight: 800; color: var(--accent-red); line-height: 1; }
.ticker-bullet { font-size: 0.78rem; color: var(--text-main); margin-top: 0.3rem; line-height: 1.4; }
.ticker-motto  { font-size: 0.75rem; font-style: italic; color: var(--text-muted); margin-top: 0.4rem; opacity: 0.8; }

/* Live-Tabelle 25/26 (Übersichts-Card) */
.kt-md-line { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.kt-row     { padding: 0.2rem 0; }
.kt-foot    { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--border-color); font-size: 0.72rem; color: var(--text-muted); }

/* Letztes Highlight (Übersichts-Card) */
.last-trip-year  { font-size: 1.6rem; font-weight: 800; color: var(--accent-red); line-height: 1; margin-bottom: 0.25rem; }
.last-trip-loc   { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.last-trip-motto { font-style: italic; color: var(--accent-red); font-size: 0.95rem; line-height: 1.4; margin-bottom: 1rem; padding: 0.75rem; background: var(--bg-color); border-radius: var(--radius-md); }
.last-trip-meta  { font-size: 0.95rem; }

.view-header { margin-bottom: 2rem; }
.view-header p { color: var(--text-muted); font-size: 1.1rem; }

.highlight-card { border-left: 4px solid var(--accent-red); }
.big-data { font-size: 1.6rem; font-weight: 800; color: var(--accent-red); margin-top: 0.5rem; }
.home-list { margin-top: 0.5rem; font-size: 0.95rem; line-height: 1.9; }

/* ── Sort Indicators ── */
.data-table th[data-sort] { position: relative; user-select: none; }
.data-table th[data-sort]::after { content: ' ⇅'; opacity: 0.35; font-size: 0.75em; }
.data-table th.sort-asc::after  { content: ' ↑'; opacity: 1; color: var(--accent-red); }
.data-table th.sort-desc::after { content: ' ↓'; opacity: 1; color: var(--accent-red); }

/* ── Forms & Tables ── */
.form-control {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--paper-color);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--accent-red); }
.filters { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.toggle-switch { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--text-muted); font-weight: 600; }
.toggle-switch input { accent-color: var(--accent-red); }

/* Search */
.search-wrapper { position: relative; }
.search-input {
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--paper-color);
    color: var(--text-main);
    outline: none;
    width: 220px;
    transition: border-color 0.2s, width 0.3s;
}
.search-input:focus { border-color: var(--accent-red); width: 280px; }
.search-icon { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; pointer-events: none; }

.table-wrapper { 
    overflow-x: auto; 
    max-width: 100%;
    border-radius: var(--radius-lg);
}
/* Vertikale Scroll-Variante für Sticky Header (z.B. Ewige Tabelle) */
.table-wrapper.vscroll {
    max-height: max(360px, calc(100vh - 260px));
    overflow-y: auto;
}
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 0.88rem; }
.data-table th, .data-table td { padding: 0.75rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: inset 0 -1px 0 var(--border-color);
    white-space: normal;
    line-height: 1.15;
    vertical-align: bottom;
    max-width: 80px; /* Erzwingt Umbruch bei längeren Wörtern */
}
.data-table th:hover { background: #f1f5f9; color: var(--text-main); }
/* Zebra-Streifen (gerade Zeilen subtil eingefärbt) */
.data-table tbody tr:nth-child(even) td { background-color: rgba(0,0,0,0.025); }
.data-table tbody tr:hover td { background-color: #eef2f7; }
.data-table tr.inactive td { color: var(--text-muted); opacity: 0.55; }

/* Rank medals in table */
.data-table tr.rank-1 td:first-child { font-weight: 800; }
.data-table tr.rank-1 td:first-child::before { content: '🥇 '; }
.data-table tr.rank-2 td:first-child::before { content: '🥈 '; }
.data-table tr.rank-3 td:first-child::before { content: '🥉 '; }

/* ── Abschlussfahrten Grid ── */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.trip-card {
    background: var(--paper-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Bild oben */
.trip-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #334155 100%);
    position: relative;
    flex-shrink: 0;
}
.trip-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.trip-card:hover .trip-img-wrap img { transform: scale(1.04); }
.trip-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255,255,255,0.2);
}
.trip-year-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0,0,0,0.55);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Card-Inhalt */
.trip-body { padding: 1.25rem; }
.trip-location { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.trip-motto {
    font-style: italic;
    color: var(--accent-red);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}
.trip-meta { display: flex; gap: 1.25rem; font-size: 0.9rem; color: var(--text-muted); flex-wrap: wrap; }
.trip-meta strong { color: var(--text-main); }

/* Highlight des Jahres */
.trip-highlight {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}
.highlight-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.highlight-text {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}
.highlight-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Timeline for horizontal scroll ── */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.timeline-item {
    background: var(--paper-color);
    border-radius: 8px;
    border-left: 4px solid var(--brand-dark);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: background 0.3s;
}
.timeline-year   { font-weight: 800; font-size: 1.2rem; color: var(--brand-dark); margin-bottom: 0.5rem; }
.timeline-motto  { font-size: 1.4rem; font-weight: 700; color: var(--accent-red); margin-bottom: 0.5rem; }
.timeline-details { color: var(--text-muted); display: flex; gap: 1rem; font-size: 0.95rem; }

/* Highlight-Block in Timeline-Karten */
.timeline-highlight {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

/* ── Trip-Karte Highlight-Ticker ── */
.trip-ticker-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border-color);
    overflow: hidden;
}
.trip-ticker-label {
    flex-shrink: 0;
    font-size: 0.85rem;
}
.trip-ticker {
    overflow: hidden;
    flex: 1;
}
.trip-ticker-inner {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-muted);
    animation: ticker-scroll 18s linear infinite;
}
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Dark mode Ergänzungen */
body.dark-mode .trip-card { background: var(--paper-color); }
body.dark-mode .trip-img-wrap { background: linear-gradient(135deg, #060c18 0%, #1a2234 100%); }

@media (max-width: 600px) {
    .trips-grid { grid-template-columns: 1fr; }
}

/* ── Badges ── */
.badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge { background: var(--brand-dark); color: white; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.badge.red { background: var(--accent-red); }
.badge.neutral  { background: var(--silver); }
.badge.inactive { background: #64748b; }
.badge.meister  { background: var(--warning); color: #78350f; }
.badge.tourn    { background: var(--info); color: #1e3a8a; }

/* Inherit-Link (Tabellen-Header, Profil-Hyperlinks innerhalb von Zellen) */
.link-inherit { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }

/* Rang-Pille (Heatmap-Zelle) */
.rank-pill { display: inline-block; min-width: 28px; text-align: center; padding: 2px 4px; }

/* Turnier-Sieger-Liste */
.winners-row   { padding: 0.4rem 0; border-bottom: 1px solid var(--border-color); }
.winners-medal { font-size: 1.1rem; }
.winners-name  { font-weight: 700; flex: 1; }
.winners-count { font-weight: 800; color: var(--info); }

/* Saison-Detail-Card (Trip / Turnier) */
.detail-participants { margin-top: 0.35rem; font-size: 0.9rem; line-height: 1.7; }
.detail-img          { width: 100%; border-radius: var(--radius-md); margin-top: 0.75rem; max-height: 280px; object-fit: cover; }

/* Highlight-Card (Bullets/Text) */
.highlight-list { margin: 0.75rem 0 0; padding-left: 1.25rem; line-height: 1.8; font-size: 0.93rem; }
.highlight-text { margin-top: 0.75rem; font-size: 0.93rem; line-height: 1.6; }

/* Season-Stat-Card Variante mit Namen */
.season-stat-card--name      { min-width: 130px; }
.season-stat-value--name     { font-size: 0.95rem; }

/* Saison-Ranking-Tabelle */
.season-rank-table              { margin-top: 0.5rem; }
.season-rank-table .col-rank    { width: 2rem; }
.season-rank-table .ta-right    { text-align: right; }
.season-rank-table .rank-num    { color: var(--text-muted); font-size: 0.82rem; }
.season-rank-table .rank-name   { font-size: 0.92rem; font-weight: 400; }
.season-rank-table .is-top .rank-name { font-weight: 700; }
.season-rank-table .rank-pts    { font-weight: 700; font-size: 0.92rem; }
.season-rank-table .is-last .rank-name,
.season-rank-table .is-last .rank-pts { color: var(--accent-red); }

/* Tippvergehen-Matrix */
.tv-table              { font-size: 0.85rem; }
.tv-th-rank            { color: var(--text-muted); padding: 0.3rem 0.5rem; }
.tv-th-team            { padding: 0.3rem 0.6rem; }
.tv-th-tipper          { font-size: 0.72rem; padding: 0.3rem 0.4rem; white-space: nowrap; cursor: pointer; text-align: center; }
.tv-rank               { text-align: center; color: var(--text-muted); font-size: 0.8rem; padding: 0.3rem 0.5rem; }
.tv-team               { font-weight: 700; font-size: 0.85rem; white-space: nowrap; padding: 0.3rem 0.6rem; }
.tv-marker             { font-size: 0.72rem; }
.tv-cell               { text-align: center; font-weight: 600; font-size: 0.8rem; padding: 0.3rem 0.45rem; }
.tv-star               { color: var(--warning); font-size: 0.62rem; margin-left: 1px; }
.tv-row-releg          { background: rgba(225,29,72,0.04); }
.tv-foot-cell          { text-align: center; font-weight: 700; font-size: 0.85rem; padding: 0.38rem 0.45rem; }
.tv-foot-label         { font-weight: 700; font-size: 0.78rem; color: var(--text-muted); text-align: right; padding: 0.38rem 0.6rem; }
.tv-foot-top2          { border-top: 2px solid var(--border-color); }
.tv-foot-top1          { border-top: 1px solid var(--border-color); }
.tv-legend             { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; align-items: center; }
.tv-legend-extra       { margin-left: 0.5rem; }
.tv-legend-hint        { margin-left: 0.5rem; font-style: italic; }

/* Bonustipps-Tabelle */
.bt-table              { font-size: 0.88rem; }
.bt-th                 { text-align: center; padding: 0.3rem 0.4rem; color: var(--text-muted); font-size: 0.72rem; }
.bt-th-left            { text-align: left; padding: 0.3rem 0.6rem; }
.bt-th-total           { padding: 0.3rem 0.6rem; color: var(--accent-red); font-weight: 700; border-left: 2px solid var(--border-color); }
.bt-row-alt            { background: rgba(0,0,0,0.018); }
.bt-cell-rank          { text-align: center; padding: 0.3rem 0.4rem; }
.bt-rank-1             { color: var(--warning); font-weight: 800; font-size: 1.1rem; }
.bt-rank-2             { color: #9ca3af; font-weight: 800; font-size: 1.05rem; }
.bt-rank-3             { color: #cd7f32; font-weight: 800; font-size: 1rem; }
.bt-rank-num           { color: var(--text-muted); font-size: 0.82rem; }
.bt-cell-name          { font-weight: 600; font-size: 0.85rem; padding: 0.3rem 0.6rem; }
.bt-cell-name.is-top   { font-weight: 800; }
.bt-cell-num           { text-align: center; font-size: 0.85rem; padding: 0.3rem 0.4rem; }
.bt-cell-kt            { font-weight: 600; }
.bt-cell-total         { text-align: center; font-size: 0.9rem; font-weight: 800; color: var(--accent-red); padding: 0.3rem 0.6rem; border-left: 2px solid var(--border-color); }
.link-inherit-plain    { color: inherit; text-decoration: none; }

/* ── Kastenwetten ── */
.kw-chip {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0.2rem 0.2rem 0.2rem 0;
    user-select: none;
    transition: all var(--motion-fast) var(--ease-out);
}
.kw-chip.is-active {
    border-color: var(--info);
    background: var(--info);
    color: #fff;
    font-weight: 700;
}
.kw-modal-err     { color: var(--danger); font-size: 0.83rem; margin-bottom: 0.75rem; display: none; }
.kw-card          { border-left: 4px solid var(--info); margin-bottom: 1rem; }
.kw-card--settled { border-left-color: var(--success); }
.kw-card--overdue { border-left-color: var(--danger); }
.kw-card--open    { border-left-color: var(--info); }
.kw-card-title    { font-weight: 700; font-size: 0.95rem; line-height: 1.4; flex: 1; }
.kw-card-meta     { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.85rem; color: var(--text-muted); }
.kw-card-actions  { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.kw-add-btn       { margin-bottom: 1.25rem; padding: 0.45rem 1.1rem; }
.kw-auth-btn      { margin-bottom: 1.25rem; padding: 0.4rem 1rem; }
.kw-auth-area     { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.kw-section-h     { margin-bottom: 0.75rem; }
.kw-section-h--later { margin: 1.5rem 0 0.75rem; }

/* ── Sticky Section Header (für lange Views) ── */
.sticky-h {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--paper-color);
    padding: 0.75rem 0 0.6rem;
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(6px);
}
.kw-section-h {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg-color);
    padding: 0.6rem 0;
    backdrop-filter: blur(6px);
}
.kw-section-h--later { margin-top: 1.5rem; }

/* Fraktions-Punkt (Heatmap-Namensspalte) */
.faction-dot          { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.faction-dot.vorstand { background: var(--brand-dark); }
.faction-dot.poebel   { background: var(--accent-red); }
body.dark-mode .faction-dot.vorstand { background: #94a3b8; }

/* ── Stats List (Profile) ── */
.stats-list { list-style: none; }
.stats-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.stats-list li:last-child { border-bottom: none; }
.stat-label { color: var(--text-muted); font-weight: 600; }
.stat-value { font-weight: 700; }

/* Trend indicators */
.trend { font-size: 0.85rem; font-weight: 700; margin-left: 0.5rem; }
.trend-up   { color: var(--success); }
.trend-down { color: var(--accent-red); }
.trend-neutral { color: var(--text-muted); }

/* ── H2H Stats ── */
.h2h-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.h2h-stat {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: background 0.3s;
}
.h2h-stat .h2h-number { font-size: 2rem; font-weight: 800; }
.h2h-stat .h2h-label  { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.h2h-wins   .h2h-number { color: var(--success); }
.h2h-losses .h2h-number { color: var(--accent-red); }

/* ── Tipper Chips on Home ── */
.tipper-chip {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s, transform 0.15s;
}
.tipper-chip:hover { opacity: 0.85; transform: translateY(-1px); }
.chip-vorstand { background: #1e293b; color: white !important; }
.chip-poebel   { background: var(--accent-red); color: white !important; }
.chip-none     { background: var(--bg-color); border: 1px solid var(--border-color); color: var(--text-main) !important; }

/* ── Season Rangliste ── */
.tipper-toggles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
/* Penalty yearly table */
.penalty-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.penalty-table th, .penalty-table td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.penalty-table th { background: #f8fafc; color: var(--text-muted); font-weight: 600; cursor: default; pointer-events: none; }
body.dark-mode .penalty-table th { background: #131e30; }

/* ── Profil Name Select ── */
.profil-name-select {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    border: none;
    padding: 0 0.2rem 0 0;
    margin: 0;
    cursor: pointer;
    appearance: auto;
    line-height: 1.2;
    max-width: 100%;
}
.profil-name-select:focus { outline: none; }

/* ── H2H Selector ── */
.h2h-selector { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.h2h-selector label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* ── Heatmap ── */
.heatmap-wrap { overflow-x: auto; padding-bottom: 1rem; }
.heatmap-table { border-collapse: separate; border-spacing: 2px; min-width: max-content; }
.hm-name-cell {
    font-size: 0.78rem; font-weight: 600; white-space: nowrap;
    padding-right: 0.75rem; padding-left: 0.25rem;
    color: var(--text-main); text-align: left;
}
.hm-name-cell a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--text-muted); }
.hm-season-header {
    font-size: 0.67rem; font-weight: 700; color: var(--text-muted);
    text-align: center; padding: 0 2px 0.5rem; white-space: nowrap;
    cursor: pointer; transition: color 0.15s;
}
.hm-season-header:hover { color: var(--accent-red); }
.hm-cell {
    width: 36px; height: 34px; border-radius: 4px;
    text-align: center; vertical-align: middle;
    font-size: 0.68rem; font-weight: 800; color: white;
    cursor: pointer; position: relative;
    transition: transform 0.12s, box-shadow 0.12s;
    white-space: nowrap;
}
.hm-cell:hover { transform: scale(1.25); z-index: 10; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.hm-cell[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: rgba(15,23,42,0.96); color: white;
    padding: 0.28rem 0.6rem; border-radius: 6px;
    font-size: 0.72rem; white-space: nowrap; z-index: 50;
    pointer-events: none; box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-weight: 600;
}
.hm-cell.hm-empty { background: var(--border-color) !important; cursor: default; opacity: 0.35; }
body.dark-mode .hm-cell.hm-empty { background: #2d3f57 !important; }

/* Heatmap Legende */
.hm-legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}
.hm-legend-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.hm-legend-bar {
    flex: 1;
    max-width: 220px;
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(to right, #22c55e, #fb923c, #7f1d1d);
}

/* Heatmap Rang/Punkte Toggle */
.hm-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.hm-toggle-btn {
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.hm-toggle-btn.active {
    background: var(--accent-red);
    color: #fff;
}

/* ── Records & Kuriositäten ── */
.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
}
.record-card {
    background: var(--paper-color); border-radius: var(--radius-lg);
    padding: 0.85rem 1rem; box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--accent-red);
    display: flex; flex-direction: column; gap: 0.2rem;
    transition: box-shadow 0.2s, transform 0.2s;
}
.record-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.record-card { scroll-margin-top: 1rem; }
.record-card.ccgb-flash { animation: ccgb-flash-kf 2.2s var(--ease-out); }
.record-card .rec-emoji { font-size: 1.25rem; line-height: 1; margin-bottom: 0.1rem; }
.record-card .rec-label { font-size: 0.68rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.record-card .rec-value { font-size: 1.35rem; font-weight: 800; color: var(--text-main); line-height: 1.15; }
.record-card .rec-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.05rem; }
.record-card.gold-border { border-left-color: var(--gold); }
.record-card.blue-border { border-left-color: var(--info); }
.record-card.green-border { border-left-color: var(--success); }

/* ── CcGB ── */
.ccgb-part { margin-bottom: 2.5rem; }
.ccgb-part-title { font-size: 1.15rem; font-weight: 800; color: var(--accent-color); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--accent-color); }
.ccgb-section { margin-bottom: 1.5rem; }
.ccgb-section-title { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.ccgb-paragraph { padding: 1rem 1.25rem; margin-bottom: 0.75rem; scroll-margin-top: 1rem; transition: box-shadow var(--motion-normal) var(--ease-out), border-color var(--motion-normal) var(--ease-out); }
.ccgb-paragraph mark { background: rgba(245, 158, 11, 0.35); color: inherit; padding: 0 0.15rem; border-radius: 3px; }
body.dark-mode .ccgb-paragraph mark { background: rgba(245, 158, 11, 0.45); color: #fde68a; }
@keyframes ccgb-flash-kf {
    0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); border-color: var(--warning); }
    50%  { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.0); border-color: var(--warning); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.0); }
}
.ccgb-paragraph.ccgb-flash { animation: ccgb-flash-kf 2.2s var(--ease-out); border-color: var(--warning); }
@media (prefers-reduced-motion: reduce) {
    .ccgb-paragraph.ccgb-flash { animation: none; }
}
.ccgb-para-header { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.ccgb-para-id { font-size: 0.75rem; font-weight: 800; color: var(--accent-color); background: rgba(99,102,241,0.1); padding: 0.15rem 0.5rem; border-radius: 4px; white-space: nowrap; }
.ccgb-para-title { font-weight: 700; font-size: 0.95rem; }
.ccgb-para-list { margin: 0; padding-left: 1.25rem; }
.ccgb-para-list li { font-size: 0.9rem; color: var(--text-color); line-height: 1.6; padding: 0.15rem 0; }
body.dark-mode .ccgb-para-id { background: rgba(99,102,241,0.2); }

/* ── Login-Modal ── */
.login-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.52); z-index: 2500;
    align-items: flex-start; justify-content: center;
    padding-top: 14vh; backdrop-filter: blur(3px);
}
.login-modal-overlay.open { display: flex; }
.login-modal {
    background: var(--paper-color); border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    width: 92%; max-width: 400px; padding: 2rem 2rem 1.75rem;
    position: relative;
    animation: slideDown 0.18s ease;
}
.login-modal h2 { margin: 0 0 0.25rem; font-size: 1.3rem; }
.login-subtitle { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 1.5rem; }
.login-field { margin-bottom: 1rem; }
.login-field label {
    display: block; font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: 0.3rem;
}
.login-field input {
    width: 100%; padding: 0.6rem 0.85rem; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit;
    background: var(--bg-color); color: var(--text-main);
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.login-field input:focus { outline: none; border-color: var(--accent-red); }
.login-error {
    color: var(--accent-red); font-size: 0.82rem; min-height: 1.2em;
    margin-bottom: 0.75rem;
}
.login-btn {
    width: 100%; padding: 0.7rem; border: none; border-radius: var(--radius-sm);
    background: var(--accent-red); color: #fff; font-size: 0.95rem;
    font-weight: 700; font-family: inherit; cursor: pointer;
    transition: opacity 0.15s;
}
.login-btn:hover { opacity: 0.9; }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.login-close {
    position: absolute; top: 0.75rem; right: 0.85rem;
    background: none; border: none; font-size: 1.5rem;
    color: var(--text-muted); cursor: pointer; line-height: 1;
}
.login-close:hover { color: var(--text-main); }
body.dark-mode .login-modal { box-shadow: 0 24px 64px rgba(0,0,0,0.65); }

/* ── Toolbar-Icons (innerhalb Header/Sidebar) ── */
.toolbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--accent-red);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    padding: 0;
    flex-shrink: 0;
}
.toolbar-icon svg { width: 18px; height: 18px; stroke-width: 2.2; }
.toolbar-icon:hover { color: var(--accent-red-hover); background: var(--sidebar-hover); }

.toolbar-user {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-red);
    padding: 0 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

@media (max-width: 768px) {
    .header-toolbar { gap: 0.15rem; }
    .toolbar-user { display: none; }
}

/* ── Volltext-Suche Modal ── */
.search-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.52); z-index: 2000;
    align-items: flex-start; justify-content: center;
    padding-top: 14vh; backdrop-filter: blur(3px);
}
.search-modal-overlay.open { display: flex; }
.search-modal {
    background: var(--paper-color); border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    width: 92%; max-width: 560px; overflow: hidden;
    animation: slideDown 0.18s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }
.search-modal-input-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border-color);
}
.search-modal-input-row .sm-icon { font-size: 1.15rem; color: var(--text-muted); }
#globalSearchInput {
    flex: 1; border: none; background: transparent; font-size: 1.05rem;
    color: var(--text-main); outline: none; font-family: inherit;
}
#globalSearchInput::placeholder { color: var(--text-muted); }
.search-hint-row {
    font-size: 0.73rem; color: var(--text-muted); padding: 0.4rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
}
.search-hint-row kbd {
    background: var(--paper-color); border: 1px solid var(--border-color);
    border-radius: 4px; padding: 0.1rem 0.4rem; font-size: 0.72rem;
    font-family: inherit; margin: 0 2px;
}
.search-results-list { max-height: 340px; overflow-y: auto; }
.search-result-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 1.25rem; cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.12s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item.sr-active { background: var(--bg-color); }
.sr-icon { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
.sr-main { font-weight: 600; font-size: 0.88rem; color: var(--text-main); }
.sr-sub { font-size: 0.76rem; color: var(--text-muted); }
.search-no-results { padding: 2.5rem 1.25rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
body.dark-mode .search-modal { box-shadow: 0 24px 64px rgba(0,0,0,0.65); }
body.dark-mode .search-hint-row { background: #131e30; }

/* ── Season View ── */
.season-nav-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.season-nav-btn {
    background: var(--paper-color); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 0.35rem 0.9rem; cursor: pointer;
    font-family: inherit; font-size: 0.88rem; color: var(--text-main);
    transition: background 0.15s, border-color 0.15s;
}
.season-nav-btn:hover:not(:disabled)        { background: var(--bg-color); border-color: var(--accent-red); color: var(--accent-red); }
.season-nav-btn:focus-visible               { outline: 2px solid var(--accent-red); outline-offset: 2px; }
.season-nav-btn:active:not(:disabled)       { transform: scale(0.96); }
.season-nav-btn:disabled                    { opacity: 0.35; cursor: default; }
/* season heading replaces the old pill */
.season-heading {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

/* ── Statistik-Karten ── */
.season-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.season-stat-card {
    flex: 1 1 110px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.9rem;
    text-align: center;
    min-width: 100px;
}
.season-stat-icon  { font-size: 1.2rem; margin-bottom: 0.2rem; }
.season-stat-value { font-size: 1rem; font-weight: 800; color: var(--text-main); line-height: 1.3; }
.season-stat-label { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.15rem; }

/* ── Haupt-Layout: Foto links, Rangliste Mitte, Highlights rechts ── */
.season-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
}
.season-layout-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.season-layout > div:empty { display: none; }
.season-layout-side > div:empty { display: none; }
.season-rank-table td { padding: 0.35rem 0.6rem; }

@media (max-width: 800px) {
    .season-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .season-layout { grid-template-columns: 1fr; }
}

/* ── Seasonal Media Grid ── */
.season-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.season-media-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.15s, border-color 0.15s;
}
.season-media-item:hover {
    transform: scale(1.02);
    border-color: var(--accent-red);
}
.season-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.season-media-type-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 5;
    backdrop-filter: blur(2px);
}
.season-media-title-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    padding: 14px 6px 4px 6px;
    font-size: 0.68rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 4;
}
.season-media-item .media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.25rem;
}

/* ── Home: Highlight Borders ── */
.border-red    { border-left: 4px solid var(--accent-red) !important; }
.border-blue   { border-left: 4px solid #3b82f6 !important; }
.border-gold   { border-left: 4px solid #f59e0b !important; }
.border-green  { border-left: 4px solid #10b981 !important; }
.border-purple { border-left: 4px solid #8b5cf6 !important; }

/* ── Home: Promo & Random Media ── */
.home-promo-card {
    background: linear-gradient(135deg, var(--bg-card), rgba(225,29,72,0.05));
    border-left: 4px solid var(--accent-red) !important;
}
.home-random-wrap {
    min-height: 120px;
}
.home-random-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.home-random-grid:hover {
    transform: translateX(4px);
}
.home-random-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--bg-app);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.home-random-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-random-large-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.2rem;
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    line-height: 1;
}
.highlight-card {
    display: flex;
    flex-direction: column;
    height: 300px;
    overflow: hidden;
}
.highlight-card h3,
.highlight-card h4 {
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: anywhere;
}
.home-random-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}
.home-random-info {
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .home-random-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .home-random-preview {
        max-width: 240px;
    }
}

/* ── Responsive ── */

/* Prevent grid items from overflowing their column (Chart.js resize fix) */
.bottom-grid > *, .grid-2 > *, .grid-3 > * { min-width: 0; }

/* Tipper-Row: horizontales Scrollen statt Überlauf bei mittleren Breiten */
.home-tippers-row { overflow-x: auto; }

@media (max-width: 1200px) {
    .home-row1 { grid-template-columns: 1fr 1fr !important; }
    .bottom-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 900px) {
    .grid-2      { grid-template-columns: 1fr; }
    .bottom-grid { grid-template-columns: 1fr !important; }
    .h2h-selector { align-items: flex-start; margin-top: 1rem; }
    .home-tippers-row { flex-wrap: wrap !important; }
    .home-tippers-row .tipper-chip { flex: unset !important; }
}
@media (max-width: 768px) {
    .home-row1   { grid-template-columns: 1fr !important; }
    .bottom-grid { grid-template-columns: 1fr !important; }
    #home-ticker { display: none !important; }
}
/* ── Hamburger Button (nur Mobile) ── */
#hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    margin-left: auto;
}
#hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    transition: all 0.25s;
}
/* X-Animation wenn offen */
.sidebar.menu-open #hamburger-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar.menu-open #hamburger-btn span:nth-child(2) { opacity: 0; }
.sidebar.menu-open #hamburger-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .app-layout { flex-direction: column; padding-top: 60px; }
    .sidebar, .sidebar.collapsed {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: column;
    }
    .sidebar-header {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        min-height: auto;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background-color: var(--sidebar-bg);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        box-sizing: border-box;
    }
    body.dark-mode .sidebar-header {
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }
    .sidebar-collapse-btn { display: none; }
    .sidebar-nav .nav-link { font-size: 0.9rem; padding: 0.6rem 0.75rem; }
    .main-content, .main-content.sidebar-collapsed { margin-left: 0; padding: 1rem; }
    .search-input { width: 160px; }
    .search-input:focus { width: 200px; }
}

/* ── Ladeindikator ── */
@keyframes cc-spin {
    to { transform: rotate(360deg); }
}
.cc-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: cc-spin 0.75s linear infinite;
}

/* ── Games Grid ── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.game-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.game-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #334155 100%);
    position: relative;
}
.game-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.game-card:hover .game-img-wrap img { transform: scale(1.04); }
.game-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: rgba(255,255,255,0.3);
}
.game-body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.game-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}
.game-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}
.game-cta {
    margin-top: 1rem;
    color: var(--accent-red);
    font-weight: 700;
    font-size: 0.9rem;
}
body.dark-mode .game-img-wrap { background: linear-gradient(135deg, #060c18 0%, #1a2234 100%); }

/* ══════════════════════════════════════════════════════════════
   ARCHIV 2.0 — Sidebar-Explorer, Grid & Cards
   ══════════════════════════════════════════════════════════════ */

:root {
    --archiv-sidebar-w: 260px;
    --archiv-card-bg: var(--paper-color);
}

.archiv-layout {
    display: grid;
    grid-template-columns: var(--archiv-sidebar-w) 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Sidebar (Explorer) ── */
.archiv-sidebar {
    position: sticky;
    top: 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.archiv-side-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.archiv-side-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.archiv-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.archiv-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--motion-fast);
}

.archiv-nav-item:hover {
    background: var(--bg-color);
    color: var(--text-main);
}

.archiv-nav-item.active {
    background: rgba(225,29,72,0.1);
    color: var(--accent-red);
    font-weight: 600;
}

.archiv-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ── Content Area ── */
.archiv-main {
    min-width: 0;
}

.archiv-hero {
    margin-bottom: 2.5rem;
}

.archiv-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.archiv-section-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

/* ── Neue Media-Cards ── */
.media-card {
    background: var(--archiv-card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--motion-normal) var(--ease-out);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-red);
}

.mcard-thumb-wrap {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mcard-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mcard-icon {
    font-size: 2.5rem;
    opacity: 0.2;
}

.mcard-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.mcard-edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 10;
}

.media-card:hover .mcard-edit-btn {
    opacity: 1;
    transform: translateY(0);
}

.mcard-edit-btn:hover {
    background: var(--accent-red);
    color: #fff;
    transform: scale(1.1) !important;
}

body.dark-mode .mcard-edit-btn {
    background: #1a2234;
    color: #fff;
    border: 1px solid var(--border-color);
}

.mcard-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mcard-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mcard-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Mobile ── */
@media (max-width: 900px) {
    .archiv-layout {
        grid-template-columns: 1fr;
    }
    .archiv-sidebar {
        position: static;
        flex-direction: column;
        gap: 1.25rem;
        padding: 1rem;
        background: var(--bg-card);
        border-radius: 12px;
        border: 1px solid var(--border-color);
        margin-bottom: 1.5rem;
    }
    .archiv-side-section {
        margin: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 0.75rem;
    }
    .archiv-side-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .archiv-side-title {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }
    .archiv-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .archiv-nav-item {
        padding: 0.35rem 0.75rem;
        font-size: 0.82rem;
        background: var(--bg-color);
        border-radius: 6px;
    }
}


/* ── Tab-Leiste ── */
.archiv-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.archiv-tab-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: color var(--motion-fast) var(--ease-out),
                border-color var(--motion-fast) var(--ease-out),
                background var(--motion-fast) var(--ease-out);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    white-space: nowrap;
}
.archiv-tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-color);
}
.archiv-tab-btn.active {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
    background: transparent;
}
.archiv-tab-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    padding: 0.05rem 0.45rem;
    min-width: 20px;
    text-align: center;
}
.archiv-tab-btn.active .archiv-tab-count {
    background: rgba(225,29,72,0.12);
    color: var(--accent-red);
}

/* ── Toolbar: Suche + Sortierung + Filter-Chips ── */
.archiv-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}
.archiv-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}
.archiv-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.archiv-search-input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    background: var(--paper-color);
    color: var(--text-main);
    font-family: inherit;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.archiv-search-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: var(--focus-ring);
}
.archiv-sort-select {
    padding: 0.52rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    background: var(--paper-color);
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--motion-fast);
}
.archiv-sort-select:focus {
    outline: none;
    border-color: var(--accent-red);
}

/* ── Filter-Chips ── */
.archiv-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 1rem;
}
.archiv-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background: var(--paper-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--motion-fast) var(--ease-out);
    font-family: inherit;
    white-space: nowrap;
}
.archiv-chip:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}
.archiv-chip.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

/* Tag Picker Chips im Admin Modal */
.tag-picker-chip {
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    opacity: 0.8;
}
.tag-picker-chip.active {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}
body.dark-mode .tag-picker-chip.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.upload-dropzone:hover {
    border-color: var(--accent-red) !important;
    background: rgba(225,29,72,0.03);
}
body.dark-mode .upload-dropzone:hover {
    background: rgba(255,255,255,0.02);
}

.label-sm {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

/* ── Medientyp-Badges ── */
.media-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.media-badge.video    { background: rgba(59,130,246,0.15);   color: #3b82f6; }
.media-badge.audio    { background: rgba(139,92,246,0.15);   color: #8b5cf6; }
.media-badge.bild     { background: rgba(16,185,129,0.15);   color: #10b981; }
.media-badge.dokument { background: rgba(245,158,11,0.15);   color: #d97706; }

/* ── Gesamtlisten-Tabelle ── */
.archiv-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.archiv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--paper-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.archiv-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background var(--motion-fast), color var(--motion-fast);
}
.archiv-table th:hover { background: #e9ecf1; color: var(--text-main); }
.archiv-table th.sort-asc::after  { content: ' ↑'; color: var(--accent-red); }
.archiv-table th.sort-desc::after { content: ' ↓'; color: var(--accent-red); }
.archiv-table th[data-sort]::after { content: ' ⇅'; opacity: 0.3; }
.archiv-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-main);
}
.archiv-table tbody tr:last-child td { border-bottom: none; }
.archiv-table tbody tr {
    transition: background var(--motion-fast);
}
.archiv-table tbody tr:hover td { background: rgba(0,0,0,0.025); }
.archiv-tr-click { cursor: pointer; }
.archiv-thumb {
    width: 52px; height: 36px; object-fit: cover;
    border-radius: 4px; display: block; margin: 0 auto;
}

/* Titel-Zelle */
.archiv-title-cell {
    max-width: 280px;
}
.archiv-title-main {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.archiv-title-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tags in der Tabelle */
.archiv-tag-wrap { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.archiv-tag {
    display: inline-block;
    padding: 0.05rem 0.3rem;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 600;
    background: var(--bg-color);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    margin: 0.05rem;
    white-space: nowrap;
}

/* Aktions-Buttons in der Tabelle */
.archiv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all var(--motion-fast) var(--ease-out);
    white-space: nowrap;
}
.archiv-action-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(225,29,72,0.06);
}
.archiv-action-btn.download:hover {
    border-color: var(--info);
    color: var(--info);
    background: rgba(59,130,246,0.06);
}

/* ── Leer-Zustand ── */
.archiv-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.archiv-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.archiv-empty-text {
    font-size: 1rem;
    font-weight: 600;
}
.archiv-empty-sub {
    font-size: 0.85rem;
    margin-top: 0.4rem;
    opacity: 0.7;
}

/* ── Tab "Coming Soon" Placeholder ── */
.archiv-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
    text-align: center;
    gap: 0.75rem;
}
.archiv-coming-soon-icon {
    font-size: 3rem;
    opacity: 0.4;
}
.archiv-coming-soon h3 {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
}
.archiv-coming-soon p {
    font-size: 0.88rem;
    max-width: 320px;
    line-height: 1.6;
}

/* ── Lade-Spinner im Archiv ── */
.archiv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    gap: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Ergebnis-Info Zeile ── */
.archiv-result-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}

/* ── Dark Mode Overrides ── */
body.dark-mode .archiv-tab-btn:hover       { background: #1a2234; }
body.dark-mode .archiv-table th            { background: #131e30; color: #94a3b8; }
body.dark-mode .archiv-table th:hover      { background: #1a2234; color: #e2e8f0; }
body.dark-mode .archiv-table tbody tr:hover td { background: rgba(255,255,255,0.04); }
body.dark-mode .archiv-table-wrap          { border-color: #2d3f57; }
body.dark-mode .archiv-table               { background: var(--paper-color); }
body.dark-mode .archiv-tag                 { background: #131e30; border-color: #2d3f57; }
body.dark-mode .archiv-search-input        { background: #1a2234; color: var(--text-main); border-color: #2d3f57; }
body.dark-mode .archiv-sort-select         { background: #1a2234; color: var(--text-main); border-color: #2d3f57; }
body.dark-mode .archiv-chip                { background: #1a2234; border-color: #2d3f57; color: #94a3b8; }
body.dark-mode .archiv-chip.active         { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }
body.dark-mode .archiv-tab-count           { background: #1a2234; }
body.dark-mode .media-badge.video          { background: rgba(59,130,246,0.2);  color: #60a5fa; }
body.dark-mode .media-badge.audio          { background: rgba(139,92,246,0.2);  color: #a78bfa; }
body.dark-mode .media-badge.bild           { background: rgba(16,185,129,0.2);  color: #34d399; }
body.dark-mode .media-badge.dokument       { background: rgba(245,158,11,0.2);  color: #fbbf24; }

/* Dark Mode für Medien-Karten */
body.dark-mode .media-card,
body.dark-mode .vcard {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
body.dark-mode .mcard-title,
body.dark-mode .vcard-title {
    color: #f3f4f6;
}
body.dark-mode .mcard-meta,
body.dark-mode .vcard-meta {
    color: #9ca3af;
}
body.dark-mode .vcard-meta .vcard-dot {
    background: #374151;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .archiv-tabs           { gap: 0; }
    .archiv-tab-btn        { padding: 0.5rem 0.85rem; font-size: 0.82rem; }
    .archiv-toolbar        { flex-direction: column; align-items: stretch; }
    .archiv-search-wrap    { max-width: 100%; }
    .archiv-table th,
    .archiv-table td       { padding: 0.65rem 0.75rem; }
    .archiv-title-cell     { max-width: 160px; }
}

/* ══════════════════════════════════════════════════════════════
   ARCHIV PHASE B — Video-Grid, Video-Modal, Audio-Player
   ══════════════════════════════════════════════════════════════ */

@keyframes fadeIn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown  { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes vinyl-rotate { to { transform: rotate(360deg); } }

/* ── Video Kachel-Grid ── */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.vcard {
    background: var(--paper-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--motion-normal) var(--ease-out),
                box-shadow var(--motion-normal) var(--ease-out);
    outline: none;
}
.vcard:hover,
.vcard:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

.vcard-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #0b1120;
    overflow: hidden;
}
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard-thumb-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    font-size: 3rem;
    color: rgba(255,255,255,0.12);
}
.vcard-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--motion-normal);
}
.vcard:hover .vcard-overlay,
.vcard:focus-visible .vcard-overlay { background: rgba(0,0,0,0.45); }
.vcard-play-btn {
    width: 54px; height: 54px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.75);
    transition: opacity var(--motion-normal), transform var(--motion-normal);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.vcard:hover .vcard-play-btn,
.vcard:focus-visible .vcard-play-btn { opacity: 1; transform: scale(1); }
.vcard-play-btn svg { width: 22px; height: 22px; margin-left: 3px; }

.vcard-body { padding: 0.85rem 1rem; }
.vcard-title {
    font-weight: 600; font-size: 0.88rem; color: var(--text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* stylelint-disable-next-line property-no-vendor-prefix */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.vcard-meta {
    font-size: 0.75rem; color: var(--text-muted);
    display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center;
}
.vcard-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--border-color); flex-shrink: 0;
}

/* ── Video Modal ── */
.video-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}
.video-modal-inner {
    width: min(1000px, 100%);
    display: flex; flex-direction: column; gap: 1rem;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.video-modal-topbar {
    display: flex; justify-content: space-between; align-items: center;
    color: #fff;
}
.video-modal-title { font-weight: 700; font-size: 1.1rem; }
.video-modal-close {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.video-modal-close:hover { background: var(--accent-red); transform: rotate(90deg); }

.video-wrap {
    width: 100%; aspect-ratio: 16/9;
    background: #000; border-radius: 12px;
    overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.video-wrap video { width: 100%; height: 100%; display: block; }

.video-nav-row {
    display: flex; justify-content: center; align-items: center; gap: 2rem;
    margin-top: 1rem;
}
.video-nav-counter { color: rgba(255,255,255,0.6); font-size: 0.9rem; font-weight: 600; }
.video-nav-btn {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; padding: 0.5rem 1.5rem; border-radius: var(--radius-full);
    cursor: pointer; transition: all 0.2s;
}
.video-nav-btn:hover:not(:disabled) { background: #fff; color: #000; }
.video-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Audio Premium Tool ── */
.audio-modal-inner {
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-2xl);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.audio-vinyl-wrap {
    width: 200px; height: 200px;
    background: #111;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 0 0 10px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.3);
}
.audio-vinyl-wrap::before {
    content: ''; position: absolute; inset: 5px;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 50%;
}
.audio-vinyl-emoji { font-size: 4rem; }
.audio-vinyl-wrap.spinning { animation: vinyl-rotate 4s linear infinite; }

/* ── Lightbox Premium ── */
.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px); z-index: 2100;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; animation: fadeIn 0.3s ease;
}
.lightbox-inner {
    max-width: 100%; max-height: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.lightbox-topbar {
    position: absolute; top: 1.5rem; left: 1.5rem; right: 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    color: #fff;
}
.lightbox-caption { font-weight: 600; font-size: 1.1rem; }
.lightbox-img {
    max-width: 90vw; max-height: 80vh;
    object-fit: contain; border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-nav {
    position: absolute; bottom: 2rem; left: 0; right: 0;
    display: flex; justify-content: center; align-items: center; gap: 2rem;
}

@keyframes zoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.video-nav-btn {
    color: rgba(255,255,255,0.8); padding: 0.38rem 1.15rem;
    border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: background var(--motion-fast), color var(--motion-fast);
}
.video-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.2); color: white; }
.video-nav-btn:disabled { opacity: 0.25; cursor: default; }
.video-nav-counter { color: rgba(255,255,255,0.38); font-size: 0.78rem; min-width: 60px; text-align: center; }

/* ── Audio Player ── */
.audio-wrap {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
}
/* Playlist Box */
.audio-playlist-box {
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm);
    max-height: 580px; display: flex; flex-direction: column;
}
.audio-pl-search-wrap { padding: 0.4rem 0.7rem; border-bottom: 1px solid var(--border-color); }
.audio-pl-search {
    width: 100%; padding: 0.3rem 0.6rem; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); background: var(--bg-color); color: var(--text-color);
    font-size: 0.8rem; font-family: inherit; outline: none;
}
.audio-pl-search:focus { border-color: var(--accent-red); }
.audio-pl-header {
    padding: 0.72rem 1rem;
    font-size: 0.74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color); flex-shrink: 0;
}
.audio-pl-list { overflow-y: auto; flex: 1; }
.audio-pl-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.68rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid transparent;
    transition: background var(--motion-fast), border-color var(--motion-fast);
}
.audio-pl-item:last-child { border-bottom: none; }
.audio-pl-item:hover { background: var(--bg-color); }
.audio-pl-item.active {
    background: rgba(225,29,72,0.06);
    border-left-color: var(--accent-red);
}
.audio-pl-num {
    font-size: 0.72rem; color: var(--text-muted);
    width: 16px; text-align: right; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.audio-pl-item.active .audio-pl-num { color: var(--accent-red); font-weight: 700; }
.audio-pl-info { flex: 1; min-width: 0; }
.audio-pl-name {
    font-size: 0.83rem; font-weight: 600; color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.audio-pl-item.active .audio-pl-name { color: var(--accent-red); }
.audio-pl-date { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }
.audio-pl-dur { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* Player Box */
.audio-player-box {
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}
/* Vinyl Cover */
.audio-vinyl-wrap {
    width: 180px; height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #2d3f57 50%, #1e293b 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
    position: relative; flex-shrink: 0;
    transition: box-shadow 0.4s;
}
.audio-vinyl-wrap.spinning { animation: vinyl-rotate 4s linear infinite; }
.audio-vinyl-grooves {
    position: absolute; inset: 0; border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px, transparent 7px,
        rgba(255,255,255,0.025) 8px
    );
}
.audio-vinyl-emoji { font-size: 3rem; opacity: 0.18; position: relative; z-index: 1; }
.audio-vinyl-center {
    position: absolute;
    width: 36px; height: 36px;
    background: var(--paper-color);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.22);
    z-index: 2;
}
/* Track info */
.audio-track-info { text-align: center; width: 100%; }
.audio-track-title {
    font-size: 1rem; font-weight: 700; color: var(--text-main);
    line-height: 1.35; margin-bottom: 0.25rem;
}
.audio-track-meta { font-size: 0.78rem; color: var(--text-muted); }
.audio-track-desc {
    font-size: 0.78rem; color: var(--text-muted);
    margin-top: 0.3rem; font-style: italic; line-height: 1.5; min-height: 1.2rem;
}
/* Progress */
.audio-progress { width: 100%; }
.audio-prog-outer {
    width: 100%; height: 4px;
    background: var(--border-color);
    border-radius: 2px; cursor: pointer;
    transition: height var(--motion-fast); position: relative;
}
.audio-prog-outer:hover { height: 6px; }
.audio-prog-inner {
    height: 100%; background: var(--accent-red);
    border-radius: 2px; width: 0%;
    transition: width 0.25s linear;
}
.audio-time-row {
    display: flex; justify-content: space-between;
    font-size: 0.7rem; color: var(--text-muted); margin-top: 0.3rem;
    font-variant-numeric: tabular-nums;
}
/* Controls row */
.audio-ctrl-row {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
}
.ac-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    transition: color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
    font-family: inherit;
}
.ac-btn:hover { color: var(--text-main); background: var(--bg-color); }
.ac-btn svg { width: 20px; height: 20px; }
.ac-btn.play-main {
    width: 52px; height: 52px;
    background: var(--accent-red); color: white;
    box-shadow: 0 4px 16px rgba(225,29,72,0.4);
}
.ac-btn.play-main:hover {
    background: var(--accent-red-hover); color: white;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(225,29,72,0.5);
}
.ac-btn.play-main svg { width: 24px; height: 24px; }
.ac-btn.on { color: var(--accent-red); }
.ac-btn.on:hover { color: var(--accent-red-hover); background: var(--bg-color); }
/* Volume row */
.audio-vol-row {
    display: flex; align-items: center; gap: 0.6rem;
    color: var(--text-muted); font-size: 0.85rem;
    width: 100%; justify-content: center;
}
.audio-vol-slider { width: 100px; accent-color: var(--accent-red); cursor: pointer; }

/* ── Dark mode ── */
body.dark-mode .audio-playlist-box  { border-color: #2d3f57; }
body.dark-mode .audio-player-box    { border-color: #2d3f57; }
body.dark-mode .audio-pl-header     { background: #131e30; }
body.dark-mode .audio-pl-item:hover { background: #1a2234; }
body.dark-mode .audio-pl-item.active { background: rgba(225,29,72,0.1); }
body.dark-mode .ac-btn:hover        { background: #1a2234; }
body.dark-mode .audio-vinyl-center  { background: var(--paper-color); }
body.dark-mode .vcard               { background: var(--paper-color); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .audio-wrap { grid-template-columns: 1fr; }
    .audio-playlist-box { max-height: 280px; }
}
@media (max-width: 600px) {
    .media-grid               { grid-template-columns: 1fr; }
    .video-modal-inner        { gap: 0.45rem; }
    .video-controls           { padding: 0.45rem 0.65rem; }
    .audio-player-box         { padding: 1.5rem 1rem; }
    .audio-vinyl-wrap         { width: 140px; height: 140px; }
    .audio-vinyl-emoji        { font-size: 2.5rem; }
}

/* ══════════════════════════════════════════════════════════════
   ARCHIV PHASE C — Bilder-Galerie, Lightbox, Dokumente, Admin
   ══════════════════════════════════════════════════════════════ */

/* ── Masonry-Galerie ── */
.img-masonry { columns: 3; column-gap: 1rem; }
.img-masonry--sm { columns: 5; column-gap: 0.6rem; }
@media (max-width: 1200px) { .img-masonry--sm { columns: 4; } }
@media (max-width: 900px)  { .img-masonry--sm { columns: 3; } }
@media (max-width: 480px)  { .img-masonry--sm { columns: 2; } }
.img-card {
    break-inside: avoid; margin-bottom: 1rem;
    border-radius: var(--radius-md); overflow: hidden;
    cursor: pointer; position: relative;
    border: 1px solid var(--border-color); outline: none; display: block;
}
.img-card img {
    width: 100%; display: block;
    transition: transform 0.4s var(--ease-out);
    min-height: 120px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: img-shimmer 1.4s ease-in-out infinite;
}
.img-card img.loaded { background: none; animation: none; min-height: unset; }
@keyframes img-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.img-card:hover img, .img-card:focus-visible img { transform: scale(1.04); }
.img-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0);
    display: flex; align-items: flex-end; padding: 0.75rem;
    transition: background var(--motion-normal);
}
.img-card:hover .img-overlay, .img-card:focus-visible .img-overlay { background: rgba(0,0,0,0.48); }
.img-overlay-label {
    color: white; font-weight: 600; font-size: 0.82rem; line-height: 1.35;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.25s, transform 0.25s;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.img-card:hover .img-overlay-label, .img-card:focus-visible .img-overlay-label { opacity: 1; transform: none; }
@media (max-width: 900px) { .img-masonry { columns: 2; } }
@media (max-width: 480px) { .img-masonry { columns: 1; } }

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: 1rem; animation: fadeIn 0.18s ease;
}
.lightbox-inner { max-width: 92vw; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.lightbox-topbar { width: 100%; display: flex; align-items: center; gap: 0.75rem; }
.lightbox-caption { flex: 1; font-weight: 700; font-size: 0.9rem; color: rgba(255,255,255,0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-counter { font-size: 0.78rem; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.lightbox-img { max-width: 92vw; max-height: 76vh; object-fit: contain; border-radius: var(--radius-md); display: block; }
.lightbox-desc { font-size: 0.82rem; color: rgba(255,255,255,0.5); font-style: italic; text-align: center; max-width: 600px; }
.lightbox-nav { display: flex; justify-content: space-between; width: 100%; gap: 1rem; }

/* ── Admin FAB ── */
.admin-fab { position: fixed; bottom: 2rem; right: 2rem; z-index: 700; display: flex; align-items: center; }
.admin-fab-btn {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--accent-red); border: none; color: white;
    font-size: 1.6rem; line-height: 1; cursor: pointer;
    box-shadow: 0 4px 18px rgba(225,29,72,0.45);
    transition: transform var(--motion-fast), box-shadow var(--motion-fast);
    font-family: inherit; display: flex; align-items: center; justify-content: center;
}
.admin-fab-btn:hover { transform: scale(1.12); box-shadow: 0 6px 24px rgba(225,29,72,0.6); }
.admin-fab-tip {
    position: absolute; right: 60px;
    background: var(--brand-dark); color: white;
    padding: 0.3rem 0.75rem; border-radius: 6px;
    font-size: 0.76rem; font-weight: 600; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity var(--motion-fast); box-shadow: var(--shadow-md);
}
.admin-fab:hover .admin-fab-tip { opacity: 1; }

/* Admin Modal Form */
.adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.adm-row { display: flex; flex-direction: column; gap: 0.1rem; }
.adm-error {
    color: var(--danger); font-size: 0.82rem;
    padding: 0.45rem 0.75rem; border-radius: var(--radius-sm);
    background: rgba(239,68,68,0.08); display: none;
}
.adm-footer { display: flex; gap: 0.75rem; justify-content: flex-end; padding-top: 0.5rem; }

body.dark-mode .admin-fab-tip { background: #2d3f57; }
body.dark-mode .img-card { border-color: #2d3f57; }

/* ══════════════════════════════════════════════════════════════
   ARCHIV PHASE D — Upload-Zone
   ══════════════════════════════════════════════════════════════ */

.adm-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem 1rem;
    text-align: center;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    transition: border-color var(--motion-fast), background var(--motion-fast);
    background: var(--bg-color);
}
.adm-upload-zone:hover,
.adm-upload-zone.drag-over {
    border-color: var(--accent-red);
    background: rgba(225,29,72,0.04);
}
.adm-upload-icon { font-size: 1.75rem; line-height: 1; }
.adm-upload-hint { font-size: 0.8rem; color: var(--text-muted); }
.adm-upload-filename {
    font-size: 0.82rem; font-weight: 600;
    color: var(--text-color);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Progress bar */
.adm-upload-prog {
    width: 100%; height: 4px; border-radius: 2px;
    background: var(--border-color); overflow: hidden;
    opacity: 0; transition: opacity var(--motion-fast);
}
.adm-upload-prog.visible { opacity: 1; }
.adm-upload-prog-bar {
    height: 100%; background: var(--accent-red); width: 0%;
    transition: width 0.25s, background 0.25s;
    border-radius: 2px;
}
.adm-upload-prog-bar.done    { background: var(--success); width: 100% !important; }
.adm-upload-prog-bar.failed  { background: var(--danger);  width: 100% !important; }

/* Status text */
.adm-upload-status { font-size: 0.8rem; font-weight: 600; min-height: 1rem; }
.adm-upload-status.ok  { color: var(--success); }
.adm-upload-status.err { color: var(--danger); }

/* Thumb row: path input + upload btn inline */
.adm-thumb-row { display: flex; gap: 0.5rem; align-items: stretch; }
.adm-thumb-row .modal-input { flex: 1; min-width: 0; }
.adm-thumb-upload-btn {
    flex-shrink: 0;
    padding: 0 0.75rem;
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600;
    color: var(--text-muted); cursor: pointer; white-space: nowrap;
    transition: border-color var(--motion-fast), color var(--motion-fast);
    font-family: inherit;
}
.adm-thumb-upload-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }
.adm-thumb-status { font-size: 0.76rem; margin-top: 0.2rem; }
.adm-thumb-status.ok  { color: var(--success); }
.adm-thumb-status.err { color: var(--danger); }

body.dark-mode .adm-upload-zone { background: rgba(255,255,255,0.02); }
body.dark-mode .adm-upload-zone:hover,
body.dark-mode .adm-upload-zone.drag-over { background: rgba(225,29,72,0.06); }
body.dark-mode .adm-thumb-upload-btn { background: var(--bg-color); }


/* ════════════════════════════════════════════════════════════════
   ARCHIV PHASE F — Global Filter Bar, Tile/Group View, Neu-Badge
   ════════════════════════════════════════════════════════════════ */

/* ── Globale Filter-Leiste ── */
.archiv-global-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}
.ag-tags-row {
    display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
}

/* ── Alle-Tab Controls (group/view toggle) ── */
.archiv-alle-controls {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    padding: 0.4rem 0; margin-bottom: 0.5rem;
}
.archiv-ctrl-label {
    font-size: 0.75rem; color: var(--text-muted); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
.archiv-ctrl-group { display: flex; gap: 0.25rem; }
.archiv-ctrl-btn {
    padding: 0.3rem 0.65rem; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); background: transparent;
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
    cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.archiv-ctrl-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }
.archiv-ctrl-btn.active { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }

.archiv-view-controls { display: flex; gap: 0.25rem; margin-left: auto; }

/* ── Neu-Badge ── */
.archiv-neu-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 800;
    background: var(--accent-red); color: #fff;
    padding: 0.1rem 0.35rem; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.4;
    vertical-align: middle;
}

/* ── Group Header ── */
.archiv-group { margin-bottom: 1.25rem; }
.archiv-group-header {
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem; margin-bottom: 0.6rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.archiv-group-count {
    font-weight: 400; color: var(--text-muted); font-size: 0.75rem;
}

/* ── Tile Grid ── */
.archiv-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: 230px;
    gap: 0.6rem;
}
.archiv-tile {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); overflow: hidden;
    cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
    display: flex; flex-direction: column;
    outline: none; height: 230px;
}
.archiv-tile:hover, .archiv-tile:focus {
    border-color: var(--accent-red); box-shadow: 0 2px 12px rgba(225,29,72,0.12);
}
.archiv-tile-thumb {
    width: 100%; height: 120px; flex-shrink: 0;
    overflow: hidden; display: block;
}
.archiv-tile-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.archiv-tile-icon {
    width: 100%; height: 120px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; background: var(--bg-subtle, var(--sidebar-bg));
}
.archiv-tile-body {
    padding: 0.45rem 0.55rem 0.5rem;
    display: flex; flex-direction: column; gap: 0.25rem;
    flex: 1; overflow: hidden;
    background: var(--card-bg);
    position: relative; z-index: 1;
}
.archiv-tile-title {
    font-size: 0.8rem; font-weight: 700; line-height: 1.3;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    color: var(--text-main);
}
.archiv-tile-meta {
    font-size: 0.7rem; color: var(--text-muted);
    display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
}
.archiv-tile-type-badge {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    padding: 0.1rem 0.3rem; border-radius: 3px;
    background: rgba(225,29,72,0.1); color: var(--accent-red);
}
.archiv-tile-tags {
    display: flex; flex-wrap: wrap; gap: 0.2rem;
}

@media (max-width: 600px) {
    .archiv-tile-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.4rem; }
    .archiv-alle-controls { gap: 0.35rem; }
    .archiv-global-filters { padding: 0.5rem; gap: 0.4rem; }
}

/* ====================================================================
   OH COLONIA - Secret Player  (cc zum Oeffnen)
   ==================================================================== */

.oc-player {
    position: fixed; inset: 0; z-index: 9100;
    background: rgba(0,0,0,0.88); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: oc-fadein 0.22s ease;
}
@keyframes oc-fadein { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.oc-window {
    background: #0d0d12; border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px; overflow: hidden;
    width: min(980px, 96vw); height: min(640px, 94vh);
    display: flex; flex-direction: column;
    box-shadow: 0 40px 100px rgba(0,0,0,0.85);
}
.oc-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.65rem 1.1rem; background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;
}
.oc-header-album {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: rgba(255,255,255,0.35);
}
.oc-header-btns { display: flex; gap: 0.35rem; }
.oc-hbtn {
    background: transparent; border: none; color: rgba(255,255,255,0.35);
    font-size: 1rem; cursor: pointer; padding: 0.15rem 0.45rem;
    border-radius: 5px; transition: color 0.15s, background 0.15s;
    font-family: inherit; line-height: 1;
}
.oc-hbtn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.oc-body {
    display: grid; grid-template-columns: 200px 1fr 440px;
    flex: 1; overflow: hidden;
}
.oc-playlist {
    overflow-y: auto; border-right: 1px solid rgba(255,255,255,0.05);
    padding: 0.4rem 0;
}
.oc-playlist::-webkit-scrollbar { width: 3px; }
.oc-playlist::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.oc-pl-item {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.5rem 0.9rem; cursor: pointer;
    color: rgba(255,255,255,0.42); font-size: 0.8rem;
    transition: background 0.12s, color 0.12s;
}
.oc-pl-item:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.oc-pl-item.active { background: rgba(225,29,72,0.12); color: #fff; }
.oc-pl-item.active .oc-pl-num { color: #e11d48; }
.oc-pl-num {
    font-size: 0.68rem; color: rgba(255,255,255,0.2);
    font-variant-numeric: tabular-nums; width: 18px; flex-shrink: 0;
}
.oc-pl-genre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-pl-dl { color: rgba(255,255,255,0.2); text-decoration: none; font-size: 0.85rem; padding: 0.2rem; display: none; transition: color 0.15s; }
.oc-pl-dl:hover { color: #fff; }
.oc-pl-item:hover .oc-pl-dl, .oc-pl-item.active .oc-pl-dl { display: block; }
.oc-center {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 1.2rem 1.5rem; gap: 0.55rem; overflow: hidden;
}
.oc-cover-wrap {
    width: 170px; height: 170px; border-radius: 14px; overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7); background: rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-bottom: 0.3rem;
}
.oc-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-cover-fallback { font-size: 3rem; color: rgba(255,255,255,0.15); }
.oc-now-genre { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: #e11d48; }
.oc-now-title { font-size: 1.15rem; font-weight: 800; color: #fff; }
.oc-now-artist { font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.oc-progress-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; max-width: 340px; }
.oc-time { font-size: 0.68rem; color: rgba(255,255,255,0.3); font-variant-numeric: tabular-nums; white-space: nowrap; width: 34px; }
.oc-seek {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15);
    outline: none; cursor: pointer; accent-color: #e11d48;
}
.oc-seek::-webkit-slider-thumb {
    -webkit-appearance: none; width: 13px; height: 13px;
    border-radius: 50%; background: #e11d48; cursor: pointer;
}
.oc-ctrl-row { display: flex; align-items: center; gap: 0.75rem; }
.oc-ctrl {
    background: transparent; border: none; color: rgba(255,255,255,0.6);
    font-size: 1.1rem; cursor: pointer; padding: 0.35rem 0.6rem;
    border-radius: 50%; transition: color 0.15s, background 0.15s;
    font-family: inherit; line-height: 1;
}
.oc-ctrl:hover { color: #fff; background: rgba(255,255,255,0.1); }
.oc-play-btn {
    font-size: 1.3rem !important; color: #fff !important;
    background: #e11d48 !important;
    width: 48px; height: 48px; padding: 0 !important;
    border-radius: 50% !important; box-shadow: 0 4px 16px rgba(225,29,72,0.4);
    display: flex !important; align-items: center; justify-content: center;
}
.oc-play-btn:hover { background: #c01040 !important; }
.oc-vol-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; max-width: 180px; }
.oc-vol-icon { font-size: 0.85rem; }
.oc-vol {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 3px; border-radius: 2px; background: rgba(255,255,255,0.15);
    outline: none; cursor: pointer; accent-color: #e11d48;
}
.oc-lyrics-wrap { border-left: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; overflow: hidden; }
.oc-lyrics-title {
    font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.12em; color: rgba(255,255,255,0.25);
    padding: 0.8rem 1rem 0.4rem; flex-shrink: 0;
}
.oc-lyrics {
    flex: 1; overflow-y: auto; padding: 0 1rem 1rem;
    font-size: 0.78rem; line-height: 1.75; color: rgba(255,255,255,0.55);
}
.oc-lyrics::-webkit-scrollbar { width: 3px; }
.oc-lyrics::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.oc-lyr-section { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #e11d48; margin: 1rem 0 0.2rem; }
.oc-lyr-line { color: rgba(255,255,255,0.6); }
.oc-lyr-blank { height: 0.4rem; }
.oc-mini {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9050;
    background: #0d0d12; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.55rem 1.25rem; box-shadow: 0 -6px 30px rgba(0,0,0,0.6);
    animation: oc-slideup 0.2s ease;
}
@keyframes oc-slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.oc-mini-cover { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,0.05); }
.oc-mini-info { min-width: 0; flex-shrink: 0; width: 130px; }
.oc-mini-title { font-size: 0.8rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-mini-genre { font-size: 0.68rem; color: #e11d48; font-weight: 600; }
.oc-mini-ctrl { display: flex; gap: 0.2rem; flex-shrink: 0; }
.oc-mini-prog-wrap { flex: 1; min-width: 0; }
.oc-mini-prog { height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; overflow: hidden; margin-bottom: 0.2rem; }
.oc-mini-bar { height: 100%; background: #e11d48; border-radius: 2px; transition: width 0.8s linear; width: 0%; }
.oc-mini-times { display: flex; justify-content: space-between; font-size: 0.65rem; color: rgba(255,255,255,0.28); font-variant-numeric: tabular-nums; }
@media (max-width: 750px) {
    .oc-body { display: flex; flex-direction: column; }
    .oc-center { order: 1; flex-shrink: 0; padding: 1rem 1.5rem; }
    .oc-playlist { 
        order: 2; display: block; flex: 1;
        border-right: none; border-top: 1px solid rgba(255,255,255,0.05);
    }
    .oc-lyrics-wrap { display: none; }
    .oc-window { height: 96vh; border-radius: 12px; }
    .oc-mini-prog-wrap { display: none; }
}

.oc-shuffle-btn { font-size: 1rem !important; opacity: 0.5; }
.oc-shuffle-btn.active { color: #e11d48 !important; opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   ADMIN DASHBOARD STYLES
   ══════════════════════════════════════════════════════════════ */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-stat-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform var(--motion-fast) var(--ease-out);
}

.admin-stat-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-red);
}

body.dark-mode .admin-stat-item {
    background: #131e30;
}

#scraper-status {
    min-height: 20px;
    line-height: 1.6;
}

.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }

/* ── Volltextsuche Gruppierung ── */
.search-category-header {
    padding: 0.75rem 1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-red);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

body.dark-mode .search-category-header {
    background: #131e30;
}

.sr-icon {
    font-size: 1.25rem;
    width: 32px;
    display: flex;
    justify-content: center;
}
/* ── Admin Datei-Editor ── */
.admin-editor-wrap {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    overflow-x: auto;
    min-height: 300px;
}

.admin-editor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--paper-color);
}

.admin-editor-table th,
.admin-editor-table td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.admin-editor-table th {
    background: var(--bg-color);
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.admin-editor-table td:focus {
    outline: 2px solid var(--accent-red);
    background: rgba(225, 29, 72, 0.05);
}

.admin-json-editor {
    width: 100%;
    height: 400px;
    font-family: 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: var(--radius-sm);
    border: none;
    resize: vertical;
    line-height: 1.5;
}

body.dark-mode .admin-editor-wrap {
    background: #0f172a;
}
body.dark-mode .admin-editor-table td {
    background: #131e30;
}
body.dark-mode .admin-editor-table th {
    background: #0f172a;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.admin-logs-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.admin-log-item {
    padding: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--motion-fast);
}

.admin-log-item:last-child { border-bottom: none; }
.admin-log-item:hover { background: rgba(255,255,255,0.03); }

.admin-log-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.admin-log-user {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-log-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.admin-log-body {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-main);
}

/* ──────────────────────────────────────────────────────────
   PROFILE AVATAR STYLES
   ────────────────────────────────────────────────────────── */
.profile-header-wrap {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.profile-avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 38px;
    height: 38px;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid var(--card-bg);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.avatar-edit-badge:hover {
    transform: scale(1.15);
    background: var(--accent-red-hover);
}

.avatar-edit-badge svg {
    width: 18px;
    height: 18px;
}

.profile-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 5;
    display: none;
}

@media (max-width: 768px) {
    .profile-header-wrap {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .profile-avatar-container {
        width: 120px;
        height: 120px;
    }
}

/* ──────────────────────────────────────────────────────────
   TOAST NOTIFICATIONS
   ────────────────────────────────────────────────────────── */
.cc-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
}

.cc-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ──────────────────────────────────────────────────────────
   SPLIT CHART LAYOUT
   ────────────────────────────────────────────────────────── */
.split-chart-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.split-chart-item {
    width: 100%;
    position: relative;
    background: rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .split-chart-container {
        gap: 1rem;
    }
}

.cc-toast.success { border-left: 4px solid var(--accent-green); }
.cc-toast.error { border-left: 4px solid var(--accent-red); }

.cc-toast span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ──────────────────────────────────────────────────────────
   H2H CHART SELECTOR
   ────────────────────────────────────────────────────────── */
.profile-chart-card {
    position: relative;
}

.h2h-selector-wrap {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.h2h-icon {
    font-size: 0.9rem;
    color: var(--accent-red);
    font-weight: 800;
}

.h2h-select-mini {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding-right: 0.5rem;
    outline: none;
}

@media (max-width: 768px) {
    .h2h-selector-wrap {
        position: static;
        margin-bottom: 1rem;
        width: 100%;
        justify-content: center;
    }
}

.h2h-chart-score {
    background: var(--accent-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    margin-left: 0.25rem;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
    animation: fadeInScale 0.3s ease;
}

.h2h-win-val  { color: var(--success) !important; font-weight: 800; }
.h2h-loss-val { color: var(--danger) !important; font-weight: 800; }

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ── Comparison Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr auto; /* Default 2 Spalten: Label | Wert */
    gap: 0.75rem 1.5rem;
    align-items: center;
}

.h2h-active .stats-grid {
    grid-template-columns: 1fr auto auto !important; /* H2H: Label | Tipper | Gegner */
}

#profile-main-grid.h2h-active {
    grid-template-columns: 1.2fr 1.8fr !important;
}

.stats-grid-head {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.stats-grid-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.stats-grid-val {
    font-weight: 700;
    text-align: right;
    font-family: var(--font-mono);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.stats-grid-val.better {
    color: var(--success) !important;
    transform: scale(1.05);
}

.stats-grid-val.worse {
    opacity: 0.5;
}/* ──────────────────────────────────────────────────────────
   PROFILE GRID & RESPONSIVE LAYOUT
   ────────────────────────────────────────────────────────── */
#profile-main-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    min-width: 0;
}

#profile-main-grid.h2h-active {
    grid-template-columns: 1.2fr 1.8fr;
}

@media (max-width: 950px) {
    #profile-main-grid, 
    #profile-main-grid.h2h-active {
        grid-template-columns: 1fr !important;
    }
    
    .profile-header-wrap {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr auto !important;
        gap: 0.5rem 1rem;
    }
    
    .h2h-active .stats-grid {
        grid-template-columns: 1fr auto auto !important;
    }
    
    .stats-grid-label {
        font-size: 0.82rem;
        white-space: normal;
    }
    
    .stats-grid-val {
        font-size: 0.9rem;
    }

    .profile-chart-card h2 {
        font-size: 1.1rem;
        margin-right: 0;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.25rem !important;
        align-items: center;
    }
    
    .stats-grid-label {
        grid-column: 1 / -1;
        text-align: center;
        background: rgba(0,0,0,0.05);
        padding: 0.4rem;
        margin-top: 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
    
    .stats-grid-val {
        text-align: center;
        padding: 0.5rem;
        font-size: 1.05rem;
    }

    /* Single-Mode: Falls nur ein Wert da ist, soll er zentriert sein */
    .stats-grid:not(.h2h-active) .stats-grid-val {
        grid-column: 1 / -1;
    }
    
    .stats-grid-head {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   Reactions
   ══════════════════════════════════════════════════════════════ */
.reaction-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    line-height: 1.4;
}
.reaction-btn:hover { background: var(--sidebar-hover); transform: scale(1.1); }
.reaction-btn.active { background: rgba(225,29,72,0.12); border-color: var(--accent-red); }
.reaction-count { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.reaction-btn.active .reaction-count { color: var(--accent-red); }

/* ══════════════════════════════════════════════════════════════
   Tag-Cloud Counts & Autocomplete
   ══════════════════════════════════════════════════════════════ */
.tag-count {
    display: inline-block;
    margin-left: 0.3rem;
    background: var(--bg-color);
    border-radius: 10px;
    padding: 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1.6;
}
.archiv-chip.active .tag-count { background: rgba(255,255,255,0.2); color: #fff; }

.tag-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 100;
    overflow: hidden;
}
.tag-ac-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.1s;
}
.tag-ac-item:hover { background: var(--sidebar-hover); }
.tag-ac-item::before { content: '#'; color: var(--accent-red); margin-right: 0.2rem; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   Mobile Fixes
   ══════════════════════════════════════════════════════════════ */

/* Season-Media-Grid: 3 → 2 Spalten auf Mobile */
@media (max-width: 600px) {
    .season-media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch-Targets: Toolbar-Icons auf Mobile vergrößern */
@media (max-width: 768px) {
    .toolbar-icon {
        width: 40px;
        height: 40px;
    }
}

/* Font-Sizes: Zu kleine Schrift auf Mobile anheben */
@media (max-width: 768px) {
    .season-stat-label {
        font-size: 0.72rem;
    }
    .tv-th-tipper {
        font-size: 0.78rem;
    }
    .hm-cell {
        font-size: 0.72rem;
    }
}

/* Login-Modal: auf sehr kleinen Screens scrollbar */
@media (max-width: 400px) {
    .login-modal-overlay {
        align-items: flex-start;
        padding-top: 1rem;
    }
    .login-modal {
        max-height: 95vh;
        overflow-y: auto;
    }
}

