/* Nexo's blue and gold identity stays visible in both color modes. */
:root.nexo-identity{--nav:#081426;--paper:#0e1d31;--panel:#15283f;--sidebar:#102238;--ink:#f1f6ff;--text:#f1f6ff;--muted:#a9bdd7;--line:#304964;--accent:#f2c56c;--nexo-highlight:#f2c56c;--surface-card:#1d3450;--surface-input:#0d1b2d;--surface-hover:#559ce519;--brand-blue:#6eb5ff;--brand-panel:linear-gradient(120deg,#172d48,#102139 62%,#2a2a32);--brand-selected:linear-gradient(100deg,#224e76,#263c52 62%,#4b402d);--brand-field:#11243a}
:root.nexo-identity[data-theme=light]{--nav:#eaf2fd;--paper:#f8fbff;--panel:#ffffff;--sidebar:#eff5ff;--ink:#173353;--text:#173353;--muted:#4c6581;--line:#b9cde5;--accent:#855600;--nexo-highlight:#855600;--surface-card:#e5eefb;--surface-input:#ffffff;--surface-hover:#296bad10;--brand-blue:#2268b0;--brand-panel:linear-gradient(120deg,#e2efff,#f5f9ff 62%,#fff0ce);--brand-selected:linear-gradient(100deg,#d3e7ff,#e9f1fc 62%,#f5e5bc);--brand-field:#f1f7ff}
.nexo-identity body{isolation:isolate;background:radial-gradient(ellipse at 8% 8%,#347ccc22,transparent 52%),radial-gradient(ellipse at 96% 85%,#c6974420,transparent 50%),var(--nav)!important;color:var(--ink)}
.nexo-identity body::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:url('/assets/nexo-abstract-lines.svg') center/cover no-repeat}
.nexo-identity .server-rail{background-image:url('/assets/nexo-abstract-lines.svg'),var(--brand-panel)!important;background-size:cover,cover;background-position:center;border-color:var(--line)!important}
.nexo-identity .sidebar,.nexo-identity .members-panel{background:var(--sidebar)!important;border-color:var(--line)!important}
.nexo-identity .sidebar-header,.nexo-identity .chat-header{background:var(--brand-panel)!important;border-color:var(--line)!important}
.nexo-identity .chat,.nexo-identity #conversation,.nexo-identity #voice-room{background:var(--paper)!important;border-color:var(--line)!important}
.nexo-identity .channel-button.active,.nexo-identity #server-list .rail-button.active{background:var(--brand-selected)!important;color:var(--ink)!important;border-color:var(--line)!important}
.nexo-identity .channel-button.active{box-shadow:inset 3px 0 var(--accent)}
.nexo-identity .sidebar>.profile,.nexo-identity .member-row{background:var(--surface-card)!important;border-color:var(--line)!important}
.nexo-identity #messages .message-content{background:var(--panel)!important;border-color:var(--line)!important;color:var(--ink)}
.nexo-identity #messages .message[data-own=true] .message-content{background:var(--surface-card)!important;border-color:var(--line)!important}
.nexo-identity #messages .message-body,.nexo-identity #message-input{color:var(--ink)!important}
.nexo-identity #messages .message-meta time,.nexo-identity .composer-hint,.nexo-identity #message-input::placeholder{color:var(--muted)!important}
.nexo-identity .primary,.nexo-identity #send-message,.nexo-identity .gift-message-claim:not(:disabled){background:linear-gradient(125deg,#ffe0a1,#efbc5c)!important;color:#17263b!important;border-color:#e8b250!important}
.nexo-identity dialog,.nexo-identity .settings-page,.nexo-identity .settings-body{background:var(--paper);color:var(--ink);border-color:var(--line)}
.nexo-identity .workspace-card,.nexo-identity .settings-page section{background:var(--panel);border-color:var(--line);color:var(--ink)}
.nexo-identity input,.nexo-identity select,.nexo-identity textarea{color:var(--ink);border-color:var(--line);background-color:var(--surface-input)}
.nexo-identity .auth-screen{background:transparent!important}
.nexo-identity .auth-panel,.nexo-identity .auth-card{background:var(--brand-panel)!important;border-color:var(--line)!important}
.nexo-identity .story-content h1 em{color:var(--brand-blue)!important}
.nexo-identity .auth-story,.nexo-identity .auth-card h2{color:var(--ink)!important}
.nexo-identity .auth-story p,.nexo-identity .auth-card p,.nexo-identity .auth-card label{color:var(--muted)!important}
.nexo-identity .auth-screen input{background:var(--surface-input)!important;color:var(--ink)!important}
/* Keep the requested transparent typing area and distinct mention colors. */
.nexo-identity .composer,.nexo-identity .composer:focus-within,.nexo-identity .composer-area,.nexo-identity .composer #message-input{background:transparent!important}
.nexo-identity #messages .message.unread-mention .message-content{background:color-mix(in srgb,var(--accent) 12%,var(--panel))!important;border-left:3px solid var(--accent)!important}
.nexo-identity #channel-list .channel-mention-count{background:#d32f4c!important;color:#fff!important}
.nexo-identity :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--brand-blue);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.nexo-identity *{scroll-behavior:auto!important}}

/* Interior settings pages share the dialog surface instead of forming a dark block. */
.nexo-identity dialog :is(.account-pages,.settings-page,.settings-body,.server-settings-body){background:transparent!important}
.nexo-identity .dialog-back{display:block;margin:0 64px 12px 0;min-height:32px;color:var(--brand-blue)}
/* The composer owns a flex row; history must never continue underneath it. */
.nexo-identity #conversation>.composer-area{position:relative!important;inset:auto!important;flex:0 0 auto!important;z-index:3;pointer-events:auto;background:transparent!important}
.nexo-identity #conversation>.composer-area>*{pointer-events:auto}
.nexo-identity #conversation>#message-scroll{padding-bottom:16px!important;scroll-padding-bottom:16px}
.nexo-identity .composer-hint,.nexo-identity #message-input{text-shadow:0 1px 3px var(--paper)}
/* Glass typing surface keeps history visible without competing with the text. */
.nexo-identity #conversation>.composer-area{background:color-mix(in srgb,var(--paper) 65%,transparent)!important;-webkit-backdrop-filter:blur(16px) saturate(115%);backdrop-filter:blur(16px) saturate(115%)}
/* One continuous profile surface below a full-width banner. */
.nexo-identity #profile-dialog{background:var(--panel)!important}
.nexo-identity #profile-dialog .profile-card-content{background:transparent!important}
.nexo-identity #profile-dialog.mini-profile>.profile-card-top{min-height:0!important;height:auto!important;background:transparent!important;padding-block:0!important}
.nexo-identity #profile-dialog #card-banner{display:block;width:100%!important;max-width:none!important;padding:0!important;border:0!important;box-sizing:border-box}
.nexo-identity #profile-dialog #card-banner>img{display:block;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0}
.nexo-identity #profile-dialog .modal-close,.nexo-identity #profile-dialog .profile-more{position:absolute!important;float:none!important;top:10px!important;width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;margin:0!important;padding:0!important;border-radius:50%!important;display:grid;place-items:center;z-index:10;background:#081426b3!important;color:#fff!important;border:0!important}
.nexo-identity #profile-dialog .modal-close{right:10px!important}
.nexo-identity #profile-dialog .profile-more{right:50px!important}
/* Fixed-size circular voice portraits never expand into a full-width row. */
.nexo-identity #voice-room #voice-room-people{display:flex!important;flex-wrap:wrap;align-items:flex-start;align-content:flex-start;justify-content:flex-start;gap:16px!important}
.nexo-identity #voice-room #voice-room-people>.voice-person{display:flex!important;flex:0 0 96px!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;box-sizing:border-box;width:96px!important;min-width:96px!important;max-width:96px!important;height:118px!important;min-height:118px!important;padding:8px 4px!important;gap:10px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--ink)}
.nexo-identity #voice-room #voice-room-people>.voice-person>.avatar{flex:0 0 64px!important;width:64px!important;min-width:64px!important;height:64px!important;border-radius:50%!important;box-sizing:border-box}
.nexo-identity #voice-room #voice-room-people>.voice-person>b{width:100%;font-size:12px;line-height:16px;text-align:center;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
