/* ==========================================================================
   1. DESIGN TOKENS & VARIABLEN (Arlecchino / Handcrafted Dark UI)
   ========================================================================== */
:root {
    /* Kernfarben: Abgrund-Schiefer & Karmesinrot */
    --color-black: #06090e;
    --color-surface: #0b1019;
    --color-surface-elevated: #111826;
    --color-brand: #c81922;
    --color-white: #f4f7fb;

    /* Akzent- & Kontrasttöne */
    --brand-hover: #df202a;
    --brand-text-readable: #ff646d;
    --brand-glow: rgba(200, 25, 34, 0.32);
    --brand-subtle-bg: rgba(200, 25, 34, 0.10);
    --brand-subtle-ambient: rgba(200, 25, 34, 0.16);
    --brand-border: rgba(227, 36, 46, 0.40);

    /* Sekundärer Umgebungs-Akzent */
    --ambient-cyan: rgba(24, 92, 138, 0.16);

    /* Oberflächen & feine Kanten (weniger Plastik-Glasmorphismus, mehr Tiefe) */
    --bg-card: rgba(13, 19, 30, 0.78);
    --bg-card-hover: rgba(18, 26, 40, 0.92);
    --bg-card-media: #080c14;
    --bg-glass: rgba(8, 12, 19, 0.82);
    --bg-header: rgba(6, 9, 14, 0.70);
    --bg-header-scrolled: rgba(6, 9, 14, 0.95);
    
    --text-muted: rgba(215, 226, 240, 0.68);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.14);
    --inner-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.07);

    /* Typografie & Geometrie (schärfere Kanten gegen den "KI-Pillen-Look") */
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-height: 72px;
    --container-max: 1240px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    font-size: 16px;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body:has(.team-dossier-modal[open]),
body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition:
        color var(--transition-fast),
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Dezente Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-black);
}
::-webkit-scrollbar-thumb {
    background: #263042;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-brand);
}

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.site-header.scrolled {
    background: var(--bg-header-scrolled);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
}

.nav-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Raute statt KI-Sternchen */
.brand-mark {
    width: 10px;
    height: 10px;
    background: var(--color-brand);
    transform: rotate(45deg);
    display: inline-block;
    box-shadow: 0 0 10px var(--brand-glow);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2px;
}

.nav-link {
    padding: 7px 13px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.05);
}

/* Dropdown Menü */
.nav-dropdown {
    position: relative;
}

.chevron-icon {
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.nav-dropdown.open .chevron-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--border-highlight);
    border-top: 2px solid var(--color-brand);
    border-radius: var(--radius-md);
    padding: 6px;
    list-style: none;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast),
        visibility var(--transition-fast);
}

.nav-dropdown.open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel li a {
    display: block;
    padding: 9px 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}

.dropdown-panel li a:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.06);
    padding-left: 15px;
}

/* Utilities */
.nav-utilities {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid var(--border-subtle);
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
}

.icon-btn:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-highlight);
}

/* Mobile Hamburger */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--color-white);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 92vh;
    min-height: 92dvh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + 48px) 0 64px;
    overflow: hidden;
}

.hero-bg-picture,
.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, rgba(6, 9, 14, 0.94) 0%, rgba(6, 9, 14, 0.78) 48%, rgba(6, 9, 14, 0.25) 100%),
        linear-gradient(180deg, rgba(6, 9, 14, 0.25) 0%, rgba(6, 9, 14, 0.55) 75%, var(--color-black) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 780px;
    margin-left: 0;
}

/* Kantiges Tag-Label statt runder KI-Pille */
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-white);
    background: rgba(12, 18, 29, 0.75);
    border: 1px solid var(--border-highlight);
    border-left: 3px solid var(--color-brand);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--color-white);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
}

.hero-subtitle {
    display: block;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: var(--brand-text-readable);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.hero-description {
    font-size: clamp(0.98rem, 1.15vw, 1.1rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 52px;
}

.btn-primary-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-white);
    background: var(--color-brand);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.btn-primary-brand:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--brand-glow);
}

.btn-secondary-glass {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 13px 22px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-white);
    background: rgba(15, 22, 34, 0.65);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Quickbar unten im Hero */
.hero-quickbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 760px;
}

.quickbar-item {
    padding: 14px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-left: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    box-shadow: var(--inner-highlight);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quickbar-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    border-left-color: var(--color-brand);
    transform: translateY(-2px);
}

.qb-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.qb-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-white);
}

/* ==========================================================================
   5. SECTIONS GENERAL (Natürlicher Rhythmus statt KI-Symmetrie)
   ========================================================================== */
.section-block {
    padding: 88px 0;
    position: relative;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-text-readable);
    margin-bottom: 8px;
}

/* Scharfe Linie vor dem Eyebrow statt KI-Sternchen */
.section-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    background-color: var(--color-brand);
    display: inline-block;
}

.section-title {
    font-size: clamp(1.75rem, 2.8vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--color-white);
}

/* Zweispaltiger Kopfbereich für natürlicheres Editorial-Layout */
.section-split-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 44px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-split-text {
    max-width: 680px;
}

.section-lead {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--text-muted);
}

.section-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-brand, .btn-text-brand {
    color: var(--brand-text-readable);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-brand:hover, .btn-text-brand:hover {
    color: var(--color-white);
}

/* ==========================================================================
   6. ERKLÄRUNG & MODI KARTEN
   ========================================================================== */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--inner-highlight);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.mode-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--brand-border);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.65);
}

.mode-card-media {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-card-media);
    border-bottom: 1px solid var(--border-subtle);
}

.mode-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}

.mode-card:hover .mode-card-media img {
    transform: scale(1.03);
}

.overlay-preview-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(circle at 50% 35%, rgba(200, 25, 34, 0.28) 0%, transparent 65%),
        linear-gradient(180deg, #0d1421 0%, #070b12 100%);
}

.overlay-icon-showcase {
    color: var(--color-white);
    opacity: 0.9;
}

.mode-difficulty-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--radius-sm);
    background: rgba(6, 9, 14, 0.85);
    color: var(--color-white);
    border: 1px solid var(--border-highlight);
    backdrop-filter: blur(6px);
}

.mode-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mode-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-white);
}

.mode-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    flex-grow: 1;
}

.mode-motto {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    padding-top: 14px;
    margin-bottom: 16px;
    border-top: 1px solid var(--border-subtle);
}

.btn-mode-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.88rem;
}

.mode-card:hover .btn-mode-action {
    background: var(--color-brand);
    border-color: var(--color-brand);
}

/* ==========================================================================
   7. GENSHIN ELEMENT-SYSTEM & TEAM SECTION (3D-Wave-Warp + Dossier)
   ========================================================================== */

/* Offizielle Genshin Element-SVGs (Case-insensitive abgesichert) */
.ele-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    flex-shrink: 0;
}

.ele-anemo, .ele-Anemo     { background-image: url('https://luca.rosenloecher.org/wbc/img/element/anemo.svg'); }
.ele-cryo, .ele-kryo, .ele-Cryo { background-image: url('https://luca.rosenloecher.org/wbc/img/element/cryo.svg'); }
.ele-dendro, .ele-Dendro   { background-image: url('https://luca.rosenloecher.org/wbc/img/element/dendro.svg'); }
.ele-electro, .ele-elektro, .ele-Electro { background-image: url('https://luca.rosenloecher.org/wbc/img/element/electro.svg'); }
.ele-geo, .ele-Geo         { background-image: url('https://luca.rosenloecher.org/wbc/img/element/geo.svg'); }
.ele-hydro, .ele-Hydro     { background-image: url('https://luca.rosenloecher.org/wbc/img/element/hydro.svg'); }
.ele-pyro, .ele-Pyro       { background-image: url('https://luca.rosenloecher.org/wbc/img/element/pyro.svg'); }

/* Dynamische Element-Farbvariablen für Karten & Dossier-Modal */
.team-card-slot,
.team-dossier-modal {
    --ele-color: var(--color-brand);
    --ele-glow: rgba(200, 25, 34, 0.28);
    --ele-subtle: rgba(200, 25, 34, 0.10);
}

[data-element="pyro"]    { --ele-color: #ef7938; --ele-glow: rgba(239, 121, 56, 0.28);  --ele-subtle: rgba(239, 121, 56, 0.12); }
[data-element="hydro"]   { --ele-color: #4cc2f1; --ele-glow: rgba(76, 194, 241, 0.28);  --ele-subtle: rgba(76, 194, 241, 0.12); }
[data-element="anemo"]   { --ele-color: #74c2a8; --ele-glow: rgba(116, 194, 168, 0.28); --ele-subtle: rgba(116, 194, 168, 0.12); }
[data-element="electro"] { --ele-color: #b182e2; --ele-glow: rgba(177, 130, 226, 0.28); --ele-subtle: rgba(177, 130, 226, 0.12); }
[data-element="dendro"]  { --ele-color: #a5c83b; --ele-glow: rgba(165, 200, 59, 0.28);  --ele-subtle: rgba(165, 200, 59, 0.12); }
[data-element="cryo"]    { --ele-color: #aaddf1; --ele-glow: rgba(170, 221, 241, 0.28); --ele-subtle: rgba(170, 221, 241, 0.12); }
[data-element="geo"]     { --ele-color: #f7a83e; --ele-glow: rgba(247, 168, 62, 0.28);  --ele-subtle: rgba(247, 168, 62, 0.12); }

.team-section {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
    border-top: 1px solid var(--border-subtle);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.team-card-slot {
    display: flex;
}

.team-card-trigger {
    all: unset;
    cursor: pointer;
    display: flex;
    width: 100%;
    text-align: left;
    border-radius: var(--radius-lg);
}

.team-card-trigger:focus-visible .team-card-inner {
    outline: 2px solid var(--ele-color);
    outline-offset: 3px;
}

/* Moderne, flache Teamkarte mit dezentem Element-Hover */
.team-card-inner {
    position: relative;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--ele-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--inner-highlight), 0 8px 20px rgba(0, 0, 0, 0.45);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .team-card-slot:hover .team-card-inner,
    .team-card-trigger:focus-visible .team-card-inner {
        background: var(--bg-card-hover);
        border-color: var(--ele-color);
        transform: translateY(-4px);
        box-shadow:
            var(--inner-highlight),
            0 14px 30px rgba(0, 0, 0, 0.72),
            0 0 22px var(--ele-glow);
    }

    .team-card-slot:hover .card-inspect-hint {
        color: var(--color-white);
        transform: translateX(3px);
    }
}

.team-card-trigger:active .team-card-inner {
    transform: translateY(-1px) scale(0.99);
    transition-duration: 0.1s;
}

.team-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.team-avatar-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.team-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-highlight);
    background: var(--color-black);
    transition: border-color var(--transition-fast);
}

.team-card-slot:hover .team-avatar {
    border-color: var(--ele-color);
}

/* Kleines Element-Badge unten rechts am Karten-Avatar */
.avatar-ele-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--color-surface-elevated);
    background-size: 14px 14px;
    border: 1px solid var(--ele-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.team-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    border: 1px dashed var(--brand-border);
    background: var(--brand-subtle-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--brand-text-readable);
}

.team-role {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ele-color);
    margin-bottom: 2px;
}

.team-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.2;
}

.team-bio {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    flex-grow: 1;
}

.team-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.team-tags {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 6px;
}

.team-tag {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.team-tag.tag-element {
    background: var(--ele-subtle);
    border-color: var(--ele-color);
    color: var(--color-white);
}

.team-tag .ele-icon {
    width: 13px;
    height: 13px;
}

.card-inspect-hint {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ele-color);
    white-space: nowrap;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.team-card-join {
    border-style: dashed;
    border-color: rgba(227, 36, 46, 0.35);
    background: rgba(200, 25, 34, 0.04);
}

/* ==========================================================================
   TEAM DOSSIER MODAL (60/144fps GPU-Composited Layer)
   ========================================================================== */
.team-dossier-modal {
    margin: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-white);
    max-width: 580px;
    width: calc(100% - 24px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    overflow: hidden; /* Äußerer Rahmen begrenzt auf Viewport, gescrollt wird in .dossier-card */
}

.team-dossier-modal::backdrop {
    background: radial-gradient(circle at 50% 40%, rgba(12, 18, 30, 0.82) 0%, rgba(4, 6, 10, 0.94) 100%);
    opacity: 0;
    will-change: opacity;
    touch-action: none; /* Verhindert Durchscrollen auf dem abgedunkelten Hintergrund */
}

.team-dossier-modal[open]::backdrop {
    animation: fadeBackdropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.team-dossier-modal.is-closing::backdrop {
    animation: fadeBackdropOut 0.15s ease-in forwards;
}

.dossier-card {
    position: relative;
    background: linear-gradient(165deg, #131b2b 0%, #090d15 100%);
    border: 1px solid var(--ele-color);
    border-top: 3px solid var(--ele-color);
    border-radius: var(--radius-lg);
    padding: 24px 24px 24px;
    box-shadow:
        var(--inner-highlight),
        0 18px 36px rgba(0, 0, 0, 0.9),
        0 0 24px var(--ele-glow);
    transform-origin: 15% 85%;
    
    /* WICHTIG FÜR MOBILE: Eigener interner Scroll-Container statt paint-Clipping */
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain; /* Stoppt Scroll-Chaining an den Seitenhintergrund */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;

    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    will-change: transform, opacity;
}

/* Dezente Scrollbar innerhalb der Dossier-Karte */
.dossier-card::-webkit-scrollbar {
    width: 5px;
}
.dossier-card::-webkit-scrollbar-track {
    background: transparent;
}
.dossier-card::-webkit-scrollbar-thumb {
    background: var(--ele-color);
    border-radius: 3px;
}

.team-dossier-modal[open] .dossier-card {
    animation: dealCardIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.team-dossier-modal.is-closing .dossier-card {
    animation: dealCardOut 0.15s ease-in forwards;
}

/* Reine Transform3D & Opacity Keyframes (100% Compositor-Thread, 0% Main-Thread Repaint) */
@keyframes dealCardIn {
    0% {
        opacity: 0;
        transform: translate3d(-10px, 16px, 0) scale3d(0.95, 0.95, 1);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    }
}

@keyframes dealCardOut {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale3d(0.97, 0.97, 1);
    }
}

@keyframes fadeBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeBackdropOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.dossier-close-btn {
    position: sticky;
    top: 0;
    float: right;
    z-index: 10;
    margin-top: -4px;
    margin-right: -4px;
    margin-left: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-highlight);
    background: rgba(13, 19, 30, 0.92);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.dossier-close-btn:hover {
    background: var(--ele-color);
    border-color: var(--ele-color);
    color: var(--color-black);
}

.dossier-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.dossier-avatar-wrap {
    position: relative;
    width: 78px;
    height: 78px;
    flex-shrink: 0;
}

.dossier-avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--ele-color);
    background: var(--color-black);
}

.dossier-ele-corner {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--color-surface-elevated);
    background-size: 18px 18px;
    border: 1.5px solid var(--ele-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.dossier-title-group {
    flex-grow: 1;
    min-width: 0;
}

.dossier-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.dossier-name {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-white);
}

.traveler-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 215, 100, 0.1);
    border: 1px solid rgba(255, 215, 100, 0.3);
    color: #ffe28a;
}

.dossier-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.meta-pill {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.uid-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: var(--ele-subtle);
    border: 1px solid var(--ele-color);
    color: var(--color-white);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.uid-copy-btn:hover {
    background: var(--ele-color);
    color: var(--color-black);
}

.uid-copy-btn .copy-status {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
    padding-left: 5px;
    border-left: 1px solid currentColor;
}

/* Charakter-Icons Grid (Lieblings- & Hass-Chars) */
.dossier-char-grid {
    display: grid;
    /*grid-template-columns: 1.35fr 0.65fr;*/
    grid-template-columns: 1fr 0.65fr;
    gap: 12px;
    margin-bottom: 14px;
}

.char-pref-box {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.char-pref-dislike {
    border-color: rgba(227, 36, 46, 0.22);
    background: rgba(200, 25, 34, 0.04);
}

.char-icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.dossier-char-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: #182235;
    border: 1px solid var(--border-highlight);
    transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.dossier-char-icon:hover {
    transform: translateY(-2px) scale(1.08);
    border-color: var(--ele-color);
}

/* 2x2 Stats-Grid im Dossier */
.dossier-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-left: 2px solid var(--ele-color);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
}

.stat-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.stat-val {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-white);
}

.stat-val-ele {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ele-color);
}

.stat-val-ele .ele-icon {
    width: 20px;
    height: 20px;
}

/* Geheime Superkraft (Zitat-Box unten) */
.dossier-quirk-box {
    background: var(--ele-subtle);
    border: 1px solid var(--ele-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.quirk-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ele-color);
    margin-bottom: 4px;
}

.quirk-quote {
    font-size: 0.88rem;
    font-style: italic;
    color: var(--color-white);
    margin: 0 !important;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .dossier-card {
        padding: 18px 16px 20px;
    }
    .dossier-header {
        flex-direction: row; /* Avatar links neben Name lassen spart massiv vertikale Höhe! */
        align-items: center;
        gap: 14px;
        padding-bottom: 14px;
        margin-bottom: 14px;
    }
    .dossier-avatar-wrap {
        width: 62px;
        height: 62px;
    }
    .dossier-name {
        font-size: 1.25rem;
    }
    .dossier-char-grid,
    .dossier-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ==========================================================================
   8. NEWS / BLOG SECTION (Für spätere Reaktivierung kompatibel gehalten)
   ========================================================================== */
.news-section {
    background: var(--color-black);
    border-top: 1px solid var(--border-subtle);
}

.news-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

.news-featured-card,
.news-list-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ==========================================================================
   9. FOOTER COMPATIBILITY
   ========================================================================== */
.footer-wrapper {
    background: var(--color-black);
    border-top: 1px solid var(--border-subtle);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.86rem;
}

/* ==========================================================================
   10. RESPONSIVE DESIGN & ACCESSIBILITY
   ========================================================================== */
@media (max-width: 1080px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .modes-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-header-scrolled);
        border-bottom: 1px solid var(--border-highlight);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 24px 24px;
        gap: 16px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition:
            opacity var(--transition-fast),
            transform var(--transition-fast),
            visibility var(--transition-fast);
        max-height: calc(100dvh - var(--nav-height));
        overflow-y: auto;
    }

    .main-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 11px 12px;
        font-size: 0.95rem;
    }

    .dropdown-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--color-brand);
        border-radius: 0;
        background: rgba(255, 255, 255, 0.02);
        margin: 4px 0 4px 12px;
    }

    .nav-dropdown.open .dropdown-panel {
        display: block;
    }

    .nav-utilities {
        justify-content: flex-start;
        padding-left: 0;
        padding-top: 12px;
        border-left: none;
        border-top: 1px solid var(--border-subtle);
    }

    .hero-quickbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .section-block {
        padding: 64px 0;
    }
    .modes-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-primary-brand,
    .btn-secondary-glass {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   11. ABOUT-PAGE: SUBPAGE HERO, EDITOR ROSTER, CHRONIK-BUCH & DESIGN-SEKTION
   ========================================================================== */
.subpage-hero {
    min-height: 62vh;
    min-height: 62dvh;
    padding: calc(var(--nav-height) + 40px) 0 56px;
}

.about-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--color-brand);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--inner-highlight);
}

.overview-kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-text-readable);
    margin-bottom: 6px;
}

.about-overview-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-white);
}

.about-overview-card p {
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* Offizielle Challenge-Editoren Roster */
.editors-section {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.editors-roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.editor-badge-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--inner-highlight);
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.editor-badge-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

.editor-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border-highlight);
    background: var(--color-black);
    flex-shrink: 0;
}

.editor-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.editor-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editor-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================================================
   DAS CHRONIK-BUCH (Interaktiver Teyvat-Kodex für lange Texte)
   ========================================================================== */
.codex-book {
    display: grid;
    grid-template-columns: 320px 1fr;
    background: #090d15;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--inner-highlight),
        0 24px 60px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    min-height: 540px;
}

/* Linke Seite: Buchrücken & Kapitelregister */
.codex-sidebar {
    background: linear-gradient(180deg, #0d131f 0%, #070b12 100%);
    border-right: 1px solid var(--border-highlight);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.codex-volume-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.codex-vol-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    text-align: left;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.codex-vol-btn:hover {
    color: var(--color-white);
}

.codex-vol-btn.active {
    background: var(--color-surface-elevated);
    border-color: var(--brand-border);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.vol-num {
    display: block;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-text-readable);
    margin-bottom: 2px;
}

.vol-name {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
}

.codex-toc-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 4px;
}

.codex-chapter-list {
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 6px;
}

.codex-chapter-list.active {
    display: flex;
}

.codex-chapter-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.codex-chapter-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-white);
}

.codex-chapter-btn.active {
    background: var(--brand-subtle-bg);
    border-color: var(--brand-border);
    border-left: 3px solid var(--color-brand);
    color: var(--color-white);
    font-weight: 600;
}

.chap-idx {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--brand-text-readable);
    opacity: 0.85;
    flex-shrink: 0;
}

/* Rechte Seite: Aufgeschlagene Buchseite mit Buchfalz-Schatten */
.codex-reading-pane {
    position: relative;
    padding: 38px 44px 30px;
    background:
        /* Buchfalz-Schattierung am linken Rand */
        linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.18) 28px, transparent 64px),
        radial-gradient(circle at 85% 15%, rgba(200, 25, 34, 0.06) 0%, transparent 55%),
        linear-gradient(165deg, #101726 0%, #0a0f18 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.codex-page {
    display: none;
    animation: pageTurnFade 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.codex-page.active {
    display: block;
}

@keyframes pageTurnFade {
    from {
        opacity: 0;
        transform: translate3d(8px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.codex-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-kicker {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-text-readable);
}

.page-counter {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 2px 9px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
}

.codex-page-title {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 20px;
    line-height: 1.25;
}

.codex-page-prose {
    max-width: 68ch;
}

.codex-page-prose p {
    font-size: 0.98rem;
    line-height: 1.78;
    color: rgba(230, 238, 248, 0.84);
    margin-bottom: 18px;
}

/* Buch-Initial (Drop-Cap) im ersten Absatz jeder Seite 
.codex-page-prose p.drop-cap::first-letter {
    float: left;
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 0.88;
    padding-right: 12px;
    padding-top: 4px;
    color: var(--brand-text-readable);
}*/

.codex-page-signature {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-subtle);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    text-align: right;
}

/* Blätter-Leiste am unteren Rand der Buchseite */
.codex-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.codex-nav-btn {
    padding: 9px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-highlight);
    color: var(--color-white);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.codex-nav-btn:hover:not(:disabled) {
    background: var(--color-brand);
    border-color: var(--color-brand);
}

.codex-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.codex-page-indicator {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   SEKTION: GEDANKEN ZUM DESIGN
   ========================================================================== */
.design-philosophy-section {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-black) 100%);
    border-top: 1px solid var(--border-subtle);
}

.design-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.design-pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top: 2px solid var(--color-brand);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--inner-highlight);
}

.pillar-num {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-text-readable);
    margin-bottom: 8px;
}

.pillar-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 10px;
}

.pillar-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.design-deepdive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.design-deepdive-box {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    box-shadow: var(--inner-highlight);
    display: flex;
    flex-direction: column;
}

.deepdive-header h3 {
    font-size: 1.4rem;
    margin-bottom: 14px;
    color: var(--color-white);
}

.deepdive-content p {
    font-size: 0.96rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 82ch;
}

.deepdive-content p + p {
    margin-top: 14px;
}

@media (max-width: 960px) {
    .codex-book {
        grid-template-columns: 1fr;
    }
    .codex-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-highlight);
    }
    .codex-reading-pane {
        padding: 28px 24px 24px;
    }
    .design-pillars-grid,
    .design-deepdive-grid,
    .about-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   12. OVERLAY-INFO-PAGE: EDITOR-CTA, OBS-PIPELINE & INTERACT-MOCKUP
   ========================================================================== */

/* Kompakter Brand-CTA in der Navigation (z. B. "Zum Editor") */
.nav-cta-editor {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-brand);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-cta-editor:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--brand-glow);
}

/* 4-Schritte OBS-Einrichtung */
.obs-setup-section {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.obs-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.obs-step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--inner-highlight);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.obs-step-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--brand-border);
}

.step-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.step-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: var(--brand-subtle-bg);
    border: 1px solid var(--brand-border);
    color: var(--brand-text-readable);
}

.step-time {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.step-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 10px;
}

.step-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex-grow: 1;
}

.step-desc code {
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    font-size: 0.85em;
}

.inline-brand-link {
    color: var(--brand-text-readable);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.inline-brand-link:hover {
    color: var(--color-white);
}

.step-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* Interaktion im Stream + OBS UI Mockup */
.obs-interact-showcase {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
}

.interact-body-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
}

.obs-ui-mockup {
    background: #0d121c;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--inner-highlight), 0 20px 48px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.obs-ui-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: #070a10;
    border-bottom: 1px solid var(--border-subtle);
}

.obs-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.obs-ui-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.obs-ui-body {
    padding: 18px;
    position: relative;
}

.obs-source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 6px;
    border: 1px solid transparent;
}

.obs-source-row.active {
    background: rgba(200, 25, 34, 0.14);
    border-color: var(--brand-border);
    color: var(--color-white);
    font-weight: 600;
}

.obs-source-row.muted {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
}

.obs-context-menu {
    margin-top: 12px;
    margin-left: 28px;
    background: #151d2d;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85);
}

.ctx-item {
    padding: 7px 11px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ctx-item.highlighted {
    background: var(--color-brand);
    color: var(--color-white);
    font-weight: 600;
}

.ctx-badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.35);
}

.ctx-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 5px 0;
}

/* Abschließender Call-to-Action Banner unten */
.overlay-bottom-cta {
    margin-top: 28px;
    padding: 28px 32px;
    background: linear-gradient(90deg, rgba(200, 25, 34, 0.14) 0%, rgba(13, 19, 30, 0.9) 100%);
    border: 1px solid var(--brand-border);
    border-left: 4px solid var(--color-brand);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.overlay-bottom-cta h3 {
    font-size: 1.25rem;
    color: var(--color-white);
    margin-bottom: 4px;
}

.overlay-bottom-cta p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.overlay-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 1080px) {
    .obs-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .obs-interact-showcase {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .obs-steps-grid {
        grid-template-columns: 1fr;
    }
    .overlay-bottom-cta {
        padding: 22px 20px;
    }
}

/* ==========================================================================
   13. CHANGELOG-PAGE: FILTER-BAR, TIMELINE & FARBCODIERTE RELEASE-BADGES
   ========================================================================== */
.changelog-section {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
    border-top: 1px solid var(--border-subtle);
}

/* Filter-Buttons oben rechts */
.changelog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cl-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.cl-filter-btn:hover {
    color: var(--color-white);
    border-color: var(--border-highlight);
}

.cl-filter-btn.active {
    background: var(--brand-subtle-bg);
    border-color: var(--brand-border);
    color: var(--color-white);
}

.cl-count {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
}

/* Vertikale Release-Timeline */
.cl-timeline {
    display: flex;
    flex-direction: column;
    max-width: 980px;
    margin: 0 auto;
}

.cl-entry {
    display: grid;
    grid-template-columns: 150px 44px 1fr;
    align-items: stretch;
}

.cl-entry[hidden] {
    display: none !important;
}

/* Linke Spalte: Datum */
.cl-meta-rail {
    padding-top: 22px;
    padding-right: 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.cl-date {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.cl-latest-pill {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-brand);
    color: var(--color-white);
}

/* Mittlere Spalte: Durchgehende Linie & Knotenpunkt */
.cl-axis {
    position: relative;
    display: flex;
    justify-content: center;
}

.cl-axis::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-highlight);
}

.cl-entry:first-child .cl-axis::before {
    top: 26px;
}

.cl-entry:last-child .cl-axis::before {
    bottom: calc(100% - 32px);
}

.cl-node {
    position: relative;
    z-index: 1;
    margin-top: 26px;
    width: 12px;
    height: 12px;
    background: var(--color-surface-elevated);
    border: 2px solid var(--text-muted);
    transform: rotate(45deg); /* Passende Rautenform wie im Logo */
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.cl-entry.is-latest .cl-node,
.cl-entry:hover .cl-node {
    background: var(--color-brand);
    border-color: var(--color-white);
    box-shadow: 0 0 12px var(--brand-glow);
}

/* Rechte Spalte: Patchnotes-Karte */
.cl-card {
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    box-shadow: var(--inner-highlight);
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.cl-entry.is-latest .cl-card {
    border-color: var(--brand-border);
    border-left: 3px solid var(--color-brand);
}

.cl-entry:hover .cl-card {
    transform: translateX(3px);
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

.cl-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.cl-version-title {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--color-white);
}

.cl-date-mobile {
    display: none;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Farbcodierte Update-Typ Badges */
.cl-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-highlight);
    color: var(--color-white);
}

/* Spezifische Farben je nach JSON 'type' */
.cl-badge.tag-feature,
.cl-badge.tag-major,
.cl-badge.tag-release {
    background: rgba(116, 194, 168, 0.14);
    border-color: #74c2a8;
    color: #8ce0c4;
}

.cl-badge.tag-security {
    background: rgba(200, 25, 34, 0.18);
    border-color: var(--color-brand);
    color: var(--brand-text-readable);
}

.cl-badge.tag-bugfix,
.cl-badge.tag-fix,
.cl-badge.tag-hotfix {
    background: rgba(247, 168, 62, 0.14);
    border-color: #f7a83e;
    color: #ffbe61;
}

.cl-badge.tag-update,
.cl-badge.tag-system,
.cl-badge.tag-api {
    background: rgba(76, 194, 241, 0.14);
    border-color: #4cc2f1;
    color: #7dd3f7;
}

/* Liste der Änderungen */
.cl-change-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cl-change-list li {
    position: relative;
    padding-left: 18px;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cl-change-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--color-brand);
    transform: rotate(45deg);
}

.cl-empty-state {
    background: var(--bg-card);
    border: 1px dashed var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .cl-entry {
        grid-template-columns: 28px 1fr;
    }
    .cl-meta-rail {
        display: none;
    }
    .cl-date-mobile {
        display: block;
        margin-top: 2px;
    }
    .cl-card {
        padding: 18px 20px;
    }
}

/* ==========================================================================
   14. BUG-REPORT-SYSTEM: DYNAMISCHE SCHWEREGRAD-KARTE & FORMULAR
   ========================================================================== */
.report-page-section {
    padding-top: calc(var(--nav-height) + 56px);
    min-height: calc(100dvh - 90px);
    background:
        radial-gradient(circle at 15% 20%, var(--brand-subtle-ambient) 0%, transparent 50%),
        linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
}

.report-layout-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
    align-items: start;
}

.report-guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--inner-highlight);
}

.guide-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 14px;
}

.report-discord-box {
    background: rgba(200, 25, 34, 0.06);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
}

.report-discord-box p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Dynamische Schweregrad-Variablen auf der Formular-Karte */
.report-card {
    --sev-color: var(--color-brand);
    --sev-glow: rgba(200, 25, 34, 0.22);

    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-top: 3px solid var(--sev-color);
    border-radius: var(--radius-lg);
    padding: 32px 30px;
    box-shadow: var(--inner-highlight), 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px var(--sev-glow);
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.report-card[data-severity="low"]      { --sev-color: #74c2a8; --sev-glow: rgba(116, 194, 168, 0.18); }
.report-card[data-severity="medium"]   { --sev-color: #f7a83e; --sev-glow: rgba(247, 168, 62, 0.18); }
.report-card[data-severity="high"]     { --sev-color: #ef7938; --sev-glow: rgba(239, 121, 56, 0.22); }
.report-card[data-severity="critical"] { --sev-color: #c81922; --sev-glow: rgba(200, 25, 34, 0.32); }

.report-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.report-sys-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sev-color);
    margin-bottom: 4px;
}

.report-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-white);
}

.report-version-tag {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

/* Formular-Elemente */
.wbc-report-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 6px;
}

.req-star {
    color: var(--brand-text-readable);
}

.field-optional {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: auto;
}

.label-with-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.char-counter {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.wbc-input {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-white);
    background: rgba(6, 9, 14, 0.65);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.wbc-input::placeholder {
    color: rgba(215, 226, 240, 0.35);
}

.wbc-input:focus {
    outline: none;
    background: rgba(6, 9, 14, 0.9);
    border-color: var(--sev-color);
    box-shadow: 0 0 0 3px var(--sev-glow);
}

.wbc-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.select-wrapper::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.wbc-input option {
    background: var(--color-surface-elevated);
    color: var(--color-white);
}

.wbc-textarea {
    min-height: 115px;
    resize: vertical;
    line-height: 1.55;
}

.report-submit-row {
    margin-top: 6px;
}

.report-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Status-Meldungen (Erfolg / Fehler) */
.report-alert {
    padding: 20px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-highlight);
    margin-bottom: 16px;
}

.report-alert.alert-success {
    background: rgba(116, 194, 168, 0.1);
    border-color: #74c2a8;
}

.report-alert.alert-error {
    background: rgba(200, 25, 34, 0.12);
    border-color: var(--color-brand);
}

.alert-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 6px;
}

.report-alert p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

@media (max-width: 960px) {
    .report-layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .form-row-2col {
        grid-template-columns: 1fr;
    }
    .report-card {
        padding: 24px 20px;
    }
}

/* ==========================================================================
   15. VISIONLINK CHARAKTER-API: FILTER-PANEL, FARB-CHIPS & CHARAKTER-KARTEN
   ========================================================================== */
.visionlink-section {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
    border-top: 1px solid var(--border-subtle);
    min-height: 70vh;
}

/* Waffen-Icons (mit umlautfreiem Fallback für Zweihänder) */
.weapon-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    opacity: 0.9;
    flex-shrink: 0;
}
.weapon-Bogen, .weapon-bogen               { background-image: url('https://luca.rosenloecher.org/wbc/img/weapons/Bow.png'); }
.weapon-Katalysator, .weapon-katalysator   { background-image: url('https://luca.rosenloecher.org/wbc/img/weapons/Catalyst.png'); }
.weapon-Zweihänder, .weapon-zweihaender    { background-image: url('https://luca.rosenloecher.org/wbc/img/weapons/Claymore.png'); }
.weapon-Stangenwaffe, .weapon-stangenwaffe { background-image: url('https://luca.rosenloecher.org/wbc/img/weapons/Polearm.png'); }
.weapon-Schwert, .weapon-schwert           { background-image: url('https://luca.rosenloecher.org/wbc/img/weapons/Sword.png'); }

.hidden {
    display: none !important;
}

/* Obere Such- & Zählerleiste */
.vl-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.vl-counter-title {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: var(--color-white);
}

.vl-search-box {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.vl-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.vl-search-input {
    padding-left: 40px;
}

/* Einklappbares Filter-Panel */
.vl-filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--inner-highlight), 0 12px 32px rgba(0, 0, 0, 0.5);
    margin-bottom: 36px;
    overflow: hidden;
}

.vl-filter-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.02);
    transition: background-color var(--transition-fast);
}

.vl-filter-summary::-webkit-details-marker {
    display: none;
}

.vl-filter-summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.vl-filter-panel[open] .vl-filter-summary {
    border-bottom: 1px solid var(--border-subtle);
}

.summary-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.summary-left svg {
    color: var(--brand-text-readable);
}

.vl-active-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-brand);
    color: var(--color-white);
}

.summary-toggle-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vl-filter-form {
    padding: 24px;
}

.vl-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Farb-Mehrfachauswahl als anklickbare Chips */
.vl-color-filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.vl-color-fieldset {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: rgba(6, 9, 14, 0.45);
}

.vl-color-fieldset legend {
    padding: 0 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.vl-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 4px;
}

.vl-color-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.vl-color-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vl-color-chip:hover {
    border-color: var(--border-highlight);
    color: var(--color-white);
}

.vl-color-chip:has(input:checked) {
    background: var(--brand-subtle-bg);
    border-color: var(--color-brand);
    color: var(--color-white);
    font-weight: 600;
}

.chip-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}
.chip-swatch[data-color="Blond"]     { background: #f5d76e; }
.chip-swatch[data-color="Gelb"]      { background: #f1c40f; }
.chip-swatch[data-color="Bernstein"] { background: #d68910; }
.chip-swatch[data-color="Orange"]    { background: #e67e22; }
.chip-swatch[data-color="Rot"]       { background: #e74c3c; }
.chip-swatch[data-color="Pink"]      { background: #ff78c4; }
.chip-swatch[data-color="Lila"]      { background: #9b59b6; }
.chip-swatch[data-color="Blau"]      { background: #3498db; }
.chip-swatch[data-color="Grün"]      { background: #2ecc71; }
.chip-swatch[data-color="Braun"]     { background: #8d6e63; }
.chip-swatch[data-color="Grau"]      { background: #95a5a6; }
.chip-swatch[data-color="Schwarz"]   { background: #1c1f24; }
.chip-swatch[data-color="Weiß"]      { background: #f8f9fa; }

.vl-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.vl-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-highlight);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.vl-reset-btn:hover {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-white);
}

/* ==========================================================================
   VISIONLINK CHARAKTER-KARTEN GRID
   ========================================================================== */
.vl-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

:where(.vl-char-card) {
    --ele-color: var(--border-highlight);
    --ele-glow: rgba(255, 255, 255, 0.08);
    --ele-subtle: rgba(255, 255, 255, 0.04);
}

.vl-char-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--ele-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--inner-highlight);
    display: flex;
    flex-direction: column;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.vl-char-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--ele-color);
    box-shadow: var(--inner-highlight), 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 20px var(--ele-glow);
}

.vl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.vl-header-left {
    min-width: 0;
}

.vl-badge-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.vl-badge-row .ele-icon,
.vl-badge-row .weapon-icon {
    width: 20px;
    height: 20px;
}

.vl-rarity {
    font-size: 0.78rem;
    letter-spacing: 1px;
    margin-left: 2px;
}
.vl-rarity.rarity-5 { color: #f7b83e; }
.vl-rarity.rarity-4 { color: #b88ce8; }

.vl-char-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: 3px;
}

.vl-char-nation {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
}

.vl-char-avatar {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--color-black);
    border: 1.5px solid var(--ele-color);
    flex-shrink: 0;
    transition: transform 0.25s var(--ease-out);
}

.vl-char-card:hover .vl-char-avatar {
    transform: scale(1.04);
}

/* 2x2 Mechanik-Grid auf der Charakterkarte */
.vl-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.vl-stat-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
}

.vl-stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.vl-stat-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-white);
}

.val-heal-yes {
    color: #74c2a8;
}

.val-muted {
    opacity: 0.45;
    font-weight: 400;
}

/* Optische Merkmale unten auf der Karte */
.vl-appearance-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
    font-size: 0.8rem;
}

.vl-app-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.vl-app-label {
    color: var(--text-muted);
}

.vl-app-val {
    color: var(--color-white);
    font-weight: 500;
    text-align: right;
}

.vl-empty-state {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px dashed var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.vl-empty-state h3 {
    color: var(--color-white);
    margin-bottom: 6px;
}

@media (max-width: 960px) {
    .vl-color-filters-grid {
        grid-template-columns: 1fr;
    }
    .vl-search-box {
        max-width: 100%;
    }
}