:root {
  color-scheme: dark;
  --ink: #f5eeff;
  --muted: #baa8df;
  --faint: #7d6d9d;
  --base: #07070b;
  --panel: #120d1c;
  --panel-raised: #1b1227;
  --panel-hover: #261b35;
  --line: #473468;
  --line-soft: #2d1d3f;
  --acid: #b78cff;
  --acid-ink: #120d1e;
  --acid-soft: rgba(183, 140, 255, 0.16);
  --orange: #e8c9ff;
  --glow: rgba(183, 140, 255, 0.42);
  --serif: "Space Grotesk", "Trebuchet MS", sans-serif;
  --sans: "DM Sans", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { background:
  radial-gradient(circle at top, rgba(183,140,255,0.15), transparent 30%),
  linear-gradient(180deg, #09080d 0%, #0d0a12 100%);
  color: var(--ink); font-family: var(--sans); font-size: 14px; overflow: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.app-shell { height: 100dvh; min-height: 560px; display: grid; grid-template-columns: 68px 252px minmax(300px, 1fr) 244px; overflow: hidden; background: var(--base); }
html.route-pending .app-shell { visibility: hidden; }
.route-status { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; color: #e7eae2; background: #111411; }
.route-status[hidden] { display: none; }
.route-error { width: min(100%, 520px); padding: 28px 0; border-top: 1px solid #53604e; }
.route-error-kicker { margin: 0 0 18px; color: #b8d58c; font: 600 12px/1.4 "Space Grotesk", sans-serif; }
.route-error h1 { margin: 0; font: 600 34px/1.1 "Space Grotesk", sans-serif; }
.route-error-copy { max-width: 390px; margin: 14px 0 24px; color: #aeb5a9; line-height: 1.6; }
.route-error a { color: #c1f17a; text-underline-offset: 4px; }
body.policy-document { min-height: 100%; height: auto; overflow: auto; }
.policy-page { width: min(100%, 920px); min-height: 100dvh; margin: 0 auto; padding: 24px clamp(20px, 5vw, 64px) 72px; }
.policy-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.policy-header nav { display: flex; flex-wrap: wrap; gap: 20px; }
.policy-header nav a, .policy-footer a { color: var(--acid); text-underline-offset: 4px; }
.policy-header nav a[aria-current="page"] { color: var(--ink); }
.policy-content { max-width: 680px; margin: 58px auto 0; }
.policy-kicker { color: var(--muted); font: 600 11px/1.5 var(--serif); }
.policy-content h1 { margin: 12px 0 22px; font: 600 38px/1.1 var(--serif); }
.policy-content h2 { margin: 34px 0 8px; font: 600 18px/1.3 var(--serif); }
.policy-content p { color: #bdc4b8; line-height: 1.75; }
.policy-footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal-config-warning { padding: 12px; border-left: 3px solid #df9b43; background: #292318; color: #f0d3a8 !important; }
.app-legal-links { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 3px 4px; }
.app-legal-links a { color: #9aa391; font-size: 10px; text-underline-offset: 3px; }
.legal-auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #30392e; }
.legal-auth-links a { padding: 5px 2px; color: var(--acid); font-size: 11px; text-underline-offset: 3px; }
.auth-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.auth-recovery-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-recovery-form[hidden] { display: none; }
.auth-recovery-form p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.password-change-settings { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.password-change-settings > p { margin: -6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* A quiet grain of lines gives the workspace rail its own visual anchor. */
.server-rail { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 15px 0 13px; background-color: #151915; background-image: repeating-linear-gradient(135deg, rgba(193,241,122,.025) 0, rgba(193,241,122,.025) 1px, transparent 1px, transparent 9px); border-right: 1px solid var(--line-soft); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #4a5b3d; border-radius: 13px; background: var(--acid); color: #1c2517; text-decoration: none; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 0; box-shadow: 0 0 0 4px rgba(193,241,122,.06); }
.brand-mark span { color: #e98760; margin-left: -5px; }
.rail-rule { width: 26px; height: 1px; background: #3a4337; margin: 1px 0 2px; }
.server-list { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.server-button, .rail-add, .rail-discover { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 13px; background: #252c25; color: #c2c9bb; cursor: pointer; font-family: var(--serif); font-size: 15px; font-weight: 700; transition: border-radius .18s ease, background .18s ease, color .18s ease; }
.server-button:hover, .rail-add:hover, .rail-discover:hover { border-radius: 11px; background: var(--acid); color: var(--acid-ink); }
.server-button.active { border-color: #a3cf68; border-radius: 11px; background: #c1f17a; color: #1b2514; }
.server-button.active::before { position: absolute; left: -15px; width: 3px; height: 24px; content: ""; border-radius: 0 3px 3px 0; background: var(--acid); }
.server-unread-badge { position: absolute; right: -5px; bottom: -4px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 3px; border: 2px solid #151915; border-radius: 9px; background: #dc655c; color: white; font: 700 9px var(--sans); line-height: 1; }
.server-button img, .server-preview-mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.server-icon-setting { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.rail-add, .rail-discover { width: 36px; height: 36px; background: transparent; border-color: var(--line); color: var(--muted); }
.rail-add .icon, .rail-discover .icon { width: 17px; height: 17px; }
.rail-spacer { flex: 1; }
.rail-profile { position: relative; cursor: pointer; }
.avatar { position: relative; display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; font-family: var(--serif); font-weight: 700; line-height: 1; }
.avatar-user { background: #c1f17a; color: #202b17; }
.avatar-rust { background: #a75d43; color: #ffdfc9; }
.avatar-blue { background: #567c83; color: #d8f1eb; }
.avatar-pink { background: #a05c78; color: #ffdfed; }
.avatar-green { background: #607d54; color: #e4f5cf; }
.rail-profile .avatar { width: 38px; height: 38px; border: 2px solid #4b5a41; font-size: 14px; }
.presence-dot { position: absolute; right: -1px; bottom: 0; width: 10px; height: 10px; border: 2px solid var(--panel); border-radius: 50%; background: #72d695; }
.presence-dot.idle { background: #e8bc68; }

.channel-sidebar { position: relative; z-index: 3; display: flex; min-height: 0; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.sidebar-topline { height: 62px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line-soft); }
.wordmark { display: flex; align-items: center; gap: 9px; color: #e7eae2; font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: 0; }
.wordmark-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--acid); color: var(--acid-ink); font-size: 14px; }
.server-heading { width: calc(100% - 28px); height: 46px; display: flex; align-items: center; justify-content: space-between; margin: 12px 14px 9px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #e5e8e0; font-family: var(--serif); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.server-heading:hover { background: var(--panel-hover); }
.server-heading .icon { width: 15px; height: 15px; color: var(--muted); transform: rotate(90deg); }
.sidebar-search { height: 36px; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; margin: 0 14px 17px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #121612; color: var(--faint); }
.sidebar-search .icon { width: 15px; height: 15px; }
.sidebar-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.sidebar-search input::placeholder { color: #798174; }
kbd { border: 1px solid #3a4337; border-radius: 4px; background: #20261f; color: #899285; font: 9px var(--sans); padding: 2px 4px; white-space: nowrap; }
.sidebar-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 0 11px 16px; scrollbar-color: #384035 transparent; scrollbar-width: thin; }
.sidebar-shortcut { width: 100%; height: 42px; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 0 9px; border: 1px solid var(--line-soft); border-radius: 7px; background: #1b201b; color: #bfc6b9; font-size: 12px; text-align: left; cursor: pointer; }
.sidebar-shortcut:hover { border-color: #414c3c; background: #222922; color: var(--ink); }
.shortcut-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: rgba(193,241,122,.1); color: var(--acid); }
.shortcut-icon .icon { width: 15px; height: 15px; }
.shortcut-arrow { width: 14px; height: 14px; margin-left: auto; color: var(--faint); }
.section-heading { height: 25px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; color: #788174; font-size: 9px; font-weight: 700; letter-spacing: 0; }
.tiny-button, .icon-button { display: inline-grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.tiny-button { width: 24px; height: 24px; border-radius: 5px; }
.tiny-button:hover, .icon-button:hover { color: var(--acid); background: #283027; }
.tiny-button .icon { width: 15px; height: 15px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.channel-category { min-width: 0; }
.channel-category-heading { margin: 15px 8px 4px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.channel-category-heading[draggable="true"], .nav-row[draggable="true"] { cursor: grab; }
.channel-category-heading[draggable="true"]:active, .nav-row[draggable="true"]:active { cursor: grabbing; }
.channel-drop-target { outline: 1px dashed var(--acid); outline-offset: 2px; background-color: rgba(193,241,122,.08); }
.channel-organizer-section { margin: 0 0 18px; }
.channel-organizer-section h3 { margin: 0 0 8px; color: var(--ink); font-size: 12px; }
.channel-organizer-row { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 4px 8px; border-top: 1px solid var(--line-soft); }
.channel-organizer-row > strong { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.channel-organizer-actions { display: flex; gap: 4px; }
.channel-organizer-actions .icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 5px; }
.channel-organizer-actions .icon { width: 13px; height: 13px; }
.channel-organizer-actions [data-direction="up"] .icon { transform: rotate(-90deg); }
.channel-organizer-actions [data-direction="down"] .icon { transform: rotate(90deg); }
.channel-organizer-empty { margin: 0; padding: 10px 0; color: var(--faint); font-size: 11px; }
.admin-plugin-upload { max-width: 540px; margin: 12px 0 16px; }
.admin-plugin-upload .modal-input { height: auto; min-height: 38px; padding: 7px; }
.admin-plugin-upload { max-width: 540px; margin: 12px 0 16px; }
.admin-plugin-upload .modal-input { height: auto; min-height: 38px; padding: 7px; }
.nav-row { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 9px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #a7afa2; text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; }
.nav-row:hover { background: #222822; color: var(--ink); }
.nav-row.active { background: #2a3328; color: #dff6bf; }
.nav-row .nav-symbol { width: 17px; display: inline-grid; place-items: center; color: #788173; }
.nav-row.active .nav-symbol { color: var(--acid); }
.nav-symbol .icon { width: 16px; height: 16px; }
.channel-hash { color: #778173; font-family: var(--serif); font-size: 17px; line-height: 1; }
.nav-label { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.nav-unread { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); }
.voice-heading { margin-top: 17px; }
.voice-row { min-height: 34px; }
.voice-live { margin-left: auto; color: #78d69a; font-size: 10px; }
.voice-participants { display: flex; align-items: center; gap: 5px; padding: 5px 0 6px 31px; color: #747e71; font-size: 10px; }
.avatar-xs { width: 17px; height: 17px; border: 1px solid var(--panel); font-size: 8px; }
.dm-heading { margin-top: 18px; }
.dm-row .avatar { width: 23px; height: 23px; font-size: 9px; }
.dm-row .presence-dot { right: -2px; bottom: -1px; width: 8px; height: 8px; border: 1px solid var(--panel); }
.user-dock { min-height: 66px; flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 13px; border-top: 1px solid var(--line); background: #141814; }
.dock-profile { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.dock-profile .avatar { width: 34px; height: 34px; font-size: 12px; }
.dock-user-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dock-user-copy strong { overflow: hidden; color: #e3e8dc; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dock-user-copy small { color: #7d8778; font-size: 10px; }
.online-indicator { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #74d498; box-shadow: 0 0 0 3px rgba(116,212,152,.1); }
.dock-settings { width: 29px; height: 31px; border-radius: 6px; }
.dock-settings .icon { width: 16px; height: 16px; }

.chat-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: #111411; }
.chat-header { position: relative; z-index: 2; min-height: 62px; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 21px; border-bottom: 1px solid var(--line-soft); background: rgba(17,20,17,.96); }
.thread-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #343d31; border-radius: 8px; background: #20271f; color: var(--acid); }
.thread-icon .icon { width: 15px; height: 15px; }
.thread-icon.dm-thread-icon { border-radius: 50%; border: 0; background: #252c25; }
.thread-heading { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-heading h1 { overflow: hidden; margin: 0; color: #edf0e8; font-family: var(--serif); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.thread-heading span { overflow: hidden; color: #7f897b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.icon-button { position: relative; width: 34px; height: 34px; border-radius: 7px; }
.icon-button .icon { width: 17px; height: 17px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.header-separator { width: 1px; height: 21px; margin: 0 3px; background: var(--line); }
.header-invite { height: 32px; display: flex; align-items: center; gap: 5px; margin-left: 4px; padding: 0 10px; border: 1px solid #3a4930; border-radius: 6px; background: rgba(193,241,122,.1); color: var(--acid); font-size: 11px; font-weight: 600; cursor: pointer; }
.header-invite:hover { background: rgba(193,241,122,.18); }
.header-invite[hidden] { display: none; }
.header-invite .icon { width: 14px; height: 14px; }
.message-search-wrap { width: min(280px, 38vw); height: 33px; display: flex; align-items: center; gap: 7px; padding: 0 7px; border: 1px solid #3a4337; border-radius: 6px; background: #1a201a; color: var(--muted); }
.message-search-wrap[hidden] { display: none; }
.message-search-wrap > .icon { width: 15px; height: 15px; }
.message-search-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-close { width: 23px; height: 23px; }
.search-close .icon { width: 13px; height: 13px; }
.mobile-menu, .mobile-close, .member-close { display: none; }
.message-list { min-height: 0; flex: 1; overflow-y: auto; padding: 19px clamp(18px, 3vw, 42px) 22px; scrollbar-color: #394138 transparent; scrollbar-width: thin; }
.date-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0 25px; color: #697367; font-size: 9px; font-weight: 700; letter-spacing: 0; }
.date-divider::before, .date-divider::after { height: 1px; flex: 1; content: ""; background: var(--line-soft); }
.welcome-block { position: relative; margin: 4px 0 27px; padding: 17px 19px 16px; overflow: hidden; border: 1px solid #333e2d; border-radius: 9px; background-color: #1a2119; background-image: repeating-linear-gradient(135deg, rgba(193,241,122,.032) 0, rgba(193,241,122,.032) 1px, transparent 1px, transparent 10px); }
.welcome-kicker { display: flex; align-items: center; gap: 7px; color: var(--acid); font-size: 9px; font-weight: 700; letter-spacing: 0; }
.welcome-kicker .icon { width: 13px; height: 13px; }
.welcome-block h2 { margin: 9px 0 4px; color: #f0f2e9; font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0; }
.welcome-block p { max-width: 510px; margin: 0; color: #9ba494; font-size: 12px; line-height: 1.6; }
.welcome-block em { color: #d3edae; font-style: normal; }
.welcome-spark { position: absolute; top: 22px; right: 22px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #424e3b; border-radius: 11px; color: var(--acid); transform: rotate(7deg); }
.welcome-spark .icon { width: 19px; height: 19px; }
.message-group { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; margin: 0 0 18px; animation: message-in .28s ease both; }
@keyframes message-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.message-avatar { width: 32px; height: 32px; margin-top: 1px; font-size: 12px; }
.message-content { min-width: 0; }
.message-meta { min-height: 18px; display: flex; align-items: baseline; gap: 7px; margin: 0 0 3px; }
.message-author { color: #e6eae1; font-size: 12px; font-weight: 700; }
.message-author.self { color: var(--acid); }
.message-time { color: #697366; font-size: 9px; }
.message-pinned-label { display: inline-flex; align-items: center; gap: 3px; color: #d7b96f; font-size: 9px; }
.message-pinned-label .icon { width: 10px; height: 10px; }
.pinned-message-highlight .message-content { border-radius: 7px; outline: 1px solid #d7b96f; outline-offset: 5px; background: rgba(215,185,111,.08); }
.message-copy { margin: 0; color: #bac1b5; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-group.has-mention .message-content { padding: 8px 10px; border: 1px solid rgba(237, 190, 82, .38); border-radius: 7px; background: rgba(115, 82, 19, .12); box-shadow: 0 0 15px rgba(237, 190, 82, .19), inset 0 0 16px rgba(237, 190, 82, .06); }
.message-mention { padding: 0 3px; border: 1px solid rgba(247, 207, 113, .36); border-radius: 4px; background: rgba(212, 161, 47, .18); color: #ffe4a1; font-weight: 700; text-shadow: 0 0 8px rgba(242, 190, 74, .42); }
.message-copy a { color: #c5e795; }
.message-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.reaction { height: 24px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid #323c30; border-radius: 6px; background: #1b211a; color: #aab3a3; font-size: 10px; cursor: pointer; }
.reaction:hover, .reaction.active { border-color: #657e4d; background: #2b3824; color: #d4f4ad; }
.reaction span { font-size: 12px; }
.message-actions { display: flex; align-items: center; gap: 4px; margin-top: 4px; opacity: 0; transition: opacity .15s ease; }
.message-group:hover .message-actions, .message-group:focus-within .message-actions { opacity: 1; }
.message-action { height: 22px; min-width: 25px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 5px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #879183; font-size: 10px; cursor: pointer; }
.message-action:hover { border-color: #3a4635; background: #20271f; color: var(--acid); }
.message-action .icon { width: 13px; height: 13px; }
.empty-search { padding: 42px 0; color: #929a8d; text-align: center; font-size: 12px; }
.pinned-message-list { display: grid; gap: 4px; }
.pinned-message-row { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.pinned-message-open { min-width: 0; flex: 1; display: grid; gap: 3px; padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.pinned-message-open:hover { background: var(--panel-hover); }
.pinned-message-open strong { font-size: 11px; }
.pinned-message-open span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pinned-message-open small { color: var(--faint); font-size: 9px; }
.pinned-message-remove { flex: 0 0 auto; }
.pinned-message-remove .icon { width: 14px; height: 14px; }
.empty-pins { display: grid; justify-items: center; gap: 8px; padding: 30px 12px; color: var(--muted); text-align: center; }
.empty-pins .icon { width: 23px; height: 23px; color: var(--acid); }
.empty-pins strong { color: var(--ink); font-size: 12px; }
.empty-pins span { max-width: 260px; font-size: 11px; line-height: 1.5; }
.empty-thread { display: grid; justify-items: center; gap: 9px; padding: 70px 12px; color: #788275; text-align: center; }
.empty-thread .icon { width: 30px; height: 30px; color: var(--acid); }
.empty-thread strong { color: #c6cec0; font-family: var(--serif); font-size: 16px; }
.empty-thread p { margin: 0; font-size: 11px; }
.composer-wrap { position: relative; z-index: 1; flex: 0 0 auto; padding: 0 clamp(18px, 3vw, 42px) 13px; background: linear-gradient(0deg, #111411 78%, rgba(17,20,17,0)); }
.composer { min-height: 49px; display: flex; align-items: flex-end; gap: 9px; padding: 8px 9px; border: 1px solid #394336; border-radius: 8px; background: #1a2019; box-shadow: 0 5px 20px rgba(0,0,0,.12); transition: border-color .18s ease; }
.composer:focus-within { border-color: #748c57; }
.composer-tool { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #86917e; cursor: pointer; }
.composer-tool:hover { background: #2b3428; color: var(--acid); }
.composer-tool .icon { width: 17px; height: 17px; }
.composer textarea { min-height: 29px; max-height: 132px; flex: 1; resize: none; padding: 6px 0 4px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; line-height: 1.45; }
.composer textarea::placeholder { color: #788374; }
.composer-tools { display: flex; align-items: center; gap: 4px; }
.send-button { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 6px; background: var(--acid); color: var(--acid-ink); cursor: pointer; transition: background .15s ease, transform .15s ease; }
.send-button:hover { background: #d2f69d; transform: translateY(-1px); }
.send-button .icon { width: 15px; height: 15px; }
.composer-hint { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px 0; color: #697365; font-size: 9px; }
.composer-hint b { padding: 0 3px; color: #4f594d; }
.composer-hint kbd { margin: 0 2px; padding: 1px 3px; border-color: #2a3229; background: transparent; color: #6c7768; font-size: 8px; }
.emoji-tray { position: absolute; right: clamp(18px, 3vw, 42px); bottom: 79px; z-index: 5; max-width: min(420px, calc(100vw - 36px)); max-height: 180px; display: flex; flex-wrap: wrap; gap: 3px; overflow-y: auto; padding: 6px; border: 1px solid #3b4538; border-radius: 8px; background: #20271f; box-shadow: 0 12px 35px #0008; }
.emoji-tray[hidden] { display: none; }
.emoji-tray button { width: 33px; height: 33px; border: 0; border-radius: 6px; background: transparent; font-size: 17px; cursor: pointer; }
.emoji-tray button:hover { background: #34402f; }
.emoji-picker-image { width: 23px; height: 23px; object-fit: contain; vertical-align: middle; }
.custom-emoji-inline { width: 1.3em; height: 1.3em; display: inline-block; object-fit: contain; vertical-align: -0.28em; }
.emoji-settings-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 18px; padding: 12px; border: 1px dashed #536545; border-radius: 7px; background: rgba(193,241,122,.04); transition: background .15s ease, border-color .15s ease; }
.emoji-settings-upload.dragging { border-color: var(--acid); background: rgba(193,241,122,.12); }
.emoji-settings-upload > span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.emoji-settings-group { margin: 16px 0 22px; }
.emoji-settings-group h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; color: var(--ink); font-size: 13px; }
.emoji-settings-group h3 small { color: var(--muted); font-size: 10px; font-weight: 400; }
.emoji-admin-row { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.emoji-admin-image { width: 34px; height: 34px; border-radius: 5px; object-fit: contain; background: #181d18; }
.emoji-admin-copy { min-width: 0; }
.emoji-admin-copy .modal-label { margin: 0 0 4px; }
.emoji-admin-copy .modal-input { height: 32px; margin: 0 0 3px; }
.emoji-admin-copy small { color: var(--faint); font-size: 9px; }
.emoji-admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.emoji-admin-actions .modal-button { min-height: 30px; padding: 0 8px; font-size: 10px; }
.emoji-settings-empty { margin: 0; padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 11px; }

.member-panel { min-height: 0; display: flex; flex-direction: column; padding: 0 15px 15px; overflow-y: auto; border-left: 1px solid var(--line-soft); background: #151915; scrollbar-width: thin; scrollbar-color: #394138 transparent; }
.member-panel-head { height: 62px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); color: #838d7e; font-size: 9px; font-weight: 700; letter-spacing: 0; }
.presence-card { position: relative; min-height: 139px; margin: 18px 0 23px; padding: 13px 13px 12px; overflow: hidden; border: 1px solid #34402e; border-radius: 8px; background: #1c231a; }
.presence-card::after { position: absolute; right: -29px; bottom: -61px; width: 147px; height: 100px; border: 1px solid rgba(193,241,122,.12); border-radius: 50%; content: ""; transform: rotate(-24deg); }
.presence-card-top { display: flex; align-items: center; gap: 6px; color: #8d9987; font-size: 8px; font-weight: 700; letter-spacing: 0; }
.live-pulse { width: 6px; height: 6px; border-radius: 50%; background: #7bd99c; box-shadow: 0 0 0 3px rgba(123,217,156,.12); }
.presence-more { width: 23px; height: 23px; margin: -5px -5px 0 auto; }
.presence-more .icon { width: 14px; height: 14px; }
.presence-count { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
.presence-count strong { color: #e9efdf; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; }
.presence-count span { color: #99a393; font-size: 10px; line-height: 1.35; }
.presence-stack { display: flex; margin-top: 11px; padding-left: 1px; }
.avatar-sm { width: 22px; height: 22px; margin-left: -1px; border: 2px solid #1c231a; font-size: 9px; }
.presence-stack .avatar + .avatar { margin-left: -5px; }
.member-group { margin-bottom: 22px; }
.member-group-title { display: flex; justify-content: space-between; margin: 0 0 12px; color: #778173; font-size: 9px; font-weight: 700; letter-spacing: 0; }
.member-group-title span:last-child { color: #a6afa0; font-weight: 500; }
.role-group-title { align-items: center; justify-content: flex-start; gap: 5px; margin-bottom: 8px; color: #8c91a0; font-size: 10px; font-weight: 600; text-transform: none; }
.role-group-title .icon { width: 11px; height: 11px; color: #777d8a; }
.role-group-title .role-group-dot { color: #8c91a0; }
.role-group-title .role-group-name { color: #aeb4c2; }
.role-group-title .role-group-count { color: #858b99; font-weight: 500; }
.hoisted-member-group .member-row { min-height: 44px; }
.member-row { min-height: 48px; display: flex; align-items: center; gap: 9px; border-radius: 6px; }
.member-row + .member-row { margin-top: 2px; }
.member-row:hover { background: #1c221c; }
.avatar-member { width: 31px; height: 31px; font-size: 11px; }
.avatar-member .presence-dot { right: -2px; bottom: -1px; width: 9px; height: 9px; border-color: #151915; }
.member-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 2px; }
.member-copy strong { overflow: hidden; color: #d7ddd1; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.member-copy small { overflow: hidden; color: #778173; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-tag { color: #81936e; font-size: 8px; font-weight: 700; letter-spacing: 0; }
.bot-member-tag { color: #b78cff; }
.bot-member-row .avatar { background: #342449; color: #e0c9ff; }
.voice-card { margin-top: 2px; padding: 13px; border: 1px solid #2d392c; border-radius: 8px; background: #1a2019; }
.voice-card-mark { display: flex; align-items: center; gap: 6px; margin-bottom: 11px; color: #8b9983; font-size: 8px; font-weight: 700; letter-spacing: 0; }
.voice-card-mark .icon { width: 14px; height: 14px; color: var(--acid); }
.voice-lock { margin-left: auto; color: #81916f; font-size: 7px; }
.voice-card > strong { color: #e4e9dc; font-family: var(--serif); font-size: 12px; }
.voice-card p { margin: 5px 0 11px; color: #838e7e; font-size: 10px; line-height: 1.45; }
.voice-join { width: 100%; height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #3b4a32; border-radius: 6px; background: #263122; color: #cee9aa; font-size: 10px; font-weight: 600; cursor: pointer; }
.voice-join:hover { background: #303e2b; }
.voice-join .icon { width: 13px; height: 13px; }
.sidebar-note { display: flex; align-items: flex-start; gap: 7px; margin-top: auto; padding-top: 20px; color: #697466; font-size: 9px; line-height: 1.5; }
.sidebar-note .icon { width: 14px; height: 14px; color: #819072; }

.sidebar-scrim { display: none; }
.context-menu { position: fixed; z-index: 80; min-width: 220px; max-height: min(70vh, 520px); overflow-y: auto; padding: 8px 6px; border: 1px solid #3d473d; border-radius: 10px; background: rgba(22, 27, 23, 0.97); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42); backdrop-filter: blur(8px); }
.context-submenu { z-index: 81; min-width: 210px; }
.context-menu-item { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 0 10px 0 9px; border: 0; border-radius: 6px; background: transparent; color: #e2e7dd; font-size: 12px; text-align: left; cursor: pointer; }
.context-menu-item:hover { background: rgba(193, 241, 122, 0.08); }
.context-menu-item[aria-expanded="true"] { background: rgba(193, 241, 122, 0.08); }
.context-menu-item.danger:hover { background: rgba(255, 99, 99, 0.09); color: #f8b5b5; }
.context-menu-icon { width: 20px; display: inline-grid; place-items: center; color: #aeb7a9; font-weight: 700; }
.context-menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-menu-role-state { color: #899382; font-size: 9px; }
.context-menu-item .context-menu-arrow { margin-left: auto; color: #7d8879; }
.context-menu-divider { height: 1px; margin: 6px 4px; background: rgba(118, 131, 113, 0.28); }

.app-modal { width: min(420px, calc(100vw - 32px)); max-width: none; padding: 0; border: 1px solid #4d3a68; border-radius: 10px; background: linear-gradient(180deg, #171121 0%, #120d1c 100%); color: var(--ink); box-shadow: 0 30px 120px rgba(10, 5, 18, 0.9), 0 0 0 1px rgba(183, 140, 255, 0.14); }
.app-modal::backdrop { background: rgba(5,8,5,.72); backdrop-filter: blur(3px); }
.app-modal.image-viewer { width: min(94vw, 1100px); height: min(92vh, 900px); overflow: hidden; border-color: #374133; background: #090b09; }
.image-viewer .modal-surface { width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; }
.image-viewer .modal-close { z-index: 1; border-color: #596454; background: rgba(20,24,20,.9); }
.image-viewer-content { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; }
.image-viewer-content img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.modal-surface { position: relative; padding: 27px; }
.modal-close { position: absolute; top: 13px; right: 13px; width: 29px; height: 29px; }
.modal-close .icon { width: 16px; height: 16px; }
.modal-kicker { margin-bottom: 7px; color: var(--acid); font-size: 9px; font-weight: 700; letter-spacing: 0; }
.modal-title { margin: 0 34px 6px 0; color: #eff2e9; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.modal-copy { margin: 0 0 20px; color: #949d8e; font-size: 11px; line-height: 1.6; }
.modal-label { display: block; margin: 14px 0 6px; color: #bac3b3; font-size: 10px; font-weight: 600; }
.modal-input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #3a4637; border-radius: 6px; background: #111611; color: var(--ink); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-button { min-height: 35px; padding: 0 13px; border: 1px solid #5b4b7d; border-radius: 6px; background: linear-gradient(180deg, #1d1528 0%, #171221 100%); color: #f0e9ff; font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.modal-button.primary { border-color: var(--acid); background: linear-gradient(180deg, #c59aff 0%, #a77af8 100%); color: var(--acid-ink); box-shadow: 0 0 18px rgba(183, 140, 255, 0.35); }
.modal-button:hover { filter: brightness(1.12); }
.invite-link { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #354032; border-radius: 6px; background: #121712; color: #b4bea9; font-size: 10px; overflow-wrap: anywhere; }
.invite-link strong { color: #d4e6ba; font-weight: 500; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #43513a; border-radius: 7px; background: #222a20; color: #dbe7d1; font-size: 11px; box-shadow: 0 8px 30px #0007; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 62px 230px minmax(280px, 1fr); }
  .member-panel { display: none; }
  .member-panel.open { position: absolute; z-index: 6; top: 0; right: 0; bottom: 0; width: 264px; display: flex; border-left: 1px solid var(--line); box-shadow: -20px 0 50px #0007; }
  .member-toggle { display: inline-grid; }
  .member-close { display: inline-grid; }
}
@media (max-width: 760px) {
  body { overflow: hidden; }
  .app-shell { position: relative; min-height: 0; grid-template-columns: 1fr; }
  .server-rail { display: none; }
  .channel-sidebar { position: absolute; z-index: 8; top: 0; bottom: 0; left: 0; width: min(310px, calc(100vw - 46px)); border-right: 1px solid #3a4437; box-shadow: 14px 0 45px #0008; transform: translateX(-105%); transition: transform .22s ease; }
  .channel-sidebar.open { transform: translateX(0); }
  .mobile-close { display: inline-grid; }
  .sidebar-scrim { position: absolute; z-index: 7; inset: 0; display: block; border: 0; background: rgba(0,0,0,.56); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
  .chat-header { min-height: 58px; gap: 8px; padding: 0 12px; }
  .mobile-menu { display: inline-grid; width: 31px; height: 31px; }
  .mobile-menu .icon { width: 17px; height: 17px; }
  .thread-icon { width: 27px; height: 27px; }
  .thread-heading span { max-width: 40vw; }
  .header-actions { gap: 1px; }
  .header-actions .header-action { width: 30px; height: 30px; }
  .header-actions .header-action .icon, .member-toggle .icon { width: 16px; height: 16px; }
  .header-separator { margin: 0 1px; }
  .header-invite { height: 29px; padding: 0 7px; font-size: 10px; }
  .header-invite .icon { width: 13px; height: 13px; }
  .message-list { padding: 15px 15px 20px; }
  .welcome-block { padding: 15px; }
  .welcome-block h2 { max-width: calc(100% - 40px); font-size: 17px; }
  .welcome-spark { top: 17px; right: 15px; width: 31px; height: 31px; }
  .composer-wrap { padding: 0 12px 10px; }
  .composer-hint > span:first-child { display: none; }
  .composer-hint { justify-content: flex-end; }
  .message-search-wrap { position: absolute; top: 53px; right: 10px; z-index: 5; width: min(320px, calc(100vw - 24px)); box-shadow: 0 8px 24px #0009; }
  .emoji-tray { right: 12px; bottom: 71px; }
}
@media (max-width: 390px) {
  .header-actions .header-action:nth-child(2) { display: none; }
  .header-invite span { display: none; }
  .header-invite { width: 30px; justify-content: center; padding: 0; }
  .thread-heading span { max-width: 34vw; }
  .composer-hint { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.app-shell[data-theme="ember"] { --acid: #ed9b72; --acid-ink: #2b1c16; }
.app-shell[data-theme="tide"] { --acid: #7eb4ad; --acid-ink: #142321; }
.app-shell[data-theme="orchid"] { --acid: #db91c4; --acid-ink: #291726; }
.server-heading-copy { min-width: 0; display: flex; align-items: center; gap: 7px; }
#server-tag-label { overflow: hidden; color: var(--acid); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#server-tag-label[hidden] { display: none; }
.app-modal.wide { width: min(640px, calc(100vw - 30px)); }
.settings-tabs { display: flex; gap: 3px; margin: 4px 0 17px; padding: 3px; border: 1px solid #30392e; border-radius: 7px; background: #121712; }
.settings-tab { min-height: 31px; flex: 1; border: 0; border-radius: 5px; background: transparent; color: #99a392; font-size: 10px; cursor: pointer; }
.settings-tab:hover { color: var(--ink); }
.settings-tab.active { background: #2a3328; color: var(--acid); }
.settings-heading { margin: 4px 0 11px; color: #e4eade; font-family: var(--serif); font-size: 14px; font-weight: 600; }
.settings-row { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 13px; padding: 9px 10px; border: 0; border-bottom: 1px solid #2a3228; background: transparent; text-align: left; }
button.settings-row { cursor: pointer; }
button.settings-row:hover { background: #222a20; }
.settings-row-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.settings-row-copy strong, .settings-row > div strong { color: #dce3d6; font-size: 11px; font-weight: 600; }
.settings-row-copy small, .settings-row > div small { color: #85907f; font-size: 10px; line-height: 1.4; }
.language-setting { align-items: flex-start; }
.language-setting .modal-input { width: min(42%, 220px); min-width: 120px; flex: 0 1 220px; }
.language-picker { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; }
.language-flag-button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid #3a4637; border-radius: 8px; background: #151b15; color: #edf2ea; cursor: pointer; }
.language-flag-button:hover { border-color: #606f58; background: #1d251d; }
.language-label { font-size: 11px; font-weight: 600; }
.language-flag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(193,241,122,.14); font-size: 13px; }
.language-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 30; display: grid; gap: 4px; min-width: 180px; padding: 7px; border: 1px solid #3a4637; border-radius: 8px; background: rgba(19,24,20,.98); box-shadow: 0 16px 28px rgba(0,0,0,.28); }
.language-menu[hidden] { display: none; }
.language-menu-option { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #e0e8dc; text-align: left; cursor: pointer; }
.language-menu-option:hover, .language-menu-option.active { background: rgba(193,241,122,.09); }
.language-select-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-disclaimer, .admin-empty { margin: 8px 0 14px; color: #9aa391; font-size: 11px; line-height: 1.5; }
.admin-revenue-currency, .admin-section { margin-top: 14px; border-top: 1px solid #30392e; padding-top: 12px; }
.admin-revenue-currency h4, .admin-section h4 { margin: 0 0 9px; color: #dce3d6; font-size: 12px; font-weight: 600; }
.admin-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.admin-metric { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 9px; border: 1px solid #30392e; border-radius: 5px; }
.admin-metric span, .admin-metric small { color: #9aa391; font-size: 10px; }
.admin-metric strong { overflow-wrap: anywhere; color: #e6eddd; font-size: 14px; }
.admin-table-scroll { max-width: 100%; max-height: 280px; overflow: auto; border: 1px solid #30392e; border-radius: 5px; }
.admin-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 11px; text-align: left; }
.admin-table th, .admin-table td { max-width: 240px; padding: 8px 9px; border-bottom: 1px solid #30392e; overflow-wrap: anywhere; }
.admin-table th { position: sticky; top: 0; background: #1b2119; color: #aeb8a5; font-weight: 600; }
.admin-table td { color: #d2dacb; }
.admin-table .modal-button { min-height: 30px; padding: 0 9px; }
.admin-user-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
@media (max-width: 560px) { .admin-metrics { grid-template-columns: 1fr; } }
.toggle-switch { position: relative; width: 34px; height: 19px; flex: 0 0 auto; border: 1px solid #495345; border-radius: 12px; background: #293027; transition: background .15s ease; }
.toggle-switch::after { position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: #a5ae9d; content: ""; transition: transform .15s ease; }
[aria-checked="true"] .toggle-switch { border-color: #9bc561; background: #8eb753; }
[aria-checked="true"] .toggle-switch::after { background: #172213; transform: translateX(15px); }
.membership-row { margin-top: 15px; border: 1px solid #364332; border-radius: 7px; background: #1c241a; }
.membership-row > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vip-perks { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px; border: 1px solid #3d4a34; border-radius: 7px; background: #1d261a; }
.vip-perks > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.vip-perks strong { color: #e0e9d8; font-size: 10px; }
.vip-perks small { color: #899682; font-size: 9px; line-height: 1.4; }
.vip-perks b { flex: 0 0 auto; padding: 4px 6px; border-radius: 5px; background: #33452b; color: var(--acid); font-size: 9px; }
.boost-inventory-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 2px; }
.vip-discount strong { color: var(--acid); }
.settings-footer { margin-top: 13px; color: #74806f; font-size: 9px; line-height: 1.5; }
.server-preview { display: flex; align-items: center; gap: 11px; margin-top: 15px; padding: 11px; border: 1px solid #313a2e; border-radius: 7px; background: #131813; }
.server-preview-mark { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #536545; border-radius: 10px; background: var(--acid); color: var(--acid-ink); font-family: var(--serif); font-size: 16px; font-weight: 700; }
.server-profile-details { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 14px; }
.server-profile-detail-group { min-width: 0; display: grid; gap: 5px; }
.server-profile-detail-group > strong { color: var(--faint); font-size: 9px; text-transform: uppercase; }
.server-profile-detail-group > span { display: flex; flex-wrap: wrap; gap: 5px; }
.server-detail-chip { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-hover); color: var(--muted); font-size: 10px; }
.server-profile-empty, .server-profile-help { color: var(--faint); font-size: 10px; line-height: 1.5; }
.server-profile-help { display: block; margin: -7px 0 12px; }
.server-preview > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.server-preview strong { overflow: hidden; color: #e4eadf; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.server-preview small { overflow: hidden; color: #83907c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.server-preview em { color: var(--acid); font-size: 9px; font-style: normal; }
.modal-textarea { height: 68px; padding: 9px 11px; resize: vertical; }
.role-default-note { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; padding: 11px; border: 1px solid #343d31; border-radius: 6px; background: #20271f; }
.role-default-note strong { color: #dce4d7; font-size: 11px; }
.role-default-note small { color: #899484; font-size: 9px; }
.role-toolbar { display: flex; gap: 8px; margin-bottom: 8px; }
.role-toolbar .modal-input { min-width: 0; flex: 1; }
.role-list { max-height: 280px; overflow-y: auto; }
.role-row { min-height: 44px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #2b3329; }
.role-row[hidden] { display: none; }
.role-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; }
.role-name { min-width: 0; flex: 1; overflow: hidden; color: #dbe1d6; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.role-members { color: #899383; font-size: 9px; }
.role-row .icon-button { width: 27px; height: 27px; font-size: 15px; }
.role-delete { color: #bf8171; font-size: 18px !important; }
.server-menu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.server-menu-actions .modal-button { text-align: left; }
.bot-market-list { display: grid; gap: 7px; max-height: min(56vh, 420px); overflow-y: auto; margin-top: 10px; }
.bot-market-card { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #30392e; border-radius: 6px; background: #151a14; }
.bot-market-card > div:first-child { min-width: 0; flex: 1; }
.bot-market-card strong { display: block; color: #e3e9de; font-size: 11px; }
.bot-market-card small { display: block; margin-top: 3px; color: #899382; font-size: 9px; }
.bot-market-card p { margin: 6px 0 0; color: #aab4a4; font-size: 10px; line-height: 1.45; }
.bot-market-card code { display: block; margin-top: 5px; overflow-wrap: anywhere; color: #9caf87; font-size: 9px; }
.bot-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bot-card-actions .modal-button { min-height: 30px; padding: 0 9px; }
.bot-token-reveal { overflow-wrap: anywhere; padding: 10px; border: 1px solid #3b4637; border-radius: 6px; background: #101510; color: #e0e8dc; font-size: 11px; user-select: all; }
.bot-token-reveal code { white-space: pre-wrap; }
.boost-summary { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid #35402f; border-radius: 7px; background: #1e261b; }
.boost-gem { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; background: #303c29; color: var(--acid); font-size: 18px; }
.boost-summary > div { display: flex; flex-direction: column; gap: 3px; }
.boost-summary strong { color: #e3eadb; font-family: var(--serif); font-size: 13px; }
.boost-summary small { color: #909b87; font-size: 9px; }
.boost-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.boost-level { min-width: 0; padding: 10px; border: 1px solid #30392e; border-radius: 7px; background: #171d17; }
.boost-level.unlocked { border-color: #60774a; background: #20291c; }
.boost-level-head { display: flex; flex-direction: column; gap: 3px; }
.boost-level-head strong { color: #dfe7d6; font-family: var(--serif); font-size: 11px; }
.boost-level-head span { color: #899483; font-size: 8px; }
.boost-progress { height: 4px; margin: 9px 0; overflow: hidden; border-radius: 4px; background: #30382e; }
.boost-progress span { height: 100%; display: block; border-radius: inherit; background: var(--acid); }
.boost-level ul { display: grid; gap: 5px; margin: 0; padding-left: 13px; color: #939d8c; font-size: 8px; line-height: 1.35; }
.checkout-step { display: flex; align-items: center; gap: 8px; margin: 3px 0 18px; color: #8b9685; font-size: 9px; }
.checkout-step strong { color: var(--acid); }
.checkout-step i { min-width: 20px; height: 1px; flex: 1; background: #394235; }
.quantity-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid #30382e; border-bottom: 1px solid #30382e; }
.quantity-row > strong { flex: 1; color: #d4dccd; font-size: 10px; }
.quantity-row > span { color: #909a89; font-size: 9px; white-space: nowrap; }
.quantity-stepper { height: 32px; display: flex; align-items: center; border: 1px solid #394235; border-radius: 6px; background: #141914; }
.quantity-stepper button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--acid); font-size: 19px; cursor: pointer; }
.quantity-stepper output { min-width: 22px; color: #e1e6dc; text-align: center; font-size: 11px; }
.boost-hint { margin-top: 12px; padding: 9px; border-radius: 6px; background: #242a23; color: #a0aa98; font-size: 9px; }
.checkout-line { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: #a9b2a2; font-size: 10px; }
.checkout-line strong { color: #e4eade; }
.checkout-total { margin-top: 11px; border-top: 1px solid #30382e; color: #dfe6d9; font-size: 13px; font-weight: 600; }
.checkout-total strong { font-family: var(--serif); font-size: 16px; }
.checkout-disclaimer { color: #939d8b; font-size: 10px; line-height: 1.5; }
.checkout-agreement { border: 1px solid #333c30; border-radius: 6px; }
.plan-options { display: grid; gap: 8px; }
.plan-option { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid #394235; border-radius: 7px; background: #171d17; cursor: pointer; }
.plan-option.selected { border-color: #7f9f59; background: #222b1e; }
.plan-option input, .checkout-consent input { accent-color: var(--acid); }
.plan-option span { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 8px; }
.plan-option strong { color: #dbe2d5; font-size: 11px; }
.plan-option small { color: #9ba493; font-size: 9px; }
.subscription-details { margin: 12px 0; color: #adb7a5; font-size: 10px; }
.subscription-details summary { cursor: pointer; }
.subscription-details p { color: #879282; line-height: 1.5; }
.checkout-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: #9ba594; font-size: 9px; line-height: 1.5; }
.checkout-consent input { margin: 1px 0 0; }
.app-shell.hide-members { grid-template-columns: 68px 252px minmax(300px, 1fr); }
.app-shell.hide-members .member-panel { display: none; }
body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
@media (max-width: 1180px) { .app-shell.hide-members { grid-template-columns: 62px 230px minmax(280px, 1fr); } }
@media (max-width: 760px) { .app-shell.hide-members { grid-template-columns: 1fr; } }

.chat-panel { background-color: var(--profile-background, #111411); background-image: var(--profile-background-image, none); background-size: cover; background-position: center; }
.message-copy { color: var(--profile-font-color, #bac1b5); }
.message-author, .member-copy strong, .dock-user-copy strong { font-family: var(--profile-name-font, var(--serif)); }
.vip-badge { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 2px 5px; border: 1px solid #7e9b50; border-radius: 4px; background: rgba(193,241,122,.12); color: var(--acid); font: 700 8px var(--sans); vertical-align: middle; }
.vip-badge[hidden] { display: none; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar-setting-row { display: flex; align-items: center; gap: 11px; margin: 13px 0; padding: 10px; border: 1px solid #30392e; border-radius: 7px; background: #141914; }
.avatar-setting-row .avatar { width: 39px; height: 39px; }
.avatar-setting-row > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.avatar-setting-row strong { color: #e0e6da; font-size: 10px; }
.avatar-setting-row small { color: #899383; font-size: 9px; }
.color-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid #2a3228; color: #c6cebf; font-size: 10px; }
.color-setting-row input[type="color"] { width: 38px; height: 26px; padding: 2px; border: 1px solid #45513e; border-radius: 5px; background: #161b15; cursor: pointer; }
.vip-profile-form { margin-bottom: 13px; padding: 11px; border: 1px solid #35412f; border-radius: 7px; background: #1a2118; }
.vip-profile-form .settings-heading { margin-top: 0; }
.vip-file-settings { display: grid; gap: 4px; padding: 0 2px 8px; }
.vip-file-settings .modal-input { height: auto; min-height: 36px; padding: 6px; }
.permission-option { display: flex; align-items: flex-start; gap: 9px; padding: 9px; border-bottom: 1px solid #2a3228; color: #cbd3c5; cursor: pointer; }
.permission-option input { margin: 2px 0 0; accent-color: var(--acid); }
.permission-option span { display: flex; flex-direction: column; gap: 3px; }
.permission-option strong { color: #dce3d6; font-size: 10px; }
.permission-option small { color: #83907d; font-size: 9px; line-height: 1.4; }
.permission-list { max-height: 390px; overflow: auto; }
.role-permission-group { min-width: 0; margin: 13px 0; padding: 0 9px 7px; border: 1px solid #30392e; border-radius: 5px; }
.role-permission-group legend { padding: 0 6px; color: var(--acid); font-size: 11px; font-weight: 600; }
.role-permission { color: #8d9985; font-size: 8px; white-space: nowrap; }
.support-entry { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px; border: 1px solid #30392e; border-radius: 6px; background: #151a14; text-align: left; cursor: pointer; }
.support-entry > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.support-entry strong { color: #dce3d6; font-size: 10px; }
.support-entry small { color: #889382; font-size: 9px; }
.support-priority { color: var(--acid); font-size: 8px; font-weight: 700; }
.support-priority-card { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; padding: 10px; border: 1px solid #374430; border-radius: 6px; background: #20281d; }
.support-priority-card strong { color: var(--acid); font-size: 10px; }
.support-priority-card small { color: #929d8c; font-size: 9px; }
.payment-note { margin-top: 6px; color: #879282; font-size: 9px; line-height: 1.4; }
.pending-upload-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 7px; }
.pending-upload-list[hidden] { display: none; }
.pending-attachment { max-width: 100%; min-height: 27px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid #3b4637; border-radius: 5px; background: #1b2119; color: #ccd5c5; font-size: 9px; }
.pending-attachment > span { overflow: hidden; max-width: 190px; text-overflow: ellipsis; white-space: nowrap; }
.pending-attachment small { color: #86917f; white-space: nowrap; }
.pending-attachment button { width: 18px; height: 18px; border: 0; border-radius: 4px; background: transparent; color: #b78a7e; cursor: pointer; }
.message-attachments { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.message-attachment { min-width: 170px; max-width: min(360px, 100%); display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #374133; border-radius: 6px; background: #1a2019; color: inherit; text-decoration: none; }
.message-attachment:hover { border-color: #738c58; background: #20281d; }
.message-attachment-image { width: 120px; min-width: 120px; height: 120px; flex: 0 0 120px; display: block; overflow: hidden; padding: 0; }
.message-attachment-image img { width: 120px; height: 120px; display: block; object-fit: cover; }
.attachment-symbol { color: var(--acid); font-size: 18px; }
.message-attachment > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.message-attachment strong { overflow: hidden; color: #dce3d6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment small { color: #899382; font-size: 9px; }
.composer-hint #message-counter { color: #9da895; font-variant-numeric: tabular-nums; }
.composer button:disabled, .composer textarea:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 520px) {
  .role-permission { display: none; }
  .avatar-setting-row { flex-wrap: wrap; }
  .pending-attachment > span { max-width: 115px; }
}
@media (max-width: 520px) {
  .boost-levels { grid-template-columns: 1fr; }
  .boost-level { padding: 9px; }
  .boost-level ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-tabs { flex-wrap: wrap; }
  .settings-tab { min-width: calc(50% - 3px); }
  .role-members { display: none; }
  .quantity-row { flex-wrap: wrap; }
  .quantity-row > strong { min-width: calc(100% - 140px); }
}