.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--a2);
}

.invalid {
    outline: 1px solid var(--red);
}

.validation-message {
    color: var(--red);
}

#blazor-error-ui {
    background: var(--bg3);
    bottom: 0;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: var(--t1);
    border-top: 1px solid var(--red);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: rgba(255,71,87,0.15);
    border: 1px solid rgba(255,71,87,0.3);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem;
    color: var(--red);
    font-family: var(--fm);
    font-size: 0.875rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--bg3);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--acc);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* ToneVoice design tokens */
:root {
    --bg0: #0a0b0f;
    --bg1: #0f1117;
    --bg2: #161922;
    --bg3: #1e2330;
    --bg4: #252c3d;
    --acc: #3d8bff;
    --accg: rgba(61,139,255,0.25);
    --a2: #00e5a0;
    --a2g: rgba(0,229,160,0.2);
    --red: #ff4757;
    --warn: #ffa502;
    --t1: #e8edf5;
    --t2: #7a8499;
    --t3: #4a5568;
    --brd: rgba(255,255,255,0.07);
    --online: #00e5a0;
    --offline: #4a5568;
    --busy: #ff4757;
    --fd: 'Rajdhani', 'Trebuchet MS', 'Arial Narrow', Arial, sans-serif;
    --fb: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --fm: 'JetBrains Mono', 'Consolas', 'SF Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg0);
    color: var(--t1);
    font-family: var(--fb);
    font-size: 16px;
    line-height: 1.375;
}
code { color: var(--acc); }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Scrollbars */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; }

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.9; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.25); }
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes bar1 {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}
@keyframes bar2 {
    0%, 100% { height: 8px; }
    50% { height: 4px; }
}
@keyframes bar3 {
    0%, 100% { height: 12px; }
    50% { height: 6px; }
}

.fadein { animation: fadeIn 0.2s ease forwards; }

/* Typing indicator */
@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    background: var(--bg3);
    border-radius: 12px;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--t3);
    animation: typingDot 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

/* Status pulse */
.status-dot.online { animation: livePulse 2s ease-in-out infinite; }

/* Message entrance */
.message-enter { animation: fadeIn 0.15s ease forwards; }

/* Context menu / tooltip animation */
@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.pop-in { animation: popIn 0.12s ease forwards; }

/* Selection */
::selection {
    background: rgba(61, 139, 255, 0.3);
    color: var(--t1);
}

.auth-form {
    max-width: 420px;
    margin: 3rem auto;
    padding: 40px;
    background: var(--bg2);
    border: 1px solid var(--brd);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.auth-form h1 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--t1);
    font-family: var(--fd);
    font-weight: 700;
    font-size: 22px;
}
.auth-form .field { margin: 16px 0; }
.auth-form .field label {
    display: block;
    margin-bottom: 6px;
    color: var(--t3);
    font-family: var(--fm);
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.auth-form .field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--brd);
    border-radius: 11px;
    background: var(--bg3);
    color: var(--t1);
    box-sizing: border-box;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form .field input::placeholder { color: var(--t3); }
.auth-form .field input:focus { border-color: rgba(61,139,255,0.35); box-shadow: 0 0 0 3px rgba(61,139,255,0.08); }
.auth-form button {
    padding: 12px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.auth-form button:hover:not(:disabled) { background: #5a9fff; transform: translateY(-1px); box-shadow: 0 4px 12px var(--accg); }
.auth-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-form .error { color: var(--red); font-size: 13px; }
.auth-form a { color: var(--acc); text-decoration: none; }
.auth-form a:hover { text-decoration: underline; }
.auth-form p { color: var(--t3); margin-top: 16px; font-size: 13px; }

/* App layout */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-body { display: flex; flex: 1; overflow: hidden; }
.app-left {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}
.app-left .sidebars-wrapper { flex: 1; overflow: hidden; }

/* Rail — guild icons */
.guild-sidebar {
    width: 68px;
    min-width: 68px;
    background: var(--bg0);
    border-right: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 6px;
    flex-shrink: 0;
}
.sidebar-title { display: none; }
.guild-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg3);
    color: var(--t2);
    text-decoration: none;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.34,1.56,.64,1);
}
.guild-item:hover {
    border-radius: 14px;
    background: var(--acc);
    color: #fff;
}
.guild-item.active {
    border-radius: 14px;
    background: var(--acc);
    color: #fff;
    box-shadow: 0 0 16px var(--accg);
}
.guild-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    width: 3px;
    height: 32px;
    background: var(--acc);
    border-radius: 0 2px 2px 0;
}
.guild-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: inherit;
    border-radius: inherit;
    font-size: 1.1rem;
}
.guild-name { display: none; }
.guild-item.guild-home {
    background: var(--acc);
    border-radius: 14px;
    color: #fff;
}
.guild-item.guild-add {
    font-size: 22px;
    color: var(--a2);
    background: rgba(0,229,160,0.08);
    border: 1px dashed rgba(0,229,160,0.3);
}
.guild-item.guild-add:hover {
    background: var(--a2);
    color: #0a0b0f;
    border-radius: 14px;
    border-style: solid;
}
.create-guild {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 0;
}
.create-guild input {
    width: 44px;
    padding: 6px 8px;
    border: 1px solid var(--brd);
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--bg3);
    color: var(--t1);
    text-align: center;
}
.create-guild button {
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    background: rgba(0,229,160,0.08);
    color: var(--a2);
    border: 1px dashed rgba(0,229,160,0.3);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(.34,1.56,.64,1);
}
.create-guild button:hover:not(:disabled) {
    background: var(--a2);
    color: #0a0b0f;
    border-radius: 14px;
    border-style: solid;
}
.create-guild button:disabled { opacity: 0.5; }
.guild-divider {
    width: 32px;
    height: 1px;
    background: var(--brd);
    margin: 2px 0;
}

/* Contacts sidebar (Friends as sidebar - Phase 1) */
.csb {
    width: 280px;
    min-width: 280px;
    background: var(--bg1);
    border-right: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.csb-hdr { padding: 14px 16px 0; flex-shrink: 0; }
.csb-hdr-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.csb-title { font-family: var(--fd); font-size: 16px; font-weight: 700; letter-spacing: .5px; color: var(--t1); }
.csb-add-btn {
    width: 32px; height: 32px; border-radius: 8px; background: transparent; border: none;
    color: var(--t3); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.csb-add-btn:hover { background: var(--bg3); color: var(--t1); }
.csb-search {
    display: flex; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid var(--brd);
    border-radius: 9px; padding: 8px 12px; margin-bottom: 10px; cursor: text;
}
.csb-search input { background: none; border: none; outline: none; font-family: var(--fb); font-size: 13px; color: var(--t1); width: 100%; }
.csb-search input::placeholder { color: var(--t3); }
.csb-search-icon { font-size: 13px; color: var(--t3); flex-shrink: 0; }

.ctabs { display: flex; gap: 2px; padding: 0 16px 10px; flex-shrink: 0; }
.ctab {
    flex: 1; padding: 6px 8px; border-radius: 7px; border: none; background: transparent; color: var(--t3);
    font-family: var(--fm); font-size: 11px; letter-spacing: .5px; cursor: pointer; text-align: center;
    transition: all .15s; text-transform: uppercase; position: relative;
}
.ctab.on { background: var(--bg3); color: var(--t1); }
.ctab:hover:not(.on) { color: var(--t2); }
.ctab-badge { position: absolute; top: 2px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

.clist { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.clist::-webkit-scrollbar { width: 3px; }
.clist::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }
.clist-empty { padding: 16px; text-align: center; font-size: 13px; color: var(--t3); }

.clabel { font-family: var(--fm); font-size: 10px; color: var(--t3); letter-spacing: 1.5px; text-transform: uppercase; padding: 10px 8px 4px; }

.citem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background .12s; position: relative; }
.citem:hover { background: var(--bg3); }
.citem.active { background: var(--bg4); }
.citem.active .cnm { color: var(--t1); }
.citem-offline { opacity: .5; }
.cav {
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: var(--fd); font-weight: 700; font-size: 16px; flex-shrink: 0; position: relative;
}
.cav .dot { position: absolute; bottom: 1px; right: 1px; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--bg1); }
.cav .dot.on { background: var(--a2); }
.cav .dot.off { background: var(--t3); }
.cav .dot.dnd { background: var(--red); }
.cinfo { flex: 1; min-width: 0; }
.cnm { font-family: var(--fd); font-size: 15px; font-weight: 600; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .12s; }
.citem:hover .cnm { color: var(--t1); }
.csub { font-family: var(--fb); font-size: 11px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.cbdg { background: var(--red); color: #fff; font-family: var(--fm); font-size: 10px; font-weight: 700; border-radius: 8px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 5px; flex-shrink: 0; }
.cpend { background: rgba(255,165,2,.15); border: 1px solid rgba(255,165,2,.3); color: var(--warn); font-family: var(--fm); font-size: 10px; border-radius: 6px; padding: 2px 7px; flex-shrink: 0; }
.citem-actions { display: flex; gap: 4px; flex-shrink: 0; }

.upanel { padding: 8px 10px; border-top: 1px solid var(--brd); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.upav { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#00e5a0,#00b37a); display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-weight: 700; font-size: 14px; color: #0a0b0f; flex-shrink: 0; position: relative; cursor: pointer; }
.upav .dot { position: absolute; bottom: 1px; right: 1px; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--bg1); }
.uinfo { flex: 1; min-width: 0; }
.unm { font-family: var(--fd); font-size: 14px; font-weight: 700; color: var(--t1); line-height: 1; }
.utag { font-family: var(--fm); font-size: 12px; color: var(--t3); }
.uicn { width: 28px; height: 28px; border-radius: 7px; background: transparent; border: none; color: var(--t3); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0; text-decoration: none; }
.uicn:hover { background: var(--bg3); color: var(--t1); }
.uicn.active { color: var(--acc); }
.uicn.muted { color: var(--red); }
.uicn.muted:hover { color: var(--red); }

.main-nav-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }

.friends-home-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; padding: 48px 24px; text-align: center;
}
.friends-home-placeholder .friends-home-icon {
    width: 80px; height: 80px; border-radius: 20px; background: var(--bg3); border: 1px solid var(--brd);
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 2rem; color: var(--t3);
}
.friends-home-placeholder h2 { font-family: var(--fd); font-size: 22px; font-weight: 700; color: var(--t1); margin: 0 0 8px; }
.friends-home-placeholder p { font-size: 14px; color: var(--t2); margin: 0; }

/* Contacts / Channel sidebar */
.channel-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg1);
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--brd);
    flex-shrink: 0;
}
.channel-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--brd);
}
.channel-guild-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--t1);
    font-family: var(--fd);
}
.btn-invite {
    width: 100%;
    padding: 8px 12px;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 500;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-invite:hover:not(:disabled) { background: #5a9fff; box-shadow: 0 0 12px var(--accg); }
.btn-invite:disabled { opacity: 0.5; cursor: not-allowed; }
.channel-section { margin-bottom: 4px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 10px 16px 4px;
}
.section-header:hover .section-add-btn { opacity: 1; }
.section-label {
    font-size: 11px;
    color: var(--t3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-family: var(--fb);
}
.section-add-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    background: transparent;
    color: var(--t3);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.section-add-btn:hover {
    color: var(--t1);
    background: var(--bg3);
}
.channel-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin: 1px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--t2);
    font-size: 14px;
    font-family: var(--fb);
    transition: background 0.12s, color 0.12s;
}
.channel-item:hover { background: var(--bg3); color: var(--t1); text-decoration: none; }
.channel-item.active { background: rgba(61,139,255,0.12); color: var(--acc); }
.channel-item.active .channel-icon { color: var(--acc); opacity: 1; }
.channel-item .channel-icon { opacity: 0.5; font-size: 15px; color: var(--t3); transition: color 0.12s, opacity 0.12s; }
.channel-icon-text { font-weight: 600; }
.channel-icon-voice { font-size: 14px; }
.channel-voice { color: var(--t2); }
.channel-voice:hover { color: var(--t1); text-decoration: none; }
.presence-section {
    margin-top: auto;
    padding: 12px 12px 8px;
    border-top: 1px solid var(--brd);
}
.presence-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    font-size: 13px;
    color: var(--t2);
    border-radius: 6px;
    transition: background 0.12s;
}
.presence-item:hover { background: var(--bg3); }

.main-content {
    flex: 1;
    background: var(--bg2);
    color: var(--t1);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.main-full { padding: 2rem; }
.auth-layout-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.welcome-screen {
    padding: 3rem 2rem;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}
.welcome-screen .welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--acc);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 24px var(--accg);
}
.welcome-screen h1 { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--t1); font-weight: 700; font-family: var(--fd); }
.welcome-screen p { color: var(--t2); margin-bottom: 0.5rem; }
.welcome-screen .hint { font-size: 0.9rem; color: var(--t3); }
.welcome-screen .btn-primary { display: inline-block; padding: 10px 20px; background: var(--acc); color: #fff; text-decoration: none; border-radius: 8px; margin-right: 0.5rem; font-weight: 500; transition: background 0.15s, box-shadow 0.15s; }
.welcome-screen .btn-primary:hover { background: #5a9fff; box-shadow: 0 0 12px var(--accg); }
.status-dot { width: 8px; height: 8px; min-width: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: var(--online); box-shadow: 0 0 6px var(--online); }
.status-dot.offline { background: var(--offline); }
.status-dot.speaking { background: var(--online); box-shadow: 0 0 8px var(--online); animation: pulse 1.5s ease infinite; }
.status-dot.muted { background: var(--offline); }
.status-dot.busy { background: var(--busy); }

/* Friends page */
.friends-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 20px 24px;
    overflow-x: hidden;
}
.friends-header { margin-bottom: 16px; flex-shrink: 0; }
.friends-layout h1 { margin: 0 0 12px; font-size: 20px; font-family: var(--fd); font-weight: 700; color: var(--t1); }
.friends-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.friends-tab {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: var(--t3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.12s, color 0.12s;
}
.friends-tab:hover { color: var(--t1); background: var(--bg3); }
.friends-tab.active { background: rgba(61,139,255,0.12); color: var(--acc); }
.friends-tab--add { color: var(--a2); }
.friends-tab--add:hover { background: rgba(0,229,160,0.08); color: var(--a2); }
.friends-tab--add.active { background: rgba(0,229,160,0.12); color: var(--a2); }
.friends-tab .tab-icon-online { font-size: 8px; color: var(--online); }
.tab-badge {
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.add-friend-section { display: flex; gap: 8px; margin-bottom: 12px; flex-shrink: 0; }
.add-friend-section .search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--brd);
    border-radius: 11px;
    background: var(--bg3);
    color: var(--t1);
    font-size: 14px;
    transition: border-color 0.15s;
}
.add-friend-section .search-input:focus { outline: none; border-color: var(--acc); }
.add-friend-section button {
    padding: 10px 20px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
    flex-shrink: 0;
}
.add-friend-section button:hover:not(:disabled) { background: #5a9fff; }
.add-friend-section button:disabled { opacity: 0.5; cursor: not-allowed; }

.search-results, .friends-list { margin-top: 8px; flex: 1; min-height: 0; min-width: 0; overflow-x: hidden; overflow-y: auto; padding-right: 8px; box-sizing: border-box; }
.search-results h3, .friends-list h3 {
    font-family: var(--fm);
    font-size: 10px;
    color: var(--t3);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 400;
}

/* Friend avatar */
.friend-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 15px;
    position: relative;
    flex-shrink: 0;
}
.friend-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border: 2.5px solid var(--bg2);
    border-radius: 50%;
}

.friend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.12s;
    min-width: 0;
}
.friend-row:hover { background: var(--bg3); }
.friend-row-clickable { cursor: pointer; }
.friend-row--pending { opacity: 0.85; }
.friend-row-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friend-last-message { font-size: 12px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--fd);
    font-weight: 600;
    font-size: 15px;
    color: var(--t1);
}
.friend-subtitle { font-size: 12px; color: var(--t3); }
.friend-subtitle--pending { color: var(--warn); }

/* Search result: add friend button */
.btn-add-friend {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    margin-left: auto;
}
.btn-add-friend:hover:not(:disabled) { background: #5a9fff; }
.btn-add-friend:disabled { opacity: 0.5; cursor: not-allowed; }

.friend-sent-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--a2);
    margin-left: auto;
    flex-shrink: 0;
}

/* Friend request badge & actions */
.friend-request-badge {
    font-family: var(--fm);
    font-size: 10px;
    font-weight: 500;
    color: var(--warn);
    background: rgba(255,170,51,0.1);
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.friend-request-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.btn-accept {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,229,160,0.1);
    color: var(--a2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s;
}
.btn-accept:hover { background: var(--a2); color: #0a0b0f; }
.btn-decline {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,68,68,0.08);
    color: var(--red);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s;
}
.btn-decline:hover { background: var(--red); color: #fff; }

.btn-dm {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-dm:hover { background: #5a9fff; }
.btn-remove {
    padding: 4px 8px;
    background: transparent;
    color: var(--t3);
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
    border-radius: 4px;
}
.friend-row:hover .btn-remove,
.friend-row:focus-within .btn-remove { opacity: 1; }
.btn-remove:hover { color: var(--red); background: rgba(255,68,68,0.08); }

/* Empty states */
.friends-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    gap: 8px;
}
.friends-empty-emoji { font-size: 40px; line-height: 1; }
.friends-empty-state p { color: var(--t3); font-size: 14px; margin: 0; }

.friends-layout .hint { color: var(--t3); font-size: 13px; }
.chat-header { padding: 8px 16px; border-bottom: 1px solid var(--brd); }
.back-link {
    color: var(--t3);
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.12s;
}
.back-link:hover { color: var(--t1); text-decoration: none; }

.invite-layout { padding: 2rem; max-width: 420px; margin: 0 auto; text-align: center; }
.invite-layout h1 { font-family: var(--fd); font-weight: 700; font-size: 20px; margin-bottom: 16px; color: var(--t1); }
.invite-card { background: var(--bg2); border: 1px solid var(--brd); border-radius: 20px; padding: 32px; box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.guild-icon-large { width: 64px; height: 64px; margin: 0 auto 16px; background: linear-gradient(135deg, var(--acc), #a855f7); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-weight: 700; font-size: 24px; color: #fff; }
.invite-card h2 { margin: 0 0 20px; font-family: var(--fd); font-weight: 700; font-size: 18px; color: var(--t1); }
.invite-layout .error { color: var(--red); font-size: 13px; }

/* Voice layout */
.voice-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    max-width: 100%;
    overflow: hidden;
}
.voice-main {
    display: flex;
    flex: 1;
    min-height: 0;
}
.voice-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px;
}
.voice-channel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.voice-channel-header h2 {
    margin: 0;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 18px;
    color: var(--t1);
}
.voice-channel-icon { color: var(--t3); font-size: 18px; }
.voice-connect-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 1;
}
.voice-error { color: var(--red); font-size: 13px; margin: 0; }
.btn-join {
    padding: 12px 32px;
    background: var(--a2);
    color: #0a0b0f;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 16px;
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-join:hover:not(:disabled) { background: #00c98a; box-shadow: 0 0 16px rgba(0,229,160,0.25); transform: translateY(-1px); }
.btn-join:disabled { opacity: 0.6; cursor: not-allowed; }

/* Voice sidebar */
.voice-participants-sidebar {
    width: 280px;
    min-width: 280px;
    border-left: 1px solid var(--brd);
    background: var(--bg1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.voice-participants-title {
    font-family: var(--fm);
    font-size: 10px;
    font-weight: 400;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    padding: 14px 16px 8px;
}
.voice-participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 12px;
}

/* Voice controls */
.voice-controls-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg1);
    border-top: 1px solid var(--brd);
}
.voice-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 52px;
    height: 52px;
    justify-content: center;
    background: var(--bg3);
    color: var(--t2);
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.15s;
}
.voice-control-btn .bi { font-size: 18px; }
.voice-control-btn span { font-size: 0; }
.voice-control-btn:hover { background: var(--bg4); color: var(--t1); }
.voice-control-btn.btn-mute.unmuted {
    background: rgba(0,229,160,0.12);
    color: var(--a2);
    border-color: rgba(0,229,160,0.25);
}
.voice-control-btn.btn-mute.unmuted:hover { background: rgba(0,229,160,0.2); }
.voice-control-btn.btn-mute:not(.unmuted) {
    background: rgba(255,68,68,0.1);
    color: var(--red);
    border-color: rgba(255,68,68,0.2);
}
.voice-control-btn.btn-camera.active,
.voice-control-btn.btn-screen.active {
    background: rgba(0,229,160,0.12);
    color: var(--a2);
    border-color: rgba(0,229,160,0.25);
}
.voice-control-btn.btn-invite-voice {
    background: var(--acc);
    color: #fff;
    width: auto;
    padding: 0 16px;
    flex-direction: row;
    gap: 6px;
}
.voice-control-btn.btn-invite-voice span { font-size: 12px; font-weight: 500; }
.voice-control-btn.btn-invite-voice:hover { background: #5a9fff; }
.voice-control-btn.btn-leave {
    background: var(--red);
    color: #fff;
    width: auto;
    padding: 0 20px;
    flex-direction: row;
    gap: 6px;
}
.voice-control-btn.btn-leave span {
    font-size: 13px;
    font-family: var(--fd);
    font-weight: 700;
}
.voice-control-btn.btn-leave:hover { background: #e03a3a; box-shadow: 0 0 12px rgba(255,68,68,0.25); }

/* Voice tiles grid */
.voice-tiles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0;
    align-content: center;
    justify-content: center;
}
.voice-tile {
    width: 200px;
    height: 200px;
    background: var(--bg2);
    border-radius: 20px;
    border: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.voice-tile.voice-tile--speaking {
    border-color: var(--a2);
    box-shadow: 0 0 0 3px rgba(0,229,160,0.12);
}
.voice-tile-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}
.voice-tile-video--hidden { display: none; }
.voice-tile-video--visible { display: block; }
.voice-tile-video--visible + .voice-tile-avatar { display: none; }
.voice-tile-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.voice-tile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 8px;
}
.voice-tile-name {
    font-family: var(--fd);
    font-weight: 600;
    font-size: 15px;
    color: var(--t1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 0 12px;
    text-align: center;
}
.voice-tile-speaking-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: var(--a2);
    font-size: 14px;
}
.voice-tile--muted { opacity: 0.65; }
.voice-tile-muted-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--red);
}
.voice-sound-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    margin-top: 4px;
}
.voice-sound-bars span {
    width: 4px;
    background: var(--a2);
    border-radius: 2px;
}
.voice-sound-bars span:nth-child(1) { animation: bar1 0.6s ease-in-out infinite; }
.voice-sound-bars span:nth-child(2) { animation: bar2 0.5s ease-in-out infinite 0.1s; }
.voice-sound-bars span:nth-child(3) { animation: bar1 0.55s ease-in-out infinite 0.2s; }
.voice-sound-bars span:nth-child(4) { animation: bar3 0.65s ease-in-out infinite; }
/* Screen share tile */
.voice-tile-screen {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 10;
    padding: 0;
}
.voice-tile-screen--hidden { display: none; }
.voice-tile-screen .screen-share-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 20px;
}
.screen-share-container.screen-share--hidden { display: none; }
.screen-share-container.screen-share--visible {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
}
.voice-tile-screen .btn-watch-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--fd);
    font-weight: 600;
    font-size: 14px;
    z-index: 4;
}
.voice-tile-screen .btn-watch-screen:hover { background: rgba(0,0,0,0.75); }
.voice-tile-screen .screen-share-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.voice-tile-expand {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 5;
    transition: background 0.15s;
}
.voice-tile-expand:hover { background: rgba(0,0,0,0.8); }
.voice-tile-expand--camera { top: 8px; right: 8px; }
.voice-tile-video-overlay-controls {
    position: absolute; top: 12px; left: 12px; right: 12px; z-index: 10;
    display: flex; align-items: center; justify-content: flex-start;
}
.btn-exit-video-fullscreen {
    padding: 8px 14px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-exit-video-fullscreen:hover { background: rgba(0,0,0,0.9); }

/* Fullscreen */
.voice-tile.voice-tile--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 900;
    width: auto;
    height: auto;
    aspect-ratio: auto;
    border-radius: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    flex-direction: column;
}
.voice-tile.voice-tile--fullscreen .voice-tile-video {
    flex: 1;
    min-height: 0;
    display: block !important;
}
.voice-tile.voice-tile--fullscreen .voice-tile-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.voice-tile.voice-tile-screen--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 900;
    width: auto;
    height: auto;
    max-width: none;
    aspect-ratio: auto;
    border-radius: 0;
    background: rgba(0,0,0,0.95);
}
.voice-tile-screen--fullscreen .screen-share-container {
    flex: 1;
    min-height: 0;
    border-radius: 0;
}
.voice-tile-screen--fullscreen .screen-share-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.screen-share-overlay-controls {
    position: absolute; top: 12px; left: 12px; right: 12px; z-index: 10;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.screen-share-quality {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.screen-share-quality .quality-label { font-size: 13px; color: rgba(255,255,255,0.8); }
.quality-btn {
    padding: 6px 12px; font-size: 12px;
    background: rgba(255,255,255,0.1); color: white;
    border: 1px solid rgba(255,255,255,0.25); border-radius: 8px; cursor: pointer;
    transition: background 0.15s;
}
.quality-btn:hover { background: rgba(255,255,255,0.2); }
.quality-btn.active { background: var(--acc); border-color: var(--acc); }
.btn-exit-screen-share {
    padding: 8px 14px; background: rgba(255,255,255,0.15); color: white;
    border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; cursor: pointer;
    font-size: 13px; transition: background 0.15s;
}
.btn-exit-screen-share:hover { background: rgba(255,255,255,0.25); }

/* Participant items in sidebar */
.participant-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.12s;
}
.participant-item:hover { background: var(--bg3); }
.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.participant-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--fd);
    font-weight: 600;
    font-size: 14px;
    color: var(--t1);
}
.participant-status {
    font-family: var(--fm);
    font-size: 11px;
    color: var(--t3);
}
.muted-label {
    font-family: var(--fm);
    font-size: 11px;
    color: var(--red);
}
.participant-badge {
    font-family: var(--fm);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(61,139,255,0.1);
    color: var(--acc);
}

/* Voice sidebar tabs */
.voice-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--brd);
    padding: 0 12px;
}
.voice-sidebar-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--t3);
    font-family: var(--fd);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-align: center;
}
.voice-sidebar-tab:hover { color: var(--t2); }
.voice-sidebar-tab.active {
    color: var(--acc);
    border-bottom-color: var(--acc);
}

/* Voice sidebar chat */
.voice-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.voice-chat-empty {
    text-align: center;
    color: var(--t3);
    font-size: 13px;
    margin-top: 24px;
}
.voice-chat-input {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--brd);
}
.voice-chat-input input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 10px;
    color: var(--t1);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.voice-chat-input input::placeholder { color: var(--t3); }
.voice-chat-input input:focus { border-color: rgba(61,139,255,0.35); }
.voice-chat-send {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}
.voice-chat-send:hover { background: #5a9fff; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay { animation: fadeIn 0.15s ease forwards; }
.modal-overlay.af-modal { display: none; }
.modal-overlay.af-modal.show { display: flex; }
.af-modal-content {
    background: var(--bg2);
    border: 1px solid var(--brd);
    border-radius: 20px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 32px 80px rgba(0,0,0,.8);
    overflow: hidden;
}
.af-modal-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--brd);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.af-modal-title {
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--t1);
}
.af-modal-sub {
    font-family: var(--fb);
    font-size: 13px;
    color: var(--t2);
    margin-top: 3px;
}
.af-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    color: var(--t2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.af-modal-close:hover { color: var(--t1); }
.af-modal-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 11px;
    padding: 10px 14px;
    margin: 20px 24px 16px;
    transition: border-color .15s;
}
.af-modal-search:focus-within { border-color: rgba(61,139,255,.4); }
.af-modal-search input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--t1);
    width: 100%;
}
.af-search-icon { color: var(--t3); flex-shrink: 0; }
.af-modal-results {
    padding: 0 24px 24px;
    max-height: 340px;
    overflow-y: auto;
}
.af-hint, .af-empty {
    text-align: center;
    padding: 24px 0 8px;
}
.af-hint-icon, .af-empty-icon { font-size: 32px; margin-bottom: 10px; }
.af-hint-title, .af-empty-title {
    font-family: var(--fd);
    font-size: 15px;
    font-weight: 600;
    color: var(--t2);
}
.af-hint-sub, .af-empty-sub {
    font-family: var(--fb);
    font-size: 13px;
    color: var(--t3);
    margin-top: 4px;
}
.af-hint-example { color: var(--acc); font-family: var(--fm); }
.af-loading {
    text-align: center;
    padding: 24px;
    color: var(--t2);
    font-size: 14px;
}
.af-results-list { display: flex; flex-direction: column; gap: 8px; }
.af-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--brd);
    background: var(--bg3);
    transition: border-color .15s;
}
.af-result-row:hover { border-color: rgba(61,139,255,.3); }
.af-result-av {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.af-result-info { flex: 1; min-width: 0; }
.af-result-name {
    font-family: var(--fd);
    font-size: 16px;
    font-weight: 700;
    color: var(--t1);
}
.af-result-sub {
    font-family: var(--fb);
    font-size: 12px;
    color: var(--t2);
    margin-top: 1px;
}
.af-result-action { flex-shrink: 0; }
.af-btn-add {
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    background: var(--acc);
    color: #fff;
    font-family: var(--fm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.af-btn-add:hover:not(:disabled) { opacity: .85; }
.af-btn-add:disabled { opacity: .6; cursor: not-allowed; }
.af-btn-sent {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0,229,160,.3);
    background: rgba(0,229,160,.08);
    color: var(--a2);
    font-family: var(--fm);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}
.modal-content {
    background: var(--bg2);
    border-radius: 20px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    border: 1px solid var(--brd);
    animation: popIn 0.2s cubic-bezier(.34,1.56,.64,1) forwards;
}
.modal-content h3 {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 20px;
    color: var(--t1);
    margin: 0 0 4px;
}
.modal-content .modal-subtitle {
    font-size: 13px;
    color: var(--t3);
    margin: 0 0 16px;
}
.modal-content .field { margin: 12px 0; }
.modal-content .field label {
    display: block;
    margin-bottom: 6px;
    color: var(--t2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.modal-content .field input,
.modal-content .field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--brd);
    border-radius: 11px;
    background: var(--bg3);
    color: var(--t1);
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-content .field input:focus,
.modal-content .field select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(61,139,255,0.08); }
.modal-content .field select { cursor: pointer; }
.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--t3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.12s, color 0.12s;
    position: absolute;
    top: 16px;
    right: 16px;
}
.modal-close-btn:hover { background: var(--bg3); color: var(--t1); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.btn-primary {
    padding: 9px 18px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) { background: #5a9fff; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
    padding: 9px 18px;
    background: var(--bg3);
    color: var(--t2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
}
.btn-secondary:hover { background: var(--bg4); color: var(--t1); }
.voice-invite-modal h3, .voice-invite-received p { margin: 0 0 1rem; }
.friends-invite-list { max-height: 200px; overflow-y: auto; margin-bottom: 1rem; }
.friend-invite-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; }
.friend-invite-row button { margin-left: auto; padding: 0.3rem 0.6rem; font-size: 0.85rem; background: var(--acc); color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.btn-close-modal { padding: 0.5rem 1rem; background: var(--bg4); color: var(--t1); border: none; border-radius: 4px; cursor: pointer; width: 100%; }
.invite-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.btn-dismiss { padding: 0.5rem 1rem; background: var(--bg4); color: var(--t1); border: none; border-radius: 4px; cursor: pointer; }

/* Context menu */
.context-menu {
    position: fixed;
    z-index: 1100;
    min-width: 200px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    animation: popIn 0.12s ease forwards;
}
.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--t1);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.context-menu-item:hover { background: var(--bg4); }
.context-menu-item--danger { color: var(--red); }
.context-menu-item--danger:hover { background: rgba(255,68,68,0.1); }
.context-menu-separator {
    height: 1px;
    background: var(--brd);
    margin: 4px 8px;
}

/* Tooltip */
.tooltip {
    position: fixed;
    z-index: 1200;
    padding: 6px 12px;
    background: var(--bg4);
    color: var(--t1);
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    animation: popIn 0.1s ease forwards;
    white-space: nowrap;
}

/* Chat layout */
.chat-layout { display: flex; flex-direction: column; height: 100%; flex: 1; }
.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 52px;
    min-height: 52px;
    border-bottom: 1px solid var(--brd);
    background: var(--bg2);
    flex-shrink: 0;
}
.chat-header-bar .chat-header-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 13px;
    position: relative;
    flex-shrink: 0;
}
.chat-header-bar .chat-header-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg2);
}
.chat-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.chat-header-bar .chat-header-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 16px;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-header-status {
    font-family: var(--fm);
    font-size: 11px;
    color: var(--a2);
}
.chat-header-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.chat-header-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--t3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.12s, color 0.12s;
}
.chat-header-btn:hover { background: var(--bg3); color: var(--t1); }
.chat-header-btn.active { background: var(--bg3); color: var(--acc); }
.chat-body-row {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.chat-body-row .messages {
    flex: 1;
    min-width: 0;
}
.btn-call {
    margin-left: auto;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--a2);
    color: #0a0b0f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-call:hover { background: #00c98a; box-shadow: 0 0 12px rgba(0,229,160,0.25); }

/* Anonymous room */
.anon-room-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg0);
}
.anon-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--brd);
    background: var(--bg1);
}
.anon-room-header span {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 16px;
    color: var(--t1);
}
.btn-copy {
    padding: 7px 14px;
    font-size: 12px;
    font-family: var(--fd);
    font-weight: 600;
    background: var(--bg3);
    color: var(--t2);
    border: 1px solid var(--brd);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-copy:hover { background: var(--bg4); color: var(--t1); }
.anon-room-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.anon-voice-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-width: 0;
}
.anon-voice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-content: center;
    padding: 16px 0;
}
.anon-chat-section {
    width: 280px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--brd);
    background: var(--bg1);
}
.anon-chat-section .messages { flex: 1; overflow-y: auto; padding: 12px; }
.anon-chat-section .input-area {
    display: flex;
    padding: 10px 12px;
    gap: 8px;
    border-top: 1px solid var(--brd);
}
.anon-chat-section .input-area input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--brd);
    border-radius: 10px;
    background: var(--bg3);
    color: var(--t1);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.anon-chat-section .input-area input::placeholder { color: var(--t3); }
.anon-chat-section .input-area input:focus { border-color: rgba(61,139,255,0.35); }
.anon-chat-section .input-area button {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.anon-chat-section .input-area button:hover { background: #5a9fff; }

/* Room screen (design) */
.room-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg0);
}
.room-header {
    height: 52px;
    background: var(--bg1);
    border-bottom: 1px solid var(--brd);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    flex-shrink: 0;
}
.room-name-tag { font-family: var(--fd); font-size: 18px; font-weight: 700; letter-spacing: .5px; color: var(--t1); }
.room-live {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255,71,87,.1);
    border: 1px solid rgba(255,71,87,.25);
    font-family: var(--fm);
    font-size: 11px;
    color: var(--red);
    letter-spacing: .5px;
}
.room-live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    animation: livePulse 1.2s ease-in-out infinite;
}
.room-timer { font-family: var(--fm); font-size: 12px; color: var(--t3); margin-left: auto; }
.room-hbtn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg3);
    color: var(--t2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.room-hbtn:hover { background: var(--bg4); color: var(--t1); }
.room-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.room-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 24px 24px;
    gap: 0;
    overflow: auto;
    align-items: center;
    justify-content: center;
}
.room-side {
    width: 280px;
    min-width: 280px;
    background: var(--bg1);
    border-left: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
}
.rs-tabs { display: flex; border-bottom: 1px solid var(--brd); }
.rstab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--t3);
    border: none;
    background: transparent;
    transition: all .15s;
    border-bottom: 2px solid transparent;
}
.rstab.on { color: var(--t1); border-bottom-color: var(--acc); }
.rs-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.rs-body::-webkit-scrollbar { width: 3px; }
.rs-body::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }
.room-chat-messages { display: flex; flex-direction: column; gap: 6px; }
.lmsg {
    font-size: 13px;
    color: var(--t2);
    line-height: 1.4;
}
.lmsg-who {
    font-weight: 600;
    margin-right: 6px;
}
.room-participants-hint {
    font-family: var(--fm);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--t3);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.room-upsell {
    margin: 0 12px 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(61,139,255,.08), rgba(0,229,160,.05));
    border: 1px solid rgba(61,139,255,.18);
    border-radius: 12px;
}
.room-upsell-title {
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    margin-bottom: 4px;
}
.room-upsell-text {
    font-size: 12px;
    color: var(--t2);
    line-height: 1.4;
    margin-bottom: 10px;
}
.room-upsell-btn {
    display: block;
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: var(--acc);
    color: #fff;
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .15s;
}
.room-upsell-btn:hover { background: #5a9fff; }
.ls-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    flex-shrink: 0;
    border-top: 1px solid var(--brd);
}
.ls-mi {
    flex: 1;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 10px;
    padding: 9px 14px;
    color: var(--t1);
    font-family: var(--fb);
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}
.ls-mi:focus { border-color: rgba(61,139,255,.4); }
.ls-mi::placeholder { color: var(--t3); }
.ls-send {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--acc);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s;
}
.ls-send:hover { opacity: .85; }
.ls-send:disabled { opacity: .6; cursor: not-allowed; }

/* Anonymous room entry (join form) */
.anon-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg0);
}
.anon-entry-card {
    width: 420px;
    max-width: 90vw;
    background: var(--bg2);
    border: 1px solid var(--brd);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}
.anon-entry-card h1 {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 22px;
    color: var(--t1);
    margin: 0 0 8px;
}
.anon-entry-card p {
    color: var(--t3);
    font-size: 13px;
    margin: 0 0 24px;
}
.anon-entry-card .field { margin: 16px 0; text-align: left; }
.anon-entry-card .field label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--fm);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t3);
}
.anon-entry-card .field input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 11px;
    color: var(--t1);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.anon-entry-card .field input:focus { border-color: rgba(61,139,255,0.35); }
.anon-entry-card .error {
    color: var(--red);
    font-size: 13px;
    margin-bottom: 12px;
}
.anon-entry-card button.anon-join-btn {
    width: 100%;
    padding: 12px;
    background: var(--a2);
    color: #0a0b0f;
    border: none;
    border-radius: 12px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s, box-shadow 0.15s;
}
.anon-entry-card button.anon-join-btn:hover:not(:disabled) { background: #00c98a; box-shadow: 0 0 16px rgba(0,229,160,0.25); }
.anon-entry-card button.anon-join-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Guest entry card */
.guest-entry-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 20%, rgba(0,229,160,.06) 0%, transparent 60%), var(--bg0);
}
.guest-card {
    width: 440px;
    max-width: 90vw;
    background: var(--bg1);
    border: 1px solid var(--brd);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.guest-banner {
    height: 120px;
    background: linear-gradient(135deg, #0f2444, #0a1a2e);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.guest-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(0,229,160,.15), transparent 60%);
}
.gbanner-room { text-align: center; position: relative; z-index: 1; }
.gbanner-icon { font-size: 40px; margin-bottom: 6px; }
.gbanner-name { font-family: var(--fd); font-size: 20px; font-weight: 700; letter-spacing: .5px; color: #fff; }
.gbanner-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--fm);
    font-size: 12px;
    color: var(--a2);
    margin-top: 8px;
    letter-spacing: .3px;
}
.gbanner-live .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--a2);
    animation: livePulse 1.2s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.guest-body { padding: 24px; }
.guest-avatars-hint { margin-bottom: 20px; }
.guest-avatars-stack {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.gav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid var(--bg1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    margin-right: -10px;
}
.guest-avatars-sub { font-size: 13px; color: var(--t2); margin-top: 10px; }
.guest-field { margin-bottom: 16px; }
.guest-body .error { margin-bottom: 12px; }
.btn-join {
    width: 100%;
    padding: 14px;
    border-radius: 11px;
    border: none;
    background: var(--a2);
    color: #0a0b0f;
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-join:hover:not(:disabled) { background: #00f5b0; transform: translateY(-1px); }
.btn-join:disabled { opacity: .6; cursor: not-allowed; }

/* Room setup screen */
.room-setup-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(61,139,255,.07) 0%, transparent 65%), var(--bg0);
    padding: 32px;
}
.room-setup-card {
    width: 520px;
    max-width: 100%;
    background: var(--bg1);
    border: 1px solid var(--brd);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.45);
}
.room-setup-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--brd);
    display: flex;
    align-items: center;
    gap: 14px;
}
.room-setup-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(61,139,255,.12);
    border: 1px solid rgba(61,139,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--acc);
}
.room-setup-header-title {
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--t1);
}
.room-setup-header-sub {
    font-size: 12px;
    color: var(--t2);
    margin-top: 2px;
}
.room-setup-body { padding: 24px 28px; }
.room-setup-field { margin-bottom: 22px; }
.room-setup-icon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.room-setup-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all .15s;
}
.room-setup-icon-btn.on {
    background: rgba(61,139,255,.1);
    border-color: var(--acc);
}
.room-setup-limit-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.room-setup-limit-chip {
    flex: 1;
    padding: 10px 6px;
    border-radius: 9px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    text-align: center;
    cursor: pointer;
    font-family: var(--fd);
    font-size: 16px;
    font-weight: 700;
    color: var(--t2);
    transition: all .15s;
}
.room-setup-limit-chip.on {
    background: rgba(61,139,255,.1);
    border-color: var(--acc);
    color: var(--acc);
}
.room-setup-toggles {
    background: var(--bg2);
    border: 1px solid var(--brd);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 22px;
}
.room-setup-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--brd);
}
.room-setup-toggle-row:last-of-type { border-bottom: none; }
.room-setup-toggle-title { font-size: 14px; font-weight: 500; color: var(--t1); margin-bottom: 2px; }
.room-setup-toggle-sub { font-size: 12px; color: var(--t2); }
.room-setup-password-field { padding: 0 16px 14px; }
.room-setup-preview {
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 10px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.room-setup-preview-icon { color: var(--t3); flex-shrink: 0; }
.room-setup-preview-url {
    font-family: var(--fm);
    font-size: 12px;
    color: var(--acc);
    flex: 1;
}
.room-setup-preview-ttl { font-family: var(--fm); font-size: 12px; color: var(--warn); }
.room-setup-error { color: var(--red); font-size: 13px; margin-bottom: 16px; }
.room-setup-actions {
    display: flex;
    gap: 10px;
}
.room-setup-btn-back {
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--brd);
    background: transparent;
    color: var(--t2);
    font-family: var(--fb);
    font-size: 14px;
    text-decoration: none;
    transition: all .15s;
}
.room-setup-btn-back:hover { background: var(--bg3); color: var(--t1); }
.room-setup-btn-create {
    flex: 1;
    padding: 13px;
    border-radius: 10px;
    border: none;
    background: var(--acc);
    color: #fff;
    font-family: var(--fd);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.room-setup-btn-create:hover:not(:disabled) { background: #5a9fff; }
.room-setup-btn-create:disabled { opacity: .7; cursor: not-allowed; }

/* Password entry screen */
.password-entry-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 20%, rgba(255,71,87,.05) 0%, transparent 60%), var(--bg0);
}
.password-entry-card {
    width: 400px;
    max-width: 90vw;
    background: var(--bg1);
    border: 1px solid var(--brd);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.password-entry-banner {
    height: 100px;
    background: linear-gradient(135deg, #1a0a0f, #0f1117);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.password-entry-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 120%, rgba(255,71,87,.12), transparent 60%);
}
.password-entry-icon { font-size: 32px; position: relative; z-index: 1; }
.password-entry-name {
    font-family: var(--fd);
    font-size: 16px;
    font-weight: 700;
    color: var(--t1);
    letter-spacing: .5px;
    position: relative;
    z-index: 1;
}
.password-entry-body { padding: 28px; }
.password-entry-hint {
    font-size: 14px;
    color: var(--t2);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}
.password-entry-field { margin-bottom: 20px; }
.password-entry-field .fi { margin-top: 6px; }
.password-entry-error {
    font-family: var(--fm);
    font-size: 11px;
    color: var(--red);
    margin-bottom: 12px;
}
.password-entry-actions {
    display: flex;
    gap: 10px;
}
.password-entry-btn-back {
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid var(--brd);
    background: transparent;
    color: var(--t2);
    font-family: var(--fb);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.password-entry-btn-back:hover { background: var(--bg3); color: var(--t1); }
.password-entry-btn-submit {
    flex: 1;
    padding: 13px;
    border-radius: 10px;
    border: none;
    background: var(--acc);
    color: #fff;
    font-family: var(--fd);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .15s;
}
.password-entry-btn-submit:hover:not(:disabled) { background: #5a9fff; }
.password-entry-btn-submit:disabled { opacity: .7; cursor: not-allowed; }
.password-entry-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--brd);
    text-align: center;
    font-size: 12px;
    color: var(--t3);
}
.password-entry-link { color: var(--acc); text-decoration: none; }
.password-entry-link:hover { text-decoration: underline; }

.chat-header-icon { color: var(--t3); font-size: 18px; flex-shrink: 0; }
.chat-header-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--t1); font-family: var(--fd); }
.chat-layout .messages { flex: 1; overflow-y: auto; padding: 16px 16px 8px; }
.chat-layout .message {
    display: flex;
    gap: 10px;
    padding: 3px 8px;
    margin-bottom: 2px;
    border-radius: 8px;
    transition: background 0.1s;
}
.chat-layout .message.msg-gap { margin-top: 14px; }
.chat-layout .message:hover { background: rgba(255,255,255,0.02); }
.message-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}
.message-body { flex: 1; min-width: 0; }
.message-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.message-author {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 15px;
    color: var(--t1);
}
.message-author-self { color: rgba(0,229,160,0.6); }
.message-time {
    font-family: var(--fm);
    font-size: 10px;
    color: var(--t3);
}
.message-content {
    color: var(--t1);
    font-family: var(--fb);
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
}
.message-date-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
}
.message-date-divider hr {
    flex: 1;
    border: none;
    border-top: 1px solid var(--brd);
    margin: 0;
}
.message-date-divider span {
    font-family: var(--fm);
    font-size: 10px;
    color: var(--t3);
    white-space: nowrap;
}
.chat-start-block {
    text-align: left;
    padding: 16px 8px 20px;
}
.chat-start-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 10px;
}
.chat-start-block h2 {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 20px;
    color: var(--t1);
    margin: 0 0 4px;
}
.chat-start-block p {
    font-size: 13px;
    color: var(--t3);
    margin: 0;
}
.chat-layout .input-area {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid var(--brd);
    gap: 8px;
    background: var(--bg2);
    align-items: center;
    flex-shrink: 0;
}
.btn-attach {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    background: var(--bg3);
    color: var(--t3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.btn-attach:hover:not(:disabled) {
    background: var(--bg4);
    color: var(--t1);
}
.btn-attach:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.chat-layout .input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--brd);
    border-radius: 10px;
    background: var(--bg3);
    color: var(--t1);
    font-family: var(--fb);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-layout .input-area input::placeholder { color: var(--t3); }
.chat-layout .input-area input:focus { outline: none; border-color: rgba(61,139,255,0.35); box-shadow: 0 0 0 3px rgba(61,139,255,0.08); }
.chat-layout .input-area button:not(.btn-attach) {
    padding: 8px 18px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.chat-layout .input-area button:not(.btn-attach):hover:not(:disabled) { background: #5a9fff; box-shadow: 0 0 10px var(--accg); }
.chat-layout .input-area button:not(.btn-attach):disabled { opacity: 0.5; cursor: not-allowed; }

/* Profile card (right panel) */
.profile-card {
    width: 260px;
    min-width: 260px;
    background: var(--bg1);
    border-left: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}
.profile-card-banner {
    height: 80px;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    position: relative;
    flex-shrink: 0;
}
.profile-card-actions {
    position: absolute;
    top: 10px;
    right: 16px;
}
.profile-card-btn {
    padding: 5px 12px;
    background: var(--acc);
    border: none;
    border-radius: 7px;
    color: #fff;
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.profile-card-btn:hover { opacity: 0.9; }
.profile-card-playing {
    padding: 10px;
    background: var(--bg3);
    border-radius: 8px;
    border: 1px solid var(--brd);
}
.profile-card-game {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.profile-card-game-icon {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    background: linear-gradient(135deg, #ff6b35, #f7c59f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.profile-card-game-name {
    font-family: var(--fd);
    font-size: 13px;
    font-weight: 600;
    color: var(--t1);
}
.profile-card-game-sub {
    font-family: var(--fb);
    font-size: 11px;
    color: var(--t2);
}
.profile-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 20px;
    position: absolute;
    bottom: -26px;
    left: 16px;
    border: 4px solid var(--bg1);
}
.profile-card-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border: 3px solid var(--bg1);
}
.profile-card-body {
    padding: 34px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.profile-card-name {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 18px;
    color: var(--t1);
    margin: 0;
}
.profile-card-tag {
    font-family: var(--fm);
    font-size: 11px;
    color: var(--t3);
    margin-top: -8px;
}
.profile-card-status {
    background: var(--bg3);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-card-status-text {
    font-size: 13px;
    color: var(--t2);
}
.profile-card-status-icon {
    font-size: 14px;
    color: var(--a2);
}
.profile-card-divider {
    height: 1px;
    background: var(--brd);
    margin: 0;
}
.profile-card-section-title {
    font-family: var(--fb);
    font-size: 11px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}
.profile-card-servers {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-card-server {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.12s;
    cursor: pointer;
}
.profile-card-server:hover { background: var(--bg3); }
.profile-card-server-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--bg3);
    color: var(--t2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.profile-card-server-name {
    font-size: 13px;
    color: var(--t2);
}

/* Settings layout */
.settings-layout {
    display: flex;
    height: 100%;
    flex: 1;
}
.settings-nav {
    width: 200px;
    min-width: 200px;
    background: var(--bg1);
    border-right: 1px solid var(--brd);
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.settings-nav-label {
    font-family: var(--fm);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t3);
    padding: 12px 12px 4px;
}
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 7px;
    color: var(--t2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.12s, color 0.12s;
}
.settings-nav-item:hover { background: var(--bg3); color: var(--t1); }
.settings-nav-item.active { background: var(--bg4); color: var(--t1); }
.settings-nav-item--danger { color: var(--red); }
.settings-nav-item--danger:hover { background: rgba(255,68,68,0.08); color: var(--red); }
.settings-nav-item .bi { font-size: 15px; opacity: 0.7; }
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
}
.settings-section-title {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 22px;
    color: var(--t1);
    margin: 0 0 4px;
}
.settings-section-subtitle {
    font-size: 13px;
    color: var(--t3);
    margin: 0 0 20px;
}
.settings-group {
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.settings-group-title {
    font-family: var(--fd);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--t1);
    margin-bottom: 14px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--brd);
}
.settings-row:first-child { border-top: none; }
.settings-row-label {
    font-family: var(--fm);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--t2);
}
.settings-row-value {
    font-size: 13px;
    color: var(--t1);
}
.settings-input {
    padding: 8px 12px;
    background: var(--bg2);
    border: 1px solid var(--brd);
    border-radius: 9px;
    color: var(--t1);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.settings-input:focus { border-color: rgba(61,139,255,0.35); box-shadow: 0 0 0 3px rgba(61,139,255,0.08); }

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg4);
    border-radius: 12px;
    transition: background 0.2s;
}
.toggle-switch input:checked + .toggle-track { background: var(--a2); }
.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch input:checked ~ .toggle-knob { transform: translateX(18px); }
.settings-save-btn {
    padding: 10px 24px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.settings-save-btn:hover { background: #5a9fff; transform: translateY(-1px); }
/* sett-* (Settings design classes) */
.sett-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.sett-nav { width: 200px; background: var(--bg1); border-right: 1px solid var(--brd); padding: 12px 8px; flex-shrink: 0; overflow-y: auto; }
.sett-nav-label { font-family: var(--fm); font-size: 10px; color: var(--t3); letter-spacing: 1.5px; text-transform: uppercase; padding: 10px 10px 4px; }
.sett-nav-item { padding: 8px 12px; border-radius: 7px; font-size: 14px; color: var(--t2); cursor: pointer; transition: all .12s; margin-bottom: 1px; display: flex; align-items: center; gap: 8px; background: none; border: none; width: 100%; text-align: left; }
.sett-nav-item:hover { background: var(--bg3); color: var(--t1); }
.sett-nav-item.on { background: var(--bg4); color: var(--t1); }
.sett-nav-item.danger { color: var(--red); }
.sett-nav-item.danger:hover { background: rgba(255,71,87,.08); }
.sett-content { flex: 1; overflow-y: auto; padding: 28px 32px; min-width: 0; }
.sett-section-title { font-family: var(--fd); font-size: 22px; font-weight: 700; letter-spacing: .5px; margin-bottom: 6px; color: var(--t1); }
.sett-section-sub { font-family: var(--fb); font-size: 13px; color: var(--t2); margin-bottom: 24px; }
.sett-group { margin-bottom: 24px; padding: 20px; background: var(--bg3); border: 1px solid var(--brd); border-radius: 14px; }
.sett-group-title { font-family: var(--fd); font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--t1); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.fl { font-family: var(--fm); font-size: 11px; color: var(--t3); letter-spacing: 1px; text-transform: uppercase; display: block; margin-bottom: 6px; }
.fi { width: 100%; background: var(--bg2); border: 1px solid var(--brd); border-radius: 9px; padding: 10px 14px; color: var(--t1); font-size: 14px; font-family: var(--fb); outline: none; caret-color: var(--acc); transition: border-color .15s; }
.fi:focus { border-color: rgba(61,139,255,.4); }
select.fi { cursor: pointer; }
.sett-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--brd); gap: 16px; flex-wrap: wrap; }
.sett-row:first-child { border-top: none; padding-top: 0; }
.sett-row-info .title { font-size: 14px; color: var(--t1); margin-bottom: 2px; }
.sett-row-info .sub { font-size: 12px; color: var(--t3); }
.toggle { width: 42px; height: 24px; border-radius: 12px; cursor: pointer; position: relative; flex-shrink: 0; transition: background .2s; }
.toggle.on { background: var(--a2); }
.toggle.off { background: var(--bg4); border: 1px solid var(--brd); }
.toggle .toggle-knob { position: absolute; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle.on .toggle-knob { left: 21px; background: #0a0b0f; }
.toggle.off .toggle-knob { left: 3px; }
.range-wrap { margin-top: 8px; }
.range-label { display: flex; justify-content: space-between; font-family: var(--fm); font-size: 11px; color: var(--t3); margin-bottom: 6px; }
input[type="range"] { width: 100%; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--bg4); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--acc); cursor: pointer; border: 2px solid var(--bg0); }
.save-btn { padding: 10px 24px; background: var(--acc); border: none; border-radius: 9px; color: #fff; font-family: var(--fd); font-weight: 700; font-size: 14px; letter-spacing: .5px; cursor: pointer; transition: opacity .15s; }
.save-btn:hover { opacity: .85; }
.danger-zone { background: rgba(255,71,87,.05); border: 1px solid rgba(255,71,87,.2); border-radius: 14px; padding: 20px; margin-top: 24px; }
.danger-title { font-family: var(--fd); font-size: 14px; font-weight: 700; color: var(--red); margin-bottom: 12px; letter-spacing: .5px; }
.sett-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--a2), #00b37a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 24px;
    color: #0a0b0f;
    flex-shrink: 0;
}
.sett-username { font-family: var(--fd); font-size: 18px; font-weight: 700; color: var(--t1); }
.sett-tag { font-family: var(--fm); font-size: 12px; color: var(--t3); }
.sett-danger-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid rgba(255,71,87,.4);
    border-radius: 8px;
    color: var(--red);
    font-family: var(--fm);
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}
.sett-danger-btn:hover { background: rgba(255,71,87,.1); }
.sett-secondary-btn {
    margin-left: 8px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--brd);
    border-radius: 8px;
    color: var(--t2);
    font-family: var(--fm);
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}
.sett-secondary-btn:hover { color: var(--t1); }

.settings-danger-zone {
    background: rgba(255,71,87,0.04);
    border: 1px solid rgba(255,71,87,0.2);
    border-radius: 14px;
    padding: 20px;
    margin-top: 24px;
}
.settings-danger-zone h3 {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 16px;
    color: var(--red);
    margin: 0 0 8px;
}
.settings-danger-zone p { color: var(--t3); font-size: 13px; margin: 0 0 16px; }
.settings-danger-btn {
    padding: 10px 20px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.settings-danger-btn:hover { background: #e03a3a; }

/* Settings profile card */
.settings-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.settings-profile-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
}
.settings-profile-avatar-edit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
}
.settings-profile-avatar:hover .settings-profile-avatar-edit { opacity: 1; }
.settings-profile-name {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 18px;
    color: var(--t1);
}
.settings-profile-email {
    font-size: 13px;
    color: var(--t3);
}

/* Range slider */
.settings-range {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--bg4);
    border-radius: 2px;
    outline: none;
}
.settings-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--acc);
    border: 3px solid var(--bg0);
    cursor: pointer;
}

/* Notifications layout */
.notifications-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.notifications-header h1 {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 20px;
    color: var(--t1);
    margin: 0;
}
.notifications-mark-read {
    padding: 6px 14px;
    background: none;
    color: var(--acc);
    border: 1px solid var(--brd);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s;
}
.notifications-mark-read:hover { background: var(--bg3); }
.notif-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--brd);
}
.notif-hdr-title {
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--t1);
}
.notif-hdr .notifications-mark-read {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--brd);
    border-radius: 8px;
    color: var(--t2);
    font-family: var(--fm);
    font-size: 11px;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .15s;
}
.notif-hdr .notifications-mark-read:hover {
    border-color: var(--acc);
}
.notif-hdr .notifications-mark-read:disabled {
    opacity: .5; cursor: not-allowed;
}
/* nitem (notification item) - design classes */
.nitem {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background .12s;
    border: 1px solid var(--brd);
    border-left: 3px solid transparent;
}
.nitem:hover { background: var(--bg3); }
.nitem.call { border-left-color: var(--a2); background: rgba(0,229,160,.04); border-color: rgba(0,229,160,.15); }
.nitem.call:hover { background: rgba(0,229,160,.08); }
.nitem.mention { border-left-color: var(--acc); background: rgba(61,139,255,.04); border-color: rgba(61,139,255,.15); }
.nitem.mention:hover { background: rgba(61,139,255,.08); }
.nitem.friend { border-left-color: var(--warn); background: rgba(255,165,2,.04); border-color: rgba(255,165,2,.15); }
.nitem.friend:hover { background: rgba(255,165,2,.08); }
.nitem.voice { border-left-color: var(--acc); background: rgba(61,139,255,.04); border-color: rgba(61,139,255,.15); }
.nitem.voice:hover { background: rgba(61,139,255,.08); }
.nitem.read { border-left-color: transparent; opacity: .55; border-color: var(--brd); }
.nitem.read:hover { opacity: .8; }
.nitem-ico {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.nitem-body { flex: 1; min-width: 0; }
.nitem-title { font-family: var(--fd); font-size: 14px; font-weight: 600; color: var(--t1); margin-bottom: 2px; }
.nitem-sub { font-family: var(--fb); font-size: 12px; color: var(--t2); line-height: 1.4; }
.nitem-time { font-family: var(--fm); font-size: 10px; color: var(--t3); flex-shrink: 0; margin-top: 2px; }
.nitem-actions { display: flex; gap: 6px; margin-top: 8px; }
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--fb);
    font-size: 12px;
    color: var(--t2);
}
.status-badge.ok { background: rgba(0,229,160,.08); color: var(--a2); }
.status-badge.warn { background: rgba(255,165,2,.08); color: var(--warn); }
.notif-section-label {
    font-family: var(--fm);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t3);
    padding: 8px 0;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border-left: 3px solid transparent;
    margin-bottom: 4px;
    transition: background 0.12s;
}
.notif-item:hover { background: var(--bg3); }
.notif-item--call { border-left-color: var(--a2); background: rgba(0,229,160,0.04); }
.notif-item--mention { border-left-color: var(--acc); background: rgba(61,139,255,0.04); }
.notif-item--friend { border-left-color: var(--warn); background: rgba(255,165,2,0.04); }
.notif-item--read { opacity: 0.55; border-left-color: transparent; background: transparent; }
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.notif-item--call .notif-icon { background: rgba(0,229,160,0.12); color: var(--a2); }
.notif-item--mention .notif-icon { background: rgba(61,139,255,0.12); color: var(--acc); }
.notif-item--friend .notif-icon { background: rgba(255,165,2,0.12); color: var(--warn); }
.notif-body { flex: 1; min-width: 0; }
.notif-title {
    font-size: 13px;
    color: var(--t1);
    font-weight: 500;
}
.notif-text {
    font-size: 12px;
    color: var(--t3);
    margin-top: 2px;
}
.notif-time {
    font-family: var(--fm);
    font-size: 10px;
    color: var(--t3);
    flex-shrink: 0;
    margin-top: 2px;
}
.notif-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.nbtn {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s;
}
.nbtn.acc { background: rgba(0,229,160,0.12); color: var(--a2); }
.nbtn.acc:hover { background: rgba(0,229,160,0.2); }
.nbtn.dec { background: transparent; color: var(--t3); }
.nbtn.dec:hover { background: var(--bg3); color: var(--t2); }
.nbtn.call-back {
    background: transparent;
    color: var(--a2);
    border: 1px solid rgba(0,229,160,0.3);
}
.nbtn.call-back:hover { background: rgba(0,229,160,0.08); }
.notif-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--t3);
}
.notif-empty .bi { font-size: 32px; display: block; margin-bottom: 8px; opacity: 0.4; }
.notif-loading { font-size: 13px; color: var(--t2); padding: 16px 0; }

/* Main nav tabs (Messages/Notifications/Settings) */
.main-nav-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg1);
    border-bottom: 1px solid var(--brd);
}
.main-nav-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 9px;
    background: none;
    border: none;
    color: var(--t3);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: background 0.12s, color 0.12s;
}
.main-nav-tab:hover { background: var(--bg3); color: var(--t2); }
.main-nav-tab.active { background: var(--bg4); color: var(--t1); }
.main-nav-tab .bi { font-size: 15px; }
.main-nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
}

/* Auth page redesign */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg0);
    padding: 40px 20px;
}
.auth-logo {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 16px;
}
.auth-logo-tone {
    background: linear-gradient(135deg, var(--acc), var(--a2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-logo-voice { color: var(--t1); }
.auth-heading {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 32px;
    color: var(--t1);
    text-align: center;
    max-width: 520px;
    line-height: 1.15;
    margin: 0 0 8px;
}
.auth-subheading {
    font-size: 15px;
    color: var(--t2);
    text-align: center;
    max-width: 420px;
    margin: 0 0 32px;
}
.auth-cards {
    display: flex;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--brd);
    max-width: 820px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.auth-card-left {
    flex: 1;
    background: var(--bg2);
    padding: 32px;
    min-width: 0;
}
.auth-card-right {
    width: 320px;
    background: var(--bg1);
    padding: 32px;
    border-left: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
}
.auth-tabs {
    display: flex;
    background: var(--bg1);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    border-radius: 8px;
    color: var(--t3);
    font-family: var(--fd);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.auth-tab:hover { color: var(--t2); text-decoration: none; }
.auth-tab.active { background: var(--bg4); color: var(--t1); }
.auth-field { margin-bottom: 16px; }
.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--fm);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--t3);
}
.auth-field input,
.auth-field .auth-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 10px;
    color: var(--t1);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input::placeholder { color: var(--t3); }
.auth-field input:focus {
    border-color: rgba(61,139,255,0.35);
    box-shadow: 0 0 0 3px rgba(61,139,255,0.08);
}
.auth-field-password {
    position: relative;
}
.auth-field-password input { padding-right: 40px; }
.auth-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--t3);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.12s;
}
.auth-password-toggle:hover { color: var(--t2); }
.auth-forgot {
    font-family: var(--fm);
    font-size: 12px;
    color: var(--acc);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 16px;
}
.auth-forgot:hover { text-decoration: underline; }
.auth-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.auth-submit--login { background: var(--acc); color: #fff; }
.auth-submit--login:hover:not(:disabled) { background: #5a9fff; transform: translateY(-1px); box-shadow: 0 4px 12px var(--accg); }
.auth-submit--register { background: var(--a2); color: #0a0b0f; }
.auth-submit--register:hover:not(:disabled) { background: #00c98a; transform: translateY(-1px); box-shadow: 0 4px 12px var(--a2g); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--t3);
}
.auth-switch a { color: var(--acc); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
    color: var(--red);
    font-size: 13px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255,68,68,0.06);
    border-radius: 8px;
    border-left: 3px solid var(--red);
}

/* Password strength bar */
.password-strength { margin-top: 8px; }
.password-strength-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}
.password-strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--bg4);
    transition: background 0.2s;
}
.password-strength-bar.filled-weak { background: var(--red); }
.password-strength-bar.filled-fair { background: var(--warn); }
.password-strength-bar.filled-good { background: var(--acc); }
.password-strength-bar.filled-strong { background: var(--a2); }
.password-strength-label {
    font-family: var(--fm);
    font-size: 11px;
}
.password-strength-label.weak { color: var(--red); }
.password-strength-label.fair { color: var(--warn); }
.password-strength-label.good { color: var(--acc); }
.password-strength-label.strong { color: var(--a2); }

/* Username availability */
.username-check {
    font-family: var(--fm);
    font-size: 11px;
    margin-top: 4px;
}
.username-check.available { color: var(--a2); }
.username-check.taken { color: var(--red); }

/* Quick Room card (right side of auth) */
.quick-room-card h2 {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 20px;
    color: var(--t1);
    margin: 0 0 16px;
}
.quick-room-input-group {
    display: flex;
    margin-bottom: 16px;
}
.quick-room-input-group input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 10px 0 0 10px;
    color: var(--t1);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.quick-room-input-group input::placeholder { color: var(--t3); }
.quick-room-input-group input:focus { border-color: rgba(61,139,255,0.35); }
.quick-room-input-group button {
    padding: 10px 16px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 0 10px 10px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.quick-room-input-group button:hover { background: #5a9fff; }
.quick-room-divider {
    text-align: center;
    color: var(--t3);
    font-size: 12px;
    margin: 16px 0;
    position: relative;
}
.quick-room-divider::before,
.quick-room-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--brd);
}
.quick-room-divider::before { left: 0; }
.quick-room-divider::after { right: 0; }
.quick-room-create {
    width: 100%;
    padding: 12px;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.15s;
}
.quick-room-create:hover { background: #5a9fff; transform: translateY(-1px); }
.quick-room-features {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quick-room-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--t2);
}
.quick-room-feature .bi { color: var(--a2); font-size: 14px; }

/* Top nav (hidden on desktop when authenticated, shown on guest) */
.top-nav {
    display: none;
}
.top-nav--guest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 56px;
    background: var(--bg0);
    border-bottom: 1px solid var(--brd);
}
.top-nav .logo {
    text-decoration: none;
    color: var(--t1);
    font-family: var(--fd);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}
.top-nav-links { display: flex; align-items: center; gap: 12px; }
.btn-quick-room {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--acc);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s;
}
.btn-quick-room:hover { background: rgba(61,139,255,0.08); text-decoration: none; }
.top-nav .btn-logout,
.btn-logout {
    padding: 8px 16px;
    cursor: pointer;
    background: var(--bg3);
    color: var(--t2);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.btn-logout:hover { background: var(--bg4); color: var(--t1); }
.btn-mobile-menu { display: none; }
.mobile-nav-backdrop { display: none; }
.sidebars-wrapper { display: flex; flex: 0 0 auto; height: 100%; }

/* User panel at sidebar bottom */
.user-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg0);
    border-top: 1px solid var(--brd);
    border-right: 1px solid var(--brd);
    flex-shrink: 0;
}
.user-panel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 14px;
    color: var(--t1);
    flex-shrink: 0;
    position: relative;
}
.user-panel-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg0);
    border-radius: 50%;
}
.user-panel-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.user-panel-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-panel-status {
    font-size: 11px;
    color: var(--t3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-panel-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.user-panel-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--t3);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s, color 0.12s;
}
.user-panel-btn:hover { background: var(--bg3); color: var(--t1); }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ========== Mobile (≤768px) ========== */
@media (max-width: 768px) {
    html, body { -webkit-tap-highlight-color: transparent; }
    .top-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 16px;
        height: 48px;
        background: var(--bg0);
        border-bottom: 1px solid var(--brd);
    }
    .btn-mobile-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        margin: 0 -8px 0 0;
        background: transparent;
        color: var(--t1);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.25rem;
    }
    .btn-mobile-menu:hover { background: var(--bg3); }
    .btn-mobile-menu, .btn-logout { min-height: 44px; }
    .channel-item { min-height: 44px; padding: 10px 12px; }
    .top-nav--guest .btn-mobile-menu { display: none; }

    .mobile-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 898;
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    .mobile-nav-backdrop.mobile-open {
        display: block;
        opacity: 1;
    }

    .sidebars-wrapper {
        position: fixed;
        left: 0;
        top: 48px;
        bottom: 0;
        z-index: 899;
        display: flex;
        flex-direction: column;
        width: 280px;
        max-width: 85vw;
        background: var(--bg0);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        overflow: hidden;
        border-right: 1px solid var(--brd);
    }
    .sidebars-wrapper.mobile-open { transform: translateX(0); }

    .sidebars-wrapper .guild-sidebar {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
        justify-content: flex-start;
        border-right: none;
        border-bottom: 1px solid var(--brd);
    }
    .sidebars-wrapper .guild-divider { display: none; }
    .sidebars-wrapper .guild-item { width: 40px; height: 40px; }
    .sidebars-wrapper .create-guild { margin: 0; }
    .sidebars-wrapper .create-guild input { width: 100%; }
    .sidebars-wrapper .create-guild button { width: 40px; height: 40px; }

    .sidebars-wrapper .channel-sidebar {
        width: 100%;
        min-width: unset;
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        border-right: none;
    }

    .main-content { min-width: 0; }

    .auth-form {
        margin: 1.5rem 1rem;
        padding: 1.25rem;
        max-width: none;
    }

    .friends-layout { padding: 1rem; }
    .add-friend-section { flex-direction: column; }
    .add-friend-section .search-input { min-width: 0; }
    .friend-row .btn-remove { opacity: 1; }
    .friends-tabs { gap: 2px; }
    .friends-tab { padding: 8px 10px; font-size: 0.8rem; }

    .chat-layout { height: 100vh; }
    .chat-header-bar { padding: 0 12px; height: 44px; }
    .chat-header-title { font-size: 0.9rem; }
    .chat-header-bar .back-link { font-size: 0.9rem; }
    .chat-header-bar .btn-call { padding: 8px 12px; font-size: 0.85rem; }
    .chat-layout .messages { padding: 12px; }
    .chat-layout .message { gap: 12px; padding: 2px 0; }
    .message-avatar { width: 36px; height: 36px; min-width: 36px; font-size: 0.9rem; }
    .chat-layout .input-area {
        padding: 12px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .chat-layout .input-area input { min-width: 0; }
    .chat-layout .input-area button { padding: 10px 16px; }

    /* Voice mobile */
    .voice-layout { height: 100vh; }
    .voice-main { flex-direction: column; }
    .voice-tiles-grid { gap: 8px; padding: 8px 0; }
    .voice-tile { width: 140px; height: 140px; }
    .voice-tile-avatar { width: 48px; height: 48px; font-size: 18px; }
    .voice-tile-name { font-size: 13px; }
    .voice-tile-screen { max-width: 100%; }
    .voice-participants-sidebar {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-top: 1px solid var(--brd);
        max-height: 200px;
    }
    .voice-controls-bar { flex-wrap: wrap; gap: 8px; padding: 12px; }
    .voice-control-btn { width: 44px; height: 44px; border-radius: 12px; }
    .voice-control-btn.btn-leave { width: auto; min-height: 44px; padding: 0 16px; }
    .voice-control-btn.btn-invite-voice { width: auto; min-height: 44px; }

    /* Anonymous room mobile */
    .anon-room-body { flex-direction: column; }
    .anon-voice-section { padding: 16px; }
    .anon-chat-section { width: 100%; min-width: 0; border-left: none; border-top: 1px solid var(--brd); flex: 1; }
    .room-body { flex-direction: column; }
    .room-side { width: 100%; min-width: 0; border-left: none; border-top: 1px solid var(--brd); max-height: 50vh; }
    .anon-entry-card { padding: 24px; }

    /* Welcome / Misc */
    .welcome-screen { padding: 2rem 1rem; }
    .main-full { padding: 0; }

    .invite-layout { padding: 1rem; max-width: none; }
    .invite-card { padding: 24px; }

    .modal-content { width: 95%; max-width: none; margin: 0 1rem; padding: 20px; }

    .profile-card { display: none; }

    .app-left { display: contents; }
    .user-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 900;
        border-right: none;
        border-top: 1px solid var(--brd);
    }

    /* Context menu / tooltip */
    .context-menu { min-width: 180px; }

    /* Auth page mobile */
    .auth-heading { font-size: 22px; }
    .auth-subheading { font-size: 13px; margin-bottom: 20px; }
    .auth-cards { flex-direction: column; }
    .auth-card-left { padding: 24px; }
    .auth-card-right { width: auto; border-left: none; border-top: 1px solid var(--brd); padding: 24px; }

    /* Settings mobile */
    .settings-layout { flex-direction: column; }
    .settings-nav { width: 100%; min-width: 0; flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 4px; border-right: none; border-bottom: 1px solid var(--brd); }
    .settings-nav-label { display: none; }
    .settings-nav-item { padding: 8px 10px; font-size: 12px; }
    .settings-content { padding: 20px 16px; }
    .settings-section-title { font-size: 18px; }

    /* Notifications mobile */
    .notifications-layout { padding: 16px; }
}