:root {
    --bg-page: #0b0d10;
    --bg-sidebar: #0f1216;
    --bg-topbar: #0f1216;
    --bg-card: #15191f;
    --bg-card-hover: #1a1f26;
    --bg-input: #20252c;

    --border-color: #252b33;
    --border-color-strong: #353d47;

    --text-primary: #f5f7fa;
    --text-secondary: #9ca5b1;
    --text-muted: #6f7883;

    --accent: #ff7a00;
    --accent-hover: #ff8c24;
    --accent-soft: rgba(255, 122, 0, 0.12);

    --online: #36c96f;
    --danger: #ff4d4d;

    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 18px;

    --sidebar-width: 220px;
    --topbar-height: 72px;

    --shadow-card:
        0 12px 35px rgba(0, 0, 0, 0.16);
}


* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {
    margin: 0;

    font-family:
        Inter,
        Arial,
        sans-serif;

    background: var(--bg-page);
    color: var(--text-primary);
}


a {
    color: inherit;
}


button,
input {
    font: inherit;
}


/* Allgemeine ältere Seiten */

.container {
    max-width: 900px;
    margin: 80px auto;
    padding: 40px;
    text-align: center;
}

h1 {
    margin-top: 0;
}

h2 {
    margin-top: 40px;
}

p {
    color: var(--text-secondary);
}

.button {
    display: inline-block;

    margin-top: 24px;
    padding: 12px 22px;

    border-radius: var(--radius-small);

    background: var(--accent);
    color: #111;

    text-decoration: none;
    font-weight: bold;
}

.button:hover {
    background: var(--accent-hover);
}

.secondary-button {
    margin-top: 0;

    background: var(--bg-card);
    color: var(--text-primary);

    border: 1px solid var(--border-color);
}


.form {
    display: flex;
    flex-direction: column;
    gap: 14px;

    max-width: 360px;
    margin: 30px auto;
}

.form input {
    padding: 12px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);

    background: var(--bg-input);
    color: var(--text-primary);

    font-size: 16px;
}

.form button {
    padding: 12px;

    border: none;
    border-radius: var(--radius-small);

    background: var(--accent);
    color: #111;

    font-weight: bold;
    cursor: pointer;
}

.error {
    color: var(--danger);
    font-weight: bold;
}


/* App-Grundlayout */

.app-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.app-shell {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        var(--sidebar-width)
        minmax(0, 1fr);

    grid-template-rows:
        var(--topbar-height)
        minmax(
            calc(100vh - var(--topbar-height)),
            auto
        );
}


/* Topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;

    grid-column: 1 / -1;

    height: var(--topbar-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    background:
        rgba(15, 18, 22, 0.96);

    border-bottom:
        1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;

    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--accent);
    color: #111;

    font-size: 19px;
    font-weight: 900;
}

.brand-name {
    color: var(--text-primary);

    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.online-pill {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 8px 12px;

    border:
        1px solid var(--border-color);

    border-radius: 999px;

    background: var(--bg-card);

    color: var(--text-secondary);
    font-size: 13px;
}

.online-pill strong {
    color: var(--text-primary);
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 9px;
}

.profile-avatar {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--accent-soft);
    color: var(--accent);

    font-weight: 800;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
}


/* Sidebar */

.sidebar {
    position: sticky;
    top: var(--topbar-height);

    height:
        calc(
            100vh -
            var(--topbar-height)
        );

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 24px 14px 18px;

    background: var(--bg-sidebar);

    border-right:
        1px solid var(--border-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-section-title {
    margin:
        0 10px
        7px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.nav-link {
    min-height: 38px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 8px 11px;

    border-radius: var(--radius-small);

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

a.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-icon {
    width: 18px;

    text-align: center;

    font-size: 15px;
}

.nav-section-muted {
    padding-top: 6px;

    border-top:
        1px solid var(--border-color);
}

.nav-link.disabled {
    color: #4f5761;
    cursor: default;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logout-link {
    color: #c6cbd1;
}


/* Main Content */

.main-content {
    width: 100%;

    padding:
        42px
        clamp(26px, 5vw, 70px)
        70px;
}


/* Dashboard */

.dashboard-hero {
    max-width: 1180px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;

    margin: 0 auto 46px;
}

.eyebrow {
    display: block;

    margin-bottom: 8px;

    color: var(--accent);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.dashboard-hero h1 {
    margin: 0 0 12px;

    font-size:
        clamp(
            38px,
            5vw,
            58px
        );

    line-height: 1;

    letter-spacing: -2px;
}

.dashboard-hero p {
    max-width: 570px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 17px;
    line-height: 1.6;
}

.hero-status {
    min-width: 160px;

    padding: 20px 24px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-large);

    background: var(--bg-card);

    box-shadow: var(--shadow-card);
}

.hero-status-number {
    display: block;

    margin-bottom: 3px;

    color: var(--online);

    font-size: 34px;
    font-weight: 800;
}

.hero-status-label {
    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 600;
}


.dashboard-section {
    max-width: 1180px;

    margin:
        0 auto
        52px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 19px;
}

.section-heading h2 {
    margin: 0;

    font-size: 25px;

    letter-spacing: -0.5px;
}

.section-heading p {
    max-width: 420px;

    margin: 0;

    color: var(--text-muted);

    font-size: 13px;
    line-height: 1.5;

    text-align: right;
}


/* Match Cards */

.match-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 14px;
}

.match-card {
    min-height: 180px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 22px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-medium);

    background: var(--bg-card);

    color: var(--text-primary);

    text-decoration: none;

    box-shadow: var(--shadow-card);

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.match-card:hover {
    transform:
        translateY(-2px);

    border-color:
        var(--border-color-strong);

    background:
        var(--bg-card-hover);
}

.match-card.featured {
    border-color:
        rgba(
            255,
            122,
            0,
            0.45
        );

    background:
        linear-gradient(
            135deg,
            var(--bg-card),
            rgba(
                255,
                122,
                0,
                0.08
            )
        );
}

.match-card.has-players {
    border-color:
        rgba(
            54,
            201,
            111,
            0.24
        );
}

.match-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-mode {
    font-size: 26px;
    font-weight: 850;

    letter-spacing: -0.8px;
}

.match-arrow {
    color: var(--text-muted);

    font-size: 22px;

    transition:
        transform 0.15s ease,
        color 0.15s ease;
}

.match-card:hover
.match-arrow {
    transform:
        translateX(3px);

    color: var(--accent);
}

.match-card p {
    margin:
        20px 0;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.55;
}

.match-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.match-card-footer {
    color: var(--accent);

    font-size: 12px;
    font-weight: 800;
}

.match-live {
    display: flex;
    align-items: center;
    gap: 6px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 600;
}

.match-live strong {
    color: var(--text-secondary);

    font-size: 12px;
}

.match-card.has-players
.match-live {
    color: var(--online);
}

.match-card.has-players
.match-live strong {
    color: var(--online);
}


/* Übergangs-Spielerliste */

.legacy-player-section {
    padding-top: 6px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 10px;

    max-width: none;
    margin: 0;
}

.player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    padding: 14px 16px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-medium);

    background: var(--bg-card);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 11px;
}

.player-name-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.player-name-block strong {
    font-size: 14px;
}

.status-dot {
    width: 9px;
    height: 9px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #555d67;
}

.status-dot.online {
    background: var(--online);

    box-shadow:
        0 0 8px
        rgba(
            54,
            201,
            111,
            0.7
        );
}

.status-text {
    color: var(--text-muted);

    font-size: 11px;
}

.status-dot.online
    ~ .player-name-block
    .status-text {
    color: var(--online);
}

.unread-badge {
    min-width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 7px;

    border-radius: 999px;

    background: var(--danger);
    color: #fff;

    font-size: 11px;
    font-weight: 800;
}

.unread-badge[hidden] {
    display: none;
}

.small-action {
    padding: 8px 12px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-small);

    background: #1b2026;
    color: var(--text-primary);

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;
}

.small-action:hover {
    border-color:
        var(--border-color-strong);

    background: var(--bg-card-hover);
}

.empty-card {
    padding: 30px;

    border:
        1px dashed
        var(--border-color-strong);

    border-radius:
        var(--radius-medium);

    color: var(--text-muted);

    text-align: center;
}


/* App-Chat */

.chat-main {
    min-height:
        calc(
            100vh -
            var(--topbar-height)
        );

    padding-bottom: 30px;
}

.chat-content {
    width: 100%;
    max-width: 1180px;

    height:
        calc(
            100vh -
            var(--topbar-height) -
            72px
        );

    min-height: 620px;

    display: flex;
    flex-direction: column;

    margin: 0 auto;
}


/* Zurück-Navigation */

.back-link {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 18px;

    padding: 5px 2px;

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition:
        color 0.15s ease;
}

.back-link-icon {
    font-size: 20px;
    line-height: 1;

    transition:
        transform 0.15s ease;
}

.back-link:hover {
    color: var(--accent);
}

.back-link:hover
.back-link-icon {
    transform:
        translateX(-3px);
}


/* Chat-Kopf */

.content-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 22px;
}

.content-header h1 {
    margin: 0;

    font-size: 36px;

    letter-spacing: -1px;
}

.content-header p {
    margin: 7px 0 0;

    color: var(--text-secondary);

    font-size: 14px;
}

.chat-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.private-status {
    display: flex;
    align-items: center;
    gap: 7px;

    margin: 2px 0 0;

    color: var(--text-muted);

    font-size: 12px;
}

.private-status
.status-dot.online
    + span {
    color: var(--online);
}

.room-online-card {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 14px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-medium);

    background: var(--bg-card);

    color: var(--text-secondary);

    font-size: 12px;
}

.room-online-card strong {
    color: var(--text-primary);

    font-size: 15px;
}


/* Chat */

.chat-panel {
    min-height: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
}

.app-chat-box {
    min-height: 0;
    height: auto;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 22px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-large);

    background: #11151a;

    overflow-y: auto;
}

.chat-message {
    width: fit-content;
    max-width: min(620px, 72%);

    padding: 11px 14px;

    border-radius: 14px;
}

.chat-message p {
    margin: 6px 0 0;

    color: var(--text-primary);

    font-size: 15px;
    line-height: 1.45;

    word-break: break-word;
}

.other-message {
    align-self: flex-start;

    background: #252b32;

    border-bottom-left-radius: 4px;
}

.own-message {
    align-self: flex-end;

    background: var(--accent);
    color: #111;

    border-bottom-right-radius: 4px;
}

.own-message p {
    color: #111;
}

.message-meta {
    display: flex;
    gap: 9px;
    align-items: center;

    font-size: 11px;
}

.message-meta span {
    opacity: 0.6;
}

.chat-empty-state {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    color: var(--text-muted);

    text-align: center;
}

.chat-empty-state strong {
    color: var(--text-secondary);

    font-size: 16px;
}

.chat-empty-state span {
    font-size: 13px;
}


/* Chat-Eingabe */

.app-chat-input {
    margin-top: 12px;
}

.chat-input-form {
    position: relative;

    display: flex;
    align-items: stretch;
    gap: 10px;
}

.chat-input-form input {
    min-width: 0;
    flex: 1;

    padding: 14px 16px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-medium);

    background: var(--bg-input);
    color: var(--text-primary);

    outline: none;

    font-size: 14px;
}

.chat-input-form input:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 2px
        var(--accent-soft);
}


.emoji-wrapper {
    position: relative;

    display: flex;
}


.emoji-button {
    width: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-medium);

    background: var(--bg-input);
    color: var(--text-primary);

    font-size: 20px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.emoji-button:hover {
    border-color:
        var(--border-color-strong);

    background:
        var(--bg-card-hover);

    transform:
        translateY(-1px);
}


.emoji-picker {
    position: absolute;

    left: 0;
    bottom: calc(100% + 10px);

    z-index: 30;

    width: 260px;

    display: grid;

    grid-template-columns:
        repeat(
            6,
            1fr
        );

    gap: 4px;

    padding: 10px;

    border:
        1px solid
        var(--border-color-strong);

    border-radius:
        var(--radius-medium);

    background: #171b20;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.45);
}

.emoji-picker[hidden] {
    display: none;
}


.emoji-option {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 8px;

    background: transparent;

    font-size: 20px;

    cursor: pointer;

    transition:
        background 0.12s ease,
        transform 0.12s ease;
}

.emoji-option:hover {
    background: var(--bg-input);

    transform:
        scale(1.12);
}


.chat-input-form
.send-button {
    min-width: 100px;

    padding: 0 22px;

    border: none;

    border-radius: var(--radius-medium);

    background: var(--accent);
    color: #111;

    font-weight: 800;
    cursor: pointer;
}

.chat-input-form
.send-button:hover {
    background:
        var(--accent-hover);
}


/* Responsive */

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;

        height: auto;

        grid-row: 2;

        display: none;
    }

    .main-content {
        grid-column: 1;

        padding:
            32px
            22px
            60px;
    }

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

    .profile-name {
        display: none;
    }

    .chat-content {
        height:
            calc(
                100vh -
                var(--topbar-height) -
                55px
            );

        min-height: 520px;
    }
}


@media (max-width: 620px) {
    .topbar {
        padding: 0 16px;
    }

    .online-pill span:last-child {
        display: none;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;

        gap: 22px;
    }

    .dashboard-hero h1 {
        font-size: 40px;
    }

    .hero-status {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 8px;
    }

    .section-heading p {
        text-align: left;
    }

    .match-grid {
        grid-template-columns: 1fr;
    }

    .match-card {
        min-height: 150px;
    }

    .match-card-bottom {
        gap: 10px;
    }

    .player-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .small-action {
        width: 100%;

        text-align: center;
    }

    .content-header {
        align-items: flex-start;

        gap: 14px;
    }

    .content-header h1 {
        font-size: 30px;
    }

    .chat-title-row {
        gap: 10px;
    }

    .room-online-card span:last-child {
        display: none;
    }

    .chat-main {
        padding:
            24px
            14px
            18px;
    }

    .chat-content {
        height:
            calc(
                100vh -
                var(--topbar-height) -
                42px
            );

        min-height: 480px;
    }

    .back-link {
        margin-bottom: 14px;
    }

    .app-chat-box {
        padding: 14px;
    }

    .chat-message {
        max-width: 88%;
    }

    .emoji-picker {
        width: 236px;

        grid-template-columns:
            repeat(
                5,
                1fr
            );
    }

    .emoji-button {
        width: 44px;
    }

    .chat-input-form
    .send-button {
        min-width: 82px;

        padding: 0 14px;
    }
}

/* Login */

.login-body {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 122, 0, 0.11),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 75%,
            rgba(255, 122, 0, 0.05),
            transparent 30%
        ),
        var(--bg-page);
}

.login-shell {
    width: min(1040px, 100%);
    min-height: 610px;

    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);

    overflow: hidden;

    border: 1px solid var(--border-color);
    border-radius: 24px;

    background: var(--bg-card);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.38);
}

.login-intro {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 48px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #11151a 0%,
            #15191f 62%,
            rgba(255, 122, 0, 0.13) 100%
        );

    border-right: 1px solid var(--border-color);
}

.login-intro::after {
    content: "";

    position: absolute;
    right: -120px;
    bottom: -150px;

    width: 360px;
    height: 360px;

    border: 1px solid rgba(255, 122, 0, 0.18);
    border-radius: 50%;

    box-shadow:
        0 0 0 55px rgba(255, 122, 0, 0.035),
        0 0 0 110px rgba(255, 122, 0, 0.02);

    pointer-events: none;
}

.login-brand {
    position: relative;
    z-index: 1;

    width: fit-content;
}

.login-copy {
    position: relative;
    z-index: 1;

    max-width: 500px;
}

.login-copy h1 {
    margin: 0 0 18px;

    font-size: clamp(44px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -2.6px;
}

.login-copy p {
    max-width: 470px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 16px;
    line-height: 1.7;
}

.login-features {
    position: relative;
    z-index: 1;

    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.login-feature {
    padding: 8px 11px;

    border: 1px solid var(--border-color);
    border-radius: 999px;

    background: rgba(11, 13, 16, 0.35);
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 700;
}

.login-panel {
    display: flex;
    align-items: center;

    padding: 48px;

    background: #12161b;
}

.login-card {
    width: 100%;
    max-width: 390px;

    margin: 0 auto;
}

.login-card-header {
    margin-bottom: 28px;
}

.login-card-header h2 {
    margin: 0 0 8px;

    color: var(--text-primary);

    font-size: 30px;
    letter-spacing: -0.8px;
}

.login-card-header p {
    margin: 0;

    color: var(--text-muted);

    font-size: 13px;
    line-height: 1.55;
}

.login-error {
    margin-bottom: 18px;
    padding: 11px 13px;

    border: 1px solid rgba(255, 77, 77, 0.28);
    border-radius: var(--radius-small);

    background: rgba(255, 77, 77, 0.08);
    color: #ff7777;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field label {
    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 700;
}

.login-field input {
    width: 100%;

    padding: 14px 15px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);

    background: var(--bg-input);
    color: var(--text-primary);

    outline: none;

    font-size: 14px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.login-field input::placeholder {
    color: #68717c;
}

.login-field input:focus {
    border-color: var(--accent);

    background: #242a32;

    box-shadow:
        0 0 0 3px var(--accent-soft);
}

.login-submit {
    width: 100%;

    margin-top: 2px;
    padding: 14px 18px;

    border: none;
    border-radius: var(--radius-medium);

    background: var(--accent);
    color: #111;

    font-weight: 850;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.login-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.login-footer {
    margin-top: 25px;
    padding-top: 22px;

    border-top: 1px solid var(--border-color);

    color: var(--text-muted);

    font-size: 12px;
    text-align: center;
}

.login-footer p {
    margin: 0 0 12px;

    color: var(--text-muted);
}

.login-footer a {
    color: var(--accent);

    text-decoration: none;
    font-weight: 750;
}

.login-footer a:hover {
    color: var(--accent-hover);
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--text-secondary) !important;
}

.login-back-link:hover {
    color: var(--text-primary) !important;
}

@media (max-width: 820px) {
    .login-body {
        align-items: flex-start;
        padding: 18px;
    }

    .login-shell {
        min-height: auto;

        grid-template-columns: 1fr;
    }

    .login-intro {
        min-height: 300px;
        padding: 34px;

        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .login-copy {
        margin: 55px 0 30px;
    }

    .login-copy h1 {
        font-size: 46px;
    }

    .login-panel {
        padding: 38px 28px;
    }
}

@media (max-width: 480px) {
    .login-body {
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;

        border: none;
        border-radius: 0;
    }

    .login-intro {
        min-height: 260px;
        padding: 26px 22px;
    }

    .login-copy {
        margin: 38px 0 20px;
    }

    .login-copy h1 {
        font-size: 39px;
    }

    .login-copy p {
        font-size: 14px;
    }

    .login-features {
        display: none;
    }

    .login-panel {
        padding: 34px 22px 45px;
    }
}


/* Spielerprofil */

.profile-page {
    width: 100%;
    max-width: 1180px;

    margin: 0 auto;
}

.profile-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 18px;
    padding: 28px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-large);

    background:
        linear-gradient(
            135deg,
            var(--bg-card),
            rgba(255, 122, 0, 0.06)
        );

    box-shadow: var(--shadow-card);
}

.profile-header-main {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-large-avatar {
    width: 84px;
    height: 84px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid rgba(255, 122, 0, 0.25);

    border-radius: 24px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 34px;
    font-weight: 900;
}

.profile-identity h1 {
    margin: 0 0 8px;

    font-size:
        clamp(
            32px,
            5vw,
            46px
        );

    letter-spacing: -1.5px;
}

.profile-presence {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-action-placeholder {
    padding: 9px 12px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-small);

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 700;
}

.profile-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(260px, 0.75fr);

    gap: 14px;
}

.profile-card {
    padding: 24px;

    border:
        1px solid var(--border-color);

    border-radius: var(--radius-medium);

    background: var(--bg-card);

    box-shadow: var(--shadow-card);
}

.profile-about-card {
    grid-row: span 2;

    min-height: 300px;
}

.profile-bio,
.profile-empty-text {
    margin: 18px 0 0;

    line-height: 1.7;

    white-space: pre-wrap;
}

.profile-bio {
    color: var(--text-primary);
}

.profile-empty-text {
    color: var(--text-muted);
}

.profile-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;

    margin-top: 8px;
}

.profile-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px 0;

    border-bottom:
        1px solid var(--border-color);
}

.profile-detail:last-child {
    border-bottom: none;
}

.profile-detail-label {
    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;
}

.profile-detail strong {
    color: var(--text-primary);

    font-size: 13px;

    text-align: right;
    word-break: break-word;
}

.profile-detail
.profile-muted-value {
    color: var(--text-muted);
}


@media (max-width: 760px) {
    .profile-header-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-actions {
        width: 100%;
    }

    .profile-actions
    .small-action,
    .profile-action-placeholder {
        width: 100%;

        text-align: center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-about-card {
        grid-row: auto;

        min-height: 220px;
    }
}


@media (max-width: 520px) {
    .profile-header-main {
        align-items: flex-start;
    }

    .profile-large-avatar {
        width: 64px;
        height: 64px;

        border-radius: 18px;

        font-size: 26px;
    }

    .profile-detail {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .profile-detail strong {
        text-align: left;
    }
}


/* Profilnavigation */

.profile-menu {
    position: relative;
}

.profile-menu-button {
    padding: 5px 7px;

    border: 1px solid transparent;
    border-radius: var(--radius-medium);

    background: transparent;
    color: var(--text-primary);

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.profile-menu-button:hover,
.profile-menu-button[aria-expanded="true"] {
    border-color: var(--border-color);

    background: var(--bg-card);
}

.profile-menu-chevron {
    margin-left: 1px;

    color: var(--text-muted);

    font-size: 11px;

    transition:
        transform 0.15s ease;
}

.profile-menu-button[aria-expanded="true"]
.profile-menu-chevron {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    z-index: 50;

    width: 210px;

    padding: 7px;

    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-medium);

    background: #171b20;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.45);
}

.profile-dropdown[hidden] {
    display: none;
}

.profile-dropdown-link {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 9px 11px;

    border-radius: var(--radius-small);

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 13px;
    font-weight: 650;
}

a.profile-dropdown-link:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.profile-dropdown-link.disabled {
    color: #59616b;

    cursor: default;
}

.profile-dropdown-link small {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 700;

    text-transform: uppercase;
}

.profile-dropdown-divider {
    height: 1px;

    margin: 6px 4px;

    background: var(--border-color);
}

.profile-dropdown-link.logout {
    color: #ff7777;
}

a.profile-dropdown-link.logout:hover {
    background: rgba(255, 77, 77, 0.08);
    color: #ff8b8b;
}


@media (max-width: 900px) {
    .profile-menu-chevron {
        display: none;
    }

    .profile-dropdown {
        right: -2px;
    }
}


/* Profil bearbeiten */

.profile-edit-header {
    margin-bottom: 24px;
}

.profile-edit-header h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 46px);
    letter-spacing: -1.5px;
}

.profile-edit-header p {
    max-width: 650px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-edit-card {
    box-shadow: none;
}

.profile-edit-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-edit-section-heading h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.4px;
}

.profile-character-counter {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-field-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 750;
}

.profile-field input,
.profile-field textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
    font: inherit;
    font-size: 14px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.profile-field textarea {
    min-height: 170px;
    resize: vertical;
    line-height: 1.6;
}

.profile-field input:focus,
.profile-field textarea:focus {
    border-color: var(--accent);
    background: #242a32;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.profile-field input::placeholder,
.profile-field textarea::placeholder {
    color: #68717c;
}

.profile-field-help {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.profile-form-error {
    padding: 12px 14px;
    border: 1px solid rgba(255, 77, 77, 0.28);
    border-radius: var(--radius-small);
    background: rgba(255, 77, 77, 0.08);
    color: #ff7777;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.profile-cancel-button,
.profile-save-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-small);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.profile-cancel-button {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
}

.profile-cancel-button:hover {
    border-color: var(--border-color-strong);
    color: var(--text-primary);
}

.profile-save-button {
    border: none;
    background: var(--accent);
    color: #111;
}

.profile-save-button:hover {
    background: var(--accent-hover);
}

.profile-edit-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 620px) {
    .profile-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .profile-cancel-button,
    .profile-save-button {
        width: 100%;
    }
}

/* Profil V1 */

.profile-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;

    margin-bottom: 16px;
    padding: 30px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);

    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(255, 122, 0, 0.13),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #171b20,
            var(--bg-card)
        );

    box-shadow: var(--shadow-card);
}

.profile-hero-main {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar-wrap {
    position: relative;

    width: 112px;
    height: 112px;

    flex-shrink: 0;
}

.profile-hero-avatar-image,
.profile-hero-avatar-fallback {
    width: 100%;
    height: 100%;

    border: 2px solid rgba(255, 122, 0, 0.28);
    border-radius: 28px;

    background: var(--accent-soft);

    object-fit: cover;
}

.profile-hero-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--accent);

    font-size: 44px;
    font-weight: 900;
}

.profile-avatar-status {
    position: absolute;
    right: -3px;
    bottom: 7px;

    width: 18px;
    height: 18px;

    border: 4px solid #171b20;
    border-radius: 50%;

    background: #555d67;
}

.profile-hero-identity {
    min-width: 0;
}

.profile-hero-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 10px;
}

.profile-hero-name-row h1 {
    margin: 0;

    font-size:
        clamp(
            38px,
            5vw,
            54px
        );

    letter-spacing: -2px;
}

.profile-country-badge {
    padding: 5px 8px;

    border: 1px solid var(--border-color-strong);
    border-radius: 7px;

    background: rgba(11, 13, 16, 0.42);
    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.8px;
}

.profile-intro {
    max-width: 720px;

    margin: 0 0 13px;

    color: var(--text-primary);

    font-size: 17px;
    font-weight: 550;
    line-height: 1.55;
}

.profile-intro-empty {
    color: var(--text-muted);
    font-style: italic;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;
}

.profile-meta-separator {
    opacity: 0.55;
}

.profile-v1-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(280px, 0.7fr);

    gap: 14px;
}

.profile-v1-about {
    grid-row: span 2;

    min-height: 345px;
}

.profile-card-heading h2,
.profile-card-title {
    margin: 0;

    color: var(--text-primary);

    font-size: 21px;
    letter-spacing: -0.4px;
}

.profile-long-bio {
    margin-top: 24px;

    font-size: 15px;
    line-height: 1.85;
}

.profile-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 18px;
}

.profile-tag {
    padding: 7px 10px;

    border: 1px solid var(--border-color);
    border-radius: 999px;

    background: var(--bg-input);
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 750;
}

.profile-tag-accent {
    border-color: rgba(255, 122, 0, 0.25);

    background: var(--accent-soft);
    color: var(--accent);
}

.profile-empty-text.compact {
    margin-top: 16px;
}

.profile-details-card {
    min-height: 0;
}


/* Profil V1 bearbeiten */

.avatar-editor {
    display: flex;
    align-items: center;
    gap: 24px;
}

.avatar-preview-wrap {
    width: 108px;
    height: 108px;

    flex-shrink: 0;
}

.avatar-preview-image,
.avatar-preview-fallback {
    width: 100%;
    height: 100%;

    border: 2px solid rgba(255, 122, 0, 0.24);
    border-radius: 26px;

    background: var(--accent-soft);

    object-fit: cover;
}

.avatar-preview-fallback {
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--accent);

    font-size: 40px;
    font-weight: 900;
}

.avatar-preview-image[hidden],
.avatar-preview-fallback[hidden] {
    display: none;
}

.avatar-editor-controls {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}

.avatar-file-input {
    position: absolute;

    width: 1px;
    height: 1px;

    overflow: hidden;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);

    white-space: nowrap;
}

.avatar-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 14px;

    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-small);

    background: var(--bg-input);
    color: var(--text-primary);

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;
}

.avatar-upload-button:hover {
    border-color: rgba(255, 122, 0, 0.45);
    color: var(--accent);
}

.profile-remove-avatar {
    margin-top: 3px;
}

.profile-edit-two-column {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;
}

.profile-field select {
    width: 100%;

    padding: 14px 15px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);

    background: var(--bg-input);
    color: var(--text-primary);

    outline: none;

    font: inherit;
    font-size: 14px;
}

.profile-field select:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px
        var(--accent-soft);
}

.profile-choice-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 9px;
}

.profile-mode-grid {
    display: grid;

    grid-template-columns:
        repeat(
            6,
            minmax(0, 1fr)
        );

    gap: 9px;
}

.profile-choice,
.profile-mode-choice,
.profile-check {
    position: relative;
}

.profile-choice input,
.profile-mode-choice input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.profile-choice span,
.profile-mode-choice span {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 9px 11px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);

    background: var(--bg-input);
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 750;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.profile-choice span:hover,
.profile-mode-choice span:hover {
    border-color: var(--border-color-strong);

    color: var(--text-primary);

    transform: translateY(-1px);
}

.profile-choice input:checked + span,
.profile-mode-choice input:checked + span {
    border-color: rgba(255, 122, 0, 0.45);

    background: var(--accent-soft);
    color: var(--accent);
}

.profile-check {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 650;

    cursor: pointer;
}

.profile-check input {
    accent-color: var(--accent);
}


@media (max-width: 900px) {
    .profile-v1-grid {
        grid-template-columns: 1fr;
    }

    .profile-v1-about {
        grid-row: auto;
    }

    .profile-choice-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

    .profile-mode-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }
}


@media (max-width: 700px) {
    .profile-hero-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-hero-main {
        align-items: flex-start;
    }

    .profile-actions {
        width: 100%;
    }

    .profile-actions .small-action {
        width: 100%;
        text-align: center;
    }

    .profile-edit-two-column {
        grid-template-columns: 1fr;
    }

    .profile-choice-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


@media (max-width: 520px) {
    .profile-hero-main {
        flex-direction: column;
    }

    .profile-avatar-wrap {
        width: 88px;
        height: 88px;
    }

    .profile-hero-avatar-image,
    .profile-hero-avatar-fallback {
        border-radius: 22px;
    }

    .avatar-editor {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-mode-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


/* Profil V1 - Save-Bar & Text-Polish */

.profile-long-bio {
    text-align: left;
}

.profile-v1-about {
    text-align: left;
}

.profile-save-bar {
    position: sticky;
    bottom: 16px;
    z-index: 15;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-top: 6px;
    padding: 13px 14px 13px 18px;

    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-medium);

    background:
        rgba(23, 27, 32, 0.96);

    box-shadow:
        0 16px 45px rgba(0, 0, 0, 0.38);

    backdrop-filter: blur(12px);
}

.profile-save-state {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 700;
}

.profile-unsaved-dot {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #555d67;

    transition:
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.profile-unsaved-dot.active {
    background: var(--accent);

    box-shadow:
        0 0 9px
        rgba(255, 122, 0, 0.65);
}

.profile-save-bar
.profile-form-actions {
    margin-top: 0;
}

.profile-save-button:disabled {
    background: #353b43;
    color: #737c87;

    cursor: default;

    opacity: 0.72;
}

.profile-save-button:disabled:hover {
    background: #353b43;
}


@media (max-width: 620px) {
    .profile-save-bar {
        bottom: 8px;

        align-items: stretch;
        flex-direction: column;

        gap: 11px;

        padding: 13px;
    }

    .profile-save-state {
        justify-content: center;
    }

    .profile-save-bar
    .profile-form-actions {
        width: 100%;
    }
}

/* Anklickbare Benutzernamen im Gruppenchat */

.chat-username-link {
    color: inherit;
    text-decoration: none;

    font-weight: 800;

    cursor: pointer;

    transition:
        color 0.15s ease,
        text-decoration-color 0.15s ease;
}

.chat-username-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 122, 0, 0.55);
}

.chat-username-link:focus-visible {
    border-radius: 3px;

    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Freundschaftsanfragen */

.profile-actions form {
    margin: 0;
}

.profile-friend-button,
.profile-friend-state {
    min-height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 12px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);

    background: #1b2026;
    color: var(--text-primary);

    font: inherit;
    font-size: 12px;
    font-weight: 750;
}

.profile-friend-button {
    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

.profile-friend-button:hover {
    border-color: var(--border-color-strong);
    background: var(--bg-card-hover);
}

.profile-friend-button-primary {
    border-color: rgba(255, 122, 0, 0.38);

    background: var(--accent);
    color: #111;

    font-weight: 850;
}

.profile-friend-button-primary:hover {
    border-color: var(--accent-hover);

    background: var(--accent-hover);
}

.profile-friend-button-pending {
    color: var(--text-secondary);
}

.profile-friend-button-pending:hover {
    border-color: rgba(255, 77, 77, 0.35);
    color: #ff7777;
}

.profile-friend-state {
    border-color: rgba(54, 201, 111, 0.28);

    background: rgba(54, 201, 111, 0.08);
    color: var(--online);
}

@media (max-width: 700px) {
    .profile-actions {
        flex-wrap: wrap;
    }

    .profile-actions form,
    .profile-actions .profile-friend-button,
    .profile-actions .profile-friend-state,
    .profile-actions .small-action {
        width: 100%;
    }
}

/* Social Center */

.nav-link {
    position: relative;
}

.nav-link > .nav-badge {
    margin-left: auto;
}

.nav-badge {
    min-width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 6px;

    border-radius: 999px;

    background: var(--accent);
    color: #111;

    font-size: 10px;
    font-weight: 900;
}

.nav-badge-danger {
    background: var(--danger);
    color: #fff;
}

.social-page {
    width: 100%;
    max-width: 1050px;

    margin: 0 auto;
}

.social-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;

    margin-bottom: 34px;
}

.social-page-header h1 {
    margin: 0 0 10px;

    font-size: clamp(38px, 5vw, 52px);
    letter-spacing: -1.8px;
}

.social-page-header p {
    max-width: 560px;

    margin: 0;

    font-size: 14px;
    line-height: 1.6;
}

.social-summary-card {
    min-width: 130px;

    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 15px 18px;

    border: 1px solid rgba(255, 122, 0, 0.28);
    border-radius: var(--radius-medium);

    background: var(--accent-soft);
}

.social-summary-card strong {
    color: var(--accent);

    font-size: 26px;
    line-height: 1;
}

.social-summary-card span {
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 700;
}

.social-section {
    margin-bottom: 38px;
}

.social-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 13px;
}

.social-section-heading h2 {
    margin: 0;

    font-size: 20px;
    letter-spacing: -0.35px;
}

.social-section-heading > span {
    min-width: 23px;
    height: 23px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 6px;

    border-radius: 999px;

    background: var(--bg-input);
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 800;
}

.social-list,
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.social-user-card,
.conversation-card {
    min-height: 72px;

    display: flex;
    align-items: center;

    padding: 12px 14px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);

    background: var(--bg-card);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.social-user-card {
    justify-content: space-between;
    gap: 20px;
}

.social-user-main {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 13px;

    color: inherit;
    text-decoration: none;
}

.social-avatar {
    width: 44px;
    height: 44px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid rgba(255, 122, 0, 0.22);
    border-radius: 12px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 16px;
    font-weight: 900;
}

.social-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.social-user-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.social-user-copy strong {
    color: var(--text-primary);

    font-size: 14px;
}

.social-user-copy small {
    color: var(--text-muted);

    font-size: 11px;
}

.social-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-card-actions form,
.social-user-card > form {
    margin: 0;
}

.social-action-primary,
.social-action-secondary,
.social-empty-action {
    min-height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 12px;

    border-radius: var(--radius-small);

    text-decoration: none;

    font: inherit;
    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
}

.social-action-primary {
    border: 1px solid var(--accent);

    background: var(--accent);
    color: #111;
}

.social-action-primary:hover {
    background: var(--accent-hover);
}

.social-action-secondary {
    border: 1px solid var(--border-color);

    background: #1b2026;
    color: var(--text-secondary);
}

.social-action-secondary:hover {
    border-color: var(--border-color-strong);
    color: var(--text-primary);
}

.social-empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;

    padding: 42px 24px;

    border: 1px dashed var(--border-color-strong);
    border-radius: var(--radius-medium);

    color: var(--text-muted);

    text-align: center;
}

.social-empty-card strong {
    color: var(--text-secondary);

    font-size: 15px;
}

.social-empty-card span {
    max-width: 470px;

    font-size: 12px;
    line-height: 1.6;
}

.social-empty-action {
    margin-top: 10px;

    border: 1px solid var(--border-color);

    background: var(--bg-input);
    color: var(--text-primary);
}

.conversation-card {
    gap: 13px;

    color: inherit;
    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.conversation-card:hover {
    transform: translateY(-1px);

    border-color: var(--border-color-strong);
    background: var(--bg-card-hover);
}

.conversation-copy {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conversation-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.conversation-topline strong {
    font-size: 14px;
}

.conversation-topline small {
    flex-shrink: 0;

    color: var(--text-muted);

    font-size: 10px;
}

.conversation-preview {
    overflow: hidden;

    color: var(--text-secondary);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-arrow {
    color: var(--text-muted);

    font-size: 18px;
}

@media (max-width: 700px) {
    .social-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .social-summary-card {
        width: 100%;
    }

    .social-user-card {
        align-items: stretch;
        flex-direction: column;
    }

    .social-card-actions {
        width: 100%;
    }

    .social-card-actions form,
    .social-card-actions a,
    .social-user-card > form,
    .social-user-card > form button {
        flex: 1;
        width: 100%;
    }

    .conversation-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .conversation-topline small {
        display: none;
    }
}

/* Globale Social-Navigation */

.nav-social-link {
    justify-content: flex-start;
}

.nav-social-label {
    min-width: 0;
}

.nav-social-indicators {
    min-width: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    margin-left: auto;
}

.nav-badge-online {
    background: rgba(54, 201, 111, 0.14);
    color: var(--online);

    border: 1px solid rgba(54, 201, 111, 0.28);
}

.nav-badge-danger {
    background: var(--danger);
    color: #fff;

    border: 1px solid rgba(255, 77, 77, 0.25);
}

.nav-request-dot {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--accent);

    box-shadow:
        0 0 8px
        rgba(255, 122, 0, 0.7);
}

.nav-request-dot[hidden],
.nav-badge[hidden] {
    display: none;
}


/* Dashboard Social Cards */

.dashboard-social-cards {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-social-card {
    min-height: 88px;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 18px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);

    background: var(--bg-card);
    color: inherit;

    text-decoration: none;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.dashboard-social-card:hover {
    transform: translateY(-1px);

    border-color: var(--border-color-strong);
    background: var(--bg-card-hover);
}

.dashboard-social-card > div {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-social-card strong {
    color: var(--text-primary);

    font-size: 14px;
}

.dashboard-social-card span {
    color: var(--text-muted);

    font-size: 11px;
}

.dashboard-social-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--accent-soft);
    color: var(--accent) !important;

    font-size: 16px !important;
    font-weight: 900;
}

@media (max-width: 720px) {
    .dashboard-social-cards {
        grid-template-columns: 1fr;
    }
}


/* Nachrichtenanfragen */

.message-request-card {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px;

    border: 1px solid rgba(255, 122, 0, 0.26);
    border-radius: var(--radius-medium);

    background:
        linear-gradient(
            90deg,
            rgba(255, 122, 0, 0.06),
            var(--bg-card) 42%
        );
}

.message-request-copy {
    max-width: 620px;
}

.message-request-preview {
    overflow: hidden;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.45;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-request-notice {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin-bottom: 12px;
    padding: 12px 14px;

    border: 1px solid rgba(255, 122, 0, 0.26);
    border-radius: var(--radius-small);

    background: rgba(255, 122, 0, 0.07);
}

.message-request-notice strong {
    color: var(--accent);

    font-size: 12px;
}

.message-request-notice span {
    color: var(--text-secondary);

    font-size: 11px;
    line-height: 1.5;
}

.message-request-notice.pending {
    border-color: var(--border-color);

    background: var(--bg-card);
}

.message-request-notice.pending strong {
    color: var(--text-secondary);
}

.chat-input-form input:disabled,
.chat-input-form button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.nav-message-request-dot {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    margin-left: 6px;

    border-radius: 50%;

    background: var(--accent);

    box-shadow:
        0 0 8px
        rgba(255, 122, 0, 0.7);
}

.nav-message-request-dot[hidden] {
    display: none;
}

@media (max-width: 700px) {
    .message-request-card {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Benutzerstatus */

.status-dot {
    width: 8px;
    height: 8px;

    display: inline-block;
    flex-shrink: 0;

    border-radius: 50%;

    background: #69717c;
}

.status-dot.status-online,
.profile-avatar-status.status-online {
    background: #36c96f;
}

.status-dot.status-away,
.profile-avatar-status.status-away {
    background: #f2b84b;
}

.status-dot.status-busy,
.profile-avatar-status.status-busy {
    background: #ef5b5b;
}

.status-dot.status-offline,
.profile-avatar-status.status-offline {
    background: #69717c;
}

.profile-avatar-status.status-online {
    box-shadow: 0 0 0 3px var(--bg-card);
}

.profile-avatar-status.status-away {
    box-shadow: 0 0 0 3px var(--bg-card);
}

.profile-avatar-status.status-busy {
    box-shadow: 0 0 0 3px var(--bg-card);
}

.profile-avatar-status.status-offline {
    box-shadow: 0 0 0 3px var(--bg-card);
}

.social-user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.private-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.profile-status-menu {
    padding: 8px 0;
}

.profile-status-title {
    display: block;

    padding: 4px 14px 7px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-status-options {
    display: flex;
    flex-direction: column;
}

.profile-status-option {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 8px 14px;

    border: 0;

    background: transparent;
    color: var(--text-secondary);

    font: inherit;
    font-size: 12px;

    text-align: left;

    cursor: pointer;
}

.profile-status-option:hover,
.profile-status-option.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.profile-status-option.active {
    font-weight: 800;
}

.profile-status-option .status-dot {
    width: 9px;
    height: 9px;
}

.profile-status-current {
    margin-left: auto;

    color: var(--accent);

    font-size: 10px;
}


/* Freunde auf Profilen */

.profile-friend-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 24px;
    height: 22px;

    margin-left: 7px;
    padding: 0 7px;

    border: 1px solid var(--border-color);
    border-radius: 999px;

    background: var(--bg-card-hover);
    color: var(--text-secondary);

    font-size: 10px;
    vertical-align: middle;
}

.profile-friends-list {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 9px;

    margin-top: 14px;
}

.profile-friend-item {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);

    background: var(--bg-card);
    color: inherit;

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}

.profile-friend-item:hover {
    transform: translateY(-1px);

    border-color: var(--border-color-strong);
    background: var(--bg-card-hover);
}

.profile-friend-avatar {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 12px;
    font-weight: 900;
}

.profile-friend-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.profile-friend-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-friend-copy strong {
    overflow: hidden;

    color: var(--text-primary);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-friend-copy small {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--text-muted);

    font-size: 10px;
}

.profile-friend-copy .status-dot {
    width: 7px;
    height: 7px;
}

.profile-private-note {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 12px;
    padding: 12px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);

    background: var(--bg-card);

    color: var(--text-muted);

    font-size: 11px;
}

@media (max-width: 680px) {
    .profile-friends-list {
        grid-template-columns: 1fr;
    }
}


/* Sidebar V2 */

.sidebar-v2 .sidebar-nav {
    gap: 20px;
}

.nav-section-fixed {
    gap: 6px;
}

.nav-sections-sortable {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-section-v2 {
    gap: 0;

    padding: 4px;

    border: 1px solid transparent;
    border-radius: 11px;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        opacity 0.15s ease,
        transform 0.15s ease;
}

.nav-section-v2:hover {
    border-color:
        rgba(255, 255, 255, 0.035);
}

.nav-section-v2.has-active-item {
    background:
        rgba(255, 255, 255, 0.018);
}

.nav-section-v2.is-dragging {
    opacity: 0.42;
    transform: scale(0.985);

    border-color:
        rgba(255, 122, 0, 0.34);

    background:
        rgba(255, 122, 0, 0.055);
}

.nav-section-header {
    min-width: 0;
}

.nav-section-toggle {
    width: 100%;
    min-height: 34px;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 5px 7px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: var(--text-muted);

    text-align: left;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.nav-section-toggle:hover {
    background:
        rgba(255, 255, 255, 0.028);

    color: var(--text-secondary);
}

.nav-section-v2.has-active-item
.nav-section-toggle {
    color: var(--text-secondary);
}

.nav-section-title-v2 {
    font-size: 10px;
    font-weight: 850;

    letter-spacing: 1.35px;
    text-transform: uppercase;
}

.nav-drag-handle {
    width: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #4f5761;

    font-size: 13px;
    line-height: 1;

    cursor: grab;

    user-select: none;
}

.nav-drag-handle:active {
    cursor: grabbing;
}

.nav-section-header-spacer {
    flex: 1;
}

.nav-section-summary {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;

    margin-left: auto;
}

.nav-section-chevron {
    width: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 2px;

    color: #59616b;

    font-size: 14px;
    font-weight: 800;

    transform: rotate(0deg);

    transition:
        transform 0.16s ease,
        color 0.15s ease;
}

.nav-section-toggle:hover
.nav-section-chevron {
    color: var(--text-secondary);
}

.nav-section-v2.is-collapsed
.nav-section-chevron {
    transform: rotate(-90deg);
}

.nav-section-v2.is-collapsed
.nav-section-summary {
    display: inline-flex;
}

.nav-section-body {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding-top: 3px;
}

.nav-section-body[hidden] {
    display: none;
}

.nav-section-v2 .nav-link {
    min-height: 35px;

    margin-left: 15px;
    padding:
        7px
        9px
        7px
        11px;

    font-size: 13px;
}

.nav-section-v2 .nav-link.active {
    position: relative;
}

.nav-section-v2 .nav-link.active::before {
    content: "";

    position: absolute;

    top: 9px;
    bottom: 9px;
    left: 0;

    width: 2px;

    border-radius: 999px;

    background: var(--accent);
}

.nav-section-v2
.nav-social-indicators {
    gap: 5px;
}

.nav-section-v2
.nav-section-summary
.nav-badge {
    min-width: 19px;
    height: 19px;

    padding: 0 5px;

    font-size: 9px;
}

.nav-section-v2
.nav-section-summary
.nav-request-dot,
.nav-section-v2
.nav-section-summary
.nav-message-request-dot {
    width: 7px;
    height: 7px;

    margin-left: 0;
}

.nav-section-v2.has-active-item
.nav-section-title-v2 {
    color: var(--accent);
}

.sidebar-footer {
    padding-top: 14px;

    border-top:
        1px solid
        var(--border-color);
}

@media (max-width: 900px) {
    .nav-section-v2 {
        transform: none !important;
    }

    .nav-drag-handle {
        display: none;
    }
}

/* Core V2: Settings & Clan */
.content-page-narrow { max-width: 900px; margin: 0 auto; }
.page-lead { color: var(--text-muted); margin: 8px 0 24px; }
.settings-card { margin-top: 18px; padding: 22px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-card); }
.settings-card h2 { margin: 4px 0 0; }
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.settings-toggle-row > span { display: flex; flex-direction: column; gap: 5px; }
.settings-toggle-row small, .clan-form small { color: var(--text-muted); }
.settings-toggle-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.settings-actions { margin-top: 16px; }
.success-banner, .info-banner, .error-banner { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-card); }
.success-banner { border-color: rgba(54,201,111,.35); }
.error-banner { border-color: rgba(239,91,91,.35); }
.clan-form { display: flex; flex-direction: column; gap: 16px; }
.clan-form label, .compact-form label { display: flex; flex-direction: column; gap: 7px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.clan-form input, .clan-form textarea, .compact-form input { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--border-color); border-radius: 9px; background: var(--bg-input, #11151a); color: var(--text-primary); font: inherit; }
.clan-page { max-width: 1180px; margin: 0 auto; }
.clan-hero-card { display: flex; align-items: center; gap: 20px; padding: 24px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-card); }
.clan-logo { width: 84px; height: 84px; flex: 0 0 84px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-size: 30px; font-weight: 900; }
.clan-logo img { width: 100%; height: 100%; object-fit: cover; }
.clan-hero-copy { flex: 1; min-width: 0; }
.clan-hero-copy h1 { margin: 5px 0 8px; }
.clan-hero-copy p { color: var(--text-muted); margin: 0; white-space: pre-line; }
.clan-tag { color: var(--accent); }
.clan-meta { display: flex; gap: 8px; margin-top: 12px; color: var(--text-muted); font-size: 12px; }
.clan-hero-actions, .inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; margin-top: 18px; }
.clan-side-column { display: flex; flex-direction: column; gap: 18px; }
.clan-member-list { display: flex; flex-direction: column; margin-top: 12px; }
.clan-member-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.clan-member-row:last-child { border-bottom: 0; }
.clan-member-user { min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.clan-member-user > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.clan-member-user small { color: var(--text-muted); }
.compact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.danger-zone { border-color: rgba(239,91,91,.25); }
.danger-zone p { color: var(--text-muted); font-size: 12px; }
.danger-button, .danger-action { color: #ff7b7b !important; }
.danger-button { padding: 10px 13px; border: 1px solid rgba(239,91,91,.35); border-radius: 8px; background: rgba(239,91,91,.08); cursor: pointer; }
.clan-invite-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.clan-invite-card, .empty-state-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); }
.clan-invite-card > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.clan-invite-card small { color: var(--text-muted); }
.compact-button { padding: 8px 10px; }
.profile-inline-link { color: var(--accent); text-decoration: none; }
@media (max-width: 850px) { .clan-grid { grid-template-columns: 1fr; } .clan-hero-card { align-items: flex-start; flex-wrap: wrap; } .clan-hero-actions { width: 100%; } }


/* Clan UX V2 + einheitliche Aktionsbuttons */

.ui-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.ui-button:hover {
    transform: translateY(-1px);
}

.ui-button-primary {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}

.ui-button-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.ui-button-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color-strong);
}

.ui-button-secondary:hover {
    background: var(--bg-card-hover);
    border-color: #46505d;
}

.ui-button-danger {
    background: rgba(255, 77, 77, 0.12);
    color: #ff8585;
    border-color: rgba(255, 77, 77, 0.32);
}

.ui-button-danger:hover {
    background: rgba(255, 77, 77, 0.18);
    border-color: rgba(255, 77, 77, 0.48);
}

.ui-button-ghost-danger {
    background: transparent;
    color: #ff8585;
    border-color: transparent;
}

.ui-button-ghost-danger:hover {
    background: rgba(255, 77, 77, 0.08);
}

.ui-button-small {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 11px;
}

.ui-button-full {
    width: 100%;
}

.ui-button-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.ui-button-row form {
    margin: 0;
}

.ui-icon-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

.ui-icon-button::-webkit-details-marker {
    display: none;
}

.ui-icon-button:hover {
    border-color: var(--border-color-strong);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.count-pill {
    min-width: 27px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 800;
}

.page-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.page-heading-row h1 {
    margin-bottom: 8px;
}

.clan-hub-page,
.clan-page {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.clan-hub-section + .clan-hub-section {
    margin-top: 16px;
}

.clan-invite-list,
.clan-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.clan-invite-card,
.clan-search-result {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    background: var(--bg-card);
}

.clan-search-result {
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.clan-search-result:hover {
    transform: translateY(-1px);
    background: var(--bg-card-hover);
    border-color: var(--border-color-strong);
}

.clan-search-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.clan-mini-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.clan-mini-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clan-search-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clan-search-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.clan-search-copy small {
    color: var(--text-muted);
    font-size: 11px;
}

.clan-search-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 18px;
}

.clan-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin-top: 14px;
}

.clan-search-form input,
.clan-form input,
.clan-form textarea,
.compact-form input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: var(--bg-input);
    color: var(--text-primary);
}

.clan-search-form input {
    min-height: 42px;
    padding: 9px 12px;
}

.clan-hero-v2 {
    margin-bottom: 14px;
}

.clan-logo-large {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
}

.clan-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    background: var(--bg-card);
}

.clan-tab {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.clan-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.clan-tab.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.clan-main-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clan-chat-preview-card {
    overflow: hidden;
}

.clan-preview-messages {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 12px;
}

.clan-preview-message {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    padding: 8px 10px;
    border-radius: 8px;
}

.clan-preview-message:hover {
    background: var(--bg-card-hover);
}

.clan-preview-message a {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-preview-message p {
    margin: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-preview-message time {
    color: var(--text-muted);
    font-size: 10px;
}

.clan-member-list-v2 {
    margin-top: 12px;
}

.clan-member-row-v2 {
    min-height: 58px;
    padding: 8px 2px;
}

.compact-copy {
    margin: 5px 0 13px;
    font-size: 11px;
    line-height: 1.5;
}

.danger-zone-v2 {
    border-color: rgba(255, 77, 77, 0.22);
}

.profile-overflow-menu {
    position: relative;
}

.profile-overflow-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 7px);
    right: 0;
    width: 205px;
    padding: 6px;
    border: 1px solid var(--border-color-strong);
    border-radius: 10px;
    background: #15191f;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.profile-overflow-action,
.profile-overflow-disabled {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 11px;
    text-align: left;
}

.profile-overflow-action {
    cursor: pointer;
}

.profile-overflow-action:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.profile-overflow-disabled {
    color: var(--text-muted);
}

.compact-state {
    padding: 18px 8px 4px;
}

.clan-chat-page {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.clan-chat-header {
    align-items: flex-end;
}

.clan-tabs-chat {
    margin-top: 12px;
    margin-bottom: 12px;
}

.clan-chat-box {
    min-height: min(680px, calc(100vh - 235px));
}

@media (max-width: 850px) {
    .page-heading-row {
        flex-direction: column;
    }

    .clan-search-form {
        grid-template-columns: 1fr;
    }

    .clan-invite-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .clan-invite-card .ui-button-row {
        width: 100%;
        justify-content: flex-start;
    }

    .clan-preview-message {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .clan-preview-message p {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .profile-overflow-popover {
        right: auto;
        left: 0;
    }
}

/* Clan V3 */
.clan-role-legend { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:18px; }
.clan-role-legend span { padding:12px 14px; border:1px solid var(--border-color, #2d3138); border-radius:10px; background:rgba(255,255,255,.02); }
.clan-role-legend strong { display:block; margin-bottom:3px; }
.member-admin-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.role-select { min-height:36px; padding:0 34px 0 12px; border-radius:8px; border:1px solid var(--border-color, #343840); background:#181b20; color:#f3f3f3; }
.clan-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.clan-application-list { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.clan-application-card { padding:14px; border:1px solid var(--border-color, #30343b); border-radius:10px; background:rgba(255,255,255,.02); }
.clan-application-card p { margin:8px 0 12px; color:#aeb3bd; white-space:pre-wrap; }
.danger-zone { border-color:rgba(220,70,70,.32) !important; }
.ui-button-danger { background:#b83a3a; color:#fff; border:1px solid #cf4c4c; }
.ui-button-danger:hover { background:#c74343; }
.clan-member-mini-list { display:flex; flex-direction:column; gap:6px; margin:12px 0 16px; }
.clan-member-mini-list a { display:flex; justify-content:space-between; gap:12px; padding:9px 10px; border-radius:8px; text-decoration:none; color:inherit; background:rgba(255,255,255,.025); }
.clan-member-mini-list small { color:#8e949e; }
@media (max-width:900px) { .clan-settings-grid { grid-template-columns:1fr; } }

/* Clan V4 visual overhaul */
.clan-page-v4 {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.clan-hero-v4 {
    position: relative;
    overflow: hidden;
    gap: 24px;
    padding: 28px;
    border-color: rgba(255, 122, 0, 0.18);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 122, 0, 0.08), transparent 36%),
        var(--bg-card);
}

.clan-hero-v4::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--accent);
}

.clan-logo-v4 {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border: 1px solid rgba(255, 122, 0, 0.28);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.clan-hero-copy-v4 h1 {
    margin: 2px 0 8px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.05;
    letter-spacing: -1.2px;
}

.clan-hero-copy-v4 > p {
    max-width: 700px;
    font-size: 14px;
    line-height: 1.6;
}

.clan-meta-v4 {
    gap: 8px;
    margin-top: 16px;
}

.clan-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 750;
}

.clan-public-nav {
    display: inline-flex;
    gap: 4px;
    margin: 14px 0 18px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
}

.clan-public-nav-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.clan-public-nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.clan-public-nav-link.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.clan-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.72fr);
    gap: 16px;
    margin-top: 16px;
}

.clan-dashboard-main,
.clan-dashboard-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clan-surface-card {
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.clan-section-heading-v4 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.clan-section-heading-v4.compact {
    margin-bottom: 10px;
}

.clan-section-heading-v4 h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.35px;
}

.clan-description-v4 {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-wrap;
}

.clan-chat-preview-card-v4 {
    padding-bottom: 10px;
}

.clan-preview-list-v4 {
    display: flex;
    flex-direction: column;
    margin: 0 -8px;
}

.clan-preview-row-v4 {
    display: flex;
    gap: 11px;
    padding: 11px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.clan-preview-row-v4:first-child {
    border-top: 0;
}

.clan-preview-row-v4:hover {
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.clan-preview-avatar-v4,
.clan-roster-avatar-v4,
.clan-member-avatar-v4,
.clan-application-avatar-v4 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid var(--border-color);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
}

.clan-preview-avatar-v4 {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
}

.clan-preview-content-v4 {
    min-width: 0;
    flex: 1;
}

.clan-preview-meta-v4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.clan-preview-meta-v4 a {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.clan-preview-meta-v4 a:hover {
    color: var(--accent);
}

.clan-preview-meta-v4 time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 10px;
}

.clan-preview-content-v4 p {
    margin: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-empty-v4 {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0 8px;
    color: var(--text-muted);
}

.clan-empty-v4 strong {
    color: var(--text-secondary);
    font-size: 12px;
}

.clan-empty-v4 span {
    font-size: 11px;
}

.clan-roster-preview-v4 {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 4px 0 14px;
}

.clan-roster-row-v4 {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
}

.clan-roster-row-v4:hover {
    background: var(--bg-card-hover);
}

.clan-roster-avatar-v4 {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 11px;
}

.clan-roster-avatar-v4 img,
.clan-member-avatar-v4 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.clan-roster-copy-v4 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.clan-roster-copy-v4 strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-roster-copy-v4 small {
    color: var(--text-muted);
    font-size: 10px;
}

.clan-roster-arrow-v4 {
    color: var(--text-muted);
    font-size: 19px;
}

.clan-page-header-v4 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.clan-page-header-v4 .back-link {
    display: inline-flex;
    margin-bottom: 22px;
}

.clan-page-header-v4 h1 {
    margin: 0 0 8px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -1.5px;
}

.clan-page-header-v4 p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.clan-member-count-v4 {
    min-width: 132px;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border: 1px solid rgba(255, 122, 0, 0.22);
    border-radius: var(--radius-medium);
    background: var(--accent-soft);
}

.clan-member-count-v4 strong {
    color: var(--accent);
    font-size: 26px;
    line-height: 1;
}

.clan-member-count-v4 span {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 750;
}

.clan-members-card-v4 {
    padding: 14px 20px 8px;
}

.clan-role-strip-v4 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 2px 0 15px;
    border-bottom: 1px solid var(--border-color);
}

.clan-role-strip-v4 > div {
    display: grid;
    grid-template-columns: 8px auto;
    align-items: center;
    column-gap: 7px;
}

.clan-role-strip-v4 strong {
    font-size: 10px;
}

.clan-role-strip-v4 small {
    grid-column: 2;
    color: var(--text-muted);
    font-size: 9px;
}

.role-dot-v4 {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--text-muted);
}

.role-dot-v4.role-owner { background: var(--accent); }
.role-dot-v4.role-admin { background: #cf7cff; }
.role-dot-v4.role-recruiter { background: #4fb8ff; }
.role-dot-v4.role-member { background: #7c858f; }

.clan-members-list-v4 {
    display: flex;
    flex-direction: column;
}

.clan-member-item-v4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.clan-member-item-v4:last-child {
    border-bottom: 0;
}

.clan-member-profile-v4 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.clan-member-profile-v4:hover strong {
    color: var(--accent);
}

.clan-member-avatar-v4 {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 13px;
}

.clan-member-copy-v4 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.clan-member-copy-v4 strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-member-copy-v4 small {
    color: var(--text-muted);
    font-size: 10px;
}

.clan-role-badge-v4 {
    min-width: 76px;
    display: inline-flex;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .45px;
}

.clan-role-badge-v4.role-owner { color: var(--accent); border-color: rgba(255, 122, 0, .28); background: var(--accent-soft); }
.clan-role-badge-v4.role-admin { color: #cf9aff; border-color: rgba(207, 122, 255, .24); }
.clan-role-badge-v4.role-recruiter { color: #6dc6ff; border-color: rgba(79, 184, 255, .24); }

.member-admin-actions-v4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-admin-actions-v4 form {
    margin: 0;
}

.role-select-v4 {
    min-height: 34px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
    font-size: 10px;
    font-weight: 750;
}

.ui-icon-button-danger {
    color: #ff8585;
    border-color: rgba(239, 91, 91, .24);
    background: rgba(239, 91, 91, .06);
}

.ui-icon-button-danger:hover {
    color: #fff;
    border-color: rgba(239, 91, 91, .4);
    background: rgba(239, 91, 91, .14);
}

.clan-settings-layout-v4 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clan-settings-section-v4 {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
}

.clan-settings-icon-v4 {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 122, 0, .22);
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 17px;
    font-weight: 900;
}

.clan-settings-icon-v4.danger {
    border-color: rgba(239, 91, 91, .28);
    background: rgba(239, 91, 91, .08);
    color: #ff8585;
}

.clan-settings-content-v4 h2 {
    margin: 0 0 6px;
    font-size: 17px;
}

.clan-settings-content-v4 > p {
    max-width: 680px;
    margin: 0 0 13px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.55;
}

.clan-settings-title-row-v4 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.clan-inline-form-v4 {
    display: grid;
    grid-template-columns: minmax(220px, 420px) auto;
    gap: 9px;
    align-items: center;
}

.clan-inline-form-v4 input {
    min-height: 38px;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
}

.clan-application-list-v4 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clan-application-card-v4 {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, .018);
}

.clan-application-user-v4 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clan-application-avatar-v4 {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 11px;
}

.clan-application-user-v4 > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.clan-application-user-v4 a {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.clan-application-user-v4 small {
    color: var(--text-muted);
    font-size: 9px;
}

.clan-application-card-v4 > p {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
}

.clan-danger-section-v4 {
    border-color: rgba(239, 91, 91, .18);
    background: linear-gradient(90deg, rgba(239, 91, 91, .035), transparent 45%), var(--bg-card);
}

/* Remove the older chunky clan V3 presentation where V4 markup is used. */
.clan-page-v4 .clan-role-legend,
.clan-page-v4 .clan-tabs {
    display: none;
}

@media (max-width: 900px) {
    .clan-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .clan-page-header-v4 {
        align-items: flex-start;
        flex-direction: column;
    }

    .clan-member-count-v4 {
        min-width: 0;
    }

    .clan-member-item-v4 {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .member-admin-actions-v4 {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 620px) {
    .clan-hero-v4 {
        align-items: flex-start;
        padding: 20px;
    }

    .clan-logo-v4 {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 14px;
    }

    .clan-hero-copy-v4 h1 {
        font-size: 28px;
    }

    .clan-section-heading-v4 {
        align-items: flex-start;
        flex-direction: column;
    }

    .clan-member-item-v4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .clan-role-badge-v4 {
        width: fit-content;
    }

    .member-admin-actions-v4 {
        grid-column: auto;
        justify-content: flex-start;
    }

    .clan-settings-section-v4 {
        grid-template-columns: 1fr;
    }

    .clan-inline-form-v4 {
        grid-template-columns: 1fr;
    }
}

.clan-chat-header-v4 {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.clan-chat-header-v4 h1 {
    margin-top: 2px;
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -1px;
}

.clan-hub-page {
    width: min(1040px, 100%);
}

.clan-hub-page > .page-heading-row h1,
.content-page-narrow > h1 {
    margin: 0 0 8px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -1.4px;
}

.clan-hub-page .profile-card,
.content-page-narrow .settings-card {
    box-shadow: var(--shadow-card);
}


/* Clan V5 polish */

.clan-application-nav.is-hidden {
    display: none !important;
}

.profile-clan-link-v2 {
    min-width: 0;
    display: inline-grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.profile-clan-link-v2:hover {
    border-color: rgba(255, 123, 0, .42);
    background: rgba(255, 123, 0, .055);
    transform: translateY(-1px);
}

.profile-clan-mark-v2 {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 123, 0, .12);
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.profile-clan-mark-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-clan-copy-v2 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-clan-copy-v2 strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.profile-clan-copy-v2 strong span {
    color: var(--accent);
}

.profile-clan-copy-v2 small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
}

.profile-clan-arrow-v2 {
    color: var(--text-muted);
    font-size: 15px;
    transition: color .16s ease, transform .16s ease;
}

.profile-clan-link-v2:hover .profile-clan-arrow-v2 {
    color: var(--accent);
    transform: translateX(2px);
}

#bewerbungen {
    scroll-margin-top: 92px;
}


/* BashMe UI polish V6 */

/* Einheitliche, zurückhaltende Scrollbars in der App. */
html {
    scrollbar-color: #3a434e #0c1014;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #0c1014;
}

*::-webkit-scrollbar-thumb {
    background: #313943;
    border: 2px solid #0c1014;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #46515e;
}

*::-webkit-scrollbar-corner {
    background: #0c1014;
}

.clan-invite-composer-v6 {
    max-width: 660px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.clan-invite-field-v6 {
    min-width: 0;
    min-height: 50px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 5px 10px 5px 7px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: rgba(8, 11, 15, .52);
    cursor: text;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.clan-invite-field-v6:focus-within {
    border-color: rgba(255, 123, 0, .56);
    background: rgba(12, 16, 21, .82);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, .07);
}

.clan-invite-field-icon-v6 {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 123, 0, .10);
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.clan-invite-field-copy-v6 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.clan-invite-field-copy-v6 small {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.clan-invite-field-copy-v6 input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.clan-invite-field-copy-v6 input::placeholder {
    color: #5e6875;
    font-weight: 600;
}

.clan-invite-submit-v6 {
    min-height: 50px;
    padding-inline: 17px;
    border-radius: 11px;
}

.clan-invite-hint-v6 {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 10px;
}

.clan-membership-footer-v6 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 11px;
    background: rgba(255,255,255,.018);
}

.clan-membership-footer-v6 > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.clan-membership-footer-v6 strong {
    font-size: 11px;
}

.clan-membership-footer-v6 span {
    color: var(--text-muted);
    font-size: 10px;
}

.profile-overflow-popover {
    min-width: 235px;
    padding: 6px;
    border: 1px solid var(--border-color-strong);
    border-radius: 11px;
    background: #151a20;
    box-shadow: 0 14px 38px rgba(0,0,0,.34);
}

.profile-overflow-action {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.profile-overflow-action:hover {
    background: rgba(255,123,0,.075);
}

.profile-overflow-action-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255,123,0,.11);
    color: var(--accent);
    font-size: 17px;
    font-weight: 700;
}

.profile-overflow-action > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-overflow-action strong {
    font-size: 11px;
}

.profile-overflow-action small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .clan-invite-composer-v6 {
        grid-template-columns: 1fr;
    }

    .clan-invite-submit-v6 {
        width: 100%;
    }

    .clan-membership-footer-v6 {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Clan / App layout fixes V7 */
.clan-chat-page {
    height: calc(100vh - var(--topbar-height));
    min-height: 0;
    max-height: calc(100vh - var(--topbar-height));
    overflow: hidden;

    display: flex;
    flex-direction: column;

    padding-bottom: 28px;
}

.clan-chat-page .clan-chat-header-v4 {
    flex: 0 0 auto;
}

.clan-chat-page .clan-chat-box {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
}

.clan-chat-page .app-chat-box {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.clan-chat-page .app-chat-input {
    flex: 0 0 auto;
}

.clan-members-header-actions-v7 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.clan-leave-button-v7 {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .clan-chat-page {
        height: auto;
        min-height: calc(100vh - var(--topbar-height));
        max-height: none;
        overflow: visible;
    }

    .clan-chat-page .clan-chat-box {
        min-height: 520px;
    }
}

/* Clanchat viewport/layout V8 */
.chat-app-body {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.chat-app-shell {
    height: 100vh;
    min-height: 0;
    grid-template-rows: var(--topbar-height) minmax(0, 1fr);
}

.clan-chat-main-v8 {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding-top: 28px;
    padding-bottom: 24px;
}

.clan-chat-content-v8 {
    height: 100%;
    min-height: 0;
    max-width: 1180px;
    display: flex;
    flex-direction: column;
}

.clan-chat-content-v8 > .back-link {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.clan-chat-content-header-v8 {
    flex: 0 0 auto;
    align-items: flex-end;
    margin-bottom: 16px;
}

.clan-chat-content-header-v8 h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.8px;
}

.clan-chat-content-header-v8 p {
    margin-top: 5px;
}

.clan-chat-panel-v8 {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.clan-chat-panel-v8 .app-chat-box {
    min-height: 0;
    flex: 1 1 0;
    height: 0;
    overflow-y: auto;
}

.clan-chat-panel-v8 .app-chat-input {
    flex: 0 0 auto;
    margin-top: 10px;
}

/* Alte Clanchat-Sonderregeln deaktivieren: V8 nutzt das normale Chatlayout. */
.clan-chat-main-v8.clan-chat-page,
.clan-chat-main-v8 .clan-chat-box {
    height: auto;
    max-height: none;
}

@media (max-width: 900px) {
    .chat-app-body {
        overflow: auto;
    }

    .chat-app-shell {
        height: auto;
        min-height: 100vh;
    }

    .clan-chat-main-v8 {
        min-height: calc(100vh - var(--topbar-height));
        height: auto;
        overflow: visible;
    }

    .clan-chat-content-v8 {
        min-height: 620px;
        height: calc(100vh - var(--topbar-height) - 56px);
    }
}

/* Clan Management V2 */
.clan-feature-page{max-width:1040px;margin:0 auto;padding:36px 28px 64px}.compose-card{padding:18px 20px;margin:0 0 18px}.compose-card summary{cursor:pointer;font-weight:800;color:#f4f6fa}.stack-form{display:grid;gap:12px;margin-top:16px}.stack-form input,.stack-form textarea,.inline-admin-form select{width:100%;box-sizing:border-box;background:#0d1116;border:1px solid #2a313a;color:#eef2f7;border-radius:10px;padding:12px 14px;font:inherit}.stack-form textarea{min-height:100px;resize:vertical}.announcement-list,.audit-list{display:grid;gap:14px}.announcement-card{padding:22px}.announcement-card h2{margin:8px 0 10px}.announcement-meta{display:flex;justify-content:space-between;color:#8f9bad;font-size:12px}.poll-list{display:grid;gap:8px;margin-top:18px}.poll-option{display:flex;justify-content:space-between;width:100%;padding:11px 14px;border:1px solid #303842;border-radius:9px;background:#11171d;color:#eaf0f7;cursor:pointer}.poll-option:hover{border-color:#ff7a00}.reaction-row{display:flex;gap:8px;align-items:center;margin-top:16px}.reaction-row button{border:1px solid #2b333d;background:#10161c;color:#fff;border-radius:999px;padding:7px 10px;cursor:pointer}.audit-event{display:grid;grid-template-columns:16px 1fr;gap:12px;padding:16px 18px;border:1px solid #252c34;border-radius:12px;background:#14191f}.audit-dot{width:8px;height:8px;margin-top:6px;border-radius:50%;background:#ff7a00;box-shadow:0 0 0 4px rgba(255,122,0,.1)}.audit-event p,.audit-event blockquote{margin:5px 0;color:#aeb8c5}.audit-event blockquote{padding:10px 12px;background:#0d1116;border-left:2px solid #ff7a00;border-radius:6px}.audit-event small{color:#6f7a88}.team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}.team-card{display:grid;grid-template-columns:48px 1fr auto;gap:14px;align-items:center;padding:18px;text-decoration:none;color:inherit}.team-card:hover{border-color:#3b4652;transform:translateY(-1px)}.team-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:rgba(255,122,0,.14);color:#ff7a00;font-weight:900}.team-mark.large{width:64px;height:64px;font-size:24px}.team-card h2{font-size:17px;margin:0 0 4px}.team-card p{margin:0 0 6px;color:#9aa6b4}.team-hero{display:flex;align-items:center;gap:18px;padding:22px;margin-bottom:16px}.team-hero>div:nth-child(2){flex:1}.inline-admin-form{display:flex;gap:10px;align-items:center;margin-top:18px}.role-badge{font-size:12px;padding:4px 8px;border-radius:999px;background:#222a33;color:#b9c4d1}.deleted-message{font-style:italic;color:#727e8d!important}.message-mod-action{margin-top:6px}.message-mod-action button{border:0;background:transparent;color:#758190;font-size:11px;cursor:pointer}.message-mod-action button:hover{color:#ff6b6b}


/* Clan Management V3 – dashboard, teams and shared chat polish */
.profile-name-clan-tag, .chat-clan-tag { color: var(--accent, #ff7a00); font-weight: 800; }
.dashboard-announcement-list-v3 { display:grid; gap:10px; }
.dashboard-announcement-v3 { padding:14px 16px; border:1px solid rgba(255,255,255,.07); border-radius:12px; background:rgba(255,255,255,.025); }
.dashboard-announcement-v3 strong { display:block; font-size:15px; margin-bottom:5px; }
.dashboard-announcement-v3 p { margin:0 0 8px; color:var(--text-muted,#91a0b5); line-height:1.45; }
.dashboard-announcement-v3 small { color:var(--text-muted,#718096); }
.clan-dashboard-teams-v3 { margin-bottom:14px; }
.dashboard-team-list-v3 { display:grid; gap:7px; margin:12px 0; }
.dashboard-team-row-v3 { display:grid; grid-template-columns:38px 1fr auto; gap:10px; align-items:center; padding:9px; border-radius:10px; color:inherit; text-decoration:none; transition:.15s ease; }
.dashboard-team-row-v3:hover { background:rgba(255,255,255,.045); }
.dashboard-team-mark-v3 { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; background:rgba(255,122,0,.12); color:#ff7a00; font-weight:900; }
.dashboard-team-row-v3 strong,.dashboard-team-row-v3 small { display:block; }
.dashboard-team-row-v3 small { margin-top:2px; color:var(--text-muted,#718096); font-size:11px; }
.team-detail-page-v2 { max-width:1040px; }
.team-hero-v2 { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; padding:24px; }
.team-mark-large-v2 { width:64px; height:64px; border-radius:16px; font-size:24px; }
.team-hero-copy-v2 h1 { margin:4px 0 4px; font-size:30px; }
.team-hero-copy-v2 p { margin:0 0 10px; color:var(--text-muted,#91a0b5); }
.team-member-count-v2 { display:inline-flex; padding:5px 9px; border:1px solid rgba(255,255,255,.08); border-radius:999px; font-size:12px; color:var(--text-muted,#91a0b5); }
.team-roster-card-v2,.team-manage-card-v2 { margin-top:14px; padding:20px; }
.team-member-grid-v2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.team-member-card-v2 { min-width:0; display:grid; grid-template-columns:46px 1fr auto; align-items:center; gap:12px; padding:12px; border:1px solid rgba(255,255,255,.07); border-radius:12px; background:rgba(255,255,255,.025); color:inherit; text-decoration:none; }
.team-member-card-v2:hover { border-color:rgba(255,122,0,.35); background:rgba(255,122,0,.035); }
.team-member-avatar-v2 { width:46px; height:46px; border-radius:12px; overflow:hidden; display:grid; place-items:center; background:#252b34; color:#ff7a00; font-weight:900; }
.team-member-avatar-v2 img { width:100%; height:100%; object-fit:cover; }
.team-member-info-v2 { min-width:0; }
.team-member-info-v2 strong,.team-member-info-v2 small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-member-info-v2 small { margin-top:3px; color:var(--text-muted,#91a0b5); }
.team-leader-badge-v2 { padding:5px 8px; border-radius:999px; background:rgba(255,122,0,.12); color:#ff8a1c; font-size:11px; font-weight:800; }
.team-manage-card-v2 { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(0,1.5fr); gap:24px; align-items:end; }
.team-manage-card-v2 h2 { margin:4px 0; }
.team-manage-card-v2 p { margin:0; color:var(--text-muted,#91a0b5); }
.team-manage-form-v2 { display:grid; grid-template-columns:1fr 1fr auto; gap:10px; align-items:end; }
.team-manage-form-v2 label span { display:block; margin-bottom:6px; color:var(--text-muted,#91a0b5); font-size:12px; font-weight:700; }
.team-manage-form-v2 select { width:100%; min-height:42px; border-radius:10px; border:1px solid rgba(255,255,255,.09); background:#171c23; color:#f5f7fa; padding:0 12px; }
@media(max-width:900px){ .team-hero-v2{grid-template-columns:auto 1fr}.team-hero-v2>.ui-button{grid-column:1/-1}.team-member-grid-v2{grid-template-columns:1fr}.team-manage-card-v2{grid-template-columns:1fr}.team-manage-form-v2{grid-template-columns:1fr} }

/* Clan polish V4 */
.dashboard-announcement-list-v3{display:grid;gap:12px}.dashboard-announcement-v3{position:relative;padding:15px 16px 14px 18px;border:1px solid #29313a;border-radius:13px;background:linear-gradient(135deg,#171d24,#14191f);overflow:hidden}.dashboard-announcement-v3:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#ff7a00}.dashboard-announcement-v3+ .dashboard-announcement-v3{margin-top:0}.dashboard-announcement-v3 strong{font-size:15px}.dashboard-announcement-v3 small{display:block;border-top:1px solid rgba(255,255,255,.06);padding-top:8px;margin-top:10px}
.dashboard-team-list-v3{gap:9px}.dashboard-team-row-v3{grid-template-columns:44px minmax(0,1fr) 16px;padding:10px 11px;border:1px solid rgba(255,255,255,.065);background:#151b21;border-radius:12px}.dashboard-team-row-v3:hover{border-color:rgba(255,122,0,.35);background:#191f26}.dashboard-team-mark-v3{width:44px;height:44px;border-radius:12px;background:linear-gradient(145deg,rgba(255,122,0,.22),rgba(255,122,0,.08));border:1px solid rgba(255,122,0,.25);font-size:16px}.dashboard-team-row-v3 strong{font-size:14px;color:#f4f6fa}.dashboard-team-row-v3 small{line-height:1.35}
.team-detail-page-v2{max-width:980px!important;margin:0 auto;padding:34px 28px 64px}.team-hero-v2{border:1px solid #29313a;background:linear-gradient(135deg,#181e25,#14191f);border-radius:16px}.team-member-grid-v2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.team-member-card-v2{grid-template-columns:46px minmax(0,1fr) auto!important;min-height:72px}.team-member-avatar-v2,.team-member-avatar-v2 img{width:46px!important;height:46px!important;max-width:46px!important;max-height:46px!important}.team-member-avatar-v2 img{display:block;object-fit:cover!important}.team-roster-card-v2{overflow:hidden}.team-manage-card-v2{border-style:dashed}
.announcement-list-v4{display:grid;gap:16px}.announcement-card-v4{padding:20px 22px;border:1px solid #29313a;border-radius:15px;background:linear-gradient(145deg,#171d23,#14191f);box-shadow:0 8px 28px rgba(0,0,0,.08)}.announcement-head-v4{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid rgba(255,255,255,.065)}.announcement-head-v4 h2{margin:4px 0 0;font-size:19px}.announcement-author-v4{font-size:12px;color:#ff8a1c;font-weight:800}.announcement-head-v4 time{font-size:11px;color:#7e8997}.announcement-body-v4{margin:16px 0;color:#b7c1cd;line-height:1.6;white-space:pre-wrap}.poll-list-v4{display:grid;gap:8px;margin:14px 0}.poll-option-v4{display:flex;justify-content:space-between;align-items:center;width:100%;border:1px solid #2c3540;border-radius:10px;background:#10161c;color:#eef2f7;padding:10px 13px;cursor:pointer}.poll-option-v4:hover{border-color:#ff7a00}.reaction-row-v4{display:flex;gap:6px;align-items:center;margin-top:12px}.reaction-row-v4 button{display:inline-flex;align-items:center;gap:5px;min-width:38px;height:30px;justify-content:center;padding:0 9px;border:1px solid #2b333d;border-radius:999px;background:#11171d;color:#dfe5ec;cursor:pointer}.reaction-row-v4 button:hover{border-color:#ff7a00;background:rgba(255,122,0,.07)}.reaction-row-v4 button strong{font-size:11px;color:#aeb8c5}.profile-motto{font-size:15px;font-weight:700;color:#e8edf3;margin:0 0 18px;padding:12px 14px;border-left:3px solid #ff7a00;background:rgba(255,122,0,.045);border-radius:0 10px 10px 0}.settings-form button#settings-save-button{margin-top:4px}
.message-reactions{display:flex;align-items:center;gap:6px;margin-top:7px;min-height:24px}.message-reaction-picker{display:flex;gap:3px;opacity:0;pointer-events:none;transition:.14s}.chat-message:hover .message-reaction-picker,.message-reactions:focus-within .message-reaction-picker{opacity:1;pointer-events:auto}.message-reaction-picker button{border:0;background:transparent;padding:2px 3px;cursor:pointer;filter:saturate(.85);font-size:13px}.message-reaction-counts{display:flex;gap:4px;flex-wrap:wrap}.message-reaction-pill{display:inline-flex;align-items:center;gap:4px;height:23px;padding:0 7px;border:1px solid rgba(255,255,255,.09);border-radius:999px;background:rgba(0,0,0,.16);color:#dce3eb;cursor:pointer}.message-reaction-pill.mine{border-color:rgba(255,122,0,.5);background:rgba(255,122,0,.11)}.message-reaction-pill strong{font-size:10px}.own-message .message-reactions{justify-content:flex-end}
.dashboard-team-mark-v3{overflow:hidden}.dashboard-team-mark-v3 img{width:100%;height:100%;object-fit:cover;display:block}


/* BashMe UI Polish V5 ----------------------------------------------------- */
/* Reactions visually live below the message bubble, not inside it. */
.chat-message[data-message-id] {
    position: relative;
    overflow: visible;
}

.chat-message[data-message-id]:has(.message-reactions) {
    margin-bottom: 34px;
}

.chat-message .message-reactions {
    position: absolute;
    top: calc(100% + 5px);
    left: 8px;
    right: auto;
    z-index: 3;
    margin: 0;
    min-height: 24px;
    width: max-content;
    max-width: min(420px, 90vw);
}

.chat-message.own-message .message-reactions,
.own-message.chat-message .message-reactions {
    left: auto;
    right: 8px;
    justify-content: flex-end;
}

.message-reaction-picker,
.message-reaction-counts {
    align-items: center;
}

.message-reaction-picker {
    padding: 2px 5px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 999px;
    background: #0f1419;
    box-shadow: 0 5px 16px rgba(0,0,0,.22);
}

.message-reaction-pill {
    background: #11171d;
    box-shadow: 0 3px 10px rgba(0,0,0,.16);
}

/* Profile text belongs to the same left content edge. */
.profile-bio,
.profile-long-bio,
.profile-motto {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.profile-long-bio {
    max-width: 760px;
    white-space: pre-line;
    line-height: 1.7;
}

/* Clan dashboard announcements: quiet feed instead of nested boxes. */
.clan-dashboard-announcements-v3 .clan-section-heading-v4 {
    align-items: center;
    margin-bottom: 8px;
}

.clan-dashboard-announcements-v3 .clan-section-heading-v4 .eyebrow {
    margin-bottom: 0;
}

.dashboard-announcement-list-v3 {
    display: grid;
    gap: 0 !important;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,.065);
}

.dashboard-announcement-v3 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    padding: 16px 2px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.065) !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.dashboard-announcement-v3:last-child {
    border-bottom: 0 !important;
    padding-bottom: 4px !important;
}

.dashboard-announcement-main-v5 {
    min-width: 0;
}

.dashboard-announcement-main-v5 strong {
    display: block;
    margin-bottom: 5px;
    color: #f1f4f8;
    font-size: 14px;
    line-height: 1.35;
}

.dashboard-announcement-main-v5 p {
    margin: 0;
    color: #929eac;
    font-size: 13px;
    line-height: 1.45;
}

.dashboard-announcement-meta-v5 {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    white-space: nowrap;
    color: #697584;
    font-size: 10px;
}

.dashboard-announcement-meta-v5 span {
    color: #9ba6b3;
    font-weight: 700;
}

@media (max-width: 720px) {
    .dashboard-announcement-v3 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dashboard-announcement-meta-v5 {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .chat-message .message-reactions {
        max-width: 78vw;
    }
}

/* =========================================================
   BashMe Design System V2 – Shell + Dashboard
   ========================================================= */
:root {
    --bm-bg: #090d11;
    --bm-surface-1: #0f141a;
    --bm-surface-2: #141a21;
    --bm-surface-3: #19212a;
    --bm-border: #252e38;
    --bm-border-soft: #1b232c;
    --bm-text: #f4f7fb;
    --bm-text-2: #a9b4c2;
    --bm-text-3: #6f7c8c;
    --bm-accent: #ff7a00;
    --bm-accent-soft: rgba(255, 122, 0, .12);
    --bm-accent-border: rgba(255, 122, 0, .32);
    --bm-success: #32d583;
    --bm-danger: #ff5d67;
    --bm-radius-sm: 9px;
    --bm-radius-md: 14px;
    --bm-radius-lg: 20px;
    --bm-shadow: 0 18px 50px rgba(0, 0, 0, .20);
}

.app-body {
    background: var(--bm-bg);
    color: var(--bm-text);
}

.topbar {
    background: rgba(13, 18, 23, .96);
    border-bottom-color: var(--bm-border-soft);
}

.sidebar {
    background: #0d1217;
    border-right-color: var(--bm-border-soft);
}

.main-content {
    background:
        radial-gradient(circle at 50% -20%, rgba(255, 122, 0, .055), transparent 34%),
        var(--bm-bg);
}

/* Reusable V2 primitives */
.bm-panel {
    background: var(--bm-surface-1);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius-md);
    box-shadow: var(--bm-shadow);
}

.bm-kicker {
    color: var(--bm-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bm-muted {
    color: var(--bm-text-2);
}

.bm-link {
    color: var(--bm-text-2);
    text-decoration: none;
    transition: color .16s ease;
}

.bm-link:hover {
    color: var(--bm-text);
}

/* Dashboard V2 */
.main-content.dashboard-v2-content {
    padding: 34px 42px 54px;
}

.dashboard-v2 {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.dashboard-v2-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding: 8px 2px 28px;
}

.dashboard-v2-hero h1 {
    margin: 7px 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.dashboard-v2-hero p {
    max-width: 610px;
    margin: 0;
    color: var(--bm-text-2);
    font-size: 15px;
    line-height: 1.55;
}

.dashboard-v2-presence {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: max-content;
    padding: 10px 13px;
    background: var(--bm-surface-1);
    border: 1px solid var(--bm-border);
    border-radius: 999px;
    color: var(--bm-text-2);
    font-size: 13px;
}

.dashboard-v2-presence strong {
    color: var(--bm-text);
}

.dashboard-v2-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bm-success);
    box-shadow: 0 0 0 4px rgba(50, 213, 131, .08);
}

.dashboard-v2-section {
    margin-top: 18px;
}

.dashboard-v2-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 13px;
}

.dashboard-v2-section-head h2 {
    margin: 4px 0 0;
    font-size: 20px;
    letter-spacing: -.02em;
}

.dashboard-v2-section-head p {
    margin: 0;
    color: var(--bm-text-3);
    font-size: 13px;
}

.dashboard-v2-match-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    background: var(--bm-surface-1);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius-lg);
    box-shadow: var(--bm-shadow);
}

.dashboard-v2-match {
    position: relative;
    min-width: 0;
    padding: 22px 18px 19px;
    color: inherit;
    text-decoration: none;
    border-right: 1px solid var(--bm-border-soft);
    transition: background .16s ease, transform .16s ease;
}

.dashboard-v2-match:last-child {
    border-right: 0;
}

.dashboard-v2-match:hover,
.dashboard-v2-match.has-players {
    background: linear-gradient(180deg, var(--bm-accent-soft), rgba(255, 122, 0, .025));
}

.dashboard-v2-match::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: transparent;
}

.dashboard-v2-match:hover::before,
.dashboard-v2-match.has-players::before {
    background: var(--bm-accent);
}

.dashboard-v2-match-mode {
    display: block;
    margin-bottom: 20px;
    font-size: 23px;
    font-weight: 850;
    letter-spacing: -.035em;
}

.dashboard-v2-match[data-room="oversize"] .dashboard-v2-match-mode {
    font-size: 18px;
}

.dashboard-v2-match-live {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--bm-text-3);
    font-size: 12px;
}

.dashboard-v2-match-live strong {
    color: var(--bm-text-2);
}

.dashboard-v2-match .match-status-dot {
    width: 7px;
    height: 7px;
    background: #3c4652;
}

.dashboard-v2-match .match-status-dot.online {
    background: var(--bm-success);
}

.dashboard-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 16px;
    margin-top: 18px;
}

.dashboard-v2-card {
    min-width: 0;
    padding: 20px;
    background: var(--bm-surface-1);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius-md);
}

.dashboard-v2-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-v2-card-head h3 {
    margin: 3px 0 0;
    font-size: 18px;
}

.dashboard-v2-card-head a {
    color: var(--bm-text-3);
    font-size: 12px;
    text-decoration: none;
}

.dashboard-v2-card-head a:hover {
    color: var(--bm-text);
}

.dashboard-v2-quick-list {
    display: grid;
    gap: 8px;
}

.dashboard-v2-quick {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
    background: var(--bm-surface-2);
    border: 1px solid var(--bm-border-soft);
    border-radius: 11px;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.dashboard-v2-quick:hover {
    background: var(--bm-surface-3);
    border-color: var(--bm-border);
    transform: translateY(-1px);
}

.dashboard-v2-quick-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--bm-accent);
    background: var(--bm-accent-soft);
    font-weight: 850;
}

.dashboard-v2-quick strong,
.dashboard-v2-quick span {
    display: block;
}

.dashboard-v2-quick strong {
    margin-bottom: 2px;
    font-size: 14px;
}

.dashboard-v2-quick-copy span {
    color: var(--bm-text-3);
    font-size: 12px;
}

.dashboard-v2-quick-arrow {
    color: var(--bm-text-3);
    font-size: 17px;
}

.dashboard-v2-note {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.dashboard-v2-note p {
    margin: 8px 0 22px;
    color: var(--bm-text-2);
    font-size: 14px;
    line-height: 1.55;
}

.dashboard-v2-note-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-v2-note-links a {
    padding: 8px 11px;
    color: var(--bm-text-2);
    text-decoration: none;
    background: var(--bm-surface-2);
    border: 1px solid var(--bm-border);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-v2-note-links a:hover {
    color: var(--bm-text);
    border-color: var(--bm-accent-border);
}

/* Calm the navigation down and make modules feel related */
.nav-section-v2 {
    border-color: transparent;
    background: transparent;
}

.nav-section-v2:hover,
.nav-section-v2.has-active-item {
    background: rgba(255, 255, 255, .018);
    border-color: var(--bm-border-soft);
}

.nav-link.active {
    background: var(--bm-accent-soft);
    color: var(--bm-accent);
}

@media (max-width: 1120px) {
    .dashboard-v2-match-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-v2-match:nth-child(3) {
        border-right: 0;
    }

    .dashboard-v2-match:nth-child(-n+3) {
        border-bottom: 1px solid var(--bm-border-soft);
    }
}

@media (max-width: 820px) {
    .main-content.dashboard-v2-content {
        padding: 24px 18px 40px;
    }

    .dashboard-v2-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .dashboard-v2-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .dashboard-v2-match-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-v2-match {
        border-bottom: 1px solid var(--bm-border-soft);
    }

    .dashboard-v2-match:nth-child(2n) {
        border-right: 0;
    }

    .dashboard-v2-match:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .dashboard-v2-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* Dashboard V2.1 + shared chat visual system */
.dashboard-v21-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.dashboard-hub-card{min-height:230px}.dashboard-v2-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.bm-text-link{font-size:12px;color:var(--bm-text-muted);text-decoration:none}.bm-text-link:hover{color:var(--bm-orange)}.dashboard-friend-list{display:grid;gap:6px;margin-top:12px}.dashboard-friend-row{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;text-decoration:none;color:var(--bm-text);transition:.15s}.dashboard-friend-row:hover{background:var(--bm-surface-raised)}.dashboard-avatar{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;overflow:hidden;background:rgba(255,122,0,.12);color:var(--bm-orange);font-weight:800}.dashboard-avatar img{width:100%;height:100%;object-fit:cover}.dashboard-friend-copy{display:grid;gap:3px}.dashboard-friend-copy small{display:flex;align-items:center;gap:6px;color:var(--bm-text-muted);font-size:11px}.dashboard-friend-copy .status-dot{width:6px;height:6px}.dashboard-row-arrow{color:var(--bm-text-muted);font-size:20px}.dashboard-clan-summary{display:flex;gap:12px;align-items:center;margin-top:14px}.dashboard-clan-mark{width:48px;height:48px;border-radius:13px;display:grid;place-items:center;background:rgba(255,122,0,.12);border:1px solid rgba(255,122,0,.24);color:var(--bm-orange);font-size:20px;font-weight:900}.dashboard-clan-summary>div:last-child{display:grid;gap:3px}.dashboard-clan-summary small{color:var(--bm-text-muted)}.dashboard-clan-update{display:grid;gap:3px;margin-top:14px;padding:10px 12px;border-radius:10px;background:var(--bm-surface-raised);text-decoration:none}.dashboard-clan-update span{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--bm-orange);font-weight:800}.dashboard-clan-update strong{color:var(--bm-text);font-size:13px}.dashboard-team-chips{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:9px}.dashboard-team-chips a{display:grid;gap:2px;padding:8px 9px;border:1px solid var(--bm-border-soft);border-radius:9px;text-decoration:none}.dashboard-team-chips strong{color:var(--bm-text);font-size:12px}.dashboard-team-chips span{color:var(--bm-text-muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-empty-mini{color:var(--bm-text-muted);font-size:12px;padding:18px 0}.dashboard-empty-clan{display:grid;gap:8px}.dashboard-empty-clan strong{color:var(--bm-text)}.dashboard-empty-clan .ui-button{width:max-content;margin-top:4px}.dashboard-social-shortcuts{margin-top:14px}.dashboard-shortcut-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.dashboard-shortcut{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--bm-border-soft);border-radius:11px;text-decoration:none;background:var(--bm-surface-raised);transition:.15s}.dashboard-shortcut:hover{border-color:rgba(255,122,0,.35);transform:translateY(-1px)}.dashboard-shortcut-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:rgba(255,122,0,.1);color:var(--bm-orange)}.dashboard-shortcut-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.dashboard-shortcut>span:last-child{display:grid;gap:2px}.dashboard-shortcut strong{color:var(--bm-text);font-size:12px}.dashboard-shortcut small{color:var(--bm-text-muted);font-size:10px}

/* One visual language for every chat */
.chat-content,.clan-chat-content-v8{max-width:1120px;width:100%;margin:0 auto}.chat-panel,.clan-chat-panel-v8{background:transparent!important;border:0!important;box-shadow:none!important}.app-chat-box{border:1px solid var(--bm-border-soft)!important;background:var(--bm-surface)!important;border-radius:16px!important;padding:18px!important;gap:9px!important}.chat-message{max-width:min(72%,680px)!important;border:1px solid var(--bm-border-soft)!important;border-radius:14px!important;padding:10px 12px!important;box-shadow:none!important}.other-message{background:var(--bm-surface-raised)!important}.own-message{background:linear-gradient(145deg,rgba(255,122,0,.17),rgba(255,122,0,.09))!important;border-color:rgba(255,122,0,.25)!important}.message-meta{gap:9px!important;margin-bottom:5px!important}.message-meta>a{font-weight:800!important}.message-meta>span{font-size:10px!important;color:var(--bm-text-muted)!important}.chat-message p{line-height:1.45!important}.app-chat-input{margin-top:10px!important;padding:0!important;background:transparent!important;border:0!important;gap:8px!important}.app-chat-input input{height:46px!important;border-radius:12px!important;border:1px solid var(--bm-border-soft)!important;background:var(--bm-surface-raised)!important;color:var(--bm-text)!important;padding:0 14px!important}.emoji-button,.send-button{height:46px!important;border-radius:12px!important}.send-button{padding:0 20px!important}.room-online-card{border-radius:999px!important;background:var(--bm-surface-raised)!important;border:1px solid var(--bm-border-soft)!important}.message-reactions{width:100%;margin-top:6px!important;padding:0 3px}.own-message .message-reactions{justify-content:flex-end}.message-reaction-pill{background:var(--bm-surface-raised)!important}

.team-announcements-v21{display:grid;gap:14px}.team-announcement-create-v21{border:1px dashed var(--bm-border);border-radius:12px;padding:11px 13px}.team-announcement-create-v21 summary{cursor:pointer;color:var(--bm-orange);font-weight:800;font-size:12px}.team-announcement-create-v21 form{display:grid;gap:8px;margin-top:10px}.team-announcement-create-v21 input,.team-announcement-create-v21 textarea{border:1px solid var(--bm-border-soft);border-radius:10px;background:var(--bm-surface-raised);color:var(--bm-text);padding:10px 12px}.team-announcement-create-v21 textarea{min-height:90px;resize:vertical}.team-announcement-list-v21{display:grid;gap:8px}.team-announcement-v21{padding:13px 14px;border:1px solid var(--bm-border-soft);border-radius:12px;background:var(--bm-surface-raised)}.team-announcement-v21 p{margin:5px 0 8px;color:var(--bm-text-soft);white-space:pre-wrap}.team-announcement-v21 small{color:var(--bm-text-muted);font-size:10px}.team-announcement-v21 .reaction-row-v4{margin-top:8px}
@media(max-width:900px){.dashboard-v21-grid{grid-template-columns:1fr}.dashboard-shortcut-grid{grid-template-columns:1fr}.dashboard-team-chips{grid-template-columns:1fr}.chat-message{max-width:88%!important}}


/* =========================================================
   BashMe Chat System V3
   One visual language for match/private/clan/team chats
   ========================================================= */
.chat-panel{background:transparent!important;border:0!important;box-shadow:none!important;min-height:0}
.app-chat-box{background:var(--bm-surface-0,#0b1015)!important;border:1px solid var(--bm-border,#242d36)!important;border-radius:16px!important;padding:22px 18px!important;gap:2px!important}
.chat-message{position:relative!important;display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:9px 12px 10px 54px!important;background:transparent!important;border:0!important;border-radius:10px!important;color:#e9eef5!important;align-self:stretch!important}
.chat-message:hover{background:#111820!important}
.chat-message.own-message{background:transparent!important;border:0!important}
.chat-message.own-message:hover{background:#111820!important}
.chat-message::before{content:attr(data-avatar-letter);position:absolute;left:10px;top:11px;width:30px;height:30px;border-radius:9px;background:#1c2630;color:#ff7a00;display:grid;place-items:center;font-weight:800}
.message-meta{display:flex!important;align-items:baseline!important;gap:8px!important;margin:0 0 3px!important;font-size:12px!important}
.chat-username-link{font-weight:800!important;color:#f2f6fa!important;text-decoration:none!important}
.chat-clan-tag{color:#ff7a00!important}
.message-meta>span{color:#6f7f90!important;font-size:10px!important}
.chat-message>p{margin:0!important;color:#dce5ee!important;line-height:1.45!important;font-size:14px!important}
.chat-message-actions{position:absolute;right:12px;top:6px;display:none;gap:4px;background:#171f27;border:1px solid #2a3540;border-radius:8px;padding:3px}
.chat-message:hover .chat-message-actions{display:flex}
.chat-message-actions button{border:0;background:transparent;color:#9eacba;border-radius:6px;width:28px;height:26px;cursor:pointer;font-size:15px}
.chat-message-actions button:hover{background:#26313c;color:#fff}
.message-reactions{margin:5px 0 0!important;padding:0!important;display:flex!important;align-items:center;gap:5px;position:static!important}
.message-reaction-picker{opacity:0;pointer-events:none;display:flex;gap:3px;transition:.15s}
.chat-message:hover .message-reaction-picker{opacity:1;pointer-events:auto}
.message-reaction-picker button,.message-reaction-pill{min-width:28px;height:25px;border:1px solid #2b3742!important;background:#141c23!important;color:#cbd5df!important;border-radius:8px!important;padding:0 7px!important;cursor:pointer}
.message-reaction-pill.mine{border-color:#a85100!important;background:#2a1b10!important}
.message-reaction-counts{display:flex;gap:4px}
.chat-mention{color:#ff9a3d;background:rgba(255,122,0,.10);border-radius:4px;padding:0 2px;font-weight:700}
.chat-reply-preview,.chat-reply-inline{display:block;border-left:2px solid #ff7a00;background:#111820;border-radius:0 7px 7px 0;padding:6px 9px;margin:0 0 7px;color:#91a1b1;font-size:12px}
.chat-reply-preview strong,.chat-reply-inline strong{display:block;color:#ff9a3d;font-size:11px;margin-bottom:2px}
.chat-reply-composer{display:flex;align-items:center;justify-content:space-between;margin:0 0 7px 48px;padding:8px 10px;border:1px solid #2b3742;border-left:3px solid #ff7a00;border-radius:9px;background:#111820}
.chat-reply-composer div{display:grid;gap:1px}.chat-reply-composer span{font-size:10px;color:#778899}.chat-reply-composer strong{font-size:12px;color:#ff9a3d}.chat-reply-composer small{color:#a9b6c2;max-width:600px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-reply-composer button{border:0;background:transparent;color:#8d9aa8;font-size:20px;cursor:pointer}
.app-chat-input{position:relative!important;background:transparent!important;border:0!important;padding:10px 0 0!important;gap:8px!important}
.app-chat-input>input{height:44px!important;background:#111820!important;border:1px solid #27323d!important;border-radius:11px!important;color:#edf3f8!important;padding:0 14px!important}
.app-chat-input>input:focus{border-color:#a85100!important;box-shadow:0 0 0 3px rgba(255,122,0,.08)!important;outline:0}
.emoji-button,.chat-tool-button{height:44px!important;min-width:44px!important;border:1px solid #27323d!important;background:#151d25!important;color:#dce5ee!important;border-radius:11px!important;cursor:pointer}
.chat-tool-button{font-size:11px;font-weight:900;padding:0 10px}
.send-button{height:44px!important;border:0!important;border-radius:11px!important;background:#ff7a00!important;color:#111!important;font-weight:900!important;padding:0 20px!important}
.mention-popup{position:absolute;left:54px;bottom:58px;width:250px;padding:6px;background:#151d25;border:1px solid #2b3742;border-radius:11px;box-shadow:0 16px 40px #0008;z-index:30}
.mention-popup button{display:block;width:100%;text-align:left;border:0;background:transparent;color:#dce5ee;padding:8px 10px;border-radius:7px;cursor:pointer}.mention-popup button:hover{background:#222d37;color:#ff9a3d}
.gif-picker{position:absolute;left:52px;bottom:58px;width:380px;max-height:380px;background:#151d25;border:1px solid #2b3742;border-radius:12px;padding:10px;box-shadow:0 18px 50px #0009;z-index:31}
.gif-search-row{display:flex;gap:6px}.gif-search-row input{flex:1;background:#0e151b;border:1px solid #2b3742;border-radius:8px;color:white;padding:8px}.gif-search-row button{border:0;border-radius:8px;background:#ff7a00;font-weight:800;padding:0 12px}
.gif-results{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:8px;overflow:auto;max-height:300px}.gif-results button{border:0;background:#0e151b;border-radius:8px;overflow:hidden;padding:0;cursor:pointer}.gif-results img{width:100%;height:105px;object-fit:cover;display:block}
.chat-gif{display:block;max-width:320px;max-height:260px;border-radius:10px;margin-top:6px}
@media(max-width:700px){.chat-message{padding-left:46px!important}.chat-message::before{left:7px}.gif-picker{left:0;width:min(360px,calc(100vw - 42px))}.chat-reply-composer{margin-left:0}}


/* Chat V3.1 correctness + readability */
.chat-reply-composer[hidden],
.mention-popup[hidden],
.gif-picker[hidden] { display:none !important; }

.chat-message[data-avatar-letter]::before {
    content: attr(data-avatar-letter);
}
.chat-message:not([data-avatar-letter])::before { content:"?"; }

.chat-message .chat-reply-inline {
    max-width: 680px;
    text-decoration: none;
}
.chat-message .chat-reply-inline:hover {
    background:#151e27;
}
.chat-message:target {
    animation: bashme-message-target 1.6s ease;
}
@keyframes bashme-message-target {
    0%,35% { background:rgba(255,122,0,.13); }
    100% { background:transparent; }
}

/* =========================================================
   Design System V2 · Phase 2
   Profile / Friends / Messages / Settings
   ========================================================= */
.social-page,.profile-page,.settings-page{max-width:1120px!important}
.social-page-header{align-items:center!important;margin-bottom:24px!important;padding-bottom:22px;border-bottom:1px solid var(--bm-border-soft,var(--border-color))}
.social-page-header h1,.settings-page>h1{margin:4px 0 6px!important;font-size:clamp(30px,4vw,40px)!important;letter-spacing:-1.1px!important}
.social-page-header p,.settings-page>.page-lead{color:var(--bm-text-2,var(--text-secondary))!important;font-size:13px!important}
.social-summary-card{min-width:116px!important;padding:12px 15px!important;border-color:var(--bm-border-soft,var(--border-color))!important;border-radius:12px!important;background:var(--bm-surface-1,var(--bg-card))!important}
.social-summary-card strong{font-size:22px!important;color:var(--bm-accent,var(--accent))!important}
.social-section{margin-bottom:26px!important}
.social-section-heading{margin-bottom:10px!important}
.social-section-heading h2{font-size:15px!important;font-weight:850!important}
.social-section-heading>span{height:20px!important;min-width:20px!important;background:var(--bm-surface-2,var(--bg-input))!important}
.social-list,.conversation-list{gap:6px!important}
.social-user-card,.conversation-card,.message-request-card{min-height:66px!important;padding:10px 12px!important;border-color:var(--bm-border-soft,var(--border-color))!important;border-radius:11px!important;background:var(--bm-surface-1,var(--bg-card))!important;box-shadow:none!important}
.social-user-card:hover,.message-request-card:hover,.conversation-card:hover{transform:none!important;border-color:var(--bm-border,var(--border-color-strong))!important;background:var(--bm-surface-2,var(--bg-card-hover))!important}
.social-avatar{width:40px!important;height:40px!important;border-radius:10px!important;border-color:var(--bm-border,var(--border-color))!important;background:var(--bm-surface-2,var(--bg-input))!important}
.social-user-copy{gap:3px!important}.social-user-copy strong,.conversation-topline strong{font-size:13px!important}.social-user-copy small,.conversation-preview{font-size:11px!important}
.social-action-primary,.social-action-secondary,.social-empty-action{min-height:32px!important;padding:6px 10px!important;border-radius:8px!important;font-size:10px!important}
.social-action-primary{border-color:var(--bm-accent,var(--accent))!important;background:var(--bm-accent,var(--accent))!important}
.social-action-secondary{background:var(--bm-surface-2,var(--bg-input))!important}
.social-empty-card{padding:32px 22px!important;border-radius:12px!important;background:rgba(255,255,255,.008)}
.conversation-card{position:relative!important}.conversation-preview{color:var(--bm-text-3,var(--text-muted))!important}.conversation-topline small{font-size:9px!important}.conversation-arrow{font-size:14px!important}
.message-request-preview{color:var(--bm-text-2,var(--text-secondary))!important}

/* Profile becomes a quiet player sheet instead of a stack of unrelated cards. */
.profile-page>.back-link{margin-bottom:14px!important}
.profile-hero-card{padding:22px!important;margin-bottom:12px!important;border:1px solid var(--bm-border-soft,var(--border-color))!important;border-radius:14px!important;background:linear-gradient(120deg,var(--bm-surface-1,var(--bg-card)),rgba(255,122,0,.025))!important;box-shadow:none!important}
.profile-hero-avatar-image,.profile-hero-avatar-fallback{width:72px!important;height:72px!important;border-radius:16px!important}
.profile-hero-name-row h1{font-size:30px!important;letter-spacing:-.8px!important}
.profile-intro{margin:5px 0 8px!important;font-size:13px!important;color:var(--bm-text-2,var(--text-secondary))!important}
.profile-meta-row{font-size:11px!important}.profile-actions{gap:7px!important}.profile-actions .small-action,.profile-friend-button{min-height:34px!important;border-radius:8px!important;font-size:10px!important}
.profile-v1-grid{gap:10px!important}.profile-card{padding:18px!important;border-color:var(--bm-border-soft,var(--border-color))!important;border-radius:12px!important;background:var(--bm-surface-1,var(--bg-card))!important;box-shadow:none!important}
.profile-card .eyebrow{font-size:9px!important}.profile-card h2,.profile-card-title{font-size:15px!important;margin-top:4px!important}.profile-long-bio{font-size:13px!important;line-height:1.6!important}.profile-motto{font-size:13px!important;padding:9px 11px!important;margin-bottom:12px!important}
.profile-tag{font-size:10px!important;padding:6px 8px!important}.profile-clan-card{box-shadow:none!important}

/* Settings: same compact panels and controls as Dashboard V2. */
.settings-page{width:100%;margin:0 auto!important}.settings-page>.eyebrow{display:block;margin-bottom:2px}.settings-page>.page-lead{margin:0 0 22px!important}
.settings-card{margin-top:10px!important;padding:18px!important;border-color:var(--bm-border-soft,var(--border-color))!important;border-radius:12px!important;background:var(--bm-surface-1,var(--bg-card))!important;box-shadow:none!important}
.settings-card-heading{padding-bottom:12px;border-bottom:1px solid var(--bm-border-soft,var(--border-color))}.settings-card-heading h2{font-size:15px!important}
.settings-toggle-row{padding:14px 2px!important;border-bottom:1px solid rgba(255,255,255,.045)}.settings-toggle-row:last-of-type{border-bottom:0}.settings-toggle-row strong{font-size:12px}.settings-toggle-row small{max-width:620px;font-size:10px;line-height:1.5}.settings-toggle-row input[type="checkbox"]{width:18px!important;height:18px!important}
.settings-actions{display:flex;justify-content:flex-end;margin-top:10px!important;padding-top:12px;border-top:1px solid var(--bm-border-soft,var(--border-color))}.settings-actions .ui-button{min-height:36px!important;border-radius:8px!important;font-size:11px!important}
.settings-coming-soon{opacity:.72}.settings-coming-soon h2{font-size:14px!important}.settings-coming-soon p{font-size:11px!important;color:var(--bm-text-3,var(--text-muted))!important}

@media(max-width:760px){.social-page-header{align-items:stretch!important}.profile-hero-card{padding:16px!important}.profile-hero-main{align-items:flex-start!important}.profile-actions{width:100%;flex-wrap:wrap}.profile-v1-grid{grid-template-columns:1fr!important}}


/* =========================================================
   Social V2.1 + Clan context navigation
   ========================================================= */
.friend-card-v21 { overflow: visible; }
.friend-real-username { color: var(--bm-text-muted, #71808f); }
.friend-note-preview { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8795a3; }
.friend-favorite-star { color: #ff8a1f; margin-right: 4px; }
.friend-actions-v21 { position: relative; }
.friend-more-v21 { position: relative; }
.friend-more-v21 > summary { list-style: none; }
.friend-more-v21 > summary::-webkit-details-marker { display: none; }
.friend-more-button-v21 { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #28323c; border-radius: 9px; background: #111820; color: #9eabb7; cursor: pointer; font-weight: 800; letter-spacing: 1px; }
.friend-more-button-v21:hover { border-color: #3a4652; color: #fff; background: #172029; }
.friend-more-panel-v21 { position: absolute; z-index: 40; right: 0; top: calc(100% + 8px); width: min(360px, 82vw); padding: 14px; border: 1px solid #2a3540; border-radius: 12px; background: #111820; box-shadow: 0 18px 50px #0009; }
.friend-details-form-v21 { display: grid; gap: 11px; }
.friend-details-form-v21 label { display: grid; gap: 6px; color: #aeb9c4; font-size: 12px; font-weight: 700; }
.friend-details-form-v21 input[type=text], .friend-details-form-v21 input:not([type]), .friend-details-form-v21 textarea { width: 100%; box-sizing: border-box; border: 1px solid #2a3540; border-radius: 9px; background: #0b1117; color: #eef3f7; padding: 10px 11px; font: inherit; }
.friend-details-form-v21 textarea { min-height: 88px; resize: vertical; }
.friend-favorite-toggle-v21 { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; }
.friend-favorite-toggle-v21 input { accent-color: #ff7a00; }
.friend-menu-divider-v21 { height: 1px; background: #26313b; margin: 13px 0; }
.friend-remove-button-v21 { width: 100%; border: 0; border-radius: 8px; background: transparent; color: #e77d7d; padding: 9px 10px; text-align: left; cursor: pointer; font-weight: 700; }
.friend-remove-button-v21:hover { background: rgba(220, 75, 75, .09); color: #ff9999; }

.clan-context-nav-v2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 12px; border: 1px solid #222c35; border-radius: 11px; background: #0e141a; }
.clan-context-home-v2 { display: inline-flex; align-items: center; gap: 7px; color: #e8eef4; text-decoration: none; font-weight: 800; }
.clan-context-tag-v2 { color: #ff7a00; }
.clan-context-separator-v2 { color: #44515d; }
.clan-context-links-v2 { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.clan-context-links-v2 a, .team-context-nav-v2 a { color: #8998a7; text-decoration: none; padding: 6px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.clan-context-links-v2 a:hover, .team-context-nav-v2 a:hover { color: #fff; background: #182129; }
.team-context-wrap-v2 { margin-bottom: 18px; }
.team-context-wrap-v2 .clan-context-nav-v2 { margin-bottom: 7px; }
.team-context-nav-v2 { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 7px 10px; border-left: 2px solid #ff7a00; background: #0d1319; border-radius: 0 9px 9px 0; }
.team-context-name-v2 { color: #f0f4f8; font-size: 12px; font-weight: 900; padding: 0 8px; margin-right: 2px; }
@media (max-width: 760px) { .friend-actions-v21 { flex-wrap: wrap; } .friend-more-panel-v21 { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; } .clan-context-separator-v2 { display: none; } .clan-context-links-v2 { width: 100%; } }


/* ========================================================= UI Finish V1 */
:root{--bm-bg:#090e13;--bm-surface-0:#0b1117;--bm-surface-1:#0f161d;--bm-border:#222d37;--bm-border-strong:#303d49;--bm-text:#edf3f8;--bm-text-soft:#b2bec9;--bm-text-muted:#748392;--bm-accent:#ff7a00;--bm-accent-soft:rgba(255,122,0,.10);--bm-danger:#ef6b6b;--bm-success:#5ecf88;--bm-speed:150ms}
button,a,input,textarea,select,summary{transition:background-color var(--bm-speed),border-color var(--bm-speed),color var(--bm-speed),opacity var(--bm-speed),transform var(--bm-speed)}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--bm-accent);outline-offset:2px}
.settings-card input:not([type=checkbox]):not([type=radio]):not([type=file]),.settings-card textarea,.settings-card select,.clan-form input:not([type=file]),.clan-form textarea,.clan-form select,.stack-form input,.stack-form textarea,.stack-form select,.inline-admin-form select,.team-manage-form-v2 select,.team-manage-form-v2 input{box-sizing:border-box;width:100%;border:1px solid var(--bm-border);border-radius:8px;background:var(--bm-surface-0);color:var(--bm-text);padding:10px 11px;font:inherit}
textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#596978}
.clan-empty-v4,.social-empty-card,.empty-state-card,.social-empty-state,.chat-empty-state{border:1px dashed #2a3641!important;border-radius:11px!important;background:rgba(15,22,29,.55)!important;color:var(--bm-text-muted)!important;padding:22px!important}.clan-empty-v4 strong,.social-empty-card strong,.chat-empty-state strong{color:var(--bm-text)!important}
.clan-page,.clan-feature-page{max-width:1180px;margin:0 auto}.clan-page-header-v4{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 0 18px;padding:4px 2px 14px;border-bottom:1px solid #1d2730}.clan-page-header-v4 h1{margin:4px 0}.clan-page-header-v4 p{margin:0;color:var(--bm-text-muted)}
.clan-surface-card,.announcement-card-v4,.team-announcement-v21,.clan-member-card-v4,.clan-history-item-v4{border:1px solid var(--bm-border)!important;background:var(--bm-surface-1)!important;border-radius:11px!important;box-shadow:none!important}.clan-surface-card:hover,a.team-card:hover{border-color:#34424e!important}
.compose-card{overflow:hidden}.compose-card>summary{cursor:pointer;list-style:none;padding:13px 15px;color:var(--bm-text);font-weight:800}.compose-card>summary::-webkit-details-marker{display:none}.compose-card[open]>summary{border-bottom:1px solid var(--bm-border)}.compose-card .stack-form{padding:14px;display:grid;gap:10px}
.team-grid{gap:10px!important}.team-mark{width:38px!important;height:38px!important;border-radius:9px!important;background:var(--bm-accent-soft)!important;color:var(--bm-accent)!important;border:1px solid rgba(255,122,0,.18)}
.announcement-list-v4{display:grid;gap:10px}.announcement-card-v4{padding:16px!important}.announcement-head-v4 time{color:var(--bm-text-muted);font-size:11px}.announcement-body-v4{color:#c8d2db;line-height:1.55}
.bm-modal-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px;background:rgba(3,7,10,.74);backdrop-filter:blur(5px)}.bm-modal-backdrop[hidden]{display:none!important}.bm-modal{width:min(430px,100%);border:1px solid var(--bm-border-strong);border-radius:14px;background:#10171e;box-shadow:0 18px 50px rgba(0,0,0,.45);padding:18px}.bm-modal-kicker{color:var(--bm-accent);text-transform:uppercase;font-size:10px;font-weight:900;letter-spacing:.12em}.bm-modal h2{margin:5px 0 8px;color:var(--bm-text);font-size:20px}.bm-modal p{margin:0;color:var(--bm-text-soft);line-height:1.5}.bm-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.bm-danger-button{border:1px solid rgba(239,107,107,.28)!important;background:rgba(239,107,107,.10)!important;color:#ff9d9d!important}
.bm-toast-stack{position:fixed;z-index:1100;right:18px;bottom:18px;display:grid;gap:8px;width:min(360px,calc(100vw - 36px));pointer-events:none}.bm-toast{display:flex;gap:9px;padding:11px 12px;border:1px solid #2d3944;border-radius:10px;background:#121a21;box-shadow:0 12px 35px rgba(0,0,0,.35);color:var(--bm-text-soft);pointer-events:auto}.bm-toast strong{color:var(--bm-text);display:block;font-size:12px}.bm-toast span{font-size:11px}.bm-toast-dot{width:7px;height:7px;border-radius:50%;margin-top:5px;background:var(--bm-success);flex:0 0 auto}.bm-toast.error .bm-toast-dot{background:var(--bm-danger)}
.error-page-body{margin:0;min-height:100vh;background:var(--bm-bg);color:var(--bm-text);font-family:Arial,sans-serif;display:grid;place-items:center}.error-page{width:min(620px,calc(100% - 32px))}.error-brand{display:inline-flex;align-items:center;gap:9px;margin-bottom:14px;color:var(--bm-text);text-decoration:none;font-weight:900}.error-brand span{width:31px;height:31px;display:grid;place-items:center;border-radius:8px;background:var(--bm-accent);color:#101010}.error-card{border:1px solid var(--bm-border);border-radius:16px;background:var(--bm-surface-1);padding:34px}.error-code{color:var(--bm-accent);font-size:12px;font-weight:950;letter-spacing:.14em}.error-card h1{margin:7px 0 8px;font-size:30px}.error-card p{color:var(--bm-text-muted);line-height:1.55}.error-actions{display:flex;gap:8px;margin-top:22px;flex-wrap:wrap}
@media(max-width:760px){.main-content{padding-left:14px!important;padding-right:14px!important}.clan-page-header-v4{align-items:flex-start;flex-direction:column}.clan-context-nav-v2{display:block;overflow-x:auto;white-space:nowrap}.clan-context-links-v2{display:inline-flex;width:auto!important;flex-wrap:nowrap}.team-context-nav-v2{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap}.friend-more-panel-v21{max-height:72vh;overflow:auto}.bm-modal-actions{flex-direction:column-reverse}.bm-modal-actions .ui-button{width:100%}.error-card{padding:24px 20px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}


/* Chat/Social Finish V1 · Mentions */
.mentions-page-v1{max-width:980px;margin:0 auto}.mention-list-v1{padding:6px!important;overflow:hidden}
.mention-item-v1{display:flex;gap:12px;padding:13px;border-radius:9px;color:inherit;text-decoration:none;border:1px solid transparent}
.mention-item-v1:hover{background:#121b23;border-color:#25323d}.mention-item-v1.is-unread{background:rgba(255,122,0,.055)}
.mention-icon-v1{width:34px;height:34px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;background:rgba(255,122,0,.10);color:#ff7a00;font-weight:950}
.mention-copy-v1{min-width:0;flex:1}.mention-meta-v1{display:flex;align-items:center;gap:8px;min-width:0}.mention-meta-v1 strong{color:#edf3f8}.mention-meta-v1 span{color:#ff9a3d;font-size:11px;font-weight:800}.mention-meta-v1 time{margin-left:auto;color:#748392;font-size:10px}
.mention-copy-v1 p{margin:4px 0;color:#c4ced7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mention-copy-v1 small{color:#748392}
.chat-mention{border-radius:4px;padding:0 2px;background:rgba(255,122,0,.10);color:#ff9a3d;font-weight:750}
@media(max-width:620px){.mention-meta-v1{flex-wrap:wrap}.mention-meta-v1 time{width:100%;margin-left:0}.mention-copy-v1 p{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}

/* =========================================================
   BashMe Sticker V1.1
   ========================================================= */
.sticker-tool-button{
    font-size:22px!important;
    font-weight:700!important;
    line-height:1!important;
    color:#ff9a3d!important;
}

.sticker-picker{
    position:absolute;
    left:54px;
    bottom:58px;
    z-index:80;
    width:min(360px,calc(100vw - 32px));
    padding:12px;
    border:1px solid var(--bm-border-soft,#27323d);
    border-radius:14px;
    background:var(--bm-surface,#10171e);
    box-shadow:0 18px 50px rgba(0,0,0,.38);
}
.sticker-picker[hidden]{display:none!important}
.sticker-picker-header{margin:0 0 10px;color:var(--bm-text-muted,#91a0ad);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:300px;overflow:auto}
.sticker-option{display:flex;align-items:center;justify-content:center;aspect-ratio:1;padding:8px;border:1px solid transparent;border-radius:11px;background:var(--bm-surface-raised,#151d25);cursor:pointer;transition:transform .12s ease,border-color .12s ease,background .12s ease}
.sticker-option:hover{transform:translateY(-2px);border-color:rgba(255,122,0,.45);background:rgba(255,122,0,.08)}
.sticker-option img{display:block;width:100%;height:100%;object-fit:contain}

/* A sticker is content, not a normal chat bubble. */
.chat-message.has-chat-sticker{
    width:auto!important;
    max-width:150px!important;
    min-width:0!important;
    background:transparent!important;
    border-color:transparent!important;
    box-shadow:none!important;
    padding-top:8px!important;
    padding-right:6px!important;
    padding-bottom:4px!important;
}
.chat-message.has-chat-sticker .message-meta{margin-bottom:6px!important}
.sticker-message-content{
    display:block!important;
    width:104px!important;
    height:104px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    line-height:0!important;
    font-size:0!important;
    color:transparent!important;
}
.bashme-chat-sticker{
    display:block!important;
    width:104px!important;
    height:104px!important;
    max-width:104px!important;
    max-height:104px!important;
    object-fit:contain!important;
    user-select:none;
}

@media (max-width:640px){
    .sticker-picker{left:0;bottom:58px;width:min(340px,calc(100vw - 24px))}
    .sticker-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
    .sticker-message-content,.bashme-chat-sticker{width:92px!important;height:92px!important;max-width:92px!important;max-height:92px!important}
    .chat-message.has-chat-sticker{max-width:138px!important}
}

/* =========================================================
   BashMe Sticker V1.2 - compact chat rendering
   ========================================================= */
.chat-message.has-chat-sticker{
    width:100%!important;
    max-width:none!important;
    padding:9px 12px 8px 54px!important;
    background:transparent!important;
    border:0!important;
}
.chat-message.has-chat-sticker:hover{background:#111820!important}
.chat-message.has-chat-sticker .message-meta{margin-bottom:4px!important}
.chat-message.has-chat-sticker > p.sticker-message-content{
    display:block!important;
    width:88px!important;
    height:88px!important;
    max-width:88px!important;
    max-height:88px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    color:transparent!important;
    font-size:0!important;
    line-height:0!important;
}
.chat-message.has-chat-sticker > p.sticker-message-content::before,
.chat-message.has-chat-sticker > p.sticker-message-content::after{content:none!important;display:none!important}
.bashme-chat-sticker{
    display:block!important;
    width:88px!important;
    height:88px!important;
    max-width:88px!important;
    max-height:88px!important;
    object-fit:contain!important;
}
.sticker-picker{width:300px!important;padding:10px!important}
.sticker-grid{grid-template-columns:repeat(4,1fr)!important;gap:6px!important;max-height:250px!important}
.sticker-option{height:62px!important;aspect-ratio:auto!important;padding:5px!important}
.sticker-option img{width:52px!important;height:52px!important;object-fit:contain!important}
@media(max-width:640px){
  .chat-message.has-chat-sticker > p.sticker-message-content,.bashme-chat-sticker{width:80px!important;height:80px!important;max-width:80px!important;max-height:80px!important}
  .sticker-picker{width:min(292px,calc(100vw - 24px))!important}
}

/* =========================================================
   BashMe Sticker V1.3 - illustrated sticker pack
   ========================================================= */
.chat-message.has-chat-sticker > p.sticker-message-content,
.bashme-chat-sticker{
    width:116px!important;
    height:116px!important;
    max-width:116px!important;
    max-height:116px!important;
}
.sticker-picker{width:320px!important}
.sticker-option{height:68px!important}
.sticker-option img{width:60px!important;height:60px!important}
@media(max-width:640px){
  .chat-message.has-chat-sticker > p.sticker-message-content,
  .bashme-chat-sticker{width:104px!important;height:104px!important;max-width:104px!important;max-height:104px!important}
}


/* =========================================================
   BashMe Sticker V1.4 + compact categorized emoji picker
   ========================================================= */
.chat-message.has-chat-sticker > p.sticker-message-content,
.bashme-chat-sticker{width:120px!important;height:120px!important;max-width:120px!important;max-height:120px!important}
.sticker-picker{width:min(520px,calc(100vw - 32px))!important}
.sticker-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;max-height:250px!important}
.sticker-option{height:72px!important}.sticker-option img{width:64px!important;height:64px!important}
.chat-picker-tabs{display:flex;gap:4px;padding:8px 8px 6px;border-top:1px solid #27323d;margin-top:8px;overflow-x:auto}
.chat-picker-tab{flex:1;min-width:56px;border:0;border-radius:8px;background:transparent;color:#91a0ad;padding:7px 8px;cursor:pointer;font-size:16px}
.chat-picker-tab:hover,.chat-picker-tab.is-active{background:rgba(255,122,0,.10);color:#ff9a3d}
.emoji-picker{width:min(520px,calc(100vw - 32px))!important;max-width:none!important;padding:10px!important}
.emoji-picker .emoji-category-page{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;max-height:176px;overflow-y:auto;padding:2px}
.emoji-picker .emoji-category-page[hidden]{display:none!important}
.emoji-picker .emoji-option{width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;font-size:21px!important;border-radius:8px!important}
.emoji-picker .chat-picker-tabs{margin:8px -2px -2px}
@media(max-width:700px){.sticker-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}.emoji-picker .emoji-category-page{grid-template-columns:repeat(8,1fr)}.emoji-picker{width:min(430px,calc(100vw - 24px))!important}}
@media(max-width:480px){.sticker-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.emoji-picker .emoji-category-page{grid-template-columns:repeat(7,1fr)}.emoji-picker .emoji-option{width:38px!important;height:38px!important;min-width:38px!important}}

/* =========================================================
   BashMe Emoji Picker V1.4.1 - category layout fix
   The legacy picker is a CSS grid. V1.4 replaces its direct
   children with category pages + tab navigation, so the picker
   itself must become a normal block container.
   ========================================================= */
.emoji-picker{
    display:block!important;
    width:min(540px,calc(100vw - 32px))!important;
    max-width:none!important;
    padding:10px!important;
    gap:0!important;
    grid-template-columns:none!important;
}
.emoji-picker[hidden]{display:none!important}
.emoji-picker > div:first-child{display:block!important;width:100%!important;min-width:0!important}
.emoji-picker .emoji-category-page{
    width:100%!important;
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:repeat(10,minmax(40px,1fr))!important;
    gap:5px!important;
    max-height:178px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:2px 3px 4px!important;
}
.emoji-picker .emoji-category-page[hidden]{display:none!important}
.emoji-picker .emoji-option{
    width:100%!important;
    min-width:40px!important;
    height:40px!important;
    padding:0!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:21px!important;
    line-height:1!important;
}
.emoji-picker > .chat-picker-tabs{
    width:100%!important;
    box-sizing:border-box!important;
    display:flex!important;
    grid-column:auto!important;
    margin:8px 0 0!important;
    padding:8px 0 0!important;
}
.emoji-picker > .chat-picker-tabs .chat-picker-tab{
    flex:1 1 0!important;
}
@media(max-width:700px){
    .emoji-picker{width:min(450px,calc(100vw - 24px))!important}
    .emoji-picker .emoji-category-page{grid-template-columns:repeat(8,minmax(38px,1fr))!important}
}
@media(max-width:480px){
    .emoji-picker{width:min(390px,calc(100vw - 20px))!important}
    .emoji-picker .emoji-category-page{grid-template-columns:repeat(7,minmax(36px,1fr))!important}
    .emoji-picker .emoji-option{min-width:36px!important;height:38px!important;font-size:20px!important}
}

/* =========================================================
   Matchmaking V1
   ========================================================= */
.matchmaking-v1 { display: grid; gap: 18px; margin-bottom: 20px; }
.matchmaking-tabs { display: flex; gap: 6px; padding: 5px; width: fit-content; max-width: 100%; border: 1px solid var(--border-color, #2d3139); border-radius: 12px; background: #15171b; }
.matchmaking-tab { border: 0; border-radius: 8px; padding: 9px 14px; background: transparent; color: #9ca3af; font: inherit; font-weight: 700; cursor: pointer; }
.matchmaking-tab:hover { color: #fff; background: rgba(255,255,255,.04); }
.matchmaking-tab.is-active { color: #fff; background: #e56b1f; }
.matchmaking-page[hidden] { display: none !important; }
.matchmaking-head h2 { margin: 4px 0 4px; font-size: 1.2rem; }
.matchmaking-head p { margin: 0; }
.matchmaking-create { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(120px,.65fr) minmax(150px,.8fr) minmax(220px,1.5fr) auto; gap: 12px; align-items: end; padding: 14px; margin: 14px 0; }
.matchmaking-create label { display: grid; gap: 6px; color: #aeb4be; font-size: .82rem; font-weight: 700; }
.matchmaking-create select, .matchmaking-create input[type="text"], .matchmaking-create input:not([type]) { min-height: 40px; border: 1px solid #343944; border-radius: 8px; background: #101216; color: #fff; padding: 0 10px; }
.matchmaking-create .mm-server-check { display: flex; align-items: center; min-height: 40px; gap: 8px; }
.matchmaking-create .mm-server-check input { accent-color: #e56b1f; }
.matchmaking-list { display: grid; gap: 10px; }
.matchmaking-card { padding: 14px 16px; }
.mm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mm-card-top strong { color: #fff; }
.mm-card-top span { color: #9ca3af; }
.mm-kind { flex: 0 0 auto; border: 1px solid rgba(229,107,31,.45); border-radius: 999px; padding: 4px 9px; color: #ff9b5a !important; font-weight: 800; }
.mm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mm-tags span { border-radius: 999px; background: #20242b; color: #aeb4be; padding: 4px 8px; font-size: .76rem; }
.matchmaking-card > p { margin: 10px 0 0; color: #d6d9df; }
.mm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.mm-actions form { margin: 0; }
.mm-secondary { border: 1px solid #3a3f49; border-radius: 8px; background: transparent; color: #c8cbd1; padding: 8px 11px; cursor: pointer; }
.mm-secondary:hover { border-color: #5a606c; color: #fff; }
.mm-contact { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 8px 12px; }
@media (max-width: 1050px) { .matchmaking-create { grid-template-columns: repeat(2, minmax(0,1fr)); } .matchmaking-create .send-button, .matchmaking-create .mm-comment { grid-column: span 2; } }
@media (max-width: 640px) { .matchmaking-tabs { width: 100%; overflow-x: auto; } .matchmaking-tab { white-space: nowrap; flex: 1; } .matchmaking-create { grid-template-columns: 1fr; } .matchmaking-create .send-button, .matchmaking-create .mm-comment { grid-column: auto; } .mm-card-top { align-items: flex-start; } .mm-actions { justify-content: flex-start; flex-wrap: wrap; } }


/* =========================================================
   Matchmaking V1.1 - challenges + team completion
   ========================================================= */
.mm-actions .send-button:disabled{opacity:.58;cursor:default;filter:saturate(.55)}
.mm-challenges{margin-top:12px;padding:11px 12px;border:1px solid rgba(229,107,31,.35);border-radius:10px;background:rgba(229,107,31,.055)}
.mm-challenges>strong{display:block;margin-bottom:8px;color:#ff9b5a;font-size:.8rem;text-transform:uppercase;letter-spacing:.05em}
.mm-challenge-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:8px;border-top:1px solid rgba(255,255,255,.06)}
.mm-challenge-row:first-of-type{padding-top:0;border-top:0}
.mm-challenge-row>span{color:#d6d9df;font-size:.9rem}
.mm-challenge-row>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.mm-challenge-row form{margin:0}
@media(max-width:700px){.mm-challenge-row{align-items:flex-start;flex-direction:column}}


/* Matchmaking V1.2 - challenge notifications */
.matchmaking-tab {
    position: relative;
}

.mm-alert-badge,
.mm-sidebar-challenge-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d94343;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.mm-alert-badge[hidden],
.mm-sidebar-challenge-badge[hidden] {
    display: none !important;
}

.mm-sidebar-room-link {
    display: flex;
    align-items: center;
}

.mm-sidebar-challenge-badge {
    margin-left: auto;
}

.mm-challenges {
    border-color: rgba(217, 67, 67, 0.38);
}

/* Matchmaking V1.3 - accepted match notification + match room */
.mm-active-matches { display:grid; gap:10px; margin:0 0 14px; }
.mm-match-ready { display:flex; align-items:center; justify-content:space-between; gap:18px; text-decoration:none; padding:14px 16px; border-color:rgba(255,138,32,.34); }
.mm-match-ready.is-new { box-shadow:0 0 0 1px rgba(255,82,82,.32), 0 12px 30px rgba(0,0,0,.16); }
.mm-match-ready > div { display:grid; gap:3px; }
.mm-match-ready strong { color:var(--text-color, #f4f4f4); font-size:1rem; }
.mm-match-ready strong + small { color:var(--muted-color, #9da3ad); }
.match-room-page { padding-bottom:36px; }
.match-room-shell { width:min(1180px,100%); margin:0 auto; display:grid; gap:16px; }
.match-room-header { padding:20px; display:flex; justify-content:space-between; align-items:center; gap:20px; }
.match-room-header h1 { margin:5px 0 4px; font-size:1.55rem; }
.match-room-header h1 span { color:#ff8a20; font-weight:700; padding:0 6px; }
.match-room-grid { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:16px; align-items:start; }
.match-room-chat { padding:0; overflow:hidden; }
.match-room-chat-head { padding:16px 18px 12px; border-bottom:1px solid rgba(255,255,255,.07); }
.match-room-chat-head h2, .match-room-side h2 { margin:3px 0 0; font-size:1.05rem; }
.match-room-messages { min-height:360px; max-height:58vh; overflow:auto; padding:12px 18px; display:flex; flex-direction:column; gap:4px; }
.match-room-message { padding:9px 10px; border-radius:8px; }
.match-room-message:hover { background:rgba(255,255,255,.025); }
.match-room-message > div { display:flex; gap:9px; align-items:baseline; }
.match-room-message strong { color:#ff9a3c; font-size:.9rem; }
.match-room-message span { color:#777f8b; font-size:.75rem; }
.match-room-message p { margin:3px 0 0; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.match-room-input { display:flex; gap:10px; padding:12px 14px 14px; border-top:1px solid rgba(255,255,255,.07); }
.match-room-input input, .match-room-server input { min-width:0; flex:1; background:rgba(0,0,0,.22); color:inherit; border:1px solid rgba(255,255,255,.1); border-radius:8px; padding:10px 12px; }
.match-room-side { display:grid; gap:16px; }
.match-room-server, .match-room-teams { padding:16px; }
.match-room-server form { display:grid; gap:9px; margin-top:12px; }
.match-server-value { margin-top:12px; padding:11px 12px; border-radius:8px; background:rgba(255,138,32,.09); border:1px solid rgba(255,138,32,.22); font-family:monospace; overflow-wrap:anywhere; }
.match-room-teams { display:grid; gap:10px; }
.match-room-teams h2 { margin-bottom:4px; }
.match-room-teams a { display:grid; gap:2px; padding:10px 11px; border-radius:8px; text-decoration:none; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.06); }
.match-room-teams a strong { color:#f4f4f4; }
.match-room-teams a span { color:#8f96a2; font-size:.78rem; }
@media (max-width:900px) { .match-room-grid { grid-template-columns:1fr; } .match-room-side { grid-template-columns:1fr 1fr; } }
@media (max-width:640px) { .match-room-header, .mm-match-ready { align-items:stretch; flex-direction:column; } .match-room-side { grid-template-columns:1fr; } .match-room-input { flex-direction:column; } }

/* Matchmaking V1.4 - match room shell + dashboard/friend activity */
.match-room-page{min-width:0;padding:34px 42px 44px!important;overflow:auto}
.match-room-shell{width:min(1120px,100%);margin:0 auto;display:grid;gap:16px}
.dashboard-mm-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dashboard-mm-card{display:flex;align-items:center;gap:12px;min-width:0;padding:13px 14px;border:1px solid rgba(255,255,255,.07);border-radius:10px;background:rgba(255,255,255,.025);text-decoration:none;color:inherit}
.dashboard-mm-card:hover{border-color:rgba(255,138,32,.32);background:rgba(255,138,32,.045)}
.dashboard-mm-card.is-match{border-color:rgba(255,138,32,.24)}
.dashboard-mm-card.is-new{box-shadow:inset 3px 0 #d94343}
.dashboard-mm-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:9px;background:rgba(255,138,32,.1);color:#ff8a20;font-weight:900}
.dashboard-mm-card>span:nth-child(2){display:grid;gap:3px;min-width:0;flex:1}.dashboard-mm-card strong{color:#f4f4f4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-mm-card small{color:#8f96a2}
.friend-card-v21{flex-wrap:wrap}.friend-mm-searches{order:3;width:100%;display:flex;gap:7px;flex-wrap:wrap;padding:0 0 2px 58px}
.friend-mm-search{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:8px;border:1px solid rgba(255,138,32,.22);background:rgba(255,138,32,.055);text-decoration:none;color:inherit}
.friend-mm-search>span:last-child{display:grid;gap:1px}.friend-mm-search strong{color:#ff9a3c;font-size:.8rem}.friend-mm-search small{color:#8f96a2;font-size:.72rem}
@media(max-width:900px){.dashboard-mm-overview{grid-template-columns:1fr}.match-room-page{padding:24px 20px 36px!important}}
@media(max-width:640px){.friend-mm-searches{padding-left:0}.match-room-page{padding:18px 12px 30px!important}}


/* Matchmaking V1.5 */
.match-room-ended { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(68, 211, 122, .35); border-radius: 10px; background: rgba(68, 211, 122, .08); color: #77e59d; font-weight: 800; font-size: 13px; }
.match-room-complete { display: grid; gap: 10px; }
.match-room-complete h2 { margin: 0; }
.match-room-complete p { margin: 0; line-height: 1.45; }
.match-complete-button { width: 100%; }


/* Matchmaking V1.6 - aktive Match-Räume in der Sidebar */
.sidebar-match-divider {
    height: 1px;
    margin: 8px 10px;
    background: var(--border-color, rgba(255,255,255,.08));
}
.sidebar-match-room-link {
    font-size: .82rem;
}
.sidebar-match-room-link > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Matchmaking V1.7 – globale Hinweise */
.nav-link[data-mm-room-link] { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.dashboard-mm-alert { border-color:rgba(255,92,45,.48); box-shadow:0 0 0 1px rgba(255,92,45,.08) inset; }
.dashboard-mm-actions { display:flex; gap:8px; margin-left:auto; }
.dashboard-mm-actions form { margin:0; }
.settings-notification-state { margin:10px 0 0; color:var(--text-muted, #8e9aa7); font-size:.82rem; }

/* Account verification V1 */
.profile-verified-badge{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid rgba(72,187,120,.28);border-radius:999px;background:rgba(72,187,120,.08);color:#7bd99c;font-size:.72rem;font-weight:800;white-space:nowrap}
.verification-status{display:grid;gap:4px;margin:4px 0 14px;padding:12px 14px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.025)}
.verification-status strong{color:#d9dde4}.verification-status small{color:#8f96a2}.verification-status.is-verified{border-color:rgba(72,187,120,.25);background:rgba(72,187,120,.055)}.verification-status.is-verified strong{color:#7bd99c}
.verification-card{display:grid;gap:16px}.verification-card form{margin:0}

/* Account verification V2 - Passwort-Reset */
.login-password-help{display:flex;justify-content:flex-end;margin-top:-4px}.login-password-help a{color:#ff9a3c;font-size:.82rem;text-decoration:none}.login-password-help a:hover{text-decoration:underline}
.password-reset-card{width:min(520px,calc(100% - 32px));margin:70px auto}.password-reset-form{display:grid;gap:10px}.password-reset-form label{font-size:.82rem;font-weight:700;color:#d9dde4}.password-reset-form input{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid rgba(255,255,255,.1);border-radius:8px;background:rgba(0,0,0,.22);color:inherit}.password-reset-form .ui-button{margin-top:4px}


/* Verification badges V2 */
.bm-verified-badge{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-left:4px;border:1px solid rgba(255,138,32,.30);border-radius:999px;background:rgba(255,138,32,.09);color:#ff9a3c;font-size:.68rem;font-weight:900;line-height:1;white-space:nowrap}.bm-verified-badge.is-compact{width:17px;height:17px;padding:0}


/* Account & Social Polish V1 */
.onboarding-body{padding:32px 18px}.onboarding-card{width:min(760px,100%);max-width:760px}.onboarding-card h1{margin-bottom:8px}.onboarding-form{display:grid;gap:18px;margin-top:24px}.onboarding-options{border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:14px}.onboarding-options legend{padding:0 7px;color:#f3f3f3;font-weight:800}.onboarding-check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}.onboarding-actions{display:flex;justify-content:flex-end}.onboarding-skip{width:100%;margin-top:10px}.message-request-notice:not(.pending) strong{color:#7fd18b}@media(max-width:640px){.onboarding-check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Chat alignment + matchmaking system messages */
.app-chat-box .chat-message.own-message,
.clan-chat-panel-v8 .chat-message.own-message,
.match-room-chat .chat-message.own-message {
    width: min(72%, 680px)!important;
    max-width: min(72%, 680px)!important;
    align-self: flex-end!important;
    margin-left: auto!important;
    margin-right: 0!important;
    padding: 9px 54px 10px 12px!important;
    background: rgba(255,122,0,.075)!important;
    border: 1px solid rgba(255,122,0,.13)!important;
}
.app-chat-box .chat-message.own-message::before,
.clan-chat-panel-v8 .chat-message.own-message::before,
.match-room-chat .chat-message.own-message::before { left:auto!important; right:10px!important; }
.chat-message.own-message .message-meta { justify-content:flex-end!important; padding-right:36px; }
.chat-message.own-message > p { text-align:right; }
.chat-message.system-message {
    width:auto!important; max-width:92%!important; align-self:center!important; margin:5px auto!important;
    padding:7px 12px!important; border:1px solid rgba(255,122,0,.16)!important;
    border-radius:999px!important; background:rgba(255,122,0,.055)!important;
}
.chat-message.system-message::before { display:none!important; content:none!important; }
.system-message-content { display:flex; align-items:center; justify-content:center; gap:7px; color:#aeb9c5; font-size:12px; text-align:center; }
.system-message-icon { color:#ff8a20; font-size:12px; }
.chat-message.system-message .chat-message-actions, .chat-message.system-message .message-reactions { display:none!important; }
@media(max-width:700px){
  .app-chat-box .chat-message.own-message,.clan-chat-panel-v8 .chat-message.own-message,.match-room-chat .chat-message.own-message{width:88%!important;max-width:88%!important;padding-right:46px!important}
}

/* Match room: eigene Nachrichten rechts */
.match-room-message.is-own {
    width:min(72%,680px);
    align-self:flex-end;
    margin-left:auto;
    background:rgba(255,122,0,.075);
    border:1px solid rgba(255,122,0,.13);
}
.match-room-message.is-own > div { justify-content:flex-end; }
.match-room-message.is-own p { text-align:right; }
@media(max-width:700px){.match-room-message.is-own{width:88%;}}


/* UI & Chat Polish V2.1 - actual chat DOM */
/* Die spaeten V3-Regeln hatten die alten Bubble-Regeln ueberschrieben.
   Diese Regeln zielen auf die wirklich verwendeten .chat-message Elemente. */
.app-chat-box{
    align-items:stretch!important;
}
.app-chat-box .chat-message:not(.system-message),
.clan-chat-panel-v8 .chat-message:not(.system-message){
    position:relative!important;
    display:block!important;
    width:fit-content!important;
    max-width:min(65%,680px)!important;
    min-width:0!important;
    align-self:flex-start!important;
    margin:5px 0!important;
    padding:10px 12px 10px 54px!important;
    border:1px solid rgba(255,255,255,.075)!important;
    border-radius:14px 14px 14px 5px!important;
    background:#151c23!important;
    box-sizing:border-box!important;
}
.app-chat-box .chat-message:not(.system-message):hover,
.clan-chat-panel-v8 .chat-message:not(.system-message):hover{
    background:#182129!important;
}
.app-chat-box .chat-message.own-message,
.clan-chat-panel-v8 .chat-message.own-message{
    width:fit-content!important;
    max-width:min(65%,680px)!important;
    align-self:flex-end!important;
    margin-left:auto!important;
    margin-right:0!important;
    padding:10px 54px 10px 12px!important;
    border:1px solid rgba(255,122,0,.20)!important;
    border-radius:14px 14px 5px 14px!important;
    background:rgba(255,122,0,.09)!important;
}
.app-chat-box .chat-message.own-message:hover,
.clan-chat-panel-v8 .chat-message.own-message:hover{
    background:rgba(255,122,0,.12)!important;
}
.app-chat-box .chat-message.own-message::before,
.clan-chat-panel-v8 .chat-message.own-message::before{
    left:auto!important;
    right:10px!important;
}
.app-chat-box .chat-message.other-message::before,
.clan-chat-panel-v8 .chat-message.other-message::before{
    left:10px!important;
    right:auto!important;
}
.chat-message.own-message .message-meta{
    justify-content:flex-end!important;
    padding-right:36px!important;
    padding-left:0!important;
}
.chat-message.other-message .message-meta{
    justify-content:flex-start!important;
}
.chat-message.own-message > p{
    text-align:right!important;
}
.chat-message.other-message > p{
    text-align:left!important;
}
.chat-message.has-chat-sticker{
    width:fit-content!important;
    max-width:150px!important;
    background:transparent!important;
    border-color:transparent!important;
}
.chat-message.system-message{
    align-self:center!important;
}

/* Profil: Herkunft wirklich als Flagge statt als Kuerzel. */
.profile-country-badge{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:28px!important;
    padding:3px 5px!important;
    border:0!important;
    background:transparent!important;
    font-size:22px!important;
    line-height:1!important;
    letter-spacing:0!important;
}

/* Sidebar: gleiche Grundhoehe und Badge-Ausrichtung fuer alle Navigationseintraege. */
.sidebar-nav-link,
.sidebar-link,
.sidebar a.sidebar-nav-link{
    min-height:34px;
    align-items:center;
}
.sidebar-badge{
    margin-left:auto!important;
}

@media(max-width:700px){
    .app-chat-box .chat-message:not(.system-message),
    .clan-chat-panel-v8 .chat-message:not(.system-message),
    .app-chat-box .chat-message.own-message,
    .clan-chat-panel-v8 .chat-message.own-message{
        max-width:86%!important;
    }
}


/* UI & Community Polish V3 */
.profile-country-badge{padding:0!important;background:transparent!important;border:0!important;min-width:0!important}
.profile-country-flag-image{display:block;width:26px;height:18px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(255,255,255,.12)}
.profile-country-flag-inline{display:inline-block;width:18px;height:13px;object-fit:cover;border-radius:2px;vertical-align:-2px;margin-right:3px}

/* Name steht separat; Datum darunter. Nur der eigentliche Inhalt wirkt als Bubble. */
.app-chat-box .chat-message:not(.system-message),
.clan-chat-panel-v8 .chat-message:not(.system-message){
    width:fit-content!important;
    max-width:min(68%,680px)!important;
    padding:8px 10px 9px 48px!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
}
.app-chat-box .chat-message.own-message,
.clan-chat-panel-v8 .chat-message.own-message{
    padding:8px 48px 9px 10px!important;
    background:transparent!important;
    border:0!important;
}
.chat-message:not(.system-message) .message-meta{
    display:grid!important;
    grid-template-columns:auto!important;
    gap:2px!important;
    margin:0 0 5px!important;
}
.chat-message.own-message .message-meta{justify-items:end!important;padding:0!important}
.chat-message.other-message .message-meta{justify-items:start!important}
.chat-message .message-meta > span{
    display:block!important;
    font-size:9px!important;
    line-height:1.2!important;
    opacity:.65!important;
}
.chat-message:not(.system-message) > p:not(.sticker-message-content){
    display:block!important;
    width:fit-content!important;
    max-width:100%!important;
    margin:0!important;
    padding:7px 10px!important;
    border:1px solid rgba(255,255,255,.075)!important;
    border-radius:11px 11px 11px 4px!important;
    background:#151c23!important;
    text-align:left!important;
    overflow-wrap:anywhere!important;
}
.chat-message.own-message > p:not(.sticker-message-content){
    margin-left:auto!important;
    border-color:rgba(255,122,0,.22)!important;
    border-radius:11px 11px 4px 11px!important;
    background:rgba(255,122,0,.10)!important;
}

/* Sticker bewusst frei und kleiner: keine Bubble, kein riesiger Block. */
.app-chat-box .chat-message.has-chat-sticker,
.clan-chat-panel-v8 .chat-message.has-chat-sticker{
    width:fit-content!important;
    max-width:150px!important;
    padding-top:6px!important;
    background:transparent!important;
    border:0!important;
}
.chat-message.has-chat-sticker > p.sticker-message-content{
    width:92px!important;
    height:92px!important;
    max-width:92px!important;
    max-height:92px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
}
.chat-message.has-chat-sticker .bashme-chat-sticker{
    width:92px!important;
    height:92px!important;
    max-width:92px!important;
    max-height:92px!important;
}
.chat-message.has-chat-sticker .message-meta{margin-bottom:2px!important}
.chat-message.system-message{max-width:80%!important}

/* Community placeholders */
.community-page{padding-top:34px;padding-bottom:44px}
.community-placeholder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}
.community-placeholder-card{padding:20px}
.community-placeholder-card h2{margin:6px 0 8px}
.community-placeholder-card p{color:var(--bm-text-muted);line-height:1.55}
.community-planned{display:inline-flex;margin-top:12px;padding:5px 8px;border-radius:999px;background:rgba(255,122,0,.08);color:#ff9a3c;font-size:11px;font-weight:800}
@media(max-width:760px){.community-placeholder-grid{grid-template-columns:1fr}.app-chat-box .chat-message:not(.system-message),.clan-chat-panel-v8 .chat-message:not(.system-message){max-width:88%!important}}


/* CSS News */
.css-news-panel{grid-column:1/-1;padding:24px}.css-news-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.css-news-heading h2{margin:4px 0 0}.css-news-source{font-size:.78rem;opacity:.62;white-space:nowrap}.css-news-list{display:grid;gap:12px}.css-news-item{padding:18px;border:1px solid var(--border-color,rgba(255,255,255,.08));border-radius:14px;background:rgba(255,255,255,.025)}.css-news-item h3{margin:7px 0 8px;font-size:1.04rem}.css-news-item h3 a{color:inherit;text-decoration:none}.css-news-item h3 a:hover{text-decoration:underline}.css-news-item p{margin:0 0 10px;line-height:1.55;opacity:.78}.css-news-meta{display:flex;gap:10px;font-size:.76rem;opacity:.55}.css-news-link{font-size:.82rem;font-weight:700;text-decoration:none}.css-news-empty{padding:20px;border:1px dashed var(--border-color,rgba(255,255,255,.12));border-radius:14px}.css-news-empty p{margin:6px 0 0;opacity:.7}@media(max-width:720px){.css-news-panel{padding:18px}.css-news-heading{display:block}.css-news-source{display:block;margin-top:8px}}

/* Mobile off-canvas navigation */
.topbar-brand-group{display:flex;align-items:center;gap:12px}.mobile-sidebar-toggle,.mobile-sidebar-close{display:none}.mobile-sidebar-overlay{display:none}
@media(max-width:900px){
  .topbar{padding:0 16px}.topbar-brand-group{min-width:0}.brand{gap:8px}.online-pill{display:none}
  .mobile-sidebar-toggle{width:38px;height:38px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:0 0 auto;border:1px solid var(--border-color);border-radius:10px;background:var(--bg-card);color:var(--text-primary);cursor:pointer}
  .mobile-sidebar-toggle span{width:17px;height:2px;border-radius:2px;background:currentColor;transition:transform .18s ease,opacity .18s ease}
  .mobile-sidebar-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .mobile-sidebar-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
  .mobile-sidebar-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
  .sidebar{display:flex!important;position:fixed!important;z-index:60;top:0!important;left:0;width:min(84vw,300px);height:100dvh!important;grid-row:auto!important;padding:0 14px 18px;overflow-y:auto;transform:translateX(-105%);transition:transform .22s ease;box-shadow:18px 0 50px rgba(0,0,0,.34)}
  .sidebar.is-mobile-open{transform:translateX(0)}
  .mobile-sidebar-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;min-height:64px;margin:0 -14px 18px;padding:0 14px;background:#0d1217;border-bottom:1px solid var(--border-color)}
  .mobile-sidebar-head strong{font-size:14px}.mobile-sidebar-close{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border-color);border-radius:10px;background:var(--bg-card);color:var(--text-primary);font-size:24px;line-height:1;cursor:pointer}
  .mobile-sidebar-overlay{position:fixed;z-index:50;inset:0;display:block;background:rgba(0,0,0,.58);backdrop-filter:blur(2px)}
  .mobile-sidebar-overlay[hidden]{display:none}.mobile-sidebar-open{overflow:hidden}
}
@media(min-width:901px){.mobile-sidebar-head{display:none}}

/* BashMe News */
.bashme-news-panel{grid-column:1/-1;padding:24px}.bashme-news-list{display:grid;gap:12px}.bashme-news-item{padding:18px;border:1px solid var(--border-color,rgba(255,255,255,.08));border-radius:14px;background:rgba(255,255,255,.025)}.bashme-news-item h3{margin:7px 0 9px;font-size:1.08rem}.bashme-news-item p{margin:0 0 9px;line-height:1.6;opacity:.8}.bashme-news-item p:last-child{margin-bottom:0}@media(max-width:720px){.bashme-news-panel{padding:18px}}

/* Mobile navigation hotfix v2: robust iOS layout + explicit icon rendering */
@media (max-width: 900px) {
  .topbar {display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;min-height:var(--topbar-height)!important;padding:0 16px!important}
  .topbar-brand-group {display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:10px!important;width:auto!important;min-width:0!important}
  .topbar-brand-group .brand {display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;width:auto!important;min-width:0!important}
  .mobile-sidebar-toggle {appearance:none!important;-webkit-appearance:none!important;box-sizing:border-box!important;position:relative!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;margin:0!important;display:inline-flex!important;flex:0 0 40px!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;border:1px solid #2a3540!important;border-radius:10px!important;background:#151c23!important;color:#e9eef4!important;box-shadow:none!important;cursor:pointer!important;touch-action:manipulation;z-index:2}
  .mobile-sidebar-toggle span {display:block!important;width:18px!important;height:2px!important;min-height:2px!important;margin:0!important;padding:0!important;border:0!important;border-radius:999px!important;background:#e9eef4!important}
  .topbar-actions {flex:0 0 auto!important}
}
