/* ================= CRYSTAL GLASS (theme ids lq-dark / lq-light, class .ui-lq on <html>) =================
   A rebuild of the glass look with five rules built in, so the old problems cannot come back:
   1. ONE glass layer per surface. Only panes, dialogs, menus, pop-ups, toasts and tooltips blur what is behind them.
      Everything that sits inside them is a flat tint (a colour with some transparency): no blur, no sheen image, no second rim.
      A pop-up that opens inside another glass surface drops its own blur.
   2. Pure CSS. No script, no SVG filter, no rim image, no layer created after the page is shown. Colours, rims and shapes are
      in this file and in the first paint. Nothing is animated until the page has finished loading (.lq-ready).
   3. Smooth corners. Every glass surface has its own radius from one scale, and nothing draws outside it (no url() filters).
   4. Counters, timers and badges have a fixed width and tabular digits, so a number changing never moves the layout.
   5. The look is chosen in the <head> before first paint (see the small script there), so there is no theme flash.
   One colour family: the accent. No rainbow wall. Logical properties, so Arabic (RTL) mirrors on its own. */

:root.ui-lq {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, 'Noto Sans', 'Noto Sans Arabic', sans-serif;
  /* shape scale */
  --lq-r-btn: 12px; --lq-r-row: 12px; --lq-r-card: 16px; --lq-r-pop: 18px; --lq-r-island: 24px; --lq-r-dialog: 26px; --lq-r-pill: 999px;
  /* the one glass: blur + saturation, used only by the surfaces listed in section 2 */
  --lq-blur: blur(24px) saturate(160%);
  /* palette (dark) */
  --lq-wall-base: #1b1c21;
  --lq-w1: #b08968; --lq-w2: #6f7380;
  --lq-pane: rgba(255,255,255,.07);
  --lq-main: rgba(255,255,255,.09);
  --lq-pop: rgba(46,47,54,.78);
  --lq-solid: #2a2b31;                         /* opaque stand-in where text must stay readable on any wall */
  --lq-t1: rgba(255,255,255,.05);             /* flat tints used inside glass */
  --lq-t2: rgba(255,255,255,.09);
  --lq-t3: rgba(255,255,255,.15);
  --lq-edge: rgba(255,255,255,.13);
  --lq-hi: rgba(255,255,255,.22);
  --lq-line: rgba(255,255,255,.09);
  --lq-rim: inset 0 0 0 1px var(--lq-edge), inset 0 1px 0 var(--lq-hi);
  --lq-drop: 0 14px 40px rgba(0,0,0,.40);
  --lq-ring: color-mix(in srgb, var(--accent) 55%, transparent);
  --text: #dfe1e8; --bright: #ffffff; --muted: #c1c5d2;
  --green: #30d158; --red: #ff453a; --yellow: #ffd60a;
  /* tokens the rest of the app paints with: solid family, so nothing inside a pane becomes a second see-through layer */
  --bg-0: #202126; --bg-1: #26272d; --bg-2: #2a2b31;
  --bg-3: rgba(255,255,255,.08); --bg-4: rgba(255,255,255,.13);
  --border: rgba(255,255,255,.10); --border-focus: rgba(255,255,255,.22);
  --panel: var(--bg-2); --panel2: rgba(255,255,255,.07);
  --accent-bg: color-mix(in srgb, var(--accent) 16%, transparent);
  color-scheme: dark;
}
:root.ui-lq[data-theme="light"] {
  --lq-wall-base: #eceef2;
  --lq-w1: #dcc1a4; --lq-w2: #c9ced9;
  --lq-pane: rgba(255,255,255,.50);
  --lq-main: rgba(255,255,255,.62);
  --lq-pop: rgba(255,255,255,.84);
  --lq-solid: #f4f5f8;
  --lq-t1: rgba(255,255,255,.45);
  --lq-t2: rgba(255,255,255,.7);
  --lq-t3: rgba(255,255,255,.92);
  --lq-edge: rgba(60,66,84,.18);
  --lq-hi: rgba(255,255,255,.95);
  --lq-line: rgba(60,66,84,.13);
  --lq-drop: 0 14px 40px rgba(40,46,70,.18);
  --text: #383c48; --bright: #0d0f14; --muted: #525867;
  --green: #1fa44a; --red: #ff3b30; --yellow: #c77c00;
  --bg-0: #e8eaef; --bg-1: #eef0f4; --bg-2: #f4f5f8;
  --bg-3: rgba(60,66,84,.08); --bg-4: rgba(60,66,84,.14);
  --border: rgba(60,66,84,.15); --border-focus: rgba(60,66,84,.28);
  --panel2: rgba(60,66,84,.07);
  color-scheme: light;
}

/* wall: the accent only, soft, on a calm base (one colour family, no rainbow) */
:root.ui-lq body {
  background:
    radial-gradient(60% 50% at 8% 4%, color-mix(in srgb, var(--lq-w1) calc(50% * var(--lq-ws, 1)), transparent), transparent 74%),
    radial-gradient(60% 55% at 100% 100%, color-mix(in srgb, var(--lq-w2) calc(55% * var(--lq-ws, 1)), transparent), transparent 74%),
    radial-gradient(40% 40% at 55% 45%, color-mix(in srgb, var(--lq-w1) calc(12% * var(--lq-ws, 1)), transparent), transparent 80%),
    var(--lq-wall-base);
  background-attachment: fixed;
}
:root.ui-lq[data-theme="light"] body {
  background:
    radial-gradient(60% 50% at 8% 4%, color-mix(in srgb, var(--lq-w1) calc(45% * var(--lq-ws, 1)), transparent), transparent 74%),
    radial-gradient(60% 55% at 100% 100%, color-mix(in srgb, var(--lq-w2) calc(38% * var(--lq-ws, 1)), transparent), transparent 74%),
    var(--lq-wall-base);
  background-attachment: fixed;
}
:root.ui-lq .app { background: transparent; }

/* one clean state: hover, press, focus and switches change in a single step, with no fade, no springy scale and no in-between frames */
:root.ui-lq, :root.ui-lq *, :root.ui-lq *::before, :root.ui-lq *::after { transition: none !important; }
:root.ui-lq .btn:active:not(:disabled), :root.ui-lq .rail-btn:active, :root.ui-lq .control-pill-btn:active, :root.ui-lq .icon-btn:active { transform: none !important; }
:root.ui-lq .rail-btn:hover, :root.ui-lq .control-pill-btn:hover { transform: none; }

/* ===== 1. the four panes: glass layer, one each ===== */
:root.ui-lq .rail, :root.ui-lq .channels-pane, :root.ui-lq .members-pane, :root.ui-lq .main {
  border: 0; border-radius: var(--lq-r-island); box-shadow: var(--lq-rim), var(--lq-drop);
  -webkit-backdrop-filter: var(--lq-blur); backdrop-filter: var(--lq-blur);
}
:root.ui-lq .rail, :root.ui-lq .channels-pane, :root.ui-lq .members-pane { background-color: var(--lq-pane); background-image: linear-gradient(var(--lq-veil, transparent), var(--lq-veil, transparent)); }
:root.ui-lq .main { background-color: var(--lq-main); background-image: linear-gradient(var(--lq-veil, transparent), var(--lq-veil, transparent)); }
@media (min-width: 861px) {
  :root.ui-lq .app { padding: 12px; gap: 12px; }
  :root.ui-lq .rail, :root.ui-lq .channels-pane, :root.ui-lq .main, :root.ui-lq .members-pane { overflow: hidden; }
  :root.ui-lq .rail { width: 68px; padding: 14px 0; overflow-y: auto; }
  :root.ui-lq .members-pane.hidden-pane { display: none; }
}
@media (max-width: 860px) {   /* phone: panes are drawers or full screens, flat and square so nothing shows through */
  :root.ui-lq .rail, :root.ui-lq .channels-pane, :root.ui-lq .members-pane, :root.ui-lq .main {
    border-radius: 0; box-shadow: none; background-color: var(--lq-solid); background-image: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
/* headers and strips inside a pane: no layer of their own */
:root.ui-lq :is(.pane-header:not(.has-banner), .main-header, .voice-stage-title) {
  background: transparent; border-color: var(--lq-line); box-shadow: none;
}
:root.ui-lq .pane-header, :root.ui-lq .main-header { height: 52px; border-bottom: 1px solid var(--lq-line); }
:root.ui-lq .rail-sep { background: var(--lq-line); height: 1px; }

/* ===== 2. floating surfaces: the only other glass ===== */
:root.ui-lq :is(.dialog-box, .profile-pop, .auth-card, .mc-box, .settings-shell, #ctx-menu, #ctx-sub, #user-menu, #emoji-picker, #slash-pop, #ment-pop,
  #invite-box, #vmini, #sp-dock, #music-mini, .mini-menu, .gl-menu, .gl-sub, .um-list, .vc-popover, .mc-cp, .bdg-sheet, .pj-sheet, .ph-sheet, .vc-sheet,
  .dp-box, .te-box, .bot-card, .pe-card, .stream-invite, .role-editor, .sticker-card, .fpick, .wt-card, .toast-item, #ui-tip, .savebar) {
  background-color: var(--lq-pop); background-image: linear-gradient(var(--lq-veil, transparent), var(--lq-veil, transparent)); border: 0; box-shadow: var(--lq-rim), var(--lq-drop); color: var(--text);
  -webkit-backdrop-filter: var(--lq-blur); backdrop-filter: var(--lq-blur);
}
:root.ui-lq :is(.dialog-box, .profile-pop, .auth-card, .mc-box, .settings-shell) { border-radius: var(--lq-r-dialog); }
:root.ui-lq :is(#ctx-menu, #ctx-sub, #user-menu, #emoji-picker, .mini-menu, .gl-menu, .gl-sub, .um-list, .vc-popover) { border-radius: var(--lq-r-pop); padding: 6px; }
:root.ui-lq :is(.toast-item, .savebar, #vmini, #sp-dock, #music-mini, #ui-tip) { border-radius: var(--lq-r-card); }
:root.ui-lq #ui-tip { border-radius: 10px; }
:root.ui-lq .savebar { border-radius: var(--lq-r-pill); }
/* a pop-up inside another glass surface never blurs again */
:root.ui-lq :is(.dialog-box, .settings-shell, .profile-pop, .mc-box) :is(#ctx-menu, #ctx-sub, .mini-menu, .gl-menu, .vc-popover, .um-list, .toast-item, #ui-tip, .savebar) {
  -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--lq-solid); background-image: none;
}
/* the dimmed screen behind a dialog is a plain scrim: the dialog box is the glass, the screen is not */
:root.ui-lq dialog, :root.ui-lq dialog.fullscreen {
  background: rgba(8,9,14,.38); -webkit-backdrop-filter: none; backdrop-filter: none; border: 0;
}
:root.ui-lq[data-theme="light"] dialog, :root.ui-lq[data-theme="light"] dialog.fullscreen { background: rgba(232,235,243,.5); }
:root.ui-lq dialog.fullscreen .settings-shell { border-radius: var(--lq-r-dialog); }
:root.ui-lq .settings-nav, :root.ui-lq .settings-body { background: transparent; }
:root.ui-lq .settings-nav { border-inline-end: 1px solid var(--lq-line); }
@media (max-width: 860px) {
  :root.ui-lq dialog.fullscreen .settings-shell { border-radius: 0; background-color: var(--lq-solid); background-image: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  :root.ui-lq * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  :root.ui-lq { --lq-pane: var(--lq-solid); --lq-main: var(--lq-solid); --lq-pop: var(--lq-solid); }
}

/* ===== 3. everything inside: flat tints, no blur, no image, one rim at most ===== */
:root.ui-lq .btn, :root.ui-lq .mc-btn, :root.ui-lq .dp-btn, :root.ui-lq .sb-btn {
  background-color: var(--lq-t2); background-image: none; border: 0; border-radius: var(--lq-r-btn); color: var(--bright); box-shadow: var(--lq-rim);
  transition: background-color .15s, box-shadow .15s, transform .15s;
}
:root.ui-lq .btn:hover:not(:disabled), :root.ui-lq .mc-btn:hover, :root.ui-lq .dp-btn:hover, :root.ui-lq .sb-btn:hover { background-color: var(--lq-t3); }
:root.ui-lq .btn:active:not(:disabled) { transform: scale(.97); }
:root.ui-lq :is(.btn-success, .btn.primary, .auth-submit-action, .bdg-btn.pri) {
  background-color: var(--accent); color: var(--on-accent, #fff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), inset 0 1px 0 rgba(255,255,255,.45);
}
:root.ui-lq :is(.btn-success, .btn.primary, .auth-submit-action):hover:not(:disabled) { background-color: color-mix(in srgb, var(--accent) 88%, #fff); }
:root.ui-lq .btn-danger { background-color: color-mix(in srgb, var(--red) 18%, var(--lq-t2)); color: var(--red); }
:root.ui-lq .btn-danger:hover:not(:disabled) { background-color: var(--red); color: #fff; }
:root.ui-lq :is(.btn, .icon-btn, .rail-btn, .control-pill-btn, .channel-item, .nav-tab, .snav, .menu-item, .ctx-item):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--lq-ring); }
:root.ui-lq :is(.icon-btn, .quick-icon-btn) { border-radius: var(--lq-r-btn); min-width: 32px; height: 32px; }
:root.ui-lq :is(.icon-btn, .quick-icon-btn):hover, :root.ui-lq .icon-btn.active { background-color: var(--lq-t2); color: var(--bright); }
:root.ui-lq .rail-btn { border-radius: var(--lq-r-btn); background-color: var(--lq-t2); box-shadow: var(--lq-rim); transition: background-color .15s, border-radius .15s; }
:root.ui-lq .rail-btn:hover { background-color: var(--lq-t3); }
:root.ui-lq .rail-btn.active { background-color: var(--accent); color: #fff; }
:root.ui-lq .rail-btn.has-img, :root.ui-lq .rail-btn.has-img:hover { background-color: var(--lq-t1); }
:root.ui-lq .rail-btn.has-img.active { box-shadow: inset 0 0 0 2px var(--accent); }
:root.ui-lq .rail-btn.action { color: var(--green); }
:root.ui-lq .rail-btn.admin { color: var(--red); }

/* list rows and tabs */
:root.ui-lq :is(.channel-item, .member-row, .snav, .menu-item, .ctx-item, .user-pill, .friend-row-card, .um-item, .vc-item) { border-radius: var(--lq-r-row); }
:root.ui-lq :is(.channel-item, .member-row, .user-pill, .friend-row-card, .vc-item):hover { background-color: var(--lq-t1); }
:root.ui-lq :is(.channel-item.active, .snav.active, .nav-tab.active) { background-color: var(--lq-t3); color: var(--bright); box-shadow: var(--lq-rim); }
:root.ui-lq .nav-tab { border-radius: var(--lq-r-btn); }
:root.ui-lq .nav-tab:hover { background-color: var(--lq-t1); }
:root.ui-lq :is(.menu-item, .ctx-item):hover { background-color: var(--accent); color: #fff; }
:root.ui-lq .member-row { margin-inline: 8px; }
:root.ui-lq .member-row.offline { opacity: .55; }
:root.ui-lq .section-header, :root.ui-lq .member-group { letter-spacing: .06em; }

/* user bar, voice dock: flat tint cards inside the channel pane */
:root.ui-lq :is(.user-status-bar, .voice-connected-dock, .game-dock) { background-color: var(--lq-t1); border: 0; border-radius: var(--lq-r-card); box-shadow: var(--lq-rim); }

/* chat */
:root.ui-lq .msg { border-radius: var(--lq-r-card); margin-inline: 8px; }
:root.ui-lq .msg:hover { background-color: var(--lq-t1); }
:root.ui-lq .msg.mention { background-color: color-mix(in srgb, var(--yellow) 12%, transparent); box-shadow: inset 3px 0 0 var(--yellow); }
:root.ui-lq[dir="rtl"] .msg.mention { box-shadow: inset -3px 0 0 var(--yellow); }
:root.ui-lq .composer-wrap { padding: 0 14px 14px; }
:root.ui-lq .composer { background-color: var(--lq-t2); border: 0; border-radius: var(--lq-r-card); box-shadow: var(--lq-rim); }
:root.ui-lq .composer:focus-within { box-shadow: var(--lq-rim), 0 0 0 3px var(--lq-ring); }
:root.ui-lq #reply-bar { background-color: var(--lq-t1); border: 0; border-radius: var(--lq-r-card) var(--lq-r-card) 0 0; }
:root.ui-lq .msg-tools { background-color: var(--lq-solid); border: 0; border-radius: var(--lq-r-row); box-shadow: var(--lq-rim), 0 4px 14px rgba(0,0,0,.25); }
:root.ui-lq .reaction { background-color: var(--lq-t2); border: 0; border-radius: 10px; box-shadow: var(--lq-rim); }
:root.ui-lq .reaction.mine { background-color: color-mix(in srgb, var(--accent) 28%, transparent); }

/* fields */
:root.ui-lq :is(.system-input, select.system-input, .auth-input, .edit-input, .friends-search-bar, .mc-in, .ep-top input, .topic-ed, #chat-search-input, .mic-meter, kbd) {
  background-color: var(--lq-t1); border: 0; border-radius: var(--lq-r-btn); box-shadow: inset 0 0 0 1px var(--lq-edge);
}
:root.ui-lq :is(.system-input, .auth-input, .edit-input, select.system-input):focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--lq-ring); }
:root.ui-lq .switch i { background-color: var(--lq-t3); border-radius: var(--lq-r-pill); box-shadow: inset 0 0 0 1px var(--lq-edge); }
:root.ui-lq .switch i::after { background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
:root.ui-lq .switch input:checked + i { background-color: var(--green); }

/* cards inside settings, profile, roles, bots */
:root.ui-lq :is(.settings-card, .pc-sec, .profile-card, .th-card, .acc-card, .acc-fields, .role-card, .choice, .quality-btn, .perm-row, .bs-row, .tpl-card, .poll, .vc-addcard) {
  background-color: var(--lq-t1); background-image: none; border: 0; border-radius: var(--lq-r-card); box-shadow: var(--lq-rim);
}
:root.ui-lq :is(.choice.selected, .quality-btn.selected, .th-card.on) { background-color: color-mix(in srgb, var(--accent) 24%, var(--lq-t1)); box-shadow: var(--lq-rim), 0 0 0 2px var(--accent); }
:root.ui-lq .settings-close { border-radius: var(--lq-r-btn); border: 0; background-color: var(--lq-t2); box-shadow: var(--lq-rim); }
:root.ui-lq .te-seg { border: 0; border-radius: var(--lq-r-btn); background-color: var(--lq-t1); box-shadow: var(--lq-rim); }
:root.ui-lq .te-seg button { border-radius: 10px; }
:root.ui-lq .te-seg button.on { background-color: var(--lq-t3); }

/* call view */
:root.ui-lq .voice-call-screen { background: transparent; }
:root.ui-lq .tile { border: 0; border-radius: 22px; background-color: var(--lq-t2); box-shadow: var(--lq-rim); overflow: hidden; }
:root.ui-lq .tile.speaking { box-shadow: var(--lq-rim), 0 0 0 3px var(--green); }
:root.ui-lq :is(.tile-label, .stream-user-overlay, .tile-tool, .tile-badge) { background-color: rgba(14,15,20,.62); color: #fff; border-radius: 10px; box-shadow: none; }
:root.ui-lq[data-theme="light"] :is(.tile-label, .tile-badge) { background-color: rgba(255,255,255,.8); color: var(--bright); }
:root.ui-lq .tile-badge.red { background-color: var(--red); color: #fff; }
:root.ui-lq .vc-group { border: 0; border-radius: 20px; background-color: var(--lq-t1); box-shadow: var(--lq-rim); }
:root.ui-lq .voice-floating-bar { background-color: var(--lq-solid); border: 0; border-radius: var(--lq-r-island); box-shadow: var(--lq-rim), var(--lq-drop); }
:root.ui-lq .control-pill-btn { border-radius: var(--lq-r-btn); background-color: var(--lq-t2); box-shadow: var(--lq-rim); }
:root.ui-lq .control-pill-btn:hover { background-color: var(--lq-t3); }
:root.ui-lq .control-pill-btn.danger-leave { background-color: var(--red); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), inset 0 1px 0 rgba(255,255,255,.5); }
:root.ui-lq .vc-sq, :root.ui-lq .vc-corner, :root.ui-lq .vc-pill { border: 0; border-radius: var(--lq-r-btn); background-color: var(--lq-t2); box-shadow: var(--lq-rim); color: var(--bright); }

/* badges and counters: the box never changes size when the number does */
:root.ui-lq :is(.badge, .mention-badge, .badge-pill, .tile-badge, .voice-timer-badge, .unread-count) {
  font-variant-numeric: tabular-nums; white-space: nowrap; font-feature-settings: 'tnum';
}
:root.ui-lq :is(.badge, .mention-badge) { min-width: 18px; text-align: center; border: 0; background-color: var(--red); color: #fff; }
:root.ui-lq .badge-pill { border-radius: var(--lq-r-pill); background-color: color-mix(in srgb, var(--accent) 20%, var(--lq-t1)); border: 0; }
:root.ui-lq :is(.voice-ping-ico, .voice-timer-badge) { white-space: nowrap; flex: none; min-width: 5ch; }
:root.ui-lq .owner-tag { border: 0; border-radius: var(--lq-r-pill); background-color: color-mix(in srgb, var(--yellow) 22%, var(--lq-t1)); }
:root.ui-lq ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 55%, transparent); background-clip: content-box; border-radius: 6px; }

/* ===== 4. the app's own button, switch and field styles use :root:root, so these restate the flat look one step stronger ===== */
:root:root:root.ui-lq :is(.btn-primary, .ux-primary, .btn.primary, .auth-submit-action, .btn-success, .btn-danger) {
  background-image: none; background-color: var(--accent); color: var(--on-accent, #fff); text-shadow: none; filter: none; overflow: visible;
  border: 0; border-radius: var(--lq-r-btn); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), inset 0 1px 0 rgba(255,255,255,.45);
}
:root:root:root.ui-lq .btn-success.btn-success { background-color: var(--green); color: #fff; }
:root:root:root.ui-lq .btn-danger.btn-danger { background-color: var(--red); color: #fff; }
:root:root:root.ui-lq :is(.btn-primary, .ux-primary, .btn.primary, .auth-submit-action, .btn-success, .btn-danger)::before,
:root:root:root.ui-lq :is(.btn-primary, .ux-primary, .btn.primary, .auth-submit-action, .btn-success, .btn-danger)::after { display: none; content: none; }
:root:root:root.ui-lq :is(.btn-primary, .ux-primary, .btn.primary, .auth-submit-action, .btn-success, .btn-danger):hover:not(:disabled) { background-color: color-mix(in srgb, var(--accent) 86%, #fff); color: #fff; filter: none; }
:root:root:root.ui-lq .btn-success.btn-success:hover:not(:disabled) { background-color: color-mix(in srgb, var(--green) 86%, #fff); }
:root:root:root.ui-lq .btn-danger.btn-danger:hover:not(:disabled) { background-color: color-mix(in srgb, var(--red) 86%, #fff); }
:root:root:root.ui-lq :is(.btn-primary, .ux-primary, .btn.primary, .auth-submit-action, .btn-success, .btn-danger):disabled { opacity: .5; }
/* switches: one flat track, one white knob (26 px knob in a 60 x 30 track), no extra drawn layers */
:root:root:root.ui-lq .switch i { background: var(--lq-t3); border: 0; border-radius: var(--lq-r-pill); box-shadow: inset 0 0 0 1px var(--lq-edge); transition: background-color .2s; }
:root:root:root.ui-lq .switch i::before { display: none; }
:root:root:root.ui-lq .switch i::after, :root:root:root.ui-lq .switch input:checked + i::after { width: 26px; height: 26px; top: 2px; left: 2px; right: auto; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.3); border: 0; transition: transform .2s; }
:root:root:root.ui-lq .switch input:checked + i { background: var(--green); }
:root:root:root.ui-lq .switch input:checked + i::after { transform: translateX(30px); }
:root:root:root.ui-lq[dir="rtl"] .switch i::after, :root:root:root.ui-lq[dir="rtl"] .switch input:checked + i::after { left: auto; right: 2px; }
:root:root:root.ui-lq[dir="rtl"] .switch input:checked + i::after { transform: translateX(-30px); }
:root:root:root.ui-lq .switch input:focus-visible + i { outline: none; box-shadow: 0 0 0 3px var(--lq-ring); }
/* check boxes and radios */
:root:root:root.ui-lq input[type="checkbox"]:not(.sr-only):not(.switch input):not([type="hidden"]) { border-radius: 7px; border: 0; background: var(--lq-t3); animation: none; box-shadow: inset 0 0 0 1px var(--lq-edge); }
:root:root:root.ui-lq input[type="checkbox"]:not(.sr-only):not(.switch input)::before { display: none; }
:root:root:root.ui-lq input[type="checkbox"]:not(.sr-only):not(.switch input):checked { background: var(--accent); animation: none; }
:root:root:root.ui-lq input[type="radio"] { background: var(--lq-t3); box-shadow: inset 0 0 0 1px var(--lq-edge); border: 0; }
:root:root:root.ui-lq input[type="radio"]:hover { scale: 1; }
:root:root:root.ui-lq input[type="radio"]::before { width: 8px; height: 8px; background: #fff; box-shadow: none; }
:root:root:root.ui-lq input[type="radio"]:checked { background: var(--accent); }
/* text fields */
:root:root:root.ui-lq :is(.system-input, .auth-input, #chat-search-input) { border: 0; border-radius: var(--lq-r-btn); box-shadow: inset 0 0 0 1px var(--lq-edge); background-color: var(--lq-t1); }
:root:root:root.ui-lq :is(.system-input, .auth-input, #chat-search-input):focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--lq-ring); border: 0; }

/* ===== 5. working polish carried over from the first glass look, rebuilt as flat tints (no sheen image, no blur, no motion) ===== */
/* content fades out under the pane edges instead of being cut */
:root.ui-lq :is(.chat-messages, #members-container, .channels-scroll) {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
/* type */
:root.ui-lq :is(#chat-title-heading, .spanel h2, .server-title-btn) { letter-spacing: -.01em; }
:root.ui-lq .main-header #chat-title-heading { font-size: 16px; font-weight: 700; }
/* members panel */
:root.ui-lq .members-pane .section-header { height: 52px; margin: 0; padding-inline-start: 18px; border-bottom: 1px solid var(--lq-line); letter-spacing: .08em; }
:root.ui-lq .member-group { padding: 18px 18px 6px; display: flex; align-items: center; gap: 8px; }
:root.ui-lq .member-group::after { content: ''; flex: 1; height: 1px; background: var(--lq-line); }
:root.ui-lq .member-row { padding: 6px 10px; gap: 12px; }
:root.ui-lq .member-row:hover { background-color: var(--lq-t2); }
:root.ui-lq .member-row .user-avatar { box-shadow: 0 0 0 2px var(--lq-edge); }
:root.ui-lq .member-row .mname { font-weight: 600; }
:root.ui-lq .member-row .fr-ic { border-radius: var(--lq-r-btn); background-color: var(--lq-t2); box-shadow: var(--lq-rim); }
:root.ui-lq .sdot { border-color: transparent; }
:root.ui-lq .badge.sdot, :root.ui-lq .tile-badge { box-shadow: none; }
/* call view */
:root.ui-lq .tile { border-radius: 26px; }
:root.ui-lq .stage-bar { border: 0; border-radius: var(--lq-r-card); margin: 8px 12px 0; background-color: color-mix(in srgb, var(--accent) 22%, var(--lq-t1)); box-shadow: var(--lq-rim); }
:root.ui-lq .voice-floating-bar { gap: 12px; padding: 10px 16px; bottom: 22px; }
:root.ui-lq .voice-floating-bar .vc-group { border-radius: 20px; padding: 4px; gap: 4px; }
:root.ui-lq :is(.voice-floating-bar, .vc-group) .control-pill-btn { width: 48px; height: 48px; }
:root.ui-lq .vc-group .vc-split { background: transparent; border-radius: var(--lq-r-btn); }
:root.ui-lq .control-pill-btn.danger-leave { width: 64px; }
:root.ui-lq .vc-addcard { border-radius: var(--lq-r-island); color: var(--bright); }
:root.ui-lq .tile-tool:hover { background-color: var(--accent); }
:root.ui-lq .tile-badge { border-radius: var(--lq-r-pill); padding: 3px 9px; }
:root.ui-lq .voice-dock-tile { border-radius: var(--lq-r-card); }
/* call corner buttons sit clear of the rounded island corners */
:root.ui-lq .vc-corner { margin: 6px; }
/* light call tiles stay clear instead of turning into white cards */
:root.ui-lq[data-theme="light"] .tile { background-color: var(--lq-t1); }

/* ===== 6. channel rows: one fixed icon slot, the name starts at the row's start edge (left in English, right in Arabic), tools and counters in their own slots ===== */
:root.ui-lq .channel-list .channel-item { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 0; text-align: start; min-height: 36px; direction: inherit; }
:root.ui-lq .channel-list .channel-item > span:first-child { display: contents; }
:root.ui-lq .channel-list .channel-item .ch-ic { flex: none; width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; position: relative; margin-inline: 0 6px !important; }
:root.ui-lq .channel-list .channel-item .ch-ic .ic, :root.ui-lq .channel-list .channel-item .ch-ic svg { width: 16px; height: 16px; }
:root.ui-lq .channel-list .channel-item .ch-ic .ch-lock { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 10px; height: 10px; background: transparent; }
:root.ui-lq .channel-list .channel-item .ch-ic .ch-lock svg { width: 10px; height: 10px; }
:root.ui-lq .channel-list .channel-item [data-notr] { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
:root.ui-lq .channel-list .channel-item > span:last-child:not(:first-child) { margin-inline-start: auto; padding-inline-start: 10px; flex: none; display: flex; align-items: center; gap: 6px; }
:root.ui-lq .channel-list .channel-item .vc-time { margin-inline-start: auto; padding-inline-start: 10px; flex: none; min-width: 5ch; text-align: end; }
:root.ui-lq .channel-list .channel-item .vc-tools { margin-inline-start: 6px !important; gap: 6px; flex: none; }
:root.ui-lq .channel-list .channel-item .vc-tool { padding: 4px; }
:root.ui-lq .channel-list .channel-item .vc-tool .ic { width: 16px; height: 16px; }
