/* ── Design tokens ───────────────────────────────────────── */
:root {
    --vc-bg: #0a0c0b;
    --vc-bg-soft: #101412;
    --vc-surface: #161b18;
    --vc-surface-hover: #1d2420;
    --vc-surface-raised: #202824;
    --vc-border: rgba(255, 255, 255, 0.07);
    --vc-border-strong: rgba(255, 255, 255, 0.12);
    --vc-text: #f1f3f0;
    --vc-text-secondary: #a8b3a8;
    --vc-text-muted: #6f7d72;
    /* Brass / vault gold. Other palettes override these on html[data-theme]. */
    --vc-accent-rgb: 196 146 63;
    --vc-accent: rgb(var(--vc-accent-rgb));
    --vc-accent-hover: #e0b45a;
    --vc-accent-soft: #f0d5a8;
    --vc-accent-ink: #1c1410;
    --vc-accent-deep: #8b6a32;
    --vc-accent-deeper: #5c4520;
    --vc-accent-muted: rgb(var(--vc-accent-rgb) / 0.16);
    --vc-accent-glow: rgb(var(--vc-accent-rgb) / 0.28);
    --vc-accent-border: rgb(var(--vc-accent-rgb) / 0.32);
    --vc-success: #34d399;
    --vc-danger: #f87171;
    --vc-danger-bg: rgba(248, 113, 113, 0.1);
    --vc-warning: #fbbf24;
    --vc-warning-bg: rgba(251, 191, 36, 0.1);
    --vc-radius: 14px;
    --vc-radius-sm: 10px;
    --vc-radius-xs: 6px;
    --vc-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --vc-sidebar-width: 260px;
    --vc-sidebar-collapsed-width: 4.75rem;
    --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--vc-text);
    background:
        radial-gradient(ellipse 80% 55% at 50% -20%, rgb(var(--vc-accent-rgb) / 0.11), transparent),
        radial-gradient(ellipse 45% 40% at 100% 0%, rgba(52, 211, 153, 0.05), transparent),
        var(--vc-bg);
    min-height: 100vh;
}

h1, h2, h3, h4 {
    margin: 0 0 0.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

a {
    color: var(--vc-accent-hover);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--vc-accent-soft);
}

code {
    font-family: var(--font-mono);
    font-size: 0.82em;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--vc-sidebar-width);
    flex-shrink: 0;
    background:
        linear-gradient(180deg, rgb(var(--vc-accent-rgb) / 0.08), transparent 30%),
        linear-gradient(180deg, rgba(16, 20, 18, 0.97), rgba(10, 12, 11, 0.99));
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--vc-border);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

html.sidebar-animate .sidebar {
    transition: width 0.2s ease;
}

.sidebar:has(.sidebar-inner.is-collapsed),
html.sidebar-collapsed .sidebar {
    width: var(--vc-sidebar-collapsed-width);
}

@media (min-width: 769px) {
    html.sidebar-collapsed .sidebar-inner {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    html.sidebar-collapsed .sidebar-inner .sidebar-top {
        flex-direction: column;
        align-items: center;
        gap: 0.55rem;
        margin: 0 0 0.85rem;
    }

    html.sidebar-collapsed .sidebar-inner .brand {
        justify-content: center;
        padding: 0.35rem;
        flex: 0 0 auto;
    }

    html.sidebar-collapsed .sidebar-inner .brand-text,
    html.sidebar-collapsed .sidebar-inner .nav-section-label,
    html.sidebar-collapsed .sidebar-inner .nav-link-label,
    html.sidebar-collapsed .sidebar-inner .theme-swatch-name {
        display: none;
    }

    html.sidebar-collapsed .sidebar-inner .nav-link,
    html.sidebar-collapsed .sidebar-inner .mention-inbox > button.nav-link {
        justify-content: center;
        gap: 0;
        padding: 0.4rem;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        background:
            linear-gradient(90deg, rgb(var(--vc-accent-rgb) / 0.08), transparent 55%),
            rgba(16, 20, 18, 0.97);
        transition: none;
    }

    html.sidebar-animate .sidebar,
    .sidebar:has(.sidebar-inner.is-collapsed),
    html.sidebar-collapsed .sidebar {
        width: 100%;
        transition: none;
    }
}

/* ── Typography utilities ────────────────────────────────── */
.text-muted { color: var(--vc-text-muted); }
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.15rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--vc-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn:not(:disabled):active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(180deg, var(--vc-accent-hover) 0%, var(--vc-accent) 100%);
    color: var(--vc-accent-ink);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px var(--vc-accent-glow);
}

.btn-primary:not(:disabled):hover {
    background: linear-gradient(180deg, var(--vc-accent-soft) 0%, var(--vc-accent-hover) 100%);
    color: var(--vc-accent-ink);
    box-shadow: 0 4px 20px var(--vc-accent-glow);
}

.btn-secondary {
    background: var(--vc-surface-raised);
    color: var(--vc-text-secondary);
    border-color: var(--vc-border-strong);
}

.btn-secondary:not(:disabled):hover {
    background: var(--vc-surface-hover);
    color: var(--vc-text);
}

.btn-outline {
    background: transparent;
    color: var(--vc-text-secondary);
    border-color: var(--vc-border-strong);
}

.btn-outline:not(:disabled):hover {
    background: var(--vc-surface-hover);
    color: var(--vc-text);
    border-color: var(--vc-text-muted);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
}

.btn-danger:not(:disabled):hover {
    background: rgba(248, 113, 113, 0.22);
    color: #fff;
    border-color: rgba(248, 113, 113, 0.55);
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 0.9375rem;
    border-radius: var(--vc-radius-sm);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.w-full { width: 100%; }

/* ── Forms ───────────────────────────────────────────────── */
.form-field {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--vc-text-secondary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--vc-text);
    background: var(--vc-bg-soft);
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: var(--vc-text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--vc-accent);
    box-shadow: 0 0 0 3px var(--vc-accent-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 4.5rem;
}

.form-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--vc-text-muted);
}

.validation-message {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--vc-danger);
}

.valid.modified:not([type=checkbox]) {
    border-color: var(--vc-success);
}

.invalid {
    border-color: var(--vc-danger);
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--vc-radius-sm);
    font-size: 0.875rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-danger {
    background: var(--vc-danger-bg);
    border-color: rgba(248, 113, 113, 0.25);
    color: #fca5a5;
}

.alert-warning {
    background: var(--vc-warning-bg);
    border-color: rgba(251, 191, 36, 0.25);
    color: #fcd34d;
}

.alert-inset {
    flex-shrink: 0;
    margin: 0 1rem 0;
}

/* ── Layout utilities ────────────────────────────────────── */
.row-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.join-row {
    display: flex;
    gap: 0.5rem;
}

.join-row .form-control {
    flex: 1;
    min-width: 0;
}

.panel-spaced {
    margin-bottom: 1.25rem;
}

/* ── Cards & panels ──────────────────────────────────────── */
.panel,
.auth-card,
.group-card,
.empty-state,
.feature-grid article {
    background: var(--vc-surface);
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius);
}

.panel,
.empty-state {
    padding: 1.35rem 1.5rem;
}

/* ── Home / hero ─────────────────────────────────────────── */
.hero {
    position: relative;
    margin-bottom: 2.5rem;
    padding: clamp(2rem, 5vw, 3rem);
    border-radius: calc(var(--vc-radius) + 4px);
    background:
        radial-gradient(circle at 85% 15%, rgb(var(--vc-accent-rgb) / 0.2), transparent 45%),
        radial-gradient(circle at 10% 80%, rgba(52, 211, 153, 0.1), transparent 40%),
        linear-gradient(160deg, var(--vc-surface) 0%, var(--vc-bg-soft) 100%);
    border: 1px solid var(--vc-border);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.hero-brand-img {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 10px 28px rgba(0, 0, 0, 0.35);
}

.hero-brand-name {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--vc-accent-muted);
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.25);
    color: var(--vc-accent-soft);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 16ch;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 52ch;
    color: var(--vc-text-secondary);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-download-meta {
    margin-top: 0.85rem;
    font-size: 0.875rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.feature-grid article {
    padding: 1.5rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-grid article:hover {
    border-color: var(--vc-border-strong);
    transform: translateY(-2px);
}

.feature-grid h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-grid p {
    margin: 0;
    color: var(--vc-text-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

.feature-grid article::before {
    content: '';
    display: block;
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: var(--vc-accent-muted);
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.2);
}

/* ── Auth ────────────────────────────────────────────────── */
.auth-card {
    max-width: 400px;
    margin: 2.5rem auto;
    padding: 2rem 2rem 1.75rem;
    box-shadow: var(--vc-shadow);
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.auth-card > p.text-muted {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.auth-card > p:last-child {
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--vc-text-muted);
    text-align: center;
}

.auth-desktop-download {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--vc-text-muted);
}

.auth-reset-link {
    display: block;
    margin-top: 0.65rem;
    word-break: break-all;
}

.auth-desktop-download a {
    color: var(--vc-text-secondary);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.auth-desktop-download a:hover {
    color: var(--vc-text);
}

.auth-required {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
    padding: 2rem;
}

.auth-required p {
    color: var(--vc-text-muted);
    margin-bottom: 1.5rem;
}

/* ── Groups page ─────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header p {
    margin: 0;
    font-size: 0.9rem;
}

.group-list {
    display: grid;
    gap: 0.65rem;
}

.group-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.1rem 1.35rem;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.group-card:hover {
    border-color: rgb(var(--vc-accent-rgb) / 0.4);
    background: var(--vc-surface-hover);
    transform: translateX(3px);
}

.group-card.is-unread-muted {
    opacity: 0.88;
}

.group-card.is-mentions-only {
    opacity: 0.96;
}

.group-card-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
}

.group-card-link:hover {
    color: inherit;
}

.group-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-self: flex-start;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(6, 8, 7, 0.72);
    backdrop-filter: blur(6px);
}

.modal-backdrop[data-share-options] {
    z-index: 20000;
    pointer-events: auto;
}

.modal-panel {
    width: min(100%, 28rem);
    padding: 1.4rem 1.45rem 1.25rem;
    border-radius: var(--vc-radius);
    background: var(--vc-surface-raised);
    border: 1px solid var(--vc-border-strong);
    box-shadow: var(--vc-shadow);
}

.modal-title {
    margin: 0 0 0.65rem;
    font-size: 1.2rem;
}

.modal-body {
    margin: 0 0 1.15rem;
    color: var(--vc-text-secondary);
    font-size: 0.9rem;
}

.modal-check-stack {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0.85rem 0 1.15rem;
}

.modal-check-stack .modal-check {
    margin: 0;
}

.modal-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0.85rem 0 1.15rem;
    color: var(--vc-text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

.modal-check input {
    margin-top: 0.2rem;
    accent-color: var(--vc-accent);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.group-card-main {
    min-width: 0;
}

.group-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.2rem;
}

.group-card h3 {
    margin: 0;
    font-size: 1rem;
}

.group-unread-badge {
    flex-shrink: 0;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.group-muted-badge,
.group-mentions-badge {
    flex-shrink: 0;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: var(--vc-text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.group-mentions-badge {
    background: rgb(var(--vc-accent-rgb) / 0.22);
    color: #e8c27a;
}

.group-card p {
    margin: 0;
    color: var(--vc-text-muted);
    font-size: 0.85rem;
}

.group-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--vc-text-muted);
    flex-shrink: 0;
}

.group-id {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--vc-accent-soft);
    background: var(--vc-accent-muted);
    padding: 0.2rem 0.45rem;
    border-radius: var(--vc-radius-xs);
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.2);
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--vc-text-muted);
    margin-bottom: 1.25rem;
}

.loading-text {
    color: var(--vc-text-muted);
    font-size: 0.9rem;
}

/* ── Chat ────────────────────────────────────────────────── */
.chat-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 1.5rem);
    background: var(--vc-surface);
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius);
    overflow: hidden;
    box-shadow: var(--vc-shadow);
}

.chat-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.15rem;
    border-bottom: 1px solid var(--vc-border);
    background: rgba(9, 11, 16, 0.5);
    min-height: 3.5rem;
}

.chat-header-main {
    min-width: 0;
    flex: 1;
}

.chat-header h1 {
    margin: 0.1rem 0 0;
    font-size: 1.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-desc {
    margin: 0.15rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42ch;
    font-size: 0.8rem;
}

.chat-header-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-mobile-chip,
.mobile-sheet-bar,
.mobile-sheet-backdrop {
    display: none;
}

.chat-header-more {
    display: block;
    position: relative;
}

.chat-more-btn {
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--vc-border-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--vc-text-secondary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chat-more-btn:hover,
.chat-more-btn:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    color: var(--vc-text);
    outline: none;
}

.chat-more-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 50;
    min-width: 12.5rem;
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--vc-border);
    background: var(--vc-surface-raised);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.chat-more-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--vc-text-secondary);
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.chat-more-item:hover:not(:disabled),
.chat-more-item:focus-visible:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vc-text);
    outline: none;
}

.chat-more-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-more-item-danger {
    color: #f0a8a8;
}

.chat-more-item-danger:hover:not(:disabled),
.chat-more-item-danger:focus-visible:not(:disabled) {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.chat-more-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.chat-more-submenu-chevron {
    font-size: 0.7rem;
    opacity: 0.7;
}

.chat-more-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0 0.15rem 0.2rem 0.45rem;
    padding-left: 0.35rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-more-hint {
    margin: 0.15rem 0.2rem 0.25rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--vc-text-muted);
}

.chat-more-subitem {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.chat-more-subitem.is-selected {
    color: var(--vc-text);
}

.chat-more-check {
    width: 0.9rem;
    flex-shrink: 0;
    font-weight: 700;
    color: var(--vc-accent, #e8c27a);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--vc-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 0;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--vc-text-secondary);
}

.chat-header-meta {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--vc-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.2rem 0.15rem;
}

button.chat-header-meta {
    margin: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    border-radius: 6px;
}

button.chat-header-meta:hover,
button.chat-header-meta:focus-visible {
    color: var(--vc-text-secondary);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

button.chat-header-meta.is-collapsed {
    color: var(--vc-accent-soft, var(--vc-text-secondary));
}

.chat-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(200px, 240px);
}

.chat-body.is-direct {
    grid-template-columns: minmax(0, 1fr);
}

.members-sidebar-toolbar,
.channels-sidebar-toolbar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.members-sidebar-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "collapse cluster"
        "online online";
    align-items: center;
    column-gap: 0.3rem;
    row-gap: 0.2rem;
}

.members-sidebar-toolbar .members-panel-collapse-btn {
    grid-area: collapse;
    justify-self: start;
}

.members-toolbar-end {
    grid-area: cluster;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    min-width: 0;
}

.members-toolbar-end .voice-sidebar-header.is-toggle {
    width: auto;
    flex: 0 0 auto;
}

.members-sidebar-toolbar .voice-sidebar-header,
.channels-sidebar-toolbar .voice-sidebar-heading {
    flex: 1;
    min-width: 0;
}

.members-online-toggle {
    grid-area: online;
    justify-self: end;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.members-sidebar.is-slot-left .members-sidebar-toolbar {
    grid-template-areas:
        "cluster collapse"
        "online online";
}

.members-sidebar.is-slot-left .members-toolbar-end {
    justify-content: flex-start;
}

.members-sidebar.is-slot-left .members-online-toggle {
    justify-self: start;
}

.members-panel-collapse-btn,
.channels-panel-collapse-btn {
    display: none;
}

.voice-sidebar,
.members-sidebar {
    background: rgba(9, 11, 16, 0.45);
    padding: 0.9rem 0.85rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.voice-sidebar-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.voice-sidebar-header.is-toggle {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    align-items: center;
}

.voice-sidebar-header h2,
.voice-sidebar-heading {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vc-text-muted);
}

.voice-sidebar-header.is-toggle:hover .voice-sidebar-heading {
    color: var(--vc-text-secondary);
}

.voice-sidebar-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.26rem 0.22rem 0;
    border-color: var(--vc-text-muted) transparent transparent;
    transition: transform 0.15s ease;
}

.voice-sidebar-header.is-toggle[aria-expanded="false"] .voice-sidebar-chevron {
    transform: rotate(-90deg);
}

.voice-sidebar-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--vc-text-muted);
}

.text-channel {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--vc-radius-sm);
    background: transparent;
    color: var(--vc-text);
    padding: 0.4rem 0.55rem;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.text-channel:hover {
    background: rgba(255, 255, 255, 0.04);
}

.text-channel.active {
    background: rgba(255, 255, 255, 0.09);
    color: var(--vc-text);
}

.text-channel.active .text-channel-hash {
    color: var(--vc-text-secondary);
}

.text-channel:disabled {
    opacity: 0.7;
    cursor: wait;
}

.text-channel-hash {
    color: var(--vc-text-muted);
    font-weight: 600;
}

.text-channel strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.voice-channel {
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.7rem 0.75rem;
}

.voice-channel.active {
    border-color: var(--vc-border-strong);
    background: rgba(255, 255, 255, 0.02);
}

.voice-channel-row {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.voice-channel-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    font-size: 0.92rem;
}

.voice-channel-title .voice-more {
    margin-left: 0.35rem;
}

.voice-channel-count {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--vc-text-muted);
    white-space: nowrap;
}

.voice-channel-title .voice-more-menu {
    left: auto;
    right: 0;
}

.voice-channel-icon {
    opacity: 0.85;
}

.voice-channel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.voice-leave {
    margin-top: 0.55rem;
}

.voice-music {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.voice-music-now {
    margin: 0.45rem 0 0;
    color: var(--vc-text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

.now-playing {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.now-playing-track {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.15rem 0.15rem 0;
}

.now-playing-channel,
.now-playing-idle {
    margin: 0;
    color: var(--vc-text-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.now-playing-fields {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
}

.now-playing-fields div {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.now-playing-fields dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vc-text-muted);
}

.now-playing-fields dd {
    margin: 0;
    color: var(--vc-text);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.voice-music-request {
    display: flex;
    gap: 0.35rem;
}

.voice-music-query {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--vc-border-strong);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--vc-text);
    font: inherit;
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
}

.voice-music-queue {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--vc-text-muted);
    font-size: 0.75rem;
}

.voice-music-error,
.voice-music-hint {
    margin: 0;
    color: var(--vc-text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.voice-music-error {
    color: #e7b3b3;
}

.voice-more {
    position: relative;
}

.voice-more-btn {
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 1px solid var(--vc-border-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--vc-text-secondary);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.voice-more-btn:hover,
.voice-more-btn:focus-visible,
.voice-more-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.07);
    color: var(--vc-text);
    outline: none;
}

.voice-more-menu {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    z-index: 60;
    min-width: 12.5rem;
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--vc-border);
    background: var(--vc-surface-raised);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.voice-more-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    color: var(--vc-text);
    font-size: 0.85rem;
    cursor: pointer;
}

.voice-more-check:hover {
    background: rgba(255, 255, 255, 0.06);
}

.voice-more-check input {
    margin: 0;
    accent-color: var(--vc-accent, #7c5cff);
}

.voice-empty {
    margin: 0.55rem 0 0;
    font-size: 0.75rem;
    color: var(--vc-text-muted);
}

.voice-participant-list {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.voice-participant {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--vc-text-secondary);
    padding: 0.4rem 0.45rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.voice-participant.me {
    color: var(--vc-text);
}

.voice-participant.speaking {
    color: #ecfdf5;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(74, 222, 128, 0.45);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.12), 0 0 14px rgba(34, 197, 94, 0.18);
}

.voice-participant.speaking .voice-participant-name {
    color: #86efac;
    font-weight: 600;
}

.voice-participant-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
}

.voice-participant-side {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.voice-row-more {
    position: relative;
    opacity: 0;
    pointer-events: none;
}

.voice-participant:hover .voice-row-more,
.voice-participant:focus-within .voice-row-more,
.voice-row-more.is-open {
    opacity: 1;
    pointer-events: auto;
}

.voice-row-more .voice-more-btn {
    width: 1.45rem;
    height: 1.45rem;
    border: none;
    background: transparent;
}

.voice-volume-menu {
    left: auto;
    right: 0;
    min-width: 11.5rem;
}

.voice-volume-menu .voice-volume {
    padding: 0.4rem 0.35rem;
}

.voice-participant-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.voice-participant-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-speaking-dot {
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.voice-participant.speaking .voice-speaking-dot {
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
    animation: voice-speak-pulse 1s ease-in-out infinite;
}

@keyframes voice-speak-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.75; }
}

.voice-live-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.35rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: #fff;
    background: #e11d2e;
    box-shadow: 0 0 0 1px rgba(225, 29, 46, 0.35);
}

button.voice-live-badge {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

button.voice-live-badge:hover,
button.voice-live-badge:focus-visible {
    filter: brightness(1.12);
    outline: none;
}

button.voice-live-badge:disabled {
    opacity: 0.6;
    cursor: wait;
}

.voice-muted-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--vc-text-muted);
}

.voice-volume {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.voice-volume-label,
.voice-volume-value {
    font-size: 0.65rem;
    color: var(--vc-text-muted);
    letter-spacing: 0.02em;
}

.voice-volume-value {
    min-width: 2.4rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.voice-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    cursor: pointer;
}

.voice-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8b7cff;
    border: none;
}

.voice-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8b7cff;
    border: none;
}

.member-list-section {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 0;
    flex: 1;
}

.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-list-live-hint {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--vc-text-muted);
}

.member-list-item.is-live-share {
    cursor: pointer;
}

.member-list-item.is-watching {
    background: var(--vc-accent-muted);
    box-shadow: inset 0 0 0 1px var(--vc-accent);
}

.member-list-item {
    display: grid;
    grid-template-columns: 8px max-content minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    padding: 0.35rem 0.4rem;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--vc-text-muted);
}

.member-list-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.member-list-trailing {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.member-more {
    position: relative;
}

.member-more-btn {
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--vc-text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.member-more-btn:hover:not(:disabled),
.member-more-btn:focus-visible:not(:disabled),
.member-more-btn[aria-expanded="true"] {
    border-color: var(--vc-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--vc-text);
    outline: none;
}

.member-more-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.member-more-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 60;
    min-width: 9.25rem;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--vc-border);
    background: var(--vc-surface-raised);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.member-more-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--vc-text-secondary);
    font: inherit;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
}

.member-more-item:hover:not(:disabled),
.member-more-item:focus-visible:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vc-text);
    outline: none;
}

.member-more-item.is-danger:hover:not(:disabled),
.member-more-item.is-danger:focus-visible:not(:disabled) {
    background: rgba(220, 80, 80, 0.16);
    color: #f0a0a0;
}

.member-more-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.member-more-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.member-more-submenu-chevron {
    font-size: 0.7rem;
    opacity: 0.7;
}

.member-more-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0 0.1rem 0.15rem 0.35rem;
    padding-left: 0.35rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.member-list-item.online {
    color: var(--vc-text-secondary);
}

.member-list-item.away {
    color: var(--vc-text-secondary);
}

.member-list-item.me {
    color: var(--vc-text);
}

.member-status {
    position: relative;
    box-sizing: border-box;
    width: 8px;
    height: 8px;
    min-width: 8px;
    max-width: 8px;
    margin: 0;
    padding: 0;
    overflow: visible;
    display: grid;
    place-items: center;
}

.member-status-dot {
    box-sizing: border-box;
    display: block;
    width: 8px;
    height: 8px;
    min-width: 8px;
    max-width: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.55);
    box-shadow: none;
}

.member-list-item.online .member-status > .member-status-dot,
.member-list-item.online .member-status-trigger > .member-status-dot {
    background: var(--vc-success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.member-list-item.away .member-status > .member-status-dot,
.member-list-item.away .member-status-trigger > .member-status-dot {
    background: #e6b84d;
    box-shadow: 0 0 8px rgba(230, 184, 77, 0.5);
}

.member-status-menu .member-status-option .member-status-dot {
    background: rgba(148, 163, 184, 0.55);
    box-shadow: none;
}

.member-status-menu .member-status-option.online .member-status-dot {
    background: var(--vc-success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.member-status-menu .member-status-option.away .member-status-dot {
    background: #e6b84d;
    box-shadow: 0 0 8px rgba(230, 184, 77, 0.5);
}

.member-status-menu .member-status-option.offline .member-status-dot {
    background: rgba(148, 163, 184, 0.55);
    box-shadow: none;
}

.member-status-trigger {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: 8px;
    height: 8px;
    min-width: 8px;
    max-width: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    line-height: 0;
    font-size: 0;
    color: inherit;
    cursor: pointer;
}

.member-status-trigger::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
}

.member-status-trigger:hover::before,
.member-status-trigger:focus-visible::before {
    background: rgba(255, 255, 255, 0.08);
}

.member-status-trigger:focus-visible {
    outline: none;
}

.member-status-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 40;
    min-width: 8.5rem;
    padding: 0.3rem;
    border-radius: 8px;
    border: 1px solid var(--vc-border);
    background: var(--vc-surface-raised);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.member-status-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--vc-text-secondary);
    font: inherit;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
}

.member-status-option:hover,
.member-status-option:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.member-status-option.selected {
    color: var(--vc-text);
    background: rgba(255, 255, 255, 0.08);
}

.member-list-mobile {
    display: inline-flex;
    align-items: center;
    margin-left: 0.3rem;
    color: var(--vc-text-secondary);
    vertical-align: -0.1em;
    opacity: 0.85;
    line-height: 0;
}

.member-list-mobile svg {
    display: block;
}

.member-list-item.online .member-list-mobile,
.friend-list-item.online .member-list-mobile {
    color: var(--vc-text-secondary);
}

.member-list-name {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    overflow: hidden;
    white-space: nowrap;
}

.member-list-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-list-hint {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 0.62rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--vc-text-muted);
}

button.member-mention-btn {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

button.member-mention-btn:hover,
button.member-mention-btn:focus-visible {
    color: var(--vc-accent);
}

.stream-viewer-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: var(--vc-text-muted);
    opacity: 0.88;
}

.voice-participant-name .stream-viewer-icon {
    color: var(--vc-text-secondary, var(--vc-text-muted));
}

.member-list-activity {
    position: relative;
    display: block;
    min-width: 0;
    font-size: 0.7rem;
    line-height: 1.2;
    color: var(--vc-accent-soft);
    opacity: 0.92;
    cursor: help;
}

.member-list-activity-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-list-activity-icon {
    margin-right: 0.28rem;
}

.member-list-item:has(.member-list-activity:hover),
.member-list-item:has(.member-list-activity:focus-visible) {
    position: relative;
    z-index: 30;
}

.member-list-activity[data-tooltip]:hover::after,
.member-list-activity[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: calc(100% + 0.3rem);
    z-index: 40;
    width: max-content;
    max-width: min(16rem, 70vw);
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--vc-border-strong);
    background: var(--vc-surface-raised);
    color: var(--vc-text);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.member-status-option.member-status-action {
    margin-top: 0.15rem;
    padding-left: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 6px 6px;
    color: var(--vc-text-secondary);
}

.member-status-option.member-status-action + .member-status-option.member-status-action {
    margin-top: 0;
    border-top: none;
}

.member-role-badge {
    justify-self: end;
    flex-shrink: 0;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vc-text-muted);
    border: 1px solid var(--vc-border);
    border-radius: 999px;
    padding: 0.08rem 0.35rem;
}

.member-list-item .member-role-badge:is([data-role="bot"]),
.member-role-badge.bot {
    color: var(--vc-accent-soft);
    border-color: var(--vc-accent-border);
    background: var(--vc-accent-muted);
}

.chat-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-messages-pane {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    overflow-anchor: none;
    padding: 1rem 0.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    scroll-behavior: auto;
}

.chat-messages.is-pending-reveal {
    opacity: 0;
    pointer-events: none;
}

.chat-load-older {
    display: flex;
    justify-content: center;
    padding: 0.35rem 0 0.85rem;
}

.chat-load-older-btn {
    min-width: 10.5rem;
}

.chat-load-older-end {
    color: var(--vc-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.chat-messages-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--vc-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--vc-surface);
}

.chat-messages-spinner {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--vc-accent-soft);
    animation: chat-spin 0.7s linear infinite;
}

@keyframes chat-spin {
    to { transform: rotate(360deg); }
}

/* Scoped modern scrollbars (avoid universal * rules — they can break wheel scroll) */
.chat-messages,
.voice-sidebar,
.members-sidebar,
.sidebar,
.gif-grid,
.message-reaction-more {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) rgba(255, 255, 255, 0.04);
}

.chat-messages::-webkit-scrollbar,
.voice-sidebar::-webkit-scrollbar,
.members-sidebar::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.gif-grid::-webkit-scrollbar,
.message-reaction-more::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.chat-messages::-webkit-scrollbar-track,
.voice-sidebar::-webkit-scrollbar-track,
.members-sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.gif-grid::-webkit-scrollbar-track,
.message-reaction-more::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

.chat-messages::-webkit-scrollbar-thumb,
.voice-sidebar::-webkit-scrollbar-thumb,
.members-sidebar::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.gif-grid::-webkit-scrollbar-thumb,
.message-reaction-more::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.voice-sidebar::-webkit-scrollbar-thumb:hover,
.members-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.gif-grid::-webkit-scrollbar-thumb:hover,
.message-reaction-more::-webkit-scrollbar-thumb:hover {
    background: rgba(165, 180, 252, 0.65);
    border: 2px solid transparent;
    background-clip: content-box;
}

.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-corner {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border: 0;
    border-radius: 999px;
    background-clip: padding-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    border: 0;
    background-clip: padding-box;
}

.chat-message-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    column-gap: 0.75rem;
    width: 100%;
    max-width: none;
    padding: 0.1rem 0.75rem;
    margin-top: 0;
    border-radius: 4px;
    animation: msg-in 0.15s ease;
}

.chat-message-wrap.is-group-start {
    margin-top: 1.05rem;
    padding-top: 0.2rem;
}

.chat-message-wrap.is-group-start:first-child {
    margin-top: 0.25rem;
}

.chat-message-wrap.is-mention-jump {
    animation: mention-jump 1.8s ease;
}

@keyframes mention-jump {
    0%, 35% { background: rgb(var(--vc-accent-rgb) / 0.28); }
    100% { background: transparent; }
}

.chat-message-wrap:hover,
.chat-message-wrap:focus-within {
    background: rgba(255, 255, 255, 0.03);
}

.chat-message-wrap.is-mentioned {
    background: rgb(var(--vc-accent-rgb) / 0.08);
    box-shadow: inset 2px 0 0 rgb(var(--vc-accent-rgb) / 0.75);
}

.chat-message-wrap.is-mentioned:hover,
.chat-message-wrap.is-mentioned:focus-within {
    background: rgb(var(--vc-accent-rgb) / 0.12);
}

.chat-mention {
    padding: 0 0.15rem;
    border-radius: 0.25rem;
    background: rgb(var(--vc-accent-rgb) / 0.18);
    color: var(--vc-accent-soft);
    font-weight: 650;
}

.chat-mention.is-me {
    background: rgb(var(--vc-accent-rgb) / 0.32);
    color: color-mix(in srgb, var(--vc-accent-soft) 40%, white);
}

.chat-message-gutter {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0.15rem;
    min-height: 1.4rem;
}

.user-avatar {
    display: block;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: hsl(var(--avatar-hue, 220) 42% 42%);
    user-select: none;
}

.user-avatar-speaker-icon {
    width: 68%;
    height: 68%;
    display: block;
}

.user-avatar-xs {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.62rem;
}

.user-avatar-md {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 0.95rem;
}

.user-avatar-lg {
    width: 5rem;
    height: 5rem;
    font-size: 1.6rem;
}

.profile-card .profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.profile-avatar-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.profile-avatar-meta strong {
    font-size: 1.05rem;
}

.profile-id-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.profile-user-id {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: var(--vc-radius-sm);
    border: 1px solid var(--vc-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--vc-text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    word-break: break-all;
}

.profile-danger-zone {
    margin-top: 2rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(248, 113, 113, 0.22);
}

.profile-danger-zone h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #fecaca;
}

.profile-danger-zone > .text-muted {
    margin: 0 0 0.9rem;
    font-size: 0.86rem;
}

.modal-list {
    margin: 0.75rem 0 0;
    padding-left: 1.15rem;
    color: var(--vc-text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}

.modal-list li + li {
    margin-top: 0.35rem;
}

.friend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.friend-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.7rem;
    border-radius: var(--vc-radius-sm);
    border: 1px solid var(--vc-border);
    background: rgba(0, 0, 0, 0.18);
}

.friend-list-item.online .member-status-dot {
    background: #3ecf8e;
    box-shadow: 0 0 0 2px rgba(62, 207, 142, 0.25);
}

.friend-list-item.away .member-status-dot {
    background: #e6b84d;
    box-shadow: 0 0 0 2px rgba(230, 184, 77, 0.25);
}

.friend-list-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dm-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0.75rem;
    height: calc(100vh - 2rem);
    min-height: 0;
}

.dm-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background: var(--vc-surface);
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius);
    overflow: hidden;
}

.dm-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid var(--vc-border);
}

.dm-sidebar-header h1 {
    margin: 0;
    font-size: 1.05rem;
}

.dm-sidebar-scroll {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
}

.dm-sidebar-section {
    margin: 0.85rem 0.9rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--vc-text-muted);
}

.dm-sidebar-empty,
.dm-sidebar-status,
.dm-sidebar-alert {
    margin: 0.9rem;
}

.dm-sidebar-empty p {
    margin: 0 0 0.75rem;
    color: var(--vc-text-muted);
}

.dm-conversation-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dm-conversation {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 0;
    border-radius: var(--vc-radius-sm);
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.dm-conversation:hover {
    background: var(--vc-surface-hover);
}

.dm-conversation.active {
    background: var(--vc-accent-muted);
    box-shadow: inset 3px 0 0 var(--vc-accent);
}

.dm-conversation.is-closed {
    opacity: 0.78;
}

.dm-conversation-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.dm-conversation-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.dm-conversation-top strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-conversation-preview {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--vc-text-muted);
    font-size: 0.82rem;
}

.dm-conversation .dm-list-time {
    flex-shrink: 0;
    color: var(--vc-text-muted);
    font-size: 0.72rem;
}

.dm-stage {
    min-width: 0;
    min-height: 0;
    display: flex;
}

.dm-stage .chat-layout {
    flex: 1;
    height: 100%;
    min-height: 0;
}

.dm-stage-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: var(--vc-surface);
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius);
    color: var(--vc-text-muted);
}

.dm-stage-empty h2 {
    margin: 0 0 0.4rem;
    color: var(--vc-text);
}

.dm-embedded-back {
    display: none;
}

.friend-list-preview {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 36rem;
}

.friend-list-item.is-closed {
    opacity: 0.78;
}

.dm-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    margin-left: 0.4rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--vc-accent, #6d8dff);
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.15rem;
    vertical-align: 0.05rem;
}

.dm-list-time {
    font-size: 0.78rem;
    white-space: nowrap;
}

.chat-closed-banner {
    margin: 0.75rem 1rem 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius-sm);
    background: rgba(0, 0, 0, 0.22);
    color: var(--vc-text-muted);
}

.friend-list-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.friend-list-meta strong {
    font-size: 0.95rem;
}

.friend-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex-shrink: 0;
}

.alert-success {
    border-color: rgba(34, 197, 94, 0.25);
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
}

.chat-avatar {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: hsl(var(--avatar-hue, 220) 42% 42%);
    user-select: none;
    flex-shrink: 0;
}

.chat-message-time-inline {
    opacity: 0;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--vc-text-muted);
    line-height: 1.4rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.chat-message-wrap:hover .chat-message-time-inline,
.chat-message-wrap:focus-within .chat-message-time-inline {
    opacity: 1;
}

.chat-message {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-message-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.1rem;
    font-size: 0.72rem;
    color: var(--vc-text-muted);
}

.chat-message-author {
    color: hsl(var(--author-hue, 220) 70% 72%);
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-message-wrap.mine .chat-message-author {
    color: var(--vc-accent-soft);
}

.chat-message-timestamp {
    font-size: 0.7rem;
    color: var(--vc-text-muted);
}

.chat-message-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.375;
    color: var(--vc-text);
    font-family: var(--font-sans), "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.chat-message-text {
    white-space: inherit;
}

.playing-cards {
    display: inline-flex;
    align-items: flex-end;
    vertical-align: middle;
    gap: 0;
    padding: 0.2rem 0.1rem 0.15rem 0;
}

.playing-card {
    width: 3.55rem;
    height: auto;
    aspect-ratio: 5 / 7;
    border-radius: 0.3rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 3px 8px rgba(0, 0, 0, 0.42);
    position: relative;
    transition: transform 0.15s ease;
}

.playing-card + .playing-card {
    margin-left: -0.72rem;
}

.playing-card:hover {
    transform: translateY(-5px);
    z-index: 2;
}

.game-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 42rem;
}

.game-catalog-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.35rem 1.4rem 1.25rem;
    background:
        linear-gradient(180deg, rgba(22, 56, 45, 0.35), transparent 42%),
        var(--vc-surface);
    border: 1px solid var(--vc-border);
    border-radius: var(--vc-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.game-catalog-felt {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--vc-accent-deep), var(--vc-accent-hover), var(--vc-accent-deeper));
}

.game-catalog-card:hover {
    border-color: var(--vc-accent-border);
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
    color: inherit;
}

.game-catalog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 10px;
    background: var(--vc-accent-muted);
    border: 1px solid var(--vc-accent-border);
    color: var(--vc-accent-hover);
    font-size: 1.3rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-catalog-copy {
    display: grid;
    gap: 0.2rem;
}

.game-catalog-card h2 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.game-catalog-card p {
    margin: 0;
    color: var(--vc-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.game-catalog-card p strong {
    color: var(--vc-text-secondary);
    font-weight: 600;
}

.game-catalog-cta {
    margin-top: auto;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--vc-accent-hover);
}

.game-catalog-section {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1.6rem;
}

.game-catalog-section h2 {
    margin: 0;
    color: var(--vc-text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pk-shell {
    max-width: 72rem;
}

.pk-felt {
    min-height: 34rem;
}

.pk-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 0.65rem;
    align-items: stretch;
}

.pk-board {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0 0.2rem;
}

.pk-board-cards .playing-card {
    width: 4.1rem;
}

.pk-seat {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    min-height: 8.6rem;
    padding: 0.55rem 0.45rem 0.6rem;
    border-radius: 14px;
    background: rgba(6, 16, 12, 0.32);
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.16);
}

.pk-seat.is-you {
    border-color: rgb(var(--vc-accent-rgb) / 0.55);
    background: rgb(var(--vc-accent-rgb) / 0.14);
}

.pk-seat.is-acting {
    box-shadow: 0 0 0 1px rgba(240, 213, 168, 0.45), 0 0 18px rgb(var(--vc-accent-rgb) / 0.28);
}

.pk-seat.is-folded {
    opacity: 0.55;
}

.pk-seat.is-empty {
    background: transparent;
    border-style: dashed;
}

.pk-empty-seat {
    display: grid;
    place-items: center;
    gap: 0.15rem;
    width: 100%;
    min-height: 7.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(232, 220, 190, 0.62);
    cursor: pointer;
}

.pk-empty-seat span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pk-empty-seat strong {
    color: var(--vc-accent-soft);
    font-size: 0.92rem;
}

.pk-empty-seat:disabled {
    cursor: default;
    opacity: 0.7;
}

.pk-empty-seat:not(:disabled):hover {
    color: #f4ead4;
}

.pk-seat-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
}

.pk-seat-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 7.5rem;
    color: rgba(232, 220, 190, 0.88);
    font-size: 0.78rem;
    font-weight: 700;
}

.pk-button {
    display: grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #f4ead4;
    color: #1c1410;
    font-size: 0.62rem;
    font-weight: 800;
}

.pk-turn {
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgb(var(--vc-accent-rgb) / 0.28);
    color: var(--vc-accent-soft);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pk-hole .playing-card {
    width: 3.35rem;
}

.pk-hole .playing-card + .playing-card,
.pk-ghost-sm + .pk-ghost-sm {
    margin-left: -0.85rem;
}

.pk-ghost-sm {
    width: 3.35rem;
}

.pk-seat-stack {
    display: grid;
    justify-items: center;
    gap: 0.05rem;
    color: #f4ead4;
    font-variant-numeric: tabular-nums;
}

.pk-seat-stack span {
    color: rgba(232, 220, 190, 0.62);
    font-size: 0.7rem;
}

.pk-call-hint {
    margin: 0 0 0.75rem;
    color: var(--vc-text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.pk-wager {
    margin: 0.65rem 0 0.55rem;
}

.pk-next-hand {
    margin-top: 0.15rem;
}

@media (max-width: 1100px) {
    .pk-felt {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .pk-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pk-board {
        grid-column: 1 / -1;
        order: -1;
    }

    .pk-hole .playing-card,
    .pk-ghost-sm {
        width: 2.85rem;
    }
}

.chat-games-pane {
    padding: 1rem 1.15rem 1.35rem;
    overflow-y: auto;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgb(var(--vc-accent-rgb) / 0.06), transparent 55%),
        var(--vc-bg-soft);
}

.bj-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16.5rem;
    gap: 1rem;
    align-items: start;
    max-width: 64rem;
    min-height: 100%;
}

.bj-shell.is-loading {
    grid-template-columns: 1fr;
}

.bj-loading {
    margin: 4rem 0;
    text-align: center;
    color: rgba(213, 228, 212, 0.7);
}

.bj-felt {
    position: relative;
    min-height: 28rem;
    padding: 1.15rem 1.3rem 1.45rem;
    border-radius: 22px;
    background:
        radial-gradient(ellipse 90% 55% at 50% 0%, rgb(var(--vc-accent-rgb) / 0.16), transparent 52%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 5px),
        radial-gradient(ellipse 85% 90% at 50% 45%, #18503c 0%, #0e3226 62%, #081c16 100%);
    box-shadow:
        0 0 0 2px #c9a35a,
        0 0 0 5px #6d5224,
        0 0 0 8px #3d2c12,
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 90px rgba(0, 0, 0, 0.32),
        0 22px 48px rgba(0, 0, 0, 0.42);
}

.bj-felt-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.bj-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.bj-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--vc-accent-soft), var(--vc-accent) 62%, var(--vc-accent-deep));
    color: #1c1410;
    font-size: 1.15rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.bj-brand h2 {
    margin: 0;
    color: #f4ead4;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bj-brand p {
    margin: 0.1rem 0 0;
    color: rgba(232, 220, 190, 0.68);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.bj-stats {
    display: flex;
    gap: 0.5rem;
}

.bj-stat {
    min-width: 5.4rem;
    padding: 0.4rem 0.7rem 0.45rem;
    border-radius: 10px;
    background: rgba(6, 16, 12, 0.45);
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.18);
    text-align: right;
}

.bj-stat span {
    display: block;
    color: rgba(232, 220, 190, 0.58);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bj-stat strong {
    display: block;
    color: #f4ead4;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.bj-stat.is-live {
    border-color: rgb(var(--vc-accent-rgb) / 0.42);
    background: rgb(var(--vc-accent-rgb) / 0.16);
}

.bj-felt-play {
    display: grid;
    gap: 0.85rem;
}

.bj-spot {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    min-height: 8.4rem;
}

.bj-spot-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bj-spot-name {
    color: rgba(232, 220, 190, 0.78);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.bj-spot-score {
    min-width: 1.7rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: rgba(6, 16, 12, 0.5);
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.28);
    color: var(--vc-accent-soft);
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.bj-felt-line {
    display: flex;
    justify-content: center;
    margin: 0.15rem 0;
}

.bj-felt-line span {
    padding: 0.18rem 0.85rem;
    border: 1px solid rgb(var(--vc-accent-rgb) / 0.28);
    border-radius: 999px;
    color: rgba(240, 213, 168, 0.72);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.bj-cards {
    min-height: 7.4rem;
}

.bj-cards .playing-card {
    width: 4.35rem;
}

.bj-cards .playing-card + .playing-card {
    margin-left: -1.05rem;
}

.bj-ghost-card {
    width: 4.35rem;
    aspect-ratio: 5 / 7;
    border-radius: 0.35rem;
    border: 1.5px dashed rgb(var(--vc-accent-rgb) / 0.28);
    background: rgba(6, 16, 12, 0.22);
}

.bj-ghost-card + .bj-ghost-card {
    margin-left: -1.05rem;
}

.bj-hand-empty {
    align-self: center;
    margin-left: 0.75rem;
    color: rgba(213, 228, 212, 0.55);
    font-size: 0.82rem;
}

.bj-banner {
    justify-self: center;
    margin: 0.15rem 0 0;
    max-width: 28rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 650;
}

.bj-banner.is-win {
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.32);
}

.bj-banner.is-lose {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
}

.bj-banner.is-push {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.bj-banner.is-error {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.32);
}

.bj-rail {
    display: grid;
    gap: 0.85rem;
}

.bj-rail-card {
    padding: 1rem 1.05rem 1.1rem;
    border-radius: var(--vc-radius);
    background: var(--vc-surface);
    border: 1px solid var(--vc-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.bj-rail-card h3 {
    margin: 0 0 0.75rem;
    color: var(--vc-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bj-actions {
    display: grid;
    gap: 0.45rem;
}

.bj-action,
.bj-deal {
    width: 100%;
}

.bj-deal {
    margin-top: 0.25rem;
}

.bj-bet-stepper {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.bj-bet-input {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.bj-step {
    padding-left: 0;
    padding-right: 0;
}

.bj-chip-row {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.bj-chip {
    position: relative;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border-radius: 50%;
    border: 3px dashed rgba(255, 255, 255, 0.42);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 3px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.bj-chip span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.bj-chip-10 {
    background: radial-gradient(circle at 32% 28%, #7dd3fc, #0369a1 68%);
}

.bj-chip-25 {
    background: radial-gradient(circle at 32% 28%, #86efac, #15803d 68%);
}

.bj-chip-50 {
    background: radial-gradient(circle at 32% 28%, #fca5a5, #b91c1c 68%);
}

.bj-chip-100 {
    background: radial-gradient(circle at 32% 28%, #e5e7eb, #111827 68%);
}

.bj-chip:not(:disabled):hover,
.bj-chip.is-selected {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 2px var(--vc-accent-soft),
        0 6px 14px rgba(0, 0, 0, 0.35);
}

.bj-standings-empty {
    margin: 0;
    color: var(--vc-text-muted);
    font-size: 0.85rem;
}

.bj-standings-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.bj-standings-list li {
    display: grid;
    grid-template-columns: 1.45rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
}

.bj-rank {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: var(--vc-surface-raised);
    color: var(--vc-text-muted);
    font-size: 0.7rem;
    font-weight: 750;
}

.bj-standings-list li:nth-child(1) .bj-rank {
    background: linear-gradient(180deg, var(--vc-accent-soft), var(--vc-accent));
    color: var(--vc-accent-ink);
}

.bj-standings-list li:nth-child(2) .bj-rank {
    background: linear-gradient(180deg, #e5e7eb, #9ca3af);
    color: #111827;
}

.bj-standings-list li:nth-child(3) .bj-rank {
    background: linear-gradient(180deg, #f0c9a0, #b45309);
    color: #1c1410;
}

.bj-standing-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--vc-text-secondary);
    font-size: 0.88rem;
}

.bj-standings-list strong {
    font-variant-numeric: tabular-nums;
    color: var(--vc-accent-soft);
    font-size: 0.88rem;
}

@media (max-width: 1100px) {
    .bj-shell {
        grid-template-columns: 1fr;
    }

    .bj-felt {
        min-height: 0;
    }

    .bj-rail {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }
}

@media (max-width: 640px) {
    .bj-felt {
        padding: 0.95rem 0.85rem 1.15rem;
        border-radius: 16px;
        box-shadow:
            0 0 0 2px #c9a35a,
            0 0 0 4px #6d5224,
            0 0 0 6px #3d2c12,
            inset 0 0 60px rgba(0, 0, 0, 0.3),
            0 14px 32px rgba(0, 0, 0, 0.38);
    }

    .bj-felt-top {
        flex-direction: column;
        align-items: stretch;
    }

    .bj-stats {
        justify-content: stretch;
    }

    .bj-stat {
        flex: 1;
        text-align: left;
    }

    .bj-spot {
        min-height: 0;
    }

    .bj-cards,
    .bj-ghost-card {
        min-height: 0;
    }

    .bj-cards .playing-card,
    .bj-ghost-card {
        width: 3.35rem;
    }

    .bj-cards .playing-card + .playing-card,
    .bj-ghost-card + .bj-ghost-card {
        margin-left: -0.75rem;
    }

    .bj-hand-empty {
        display: none;
    }

    .bj-rail {
        grid-template-columns: 1fr;
    }

    .bj-banner {
        border-radius: 12px;
    }
}

.chat-inline-link {
    color: var(--vc-accent-hover);
    text-decoration: underline;
    text-decoration-color: rgba(224, 180, 90, 0.45);
    text-underline-offset: 0.15em;
    word-break: break-all;
}

.chat-inline-link:hover {
    color: var(--vc-accent-soft);
    text-decoration-color: var(--vc-accent-soft);
}

.chat-video-previews {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.55rem;
    max-width: min(100%, 22rem);
}

.chat-video-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--vc-radius-sm);
    border: 1px solid var(--vc-border-strong);
    background: var(--vc-bg);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-video-tile:hover {
    border-color: var(--vc-accent-border);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    color: inherit;
}

.chat-video-tile:has(.chat-video-embed):hover {
    transform: none;
    box-shadow: none;
}

.chat-video-play-hit {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}

.chat-video-play-hit:focus-visible {
    outline: 2px solid var(--vc-accent);
    outline-offset: -2px;
}

.chat-video-play-hit:hover .chat-video-thumb {
    filter: brightness(1.08);
}

.chat-video-thumb-wrap {
    position: relative;
    display: block;
}

.chat-video-thumb,
.chat-video-embed {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #111;
}

.chat-video-embed {
    border: 0;
}

.chat-video-tile-meta {
    position: absolute;
    left: 0.65rem;
    bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(8, 10, 9, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.chat-video-play {
    font-size: 0.62rem;
    color: var(--vc-accent-hover);
}

.chat-video-caption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.7rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--vc-border);
}

.chat-video-title {
    color: var(--vc-text);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.chat-video-title:hover {
    color: var(--vc-accent-hover);
}

.chat-video-author {
    color: var(--vc-text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-message-emoji-only {
    font-size: 2rem;
    line-height: 1.3;
    letter-spacing: 0.05em;
}

.chat-message-emoji-only .chat-video-previews {
    font-size: 0.95rem;
    letter-spacing: normal;
}

.chat-system-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0.55rem 0;
    padding: 0 0.75rem;
    color: var(--vc-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.35;
}

.chat-system-message span {
    max-width: min(36rem, 100%);
}

.chat-system-message time {
    flex-shrink: 0;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
}

.chat-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
}

.chat-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--vc-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--vc-text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-reaction:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.chat-reaction.mine {
    background: rgb(var(--vc-accent-rgb) / 0.2);
    border-color: rgb(var(--vc-accent-rgb) / 0.45);
}

.chat-reaction-emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.chat-reaction-count {
    font-size: 0.72rem;
    font-weight: 600;
}

/* Overlay controls — out of document flow so hover never shifts rows. */
.chat-message-hoverbar {
    position: absolute;
    top: 0;
    right: 0.35rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: color-mix(in srgb, var(--vc-surface-raised) 92%, #000 8%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.chat-message-wrap.is-continuation .chat-message-hoverbar {
    top: -0.15rem;
}

.chat-message-wrap:hover .chat-message-hoverbar,
.chat-message-wrap:focus-within .chat-message-hoverbar,
.chat-message-hoverbar.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chat-message-edited {
    margin-left: 0.35rem;
    color: var(--vc-text-muted, rgba(255, 255, 255, 0.45));
    font-size: 0.72rem;
    font-weight: 500;
    user-select: none;
}

.composer-edit-banner,
.composer-reply-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--vc-text-secondary);
    font-size: 0.82rem;
}

.composer-reply-banner {
    align-items: stretch;
    border-left: 2px solid var(--vc-accent, #7eb6ff);
}

.composer-reply-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.composer-reply-label {
    font-weight: 650;
    color: var(--vc-text, #fff);
}

.composer-reply-snippet {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-reply-quote {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    max-width: min(28rem, 100%);
    margin: 0 0 0.35rem;
    padding: 0.28rem 0.55rem;
    border: none;
    border-left: 2px solid var(--vc-accent, #7eb6ff);
    border-radius: 0 6px 6px 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--vc-text-secondary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.chat-reply-quote.is-unavailable,
.chat-reply-quote:disabled {
    cursor: default;
    opacity: 0.75;
}

.chat-reply-quote-author {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--vc-text, #fff);
}

.chat-reply-quote-text {
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.composer-edit-cancel {
    border: none;
    background: transparent;
    color: var(--vc-accent, #7eb6ff);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
}

.composer-edit-cancel:hover:not(:disabled) {
    text-decoration: underline;
}

.composer-edit-cancel:disabled {
    opacity: 0.55;
    cursor: wait;
}

.chat-react-btn,
.chat-reply-btn,
.chat-edit-btn,
.chat-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.chat-react-btn {
    color: var(--vc-text-secondary);
    font-size: 0.9rem;
    line-height: 1;
}

.chat-react-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.chat-reply-btn {
    color: var(--vc-text-secondary);
    font-size: 0.85rem;
    line-height: 1;
}

.chat-reply-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.chat-reply-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.chat-edit-btn {
    color: var(--vc-text-secondary);
    font-size: 0.85rem;
    line-height: 1;
}

.chat-edit-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.chat-edit-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.chat-delete-btn {
    color: #f0a8a8;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.chat-delete-btn:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.18);
    color: #fff;
}

.chat-delete-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.message-longpress-backdrop,
.message-longpress-menu {
    display: none;
}

.message-reaction-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.message-reaction-picker {
    position: absolute;
    top: calc(100% + 0.35rem);
    bottom: auto;
    right: 0;
    left: auto;
    z-index: 41;
    min-width: 14rem;
    max-width: min(18rem, 90vw);
    padding: 0.5rem;
    border-radius: var(--vc-radius);
    border: 1px solid var(--vc-border);
    background: var(--vc-surface-raised);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.message-reaction-quick,
.message-reaction-more {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.message-reaction-more {
    max-height: 10rem;
    overflow-y: auto;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--vc-border);
}

.message-reaction-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.45rem;
    background: transparent;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.message-reaction-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.message-reaction-more-toggle {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.25rem 0;
    border: none;
    background: transparent;
    color: var(--vc-text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    text-align: center;
}

.message-reaction-more-toggle:hover {
    color: var(--vc-text-secondary);
}

.chat-main-footer {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.typing-indicator {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 1.35rem;
    padding: 0.55rem 1.25rem 0.4rem;
    color: var(--vc-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    pointer-events: none;
    background: linear-gradient(to top, var(--vc-surface) 55%, rgba(9, 11, 16, 0));
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.typing-dots span {
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: var(--vc-accent-hover);
    opacity: 0.45;
    animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    30% {
        transform: translateY(-2px);
        opacity: 1;
    }
}

.chat-composer {
    display: flex;
    gap: 0.65rem;
    flex-shrink: 0;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--vc-border);
    background: rgba(9, 11, 16, 0.5);
    align-items: flex-end;
}

.composer-stack {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mention-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.35rem);
    z-index: 40;
    display: flex;
    flex-direction: column;
    max-height: 14rem;
    overflow: auto;
    padding: 0.3rem;
    border-radius: 0.55rem;
    border: 1px solid var(--vc-border-strong);
    background: var(--vc-surface-raised);
    box-shadow: var(--vc-shadow);
}

.mention-menu[hidden] {
    display: none;
}

.mention-menu-item {
    appearance: none;
    width: 100%;
    border: 0;
    border-radius: 0.4rem;
    padding: 0.45rem 0.6rem;
    background: transparent;
    color: var(--vc-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mention-menu-item:hover,
.mention-menu-item.is-active {
    background: rgb(var(--vc-accent-rgb) / 0.16);
    color: var(--vc-accent-soft);
}

.composer-compose-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.composer-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.composer-send {
    flex-shrink: 0;
}

.composer-image-draft {
    position: relative;
    align-self: flex-start;
    max-width: min(100%, 14rem);
    border-radius: var(--vc-radius-sm);
    border: 1px solid var(--vc-border-strong);
    background: var(--vc-bg);
    overflow: hidden;
}

.composer-image-draft img {
    display: block;
    width: 100%;
    max-height: 10rem;
    object-fit: cover;
}

.composer-image-draft-remove {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 10, 9, 0.78);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 650;
    cursor: pointer;
}

.composer-image-draft-remove:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.35);
}

.composer-file-draft {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    align-self: stretch;
    padding: 0.45rem 0.65rem;
    border-radius: var(--vc-radius-sm);
    border: 1px solid var(--vc-border-strong);
    background: rgba(255, 255, 255, 0.04);
}

.composer-file-draft-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--vc-text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.composer-file-draft-size {
    flex-shrink: 0;
    color: var(--vc-text-muted);
    font-size: 0.75rem;
}

.composer-file-draft .composer-image-draft-remove {
    position: static;
}

.chat-file-card {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    max-width: min(100%, 22rem);
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--vc-border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-file-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--vc-accent);
}

.chat-file-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
}

.chat-file-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.chat-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--vc-text-primary);
}

.chat-file-size {
    font-size: 0.75rem;
    color: var(--vc-text-muted);
}

.composer-input {
    flex: 1;
    min-width: 0;
}

.emoji-toggle {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius-sm);
    background: var(--vc-surface-raised);
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    line-height: 1;
    padding: 0;
}

.emoji-toggle:not(:disabled):hover {
    background: var(--vc-surface-hover);
    border-color: var(--vc-accent);
}

.emoji-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.emoji-picker-backdrop,
.media-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.emoji-picker {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    z-index: 101;
    width: min(320px, calc(100vw - 2rem));
    max-height: 280px;
    display: flex;
    flex-direction: column;
    background: var(--vc-surface-raised);
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius);
    box-shadow: var(--vc-shadow);
    overflow: hidden;
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--vc-border);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--vc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.emoji-picker-close {
    border: 0;
    background: none;
    color: var(--vc-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.emoji-picker-close:hover {
    color: var(--vc-text);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 0.5rem;
    overflow-y: auto;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-radius: var(--vc-radius-xs);
    background: transparent;
    font-size: 1.35rem;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    cursor: pointer;
    transition: background 0.1s ease, transform 0.1s ease;
    padding: 0;
}

.emoji-item:hover {
    background: var(--vc-accent-muted);
    transform: scale(1.15);
}

.gif-toggle {
    flex-shrink: 0;
    height: 2.25rem;
    padding: 0 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius-sm);
    background: var(--vc-surface-raised);
    color: var(--vc-text-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gif-toggle:not(:disabled):hover {
    background: var(--vc-surface-hover);
    border-color: var(--vc-accent);
    color: var(--vc-accent-hover);
}

.gif-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.attach-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.attach-toggle {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius-sm);
    background: var(--vc-surface-raised);
    color: var(--vc-text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.attach-toggle:not(:disabled):hover,
.attach-toggle.is-open {
    background: var(--vc-surface-hover);
    border-color: var(--vc-accent);
    color: var(--vc-accent-hover);
}

.attach-toggle.is-open {
    transform: rotate(45deg);
}

.attach-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.attach-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.attach-menu {
    position: absolute;
    bottom: calc(100% + 0.45rem);
    left: 0;
    z-index: 101;
    min-width: 11.5rem;
    padding: 0.3rem;
    border-radius: var(--vc-radius);
    border: 1px solid var(--vc-border-strong);
    background: var(--vc-surface-raised);
    box-shadow: var(--vc-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.attach-menu-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--vc-radius-sm);
    cursor: pointer;
    transition: background 0.12s ease;
}

.attach-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.attach-menu-item input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.attach-menu-label {
    color: var(--vc-text-primary);
    font-size: 0.88rem;
    font-weight: 650;
}

.attach-menu-hint {
    color: var(--vc-text-muted);
    font-size: 0.72rem;
}

.gif-picker {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    z-index: 101;
    width: min(360px, calc(100vw - 2rem));
    max-height: 380px;
    display: flex;
    flex-direction: column;
    background: var(--vc-surface-raised);
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius);
    box-shadow: var(--vc-shadow);
    overflow: hidden;
}

.gif-picker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--vc-border);
}

.gif-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.gif-picker-close {
    border: 0;
    background: none;
    color: var(--vc-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
    flex-shrink: 0;
}

.gif-picker-close:hover {
    color: var(--vc-text);
}

.gif-picker-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--vc-text-muted);
    font-size: 0.875rem;
}

.gif-picker-empty code {
    font-size: 0.78rem;
    color: var(--vc-accent-soft);
}

.gif-picker-error {
    color: #fca5a5;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0.5rem;
    overflow-y: auto;
    max-height: 280px;
}

.gif-item {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-radius: var(--vc-radius-xs);
    overflow: hidden;
    cursor: pointer;
    background: var(--vc-bg-soft);
    padding: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.gif-item:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.gif-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gif-attribution {
    padding: 0.45rem 0.75rem;
    border-top: 1px solid var(--vc-border);
    text-align: center;
    background: rgba(9, 11, 16, 0.4);
}

.chat-image-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 10rem;
    min-height: 4.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--vc-text-muted, rgba(255, 255, 255, 0.45));
    font-size: 0.82rem;
    font-weight: 500;
}

.chat-gif,
.chat-image {
    display: block;
    max-width: min(420px, 100%);
    max-height: 360px;
    margin-top: 0.15rem;
    border-radius: var(--vc-radius-sm);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
}

.chat-image-link {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.chat-image-link:hover .chat-image {
    outline: 1px solid rgba(165, 180, 252, 0.45);
}

.chat-composer .form-control {
    flex: 1;
    border-radius: var(--vc-radius-sm);
}

.chat-composer .btn {
    flex-shrink: 0;
    align-self: flex-end;
}

.screen-share-btn {
    margin-top: 0.35rem;
}

.screen-share-panel {
    flex-shrink: 0;
    margin: 0 1rem;
    padding: 0.75rem;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius);
    background: rgba(9, 11, 16, 0.65);
}

.screen-share-collapse-btn {
    display: inline-flex;
}

.screen-share-dock-side-btn {
    display: none;
}

.screen-share-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.screen-share-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.screen-share-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.screen-share-options {
    position: relative;
}

.screen-share-options .chat-more-menu {
    min-width: 13rem;
}

.chat-more-item.screen-share-menu-dock,
.screen-share-position-menu {
    display: none;
}

.screen-share-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--vc-text-secondary);
}

.chat-header-share-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.chat-header-share-actions .btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.screen-share-audio-badge {
    margin-left: 0.5rem;
    padding: 0.125rem 0.4rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--vc-accent);
    background: rgb(var(--vc-accent-rgb) / 0.15);
    border-radius: 999px;
}

.screen-share-audio-muted {
    color: var(--vc-text-muted);
    background: rgba(255, 255, 255, 0.06);
}

.screen-share-volume {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    flex-shrink: 1;
}

.screen-share-mute-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--vc-text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.screen-share-mute-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--vc-text-primary);
}

.screen-share-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 6.5rem;
    max-width: 28vw;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    cursor: pointer;
}

.screen-share-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vc-accent, var(--vc-accent));
    border: none;
}

.screen-share-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vc-accent, var(--vc-accent));
    border: none;
}

.screen-share-volume-value {
    min-width: 2.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--vc-text-muted);
    font-variant-numeric: tabular-nums;
}

.screen-share-pip-body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #090b10;
    color: var(--vc-text, #e8eaed);
}

.screen-share-popout {
    position: fixed;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius);
    background: #090b10;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    min-width: 240px;
    min-height: 160px;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
}

.screen-share-popout.is-document-pip {
    position: static;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.screen-share-popout.is-document-pip .screen-share-popout-header {
    cursor: default;
    touch-action: auto;
}

.screen-share-popout-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    grid-auto-rows: minmax(180px, 1fr);
    gap: 6px;
    padding: 6px;
    background: #000;
    overflow: auto;
}

.screen-share-popout-grid-cell {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
}

.screen-share-popout-grid-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.2rem 0.35rem 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
}

.screen-share-popout-grid-label .screen-share-dock-btn {
    padding: 0.15rem 0.4rem;
}

.screen-share-popout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem 0.45rem 0.75rem;
    border-bottom: 1px solid var(--vc-border);
    background: rgba(255, 255, 255, 0.04);
    cursor: move;
    touch-action: none;
    user-select: none;
}

.screen-share-popout-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--vc-text-secondary);
}

.screen-share-popout-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.screen-share-dock-btn,
.screen-share-pin-btn {
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--vc-border-strong);
    border-radius: var(--vc-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--vc-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.screen-share-dock-btn:hover,
.screen-share-pin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--vc-text-primary);
}

.screen-share-pin-btn[aria-pressed="true"] {
    background: var(--vc-accent-muted);
    border-color: var(--vc-accent-border);
    color: var(--vc-accent-soft);
}

.screen-share-pin-btn[aria-pressed="true"]:hover {
    background: var(--vc-accent-muted);
    color: var(--vc-accent-soft);
}

.screen-share-popout-content {
    position: relative;
    display: grid;
    flex: 1;
    min-height: 0;
    background: #000;
}

.screen-share-popout-content .screen-share-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.screen-share-popout-resizer {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    touch-action: none;
}

.screen-share-popout-resizer::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
}

.screen-share-video-wrap {
    position: relative;
    width: 100%;
    height: min(52vh, 640px);
    min-height: 140px;
    max-height: min(75vh, 900px);
    overflow: hidden;
    border-radius: var(--vc-radius-sm);
    background: #000;
}

.screen-share-video-wrap.is-collapsed {
    display: none;
}

.screen-share-video-wrap.is-popped-out,
.screen-share-video-wrap.is-all-popped {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 0;
    max-height: none;
    resize: none;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.screen-share-popout-placeholder {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--vc-text-muted);
    text-align: center;
}

@media (min-width: 769px) {
    .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) .screen-share-edge-resizer {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 14px;
        z-index: 6;
        cursor: ns-resize;
        touch-action: none;
    }

    .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) .screen-share-edge-resizer::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 5px;
        width: 44px;
        height: 4px;
        margin-left: -22px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.42);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    }

    .screen-share-video-wrap.is-resizing,
    .screen-share-video-wrap.is-resizing * {
        cursor: ns-resize !important;
        user-select: none !important;
    }

    .chat-layout.is-stream-side.is-stream-resizing,
    .chat-layout.is-stream-side.is-stream-resizing * {
        cursor: ew-resize !important;
        user-select: none !important;
    }

    .chat-layout.is-stream-side .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) .screen-share-edge-resizer {
        top: 0;
        width: 14px;
        height: auto;
        cursor: ew-resize;
    }

    .chat-layout.is-stream-right .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) .screen-share-edge-resizer {
        right: auto;
    }

    .chat-layout.is-stream-left .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) .screen-share-edge-resizer {
        left: auto;
        right: 0;
    }

    .chat-layout.is-stream-side .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) .screen-share-edge-resizer::after {
        left: 5px;
        top: 50%;
        bottom: auto;
        width: 4px;
        height: 44px;
        margin-left: 0;
        margin-top: -22px;
    }
}

.screen-share-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.screen-share-video-wrap.is-grid .screen-share-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.screen-share-video-wrap.is-stage .screen-share-grid {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    grid-template-rows: minmax(0, 1fr) 5.5rem;
    grid-auto-flow: dense;
    gap: 0.4rem;
}

.screen-share-video-wrap.is-stage .screen-share-tile.is-focused {
    grid-column: 1 / -1;
    grid-row: 1;
}

.screen-share-video-wrap.is-stage .screen-share-tile:not(.is-focused):not(.is-popped) {
    grid-row: 2;
    min-height: 0;
    cursor: pointer;
}

.screen-share-video-wrap.is-stage .screen-share-tile:not(.is-focused):not(.is-popped):hover {
    outline: 2px solid var(--vc-accent, var(--vc-accent));
    outline-offset: -2px;
}

.screen-share-video-wrap.is-stage .screen-share-tile.is-popped {
    grid-row: 2;
}

.screen-share-tile {
    position: relative;
    height: 100%;
    min-height: 160px;
    border-radius: var(--vc-radius-sm);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.screen-share-tile-label {
    position: absolute;
    z-index: 2;
    top: 0.45rem;
    left: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    max-width: calc(100% - 12.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-share-tile-actions {
    position: absolute;
    z-index: 3;
    top: 0.45rem;
    right: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem;
    max-width: calc(100% - 0.9rem);
    opacity: 0;
    pointer-events: none;
}

.screen-share-tile:hover .screen-share-tile-actions,
.screen-share-tile:focus-within .screen-share-tile-actions,
.screen-share-tile.is-focused .screen-share-tile-actions,
.screen-share-tile.is-popped .screen-share-tile-actions {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none) {
    .screen-share-tile-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

.screen-share-tile-actions.is-inline {
    position: static;
    max-width: 100%;
    justify-content: center;
}

.screen-share-tile-popout {
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.screen-share-tile-popout:hover {
    background: rgba(0, 0, 0, 0.78);
}

.screen-share-tile-popout:disabled {
    opacity: 0.55;
    cursor: wait;
}

.screen-share-tile-more {
    position: relative;
}

.screen-share-tile-more-btn {
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.screen-share-tile-more-btn:hover,
.screen-share-tile-more-btn[aria-expanded="true"] {
    background: rgba(0, 0, 0, 0.78);
}

.screen-share-tile-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 6;
    min-width: 7.25rem;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--vc-surface-raised);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.screen-share-tile-menu-item {
    display: block;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.screen-share-tile-menu-item:hover:not(:disabled),
.screen-share-tile-menu-item:focus-visible:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.screen-share-tile-menu-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.screen-share-tile.is-popped {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: start;
    gap: 0.45rem;
    height: auto;
    min-height: 5.5rem;
    padding: 0.75rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
}

.screen-share-tile.is-popped .screen-share-tile-label {
    position: static;
    max-width: 100%;
}

.screen-share-tile-placeholder {
    margin: 0;
    font-size: 0.78rem;
    color: var(--vc-text-muted);
    text-align: center;
}

.screen-share-video-wrap.is-all-popped .screen-share-grid {
    height: auto;
    width: 100%;
}

.screen-share-video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 160px;
    border-radius: var(--vc-radius-sm);
    background: #000;
    object-fit: contain;
    pointer-events: none;
    image-rendering: auto;
    /* Promote to its own layer; do NOT use content-visibility — it skips video frames. */
    transform: translateZ(0);
}

.screen-share-video-host {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 160px;
    border-radius: var(--vc-radius-sm);
    background: #000;
    overflow: hidden;
}

.screen-share-video-host .screen-share-video {
    min-height: 0;
    width: 100%;
    height: 100%;
}

#screen-share-video-local.screen-share-video {
    /* Small preview — less compositor work on the machine that's also encoding. */
    max-height: min(28vh, 280px);
}

.screen-share-video-wrap.is-stage .screen-share-tile.is-focused #screen-share-video-local.screen-share-video,
.screen-share-video-wrap.is-stage .screen-share-tile.is-focused .screen-share-video,
.screen-share-video-wrap.is-stage .screen-share-tile.is-focused .screen-share-video-host {
    max-height: none;
    min-height: 0;
    height: 100%;
}

.screen-share-video-wrap.is-stage .screen-share-tile:not(.is-focused) .screen-share-video,
.screen-share-video-wrap.is-stage .screen-share-tile:not(.is-focused) .screen-share-video-host {
    min-height: 0;
    max-height: none;
    height: 100%;
}

.screen-share-video-wrap.is-grid .screen-share-video,
.screen-share-video-wrap.is-grid .screen-share-video-host {
    min-height: 180px;
    max-height: min(40vh, 360px);
}

.screen-share-connecting {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
}

.screen-share-edge-resizer {
    display: none;
}

.screen-share-hidden .screen-share-toolbar {
    display: none;
}

.screen-share-hidden .screen-share-video {
    max-height: 0;
}

.panel-drag-handle {
    display: none;
}

.panel-pin-btn {
    display: none;
}

@media (min-width: 769px) {
    .members-panel-collapse-btn,
    .channels-panel-collapse-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.75rem;
        height: 1.75rem;
        flex-shrink: 0;
        padding: 0;
        border: 1px solid var(--vc-border-strong);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
        color: var(--vc-text-secondary);
        cursor: pointer;
    }

    .members-panel-collapse-btn:hover,
    .members-panel-collapse-btn:focus-visible,
    .channels-panel-collapse-btn:hover,
    .channels-panel-collapse-btn:focus-visible {
        background: rgba(255, 255, 255, 0.08);
        color: var(--vc-text);
        outline: none;
    }

    .chat-body:not(.is-direct) {
        grid-template-columns: var(--slot-1, minmax(200px, 240px)) var(--slot-2, minmax(0, 1fr)) var(--slot-3, minmax(200px, 240px));
    }

    .chat-body:not(.is-direct) .is-slot-left {
        border-right: 1px solid var(--vc-border);
    }

    .chat-body:not(.is-direct) .is-slot-right {
        border-left: 1px solid var(--vc-border);
    }

    .panel-drag-handle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.35rem;
        height: 1.35rem;
        flex-shrink: 0;
        color: var(--vc-text-muted);
        cursor: grab;
        border-radius: 6px;
        user-select: none;
    }

    .panel-drag-handle:hover,
    .panel-drag-handle:focus-visible {
        color: var(--vc-text);
        background: rgba(255, 255, 255, 0.06);
        outline: none;
    }

    .panel-drag-handle:active {
        cursor: grabbing;
    }

    .panel-drag-handle svg {
        display: block;
        pointer-events: none;
    }

    .panel-drag-handle-chat {
        position: absolute;
        top: 0.4rem;
        right: 0.55rem;
        z-index: 4;
        background: rgba(9, 11, 16, 0.72);
    }

    .voice-sidebar.is-collapsed .panel-drag-handle,
    .members-sidebar.is-collapsed .panel-drag-handle {
        align-self: center;
    }

    .chat-body [data-panel-drop].is-panel-drop {
        box-shadow: inset 0 0 0 2px var(--vc-accent);
    }

    .chat-body.is-free-layout {
        display: block;
        position: relative;
        overflow: hidden;
    }

    .chat-body.is-free-layout > [data-panel-drop] {
        position: absolute;
        overflow: auto;
        border: 1px solid var(--vc-border-strong);
        border-radius: 12px;
        background: var(--vc-surface);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    }

    .chat-body.is-free-layout > [data-panel-drop].is-pinned {
        box-shadow: 0 0 0 1px var(--vc-accent-border), 0 10px 28px rgba(0, 0, 0, 0.35);
    }

    .panel-pin-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.35rem;
        height: 1.35rem;
        flex-shrink: 0;
        padding: 0;
        border: none;
        border-radius: 6px;
        background: transparent;
        color: var(--vc-text-muted);
        cursor: pointer;
    }

    .panel-pin-btn:hover,
    .panel-pin-btn:focus-visible,
    .panel-pin-btn.is-pinned {
        color: var(--vc-text);
        background: rgba(255, 255, 255, 0.06);
        outline: none;
    }

    .panel-pin-btn.is-pinned {
        color: var(--vc-accent-soft);
        background: var(--vc-accent-muted);
    }

    .panel-pin-btn-chat {
        position: absolute;
        top: 0.4rem;
        right: 2.15rem;
        z-index: 4;
        background: rgba(9, 11, 16, 0.72);
    }

    body.is-free-dragging,
    body.is-free-dragging * {
        user-select: none;
    }

    .voice-sidebar.is-collapsed {
        padding: 0.4rem 0.3rem;
        overflow: hidden;
    }

    .voice-sidebar.is-collapsed > :not(.channels-sidebar-toolbar):not(.mobile-sheet-bar) {
        display: none;
    }

    .voice-sidebar.is-collapsed .channels-sidebar-toolbar {
        flex-direction: column;
        align-items: stretch;
        height: 100%;
    }

    .voice-sidebar.is-collapsed .channels-sidebar-toolbar .voice-sidebar-heading {
        display: none;
    }

    .voice-sidebar.is-collapsed .channels-panel-collapse-btn {
        width: 100%;
        min-height: 5.5rem;
        height: auto;
        padding: 0.55rem 0.15rem;
        flex-direction: column;
        gap: 0.4rem;
    }

    .voice-sidebar.is-collapsed .channels-panel-collapse-label {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.04em;
    }

    .members-sidebar.is-collapsed {
        padding: 0.4rem 0.3rem;
        overflow: hidden;
    }

    .members-sidebar.is-collapsed .members-sidebar-toolbar {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        height: 100%;
    }

    .members-sidebar.is-collapsed .members-toolbar-end {
        display: flex;
        justify-content: center;
        order: -1;
    }

    .members-sidebar.is-collapsed .voice-sidebar-header,
    .members-sidebar.is-collapsed .members-online-toggle,
    .members-sidebar.is-collapsed .member-list {
        display: none;
    }

    .members-sidebar.is-collapsed .members-panel-collapse-btn {
        width: 100%;
        min-height: 5.5rem;
        height: auto;
        padding: 0.55rem 0.15rem;
        flex-direction: column;
        gap: 0.4rem;
    }

    .members-sidebar.is-collapsed .members-panel-collapse-label {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.04em;
    }

    .screen-share-dock-side-btn,
    .chat-more-item.screen-share-menu-dock,
    .screen-share-position-menu {
        display: block;
    }

    .chat-layout.is-stream-side {
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
    }

    .chat-layout.is-stream-right {
        grid-template-columns: minmax(0, 1fr) var(--vc-stream-dock-width, min(40vw, 560px));
        grid-template-areas:
            "header stream"
            "alerts stream"
            "body stream";
    }

    .chat-layout.is-stream-left {
        grid-template-columns: var(--vc-stream-dock-width, min(40vw, 560px)) minmax(0, 1fr);
        grid-template-areas:
            "stream header"
            "stream alerts"
            "stream body";
    }

    .chat-layout.is-stream-side:not(:has(.screen-share-video-wrap)) {
        --vc-stream-dock-width: min(22rem, 36vw);
    }

    .chat-layout.is-stream-right.is-stream-collapsed {
        grid-template-columns: minmax(0, 1fr) 3.15rem;
    }

    .chat-layout.is-stream-left.is-stream-collapsed {
        grid-template-columns: 3.15rem minmax(0, 1fr);
    }

    .chat-layout.is-stream-side > .chat-header {
        grid-area: header;
    }

    .chat-layout.is-stream-side > .alert-inset {
        grid-area: alerts;
    }

    .chat-layout.is-stream-side > .chat-body {
        grid-area: body;
        min-height: 0;
    }

    .chat-layout.is-stream-side > .screen-share-panel {
        grid-area: stream;
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        height: 100%;
        margin: 0;
        border: none;
        border-radius: 0;
        background: rgba(9, 11, 16, 0.55);
        overflow: hidden;
    }

    .chat-layout.is-stream-right > .screen-share-panel {
        border-left: 1px solid var(--vc-border);
    }

    .chat-layout.is-stream-left > .screen-share-panel {
        border-right: 1px solid var(--vc-border);
    }

    .chat-layout.is-stream-side .screen-share-toolbar {
        flex-shrink: 0;
    }

    .chat-layout.is-stream-side .screen-share-video-wrap:not(.is-collapsed):not(.is-all-popped) {
        flex: 1 1 auto;
        width: 100%;
        height: auto !important;
        min-height: 140px;
        max-height: none;
    }

    .chat-layout.is-stream-side .screen-share-video-wrap.is-all-popped {
        flex: 0 0 auto;
    }

    .chat-layout.is-stream-side .screen-share-tile {
        min-height: 0;
    }

    .chat-layout.is-stream-side .screen-share-video,
    .chat-layout.is-stream-side .screen-share-video-host,
    .chat-layout.is-stream-side .screen-share-video-wrap.is-grid .screen-share-video,
    .chat-layout.is-stream-side .screen-share-video-wrap.is-grid .screen-share-video-host {
        min-height: 0;
        max-height: none;
        height: 100%;
    }

    .chat-layout.is-stream-side #screen-share-video-local.screen-share-video {
        max-height: none;
    }

    .chat-layout.is-stream-side.is-stream-collapsed .screen-share-panel {
        padding: 0.4rem 0.3rem;
    }

    .chat-layout.is-stream-side.is-stream-collapsed .screen-share-toolbar {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        margin-bottom: 0;
        gap: 0.35rem;
    }

    .chat-layout.is-stream-side.is-stream-collapsed .screen-share-toolbar > :not(.screen-share-toolbar-actions),
    .chat-layout.is-stream-side.is-stream-collapsed .screen-share-toolbar-actions > :not(.screen-share-collapse-btn) {
        display: none;
    }

    .chat-layout.is-stream-side.is-stream-collapsed .screen-share-collapse-btn {
        min-height: 4.5rem;
        padding: 0.45rem 0.2rem;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        justify-content: center;
    }
}

/* ── Nav logout button (outside NavMenu scoped CSS) ──────── */
.nav-logout-form {
    margin: 0.15rem 0 0;
}

@media (min-width: 769px) {
    .sidebar-inner.is-collapsed .nav-logout-form .nav-button {
        justify-content: center;
        gap: 0;
        padding: 0.4rem;
        width: 100%;
    }

    .sidebar-inner.is-collapsed .nav-logout-form .nav-link-label {
        display: none;
    }
}

.nav-logout-form .nav-button {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--vc-text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
}

.nav-logout-form .nav-button .nav-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    flex: 0 0 2rem;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav-logout-form .nav-button .nav-icon {
    width: 1.05rem;
    height: 1.05rem;
    opacity: 0.8;
    color: inherit;
}

.nav-logout-form .nav-button:hover {
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
}

.nav-logout-form .nav-button:hover .nav-icon-wrap {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.2);
    transform: translateY(-1px);
}

.nav-logout-form .nav-button:hover .nav-icon {
    opacity: 1;
}

/* ── Error page ──────────────────────────────────────────── */
.error-page {
    max-width: 560px;
    padding: 2rem 0;
}

.error-page h1 {
    color: var(--vc-danger);
    font-size: 1.5rem;
}

.error-page h2 {
    color: var(--vc-text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.error-page code {
    background: var(--vc-surface);
    padding: 0.15rem 0.4rem;
    border-radius: var(--vc-radius-xs);
    border: 1px solid var(--vc-border);
}

/* ── Blazor validation ───────────────────────────────────── */
.blazor-error-boundary {
    background: #7f1d1d;
    padding: 1rem 1rem 1rem 3.5rem;
    color: #fecaca;
    border-radius: var(--vc-radius-sm);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

h1:focus { outline: none; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .chat-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 0.75rem 0.85rem;
    }

    .chat-header h1 {
        font-size: 1.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chat-header-desc {
        display: none;
    }

    .chat-header-actions {
        align-items: center;
        gap: 0.35rem;
    }

    .chat-header-share-actions {
        display: none;
    }

    .chat-header-desktop-meta {
        display: none;
    }

    .chat-mobile-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        min-height: 2.35rem;
        padding: 0.35rem 0.65rem;
        border-radius: 999px;
        border: 1px solid var(--vc-border-strong);
        background: rgba(255, 255, 255, 0.03);
        color: var(--vc-text-secondary);
        font: inherit;
        font-size: 0.78rem;
        font-weight: 600;
        cursor: pointer;
    }

    .chat-mobile-chip.is-active {
        border-color: var(--vc-accent-border);
        background: rgb(var(--vc-accent-rgb) / 0.16);
        color: var(--vc-accent-soft);
    }

    .chat-mobile-chip-count {
        min-width: 1.1rem;
        padding: 0.05rem 0.35rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        font-size: 0.7rem;
        text-align: center;
    }

    .chat-header-more {
        display: block;
    }

    .group-card-link {
        flex-direction: column;
        align-items: flex-start;
    }

    .group-meta {
        align-items: flex-start;
    }

    .dm-shell {
        grid-template-columns: 1fr;
        height: 100%;
        min-height: calc(100dvh - 4.35rem);
        min-height: calc(100svh - 4.35rem);
        gap: 0;
    }

    .dm-shell.has-selection .dm-sidebar {
        display: none;
    }

    .dm-shell:not(.has-selection) .dm-stage {
        display: none;
    }

    .dm-sidebar,
    .dm-stage-empty,
    .dm-stage .chat-layout {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .dm-embedded-back {
        display: inline;
    }

    .chat-layout {
        height: calc(100dvh - 4.35rem);
        height: calc(100svh - 4.35rem);
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .chat-body {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr);
    }

    .mobile-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(0, 0, 0, 0.55);
    }

    .voice-sidebar,
    .members-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        width: auto;
        max-height: min(72dvh, 560px);
        border-right: none;
        border-left: none;
        border-bottom: none;
        border-top: 1px solid var(--vc-border-strong);
        border-radius: 18px 18px 0 0;
        background: #121614;
        padding: 0.75rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        transform: translateY(110%);
        transition: transform 0.22s ease;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
        pointer-events: none;
    }

    .voice-sidebar.mobile-open,
    .members-sidebar.mobile-open {
        transform: translateY(0);
        pointer-events: auto;
    }

    .mobile-sheet-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.15rem 0 0.65rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid var(--vc-border);
    }

    .mobile-sheet-title {
        font-size: 0.85rem;
        font-weight: 650;
        color: var(--vc-text);
    }

    .mobile-sheet-close {
        min-height: 2.25rem;
        padding: 0.35rem 0.75rem;
        border-radius: 999px;
        border: 1px solid var(--vc-border-strong);
        background: rgba(255, 255, 255, 0.04);
        color: var(--vc-text-secondary);
        font: inherit;
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
    }

    .chat-composer {
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    }

    .typing-indicator {
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    }

    .chat-composer {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    .composer-compose-row {
        flex-wrap: wrap;
    }

    .composer-toolbar {
        flex: 1 1 100%;
    }

    .composer-input {
        flex: 1 1 auto;
        min-height: 2.75rem;
        font-size: 16px;
    }

    .composer-send {
        min-width: 4.75rem;
        min-height: 2.75rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .emoji-toggle,
    .gif-toggle,
    .attach-toggle {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .chat-message-wrap {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
        grid-template-columns: 2.35rem minmax(0, 1fr);
        column-gap: 0.55rem;
    }

    .playing-card {
        width: 2.85rem;
    }

    .playing-card + .playing-card {
        margin-left: -0.55rem;
    }

    .user-avatar-md,
    .chat-avatar {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 0.85rem;
    }

    .chat-message-wrap .chat-message-hoverbar {
        display: none !important;
    }

    .chat-message,
    .chat-message * {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }

    .chat-messages {
        -webkit-touch-callout: none;
    }

    .message-longpress-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(0, 0, 0, 0.45);
    }

    .message-longpress-menu {
        display: flex;
        position: fixed;
        left: 50%;
        bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        z-index: 56;
        min-width: min(18rem, calc(100vw - 2rem));
        padding: 0.4rem;
        border-radius: 14px;
        border: 1px solid var(--vc-border-strong);
        background: var(--vc-surface-raised);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        gap: 0.2rem;
    }

    .message-longpress-item {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.85rem;
        padding: 0.55rem 1rem;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: var(--vc-text);
        font: inherit;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
    }

    .message-longpress-item:hover,
    .message-longpress-item:focus-visible {
        background: rgba(255, 255, 255, 0.06);
        outline: none;
    }

    .message-longpress-item.danger {
        color: #fecaca;
    }

    .message-longpress-item.danger:hover,
    .message-longpress-item.danger:focus-visible {
        background: rgba(248, 113, 113, 0.14);
    }

    .member-status-trigger::before {
        inset: -12px;
    }

    .friend-list-item {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .friend-list-meta {
        flex: 1 1 calc(100% - 3.5rem);
        min-width: 10rem;
    }

    .friend-list-actions {
        flex: 1 1 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
        justify-content: stretch;
    }

    .friend-list-actions .btn,
    .friend-list-actions a.btn {
        flex: 1 1 auto;
        min-height: 2.6rem;
    }

    .join-row {
        flex-direction: column;
    }

    .form-control {
        font-size: 16px;
    }

    .screen-share-panel {
        margin: 0;
        padding: 0.5rem 0.75rem;
        border-radius: 0;
    }

    .screen-share-collapse-btn {
        display: inline-flex;
    }

    .screen-share-dock-side-btn,
    .screen-share-options.is-dock-only,
    .chat-more-item.screen-share-menu-dock,
    .screen-share-position-menu {
        display: none;
    }

    .chat-layout.is-stream-side {
        display: flex;
        flex-direction: column;
    }

    .chat-layout.is-stream-side > .screen-share-panel {
        margin: 0;
        padding: 0.5rem 0.75rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .screen-share-video-wrap {
        height: min(36dvh, 240px);
        max-height: min(36dvh, 240px);
        min-height: 120px;
    }

    .screen-share-edge-resizer {
        display: none !important;
    }

    .chat-games-pane {
        padding: 0.75rem 0.75rem 1.1rem;
    }
}

/* Blazor injects #components-reconnect-modal with inline white/80% overlay and
   a 500ms visibility trick. Visibility transitions toward "visible" paint
   immediately, so brief circuit blips still grey out the UI. Hold opacity at 0
   for 3s (`backwards` fill during the delay), then fade in only if still
   reconnecting. Keep position:fixed — do not add a second modal in App.razor. */
#components-reconnect-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    text-align: center !important;
    color: var(--vc-text) !important;
    background-color: rgba(10, 12, 11, 0.48) !important;
    pointer-events: none;
    animation: vc-reconnect-reveal 0.15s ease 3s both;
}

@keyframes vc-reconnect-reveal {
    from {
        opacity: 0;
        visibility: hidden;
    }
    to {
        opacity: 1;
        visibility: visible;
    }
}

#components-reconnect-modal button,
#components-reconnect-modal a {
    pointer-events: auto;
}

.mention-inbox {
    position: relative;
}

.sidebar .mention-inbox > button.nav-link {
    appearance: none;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sidebar .mention-inbox > button.nav-link:hover,
.sidebar .mention-inbox > button.nav-link.is-open {
    background: rgba(255, 255, 255, 0.035);
    color: var(--vc-text);
}

.chat-mention-btn {
    position: relative;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--vc-border-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--vc-text-secondary);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chat-mention-btn:hover,
.chat-mention-btn:focus-visible,
.chat-mention-btn.is-open {
    background: rgba(255, 255, 255, 0.07);
    color: var(--vc-text);
    outline: none;
}

.chat-mention-badge {
    position: absolute;
    top: -0.32rem;
    right: -0.32rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #fb7185, #e11d48);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
    letter-spacing: 0;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.chat-header:has(.mention-inbox-menu) {
    position: relative;
    z-index: 30;
}

.mention-inbox.is-header .mention-inbox-menu {
    left: auto;
    right: 0;
    top: calc(100% + 0.35rem);
}

.mention-at {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0;
}

.mention-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: default;
}

.mention-inbox-menu {
    position: absolute;
    left: calc(100% + 0.45rem);
    top: 0;
    z-index: 80;
    width: min(22rem, 72vw);
    max-height: min(24rem, 70vh);
    overflow: auto;
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid var(--vc-border);
    background: #141816;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    isolation: isolate;
}

.mention-inbox-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 0.1rem 0.15rem 0.2rem;
}

.mention-clear {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--vc-text-muted);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
}

.mention-clear:hover,
.mention-clear:focus-visible {
    color: var(--vc-text);
    background: #1d2420;
    outline: none;
}

.mention-empty {
    margin: 0;
    padding: 0.75rem 0.7rem;
    color: var(--vc-text-muted);
    font-size: 0.82rem;
}

.mention-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.6rem;
    border: 0;
    border-radius: 8px;
    background: #141816;
    color: var(--vc-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mention-item:hover,
.mention-item:focus-visible {
    background: #1d2420;
    outline: none;
}

.mention-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
}

.mention-item-who {
    font-size: 0.82rem;
    font-weight: 600;
}

.mention-item-time,
.mention-item-place {
    color: var(--vc-text-muted);
    font-size: 0.72rem;
}

.mention-item-text {
    color: var(--vc-text-secondary);
    font-size: 0.8rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar:has(.mention-inbox-menu) {
    overflow: visible;
    z-index: 200;
}

@media (max-width: 768px) {
    .sidebar .mention-inbox-menu {
        position: static;
        width: 100%;
        max-height: 16rem;
        margin-top: 0.35rem;
    }
}
