:root {
    --bg: #0b1118;
    --panel: rgba(20, 29, 39, .92);
    --panel-2: rgba(27, 39, 52, .86);
    --line: rgba(148, 163, 184, .18);
    --text: #e5edf7;
    --muted: #98a6b8;
    --accent: #8ab4ff;
    --danger: #ff7b7b;
    --ok: #6ee7b7;
    --warn: #fbbf24;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, .18), transparent 30%), linear-gradient(135deg, #071018, #111827 55%, #090d13);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    background: rgba(7, 13, 20, .72);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark {
    width: 48px; height: 48px; border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(59,130,246,.42), rgba(148,163,184,.15));
    border: 1px solid var(--line);
    font-weight: 800;
}
.brand span, .userbox span { display:block; color: var(--muted); font-size: .82rem; margin-top: 3px; }
.nav { display: grid; gap: 8px; }
.nav a {
    display: block; padding: 11px 12px; border: 1px solid transparent; border-radius: 12px;
    color: var(--text); background: rgba(255,255,255,.025);
}
.nav a:hover { border-color: var(--line); background: rgba(59,130,246,.12); text-decoration: none; }
.userbox { margin-top: 24px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.03); }
.content { flex: 1; padding: 28px; max-width: 1600px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
h1 { margin: 0; font-size: 1.65rem; }
h2 { margin: 0 0 14px; font-size: 1.2rem; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 14px; }
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.24);
    margin-bottom: 16px;
}
.stat { font-size: 2rem; font-weight: 800; }
.label { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: rgba(255,255,255,.018); }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: .8rem; color: var(--text); background: rgba(255,255,255,.04); }
.badge.ok { border-color: rgba(110,231,183,.35); color: var(--ok); }
.badge.warn { border-color: rgba(251,191,36,.35); color: var(--warn); }
.badge.danger { border-color: rgba(255,123,123,.35); color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
input, select, textarea {
    width: 100%; padding: 10px 11px; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(3,7,12,.62); color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
button, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid rgba(138,180,255,.35); background: rgba(59,130,246,.18);
    color: var(--text); padding: 10px 13px; border-radius: 12px; cursor: pointer;
    font-weight: 650;
}
button:hover, .btn:hover { background: rgba(59,130,246,.28); text-decoration: none; }
.btn.secondary { border-color: var(--line); background: rgba(255,255,255,.04); }
.btn.danger { border-color: rgba(255,123,123,.42); background: rgba(127,29,29,.25); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flash { padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.05); }
.flash-success { border-color: rgba(110,231,183,.35); }
.flash-error { border-color: rgba(255,123,123,.35); }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(440px, 100%); }
.footer {
    width: fit-content;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 9px 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(7, 13, 20, .55);
    color: rgba(226,232,240,.78);
    font-size: .82rem;
}
.dot { color: rgba(148,163,184,.45); }
.made-by { position: relative; cursor: help; }
.made-by:hover { color: #fff; }
.made-by:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%; bottom: calc(100% + 10px);
    transform: translateX(-50%);
    white-space: nowrap;
    max-width: 320px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0b1118;
    color: var(--text);
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
    z-index: 20;
}
.cookie-note {
    max-width: 760px;
    margin: 12px auto 0;
    text-align: center;
    color: rgba(226,232,240,.55);
    font-size: .76rem;
}
.muted { color: var(--muted); }
.small { font-size: .82rem; }
@media (max-width: 900px) {
    .app-shell { display: block; }
    .sidebar { width: auto; height: auto; position: static; }
    .content { padding: 18px; }
    .grid, .grid-2, .form-grid { grid-template-columns: 1fr; }
}
.ip-hidden { cursor: pointer; color: var(--accent); }
.ip-hidden:hover { text-decoration: underline; }
.card-link {
    display: block;
    min-height: 170px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
    color: var(--text);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(138,180,255,.35);
    background: rgba(255,255,255,.055);
    box-shadow: 0 18px 45px rgba(0,0,0,.22);
    text-decoration: none;
}
.force-stats { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }

.nav-divider {
    height: 1px;
    background: var(--line);
    margin: 14px 0;
}
.public-nav a {
    background: rgba(138,180,255,.06);
}
.hero-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
}
.hero-card::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(138,180,255,.18), transparent 65%);
    pointer-events: none;
}
.hero-kicker {
    color: var(--accent);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    margin-bottom: 8px;
}
.hero-card h2 {
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    margin-bottom: 6px;
}
.motto {
    color: var(--text);
    font-weight: 800;
    font-size: 1.05rem;
    margin: 8px 0 14px;
}
.login-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.login-links a {
    color: rgba(226,232,240,.78);
}
.login-links a:hover {
    color: #fff;
}

/* v1.3 ECB-1 logo integration */
.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.42));
}
.login-brand {
    justify-content: center;
    text-align: left;
}
.login-brand-logo {
    width: 74px;
    height: 74px;
}
.hero-with-logo {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    align-items: center;
    gap: 28px;
    min-height: 340px;
}
.hero-copy {
    position: relative;
    z-index: 2;
}
.hero-logo-box {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.hero-logo-box::before {
    content: "";
    position: absolute;
    inset: 14% 8%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,.13), rgba(138,180,255,.08) 38%, transparent 72%);
    filter: blur(8px);
    pointer-events: none;
}
.hero-logo {
    width: min(360px, 100%);
    height: auto;
    position: relative;
    filter: drop-shadow(0 22px 34px rgba(0,0,0,.55));
}
@media (max-width: 900px) {
    .hero-with-logo { grid-template-columns: 1fr; text-align: center; }
    .hero-with-logo .actions { justify-content: center; }
    .hero-logo { width: min(280px, 86vw); }
    .brand-logo { width: 50px; height: 50px; }
}

/* v1.4 public clan website additions */
.mission-card-grid,
.member-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.mission-public-card,
.member-public-card,
.org-node {
    display: block;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
    color: var(--text);
    overflow: hidden;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.mission-public-card:hover,
.member-public-card:hover,
.org-node:hover {
    transform: translateY(-2px);
    border-color: rgba(138,180,255,.35);
    background: rgba(255,255,255,.055);
    box-shadow: 0 18px 45px rgba(0,0,0,.22);
    text-decoration: none;
}
.mission-public-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
    background: rgba(0,0,0,.18);
}
.mission-public-body { padding: 15px; }
.mission-public-body h3,
.member-public-card h3 { margin: 10px 0 6px; }
.mission-hero-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
    margin-bottom: 16px;
    background: rgba(0,0,0,.2);
}
.member-public-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 15px;
}
.member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(59,130,246,.32), rgba(148,163,184,.12));
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    font-weight: 800;
    color: #fff;
}
.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.member-avatar.large {
    width: 112px;
    height: 112px;
    border-radius: 24px;
    font-size: 1.8rem;
}
.profile-header {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}
.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.org-column h2 { margin-bottom: 12px; }
.org-node {
    padding: 12px 14px;
    margin-bottom: 10px;
}
.org-node span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .86rem;
}
@media (max-width: 700px) {
    .profile-header { align-items: flex-start; flex-direction: column; }
    .member-public-card { flex-direction: column; }
}

input[type="file"] {
    padding: 10px;
    border: 1px dashed rgba(148, 163, 184, .35);
    background: rgba(2, 6, 23, .35);
}

.form-image-preview {
    display: block;
    max-width: 160px;
    max-height: 120px;
    object-fit: contain;
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(2, 6, 23, .45);
}

.form-image-preview.mission-preview {
    max-width: 260px;
    max-height: 150px;
    object-fit: cover;
}

/* v1.6 - member overall time + internal records */
.danger-text { color: var(--danger); }
.record-list { display: grid; gap: 12px; }
.record-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255,255,255,.03);
}
.record-item.is-inactive { opacity: .62; }
.record-item.strike.is-active { border-color: rgba(255,123,123,.42); background: rgba(127,29,29,.14); }
.record-item.warning.is-active { border-color: rgba(251,191,36,.38); background: rgba(120,80,0,.12); }
.record-item.commendation.is-active { border-color: rgba(110,231,183,.34); background: rgba(6,95,70,.10); }
.record-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.record-item h3 { margin: 8px 0 6px; font-size: 1rem; }
.record-meta { margin-top: 10px; }
.record-actions { margin-top: 12px; }
.live-time[data-live="1"]::after {
    content: " live";
    font-size: .72rem;
    margin-left: 6px;
    color: var(--ok);
    vertical-align: middle;
}

/* v1.8 public participant disclosure blocks */
.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.participant-force-list {
    display: grid;
    gap: 12px;
}
.participant-force-details {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.42);
    overflow: hidden;
}
.participant-force-details summary {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}
.participant-force-details summary::-webkit-details-marker { display: none; }
.participant-force-details summary:hover {
    background: rgba(148, 163, 184, 0.08);
}
.participant-force-title {
    font-weight: 800;
    color: #e5e7eb;
}
.participant-force-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.24);
    color: #bbf7d0;
    font-size: 0.82rem;
    font-weight: 700;
}
.participant-force-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid rgba(148, 163, 184, 0.20);
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
}
.participant-force-details[open] .participant-force-toggle::before { content: 'Zuklappen'; }
.participant-force-details[open] .participant-force-toggle { font-size: 0; }
.participant-force-details[open] .participant-force-toggle::before { font-size: 0.82rem; }
.participant-force-details > p,
.participant-force-details > .table-wrap,
.participant-force-details > h3 {
    margin: 0 16px 16px;
}
.unplanned-participants {
    margin-top: 16px;
    border-color: rgba(251, 191, 36, 0.25);
}
.unplanned-participants .participant-force-count {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.24);
    color: #fde68a;
}
@media (max-width: 720px) {
    .participant-force-details summary {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .participant-force-count,
    .participant-force-toggle {
        justify-content: center;
    }
}

/* v1.9 - Impressum, Cookie banner, public force toggles fix */
.footer-link {
    color: rgba(226, 232, 240, 0.82);
    text-decoration: none;
    font-weight: 650;
}
.footer-link:hover {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(138, 180, 255, 0.36);
}
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(920px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: rgba(7, 13, 20, 0.94);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.84rem;
}
.cookie-banner strong {
    color: #ffffff;
}
.cookie-banner span {
    color: rgba(226, 232, 240, 0.68);
}
.cookie-accept {
    white-space: nowrap;
}
.legal-page code {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.22);
    padding: 2px 6px;
    border-radius: 8px;
}
.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.legal-grid > div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.025);
}
.legal-grid h3 {
    margin-top: 0;
    margin-bottom: 8px;
}
.force-summary-static {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}
.force-summary-only .participant-force-toggle.disabled {
    opacity: 0.68;
    cursor: default;
}
.force-summary-only > p {
    margin: 0 16px 16px;
}
@media (max-width: 720px) {
    .cookie-banner {
        align-items: stretch;
        flex-direction: column;
    }
    .cookie-accept {
        width: 100%;
    }
    .legal-grid,
    .force-summary-static {
        grid-template-columns: 1fr;
    }
}

/* v2.0 - Referenzverwaltung und Ausbildungseinträge */
.actions form {
    display: inline-flex;
    margin: 0;
}
.muted-row {
    opacity: 0.62;
}
.table-wrap td .btn,
.table-wrap td button.btn {
    white-space: nowrap;
}
.badge.warn {
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.10);
    color: #fde68a;
}
.card h2 + .muted.small {
    margin-top: -4px;
}

/* v2.2 - öffentliche Ausbildungsanzeige + API-Ziel-Mission */
.public-training-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.training-grid {
    display: grid;
    gap: 14px;
}
.training-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.42));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
.training-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: rgba(148, 163, 184, 0.5);
}
.training-card.status-ok::before { background: rgba(34, 197, 94, 0.92); }
.training-card.status-warn::before { background: rgba(251, 191, 36, 0.92); }
.training-card.status-danger::before { background: rgba(248, 113, 113, 0.92); }
.training-card.status-neutral::before { background: rgba(96, 165, 250, 0.88); }
.training-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.training-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}
.training-code {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.56);
}
.badge.neutral {
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(96, 165, 250, 0.10);
    color: #bfdbfe;
}
.badge.api-live {
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.16);
}
.inline-form {
    display: inline-flex;
    margin: 0;
}


/* Clan landing page quick access */
.secondary-actions {
    margin-top: 8px;
}
.community-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.community-copy {
    min-width: 240px;
}
.community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
@media (max-width: 900px) {
    .community-panel {
        display: block;
    }
    .community-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }
}

/* v2.7 - Clan landing cleanup: no Schnellzugriff card, cleaner hero actions */
.clan-hero {
    position: relative;
    min-height: 390px;
    padding: clamp(24px, 3vw, 36px);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(17, 34, 49, .88)),
        radial-gradient(circle at 76% 30%, rgba(138, 180, 255, .16), transparent 36%);
    border-color: rgba(138, 180, 255, .18);
}
.clan-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(138,180,255,.08), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.035), transparent 42%);
    opacity: .75;
}
.clan-hero .hero-copy,
.clan-hero .hero-logo-box {
    position: relative;
    z-index: 2;
}
.clan-hero .hero-lead {
    max-width: 780px;
    line-height: 1.55;
    color: rgba(226, 232, 240, .92);
}
.clan-connect-box {
    width: min(820px, 100%);
    margin-top: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(180px, .58fr) minmax(260px, 1.42fr);
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(138, 180, 255, .18);
    border-radius: 18px;
    background: rgba(2, 6, 23, .28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 16px 42px rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
}
.connect-kicker {
    display: block;
    margin-bottom: 4px;
    color: rgba(138, 180, 255, .92);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
}
.clan-connect-box strong {
    display: block;
    color: #f8fafc;
    font-size: .95rem;
}
.connect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.btn.connect-btn {
    min-height: 42px;
    padding: 11px 15px;
    border-radius: 13px;
    letter-spacing: .01em;
    box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.btn.connect-btn.teamspeak {
    border-color: rgba(96, 165, 250, .48);
    background: linear-gradient(135deg, rgba(37, 99, 235, .38), rgba(59, 130, 246, .18));
}
.btn.connect-btn.discord {
    border-color: rgba(129, 140, 248, .48);
    background: linear-gradient(135deg, rgba(79, 70, 229, .40), rgba(99, 102, 241, .18));
}
.btn.connect-btn.soft {
    border-color: rgba(148, 163, 184, .22);
    background: rgba(255, 255, 255, .055);
}
.btn.connect-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 14px 32px rgba(0,0,0,.24);
}
.hero-nav-actions {
    margin-top: 14px;
    opacity: .92;
}
.clan-stat-grid {
    margin-top: 16px;
}
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    background: linear-gradient(145deg, rgba(18, 28, 40, .94), rgba(13, 22, 32, .86));
}
.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: rgba(138, 180, 255, .55);
}
.stat-card .stat {
    text-shadow: 0 0 18px rgba(138, 180, 255, .22);
}
.clan-info-grid .info-card,
.closing-card {
    background: linear-gradient(145deg, rgba(17, 26, 37, .94), rgba(13, 22, 32, .88));
}
.card-actions {
    margin-top: 14px;
}
@media (max-width: 980px) {
    .clan-connect-box {
        grid-template-columns: 1fr;
    }
    .connect-actions {
        justify-content: flex-start;
    }
}
@media (max-width: 620px) {
    .btn.connect-btn,
    .hero-nav-actions .btn {
        width: 100%;
    }
    .connect-actions,
    .hero-nav-actions {
        align-items: stretch;
    }
}

/* v2.8 - Clan hero button cleanup */
.clan-connect-box,
.connect-kicker,
.connect-actions {
    display: none !important;
}

.clan-hero .hero-nav-actions,
.clan-hero .hero-community-actions {
    width: min(820px, 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 12px;
}

.clan-hero .hero-nav-actions {
    margin-top: 18px;
}

.clan-hero .hero-community-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

.btn.community-btn {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    color: rgba(226, 232, 240, .94);
    border-color: rgba(148, 163, 184, .26);
    background: rgba(255, 255, 255, .045);
    box-shadow: none;
}

.btn.community-btn:hover {
    color: #fff;
    border-color: rgba(138, 180, 255, .38);
    background: rgba(138, 180, 255, .10);
    transform: none;
    box-shadow: none;
}

@media (max-width: 620px) {
    .clan-hero .hero-nav-actions,
    .clan-hero .hero-community-actions {
        align-items: stretch;
    }

    .clan-hero .hero-nav-actions .btn,
    .clan-hero .hero-community-actions .btn {
        width: 100%;
    }
}

/* v2.9 - Clan hero buttons: clear spacing, one neutral button style */
.clan-hero-buttons {
    width: min(900px, 100%);
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clan-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
}

.clan-community-row {
    padding-top: 0;
    border-top: 0;
}

.btn.clan-hero-btn {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 13px;
    border-color: rgba(148, 163, 184, .28);
    background: rgba(255, 255, 255, .045);
    color: rgba(226, 232, 240, .96);
    box-shadow: none;
    margin: 0;
}

.btn.clan-hero-btn:hover {
    color: #fff;
    border-color: rgba(148, 163, 184, .44);
    background: rgba(255, 255, 255, .075);
    transform: none;
    box-shadow: none;
    text-decoration: none;
}

@media (max-width: 620px) {
    .clan-hero-buttons {
        gap: 12px;
    }

    .clan-button-row {
        gap: 10px;
    }

    .btn.clan-hero-btn {
        width: 100%;
    }
}


/* v2.10 - Clan hero final button spacing */
.clan-hero-buttons {
    margin-top: 24px !important;
    display: block !important;
    width: min(920px, 100%) !important;
}

.clan-hero-buttons .clan-button-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px 14px !important;
}

.clan-hero-buttons .clan-button-row + .clan-button-row {
    margin-top: 18px !important;
}

.clan-hero-buttons .btn.clan-hero-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

@media (max-width: 620px) {
    .clan-hero-buttons .clan-button-row + .clan-button-row {
        margin-top: 12px !important;
    }

    .clan-hero-buttons .btn.clan-hero-btn {
        width: 100% !important;
        white-space: normal !important;
    }
}

/* v2.11 - Regelwerk nur in der Infokarte, nicht im Hero */
.clan-card-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.clan-card-actions .btn {
    min-height: 42px;
    padding: 10px 16px;
}

/* v2.12 - Final clan hero spacing + cache-bust safe override */
.clan-hero .clan-hero-buttons {
    width: min(940px, 100%) !important;
    margin-top: 28px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 26px !important;
}

.clan-hero .clan-hero-buttons .clan-button-row {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.clan-hero .clan-hero-buttons .clan-button-row + .clan-button-row {
    margin-top: 0 !important;
}

.clan-hero .clan-hero-buttons .clan-community-row {
    margin-top: 0 !important;
}

.clan-hero .clan-hero-buttons .btn.clan-hero-btn {
    flex: 0 0 auto !important;
    min-height: 44px !important;
    padding: 11px 17px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

@media (max-width: 620px) {
    .clan-hero .clan-hero-buttons {
        gap: 16px !important;
        align-items: stretch !important;
    }

    .clan-hero .clan-hero-buttons .clan-button-row {
        gap: 10px !important;
    }

    .clan-hero .clan-hero-buttons .btn.clan-hero-btn {
        width: 100% !important;
        white-space: normal !important;
    }
}


/* v2.13 - Clan title width/readability fix */
.clan-hero.hero-with-logo {
    grid-template-columns: minmax(680px, 1.9fr) minmax(240px, .55fr) !important;
    gap: clamp(22px, 3vw, 40px) !important;
}

.clan-hero .hero-copy {
    min-width: 0 !important;
}

.clan-hero .clan-main-title {
    max-width: 100% !important;
    font-size: clamp(2.0rem, 2.45vw, 2.55rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
}

.clan-hero .hero-logo {
    width: min(315px, 100%) !important;
}

@media (max-width: 1180px) {
    .clan-hero.hero-with-logo {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    .clan-hero .clan-main-title {
        max-width: 860px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        font-size: clamp(1.85rem, 5vw, 2.45rem) !important;
    }

    .clan-hero .hero-lead {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .clan-hero .clan-hero-buttons,
    .clan-hero .clan-hero-buttons .clan-button-row {
        align-items: center !important;
        justify-content: center !important;
    }

    .clan-hero .hero-logo {
        width: min(280px, 80vw) !important;
    }
}

/* v2.14 - Rules page */
.rules-hero {
    margin-bottom: 18px;
}

.rules-hero h2 {
    font-size: clamp(1.75rem, 2.4vw, 2.55rem);
    margin-bottom: 10px;
}

.rules-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.rules-content {
    min-width: 0;
}

.rules-index {
    position: sticky;
    top: 22px;
    order: 2;
}

.rules-index h2 {
    margin-bottom: 12px;
}

.rules-index nav {
    display: grid;
    gap: 8px;
}

.rules-index a {
    display: block;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    color: var(--text);
    font-size: .9rem;
}

.rules-index a:hover {
    background: rgba(59,130,246,.14);
    text-decoration: none;
}

.rules-section {
    scroll-margin-top: 24px;
}

.rules-section h2 {
    margin-bottom: 12px;
}

.rules-section p,
.rules-section li {
    line-height: 1.55;
}

.rules-section ol,
.rules-section ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

.rules-section li + li {
    margin-top: 8px;
}

@media (max-width: 980px) {
    .rules-layout {
        grid-template-columns: 1fr;
    }

    .rules-index {
        position: static;
        order: 0;
    }

    .rules-index nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .rules-index nav {
        grid-template-columns: 1fr;
    }
}
