:root {
    --bg-dark: #010008;
    --bg-tertiary: #05030c;
    --bg-secondary: #080510;
    --bg-primary: #03020a;
    --bg-elevated: #0c0916;
    --bg-modifier-hover: rgba(255, 255, 255, 0.04);
    --bg-secondary-alt: #05030c;
    --brand: #6a4fe0;
    --brand-hover: #5a40d0;
    --brand-soft: rgba(106, 79, 224, 0.16);
    --green: #3ba55d;
    --red: #f23f42;
    --text-normal: #b8b4c6;
    --text-muted: #6e6a7c;
    --text-bright: #e6e4ee;
    --border: rgba(100, 80, 160, 0.1);
    --font: ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "gg mono", Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Menlo, Monaco, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font); user-select: text; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: var(--text-normal);
    font-size: 13px;
    font-family: var(--font);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: #010008;
    background-image: none;
}


/* LANDING */
html.landing-active,
html.landing-active body {
    overflow: auto;
    overflow-x: hidden;
    height: auto;
}
html.landing-active body { overflow-x: hidden; }
.landing {
    position: relative;
    z-index: 40;
    background: #010008;
    color: var(--text-bright);
    font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
.land-grain {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 5;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.land-canvas-host { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
#landCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 45;
    opacity: 0;
    transition: opacity 0.45s ease;
}
#landCanvas.is-live { opacity: 1; }
html.land-3d-ready .land-hero-right::after { display: none !important; }
html.land-await-3d .land-svg-clyde {
    opacity: 0;
    visibility: hidden;
    animation: none;
    pointer-events: none;
}
.land-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    min-height: 100vh;
    width: min(1320px, 94vw);
    margin: 0 auto;
    padding: 10vh 0 8vh;
    position: relative;
    z-index: 4;
    gap: 4vw;
}
.land-hero-copy {
    max-width: 640px;
    align-self: center;
    padding-top: clamp(28px, 6vh, 72px);
}
.land-hero-copy h1 {
    font-size: clamp(56px, 8vw, 96px);
    line-height: 0.92;
    letter-spacing: -0.045em;
    margin: 10px 0 14px;
}
.land-hero-lede {
    margin: 0 0 12px;
    max-width: 28ch;
    color: var(--text-bright);
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.land-hero-right {
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-top: -2vh;
}
.land-svg-clyde {
    width: min(52vw, 280px);
    height: min(52vw, 280px);
    transform-style: preserve-3d;
    animation: clydeIdle 2.8s ease-in-out infinite;
    filter: drop-shadow(0 18px 40px rgba(106,79,224,0.38));
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.land-svg-clyde.is-hidden { opacity: 0; visibility: hidden; animation: none; pointer-events: none; }
.land-svg-clyde.land-traveler {
    position: fixed;
    z-index: 7;
    pointer-events: none;
    animation: none;
    margin: 0;
    will-change: transform, left, top;
    transition: none;
}
.land-svg-clyde svg { width: 100%; height: 100%; display: block; }
@keyframes clydeIdle {
    0%, 100% { transform: perspective(600px) rotateY(-14deg) rotateX(6deg) scale(1); }
    50% { transform: perspective(600px) rotateY(14deg) rotateX(-4deg) scale(1.03); }
}
.land-stills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: 100%;
}
.land-sec {
    position: relative;
    z-index: 4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 12vh 3vw;
    width: min(1320px, 94vw);
    margin: 0 auto;
    max-width: none;
}
.land-sec-head { max-width: 720px; }
.land-sec-stills { width: min(1400px, 96vw); gap: 36px; }
.land-copy-wide { max-width: 56ch; font-size: 19px; }

.land-glow {
    pointer-events: none;
    position: fixed;
    inset: -20%;
    opacity: 0.18;
    background: radial-gradient(ellipse 46% 34% at 72% 22%, rgba(106, 79, 224, 0.10), transparent 62%),
                radial-gradient(ellipse 36% 26% at 18% 82%, rgba(80, 40, 160, 0.05), transparent 55%);
    animation: landGlow 36s linear infinite;
}
@keyframes landGlow {
    0% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(-3%, 2%, 0); }
    100% { transform: translate3d(0,0,0); }
}
.land-nav {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 28px;
    background: rgba(1, 0, 8, 0.55);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.land-frame.is-gazed { transform: translateY(-6px) scale(1.01); }
.land-steps li.is-gazed,
.land-card.is-gazed { transform: translateX(6px) scale(1.01); }
[data-land-focus].is-spawned {
    outline: none;
}
.land-frame.is-spawned .win {
    border-color: rgba(139, 116, 240, 0.55);
    box-shadow: 0 18px 48px rgba(106, 79, 224, 0.22);
    transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.land-steps li.is-spawned,
.land-card.is-spawned {
    border-color: rgba(139, 116, 240, 0.5);
    box-shadow: 0 12px 36px rgba(106, 79, 224, 0.16);
}
.land-frame.is-spawned { transform: translateY(-4px); }
.land-frame.is-spawned figcaption { color: #e6e0ff; }
.land-sec { transition: opacity 0.5s ease; }
.land-btn { transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease; }
.land-btn-primary:hover { box-shadow: 0 8px 28px rgba(106, 79, 224, 0.35); transform: translateY(-1px); }
.land-btn-ghost:hover { border-color: rgba(106, 79, 224, 0.45); transform: translateY(-1px); }
.mc-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}
.mc-mark img,
.mc-mark-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}
.land-nav-mark {
    width: 22px;
    height: 23px;
    margin-right: 2px;
    filter: drop-shadow(0 4px 10px rgba(106, 79, 224, 0.45));
    animation: mcMarkFloat 2.6s ease-in-out infinite;
}
@keyframes mcMarkFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.land-nav-name {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    flex: 1;
}
.land-stage {
    position: sticky;
    top: 0;
    height: 0;
    pointer-events: none;
    perspective: 1200px;
}
.land-clyde {
    position: fixed;
    top: 0; left: 0;
    width: 340px;
    height: 340px;
    transform-style: preserve-3d;
    pointer-events: none;
}
.clyde-layer {
    position: absolute;
    inset: 0;
    transform: translateZ(calc(var(--z) * 6px));
    filter: drop-shadow(0 10px 24px rgba(106, 79, 224, 0.28));
}
.clyde-layer:last-child { filter: drop-shadow(0 0 18px rgba(139, 116, 240, 0.45)); }
.clyde-svg { width: 100%; height: 100%; display: block; }
.land-swarm { position: fixed; inset: 0; pointer-events: none; }
.land-swarm-item {
    position: absolute;
    display: block;
    opacity: 0.7;
}
.land-swarm-item.orb { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #c8b8ff, #6a4fe0); top: 30%; left: 12%; }
.land-swarm-item.orb.s2 { top: 62%; left: 78%; width: 12px; height: 12px; }
.land-swarm-item.card { width: 54px; height: 34px; border-radius: 6px; background: #0c0916; border: 1px solid rgba(106,79,224,0.35); top: 24%; left: 70%; }
.land-swarm-item.ring { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(139,116,240,0.5); top: 48%; left: 18%; }
.land-swarm-item.ring.s2 { top: 18%; left: 42%; width: 20px; height: 20px; }
.land-swarm-item.spark { width: 6px; height: 6px; border-radius: 50%; background: #8b74f0; top: 72%; left: 60%; }
.land-swarm-item.spark.s2 { top: 40%; left: 88%; }
.land-swarm-item.chip { width: 40px; height: 16px; border-radius: 99px; background: #1e3a2a; top: 78%; left: 30%; }
.land-hero-sec { padding-top: 14vh; }
.land-kicker {
    margin: 0;
    color: #9b84ff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}
.land-sec h1, .land-sec h2 {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}
.land-copy { margin: 0; max-width: 44ch; color: #b8b4c6; font-size: 17px; line-height: 1.6; }
.land-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.land-btn {
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.land-btn:active { transform: scale(0.98); }
.land-btn-primary { background: var(--brand); color: #fff; }
.land-btn-primary:hover { background: var(--brand-hover); }
.land-btn-ghost { background: transparent; color: var(--text-bright); border: 1px solid var(--border); }
.land-btn-nav { margin-left: auto; background: var(--brand); color: #fff; min-height: 36px; }
.land-frame { margin: 0; transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); }
.land-frame.is-gazed .win {
    border-color: rgba(106, 79, 224, 0.55);
    box-shadow: 0 24px 56px rgba(106, 79, 224, 0.22);
}
.land-frame figcaption { margin-top: 14px; color: #b8b4c6; font-size: 16px; font-weight: 500; }
.win {
    background: #080510;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s;
}
.land-frame:hover .win {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(106,79,224,0.18);
}
.win-dots { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #05030c; border-bottom: 1px solid var(--border); }
.win-dots i { width: 8px; height: 8px; border-radius: 50%; background: #2a2150; display: block; }
.win-dots i:first-child { background: #f23f42; }
.win-dots i:nth-child(2) { background: #d99a2b; }
.win-dots i:last-child { background: #3ba55d; }
.still { min-height: 400px; padding: 0; background: #080510; }

/* Landing still — account cards (matches real acct-card UI) */
.still-acct { overflow: hidden; display: flex; align-items: stretch; }
.land-still-acct-pad {
    padding: 12px;
    width: 100%;
    display: flex;
    align-items: flex-start;
}
.land-still-acct-pad .land-mock-card {
    width: 100%;
    cursor: default;
    touch-action: auto;
    user-select: none;
    pointer-events: none;
    transform: none !important;
}
.land-still-acct-pad .land-mock-card:hover {
    transform: none !important;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.05);
}
.land-still-acct-pad .land-mock-card--full .dp-banner { height: 72px; }
.land-clyde-av {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    overflow: hidden;
}
.land-clyde-av svg { width: 78%; height: 78%; display: block; }
.land-clyde-av--warm { background: #2a1850; }
.land-clyde-av--muted { background: #1a1630; }

/* Landing still — chat workspace (matches real chat feed) */
.still-chat.land-still-chat {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    height: 100%;
    overflow: hidden;
    background: #080510;
    pointer-events: none;
}
.land-still-topbar {
    position: relative;
    height: 40px;
    min-height: 40px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    background: #080510;
}
.land-still-topbar .topbar-view-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
}
.land-still-feed {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 4px 0 4px;
}
.land-still-feed .chat-msg {
    gap: 10px;
    padding: 2px 10px;
    margin-top: 10px;
}
.land-still-feed .chat-msg-av {
    width: 28px;
    height: 28px;
}
.land-still-feed .chat-msg-author { font-size: 13px; }
.land-still-feed .chat-msg-ts { font-size: 10px; }
.land-still-feed .chat-msg-content { font-size: 12px; }
.land-still-feed .chat-msg-app-tag { height: 13px; font-size: 9px; line-height: 13px; }
.land-still-feed .msg-reaction { font-size: 11px; padding: 2px 6px; }
.land-still-senders {
    padding: 6px 10px 0;
    margin-top: 0;
    min-height: 28px;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.land-still-senders .chat-sender-all { font-size: 10px; padding: 3px 7px; white-space: nowrap; }
.land-still-senders .chat-sender-av {
    width: 22px;
    height: 22px;
    opacity: 0.7;
}
.land-still-senders .chat-sender-av.active { opacity: 1; }
.land-still-input {
    padding: 6px 10px 10px;
    flex-shrink: 0;
}
.land-still-input .chat-input-box {
    min-height: 36px;
    padding: 0 8px;
    gap: 6px;
}
.land-still-input .emoji-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}
.land-still-input-ph {
    flex: 1;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Landing still — server rail + channel sidebar */
.still-sidebar {
    display: flex;
    min-height: 420px;
    overflow: hidden;
}
.land-still-rail {
    width: 48px;
    min-width: 48px;
    padding: 8px 0;
    pointer-events: none;
}
.land-still-rail .s-icon {
    width: 32px;
    height: 32px;
    font-size: 10px;
    margin-bottom: 6px;
}
.land-still-guild {
    font-size: 9px !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    overflow: hidden;
}
.land-still-guild-a { background: linear-gradient(135deg, #3d2a6e, #1a1230); }
.land-still-guild-b { background: linear-gradient(135deg, #2a4a3a, #0f2018); }
.land-still-guild-c { background: linear-gradient(135deg, #6a4fe0, #2a1850); font-size: 8px !important; }
.land-still-guild-d { background: #1a1630; }
.land-still-sidebar {
    flex: 1;
    min-width: 0;
    width: auto;
    resize: none;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}
.land-still-cl-head {
    position: relative;
    height: 40px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.land-still-cl-head .cl-guild-name { font-size: 13px; }
.land-still-cl-scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.land-still-cl-scroll .cl-banner { height: 88px; flex-shrink: 0; }
.land-still-banner {
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(106, 79, 224, 0.45), transparent 70%),
        linear-gradient(160deg, #2a1850 0%, #120a22 45%, #080510 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.land-still-banner-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 400;
    color: #f0ebff;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(106, 79, 224, 0.45);
}
.land-still-banner-sub {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(196, 188, 240, 0.7);
}
.land-still-cl {
    padding: 6px 6px 10px !important;
    padding-top: 6px !important;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.land-still-cl .cl-item { font-size: 12px; padding: 4px 6px; }
.land-still-cl .cl-item.category { font-size: 10px; margin-top: 10px; padding: 2px 4px; }
.land-still-cl .cl-item.category:first-child { margin-top: 4px; }
.land-still-cl .cl-voice-mem { font-size: 11px; padding: 3px 6px; gap: 6px; }
.land-still-voice .cl-item-hdr { gap: 4px; }
.land-still-voice .cl-voice-limit {
    transform: scale(0.85);
    transform-origin: right center;
}
.land-still-voice .cl-voice-live {
    height: 13px;
    font-size: 9px;
    line-height: 13px;
    padding: 0 3px;
}
.land-still-voice .cl-vflag {
    width: 14px;
    height: 14px;
    color: #f23f42;
}
.land-still-voice .cl-voice-mem.is-live > span:not(.land-cl-av):not(.cl-voice-live) {
    color: var(--text-bright);
}
.land-cl-av {
    width: 22px !important;
    height: 23px !important;
    min-width: 22px;
    max-width: 22px;
    flex: 0 0 22px !important;
    border-radius: 0;
    overflow: visible;
    flex-shrink: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    white-space: nowrap;
    text-overflow: clip;
    filter: drop-shadow(0 2px 6px rgba(106, 79, 224, 0.35));
}
.land-cl-av img,
.land-cl-av svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.land-cl-av--pill {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    max-width: 20px;
    flex: 0 0 20px !important;
    border-radius: 50%;
    overflow: hidden;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    filter: none;
}
.land-cl-av--a { background: linear-gradient(135deg, #5865f2, #2b2d6b); }
.land-cl-av--b { background: linear-gradient(135deg, #3ba55d, #1a3a28); }
.land-cl-av--c { background: linear-gradient(135deg, #f0b232, #5a4010); }
.land-cl-av--d { background: linear-gradient(135deg, #eb459e, #5a1840); }
.land-cl-av--e { background: linear-gradient(135deg, #57f287, #1a4a30); }
.land-cl-av--f { background: linear-gradient(135deg, #ed4245, #4a1518); }
.land-cl-av--g { background: linear-gradient(135deg, #8b74f0, #2a1850); }
.land-still-voice .land-cl-photo {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    border-radius: 50%;
    flex: 0 0 20px;
    object-fit: cover;
    display: block;
}
.land-still-drop {
    margin-top: auto;
    border: 1px dashed rgba(106, 79, 224, 0.45);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
}

/* (legacy still-chat placeholders removed — see .land-still-chat) */
.land-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    width: 100%;
}
.land-steps {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.land-steps li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(8, 5, 16, 0.6);
    color: #c8c4d6;
    font-size: 17px;
    line-height: 1.55;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.land-steps li.is-gazed,
.land-card.is-gazed {
    border-color: rgba(106, 79, 224, 0.45);
    box-shadow: 0 12px 36px rgba(106, 79, 224, 0.12);
    transform: translateX(4px);
}
.land-step-n {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand);
}
.land-cards {
    display: grid;
    gap: 16px;
}
.land-card {
    padding: 22px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(145deg, rgba(12, 8, 22, 0.9), rgba(6, 4, 14, 0.75));
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.land-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--text-bright);
}
.land-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}
.land-points { margin: 0; padding-left: 18px; color: var(--text-muted); line-height: 1.7; }
.land-finale { align-items: center; text-align: center; min-height: 110vh; }
.land-finale-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    width: 100%;
}
.land-finale-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 520px;
}
.land-dock {
    position: relative;
    width: min(72vw, 300px);
    height: min(72vw, 300px);
    border-radius: 36px;
    border: 1px solid rgba(106, 79, 224, 0.35);
    background: radial-gradient(circle at 50% 42%, rgba(139, 116, 240, 0.22), rgba(8, 5, 16, 0.5) 62%);
    box-shadow: inset 0 0 48px rgba(106, 79, 224, 0.14);
    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}
.land-dock-glow {
    position: absolute;
    inset: 12%;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(106, 79, 224, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
}
.land-dock.is-approaching {
    border-color: rgba(139, 116, 240, 0.55);
    box-shadow: inset 0 0 60px rgba(106, 79, 224, 0.22), 0 0 40px rgba(106, 79, 224, 0.08);
}
.land-dock.is-occupied {
    border-color: rgba(139, 116, 240, 0.65);
    box-shadow: inset 0 0 72px rgba(106, 79, 224, 0.32), 0 0 56px rgba(106, 79, 224, 0.14);
    animation: dockPulse 3s ease-in-out infinite;
}
.land-dock.is-occupied .land-dock-glow { opacity: 1; }
@keyframes dockPulse {
    0%, 100% { box-shadow: inset 0 0 72px rgba(106, 79, 224, 0.28), 0 0 48px rgba(106, 79, 224, 0.1); }
    50% { box-shadow: inset 0 0 88px rgba(106, 79, 224, 0.38), 0 0 64px rgba(106, 79, 224, 0.18); }
}
[data-land-focus].is-gazed { transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1); }
.land-legal { margin: 20px 0 0; color: var(--text-muted); font-size: 12px; }
.land-reveal { opacity: 1; transform: none; }
.land-reveal.is-in { opacity: 1; transform: none; }
html.landing-active:not(.landing-gsap) .land-reveal { opacity: 0; transform: translateY(28px); }
html.landing-active:not(.landing-gsap) .land-reveal.is-in { opacity: 1; transform: translateY(0); transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1); }
html.landing-gsap .land-reveal { opacity: 1; transform: none; }
.clyde-layer:first-child { filter: brightness(0.55); }
.clyde-layer:nth-child(even) { filter: brightness(0.85) drop-shadow(0 0 10px rgba(139,116,240,0.25)); }
html.landing-active .land-hero-sec .land-kicker,
html.landing-active .land-hero-sec h1,
html.landing-active .land-hero-sec .land-copy,
html.landing-active .land-hero-sec .land-cta {
    animation: landRise 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
html.landing-active .land-hero-sec h1 { animation-delay: 90ms; }
html.landing-active .land-hero-sec .land-copy { animation-delay: 180ms; }
html.landing-active .land-hero-sec .land-cta { animation-delay: 270ms; }
@keyframes landRise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
    .land-hero-grid { grid-template-columns: 1fr; min-height: 100vh; padding: 8vh 4vw; width: 100%; }
    .land-hero-right { order: -1; min-height: 44vh; }
    .land-hero-copy h1 { font-size: clamp(48px, 14vw, 72px); }
    .land-svg-clyde { width: min(58vw, 240px); height: min(58vw, 240px); }
    .land-stills { grid-template-columns: 1fr; }
    .land-split { grid-template-columns: 1fr; }
    .land-sec { padding: 10vh 5vw; width: 100%; min-height: auto; }
    .land-sec-stills { width: 100%; }
    .land-dock { width: min(64vw, 220px); height: min(64vw, 220px); }
    .land-clyde { width: 220px; height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
    .land-svg-clyde { animation: none; }
    .land-glow { animation: none; }
    .land-clyde { position: relative; transform: none !important; margin: 8vh auto 0; }
    .land-stage { position: relative; height: auto; }
    .land-swarm { display: none; }
    .land-reveal, .land-reveal.is-in { opacity: 1; transform: none; transition: none; }
    html.landing-active .land-hero-sec .land-kicker,
    html.landing-active .land-hero-sec h1,
    html.landing-active .land-hero-sec .land-copy,
    html.landing-active .land-hero-sec .land-cta { animation: none; }
}
/* AUTH GATE */
.auth-overlay[hidden] { display: none !important; }
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    background: #010008;
    overflow: hidden;
}
.auth-glow {
    pointer-events: none;
    position: absolute;
    inset: -20%;
    opacity: 0.22;
    background:
        radial-gradient(ellipse 42% 36% at 72% 28%, rgba(106, 79, 224, 0.28), transparent 62%),
        radial-gradient(ellipse 34% 28% at 18% 78%, rgba(80, 40, 160, 0.12), transparent 55%);
    animation: landGlow 36s linear infinite;
}
.auth-grain {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.auth-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, 94vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 5vw, 72px);
    min-height: 100vh;
    padding: 8vh 0;
}
.auth-panel {
    position: relative;
    z-index: 10060;
    max-width: 460px;
    width: 100%;
}
.auth-rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-inline: 2px;
}
.auth-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.auth-mark-clyde {
    width: 22px;
    height: 23px;
    filter: drop-shadow(0 4px 12px rgba(106, 79, 224, 0.4));
    animation: mcMarkFloat 2.6s ease-in-out infinite;
}
.auth-mark-name {
    color: var(--text-bright);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.auth-rail-meta {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.auth-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 32px 30px;
    background: linear-gradient(160deg, rgba(12, 8, 22, 0.92), rgba(6, 4, 14, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(106, 79, 224, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-align: start;
    transform: translateY(12px);
    opacity: 0;
    animation: authPanelIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}
@keyframes authPanelIn {
    to { transform: translateY(0); opacity: 1; }
}
.auth-kicker {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.auth-box h2,
#authTitle {
    margin: 0 0 10px;
    color: var(--text-bright);
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
}
.auth-lead,
.auth-box p.auth-lead {
    margin: 0 0 26px;
    color: #c8c4d6;
    font-size: 15px;
    line-height: 1.55;
    max-width: 36ch;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.auth-box label,
.auth-field label {
    width: 100%;
    color: var(--text-bright);
    font-size: 12px;
    font-weight: 700;
    text-align: start;
}
.auth-box input,
.auth-field input {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    background: rgba(1, 0, 8, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-bright);
    font-family: var(--font-mono);
    font-size: 16px;
    letter-spacing: 0.1em;
    outline: none;
    text-align: start;
    text-transform: uppercase;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-box input:focus,
.auth-field input:focus {
    border-color: rgba(106, 79, 224, 0.75);
    box-shadow: 0 0 0 4px rgba(106, 79, 224, 0.18);
}
.auth-box input::placeholder,
.auth-field input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.08em;
}
.auth-box button,
#authSubmitBtn {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    background: var(--brand);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.auth-box button:hover,
#authSubmitBtn:hover {
    background: var(--brand-hover);
    box-shadow: 0 10px 28px rgba(106, 79, 224, 0.35);
    transform: translateY(-1px);
}
.auth-box button:disabled,
#authSubmitBtn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}
.auth-box button:focus-visible,
.auth-field input:focus-visible,
#authSubmitBtn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
    outline-offset: 2px;
}
.auth-err {
    min-height: 20px;
    margin-top: 12px;
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.auth-foot {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}
.auth-stage {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.auth-stage-ring {
    width: min(56vw, 340px);
    height: min(56vw, 340px);
    border-radius: 42%;
    background: radial-gradient(circle at 50% 42%, rgba(106, 79, 224, 0.22), rgba(106, 79, 224, 0.05) 55%, transparent 72%);
    filter: blur(1px);
    animation: authRingPulse 4.5s ease-in-out infinite;
}
@keyframes authRingPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.06); opacity: 1; }
}
.auth-stage-hint {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(196, 188, 240, 0.55);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}
html.auth-gate-open .land-canvas-host,
html.auth-gate-open #landCanvas {
    z-index: 10050 !important;
}
html.auth-gate-open #landingPage {
    visibility: hidden;
    pointer-events: none;
}
html.auth-gate-open .auth-overlay {
    background: #010008;
}
@media (max-width: 860px) {
    .auth-layout {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 18px;
        padding: 6vh 0 4vh;
    }
    .auth-panel { max-width: none; margin: 0 auto; }
    .auth-stage { min-height: 28vh; order: -1; }
    .auth-stage-ring { width: min(48vw, 220px); height: min(48vw, 220px); }
    .auth-stage-hint { bottom: 4%; }
}
@media (max-width: 480px) {
    .auth-overlay { padding: 0 16px; }
    .auth-box { padding: 24px 18px; }
    .auth-box h2, #authTitle { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-box,
    .auth-stage-ring,
    .auth-box button,
    #authSubmitBtn {
        animation: none;
        transition: none;
    }
    .auth-box { opacity: 1; transform: none; }
}

/* APP LAYOUT */
.app-shell { width: 100vw; height: 100vh; display: flex; flex-direction: column; }
.main-layout { display: flex; flex: 1; height: 100vh; overflow: hidden; }

/* LEFT RAIL */
.server-rail {
    width: 56px;
    background: #010008;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.s-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-normal); font-weight: 700; transition: all 0.2s; position: relative; flex-shrink: 0; margin-bottom: 8px; }
.s-icon:hover { border-radius: 12px; background: var(--brand); color: #fff; }
.s-icon.active { border-radius: 12px; background: var(--brand); color: #fff; }
.s-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.s-icon-home {
    background: transparent !important;
    overflow: visible;
}
.s-icon-home:hover,
.s-icon-home.active {
    background: transparent !important;
    border-radius: 50%;
}
.s-icon-home .mc-mark-img {
    width: 28px;
    height: 29px;
    border-radius: 0;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(106, 79, 224, 0.4));
    animation: mcMarkFloat 2.8s ease-in-out infinite;
}
.s-icon-pill { position: absolute; left: -10px; width: 4px; height: 8px; background: #fff; border-radius: 0 4px 4px 0; top: 50%; transform: translateY(-50%); transition: all 0.2s; opacity: 0; }
.s-icon:hover .s-icon-pill { opacity: 1; height: 20px; }
.s-icon.active .s-icon-pill { opacity: 1; height: 32px; }

/* SIDEBAR: ACCOUNTS */
.sidebar {
    width: 280px;
    min-width: 220px;
    max-width: 450px;
    resize: horizontal;
    overflow: hidden;
    background: #05030c;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}
.tm-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.sb-header {
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    color: var(--text-bright);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sb-content {
    flex: 1;
    min-height: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.tm-load {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* TOKEN RICH BOX */
.token-rich-box {
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: var(--text-normal);
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.token-rich-box:hover {
    border-color: rgba(255,255,255,0.14);
}
.token-rich-box:focus {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.02);
}
.token-rich-box:empty:before {
    content: attr(data-placeholder);
    color: rgba(255,255,255,0.28);
    cursor: text;
    font-family: inherit;
    font-size: 12px;
}
.token-line { padding: 1px 0; word-break: break-all; min-height: 16px; border-radius: 2px; }
.token-line.token-masked {
    letter-spacing: 0.14em;
    font-variant-ligatures: none;
}
.token-line.ok-0 { color: #3ba55d; }
.token-line.ok-1 { color: #3ba55d; }
.token-line.err { color: #ed4245; }

.tm-load-btn {
    align-self: stretch;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: var(--text-bright);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tm-load-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
}
.tm-load-btn:disabled {
    opacity: 0.45;
    cursor: wait;
}

.tm-stats {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.tm-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 2px;
}
.tm-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}
.tm-stat-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-bright);
    font-variant-numeric: tabular-nums;
}
.tm-stat-voice { color: var(--green); }

/* CHANNELS VIEWER (Discord-like) */
.cl-view {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
}
.cl-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 6;
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-bright);
    pointer-events: none;
    transition: background-color 0.12s ease, box-shadow 0.12s ease, text-shadow 0.12s ease;
}
.cl-header > * { pointer-events: auto; }
.cl-header.is-overlay {
    background: transparent;
    box-shadow: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.75);
}
.cl-header.is-solid {
    background: #05030c;
    box-shadow: 0 1px 0 rgba(0,0,0,0.5);
    text-shadow: none;
}
.cl-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.cl-banner {
    position: relative;
    height: 135px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-dark);
}
.cl-banner[hidden] { display: none !important; }
.cl-banner-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.cl-guild-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cl-guild-chevron { flex-shrink: 0; opacity: 0.9; }

.cl-list {
    padding: 8px 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    /* Keep first channels clear of the sticky header when there is no banner */
    padding-top: 56px;
}
.cl-view.has-banner .cl-list { padding-top: 8px; }
.cl-item {
    padding: 6px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    transition: background 0.1s, color 0.1s;
}
.cl-item.category {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: 16px;
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
}
.cl-item.category:first-child { margin-top: 8px; }
.cl-item.category:hover { background: transparent; color: var(--text-normal); }
.cl-item.category .cl-item-hdr { pointer-events: none; gap: 4px; }
.cl-cat-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
    opacity: 0.8;
}
.cl-item.category.collapsed .cl-cat-arrow { transform: rotate(-90deg); }
.cl-item.category.collapsed { margin-bottom: 0; }
.cl-item-hdr { display: flex; align-items: center; gap: 6px; width: 100%; pointer-events: none; min-width: 0; }
.cl-item-hdr > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cl-item .cl-hash { flex-shrink: 0; opacity: 0.75; color: var(--text-muted); }
.cl-item .cl-voice-ico {
    flex-shrink: 0;
    opacity: 1;
    color: #23a559;
}
.cl-item:hover .cl-voice-ico { color: #2dc771; }
.cl-item.active .cl-voice-ico { color: #23a559; }
.cl-item:hover { background: rgba(255,255,255,0.04); color: var(--text-normal); }
.cl-item.active {
    background: rgba(106, 79, 224, 0.12);
    color: var(--text-bright);
}

/* Discord voice user-limit pill (diagonal split) */
.cl-voice-limit {
    display: inline-flex;
    align-items: stretch;
    flex-shrink: 0;
    margin-left: auto;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 16px;
    letter-spacing: 0;
    color: #dbdee1;
}
.cl-voice-limit-cur {
    position: relative;
    z-index: 1;
    padding: 0 4px 0 5px;
    background: #03020a;
    color: var(--text-bright);
}
.cl-voice-limit-cur::after {
    content: "";
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    background: #03020a;
    transform: skewX(-18deg);
    z-index: -1;
}
.cl-voice-limit-max {
    padding: 0 5px 0 8px;
    background: #0c0916;
    color: var(--text-normal);
}
.cl-voice-limit-sep {
    display: none;
}

.cl-voice-mems {
    display: flex;
    flex-direction: column;
    /* Align avatars under the channel name (after speaker icon), Discord-like */
    padding: 2px 0 4px 22px;
    gap: 1px;
    width: 100%;
    box-sizing: border-box;
}
.cl-voice-mem {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 1px 4px 1px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-muted);
    border-radius: 4px;
}
.cl-voice-mem:hover {
    color: var(--text-normal);
}
.cl-voice-mem > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.cl-voice-mem img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.cl-voice-flags {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}
.cl-voice-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 15px;
    padding: 0 4px;
    margin-left: 4px;
    border-radius: 3px;
    background: #ed4245;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 15px;
    text-transform: uppercase;
    flex-shrink: 0;
    user-select: none;
}
.cl-voice-mem.is-live > span {
    color: var(--text-normal);
}
.cl-vflag {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
}
.cl-vflag.self { color: #b5bac1; }
.cl-vflag.server { color: #f23f42; }

/* WORKSPACE */
.workspace {
    flex: 1;
    background: #03020a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* TOPBAR */
.topbar {
    height: 52px;
    min-height: 52px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 14px 0 18px;
    justify-content: space-between;
    gap: 12px;
    background: #03020a;
    z-index: 5;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.topbar-title-block { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-view-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tb-members { display: flex; align-items: center; }
.tb-mem-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    cursor: pointer;
    background: var(--bg-dark);
    margin-left: -8px;
    transition: transform 0.15s;
}
.tb-mem-av:first-child { margin-left: 0; }
.tb-mem-av:hover { transform: translateY(-2px); z-index: 2; }
.tb-sel-pill {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.tb-group { display: flex; align-items: center; gap: 4px; }
.tb-sep { width: 1px; height: 22px; background: rgba(255,255,255,0.08); margin: 0 4px; }
.tb-btn {
    height: 32px;
    min-width: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--text-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.tb-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-bright); }
.tb-btn.primary { background: var(--brand-soft); color: #c4bcf0; }
.tb-btn.primary:hover { background: rgba(106, 79, 224, 0.28); color: #fff; }
.tb-btn.danger { background: rgba(218,55,60,0.18); color: #ffb4b6; }
.tb-btn.danger:hover { background: rgba(218,55,60,0.35); color: #fff; }
.tb-btn span { line-height: 1; }
@media (max-width: 1100px) {
    .tb-btn span { display: none; }
    .tb-btn { padding: 0 8px; }
}

/* VIEW CONTENT */
.view-content { flex: 1; overflow-y: auto; padding: 16px 18px 24px; position: relative; }
.view-content.chat-mode {
    overflow: hidden;
    padding: 0;
}
.view-content.rv-mode {
    overflow-y: auto;
}

/* RANDOM VOICE SETUP */
.rv-setup {
    display: none;
    flex-direction: column;
    gap: 14px;
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
    padding: 4px 0 32px;
}
.rv-setup-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 4px;
}
.rv-setup-head-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}
.rv-setup-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #c4b5fd;
    background: var(--brand-soft);
    border: 1px solid rgba(106, 79, 224, 0.35);
}
.rv-setup-head-text { min-width: 0; }
.rv-setup-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-bright);
}
.rv-setup-sub {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}
.rv-setup-back {
    flex-shrink: 0;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text-normal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.rv-setup-back:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
}

.rv-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.rv-card-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a78bfa;
}
.rv-card-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}
.rv-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.rv-card-divider {
    height: 1px;
    margin: 6px 0 2px;
    background: var(--border);
}
.rv-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 14px;
    align-items: stretch;
}
.rv-guild-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 4px 0 0;
    min-height: 52px;
    background: transparent;
    border: none;
    border-radius: 0;
}
.rv-s-icon {
    margin-bottom: 0;
    border: none;
    padding: 0;
    font: inherit;
}
.rv-s-icon .s-icon-pill { left: -8px; }
.rv-s-icon.active {
    box-shadow: 0 0 0 2px var(--brand), 0 0 12px rgba(106, 79, 224, 0.35);
    border-radius: 50%;
}
.rv-guild-empty {
    font-size: 13px;
    color: var(--text-muted);
}

/* RV sidebar rooms — keep Discord cl-item look */
.rv-sb-content {
    gap: 8px;
    padding-top: 10px;
}
.rv-sb-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 4px 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.rv-sb-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-bright);
}
.rv-sb-hint {
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-muted);
    padding: 0;
}
.rv-rooms-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0 8px;
}
.rv-rooms-loading,
.rv-rooms-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 14px 8px;
}
.rv-rooms-list .cl-item.rv-cl-item {
    cursor: grab;
    user-select: none;
}
.rv-rooms-list .cl-item.rv-cl-item.category {
    cursor: grab;
}
.rv-rooms-list .cl-item.rv-cl-cat--synth {
    cursor: default;
    opacity: 0.85;
}
.rv-rooms-list .cl-item.rv-cl-item.rv-dragging {
    opacity: 0.4;
}
.rv-rooms-list .cl-item-hdr { pointer-events: none; }
body.rv-room-dragging {
    cursor: grabbing !important;
    user-select: none !important;
}
body.rv-room-dragging .rv-dropzone {
    border-color: rgba(106, 79, 224, 0.55);
}
.rv-room-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
    max-width: 220px;
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid rgba(106, 79, 224, 0.5);
    color: var(--text-bright);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Room pool */
.rv-dropzone {
    min-height: 120px;
    padding: 14px;
    border: 1px dashed rgba(100, 80, 160, 0.35);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rv-dropzone--active {
    border-color: rgba(106, 79, 224, 0.7);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px rgba(106, 79, 224, 0.25);
}
.rv-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 92px;
    text-align: center;
    color: var(--text-muted);
}
.rv-dropzone-empty[hidden],
.rv-chips[hidden] {
    display: none !important;
}
.rv-dropzone--filled {
    border-style: solid;
    border-color: var(--border);
    background: rgba(0, 0, 0, 0.15);
    min-height: 0;
}
.rv-dropzone--filled .rv-chips {
    min-height: 0;
}
.rv-dropzone-plus {
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    color: #a78bfa;
}
.rv-dropzone-title {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-normal);
}
.rv-dropzone-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.32);
}
.rv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rv-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 6px 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
}
.rv-chip--category { border-color: rgba(100, 80, 160, 0.28); }
.rv-chip-ico {
    display: flex;
    flex-shrink: 0;
    color: #2dc771;
}
.rv-chip--category .rv-chip-ico { color: var(--text-muted); }
.rv-chip-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.rv-chip-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rv-chip-meta {
    font-size: 10px;
    color: var(--text-muted);
}
.rv-chip-remove {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-left: 2px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.rv-chip-remove:hover {
    background: rgba(237, 66, 69, 0.15);
    color: #ed4245;
}

/* Interval / group chips */
.rv-interval {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rv-interval-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rv-interval-btn {
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-normal);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rv-interval-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
}
.rv-interval-btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.rv-interval-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.rv-interval-custom-label {
    font-size: 12px;
    color: var(--text-muted);
}
.rv-interval-custom-input {
    width: 96px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-bright);
    font-size: 13px;
    font-weight: 600;
    outline: none;
}
.rv-interval-custom-input:focus {
    border-color: rgba(106, 79, 224, 0.55);
}

/* Activity / states split */
.rv-states-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 4px;
}
.rv-states-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(100, 80, 160, 0.12);
}
.rv-col-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}
.rv-activity-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.rv-activity-toggle-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
    background: var(--brand-soft);
    flex-shrink: 0;
}
.rv-activity-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}
.rv-activity-toggle-title {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-bright);
}
.rv-activity-toggle-sub {
    font-size: 11px;
    color: var(--text-muted);
}
.rv-activity-toggle .jv-chk { margin-left: auto; flex-shrink: 0; }
.rv-games-block--disabled { opacity: 0.4; pointer-events: none; }
.rv-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rv-pill {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-normal);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rv-pill:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
}
.rv-pill.active {
    background: var(--brand-soft);
    border-color: rgba(106, 79, 224, 0.5);
    color: #ddd6fe;
}
.rv-pill--opt {
    border-style: dashed;
    opacity: 0.9;
}
.rv-mode-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rv-mode-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, border-color 0.12s;
}
.rv-mode-row:hover { background: var(--bg-modifier-hover); }
.rv-mode-row:has(input:checked) {
    border-color: rgba(106, 79, 224, 0.35);
    background: var(--brand-soft);
}
.rv-mode-ico {
    width: 22px;
    text-align: center;
    color: #a78bfa;
    font-size: 12px;
    flex-shrink: 0;
}
.rv-mode-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}
.rv-mode-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
}
.rv-mode-bits {
    font-size: 11px;
    color: var(--text-muted);
}
.rv-mode-row .jv-chk { margin-left: auto; flex-shrink: 0; }

/* Accounts */
.rv-accounts-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.rv-text-btn {
    border: none;
    background: transparent;
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}
.rv-text-btn:hover {
    background: var(--brand-soft);
    color: #ddd6fe;
}
.rv-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(100, 80, 160, 0.12);
}
.rv-acct-row { margin: 0; }
.rv-accounts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 120px;
    padding: 20px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-normal);
}
.rv-accounts-empty-ico {
    font-size: 22px;
    color: #a78bfa;
    opacity: 0.8;
}
.rv-accounts-empty-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Activate footer */
.rv-setup-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}
.rv-setup-foot-grow { flex: 1; min-width: 0; }
.rv-btn {
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rv-btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-normal);
}
.rv-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
}
.rv-btn-primary {
    background: var(--brand);
    color: #fff;
    min-width: 112px;
}
.rv-btn-primary:hover {
    background: var(--brand-hover);
}
.rv-btn-danger {
    background: rgba(242, 63, 66, 0.14);
    border-color: rgba(242, 63, 66, 0.4);
    color: #f23f42;
}
.rv-btn-danger:hover {
    background: rgba(242, 63, 66, 0.28);
    color: #ff6b6e;
}

@media (max-width: 860px) {
    .rv-split,
    .rv-states-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .rv-setup-head { flex-direction: column; align-items: stretch; }
    .rv-setup-back { align-self: flex-start; }
    .rv-setup-foot { flex-direction: column-reverse; align-items: stretch; }
    .rv-btn-primary { width: 100%; }
    .rv-card-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Account card — Random Voice active / paused pill */
.rv-acct-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1px 6px;
    border: 1px solid rgba(45, 199, 113, 0.45);
    border-radius: 4px;
    background: rgba(45, 199, 113, 0.14);
    color: #3dd68c;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.rv-acct-badge:hover {
    background: rgba(45, 199, 113, 0.28);
    border-color: rgba(45, 199, 113, 0.7);
    color: #5ee09f;
}
.rv-acct-badge.is-paused {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    opacity: 0.85;
}
.rv-acct-badge.is-paused:hover {
    border-color: rgba(45, 199, 113, 0.4);
    color: #3dd68c;
    opacity: 1;
}

@media (max-width: 640px) {
    .rv-setup-head { flex-direction: column; align-items: stretch; }
    .rv-setup-back { align-self: flex-start; }
    .rv-setup-foot { flex-direction: column-reverse; align-items: stretch; }
    .rv-btn-primary { width: 100%; }
}

.empty-state {
    margin: 48px auto 0;
    max-width: 360px;
    text-align: center;
    padding: 28px 20px;
}
.empty-state-title { color: var(--text-bright); font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-state-sub { color: var(--text-muted); font-size: 13px; line-height: 1.45; }

.fleet-bar {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 4px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.fleet-bar-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fleet-bar-title { font-size: 13px; font-weight: 700; color: var(--text-bright); }
.fleet-bar-sub { font-size: 11px; color: var(--text-muted); }
.fleet-bar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    justify-content: flex-end;
}
.fb-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    position: relative;
}
.fb-group[data-label]::before {
    content: attr(data-label);
    position: absolute;
    top: -12px;
    left: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    pointer-events: none;
}
.fb-group[data-label] {
    padding-top: 10px;
}
.fb-btn {
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: transparent;
    color: var(--text-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.fb-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.16);
    color: var(--text-bright);
}
.fb-btn svg { flex-shrink: 0; opacity: 0.9; }
.fb-btn--accent {
    border-color: rgba(106, 79, 224, 0.35);
    color: #c8c0f5;
}
.fb-btn--accent:hover {
    background: rgba(106, 79, 224, 0.14);
    border-color: rgba(106, 79, 224, 0.55);
    color: #fff;
}
.fb-btn--danger {
    border-color: rgba(218, 55, 60, 0.3);
    color: #f0a8aa;
}
.fb-btn--danger:hover {
    background: rgba(218, 55, 60, 0.14);
    border-color: rgba(218, 55, 60, 0.5);
    color: #fff;
}
@media (max-width: 1200px) {
    .fb-btn span { display: none; }
    .fb-btn { padding: 0 8px; min-width: 30px; }
    .fb-group[data-label]::before { display: none; }
    .fb-group[data-label] { padding-top: 0; }
}
.fleet-select {
    height: 32px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 12px;
    padding: 0 10px;
    outline: none;
}
.fleet-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-bright);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.fleet-btn:hover { background: rgba(255,255,255,0.08); }
.fleet-btn.accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.fleet-btn.accent:hover { filter: brightness(1.08); }

.acct-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    align-content: start;
}
.acct-card {
    background: #080510;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s, opacity 0.18s;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.acct-card:active { cursor: grabbing; }
.acct-card:hover {
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.acct-card.checked {
    border-color: rgba(106, 79, 224, 0.55);
    box-shadow: 0 0 0 1px rgba(106, 79, 224, 0.2);
}
.acct-card--dragging {
    opacity: 0.35;
    transform: scale(0.98);
    box-shadow: none;
    cursor: grabbing;
}
.acct-card--dragging:hover { transform: scale(0.98); }
.acct-card--dimmed {
    opacity: 0.38;
    filter: grayscale(0.75);
    box-shadow: none;
    cursor: default;
    touch-action: auto;
}
.acct-card--dimmed:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}
.acct-card--dimmed .dp-avatar-wrap,
.acct-card--dimmed .dp-banner,
.acct-card--dimmed .dp-status-outer,
.acct-card--dimmed .acct-card-btns,
.acct-card--dimmed .acct-voice-box {
    pointer-events: none;
    cursor: default;
}
.acct-card--dimmed .c-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Voice drop targets + floating drag ghost */
body.voice-dragging {
    cursor: grabbing !important;
}
body.voice-dragging .cl-voice-drop {
    outline: 1px dashed rgba(106, 79, 224, 0.35);
    outline-offset: -1px;
    border-radius: 6px;
    transition: background 0.15s ease, outline-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cl-voice-drop.drop-hover {
    background: rgba(106, 79, 224, 0.18) !important;
    outline: 1.5px solid rgba(106, 79, 224, 0.85);
    box-shadow: 0 0 0 3px rgba(106, 79, 224, 0.2), inset 0 0 20px rgba(106, 79, 224, 0.12);
    transform: translateX(2px);
}
.cl-voice-drop.drop-hover .cl-voice-ico {
    color: #c4bcf0 !important;
    transform: scale(1.12);
}
.cl-voice-drop.drop-pulse {
    animation: voiceDropPulse 0.45s ease;
}
@keyframes voiceDropPulse {
    0% { box-shadow: 0 0 0 0 rgba(106, 79, 224, 0.55); }
    60% { box-shadow: 0 0 0 10px rgba(106, 79, 224, 0); background: rgba(106, 79, 224, 0.22); }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.voice-drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, #120e1c 0%, #080510 100%);
    border: 1px solid rgba(106, 79, 224, 0.55);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(106, 79, 224, 0.15),
        0 0 28px rgba(106, 79, 224, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.88);
    transition: opacity 0.14s ease, box-shadow 0.2s ease;
    will-change: transform, opacity;
}
.voice-drag-ghost--show {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}
.voice-drag-ghost--cancel {
    opacity: 0 !important;
    transition: opacity 0.16s ease, transform 0.16s ease !important;
    transform: scale(0.9) !important;
}
.voice-drag-ghost-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-bright);
}
.voice-drag-ghost-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.voice-drag-ghost-meta { flex: 1; min-width: 0; }
.voice-drag-ghost-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.voice-drag-ghost-sub {
    font-size: 11px;
    color: #c4bcf0;
    margin-top: 2px;
}
.voice-drag-ghost-hint {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.ac-chk {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 5px;
    background: rgba(0,0,0,0.45);
    cursor: pointer;
    color: transparent;
    z-index: 4;
}
.ac-chk:hover { border-color: #fff; }
.ac-chk.checked { background: var(--brand); border-color: var(--brand); color: #fff; }
.ac-chk svg { width: 12px; height: 12px; }
.acct-ping {
    position: absolute;
    top: 10px;
    right: 38px;
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 18px;
    padding: 2px 5px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 4;
}
.acct-ping i { width: 3px; border-radius: 1px; display: block; }
.dp-banner {
    height: 96px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: #120a22;
    flex-shrink: 0;
}
.dp-banner.editable {
    cursor: pointer;
}
.dp-banner.editable:hover {
    filter: brightness(1.08);
}
.dp-body {
    position: relative;
    padding: 0 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dp-avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: -36px;
    z-index: 2;
}
.dp-avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin-top: 0;
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
}
.dp-avatar-wrap:hover .dp-avatar {
    outline: 2px solid rgba(255,255,255,0.25);
    outline-offset: 2px;
}
.dp-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 5px solid #080510;
    background: var(--brand);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    box-sizing: border-box;
}
.dp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-avatar-wrap .acct-status-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px #080510;
    background: #080510;
}
.dp-identity { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-top: 2px; }
.dp-display {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dp-display-edit {
    cursor: text;
    border-radius: 4px;
    max-width: 100%;
}
.dp-display-edit:hover {
    color: #fff;
}
input.dp-display-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-bright);
    font: inherit;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    outline: none;
    cursor: text;
    user-select: text;
}
input.dp-display-input.is-editing,
input.dp-display-input:focus {
    color: #fff;
    text-overflow: clip;
}
.dp-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}
.dp-userline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.dp-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    line-height: 0;
}
.dp-badge {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.dp-note {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-normal);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-height: 18px;
}
.dp-note.editable {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}
.dp-note.editable:hover {
    background: rgba(255,255,255,0.06);
}
.dp-note-emoji { flex-shrink: 0; }
.dp-note-muted { color: var(--text-muted); font-weight: 600; }
.dp-note-empty { color: var(--text-muted); opacity: 0.7; font-style: italic; }

/* Discord-like Add Status bubble — mirrors outer/inner/::after (10x10) structure */
.dp-status-outer {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    margin-top: 8px;
    margin-left: 4px;
    max-width: calc(100% - 90px);
    z-index: 2;
}
/* The connector “dot” Discord uses (div.outer::after — 10×10) */
.dp-status-outer::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    top: -2px;
    left: -2px;
    background: #111214;
    border-radius: 3px;
    z-index: 0;
    pointer-events: none;
}
.dp-status-inner {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    padding: 4px 10px 4px 4px;
    border-radius: 12px;
    background: #111214;
    color: #dbdee1;
    cursor: text;
    box-sizing: border-box;
}
.dp-status-inner.clickable:hover {
    background: #1a1b1e;
}
.dp-status-outer:hover::after,
.dp-status-outer.is-editing::after {
    background: #1a1b1e;
}
.dp-status-outer.is-editing .dp-status-inner {
    background: #1a1b1e;
}
.dp-status-add-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #b5bac1;
    display: block;
}
.dp-status-outer.has-status .dp-status-add-icon {
    color: #dbdee1;
}
.dp-status-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.dp-status-input {
    flex: 1;
    min-width: 0;
    width: 148px;
    max-width: 200px;
    border: none;
    outline: none;
    background: transparent;
    color: #dbdee1;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    padding: 0;
    margin: 0;
}
.dp-status-input::placeholder {
    color: #949ba4;
    font-style: italic;
    font-weight: 400;
}
/* Empty state looks like Discord’s italicPrompt */
.dp-status-input.dp-status-input--prompt:not(:focus) {
    font-style: italic;
    color: #949ba4;
}

/* Bio (About Me) — inline edit in place */
.dp-bio {
    font-size: 13px;
    line-height: 1.375;
    color: #dbdee1;
    min-height: 18px;
}
.dp-bio-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 4px 2px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    resize: none;
    overflow: hidden;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}
.dp-bio-input::placeholder {
    color: #949ba4;
    font-style: italic;
    opacity: 0.85;
}
.dp-bio.is-editing .dp-bio-input,
.dp-bio-input:focus {
    background: rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.1);
    padding: 6px 8px;
}
.dp-bio-empty .dp-bio-input {
    color: #949ba4;
}

/* Discord-style Playing / Listening card under the account */
.dp-activity {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.dp-activity:hover {
    background: rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.12);
}
.dp-activity:focus-visible {
    outline: 2px solid rgba(88, 101, 242, 0.7);
    outline-offset: 2px;
}
.dp-activity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.dp-activity-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-bright);
}
.dp-activity-clear {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.dp-activity-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.dp-activity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.dp-activity-icon {
    position: relative;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}
.dp-activity-icon:has(.dp-activity-art:not(.is-broken)) {
    background: transparent;
}
.dp-activity-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    background: transparent;
}
.dp-activity-art.is-broken {
    display: none;
}
.dp-activity-icon:has(.dp-activity-art:not(.is-broken)) .dp-activity-fallback {
    display: none;
}
.dp-activity-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.dp-activity-fallback.is-spotify {
    background: #121212;
}
.dp-activity-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dp-activity-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dp-activity-state {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-only-menu {
    width: 220px;
    gap: 4px;
}
.dp-activity-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 650;
    color: #23a559;
    font-variant-numeric: tabular-nums;
}
.dp-activity-time-icon {
    flex: 0 0 auto;
    opacity: 0.95;
}
.dp-activity.is-spotify .dp-activity-time {
    color: #1db954;
}

.acct-device-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
    margin-top: 4px;
}
.acct-device-pill.desktop { color: #b0a6e8; background: var(--brand-soft); }
.acct-device-pill.mobile { color: #8dffc0; background: rgba(35,165,89,0.18); }
.acct-device-pill.web { color: #ffb4b6; background: rgba(218,55,60,0.18); }
.acct-voice-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.05);
}
.acct-voice-row { display: flex; gap: 6px; }
.acct-voice-row input {
    flex: 1;
    min-width: 0;
    height: 32px;
    background: #05030c;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 10px;
    color: var(--text-bright);
    font-size: 12px;
    outline: none;
}
.acct-voice-row input:focus { border-color: var(--brand); }
.acct-join-btn {
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
.acct-join-btn:hover { filter: brightness(1.08); }
.acct-voice-empty {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 4px 0;
}
.acct-voice-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(35,165,89,0.1);
    border: 1px solid rgba(35,165,89,0.18);
}
.acct-voice-chip-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-voice-chip-name {
    font-size: 12px;
    font-weight: 650;
    color: #8dffc0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acct-voice-chip-time { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

.acct-voice-chip.is-missing {
    background: rgba(240,178,50,0.08);
    border-color: rgba(240,178,50,0.28);
}
.acct-voice-chip.is-missing .acct-voice-chip-name {
    color: #f0b232;
    white-space: normal;
}
.acct-voice-leave {
    border: none;
    background: rgba(218,55,60,0.85);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
}
.acct-card-btns.dp-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.acct-card-btns .c-btn {
    flex: 1;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-normal);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.acct-card-btns .c-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.acct-card-btns .c-btn.active {
    background: rgba(218,55,60,0.22);
    border-color: rgba(218,55,60,0.55);
    color: #ffb4b6;
}
.acct-card-btns .c-btn.danger:hover {
    background: rgba(218,55,60,0.28);
    color: #fff;
}

/* CHAT SYSTEM — Discord-like sizing/colors */
.chat-wrapper {
    position: absolute;
    inset: 0;
    background: transparent;
    display: flex;
    z-index: 10;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    border-right: 1px solid rgba(0,0,0,0.2);
}
.chat-feed {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    background: transparent;
}
.chat-msg {
    display: flex;
    gap: 16px;
    padding: 2px 16px 2px 16px;
    margin-top: 17px;
    position: relative;
}
.chat-msg:hover {
    background: rgba(255, 255, 255, 0.03);
}
.chat-msg-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--bg-secondary);
    margin-top: 2px;
}
.chat-msg-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-msg-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chat-msg-hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.375;
    min-height: 22px;
}
.chat-msg-author {
    font-size: 16px;
    font-weight: 500;
    color: #f2f3f5;
    line-height: 1.375;
}
.chat-msg-app-tag {
    display: inline-flex;
    align-items: center;
    height: 15px;
    padding: 0 4px;
    border-radius: 3px;
    background: #5865f2;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 15px;
    vertical-align: middle;
}
.chat-msg-ts {
    font-size: 12px;
    line-height: 1.375;
    color: #949ba4;
    font-weight: 400;
    margin-left: 2px;
}
.chat-msg-content {
    font-size: 16px;
    color: #dbdee1;
    line-height: 1.375;
    word-break: break-word;
    white-space: pre-wrap;
    font-weight: 400;
}
.chat-msg-img {
    display: block;
    max-width: min(550px, 100%);
    max-height: 350px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    margin-top: 8px;
}

/* Discord-style rich embeds */
.chat-embeds {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    max-width: min(520px, 100%);
}
.chat-embed {
    display: flex;
    flex-direction: column;
    background: #2b2d31;
    border-radius: 4px;
    border-left: 4px solid #5865f2;
    padding: 8px 16px 12px 12px;
}
.chat-embed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 16px;
    align-items: start;
}
.chat-embed-grid.has-thumb {
    grid-template-columns: 1fr auto;
}
.chat-embed-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-embed-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.chat-embed-author-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-embed-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #f2f3f5;
    text-decoration: none;
}
a.chat-embed-author-name:hover { text-decoration: underline; }
.chat-embed-title {
    font-size: 16px;
    font-weight: 600;
    color: #00a8fc;
    line-height: 1.25;
    text-decoration: none;
    white-space: pre-wrap;
}
a.chat-embed-title:hover { text-decoration: underline; }
div.chat-embed-title { color: #f2f3f5; }
.chat-embed-desc {
    font-size: 14px;
    font-weight: 400;
    color: #dbdee1;
    line-height: 1.375;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-embed-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}
.chat-embed-field {
    grid-column: 1 / -1;
    min-width: 0;
}
.chat-embed-field.is-inline {
    grid-column: span 1;
}
.chat-embed-field-name {
    font-size: 14px;
    font-weight: 600;
    color: #f2f3f5;
    margin-bottom: 2px;
    white-space: pre-wrap;
}
.chat-embed-field-value {
    font-size: 14px;
    font-weight: 400;
    color: #dbdee1;
    line-height: 1.375;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-embed-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 8px;
    grid-column: 2;
    grid-row: 1;
}
.chat-embed-image {
    display: block;
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    margin-top: 12px;
    object-fit: contain;
}
.chat-embed-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #dbdee1;
    line-height: 1.2;
}
.chat-embed-footer-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-inline-emoji {
    width: 1.375em;
    height: 1.375em;
    vertical-align: bottom;
    object-fit: contain;
}
.chat-input-area {
    padding: 0 16px 24px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: none;
}
.chat-sender-ctrl {
    display: flex;
    gap: 6px;
    padding: 0 16px;
    margin-top: 8px;
    align-items: center;
    overflow-x: auto;
    flex-wrap: nowrap;
    min-height: 36px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
}
.chat-sender-av { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; transition: 0.15s ease; border: 2px solid transparent; opacity: 0.5; position: relative; }
.chat-sender-av:hover { opacity: 0.8; }
.chat-sender-av.active { border-color: var(--brand); opacity: 1; }
.chat-sender-av img { width: 100%; height: 100%; border-radius: 50%; }
.chat-sender-av.mentioned-ping {
    opacity: 1;
    border-color: #c4bcf0;
    box-shadow: 0 0 0 2px rgba(106, 79, 224, 0.95), 0 0 14px 3px rgba(106, 79, 224, 0.75);
    animation: chatMentionPulse 1.1s ease-in-out infinite;
}
@keyframes chatMentionPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(106, 79, 224, 0.85), 0 0 10px 2px rgba(106, 79, 224, 0.55); }
    50% { box-shadow: 0 0 0 3px rgba(196, 188, 240, 1), 0 0 18px 5px rgba(106, 79, 224, 0.95); }
}

/* Discord-style mentions (blue, not red) */
.chat-mention {
    display: inline;
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 500;
    background: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
}
.chat-mention:hover {
    background: #5865f2;
    color: #fff;
}
.chat-mention--role { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; }
.chat-mention--channel { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; }
.chat-mention--everyone {
    background: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
}

.chat-md-bold { font-weight: 700; color: #f2f3f5; }
.chat-md-italic { font-style: italic; }
.chat-md-underline { text-decoration: underline; }
.chat-md-strike { text-decoration: line-through; opacity: 0.85; }
.chat-inline-code {
    display: inline;
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: 0.2em 0.4em;
    margin: 0 0.05em;
    border-radius: 4px;
    background: #1e1f22;
    color: #dbdee1;
    border: none;
}
.chat-code-block {
    display: block;
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 4px;
    background: #1e1f22;
    border: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #dbdee1;
}
.chat-spoiler {
    background: #1e1f22;
    color: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}
.chat-spoiler.revealed,
.chat-spoiler:hover {
    color: #dbdee1;
    background: rgba(255,255,255,0.08);
}
.chat-timestamp {
    background: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
    border-radius: 3px;
    padding: 0 4px;
    font-weight: 500;
    cursor: default;
    white-space: nowrap;
}
.chat-input-box {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
}
.chat-input-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-bright);
    font-size: 16px;
    outline: none;
}
.chat-input-box input::placeholder { color: var(--text-muted); }

.mention-popup {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
    z-index: 80;
    padding: 6px 0 8px;
}
.mention-popup-hdr {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.mention-popup-empty {
    padding: 10px 12px 14px;
    font-size: 13px;
    color: var(--text-muted);
}
.mention-popup-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--text-bright);
}
.mention-popup-row:hover,
.mention-popup-row.selected {
    background: var(--brand-soft);
}
.mention-popup-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.mention-popup-av--ph {
    background: var(--brand);
}
.mention-popup-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mention-popup-sub {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-msg-stickers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.chat-sticker {
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
}
.chat-sticker--fallback {
    min-width: 80px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
}
.ep-section {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 2px 2px;
    letter-spacing: 0.03em;
}
.ep-empty {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 12px;
    padding: 16px 8px;
    text-align: center;
}
.ep-item--sticker img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.ep-item--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.chat-sender-all { font-size: 11px; padding: 4px 8px; background: var(--bg-tertiary); border-radius: 12px; cursor: pointer; color: var(--text-muted); font-weight: 600; margin-right: 8px; border: 1px solid var(--border); }
.chat-sender-all.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.emoji-btn { color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.emoji-btn:hover { color: var(--text-bright); }

/* legacy aliases used elsewhere */
.top-btn { padding: 4px 10px; border-radius: 3px; font-size: 11px; font-weight: 600; border: none; cursor: pointer; }
.top-btn.grey { background: rgba(255,255,255,0.08); color: var(--text-bright); }
.top-btn.grey:hover { background: rgba(255,255,255,0.15); }
.top-btn.red { background: var(--red); color: #fff; }
.top-btn.red:hover { background: #be2e33; }
.c-btn { flex: 1; padding: 4px; border: 1px solid var(--border); background: var(--bg-tertiary); color: var(--text-normal); border-radius: 4px; font-size: 10px; font-weight: 600; cursor: pointer; text-align: center; }
.c-btn:hover { background: var(--bg-modifier-hover); color: var(--text-bright); }
.c-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.acct-vbox { display: flex; gap: 6px; margin-top: 4px; }
.acct-vbox input { flex: 1; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 4px; padding: 4px 6px; color: var(--text-bright); font-size: 11px; outline: none; }
.acct-vbox button { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px; color: var(--text-normal); font-size: 10px; font-weight: 600; padding: 0 10px; cursor: pointer; }
.acct-card-sub { font-size: 11px; color: var(--green); }
.acct-card-sub.off { color: var(--text-muted); }

/* TOPBAR MEMBER ACTION MENU */
.tb-menu { position: absolute; top: 100%; left: 0; margin-top: 6px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; padding: 6px; display: none; flex-direction: column; gap: 4px; min-width: 130px; z-index: 50; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.tb-menu.open { display: flex; }
.tb-menu-hdr { font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 4px; }
.tb-menu-item { padding: 6px 8px; font-size: 12px; color: var(--text-normal); border-radius: 4px; cursor: pointer; transition: background 0.1s; }
.tb-menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text-bright); }

/* EMOJI PICKER POPUP */
.emoji-popup { position: absolute; bottom: 70px; right: 20px; width: 320px; height: 350px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; display: none; flex-direction: column; box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 20; }
.emoji-popup.open { display: flex; }
.ep-hdr { padding: 10px 12px; background: var(--bg-tertiary); font-weight: 700; font-size: 12px; color: var(--text-muted); border-bottom: 1px solid rgba(0,0,0,0.2); }
.ep-grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 4px; align-content: start; }
.ep-item { width: 100%; aspect-ratio: 1; border-radius: 4px; cursor: pointer; transition: all 0.1s; display: flex; align-items: center; justify-content: center; }
.ep-item:hover { background: rgba(255,255,255,0.1); transform: scale(1.1); }
.ep-item img { width: 28px; height: 28px; object-fit: contain; }
.ep-item.disabled { opacity: 0.3; filter: grayscale(1); pointer-events: none; cursor: not-allowed; }

/* DRAGGABLE LOG CONSOLE */
.log-panel,
.log-resizer,
.log-header,
.log-body,
.log-line { display: none !important; }

/* Professional toast stack — bottom right */
.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10050;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    width: min(360px, calc(100vw - 28px));
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #0a0814;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
    color: var(--text-bright);
    animation: toastIn 0.28s ease-out;
}
.toast.is-leaving {
    animation: toastOut 0.22s ease-in forwards;
}
.toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}
.toast-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toast-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-bright);
}
.toast-msg {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-normal);
    word-break: break-word;
}
.toast-error {
    border-color: rgba(242, 63, 66, 0.35);
}
.toast-error .toast-icon {
    background: rgba(242, 63, 66, 0.15);
    color: #f23f42;
}
.toast-error .toast-title { color: #f23f42; }
.toast-success {
    border-color: rgba(59, 165, 93, 0.35);
}
.toast-success .toast-icon {
    background: rgba(59, 165, 93, 0.15);
    color: #3ba55d;
}
.toast-success .toast-title { color: #3ba55d; }
.toast-info {
    border-color: rgba(106, 79, 224, 0.35);
}
.toast-info .toast-icon {
    background: rgba(106, 79, 224, 0.15);
    color: #8b7cff;
}
.toast-info .toast-title { color: #8b7cff; }
.toast-close {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.toast-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-bright);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px) translateX(8px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}

/* MODALS */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 1000; }
.overlay.open { display: flex; }
.modal { width: 380px; background: var(--bg-secondary); border-radius: 8px; border: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.m-hdr { padding: 12px 14px; font-weight: 700; color: var(--text-bright); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.m-hdr button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; }
.m-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.m-body label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.m-body input { background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-bright); padding: 6px 8px; border-radius: 4px; font-size: 11px; outline: none; }
.m-foot { padding: 10px 14px; background: var(--bg-tertiary); display: flex; justify-content: flex-end; gap: 6px; }
.m-btn { background: var(--brand); color: #fff; border: none; padding: 6px 12px; border-radius: 4px; font-weight: 700; font-size: 11px; cursor: pointer; }
.m-btn.secondary { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-normal); }

/* JOIN VOICE MODAL */
.jv-overlay {
    z-index: 10050;
    background: rgba(1, 0, 8, 0.72);
    backdrop-filter: blur(6px);
}
.jv-modal {
    width: min(420px, calc(100vw - 32px));
    max-height: min(560px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    background: #080510;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55);
    overflow: hidden;
}
.jv-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.jv-head-text { min-width: 0; }
.jv-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.01em;
}
.jv-sub {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}
.jv-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.jv-close:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-bright);
}
.jv-body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow: hidden;
}
.jv-field { display: flex; flex-direction: column; gap: 6px; }
.jv-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.jv-input {
    width: 100%;
    height: 38px;
    box-sizing: border-box;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #010008;
    color: var(--text-bright);
    font-size: 13px;
    outline: none;
}
.jv-input:focus {
    border-color: rgba(255,255,255,0.2);
}
.jv-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    flex: 1;
}
.jv-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.jv-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.jv-chk {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.28);
    border-radius: 5px;
    background: rgba(0,0,0,0.45);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
    position: relative;
}
.jv-chk:hover { border-color: #fff; }
.jv-chk:checked {
    background: var(--brand);
    border-color: var(--brand);
}
.jv-chk:checked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: center / 11px 11px no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.jv-select-all .jv-chk {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}
.jv-select-all .jv-chk:checked::after {
    background-size: 10px 10px;
}
.jv-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.25);
}
.jv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-normal);
    transition: background 0.12s;
}
.jv-row:hover { background: rgba(255,255,255,0.04); }
.jv-row:has(input:checked) {
    background: rgba(106, 79, 224, 0.12);
}
.jv-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #120a22;
}
.jv-av-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-bright);
}
.jv-row-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}
.jv-row-name {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jv-row-sub {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jv-row-tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    color: #f0a8aa;
    background: rgba(218,55,60,0.14);
    border: 1px solid rgba(218,55,60,0.28);
    border-radius: 999px;
    padding: 2px 7px;
}
.jv-empty {
    padding: 28px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.jv-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.jv-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.jv-btn-ghost {
    background: transparent;
    border-color: rgba(255,255,255,0.1);
    color: var(--text-normal);
}
.jv-btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-bright);
}
.jv-btn-primary {
    background: var(--brand);
    color: #fff;
}
.jv-btn-primary:hover {
    background: var(--brand-hover);
}
.jv-btn-danger {
    background: #da373c;
    color: #fff;
}
.jv-btn-danger:hover {
    background: #a12828;
}
.confirm-modal {
    width: min(400px, calc(100vw - 32px));
    max-height: none;
}
.confirm-modal .jv-sub {
    white-space: pre-wrap;
    line-height: 1.45;
    color: var(--text-muted);
}

/* PRESENCE / PROFILE MENUS */
.presence-popout {
    position: fixed;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 240px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 10080;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    color: var(--text-normal);
    font-size: 13px;
}
.presence-popout.open { display: flex; }
.presence-popout.profile-menu { gap: 4px; }
.pm-row {
    width: 100%;
    text-align: left;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    color: var(--text-bright);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.pm-row:hover { background: rgba(255,255,255,0.06); }
.pm-divider { height: 1px; background: var(--border); margin: 4px 0; }
.po-section { display: flex; flex-direction: column; gap: 6px; }
.po-label { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin: 2px 0; }
.po-status-row { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 8px; border-radius: 4px; border: 1px solid transparent; background: var(--bg-secondary); }
.po-status-row:hover { background: rgba(255,255,255,0.05); }
.po-status-row.active { border-color: var(--brand); background: var(--brand-soft); }
.po-status-dot { width: 14px; height: 14px; border-radius: 50%; }
.po-input-group { display: flex; gap: 6px; }
.po-input-group select, .po-input-group input { background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-bright); border-radius: 4px; padding: 6px; outline: none; font-size: 12px; }
.po-input-group input { flex: 1; min-width: 0; }
.po-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.po-btn { background: var(--brand); color: #fff; padding: 6px 12px; border-radius: 4px; border: none; font-weight: 600; cursor: pointer; font-size: 11px; }
.po-btn.clear { background: transparent; border: 1px solid var(--red); color: var(--red); }
.po-btn.clear:hover { background: var(--red); color: #fff; }
.po-btn-clear-activity { color: var(--red); }

/* MESSAGE COMPONENTS (BUTTONS & REACTIONS) — Discord-like */
.msg-components-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg-btn {
    padding: 2px 16px;
    min-height: 32px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    color: #fff;
    transition: background-color 0.15s ease;
    text-decoration: none;
}
.msg-btn.PRIMARY { background-color: #5865f2; }
.msg-btn.PRIMARY:hover:not(:disabled) { background-color: #4752c4; }
.msg-btn.SECONDARY { background-color: #4e5058; }
.msg-btn.SECONDARY:hover:not(:disabled) { background-color: #6d6f78; }
.msg-btn.SUCCESS { background-color: #248046; }
.msg-btn.SUCCESS:hover:not(:disabled) { background-color: #1a6334; }
.msg-btn.DANGER { background-color: #da373c; }
.msg-btn.DANGER:hover:not(:disabled) { background-color: #a12828; }
.msg-btn.LINK { background-color: #4e5058; }
.msg-btn.LINK:hover:not(:disabled) { background-color: #6d6f78; }
.msg-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.msg-reaction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 6px;
    min-height: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-normal);
    transition: 0.1s;
}
.msg-reaction img { width: 16px; height: 16px; object-fit: contain; }
.msg-reaction:hover { border-color: var(--brand); background-color: var(--brand-soft); }
.msg-reaction.active { background-color: var(--brand-soft); border-color: var(--brand); }

/* MESSAGE EDITED/DELETED */
.msg-edited-tag { font-size: 10px; color: #949ba4; margin-left: 4px; }
.chat-msg.deleted .chat-msg-content { color: #f23f43; font-style: italic; opacity: 0.7; pointer-events: none; }
.chat-msg.deleted .msg-edited-tag { display: none; }
