/**
 * Die Lounge — Core Editorial & Community Design System (/assets/css/core.css)
 *
 * - Standard: Dark Mode ([data-theme="dark"]), umschaltbar auf Light Mode ([data-theme="light"])
 * - Typografie: Plus Jakarta Sans (Editorial & UI) + Barlow Condensed (Scores & Rankings)
 * - Geteilte Basis-Klassen für alle Pages (.dl-*, sowie Abwärtskompatibilität für .cms-*)
 */

/* ============================================================================
   1. DESIGN TOKENS — DARK MODE (DEFAULT) & LIGHT MODE
   ============================================================================ */
:root,
[data-theme="dark"] {
    --bg-body: #0e1014;
    --bg-topbar: #090b0e;
    --bg-surface: #15181f;
    --bg-surface-hover: #1b1f28;
    --bg-elevated: #1e232d;
    --bg-header: rgba(14, 16, 20, 0.92);
    --bg-input: #11141a;

    --text-primary: #f3f5f8;
    --text-secondary: #9ca3b0;
    --text-muted: #687080;
    --text-on-accent: #ffffff;

    --accent: #f05223;
    --accent-hover: #ff6436;
    --accent-subtle: rgba(240, 82, 35, 0.12);

    --border-hairline: rgba(255, 255, 255, 0.075);
    --border-strong: rgba(255, 255, 255, 0.14);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);

    --score-masterpiece: #16a34a;
    --score-great: #f05223;
    --score-good: #eab308;

    --container-max: 1360px;
    --header-height: 70px;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Barlow Condensed', 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
    --bg-body: #f5f6f8;
    --bg-topbar: #ebedf2;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f9fafb;
    --bg-elevated: #eef0f5;
    --bg-header: rgba(255, 255, 255, 0.94);
    --bg-input: #f1f3f7;

    --text-primary: #111318;
    --text-secondary: #4a5262;
    --text-muted: #727a8a;
    --text-on-accent: #ffffff;

    --accent: #e04618;
    --accent-hover: #c53910;
    --accent-subtle: rgba(224, 70, 24, 0.09);

    --border-hairline: rgba(17, 19, 24, 0.085);
    --border-strong: rgba(17, 19, 24, 0.16);

    --shadow-sm: 0 2px 6px rgba(17, 19, 24, 0.05);
    --shadow-md: 0 10px 26px rgba(17, 19, 24, 0.08);
    --shadow-lg: 0 20px 44px rgba(17, 19, 24, 0.14);
}

/* ============================================================================
   2. RESET & BASE TYPOGRAPHY
   ============================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body.dl-body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

code, pre, kbd {
    font-family: var(--font-mono);
}

.dl-container,
.cms-container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 640px) {
    .dl-container,
    .cms-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================================================
   3. TOP UTILITY & TRENDING BAR
   ============================================================================ */
.dl-topbar {
    background-color: var(--bg-topbar);
    border-bottom: 1px solid var(--border-hairline);
    font-size: 0.775rem;
    color: var(--text-secondary);
}

.dl-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    gap: 1rem;
}

.dl-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    overflow: hidden;
}

.dl-trending-label {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.68rem;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.dl-trending-label::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 11px;
    background: var(--border-strong);
    margin-left: 0.35rem;
}

.dl-trending-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}
.dl-trending-list::-webkit-scrollbar {
    display: none;
}

.dl-trending-link {
    font-weight: 600;
    color: var(--text-secondary);
}
.dl-trending-link:hover {
    color: var(--text-primary);
}

.dl-topbar-right {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.dl-topbar-claim {
    color: var(--text-muted);
    font-weight: 500;
}

.dl-dev-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 0.1rem 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xs);
}

.dl-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.dl-status-dot.is-online { background-color: #22c55e; }
.dl-status-dot.is-offline { background-color: #ef4444; }

.dl-topbar-editorial-link {
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.dl-topbar-editorial-link:hover {
    color: var(--accent-hover);
}

@media (max-width: 900px) {
    .dl-topbar-claim {
        display: none;
    }
}

@media (max-width: 640px) {
    .dl-topbar {
        display: none;
    }
}

/* ============================================================================
   4. MAIN STICKY HEADER & NAVIGATION
   ============================================================================ */
.dl-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-hairline);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dl-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.dl-main {
    flex: 1 0 auto;
}

/* Brand / Logo */
.dl-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.dl-brand-logo {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.25s var(--ease-out);
}
.dl-brand:hover .dl-brand-logo {
    transform: scale(1.04);
}

.dl-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.dl-brand-title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dl-brand-name {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}
.dl-brand-name span {
    color: var(--accent);
}

.dl-brand-tagline {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    color: var(--text-muted);
    margin-top: 2px;
}

.dl-trending-link.is-active {
    color: var(--accent);
}

/* Desktop Navigation */
.dl-nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0.25rem;
}

.dl-nav-item {
    position: relative;
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    transition: color 0.15s ease;
    white-space: nowrap;
}

.dl-nav-item:hover,
.dl-nav-item.is-active {
    color: var(--text-primary);
}

.dl-nav-item::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s var(--ease-out);
}

.dl-nav-item:hover::after,
.dl-nav-item.is-active::after {
    transform: scaleX(1);
}

.dl-nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border-strong);
    margin: 0 0.4rem;
    flex-shrink: 0;
}

.dl-nav-community-link i {
    font-size: 0.8rem;
    color: var(--accent);
}

/* Desktop Navigation Dropdown ("Die Lounge" -> "Mitglieder") */
.dl-nav-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dl-nav-dropdown-trigger {
    cursor: pointer;
}

.dl-nav-caret {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-left: 0.1rem;
    transition: transform 0.2s ease, color 0.15s ease;
}

.dl-nav-dropdown:hover .dl-nav-caret,
.dl-nav-dropdown.is-open .dl-nav-caret {
    transform: rotate(180deg);
    color: var(--accent);
}

.dl-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 268px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.985);
    transform-origin: top left;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    z-index: 160;
    overflow: hidden;
}

/* Brücke über den 8px Spalt für nahtloses Hover-Verhalten */
.dl-nav-dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.dl-nav-dropdown:hover .dl-nav-dropdown-menu,
.dl-nav-dropdown.is-open .dl-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dl-nav-dropdown-head {
    padding: 0.6rem 0.85rem 0.45rem;
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(255, 255, 255, 0.015);
}

.dl-nav-dropdown-kicker {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Rückweg-Button im Community-Header ("Zum Magazin") */
.dl-nav-area-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 36px;
    padding: 0 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.dl-nav-area-switch i {
    font-size: 0.75rem;
    color: var(--accent);
    transition: transform 0.15s ease;
}

.dl-nav-area-switch:hover {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.dl-nav-area-switch:hover i {
    transform: translateX(-2px);
}

/* Header Right Actions */
.dl-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

/* Search Trigger */
.dl-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 38px;
    padding: 0 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 500;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.dl-search-trigger:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.dl-search-kbd {
    font-size: 0.68rem;
    padding: 0.1rem 0.4rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: 3px;
    color: var(--text-muted);
}

/* Icon Button (Theme Toggle & Mobile Hamburger) */
.dl-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.dl-icon-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* Theme Icon Visibility */
[data-theme="dark"] .dl-theme-icon-dark { display: none; }
[data-theme="dark"] .dl-theme-icon-light { display: inline-block; }
[data-theme="light"] .dl-theme-icon-light { display: none; }
[data-theme="light"] .dl-theme-icon-dark { display: inline-block; }

/* User Profile Trigger & Dropdown */
.dl-user-menu {
    position: relative;
}

.dl-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 40px;
    padding: 0.25rem 0.65rem 0.25rem 0.3rem;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.dl-user-trigger:hover {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
}
.dl-user-menu.is-open .dl-user-trigger {
    border-color: rgba(255, 87, 34, 0.45);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.08);
}

.dl-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dl-user-initials {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent);
}

.dl-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
}
.dl-user-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}
.dl-user-role {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dl-user-caret {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-left: 0.15rem;
    transition: transform 0.2s ease, color 0.15s ease;
}
.dl-user-menu.is-open .dl-user-caret {
    transform: rotate(180deg);
    color: var(--accent);
}

.dl-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 284px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.985);
    transform-origin: top right;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    z-index: 150;
    overflow: hidden;
}
.dl-user-menu.is-open .dl-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dl-dropdown-header {
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dl-dropdown-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-sm) - 1px);
}
.dl-dropdown-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-surface);
}

.dl-dropdown-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}
.dl-dropdown-name-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    width: 100%;
    min-width: 0;
}
.dl-dropdown-name-row strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dl-dropdown-handle {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-dropdown-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.14rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 87, 34, 0.1);
    border: 1px solid rgba(255, 87, 34, 0.24);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.2;
}
.dl-dropdown-role-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.dl-dropdown-links {
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dl-dropdown-section-label {
    padding: 0.55rem 0.6rem 0.25rem;
    margin-top: 0.2rem;
    border-top: 1px solid var(--border-hairline);
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.dl-dropdown-footer {
    padding: 0.45rem;
    border-top: 1px solid var(--border-hairline);
    background: rgba(0, 0, 0, 0.14);
}

.dl-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.dl-dropdown-link:hover,
.dl-dropdown-link.is-active {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.dl-dropdown-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.dl-dropdown-icon.is-accent {
    color: var(--accent);
    background: rgba(255, 87, 34, 0.08);
    border-color: rgba(255, 87, 34, 0.2);
}
.dl-dropdown-link:hover .dl-dropdown-icon,
.dl-dropdown-link.is-active .dl-dropdown-icon {
    color: var(--accent);
    border-color: rgba(255, 87, 34, 0.35);
    background: rgba(255, 87, 34, 0.12);
}

.dl-dropdown-link-body {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
    flex: 1;
}
.dl-dropdown-link-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.dl-dropdown-link-sub {
    font-size: 0.69rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-dropdown-arrow {
    font-size: 0.66rem;
    color: var(--text-muted);
    opacity: 0.55;
    transition: transform 0.15s ease, opacity 0.15s ease, color 0.15s ease;
}
.dl-dropdown-link:hover .dl-dropdown-arrow {
    transform: translateX(2px);
    opacity: 1;
    color: var(--accent);
}

.dl-dropdown-link.is-danger .dl-dropdown-link-title {
    color: #f87171;
}
.dl-dropdown-link.is-danger .dl-dropdown-icon {
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}
.dl-dropdown-link.is-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}
.dl-dropdown-link.is-danger:hover .dl-dropdown-icon {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.38);
    color: #ef4444;
}

.dl-mobile-toggle {
    display: none;
}

@media (max-width: 1120px) {
    .dl-search-trigger-text,
    .dl-search-kbd {
        display: none;
    }
    .dl-search-trigger {
        width: 38px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .dl-nav {
        display: none;
    }
    .dl-mobile-toggle {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    :root,
    [data-theme="dark"],
    [data-theme="light"] {
        --header-height: 60px;
    }

    .dl-header-inner {
        gap: 0.5rem;
    }

    .dl-brand {
        gap: 0.55rem;
        min-width: 0;
    }

    .dl-brand-logo {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .dl-brand-name {
        font-size: 1.32rem;
    }

    .dl-brand-tagline {
        font-size: 0.54rem;
        letter-spacing: 0.08em;
        white-space: nowrap;
    }

    .dl-header-actions {
        gap: 0.4rem;
    }

    .dl-icon-btn,
    .dl-search-trigger {
        width: 36px;
        height: 36px;
    }

    .dl-user-meta,
    .dl-user-caret {
        display: none;
    }

    .dl-user-trigger {
        height: 36px;
        padding: 0.2rem;
    }

    .dl-user-avatar {
        width: 28px;
        height: 28px;
    }

    .dl-user-dropdown {
        right: -0.25rem;
        width: min(230px, calc(100vw - 2rem));
    }
}

@media (max-width: 420px) {
    /* Theme-Umschalter ist im Mobile-Drawer enthalten — schafft Platz im schmalen Smartphone-Header */
    #themeToggleBtn {
        display: none;
    }

    .dl-brand-tagline {
        font-size: 0.5rem;
        letter-spacing: 0.05em;
    }
}

/* ============================================================================
   5. MOBILE NAVIGATION DRAWER & SEARCH MODAL
   ============================================================================ */
.dl-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.dl-drawer-backdrop.is-open {
    opacity: 1;
}

.dl-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    background: var(--bg-surface);
    border-left: 1px solid var(--border-strong);
    z-index: 210;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: var(--shadow-lg);
}
.dl-drawer.is-open {
    transform: translateX(0);
}

.dl-drawer-header {
    height: var(--header-height);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-hairline);
}

.dl-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dl-drawer-search {
    position: relative;
    display: flex;
    align-items: center;
}
.dl-drawer-search i {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.dl-drawer-search input {
    width: 100%;
    height: 42px;
    padding: 0 0.85rem 0 2.4rem;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
}
.dl-drawer-search input:focus {
    border-color: var(--accent);
}

.dl-drawer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.dl-drawer-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.dl-drawer-nav {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-hairline);
}
.dl-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0.25rem;
    border-bottom: 1px solid var(--border-hairline);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.dl-drawer-link.is-active,
.dl-drawer-link:hover {
    color: var(--accent);
}
.dl-drawer-link i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dl-drawer-group {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-hairline);
}

.dl-drawer-group > .dl-drawer-link {
    border-bottom: none;
    padding-bottom: 0.45rem;
}

.dl-drawer-subnav {
    display: flex;
    flex-direction: column;
    padding: 0 0 0.55rem 0.95rem;
    margin-left: 0.35rem;
    border-left: 1px solid var(--border-strong);
    gap: 0.15rem;
}

.dl-drawer-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.48rem 0.55rem;
    border-radius: var(--radius-xs);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dl-drawer-sublink i {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.dl-drawer-sublink:hover,
.dl-drawer-sublink.is-active {
    background: var(--bg-elevated);
    color: var(--accent);
}

.dl-drawer-area-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.dl-drawer-area-switch i {
    color: var(--accent);
}

.dl-drawer-area-switch:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.dl-drawer-theme-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.dl-drawer-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-hairline);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.dl-drawer-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.dl-drawer-user strong {
    display: block;
    font-size: 0.9rem;
}
.dl-drawer-user span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Search Modal */
.dl-search-modal {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.dl-search-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.dl-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}
.dl-search-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.dl-search-form {
    display: flex;
    align-items: center;
    padding: 0 1.1rem;
    border-bottom: 1px solid var(--border-hairline);
}
.dl-search-icon {
    color: var(--accent);
    font-size: 1.05rem;
}
.dl-search-input {
    flex: 1;
    height: 58px;
    padding: 0 0.9rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
}
.dl-search-esc {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: 4px;
    color: var(--text-muted);
}
.dl-search-suggestions {
    padding: 1rem 1.15rem;
}
.dl-search-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}
.dl-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dl-search-tag {
    padding: 0.35rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.dl-search-tag:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ============================================================================
   6. SHARED EDITORIAL & UI PRIMITIVES (Wiederverwendbar für alle Pages)
   ============================================================================ */
.dl-main,
.cms-main {
    flex: 1;
    padding: 2rem 0 4rem;
}

/* Sobald die Breadcrumb-Leiste aktiv ist, startet der Seiteninhalt direkt darunter mit festem Abstand */
#dlBreadcrumbsSlot:has(.dl-breadcrumbs) + .dl-main {
    padding-top: 1.25rem;
}

.dl-section,
.cms-section {
    margin-bottom: 3rem;
}

/* Editorial Section Header (IGN-Style mit vertikalem Akzentbalken) */
.dl-section-head,
.cms-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-hairline);
}

.dl-section-title,
.cms-section-title {
    position: relative;
    padding-left: 0.85rem;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

.dl-section-title::before,
.cms-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.1em;
    bottom: 0.08em;
    width: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.dl-section-more {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.dl-section-more:hover {
    color: var(--accent);
}

/* Editorial Kicker (Kein KI-Pill-Badge, sondern sauberer Magazin-Kicker) */
.dl-kicker {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    max-width: 100%;
    min-width: 0;
}
.dl-kicker > span {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.dl-kicker-sep {
    color: var(--text-muted);
    font-weight: 400;
    flex-shrink: 0;
}
.dl-kicker-meta,
.dl-kicker time {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Buttons */
.dl-btn,
.cms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 42px;
    padding: 0 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.dl-btn-sm {
    height: 36px;
    padding: 0 0.9rem;
    font-size: 0.8rem;
}

.dl-btn-primary,
.cms-btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
}
.dl-btn-primary:hover,
.cms-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.dl-btn-outline,
.cms-btn-outline {
    background: var(--bg-elevated);
    border-color: var(--border-hairline);
    color: var(--text-primary);
}
.dl-btn-outline:hover,
.cms-btn-outline:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface-hover);
}

/* Cards & Grids */
.dl-card,
.cms-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.dl-layout-sidebar,
.cms-layout-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2.25rem;
    align-items: start;
    width: 100%;
}

.dl-layout-sidebar > *,
.cms-layout-sidebar > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1080px) {
    .dl-layout-sidebar,
    .cms-layout-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Editorial Score Ring (IGN-Style Wertung) */
.dl-score {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #111318;
    border: 2px solid var(--accent);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

/* Breadcrumbs */
.dl-breadcrumbs {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-hairline);
    padding: 0.65rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.dl-breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.dl-breadcrumb-list a:hover {
    color: var(--accent);
}
.dl-bc-sep {
    color: var(--text-muted);
    margin-left: 0.45rem;
}

/* ============================================================================
   7. FOOTER
   ============================================================================ */
.dl-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-hairline);
    padding: 3.5rem 0 2rem;
    margin-top: auto;
}

.dl-footer-top {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-hairline);
}

.dl-footer-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.65;
    margin-top: 1rem;
    max-width: 360px;
}

.dl-footer-socials {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.dl-social-link {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--bg-elevated);
    border: 1px solid var(--border-hairline);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.dl-social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
}

.dl-footer-heading {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.dl-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.dl-footer-links a:hover {
    color: var(--accent);
}

.dl-footer-bottom {
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dl-footer-bottom-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dl-footer-util-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xs);
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.dl-footer-util-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

@media (max-width: 960px) {
    .dl-footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ============================================================================
   8. GLOBAL MOBILE EDGE-TO-EDGE ARCHITECTURE (<= 768px)
   Verhindert jegliches horizontales Verrutschen; alle Haupt-Container & Cards
   schließen bündig (100% Viewport-Breite) an den Displayrändern ab.
   ============================================================================ */
@media (max-width: 768px) {
    :root,
    [data-theme="dark"],
    [data-theme="light"] {
        --header-height: 58px;
        --mobile-gutter: max(1rem, env(safe-area-inset-left, 0px));
    }

    html,
    body.dl-body,
    .dl-main,
    .cms-main {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    /* Header, Breadcrumbs & Footer behalten 16px Innenabstand zum Displayrand */
    .dl-header .dl-container,
    .dl-breadcrumbs .dl-container,
    .dl-footer .dl-container {
        padding-left: var(--mobile-gutter);
        padding-right: var(--mobile-gutter);
    }

    /* Haupt-Content-Container im Main-Bereich laufen 100% Edge-to-Edge */
    .dl-main,
    .cms-main {
        padding: 0 0 1.5rem;
    }

    #dlBreadcrumbsSlot:has(.dl-breadcrumbs) + .dl-main {
        padding-top: 0;
    }

    .dl-main .dl-container,
    .dl-main .cms-container,
    .dl-section.dl-container,
    .cms-section.cms-container {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .dl-section,
    .cms-section {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0.5rem;
    }

    .dl-layout-sidebar,
    .cms-layout-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    /* Alle Standard-Karten im Mobile-Layout sind 100% Edge-to-Edge Flächen */
    .dl-card,
    .cms-card {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 1.15rem var(--mobile-gutter);
        box-shadow: none;
    }

    .dl-section-head,
    .cms-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.65rem;
    }

    .dl-section-title,
    .cms-section-title {
        font-size: 1.35rem;
    }

    .dl-breadcrumbs {
        padding: 0.45rem 0;
        font-size: 0.74rem;
    }

    .dl-breadcrumb-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        white-space: nowrap;
        gap: 0.35rem;
    }

    .dl-breadcrumb-list::-webkit-scrollbar {
        display: none;
    }

    .dl-breadcrumb-list li {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
    }

    .dl-breadcrumb-list li:last-child {
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dl-breadcrumb-list li:last-child span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dl-search-modal {
        padding: 0;
        align-items: flex-start;
    }

    .dl-search-modal-dialog {
        max-width: 100%;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .dl-search-input {
        height: 50px;
        font-size: 0.94rem;
    }

    .dl-footer {
        padding: 2rem 0 1.5rem;
    }

    .dl-footer-top {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .dl-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .dl-footer-bottom-actions {
        width: 100%;
        justify-content: space-between;
    }
}


/* ============================================================================
   9. PROJECT JANUS & FIREBASE NOTIFICATION CENTER (HEADER GLOCKE & DROPDOWN)
   ============================================================================ */
.dl-notif-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dl-notif-trigger {
    position: relative;
}

.dl-notif-trigger.has-unread {
    color: var(--text-primary);
    border-color: rgba(255, 87, 34, 0.4);
    background: rgba(255, 87, 34, 0.08);
}

.dl-notif-menu.is-open .dl-notif-trigger {
    border-color: rgba(255, 87, 34, 0.5);
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.08);
}

.dl-notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.55), 0 0 0 2px var(--bg-base);
    pointer-events: none;
}

.dl-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 432px;
    max-width: calc(100vw - 1.5rem);
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.985);
    transform-origin: top right;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    z-index: 1200;
    overflow: hidden;
}

.dl-notif-menu.is-open .dl-notif-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dl-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.88rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1px solid var(--border-hairline);
}

.dl-notif-header-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.dl-notif-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255, 87, 34, 0.12);
    border: 1px solid rgba(255, 87, 34, 0.25);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.dl-notif-header-title strong {
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    white-space: nowrap;
}

.dl-notif-count-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    background: rgba(255, 87, 34, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 87, 34, 0.28);
    white-space: nowrap;
}

.dl-notif-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.dl-notif-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    height: 30px;
    padding: 0 0.68rem;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dl-notif-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--bg-elevated);
}

.dl-notif-icon-toggle {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.dl-notif-icon-toggle:hover,
.dl-notif-icon-toggle.is-active {
    color: var(--accent);
    border-color: rgba(255, 87, 34, 0.45);
    background: rgba(255, 87, 34, 0.12);
}

/* Segmented Filter Bar */
.dl-notif-tabs-wrap {
    padding: 0.55rem 0.75rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-hairline);
}

.dl-notif-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.2rem;
    padding: 0.22rem;
    background: var(--bg-input);
    border: 1px solid var(--border-hairline);
    border-radius: 8px;
}

.dl-notif-tab {
    padding: 0.36rem 0.35rem;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dl-notif-tab:hover {
    color: var(--text-primary);
}

.dl-notif-tab.is-active {
    background: var(--bg-elevated);
    color: var(--accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 87, 34, 0.22);
}

/* Inline Push- & Benachrichtigungs-Einstellungen */
.dl-notif-prefs-panel {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-strong);
    padding: 0.8rem 0.85rem;
}

.dl-notif-prefs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.55rem;
    padding: 0 0.15rem;
}

.dl-notif-prefs-head span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dl-notif-prefs-head span i {
    color: var(--accent);
}

.dl-notif-prefs-head small {
    color: var(--accent);
    font-weight: 700;
    background: rgba(255, 87, 34, 0.12);
    border: 1px solid rgba(255, 87, 34, 0.24);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.66rem;
}

.dl-notif-prefs-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dl-notif-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.48rem 0.65rem;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dl-notif-pref-row:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface-hover);
}

.dl-notif-pref-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dl-notif-pref-info strong {
    font-size: 0.77rem;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.dl-notif-pref-info strong i {
    color: var(--accent);
    width: 14px;
    text-align: center;
}

.dl-notif-pref-info small {
    font-size: 0.68rem;
    color: var(--text-muted);
    padding-left: 1.3rem;
}

.dl-notif-pref-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 34px;
    height: 19px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.dl-notif-pref-checkbox::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s ease;
}

.dl-notif-pref-checkbox:checked {
    background: rgba(255, 87, 34, 0.22);
    border-color: var(--accent);
}

.dl-notif-pref-checkbox:checked::after {
    transform: translateX(15px);
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255, 87, 34, 0.6);
}

.dl-notif-prefs-foot {
    margin-top: 0.5rem;
    font-size: 0.67rem;
    color: var(--text-muted);
    text-align: center;
}

/* Liste der Benachrichtigungen (Card-Stack Layout) */
.dl-notif-list {
    max-height: 390px;
    overflow-y: auto;
    padding: 0.45rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.dl-notif-list::-webkit-scrollbar {
    width: 5px;
}

.dl-notif-list::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
}

.dl-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.72rem 0.8rem;
    border-radius: 9px;
    background: transparent;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    position: relative;
}

.dl-notif-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hairline);
}

.dl-notif-item.is-unread {
    background: linear-gradient(90deg, rgba(255, 87, 34, 0.1) 0%, rgba(255, 87, 34, 0.03) 100%);
    border-color: rgba(255, 87, 34, 0.22);
    box-shadow: inset 3px 0 0 var(--accent);
}

.dl-notif-item.is-unread:hover {
    background: linear-gradient(90deg, rgba(255, 87, 34, 0.14) 0%, rgba(255, 87, 34, 0.05) 100%);
    border-color: rgba(255, 87, 34, 0.35);
}

/* Squircle Visual + Smart Category Badge */
.dl-notif-item-visual {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.dl-notif-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    object-fit: cover;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    display: block;
}

.dl-notif-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: rgba(255, 87, 34, 0.1);
    border: 1px solid rgba(255, 87, 34, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.95rem;
}

.dl-notif-cat-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--accent);
    font-size: 0.58rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Kein doppeltes Mini-Badge anzeigen, wenn ohnehin das Haupt-Icon dargestellt wird */
.dl-notif-item-visual.is-icon-only .dl-notif-cat-badge {
    display: none;
}

.dl-notif-item-content {
    flex: 1;
    min-width: 0;
}

.dl-notif-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.dl-notif-item-title {
    font-size: 0.81rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.dl-notif-item-time {
    font-size: 0.67rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.dl-notif-item-msg {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    word-break: break-word;
}

.dl-notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    flex-shrink: 0;
    margin-top: 0.35rem;
}

.dl-notif-empty {
    padding: 2.4rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
}

.dl-notif-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 87, 34, 0.08);
    border: 1px solid rgba(255, 87, 34, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
}

.dl-notif-empty-icon i {
    font-size: 1.3rem;
    color: var(--accent);
}

.dl-notif-empty strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dl-notif-empty span {
    font-size: 0.75rem;
    max-width: 280px;
    line-height: 1.48;
}

.dl-notif-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.85rem;
    background: rgba(0, 0, 0, 0.16);
    border-top: 1px solid var(--border-hairline);
    font-size: 0.72rem;
}

.dl-notif-clear-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    cursor: pointer;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.dl-notif-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.dl-notif-footer-hint {
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .dl-notif-dropdown {
        position: fixed;
        top: calc(var(--header-height, 58px) + 6px);
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        max-width: none;
    }
}
