/* =========================================================================
   Regret · visual system
   Dark, glassy, accent-driven. --accent / --accent-2 are re-tinted per theme
   and per phase; @property makes the whole UI glide between them.
   ========================================================================= */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #a855f7; }
@property --accent-2 { syntax: '<color>'; inherits: true; initial-value: #f43f5e; }

:root {
  --accent: #a855f7;
  --accent-2: #f43f5e;
  --bg-0: #07060c;
  --bg-1: #0c0a13;
  --bg-2: #12101b;
  --bg-3: #1a1726;
  --bg-4: #231f33;
  --glass: rgba(18, 15, 28, .66);
  --glass-2: rgba(28, 24, 42, .78);
  --glass-3: rgba(38, 33, 56, .9);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eeebf8;
  --text-2: #b8b2cc;
  --text-3: #7f7996;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --idle: #fbbf24;
  --dnd: #f43f5e;
  --acc-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --acc-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --fs: 1;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
  transition: --accent .7s ease, --accent-2 .7s ease;
  --frame: 0px; /* the desktop app's own title bar (app.js desktopFrame); 0 everywhere else */
  --frame-bg: #07060c;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: calc(15px * var(--fs));
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
/* Regret is an app, not a web page: text and icons don't highlight when you drag or double-click, and
   pictures don't drag around. Typing fields still select normally; messages copy with their Copy button. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg, video { -webkit-user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
kbd { font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--text-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .22); }
.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { display: block; }
.muted { color: var(--text-3); }
.small { font-size: .82em; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; align-items: center; gap: 10px; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.bad { color: var(--bad); }

/* ---------- background ---------- */
#app { position: fixed; inset: 0; }
/* The aurora's radial gradients are already soft, so no blur filter (a big blur re-rendered every
   frame was the app's largest idle cost). It moves in small steps ~10 times a second instead of 60:
   the drift is slow enough that it looks the same. */
.bg-aurora { position: fixed; inset: -25%; z-index: 0; opacity: .55; pointer-events: none; transition: opacity 1s; }
.bg-aurora i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; will-change: transform; animation: drift 40s steps(200, jump-none) infinite alternate; }
.bg-aurora i:nth-child(1) { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 75%, transparent), transparent 62%); top: 2%; left: 0; }
.bg-aurora i:nth-child(2) { background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 65%, transparent), transparent 62%); bottom: 0; right: 0; animation-duration: 52s; animation-delay: -12s; }
.bg-aurora i:nth-child(3) { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, #1e1b4b), transparent 60%); top: 30%; left: 40%; animation-duration: 64s; animation-delay: -30s; }
.bg-aurora i:nth-child(4) { background: radial-gradient(circle, rgba(56, 189, 248, .25), transparent 60%); top: -10%; right: 20%; animation-duration: 70s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(.95); }
}
#app[data-bg="stars"] .bg-aurora { opacity: .16; }
#app[data-bg="solid"] .bg-aurora { opacity: 0; }
#bg-canvas, #fx-canvas { position: fixed; inset: 0; pointer-events: none; }
#bg-canvas { z-index: 1; opacity: .7; }
#fx-canvas { z-index: 60; }
#root { position: fixed; inset: var(--frame) 0 0; z-index: 2; }
#layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#layer > * { pointer-events: auto; }
#layer > .tooltip, #layer > .levelup { pointer-events: none; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* ---------- shell ---------- */
.shell {
  height: 100%;
  display: grid;
  grid-template-columns: 76px 264px minmax(0, 1fr) 248px;
  gap: 8px;
  padding: 8px 8px 8px 0;
  transition: grid-template-columns .35s var(--ease);
}
.no-members .shell { grid-template-columns: 76px 264px minmax(0, 1fr) 0; }
.no-members .members { opacity: 0; pointer-events: none; }
.panel, .side, .main, .members {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04);
  min-height: 0;
  overflow: hidden;
}

/* rail */
.rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-item { position: relative; width: 76px; display: flex; justify-content: center; flex: none; }
.rail-btn {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line);
  transition: border-radius .3s var(--spring), transform .25s var(--spring), box-shadow .3s, background .3s;
  overflow: hidden;
}
.rail-btn .phase-ic { --s: 50px !important; border-radius: 0; }
.rail-item:hover .rail-btn, .rail-item.active .rail-btn { border-radius: 16px; }
.rail-item:hover .rail-btn { transform: translateY(-1px); }
/* (glows here stay inside the rail's 13px side margin, so its edges never cut them into straight lines) */
.rail-item.active .rail-btn { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 6px 14px -8px var(--accent); }
.rail-pill { position: absolute; left: 0; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0; background: var(--text); transform: translateY(-50%); transition: height .3s var(--spring); }
.rail-item.unread .rail-pill { height: 8px; }
.rail-item:hover .rail-pill { height: 20px; }
.rail-item.active .rail-pill { height: 38px; background: var(--grad); }
.rail-badge { position: absolute; right: 10px; bottom: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--dnd); color: #fff; font: 700 11px/20px var(--font); text-align: center; border: 3px solid var(--bg-0); }
.rail-sep { width: 30px; height: 2px; border-radius: 2px; background: var(--line-2); flex: none; }
.rail-home .rail-btn { background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 35%, var(--bg-3)), var(--bg-2)); }
.rail-action .rail-btn { color: var(--ok); background: transparent; border-style: dashed; border-color: var(--line-2); }
.rail-action:hover .rail-btn { background: var(--ok); color: var(--bg-0); border-color: transparent; }
.rail-action + .rail-action .rail-btn { color: var(--text-2); }
.rail-action + .rail-action:hover .rail-btn { background: var(--text); }
.logo-mark { display: inline-flex; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 60%, transparent)); }
.phase-ic {
  --s: 48px;
  width: var(--s); height: var(--s); flex: none;
  display: grid; place-items: center;
  border-radius: calc(var(--s) * .3);
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 70%, #0b0a12), color-mix(in srgb, var(--b) 60%, #0b0a12));
  font: 700 calc(var(--s) * .44) / 1 var(--display);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

/* sidebar */
.side { display: flex; flex-direction: column; }
.side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-head { position: relative; flex: none; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.side-title { display: flex; align-items: center; gap: 8px; }
.phase-head { height: 96px; align-items: flex-end; padding: 0; border-bottom: 0; }
.phase-banner { position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 55%, transparent), color-mix(in srgb, var(--b) 45%, transparent)); mask-image: linear-gradient(to bottom, #000 30%, transparent); }
.phase-banner::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, .25), transparent 50%); }
.side-head-btn { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; font: 700 16px var(--display); text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.side-head-btn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head-btn:hover { background: rgba(255, 255, 255, .04); }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 8px 16px; }
.side-cat { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 6px; font: 700 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.side-cat .cat-add { width: 22px; height: 22px; }
.chan-wrap { position: relative; }
.chan {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; margin: 1px 0;
  border-radius: 10px; color: var(--text-3);
  text-align: left; overflow: hidden;
  transition: background .2s, color .2s;
}
.chan > span:not(.ic):not(.phase-ic) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan:hover { background: rgba(255, 255, 255, .045); color: var(--text-2); }
.chan.on { background: linear-gradient(90deg, var(--acc-soft), rgba(255, 255, 255, .03)); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.chan.unread { color: var(--text); font-weight: 600; }
.chan.unread::before { content: ''; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--text); }
.chan.connected .ic { color: var(--ok); }
/* Centered on the channel row's own line (.chan-line), not the whole block, so it stays put as people join
   voice; the extra class beats .icon-btn's 36px size further down. */
.chan-line { position: relative; }
.chan-line > .icon-btn.chan-opt { position: absolute; right: 6px; top: 0; bottom: 0; margin: auto 0; width: 24px; height: 24px; opacity: 0; }
.chan-line:hover > .chan-opt, .chan-line > .chan-opt:focus-visible { opacity: 1; }
.chan-line:hover > .chan .chan-count { opacity: 0; } /* the gear takes the count's spot while hovered */
.chan-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--dnd); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.chan-count { font: 600 11px var(--font); color: var(--text-3); padding: 1px 7px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.chan-tag { font: 700 10px var(--font); letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; }
.chan-tag.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
.invite-chip { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin: 4px 0 2px; border-radius: 12px; border: 1px dashed var(--acc-line); color: var(--text-2); font-size: 13px; position: relative; overflow: hidden; }
.invite-chip code { font: 700 12px var(--mono); color: var(--text); letter-spacing: .08em; }
.invite-chip > span:not(.ic) { flex: 1; }
.invite-chip:hover { background: var(--acc-soft); color: var(--text); }
.vc-users { padding: 2px 0 6px 30px; display: grid; gap: 2px; }
.vc-user { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.vc-user .av { transition: box-shadow .15s; }
.vc-user.speaking .av { box-shadow: 0 0 0 2px var(--ok), 0 0 12px var(--ok); }
.mini-tag { font: 800 9px var(--font); letter-spacing: .06em; padding: 2px 4px; border-radius: 4px; background: var(--grad); color: #fff; }
.home-nav { display: grid; gap: 2px; padding-top: 6px; }
.side-card { margin: 14px 2px 4px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, var(--acc-soft), rgba(255, 255, 255, .02)); border: 1px solid var(--line); display: grid; gap: 8px; cursor: pointer; font-size: 13px; transition: transform .2s var(--spring), border-color .2s; }
.side-card:hover { transform: translateY(-2px); border-color: var(--acc-line); }
.side-card .chan { padding: 6px 8px; }

/* footer */
.side-foot { flex: none; border-top: 1px solid var(--line); background: rgba(8, 7, 13, .45); }
.voice-panel { padding: 8px 8px 0; }
.vp-row { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 8%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.vp-info { flex: 1; min-width: 0; text-align: left; display: grid; }
.vp-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-live { display: flex; align-items: center; gap: 6px; color: var(--ok); font: 700 13px var(--font); }
.vp-mode { font: 800 10px var(--font); letter-spacing: .06em; padding: 5px 7px; border-radius: 7px; background: rgba(255, 255, 255, .08); color: var(--text-2); }
.vp-mode:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.vp-mode.stereo { background: var(--grad); color: #fff; }
.vp-leave { width: 32px; height: 32px; }
.me-panel { display: flex; align-items: center; gap: 2px; padding: 8px; }
.me-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 10px; text-align: left; }
.me-id:hover { background: rgba(255, 255, 255, .05); }
.me-txt { display: grid; min-width: 0; line-height: 1.25; }
.me-txt .uname { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-txt small { font-size: 11.5px; }
.me-panel .icon-btn { width: 34px; height: 34px; }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; position: relative; }
.main.swap .main-body { animation: swapIn .38s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } }
.main-head { flex: none; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.main-head h1 { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-ic { color: var(--text-3); }
.topic { color: var(--text-3); font-size: 13.5px; padding: 4px 10px; margin-left: 4px; border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; text-align: left; }
.topic.editable:hover { color: var(--text-2); }
.head-actions { display: flex; align-items: center; gap: 6px; }
.streak-chip, .shard-chip { position: relative; overflow: hidden; display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 13px; }
.streak-chip b, .shard-chip b { font-weight: 700; }
.streak-chip:hover, .shard-chip:hover { border-color: var(--acc-line); background: var(--acc-soft); }
.shard-chip .ic { color: var(--accent); }
.search-box { display: flex; align-items: center; gap: 8px; height: 32px; width: 190px; padding: 0 8px 0 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.search-box span:not(.ic) { flex: 1; text-align: left; }
.search-box:hover { border-color: var(--line-2); color: var(--text-2); }
.drawer-btn { display: none !important; }
.main-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.main-body.scroll { overflow-y: auto; }

/* ---------- buttons & controls ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 11px;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .2s var(--spring), box-shadow .25s, background .2s, opacity .2s, border-color .2s;
}
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 30px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.ghost { background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); color: var(--text); }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .09); }
.btn.danger, .btn.ghost.danger { color: var(--bad); }
.btn.danger { background: color-mix(in srgb, var(--bad) 85%, #000); color: #fff; }
.btn.ghost.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 14%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .28); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
.rip { position: relative; overflow: hidden; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--text-3); transition: background .15s, color .15s, transform .2s var(--spring); flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.active { color: var(--text); background: rgba(255, 255, 255, .06); }
.icon-btn.off { color: var(--bad); }
.icon-btn.danger:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

.input {
  width: 100%; min-width: 0;
  padding: 10px 12px; border-radius: 11px;
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line-2); color: var(--text);
  font: inherit; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); background: rgba(0, 0, 0, .42); }
.input::placeholder { color: var(--text-3); }
.input.big { font-size: 18px; padding: 14px 16px; text-align: center; font-weight: 600; }
textarea.input { resize: vertical; min-height: 44px; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select.input option { background: var(--bg-3); }
.input-group { display: flex; align-items: center; border-radius: 11px; background: rgba(0, 0, 0, .32); border: 1px solid var(--line-2); padding-left: 10px; }
.input-group:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); }
.input-prefix { color: var(--text-3); display: flex; }
.input.bare { border: 0; background: transparent; box-shadow: none; }
.field { display: grid; gap: 7px; margin: 14px 0; }
.field-label { font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); }
.field-hint { color: var(--text-3); font-size: 12px; }
.field-error { color: var(--bad); font-size: 12.5px; min-height: 0; }
.shake-x { animation: shakeX .38s; }
@keyframes shakeX { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.range, .hue-range { width: 100%; accent-color: var(--accent); }
.hue-range { appearance: none; height: 10px; border-radius: 10px; background: linear-gradient(90deg, hsl(0 80% 60%), hsl(60 80% 60%), hsl(120 70% 55%), hsl(180 70% 55%), hsl(240 75% 65%), hsl(300 75% 62%), hsl(359 80% 60%)); }
.hue-range::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--bg-0); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-2); margin: 14px 0; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 1px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row.disabled { opacity: .5; cursor: not-allowed; }
.toggle-txt { display: grid; gap: 2px; }
.toggle-txt b { font-weight: 600; }
.toggle-txt small { color: var(--text-3); font-size: 12.5px; }
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.switch i { position: absolute; inset: 0; border-radius: 26px; background: rgba(255, 255, 255, .14); transition: background .25s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .3s var(--spring); }
.switch input:checked + i { background: var(--grad); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; color: var(--text-3); font-size: 13.5px; font-weight: 600; transition: background .2s, color .2s; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.on { background: var(--glass-3); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--acc-line); }
.seg button.on .ic { color: var(--accent); }
.seg button:disabled { opacity: .4; }
.seg.seg-sm button { padding: 5px 9px; font-size: 12.5px; }

.pbar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); } /* not clipped: the fill is rounded itself, and its glow fades out softly around the bar */
.pbar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px var(--accent); transition: width .6s var(--ease); }

.meter { position: relative; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #22c55e, #a3e635 60%, #facc15 85%, #f43f5e); transition: transform .06s linear; }
.meter:not(.open) .meter-fill { filter: saturate(.25) brightness(.8); }
.meter-thr { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); } /* a crisp marker: a glow here would be cut by the bar */
.meter.big { height: 14px; margin: 14px 0 6px; }
.meter.v { width: 14px; height: 150px; }
.meter.v .meter-fill { transform-origin: bottom; background: linear-gradient(0deg, #22c55e, #a3e635 60%, #facc15 85%, #f43f5e); }

/* ---------- avatars & names ---------- */
.av {
  --s: 40px;
  position: relative; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 40) 70% 42%));
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.av-in { font-family: var(--display); font-weight: 700; color: #fff; line-height: 1; user-select: none; text-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.av.clickable { cursor: pointer; transition: transform .2s var(--spring); }
.av.clickable:hover { transform: scale(1.06); }
.av-dot { position: absolute; right: -2px; bottom: -2px; width: 34%; height: 34%; min-width: 10px; min-height: 10px; border-radius: 50%; border: 3px solid var(--bg-1); background: var(--text-3); }
.st-online { background: var(--ok); }
.st-idle { background: var(--idle); }
.st-dnd { background: var(--dnd); }
.st-offline { background: #5b566b; }
.av.speaking { box-shadow: 0 0 0 3px var(--ok), 0 0 18px var(--ok); }
/* Avatar frames: see "0.8 · Decorations" at the end of this file. */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseRing { 50% { transform: scale(1.08); opacity: .4; } }
@keyframes orbit { from { transform: rotate(0deg) translateX(calc(var(--s) / 2 + 4px)); } to { transform: rotate(360deg) translateX(calc(var(--s) / 2 + 4px)); } }

.uname { font-weight: 600; color: hsl(var(--h) 85% 78%); }
.uname.clickable { cursor: pointer; }
.uname.clickable:hover { text-decoration: underline; }
@keyframes shimmer { to { background-position: 200% center; } }
/* Name styles: see "0.8 · Decorations" at the end of this file. */

.lvl-chip { font: 700 10.5px var(--font); padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--text-2); }
.role-chip { display: inline-flex; align-items: center; gap: 3px; font: 800 9.5px/1 var(--font); letter-spacing: .06em; padding: 3px 5px; border-radius: 5px; vertical-align: 2px; }
.role-chip.staff { background: color-mix(in srgb, var(--accent) 22%, transparent); color: color-mix(in srgb, var(--accent) 60%, #fff); }
.role-chip.owner { color: var(--warn); padding: 2px; }
.role-chip.stereo { background: var(--grad); color: #fff; }
.role-chip.founder { background: linear-gradient(135deg, #f5c451, #f08a3c); color: #2a1600; box-shadow: 0 0 12px -2px rgba(245, 196, 81, .6); }
.role-chip.founder.mini { font-size: 8.5px; padding: 2px 4px; flex: none; }
.badge-row { display: flex; flex-wrap: wrap; gap: 4px; }
/* Badges are Regret's own medals (badge-art.js): the medal is the shape, so no box behind it. */
.badge { display: inline-grid; place-items: center; cursor: default; }
.badge-art { display: inline-block; flex: none; line-height: 0; transition: transform .25s var(--spring); }
.badge-art svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, .35)); }
.badge-art .bdg-glyph .f { fill: rgba(255, 255, 255, .3); }
.badge-art .bdg-shadow .f { fill: none; }
.badge:hover .badge-art { transform: translateY(-1px) scale(1.08); }

/* ---------- chat ---------- */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.msgs-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 0 8px; }
.chan-intro { padding: 30px 22px 18px; }
.chan-intro-ic { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 14px; box-shadow: 0 20px 40px -18px var(--accent); }
.chan-intro h2 { font-size: 28px; margin-bottom: 6px; }
.msgs { display: flex; flex-direction: column; }
.day-div { display: flex; align-items: center; gap: 12px; margin: 18px 22px 8px; color: var(--text-3); font: 600 11.5px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.day-div::before, .day-div::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.msg { position: relative; padding: 4px 22px 4px 18px; margin-top: 12px; transition: background .15s; }
.msg.grouped { margin-top: 0; padding-top: 1px; padding-bottom: 1px; }
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg.mentioned { background: color-mix(in srgb, var(--warn) 7%, transparent); box-shadow: inset 3px 0 0 var(--warn); }
.msg-row { display: flex; gap: 14px; }
.msg-gutter-time { width: 40px; flex: none; font-size: 10.5px; color: var(--text-3); text-align: right; padding-top: 4px; opacity: 0; white-space: nowrap; overflow: hidden; }
.msg:hover .msg-gutter-time { opacity: 1; }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.msg-head time { font-size: 11.5px; color: var(--text-3); }
.fx-chip { font-size: 12px; }
.msg-text { color: var(--text); overflow-wrap: anywhere; line-height: 1.5; }
.msg-text.jumbo { font-size: 44px; line-height: 1.15; }
.edited { font-size: 10.5px; color: var(--text-3); }
.msg-img { display: block; margin-top: 6px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); max-width: min(420px, 100%); }
.msg-img img { display: block; width: 100%; max-height: 340px; object-fit: cover; transition: transform .3s var(--ease); }
.msg-img:hover img { transform: scale(1.02); }
.msg.sys { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.sys-ic { width: 40px; display: flex; justify-content: center; color: var(--accent); flex: none; }
.sys-txt { flex: 1; }
.msg.sys time { font-size: 11px; color: var(--text-3); }
.msg.enter { animation: msgIn .45s var(--spring); }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.msg.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { background: var(--acc-soft); } }

.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.react-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 9px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 13px; transition: transform .2s var(--spring), background .2s, border-color .2s; }
.react-chip:hover { border-color: var(--line-2); transform: translateY(-1px); }
.react-chip b { font-size: 12px; font-weight: 700; color: var(--text-2); }
.react-chip.mine { background: var(--acc-soft); border-color: var(--acc-line); }
.react-chip.mine b { color: var(--text); }
.react-chip.add { color: var(--text-3); opacity: 0; }
.msg:hover .react-chip.add { opacity: 1; }
.react-emo { font-size: 15px; }

.msg-tools { position: absolute; right: 18px; top: -16px; display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--glass-3); border: 1px solid var(--line-2); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(4px) scale(.96); pointer-events: none; transition: opacity .15s, transform .2s var(--spring); z-index: 3; }
.msg:hover .msg-tools, .msg-tools:focus-within { opacity: 1; transform: none; pointer-events: auto; }
.msg-tools .tool { width: 30px; height: 30px; border-radius: 8px; }
.tool.emo { display: grid; place-items: center; font-size: 16px; transition: transform .2s var(--spring), background .15s; }
.tool.emo:hover { background: rgba(255, 255, 255, .08); transform: scale(1.2); }
.msg-tools .tool.danger:hover { color: var(--bad); }

.reply-ref { display: flex; align-items: center; gap: 6px; margin: 0 0 4px 34px; font-size: 13px; color: var(--text-3); max-width: calc(100% - 34px); text-align: left; }
.reply-ref:hover { color: var(--text-2); }
.reply-ref .uname { font-size: 12.5px; }
.reply-curve { width: 26px; height: 12px; margin-top: 8px; border-left: 2px solid var(--line-2); border-top: 2px solid var(--line-2); border-top-left-radius: 8px; flex: none; }
.reply-snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.edit-box { display: grid; gap: 4px; margin-top: 4px; }
.edit-input { width: 100%; resize: none; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--acc-line); background: rgba(0, 0, 0, .35); color: var(--text); font: inherit; outline: none; }
.edit-box a { color: var(--accent); text-decoration: none; }

.md-pre { margin: 6px 0; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); overflow-x: auto; font: 13px/1.5 var(--mono); }
.md-code { font: .88em var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); }
.md-link { color: color-mix(in srgb, var(--accent) 55%, #fff); text-decoration: none; }
.md-link:hover { text-decoration: underline; }
.md-quote { display: block; padding: 2px 0 2px 12px; margin: 2px 0; border-left: 3px solid var(--acc-line); color: var(--text-2); }
.md-spoiler { background: #2a2638; color: transparent; border-radius: 5px; padding: 0 3px; cursor: pointer; transition: color .2s, background .2s; }
.md-spoiler:hover { background: #343046; }
.md-spoiler.shown, .md-spoiler:focus { color: inherit; background: rgba(255, 255, 255, .08); }
.mention { padding: 0 3px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: color-mix(in srgb, var(--accent) 40%, #fff); font-weight: 600; }
.mention.me { background: color-mix(in srgb, var(--warn) 25%, transparent); color: #fde68a; }

/* message effects (run when the message arrives) */
.msg.fx-slam.fx-run .msg-body { animation: slam .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes slam { 0% { transform: scale(2.4); opacity: 0; filter: blur(6px); } 55% { transform: scale(.92); opacity: 1; filter: none; } 100% { transform: none; } }
.msg.fx-glitch.fx-run .msg-text { animation: glitch 1s steps(2) 1; }
@keyframes glitch {
  0% { text-shadow: 3px 0 #f43f5e, -3px 0 #22d3ee; transform: translateX(2px); clip-path: inset(10% 0 40% 0); }
  20% { text-shadow: -4px 0 #f43f5e, 4px 0 #22d3ee; transform: translateX(-3px); clip-path: inset(50% 0 5% 0); }
  40% { text-shadow: 2px 1px #f43f5e, -2px -1px #22d3ee; transform: skewX(8deg); clip-path: none; }
  60% { text-shadow: -2px 0 #f43f5e, 2px 0 #22d3ee; transform: translateX(1px); }
  100% { text-shadow: none; transform: none; }
}
.msg.fx-embers.fx-run .msg-text { animation: embersGlow 1.4s ease; }
@keyframes embersGlow { 0%, 60% { text-shadow: 0 0 12px #fb923c, 0 0 2px #fde047; color: #ffedd5; } }
.msg.fx-sparkle.fx-run .msg-text { animation: sparkleGlow 1.2s ease; }
@keyframes sparkleGlow { 0%, 50% { text-shadow: 0 0 14px var(--accent); } }
.msg.fx-love.fx-run .msg-body { animation: lovePop .6s var(--spring); }
@keyframes lovePop { 40% { transform: scale(1.04); } }
.msg.fx-confetti.fx-run .msg-body { animation: lovePop .5s var(--spring); }
.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translate(-1px, 1px); } 20%, 80% { transform: translate(3px, -2px); } 30%, 50%, 70% { transform: translate(-5px, 2px); } 40%, 60% { transform: translate(5px, -1px); } }

.jump-pill { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px; background: var(--grad); color: #fff; font: 600 13px var(--font); box-shadow: 0 10px 30px -10px var(--accent); z-index: 4; animation: msgIn .3s var(--spring); }
.typing-row { height: 0; display: flex; align-items: center; gap: 8px; padding: 0 24px; font-size: 12.5px; color: var(--text-2); overflow: hidden; transition: height .2s; }
.typing-row.on { height: 22px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.composer-wrap { flex: none; padding: 0 16px 16px; }
.composer { position: relative; border-radius: 18px; background: rgba(8, 7, 13, .55); border: 1px solid var(--line-2); transition: border-color .25s, box-shadow .25s; }
.composer:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft), 0 20px 50px -30px var(--accent); }
.composer.drag { border-style: dashed; border-color: var(--accent); }
.composer-row { display: flex; align-items: flex-end; gap: 2px; padding: 6px; }
.composer-input { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: calc(15px * var(--fs)); line-height: 1.5; padding: 8px 6px; max-height: 260px; }
.composer-input::placeholder { color: var(--text-3); }
.comp-btn { width: 38px; height: 38px; }
.fx-btn.active { color: var(--accent); background: var(--acc-soft); }
.send-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 3px 10px -6px var(--accent); transition: transform .2s var(--spring); margin-left: 4px; } /* (a glow small enough to fit above the bottom edge on phones) */
.send-btn:hover { transform: translateY(-1px) rotate(-8deg); }
.send-btn:active { transform: scale(.9); }
.composer-bits:empty { display: none; }
.composer-bits { display: grid; gap: 4px; padding: 6px 6px 0; }
.bit { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 11px; background: rgba(255, 255, 255, .05); font-size: 13px; color: var(--text-2); animation: msgIn .25s var(--spring); }
.bit b { color: var(--text); }
.bit .icon-btn { width: 26px; height: 26px; }
.fx-bit { background: var(--acc-soft); }
.img-bit img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.char-count { position: absolute; right: 14px; top: -20px; font-size: 11px; color: var(--warn); }
.slash-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); padding: 6px; border-radius: 14px; background: var(--glass-3); backdrop-filter: blur(20px); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px #000; z-index: 5; max-height: 280px; overflow-y: auto; }
.slash-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; text-align: left; font-size: 13.5px; }
.slash-item b { color: var(--accent); font-family: var(--mono); font-size: 13px; min-width: 90px; }
.slash-item span { color: var(--text-2); }
.slash-item.on, .slash-item:hover { background: rgba(255, 255, 255, .07); }

/* ---------- popovers / menus / tooltips ---------- */
.popover { position: fixed; z-index: 55; min-width: 180px; max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; border-radius: 16px; background: var(--glass-3); backdrop-filter: blur(24px) saturate(150%); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(6px) scale(.97); transition: opacity .15s, transform .2s var(--spring); }
.popover.in { opacity: 1; transform: none; }
.pop-pad { padding: 10px; }
.pop-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 8px; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.menu { padding: 6px; display: grid; min-width: 210px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 14px; color: var(--text-2); text-align: left; }
.menu-item span:not(.ic) { flex: 1; }
.menu-item kbd { font-size: 10px; }
.menu-item:hover { background: var(--acc-soft); color: var(--text); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger:hover { background: color-mix(in srgb, var(--bad) 15%, transparent); }
.menu-sep { height: 1px; margin: 5px 6px; background: var(--line-2); }
.menu-sep:last-child, .menu-sep:first-child { display: none; }
.tooltip { position: fixed; z-index: 70; padding: 6px 10px; border-radius: 9px; background: #05040a; color: var(--text); font: 600 12.5px var(--font); box-shadow: 0 8px 24px rgba(0, 0, 0, .6); border: 1px solid var(--line-2); max-width: 280px; animation: tipIn .12s ease; }
@keyframes tipIn { from { opacity: 0; transform: scale(.94); } }
.fx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 330px; }
.fx-card { display: grid; justify-items: center; gap: 2px; padding: 12px 8px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-align: center; transition: transform .2s var(--spring), border-color .2s, background .2s; }
.fx-card small { font-size: 10.5px; color: var(--text-3); line-height: 1.3; }
.fx-card b { font-size: 13px; }
.fx-card:hover { transform: translateY(-2px); border-color: var(--acc-line); background: var(--acc-soft); }
.fx-card.on { border-color: var(--accent); background: var(--acc-soft); }
.fx-demo { font-size: 26px; display: inline-block; }
.fx-card:hover .fx-demo-confetti { animation: hop .5s var(--spring) infinite alternate; }
.fx-card:hover .fx-demo-slam { animation: slam .6s infinite; }
.fx-card:hover .fx-demo-glitch { animation: glitch .6s steps(2) infinite; }
.fx-card:hover .fx-demo-embers, .fx-card:hover .fx-demo-sparkle { animation: embersGlow .8s infinite, hop .6s var(--spring) infinite alternate; }
.fx-card:hover .fx-demo-love { animation: lovePop .5s infinite; }
@keyframes hop { to { transform: translateY(-5px) rotate(-6deg); } }
.free-chip { font: 800 10px var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.emoji-pop { width: 316px; max-height: 340px; overflow-y: auto; padding: 8px; }
.emoji-cat { font: 700 10.5px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: 8px 6px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji-btn { aspect-ratio: 1; font-size: 22px; border-radius: 9px; transition: transform .15s var(--spring), background .15s; }
.emoji-btn:hover { background: rgba(255, 255, 255, .08); transform: scale(1.18); }

.profile-card { width: 320px; border-radius: 16px; overflow: hidden; }
.pc-banner { height: 92px; background: linear-gradient(135deg, var(--a), var(--b)); position: relative; }
.pc-banner::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0, rgba(255, 255, 255, .35), transparent 55%); }
.pc-av { margin: -46px 0 0 16px; position: relative; width: max-content; padding: 5px; border-radius: 50%; background: var(--glass-3); }
.pc-av .av-dot { border-color: var(--bg-3); }
.pc-body { display: grid; gap: 8px; padding: 8px 16px 16px; }
.pc-name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-family: var(--display); font-weight: 700; flex-wrap: wrap; }
.pc-bio { color: var(--text-2); font-size: 13.5px; padding: 10px 12px; border-radius: 11px; background: rgba(0, 0, 0, .25); }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pc-stats div { display: grid; justify-items: center; padding: 8px 4px; border-radius: 11px; background: rgba(255, 255, 255, .04); }
.pc-stats b { font: 700 17px var(--display); }
.pc-stats small { font-size: 11px; color: var(--text-3); }
.pc-since { font-size: 11.5px; }

/* ---------- modals ---------- */
.scrim { position: fixed; inset: var(--frame) 0 0; z-index: 52; display: grid; place-items: center; padding: 20px; background: rgba(4, 3, 8, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.scrim.in { opacity: 1; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; border-radius: 22px; background: var(--glass-3); backdrop-filter: blur(30px) saturate(150%); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -30px #000, 0 0 0 1px rgba(255, 255, 255, .03) inset; transform: translateY(14px) scale(.96); transition: transform .35s var(--spring); }
.scrim.in .modal { transform: none; }
.modal.sm { width: min(420px, 100%); }
.modal.md { width: min(560px, 100%); }
.modal.xl { width: min(1000px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 6px; }
.modal-head h2 { font-size: 22px; }
.modal-head p { margin-top: 4px; font-size: 13.5px; }
.modal-body { padding: 10px 22px 22px; overflow-y: auto; }
.confirm .row { margin-top: 18px; }
.tpl-grid { display: grid; gap: 8px; margin: 8px 0 16px; }
.tpl-card { display: grid; grid-template-columns: 46px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); text-align: left; transition: transform .2s var(--spring), border-color .2s, background .2s; }
.tpl-card:hover { transform: translateX(3px); border-color: var(--acc-line); background: var(--acc-soft); }
.tpl-ic { grid-row: span 2; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(255, 255, 255, .06); }
.tpl-card small { color: var(--text-3); font-size: 12.5px; grid-column: 2; }
.tpl-go { grid-row: 1 / span 2; grid-column: 3; color: var(--text-3); }
.or-join { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.phase-preview { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.phase-preview > div { display: grid; }
.phase-preview b { font: 700 18px var(--display); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .2); transition: transform .2s var(--spring); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: #fff; transform: scale(1.1); box-shadow: 0 0 16px var(--a); }
.icon-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-choice { width: 38px; height: 38px; border-radius: 11px; font-size: 19px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: transform .2s var(--spring), border-color .2s; font-weight: 700; font-size: 18px; }
.icon-choice:hover { transform: scale(1.08); }
.icon-choice.on { border-color: var(--accent); background: var(--acc-soft); }
.icon-choices.sm .icon-choice { width: 32px; height: 32px; font-size: 16px; }
.discover-list { margin-top: 18px; display: grid; gap: 6px; }
.discover-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.discover-row:hover { background: rgba(255, 255, 255, .04); }
.discover-row .grow { display: grid; }
.discover-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-input { font: 700 18px var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.invite-code { font: 700 15px var(--mono); letter-spacing: .14em; padding: 7px 12px; border-radius: 9px; background: rgba(0, 0, 0, .35); border: 1px dashed var(--acc-line); }
.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin: 26px 0 10px; font-family: var(--font); font-weight: 700; }
.lightbox .modal-body { padding: 8px; }
.lightbox-img { display: block; max-width: 100%; max-height: calc(100vh - 80px); margin: auto; border-radius: 14px; }
.palette-modal { align-self: start; margin-top: 12vh; }
.palette-modal .modal-body { padding: 0; }
.palette-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette-input { flex: 1; border: 0; outline: none; background: transparent; color: var(--text); font: 500 17px var(--font); }
.palette-list { padding: 8px; max-height: 50vh; overflow-y: auto; display: grid; gap: 2px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; text-align: left; color: var(--text-2); }
.palette-item span:not(.ic):not(.phase-ic) { flex: 1; color: var(--text); font-weight: 500; }
.palette-item small { color: var(--text-3); }
.palette-item.on { background: var(--acc-soft); box-shadow: inset 2px 0 0 var(--accent); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 50px 20px; color: var(--text-3); text-align: center; }
.empty.small { padding: 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- home ---------- */
.home { padding: 22px; display: grid; gap: 16px; max-width: 1180px; width: 100%; margin: 0 auto; align-content: start; }
.card { padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h3 { font-size: 16px; }
.section-head.page { margin: 6px 0 0; }
.section-head.page h2 { font-size: 26px; }
.section-head small { display: inline-flex; align-items: center; gap: 4px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px; flex-wrap: wrap; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent)); border-color: var(--acc-line); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 90% -20%, rgba(255, 255, 255, .14), transparent 45%); pointer-events: none; }
.hero-copy { display: grid; gap: 8px; max-width: 460px; }
.hero h1 { font-size: 32px; line-height: 1.1; }
.hero h1 .uname { font-weight: 700; }
.hero-stats { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.streak-orb, .shard-orb { position: relative; width: 104px; height: 104px; border-radius: 28px; display: grid; place-content: center; justify-items: center; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); }
.streak-orb b, .shard-orb b { font: 700 28px/1 var(--display); }
.streak-orb small, .shard-orb small { font-size: 11px; color: var(--text-3); }
.flame { font-size: 26px; animation: flicker 1.6s steps(16, jump-none) infinite; text-shadow: 0 0 12px rgba(251, 146, 60, .85); will-change: transform; } /* glow is static; only transform animates (no per-frame filter) */
@keyframes flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
.freezes { position: absolute; top: 6px; right: 8px; display: flex; gap: 2px; font-style: normal; }
.freezes i { font-style: normal; font-size: 10px; opacity: .25; }
.freezes i.on { opacity: 1; color: #7dd3fc; }
.shard-orb .ic { color: var(--accent); filter: drop-shadow(0 0 8px var(--accent)); margin-bottom: 4px; }
.level-orb { position: relative; width: 104px; height: 104px; }
.ring-svg svg { display: block; transform: rotate(-90deg); overflow: visible; } /* the ring's glow fades out past the box instead of being cut off square */
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--accent)); transition: stroke-dashoffset 1s var(--ease); }
.level-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.level-in b { font: 700 30px/1 var(--display); }
.level-in small { font-size: 10px; color: var(--text-3); letter-spacing: .06em; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.quest-list { display: grid; gap: 10px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); transition: border-color .3s; }
.quest.done:not(.claimed) { border-color: var(--acc-line); box-shadow: 0 0 30px -14px var(--accent); }
.quest.claimed { opacity: .6; }
.quest-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(255, 255, 255, .05); flex: none; }
.quest .grow { display: grid; gap: 4px; }
.quest-top { display: flex; justify-content: space-between; gap: 8px; }
.claimed-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ok); font-weight: 600; }
.perk-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.perk-list li { display: flex; gap: 10px; }
.perk-list li > .ic { color: var(--ok); margin-top: 2px; }
.perk-list li div { display: grid; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board-list li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.board-list li.me { background: var(--acc-soft); }
.rank { width: 22px; text-align: center; font: 700 13px var(--display); color: var(--text-3); }
.rank.r1 { color: #fde047; } .rank.r2 { color: #e5e7eb; } .rank.r3 { color: #fdba74; }
.phase-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.phase-tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); text-align: center; transition: transform .2s var(--spring), border-color .2s; }
.phase-tile:hover { transform: translateY(-3px); border-color: var(--acc-line); }
.phase-tile b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-tile.add { border-style: dashed; color: var(--text-3); }
.phase-tile .unread-dot { position: absolute; top: 8px; right: 8px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-card { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); filter: grayscale(1); opacity: .45; }
.badge-card.got { filter: none; opacity: 1; border-color: var(--acc-line); }
.badge-big { display: grid; place-items: center; margin-bottom: 4px; }
.badge-card.got .badge-big { animation: hop 1.8s var(--spring) infinite alternate; }
.badge-card:not(.got) .badge-art svg { filter: none; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { display: grid; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.stat b { font: 700 24px var(--display); }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vault-item { display: grid; gap: 6px; justify-items: start; transition: transform .2s var(--spring), border-color .2s; }
.vault-item:hover { transform: translateY(-3px); border-color: var(--acc-line); }
.vault-item.equipped { border-color: var(--accent); box-shadow: 0 0 30px -14px var(--accent); }
.vault-preview { width: 100%; height: 96px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 50% 30%, var(--acc-soft), rgba(0, 0, 0, .25)); margin-bottom: 6px; }
.vault-name { font: 700 22px var(--display); }
.vault-item .btn { margin-top: 6px; }
.vault-item { padding-bottom: 24px; } /* room for the button's glow (the card clips for its hover sweep) */
.shard-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--acc-soft); border: 1px solid var(--acc-line); font-weight: 700; }
.shard-pill .ic { color: var(--accent); }
.banner-row { display: flex; flex-wrap: wrap; gap: 10px; }
.banner-swatch { width: 110px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--a), var(--b)); border: 2px solid transparent; transition: transform .2s var(--spring); }
.banner-swatch:hover { transform: translateY(-2px); }
.banner-swatch.on { border-color: #fff; box-shadow: 0 0 20px -4px var(--a); }
.discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.discover-card { position: relative; overflow: hidden; display: grid; gap: 6px; padding: 0 16px 16px; transition: transform .25s var(--spring), border-color .2s; }
.discover-card:hover { transform: translateY(-4px); border-color: var(--acc-line); }
.dc-banner { height: 76px; margin: 0 -16px; background: linear-gradient(135deg, var(--a), var(--b)); opacity: .75; }
/* The banner is see-through, which puts it on its own layer: the icon needs a layer above it. */
.dc-ic { position: relative; z-index: 1; margin-top: -30px; padding: 4px; border-radius: 20px; background: var(--bg-2); width: max-content; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8); transition: transform .3s var(--spring); }
.discover-card:hover .dc-ic { transform: translateY(-3px) rotate(-3deg); }
.discover-card b { display: flex; align-items: center; gap: 6px; font: 700 17px var(--display); }
.dc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.dc-foot small { display: inline-flex; align-items: center; gap: 2px; }

/* ---------- voice stage ---------- */
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: radial-gradient(ellipse at 50% 120%, var(--acc-soft), transparent 60%); }
.stage-lobby { margin: auto; display: grid; justify-items: center; gap: 12px; padding: 30px; text-align: center; max-width: 520px; }
.lobby-orb { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 0 0 14px var(--acc-soft), 0 0 0 30px color-mix(in srgb, var(--accent) 6%, transparent), 0 30px 60px -20px var(--accent); animation: breathe 3.5s steps(35, jump-none) infinite; margin-bottom: 18px; will-change: transform; }
@keyframes breathe { 50% { transform: scale(1.05); } } /* transform only: no repaint per frame */
.stage-lobby h2 { font-size: 28px; }
.lobby-faces { display: flex; }
.lobby-faces .av { margin-left: -8px; box-shadow: 0 0 0 3px var(--bg-2); }
.lobby-mode { display: grid; gap: 6px; justify-items: center; margin: 6px 0 4px; }
.lobby-note { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; max-width: 380px; text-align: left; margin-top: 8px; }
.stage-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 14px; padding: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-content: center; }
.stage-grid.count-1 { grid-template-columns: minmax(240px, 420px); justify-content: center; }
.stage-grid.count-2 { grid-template-columns: repeat(2, minmax(220px, 380px)); justify-content: center; }
.tile { --lvl: 0; position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 20px; display: grid; place-content: center; justify-items: center; gap: 10px; background: linear-gradient(160deg, hsl(var(--h) 40% 18% / .9), rgba(10, 9, 16, .9)); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.tile-glow { position: absolute; inset: -30%; background: radial-gradient(circle, hsl(var(--h) 80% 60% / .35), transparent 55%); opacity: calc(.25 + var(--lvl) * .75); transition: opacity .1s; pointer-events: none; }
.tile .av { z-index: 1; transform: scale(calc(1 + var(--lvl) * .06)); transition: transform .08s, box-shadow .2s; }
.tile-rings { position: absolute; left: 50%; top: calc(50% - 16px); width: 0; height: 0; z-index: 0; }
.tile-rings i { position: absolute; left: -42px; top: -42px; width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; }
/* (the glow stays within the grid's padding — 14px on phones — so the grid's edge never cuts it straight) */
.tile.speaking { border-color: color-mix(in srgb, var(--ok) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 40%, transparent), 0 0 22px -8px var(--ok); }
.tile.speaking .av { box-shadow: 0 0 0 3px var(--ok), 0 0 24px var(--ok); }
.tile.speaking .tile-rings i { animation: ringOut 1.6s ease-out infinite; }
.tile.speaking .tile-rings i:nth-child(2) { animation-delay: .5s; }
.tile.speaking .tile-rings i:nth-child(3) { animation-delay: 1s; }
@keyframes ringOut { from { transform: scale(1); opacity: .7; } to { transform: scale(2.4); opacity: 0; } }
.tile-name { z-index: 1; display: flex; align-items: baseline; gap: 6px; font-weight: 600; }
.tile-name small { color: var(--text-3); }
.tile-flags { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 5px; z-index: 1; }
.flag { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 7px; background: rgba(0, 0, 0, .55); font: 800 10px var(--font); letter-spacing: .05em; color: var(--text-2); }
.flag.stereo { background: var(--grad); color: #fff; }
.flag.bad { color: var(--bad); }
.tile.muted .av { filter: saturate(.6); }
.stage-dock { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 0 16px 16px; padding: 12px 14px; border-radius: 18px; background: rgba(8, 7, 13, .6); border: 1px solid var(--line-2); backdrop-filter: blur(20px); }
.dock-info { display: grid; gap: 4px; min-width: 0; }
.dock-live { display: flex; align-items: center; gap: 7px; color: var(--ok); font-size: 13.5px; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: live 1.8s ease-out infinite; }
@keyframes live { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }
.dock-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--text-3); }
.dock-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ai-ready { color: var(--ok); }
.ai-loading { color: var(--warn); }
.ai-fallback { color: var(--warn); }
.stage-meter { height: 6px; margin-top: 2px; max-width: 240px; }
.dock-ctl { display: flex; gap: 8px; }
.ctl { width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .08); color: var(--text); }
.ctl:hover { background: rgba(255, 255, 255, .14); }
.ctl.off { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.ctl.leave { background: color-mix(in srgb, var(--bad) 85%, #000); color: #fff; width: 62px; }
.ctl.leave:hover { background: var(--bad); color: #fff; }
.ctl.stereo-ctl { width: auto; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px 0 13px; color: var(--text-2); font: 700 12.5px var(--font); letter-spacing: .02em; }
.ctl.stereo-ctl.on { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--accent) 85%, transparent); }
.ctl.stereo-ctl.on:hover { filter: brightness(1.08); }
/* white on the gradient: never the accent-gradient icon colour that active buttons use elsewhere */
.ctl.stereo-ctl.on .ic svg { stroke: #fff; }
.ctl.stereo-ctl.on .ic .fl { fill: #fff; fill-opacity: .3; }
.ctl.stereo-ctl.locked { color: var(--text-3); }
.dock-mode { justify-self: end; }
.stereo-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }

/* ---------- settings ---------- */
.settings { position: fixed; inset: var(--frame) 0 0; z-index: 51; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 860px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); /* Solid, never see-through: the app behind must not show through (and no full-screen blur to compute). */
  background: radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%), radial-gradient(80% 60% at 100% 100%, color-mix(in srgb, var(--accent-2) 6%, transparent), transparent 60%), var(--bg-0); }
/* The solid background is there from the first frame; only the contents fade and settle in. */
.settings > * { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .3s var(--ease); }
.settings.in > * { opacity: 1; transform: none; }
.set-side { display: flex; justify-content: flex-end; padding: 60px 10px 20px; overflow-y: auto; background: rgba(0, 0, 0, .25); }
.set-nav { width: 220px; display: grid; gap: 2px; align-content: start; }
.set-group { padding: 16px 10px 6px; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.set-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); text-align: left; font-weight: 500; }
.set-link span:not(.ic) { flex: 1; }
.set-link:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.set-link.on { background: var(--acc-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.beta-chip { font: 800 9px var(--font); letter-spacing: .06em; padding: 2px 5px; border-radius: 5px; background: var(--grad); color: #fff; }
.count-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--dnd); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.set-main { position: relative; min-width: 0; min-height: 0; grid-column: span 2; display: flex; }
.set-body { flex: 1; max-width: 860px; padding: 60px 40px 80px; overflow-y: auto; }
.set-close { position: sticky; top: 0; display: grid; justify-items: center; gap: 6px; padding: 60px 20px 0; height: max-content; }
.close-ring { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line-2); }
.set-title { font-size: 24px; margin-bottom: 8px; }
.set-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.set-col.narrow { display: grid; gap: 10px; align-content: start; padding-top: 14px; }
.profile-preview { border-radius: 18px; overflow: hidden; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.theme-card { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 2px solid transparent; text-align: left; transition: transform .2s var(--spring); }
.theme-card:hover { transform: translateY(-2px); }
.theme-card.on { border-color: var(--a); box-shadow: 0 0 24px -8px var(--a); }
.theme-swatch { height: 58px; border-radius: 10px; background: linear-gradient(135deg, var(--a), var(--b)); position: relative; overflow: hidden; }
.theme-swatch i { position: absolute; left: 8px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .7); }
.theme-swatch i:nth-child(1) { top: 10px; width: 50%; }
.theme-swatch i:nth-child(2) { top: 22px; width: 70%; opacity: .6; }
.theme-swatch i:nth-child(3) { top: 34px; width: 35%; opacity: .4; }
.toggles { margin-top: 10px; }
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.mode-card { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line-2); text-align: left; transition: transform .2s var(--spring), border-color .2s, background .2s; }
.mode-card:hover:not(:disabled) { transform: translateY(-2px); }
.mode-card.on { border-color: var(--accent); background: var(--acc-soft); box-shadow: 0 0 30px -14px var(--accent); }
.mode-card:disabled { opacity: .45; }
.mode-top { display: flex; align-items: center; gap: 8px; }
.mode-top b { flex: 1; font-size: 15px; }
.mode-card.on .mode-top .ic { color: var(--accent); }
.mode-card small { color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.ai-line { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.ai-line.ai-ready { color: var(--ok); }
.mic-test { display: grid; gap: 4px; }
.test-status { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; }
.test-status span { display: inline-flex; align-items: center; gap: 6px; }
.ears { display: inline-flex; gap: 6px; }
.ear { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 12px var(--font); background: rgba(255, 255, 255, .06); color: var(--text-3); border: 1px solid var(--line-2); transition: all .15s; }
.ear.lit { background: var(--grad); color: #fff; box-shadow: 0 0 20px var(--accent); transform: scale(1.12); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 13px; background: var(--acc-soft); border: 1px solid var(--acc-line); font-size: 13.5px; margin: 10px 0; color: var(--text-2); }
.notice.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.notice b { color: var(--text); }
.notice p { margin-top: 4px; }
.perk-table-wrap { padding: 0; overflow-x: auto; margin: 16px 0 10px; }
.perk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.perk-table th { text-align: left; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.perk-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.perk-table tr:last-child td { border-bottom: 0; }
.perk-table tr:hover td { background: rgba(255, 255, 255, .02); }
.yes { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--ok); font-weight: 600; }
.yes > .ic { height: 1.45em; } /* stays beside the first line when the text wraps */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.shortcut { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.shortcut kbd { min-width: 96px; text-align: center; }

/* ---------- stereo lab ---------- */
.lab { display: grid; gap: 16px; margin-bottom: 18px; }
.lab-hero { display: flex; gap: 22px; align-items: center; padding: 22px; border-radius: 20px; background: linear-gradient(135deg, var(--acc-soft), rgba(255, 255, 255, .02)); border: 1px solid var(--acc-line); }
.lab-hero h2 { font-size: 26px; margin: 4px 0 6px; }
.lab-hero p { color: var(--text-2); font-size: 14px; max-width: 560px; }
.lab-hero-art { position: relative; flex: none; width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 20px 40px -16px var(--accent); }
.lab-hero-art i { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); animation: earPing 2.4s infinite; }
.lab-hero-art i.l { left: -22px; }
.lab-hero-art i.r { right: -22px; animation-delay: 1.2s; }
@keyframes earPing { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.lab-status-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 16px; }
.lab-status-head.ok { color: var(--ok); }
.lab-status-head.ok b { color: var(--text); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); animation: live 1.8s infinite; box-shadow: 0 0 0 0 var(--warn); }
.timeline { list-style: none; margin: 0 0 14px; padding: 0 0 0 4px; display: grid; gap: 0; }
.timeline li { position: relative; display: grid; padding: 0 0 16px 26px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg-2); }
.timeline li::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.now::before { border-color: var(--warn); box-shadow: 0 0 10px var(--warn); }
.timeline span { font-size: 12.5px; color: var(--text-3); }
.lab-quote { margin: 8px 0; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); border-left: 3px solid var(--acc-line); color: var(--text-2); font-size: 14px; white-space: pre-wrap; }
.lab-form h3 { font-size: 18px; margin-bottom: 4px; }
.lab-score { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.lab-score-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.lab-pbar { height: 8px; }
.lab-pbar[data-grade="too-thin"] > i { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.lab-pbar[data-grade="borderline"] > i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.lab-pbar[data-grade="strong"] > i { background: linear-gradient(90deg, var(--ok), #a3e635); box-shadow: 0 0 10px var(--ok); }
.lab-tips { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); display: grid; gap: 3px; }
.lab-tips:empty { display: none; }
.lab-console .toggle-row { border-bottom: 1px solid var(--line); }
.console-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 16px 0; }
.console-scope { display: grid; gap: 8px; justify-items: center; max-width: 240px; text-align: center; }
.gonio { border-radius: 50%; background: radial-gradient(circle, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25)); border: 1px solid var(--line-2); box-shadow: inset 0 0 40px rgba(0, 0, 0, .6), 0 0 40px -20px var(--accent); }
.console-meters { display: flex; align-items: flex-end; gap: 18px; }
.vmeter { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.corr-wrap { display: grid; gap: 6px; font-size: 12px; color: var(--text-3); width: 160px; }
.corr { position: relative; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--bad), var(--warn) 50%, var(--ok)); opacity: .8; }
.corr i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 3px; background: #fff; box-shadow: 0 0 8px #fff; left: 100%; transition: left .1s; }
.review { display: grid; gap: 12px; margin-top: 24px; }
.review .section-head h2 { font-size: 22px; }
.count-chip { font: 700 12px var(--font); padding: 4px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.review-card { display: grid; gap: 8px; }
.review-card header { display: flex; align-items: center; gap: 12px; }
.review-card header .grow { display: grid; }
.review-card.approved, .review-card.denied { opacity: .8; }
.review-setup { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.score-pill { font: 700 12px var(--font); padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); white-space: nowrap; }
.score-pill.g-strong { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.score-pill.g-good { color: #a3e635; background: color-mix(in srgb, #a3e635 12%, transparent); }
.score-pill.g-borderline { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.score-pill.g-too-thin { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.review-actions { display: grid; gap: 8px; }
.review-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-chip { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 8px; }
.status-chip.approved { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.status-chip.denied { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }

/* ---------- onboarding ---------- */
.onboard { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.ob-card { width: min(460px, 100%); display: grid; gap: 14px; justify-items: center; padding: 34px 30px 24px; border-radius: 28px; background: var(--glass); backdrop-filter: blur(30px) saturate(150%); border: 1px solid var(--line-2); box-shadow: 0 50px 120px -40px #000, 0 0 80px -40px var(--accent); animation: obIn .7s var(--spring); }
@keyframes obIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.ob-brand { display: flex; align-items: center; gap: 12px; }
.wordmark { position: relative; font: 700 52px/1 var(--display); letter-spacing: -.04em; background: linear-gradient(135deg, #fff 20%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark::before, .wordmark::after { content: attr(data-text); position: absolute; inset: 0; background: inherit; -webkit-background-clip: text; background-clip: text; opacity: .7; }
.wordmark::before { animation: wmGlitch 6s infinite steps(1); color: transparent; text-shadow: 2px 0 color-mix(in srgb, var(--accent-2) 60%, transparent); clip-path: inset(20% 0 50% 0); }
.wordmark::after { animation: wmGlitch 6s infinite steps(1) reverse; color: transparent; text-shadow: -2px 0 rgba(34, 211, 238, .5); clip-path: inset(60% 0 10% 0); }
/* Glitch slices are fixed; only opacity/transform animate, which the GPU does without waking the page. */
@keyframes wmGlitch { 0%, 94%, 100% { opacity: 0; transform: none; } 95% { opacity: .7; transform: translateX(-3px); } 97% { opacity: .7; transform: translateX(3px); } }
.wordmark.sm { font-size: 20px; }
.ob-tag { color: var(--text-2); font-size: 15px; margin-top: -6px; }
.ob-accounts { width: 100%; display: grid; gap: 8px; justify-items: center; }
.ob-acc-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ob-acc { display: grid; justify-items: center; gap: 6px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: transform .2s var(--spring), border-color .2s; }
.ob-acc:hover { transform: translateY(-3px); border-color: var(--acc-line); }
.or { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.ob-form { width: 100%; display: grid; gap: 12px; }
.ob-preview { display: grid; justify-items: center; gap: 8px; }
.ob-preview b { font: 700 18px var(--display); color: var(--text-2); }
.ob-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 12px; }
.ob-go { width: 100%; margin-top: 6px; }
.ob-foot { display: flex; align-items: flex-start; gap: 4px; text-align: center; font-size: 12px; max-width: 360px; }

.update-bar { position: fixed; top: calc(14px + var(--frame)); left: 50%; transform: translateX(-50%); z-index: 63; display: flex; align-items: center; gap: 12px; max-width: min(720px, calc(100vw - 32px)); padding: 10px 12px 10px 14px; border-radius: 16px; background: var(--glass-3); backdrop-filter: blur(24px); border: 1px solid var(--acc-line); box-shadow: 0 20px 60px -20px #000, 0 0 40px -18px var(--accent); animation: msgIn .45s var(--spring); }
.update-ic { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.update-txt { display: grid; min-width: 0; flex: 1; }
.update-txt b { font-size: 14px; }
.update-txt span { font-size: 12.5px; color: var(--text-2); }
.key-btn { min-width: 64px; font-family: var(--mono); }
.key-btn.recording { border-color: var(--accent); box-shadow: 0 0 0 4px var(--acc-soft); animation: breathe 1.4s ease-in-out infinite; }
.update-later { color: var(--text-3); font: 600 12.5px var(--font); padding: 6px 8px; border-radius: 8px; }
.update-later:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
@media (max-width: 760px) { .update-bar { flex-wrap: wrap; } }
.ob-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.ob-tabs button { justify-content: center; }
.ob-looks { display: grid; gap: 12px; }
.splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; animation: fadeIn .4s ease; }
.splash .logo-mark { animation: breathe 2.4s ease-in-out infinite; border-radius: 50%; }
.conn-bar { position: fixed; top: calc(12px + var(--frame)); left: 50%; transform: translateX(-50%); z-index: 64; padding: 8px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 22%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: #fde68a; font: 600 13px var(--font); box-shadow: 0 10px 30px -10px #000; animation: msgIn .3s var(--spring); }
.conn-bar.ok { background: color-mix(in srgb, var(--ok) 22%, var(--bg-2)); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: #a7f3d0; }

/* ---------- members ---------- */
.members { display: flex; flex-direction: column; transition: opacity .3s; }
.members-head { flex: none; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.members-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 16px; }
.member { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 11px; text-align: left; }
.member:hover { background: rgba(255, 255, 255, .045); }
.member.off { opacity: .45; }
.member.off:hover { opacity: .9; }
.member-txt { display: grid; min-width: 0; line-height: 1.25; }
.member-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.member-name .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-txt small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crown { color: var(--warn); }
.admin-ic { color: color-mix(in srgb, var(--accent) 60%, #fff); }
.add-members { margin: 10px 8px 0; width: calc(100% - 16px); }
.dm-profile { flex: 1; min-height: 0; overflow-y: auto; }
.dm-profile .pc-banner { height: 110px; }
.mutual { display: flex; flex-wrap: wrap; gap: 6px; }
.mutual-ph { border-radius: 10px; transition: transform .2s var(--spring); }
.mutual-ph:hover { transform: translateY(-2px); }
.social-btns { gap: 6px; margin-top: 4px; }

/* ---------- friends & direct messages ---------- */
.ftabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.ftab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 10px; color: var(--text-2); font: 600 13.5px var(--font); transition: background .2s, color .2s; }
.ftab:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.ftab.on { background: var(--acc-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--acc-line); }
.ftab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--dnd); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.add-friend { display: grid; gap: 8px; margin-bottom: 14px; }
.add-friend .row .btn { flex: none; }
.field-hint.ok { color: var(--ok); }
.friends-list { display: grid; gap: 2px; padding-top: 4px; }
.friends-list .side-cat { padding-left: 4px; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; border-top: 1px solid var(--line); transition: background .2s; }
.friend-row:first-of-type { border-top: 0; }
.friend-row:hover { background: rgba(255, 255, 255, .04); }
.friend-txt { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.friend-txt .uname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-acts { display: flex; gap: 6px; flex: none; }
.round-btn { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.round-btn:hover { background: rgba(255, 255, 255, .12); }
.round-btn.ok:hover { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.round-btn.bad:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.dm-row { gap: 10px; padding: 6px 30px 6px 8px; }
.dm-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.dm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-txt small { font-size: 11.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row .chan-badge { flex: none; }
.dm-group-ic { --s: 32px; position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 30%; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 40%, var(--bg-3)), var(--bg-2)); }
.dm-group-ic > .av { position: absolute; }
.dm-group-ic > .av:first-child { left: 0; top: 0; }
.dm-group-ic > .av:nth-child(2) { right: 0; bottom: 0; box-shadow: 0 0 0 2px var(--bg-1); border-radius: 50%; }
.dm-group-ic > .av:only-child { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dm-group-ic > .ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--text-2); }
.side-empty { display: block; padding: 2px 10px 6px; line-height: 1.45; }
.rail-dm .rail-btn { background: transparent; }
.rail-dm .rail-btn > .av, .rail-dm .rail-btn > .dm-group-ic { --s: 50px !important; border-radius: 0; }
.dm-intro .av { margin-bottom: 14px; }
.dm-intro-stack { display: flex; margin-bottom: 14px; }
.dm-intro-stack .av { margin: 0 -10px 0 0; box-shadow: 0 0 0 4px var(--bg-1); border-radius: 50%; }
.dm-intro-social { margin-top: 12px; }
.dm-intro-social:empty { display: none; }
.block-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; }
.block-note span { display: inline-flex; align-items: center; gap: 8px; }
.block-note:empty, .composer-wrap > [hidden] { display: none !important; }
.picker { display: grid; gap: 12px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips:empty { display: none; }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 4px; border-radius: 14px; background: var(--acc-soft); border: 1px solid var(--acc-line); font: 600 12.5px var(--font); animation: msgIn .25s var(--spring); }
.pick-chip:hover { background: color-mix(in srgb, var(--bad) 18%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.pick-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 11px; text-align: left; transition: background .15s; }
.pick-row:hover { background: rgba(255, 255, 255, .05); }
.pick-row.on { background: var(--acc-soft); }
.pick-row.full { opacity: .4; }
.pick-txt { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pick-txt small { font-size: 11.5px; }
.pick-txt small.cap { text-transform: capitalize; }
.pick-box { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; border: 2px solid var(--line-2); color: #fff; transition: background .15s, border-color .15s; }
.pick-row.on .pick-box { background: var(--grad); border-color: transparent; }
.pick-name:empty { display: none; }
.card.stack { display: grid; gap: 6px; }
.blocked-row { padding: 6px 0; }
.blocked-row .row { gap: 10px; }

/* ---------- suggestions & bug reports ---------- */
.fb-form { display: grid; gap: 4px; margin-bottom: 18px; }
.fb-form .field { margin: 8px 0; }
.fb-list { display: grid; gap: 10px; }
.fb-card { display: flex; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); animation: msgIn .3s var(--spring); }
.fb-card.fb-declined { opacity: .7; }
.fb-vote { flex: none; width: 48px; height: 58px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); color: var(--text-2); transition: transform .2s var(--spring), background .2s, color .2s; }
.fb-vote:hover:not(:disabled) { transform: translateY(-2px); color: var(--text); }
.fb-vote.on { background: var(--acc-soft); border-color: var(--acc-line); color: var(--text); }
.fb-vote.on .ic { color: var(--accent); }
.fb-vote b { font: 700 15px var(--display); }
.fb-vote:disabled { opacity: .45; }
.fb-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.fb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fb-title { font: 700 15.5px var(--display); overflow-wrap: anywhere; }
.fb-body { margin: 0; color: var(--text-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--text-3); }
.fb-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--text-2); font-weight: 600; }
.fb-status { flex: none; padding: 3px 8px; border-radius: 7px; font: 800 10.5px/1.3 var(--font); letter-spacing: .05em; text-transform: uppercase; background: rgba(255, 255, 255, .07); color: var(--text-2); }
.fb-status.st-accepted { background: color-mix(in srgb, var(--accent) 24%, transparent); color: color-mix(in srgb, var(--accent) 55%, #fff); }
.fb-status.st-fixed { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.fb-status.st-declined { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.fb-note { display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); border-left: 2px solid var(--accent); font-size: 13px; color: var(--text-2); }
.fb-note .ic { flex: none; margin-top: 2px; color: var(--accent); }
.fb-diag summary { cursor: pointer; font-size: 12.5px; color: var(--text-3); }
.fb-diag dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; font-size: 12px; }
.fb-diag dt { color: var(--text-3); }
.fb-diag dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.fb-review { display: grid; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.fb-actions { display: flex; justify-content: flex-end; }
.phase-sugg { display: grid; gap: 10px; max-height: 70vh; overflow-y: auto; }

/* ---------- growth: checklist, invites, discover ---------- */
.checklist { display: grid; gap: 10px; border-color: var(--acc-line); background: linear-gradient(160deg, var(--acc-soft), rgba(255, 255, 255, .03)); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-list li div { display: grid; line-height: 1.3; }
.check-list li.done b { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.check-box { flex: none; width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center; border-radius: 6px; border: 2px solid var(--line-2); color: #fff; }
.check-list li.done .check-box { background: var(--grad); border-color: transparent; }
/* Content sits together at the top even when the card is stretched to its row's height. */
.home-grid > .card { align-content: start; }
.invite-card { display: grid; gap: 10px; align-content: start; }
.invite-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.invite-row .btn { flex: none; }
@media (max-width: 420px) { .invite-row { flex-direction: column; align-items: stretch; } }
.share-link { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 9px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font: 600 12.5px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row { padding: 6px 0; }
.discover-bar { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); color: var(--text-3); }
.discover-bar .input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.dc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.dc-tag { padding: 2px 8px; border-radius: 7px; background: rgba(255, 255, 255, .06); font: 600 11.5px var(--font); color: var(--text-2); }
.rules-text { margin-bottom: 14px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; }
.chan-flags { display: inline-flex; gap: 6px; margin-left: 4px; }
.chan-flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); font: 600 12px var(--font); color: var(--text-2); white-space: nowrap; }

/* ---------- phase settings ---------- */
.chan-rows { display: grid; gap: 10px; margin-top: 14px; }
.phase-settings .set-page > .row:first-of-type { margin-top: 10px; }
.chan-row { display: grid; gap: 10px; padding: 12px 14px; }
.chan-move { display: inline-flex; flex-direction: column; }
.chan-move .icon-btn { width: 24px; height: 18px; border-radius: 6px; }
.chan-name-in { font-weight: 700; font-size: 15px; max-width: 260px; padding: 6px 8px; }
.chan-name-in:focus { background: rgba(0, 0, 0, .3); }
.chan-rules { gap: 16px; }
.chan-rules .toggle-row { padding: 0; border: 0; gap: 12px; }
select.input.sm { width: auto; padding: 6px 30px 6px 10px; font-size: 13px; }
.member-table { gap: 2px; }
.member-line { padding: 6px 0; border-bottom: 1px solid var(--line); }
.member-line:last-child { border-bottom: 0; }
.role-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 9px; background: rgba(255, 255, 255, .06); font: 600 12.5px var(--font); color: var(--text-2); }
.role-pill.owner { color: var(--warn); }
.danger-card { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }

/* ---------- 0.7: profiles, ranks, roles ---------- */
.stack { display: grid; gap: 10px; }
.av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.av { overflow: visible; }
.av:has(.av-img) { background: var(--bg-3); }
.role-colored { background: none !important; -webkit-text-fill-color: currentColor; }
.role-chip.rank-founder { background: linear-gradient(135deg, #f5c451, #f08a3c); color: #2a1600; box-shadow: 0 0 12px -2px rgba(245, 196, 81, .6); }
.role-chip.rank-headcommunity { background: linear-gradient(135deg, #2dd4bf, #0ea5e9); color: #04201f; }
.role-chip.rank-headmod { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }
.role-chip.rank-mod { background: color-mix(in srgb, #fb923c 26%, transparent); color: #fdba74; }
.role-chip.rank-helper { background: color-mix(in srgb, #4ade80 22%, transparent); color: #86efac; }
.role-chip.mini { font-size: 8.5px; padding: 2px 4px; flex: none; }
.role-chip.featured { background: color-mix(in srgb, #f5c451 22%, transparent); color: #fcd34d; }
.moon-amt { display: inline-flex; align-items: center; gap: 4px; }
.moon-amt .ic { color: #c4b5fd; filter: drop-shadow(0 0 6px rgba(167, 139, 250, .7)); }
.shard-orb .ic, .shard-chip .ic, .shard-pill .ic { color: #c4b5fd; }
.timed-ic { color: var(--warn); display: inline-flex; }
.phase-head.has-img .phase-banner { background-size: cover; background-position: center; mask-image: linear-gradient(to bottom, #000 45%, transparent); }
.banner-edit { height: 120px; border-radius: 14px; background: linear-gradient(135deg, var(--a, var(--accent)), var(--b, var(--accent-2))); background-size: cover; background-position: center; border: 1px solid var(--line); }
.pc-banner.img { background-size: cover; background-position: center; }
.profile-card.tinted, .profile-preview.tinted { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pa) 45%, transparent), 0 20px 60px -24px var(--pb); }
.profile-card.tinted .pc-body { background: linear-gradient(180deg, color-mix(in srgb, var(--pa) 10%, transparent), transparent 60%); }
.pc-status { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 13px; }
.color-in { width: 44px; height: 34px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); cursor: pointer; }
.status-emoji { width: 64px; flex: none; text-align: center; }
.notice.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: #fecdd3; }
.role-pill.ok { color: var(--ok); }
.role-list { display: grid; gap: 8px; margin-top: 12px; }
.role-row { padding: 10px 12px; display: grid; gap: 12px; }
.role-row.open { border-color: var(--acc-line); }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.role-edit { display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.color-sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); transition: transform .15s; }
.color-sw.on { border-color: #fff; transform: scale(1.12); }
.hex-in { width: 92px !important; font-family: var(--mono, monospace); }
.perm-list { display: grid; }
.perm-list .toggle-row { padding: 10px 0; }
.role-members { gap: 6px; }
.chip-x { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; margin-left: 2px; color: var(--text-2); }
.chip-x:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.member-roles { gap: 5px; margin-top: 6px; }
.role-tag { --rc: var(--text-3); display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); font: 600 12px var(--font); color: var(--text-2); }
.role-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.role-tag.add { border-style: dashed; color: var(--text-3); cursor: pointer; }
.role-tag.add:hover { color: var(--text); border-color: var(--acc-line); }
.member-line { display: block; padding: 10px 0; }
.ob-forgot { display: block; text-align: center; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.ob-forgot.hidden { display: none; }

/* ---------- 0.7: chat GIFs & giveaways ---------- */
.msg-gif { position: relative; max-width: 100%; margin-top: 6px; border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .3); }
.msg-gif img, .msg-gif video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gif-tag { position: absolute; left: 8px; bottom: 8px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); font: 800 10px var(--font); letter-spacing: .08em; color: #fff; }
.gif-pop { width: 380px; max-width: 92vw; display: grid; gap: 10px; padding: 12px; }
.gif-bar { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); color: var(--text-3); }
.gif-bar .input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.gif-grid { height: 330px; overflow-y: auto; columns: 2; column-gap: 8px; }
.gif-grid .empty { column-span: all; }
.gif-label { column-span: all; display: flex; align-items: center; gap: 5px; font: 700 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 2px 0 6px; }
.gif-label .ic { color: #fbbf24; }
.gif-tile { position: relative; display: block; width: 100%; margin-bottom: 8px; border-radius: 10px; overflow: hidden; break-inside: avoid; background: rgba(255, 255, 255, .04); transition: transform .15s, box-shadow .15s; }
.gif-tile:hover { transform: scale(1.02); box-shadow: 0 0 0 2px var(--accent); }
.gif-send { display: block; width: 100%; }
.gif-tile img { display: block; width: 100%; height: auto; }
/* The favorite star on a GIF: shows on hover (always on touch screens), gold when it's a favorite. */
.gif-fav { position: absolute; top: 6px; right: 6px; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(8, 7, 13, .62); color: #fff; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .2s var(--spring), background .15s; }
:is(.gif-tile, .msg-gif):hover .gif-fav, .gif-fav:focus-visible, .gif-fav.on { opacity: 1; transform: none; }
.gif-fav:hover { background: rgba(8, 7, 13, .85); transform: scale(1.08); }
.gif-fav.on .ic svg { stroke: #fbbf24; }
.gif-fav.on .ic .fl { fill: #fbbf24; fill-opacity: 1; }
@media (hover: none) { .gif-fav { opacity: 1; transform: none; } }
.gif-foot { gap: 8px; }
.giveaway { margin-top: 6px; max-width: 420px; display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, rgba(20, 18, 30, .9)), rgba(20, 18, 30, .9)); border: 1px solid var(--acc-line); box-shadow: 0 18px 50px -24px var(--accent); }
.giveaway.done { opacity: .85; filter: saturate(.7); }
.gw-top { display: flex; gap: 12px; align-items: center; }
.gw-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.gw-eyebrow { font: 800 10.5px var(--font); letter-spacing: .12em; color: var(--accent-2); }
.gw-title { display: block; font: 700 17px var(--display); }
.gw-prize { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.gw-prize .moon-amt b { font: 700 20px var(--display); }
.gw-foot { gap: 8px; }

/* ---------- 0.7: team pages ---------- */
.rank-ladder { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 14px; }
.rank-card { display: grid; gap: 8px; align-content: start; }
.rank-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.rank-people { gap: 6px; }
.mod-result { margin-top: 12px; }
.ledger { display: grid; gap: 2px; }
.ledger-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; }
.ledger-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.ledger-row b { min-width: 70px; font-family: var(--display); }
.ledger-row .plus { color: var(--ok); }
.ledger-row .minus { color: var(--bad); }

/* ---------- 0.7: discover ---------- */
.discover-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 30px 28px; margin-bottom: 16px; border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(70% 120% at 0% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%), radial-gradient(60% 100% at 100% 100%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 70%), rgba(255, 255, 255, .03); }
.discover-hero::after { content: '🌙'; position: absolute; right: 26px; top: 10px; font-size: 90px; opacity: .08; transform: rotate(-12deg); pointer-events: none; }
.dh-copy { display: grid; gap: 8px; flex: 1; min-width: 260px; }
.dh-copy h2 { font: 700 34px/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.dh-side { display: flex; gap: 8px; }
.discover-bar.big { max-width: 560px; height: 50px; border-radius: 14px; margin: 6px 0 0; background: rgba(0, 0, 0, .35); }
.discover-bar.big .input { font-size: 15px; }
/* Room inside the scroller for the chosen tile's glow (the negative margin keeps the row where it was). */
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 18px 28px; margin: -6px -16px -16px; }
/* Sideways rows: the mouse wheel scrolls them too (app.js), and a thin scrollbar shows on hover. */
.hscroll { scrollbar-color: transparent transparent; }
.hscroll:hover { scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.hscroll::-webkit-scrollbar { height: 8px; }
.hscroll::-webkit-scrollbar-thumb { background-color: transparent; }
.hscroll:hover::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .18); }
.cat-tile { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 88px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); transition: transform .2s var(--spring), border-color .2s, background .2s; }
.cat-tile:hover { transform: translateY(-2px); border-color: var(--acc-line); }
.cat-tile.on { background: var(--acc-soft); border-color: var(--acc-line); box-shadow: 0 10px 30px -14px var(--accent); }
.cat-tile.empty { opacity: .55; }
.cat-emo { font-size: 24px; }
.cat-tile b { font-size: 13px; }
.cat-tile small { font-size: 11px; color: var(--text-3); }
.featured-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(320px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.discover-card { cursor: pointer; }
.discover-card .dc-banner { height: 92px; }
.discover-card.big .dc-banner { height: 140px; opacity: .95; }
.dc-banner.img { background-size: cover; background-position: center; opacity: 1; }
.dc-name { display: flex; align-items: center; gap: 6px; font: 700 17px var(--display); }
.dc-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-desc { margin: 0; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.dc-stats { gap: 8px; }
/* Overlapping member faces: each one ringed in the card color, the first on top, then "+N". */
.av-stack { display: inline-flex; align-items: center; isolation: isolate; padding-left: 2px; }
.av-stack > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-2); border-radius: 50%; position: relative; }
.av-stack > :first-child { margin-left: 0; }
.av-stack > :nth-child(1) { z-index: 6; } .av-stack > :nth-child(2) { z-index: 5; } .av-stack > :nth-child(3) { z-index: 4; }
.av-stack > :nth-child(4) { z-index: 3; } .av-stack > :nth-child(5) { z-index: 2; }
.av-more { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px !important; background: var(--bg-3); color: var(--text-2); font: 700 10px var(--font); }
.dot-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 6px var(--ok); }
.dc-hot { padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, #fb923c 18%, transparent); color: #fdba74; font-weight: 700; }
.dc-joined { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); font: 700 11px var(--font); color: var(--ok); }
.ppm .modal-body { padding: 0; }
.phase-preview-modal { display: grid; gap: 14px; padding: 0 22px 22px; }
.ppm-banner { height: 150px; margin: 0 -22px; background: linear-gradient(135deg, var(--a), var(--b)); background-size: cover; background-position: center; }
.ppm-head { display: flex; align-items: flex-end; gap: 14px; margin-top: -44px; }
.ppm-head h2 { margin: 0 0 2px; font: 700 24px var(--display); }
.ppm-chans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.ppm-chans .side-cat { padding: 0 0 6px; display: block; }
.ppm-chan { display: flex; align-items: center; gap: 6px; padding: 3px 0; color: var(--text-2); font-size: 13.5px; }

/* ---------- toasts / level up ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 65; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 16px; background: var(--glass-3); backdrop-filter: blur(24px); border: 1px solid var(--line-2); box-shadow: 0 20px 60px -20px #000; animation: toastIn .5s var(--spring); }
.toast.out { animation: toastOut .35s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
.toast-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 18px; }
.toast-ic:has(> .badge-art) { background: none; } /* a badge brings its own medal */
.tone-bad .toast-ic { background: color-mix(in srgb, var(--bad) 80%, #000); }
.tone-ok .toast-ic { background: color-mix(in srgb, var(--ok) 70%, #000); }
.toast-txt { display: grid; gap: 1px; flex: 1; min-width: 0; }
.toast-txt b { font-size: 14px; }
.toast-txt span { font-size: 12.5px; color: var(--text-2); }
.toast-act { flex: none; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, .09); font: 600 12.5px var(--font); }
.toast-act:hover { background: rgba(255, 255, 255, .16); }
.levelup { position: fixed; inset: 0; z-index: 66; display: grid; place-content: center; justify-items: center; gap: 16px; animation: fadeIn .3s ease; }
.levelup.out { animation: fadeOut .5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.levelup-ring { width: 180px; height: 180px; border-radius: 50%; display: grid; place-content: center; justify-items: center; background: radial-gradient(circle, rgba(10, 8, 18, .9) 55%, transparent 56%), conic-gradient(var(--accent), var(--accent-2), var(--accent)); box-shadow: 0 0 80px var(--accent); animation: lvlPop .8s var(--spring); }
.levelup-ring small { font: 700 13px var(--font); letter-spacing: .2em; color: var(--text-2); }
.levelup-ring b { font: 700 72px/1 var(--display); }
.levelup p { font: 700 18px var(--display); text-shadow: 0 2px 20px #000; }
@keyframes lvlPop { from { transform: scale(.3) rotate(-90deg); opacity: 0; } }

/* ---------- density ---------- */
[data-density="compact"] .msg { margin-top: 4px; padding-top: 2px; padding-bottom: 2px; }
[data-density="compact"] .msg-row { gap: 10px; }
[data-density="compact"] .msg-row > .av { --s: 28px !important; }
[data-density="compact"] .msg-row > .av .av-in { font-size: 14px !important; }
[data-density="compact"] .msg-gutter-time { width: 28px; }

/* ---------- responsive ---------- */
.drawer-scrim { display: none; }
@media (max-width: 1100px) {
  .shell, .no-members .shell { grid-template-columns: 76px 248px minmax(0, 1fr); }
  .members { position: fixed; right: 8px; top: 8px; bottom: 8px; width: 260px; z-index: 40; transform: translateX(110%); transition: transform .35s var(--ease); opacity: 1 !important; pointer-events: auto !important; }
  .members-open .members { transform: none; }
  .members-open .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .4); }
  .search-box span:not(.ic), .search-box kbd { display: none; }
  .search-box { width: 36px; justify-content: center; padding: 0; }
  .set-side { padding-top: 40px; }
  .settings { grid-template-columns: 220px minmax(0, 1fr); }
  .set-main { grid-column: auto; }
  .set-split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell, .no-members .shell { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .rail, .side { position: fixed; top: 0; bottom: 0; z-index: 41; transform: translateX(-120%); transition: transform .35s var(--ease); }
  .rail { left: 0; width: 76px; background: var(--bg-1); }
  .side { left: 76px; width: min(280px, calc(100vw - 92px)); border-radius: 0 20px 20px 0; background: var(--bg-2); }
  .drawer-open .rail, .drawer-open .side { transform: none; }
  .drawer-open .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); }
  .main { border-radius: 0; border: 0; }
  .drawer-btn { display: inline-grid !important; }
  .topic, .shard-chip { display: none; }
  .main-head { padding: 0 8px; gap: 6px; }
  .home { padding: 16px; }
  .hero { padding: 18px; }
  .hero h1 { font-size: 24px; }
  .streak-orb, .shard-orb, .level-orb { transform: scale(.85); }
  .stage-dock { grid-template-columns: 1fr; justify-items: center; }
  .dock-mode { justify-self: center; }
  .dock-info { justify-items: center; text-align: center; }
  .settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .set-side { padding: 10px 56px 10px 10px; overflow-x: auto; overflow-y: hidden; justify-content: flex-start; }
  .set-nav { width: auto; display: flex; gap: 4px; }
  .set-group { display: none; }
  .set-link { white-space: nowrap; }
  .set-main { grid-column: auto; min-height: 0; }
  .set-body { padding: 20px 16px 60px; }
  .set-close { position: fixed; top: 10px; right: 10px; padding: 0; z-index: 2; }
  .set-close kbd { display: none; }
  .console-grid { grid-template-columns: 1fr; justify-items: center; }
  .msg { padding-left: 12px; padding-right: 12px; }
  .msg-tools { right: 8px; }
  .composer-wrap { padding: 0 8px 8px; }
  .fx-grid { width: min(330px, calc(100vw - 32px)); grid-template-columns: repeat(2, 1fr); }
  .lab-hero { flex-direction: column; text-align: center; }
}

/* ---------- 0.8 · Join a phase ---------- */
.join-wrap { width: min(600px, 100%); }
.join-wrap .modal-body { padding: 0; }
.jm-hero { position: relative; display: flex; align-items: center; gap: 18px; padding: 26px 22px 22px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgba(236, 72, 153, .22), transparent 60%); border-bottom: 1px solid var(--line); }
.jm-hero .icon-btn { position: absolute; top: 12px; right: 12px; }
.jm-hero-copy h2 { font: 800 24px/1.1 var(--display); letter-spacing: -.02em; }
.jm-hero-copy p { margin-top: 6px; color: var(--text-2); font-size: 13.5px; max-width: 380px; }
.jm-orbit { position: relative; flex: none; width: 72px; height: 72px; display: grid; place-items: center; }
.jm-orbit span { font-size: 34px; filter: drop-shadow(0 6px 18px rgba(167, 139, 250, .55)); animation: jmFloat 4s ease-in-out infinite; }
.jm-orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .16); animation: spin 14s linear infinite; }
.jm-orbit i::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px var(--accent); }
.jm-orbit i:nth-child(2) { inset: 10px; animation-duration: 9s; animation-direction: reverse; border-style: solid; border-color: rgba(255, 255, 255, .07); }
.jm-orbit i:nth-child(2)::after { width: 6px; height: 6px; margin-left: -3px; top: -3px; background: #f472b6; box-shadow: 0 0 10px #f472b6; }
.jm-orbit i:nth-child(3) { inset: -8px; animation-duration: 22s; border-color: rgba(255, 255, 255, .05); }
.jm-orbit i:nth-child(3)::after { width: 5px; height: 5px; margin-left: -2.5px; top: -2.5px; background: #38bdf8; box-shadow: 0 0 10px #38bdf8; }
@keyframes jmFloat { 50% { transform: translateY(-4px) rotate(-6deg); } }
.jm-body { display: grid; gap: 12px; padding: 18px 22px 22px; }
.jm-code { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); color: var(--text-3); cursor: text; transition: border-color .2s, box-shadow .25s; }
.jm-code:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); color: var(--text-2); }
.jm-code.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.jm-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 700 17px var(--mono); letter-spacing: .08em; }
.jm-input::placeholder { color: var(--text-3); font: 500 14px var(--font); letter-spacing: 0; }
.jm-preview:empty { display: none; }
.jm-found { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .035); animation: jmIn .4s var(--spring); }
@keyframes jmIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.jm-found-banner { height: 64px; background: linear-gradient(135deg, var(--a), var(--b)); opacity: .8; }
.jm-found-banner.img { background-size: cover; background-position: center; opacity: 1; }
.jm-found-body { display: flex; align-items: flex-end; gap: 14px; padding: 0 16px 14px; }
.jm-found-body .dc-ic { margin-top: -28px; }
.jm-found-body .grow { display: grid; gap: 2px; min-width: 0; padding-bottom: 2px; }
.jm-desc { margin: 4px 0 0; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jm-divider { display: flex; align-items: center; gap: 12px; margin-top: 6px; color: var(--text-3); font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .08em; }
.jm-divider::before, .jm-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.jm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.jm-card { position: relative; display: grid; justify-items: start; gap: 2px; padding: 0 12px 12px; border-radius: 16px; overflow: hidden; text-align: left; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); transition: transform .25s var(--spring), border-color .2s, box-shadow .25s; }
.jm-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--a) 55%, transparent); box-shadow: 0 16px 34px -18px var(--a); }
.jm-card-banner { justify-self: stretch; height: 44px; margin: 0 -12px; background: linear-gradient(135deg, var(--a), var(--b)); opacity: .7; transition: opacity .25s; }
.jm-card-banner.img { background-size: cover; background-position: center; opacity: .9; }
.jm-card:hover .jm-card-banner { opacity: 1; }
.jm-card-ic { position: relative; z-index: 1; margin-top: -20px; padding: 3px; border-radius: 16px; background: var(--bg-2); }
.jm-card b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14.5px var(--display); margin-top: 4px; }
.jm-card-join { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 10px; background: var(--grad); color: #fff; font: 700 12px var(--font); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s var(--spring); }
.jm-card:hover .jm-card-join, .jm-card:focus-visible .jm-card-join { opacity: 1; transform: none; }
.jm-browse { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 12px; color: var(--text-2); font-weight: 600; transition: background .2s, color .2s; }
.jm-browse:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.jm-browse .ic:last-child { transition: transform .25s var(--spring); }
.jm-browse:hover .ic:last-child { transform: translateX(4px); }
@media (max-width: 560px) { .jm-grid { grid-template-columns: 1fr; } .jm-orbit { display: none; } }

/* ---------- 0.8 · Icons: two-tone, gradient when active, a little life on hover ---------- */
.ic .fl { fill: currentColor; fill-opacity: .16; transition: fill-opacity .2s; }
.ic .dot { fill: currentColor; }
.ic svg { transition: transform .35s var(--spring); transform-origin: 50% 50%; overflow: visible; }
:is(button, a, [role="button"], label):hover > .ic .fl, :is(button, a, [role="button"]):focus-visible > .ic .fl { fill-opacity: .3; }
:is(.set-link, .side-link, .chan, .menu-item, .sp-tab, .ftab, .cat-tile, .seg > button).on .ic svg,
:is(.icon-btn.active, .ctl.on) .ic svg { stroke: url(#ic-grad); }
:is(.set-link, .side-link, .chan, .sp-tab, .ftab, .seg > button).on .ic .fl, :is(.icon-btn.active, .ctl.on) .ic .fl { fill: url(#ic-grad); fill-opacity: .35; }
@media (hover: hover) {
  :is(button, a, [role="button"]):hover .ic-settings svg { transform: rotate(75deg); }
  :is(button, a, [role="button"]):hover .ic-refresh svg { transform: rotate(200deg); }
  :is(button, a, [role="button"]):hover .ic-compass svg { transform: rotate(180deg); transition-duration: .7s; }
  :is(button, a, [role="button"]):hover :is(.ic-plus, .ic-x) svg { transform: rotate(90deg); }
  :is(button, a, [role="button"]):hover .ic-search svg { transform: scale(1.12) rotate(-10deg); }
  :is(button, a, [role="button"]):hover :is(.ic-chevronRight, .ic-arrowRight, .ic-logout) svg { transform: translateX(3px); }
  :is(button, a, [role="button"]):hover :is(.ic-chevronDown, .ic-arrowDown, .ic-download) svg { transform: translateY(2px); }
  :is(button, a, [role="button"]):hover .ic-arrowUp svg { transform: translateY(-2px); }
  :is(button, a, [role="button"]):hover .ic-reply svg { transform: translateX(-3px); }
  :is(button, a, [role="button"]):hover :is(.ic-send, .ic-screenShare) svg { transform: translate(2px, -2px); }
  :is(button, a, [role="button"]):hover :is(.ic-link, .ic-tag) svg { transform: rotate(-14deg); }
  :is(button, a, [role="button"]):hover :is(.ic-smile, .ic-smilePlus, .ic-palette) svg { transform: rotate(14deg) scale(1.08); }
  :is(button, a, [role="button"]):hover :is(.ic-image, .ic-camera, .ic-gif, .ic-maximize, .ic-gem, .ic-monitor, .ic-appWindow) svg { transform: scale(1.14); }
  :is(button, a, [role="button"]):hover :is(.ic-crown, .ic-trophy, .ic-mail, .ic-home, .ic-user, .ic-users, .ic-gift, .ic-gift2, .ic-bag) svg { animation: icHop .5s var(--spring); }
  :is(button, a, [role="button"]):hover :is(.ic-bell, .ic-megaphone) svg { animation: icRing .6s ease-in-out; }
  :is(button, a, [role="button"]):hover :is(.ic-trash, .ic-phoneOff, .ic-lock, .ic-bug, .ic-screenShareOff) svg { animation: icShake .45s ease-in-out; }
  :is(button, a, [role="button"]):hover :is(.ic-flame, .ic-zap, .ic-bulb) svg { animation: icFlicker .7s ease-in-out; }
  :is(button, a, [role="button"]):hover :is(.ic-star, .ic-sparkles, .ic-moonstone) svg { animation: icTwinkle .7s var(--spring); }
  :is(button, a, [role="button"]):hover :is(.ic-mic, .ic-volume, .ic-headphones, .ic-ear) svg { animation: icPulse .6s ease-in-out; }
  :is(button, a, [role="button"]):hover :is(.ic-eye, .ic-eyeOff) svg { animation: icBlink .5s ease-in-out; }
  :is(button, a, [role="button"]):hover :is(.ic-edit, .ic-key, .ic-flask, .ic-hash) svg { animation: icWiggle .5s ease-in-out; }
  :is(button, a, [role="button"]):hover .ic-copy svg { transform: translate(-1px, -1px); }
}
@keyframes icHop { 40% { transform: translateY(-3px) scale(1.06); } 70% { transform: translateY(0) scale(.98); } }
@keyframes icRing { 15%, 45%, 75% { transform: rotate(14deg); } 30%, 60% { transform: rotate(-14deg); } }
@keyframes icShake { 20%, 60% { transform: translateX(-2px) rotate(-4deg); } 40%, 80% { transform: translateX(2px) rotate(4deg); } }
@keyframes icFlicker { 25% { transform: scale(1.12) rotate(-4deg); filter: drop-shadow(0 0 4px currentColor); } 50% { transform: scale(.96); } 75% { transform: scale(1.08) rotate(3deg); filter: drop-shadow(0 0 6px currentColor); } }
@keyframes icTwinkle { 40% { transform: rotate(-18deg) scale(1.22); filter: drop-shadow(0 0 6px currentColor); } }
@keyframes icPulse { 35% { transform: scale(1.16); } 65% { transform: scale(.96); } }
@keyframes icBlink { 45% { transform: scaleY(.15); } }
@keyframes icWiggle { 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }

/* ---------- 0.8 · Screen share ---------- */
.sp-modal { width: min(840px, 100%); }
.screen-picker { display: grid; gap: 14px; }
.sp-tabs { display: flex; align-items: center; gap: 6px; }
.sp-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; color: var(--text-2); font-weight: 600; transition: background .2s, color .2s; }
.sp-tab b { min-width: 20px; padding: 1px 6px; border-radius: 8px; background: rgba(255, 255, 255, .07); font: 700 11px var(--font); color: var(--text-3); }
.sp-tab:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.sp-tab.on { background: var(--acc-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--acc-line); }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; max-height: min(46vh, 420px); overflow-y: auto; padding: 4px; margin: -4px; }
.sp-card { display: grid; gap: 8px; padding: 8px; border-radius: 16px; text-align: left; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); transition: transform .25s var(--spring), border-color .2s, box-shadow .25s; }
.sp-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.sp-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--acc-soft), 0 16px 34px -20px var(--accent); }
.sp-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: #000 radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .06), transparent 70%); color: var(--text-3); }
.sp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sp-check { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 4px 12px -2px var(--accent); animation: jmIn .3s var(--spring); }
.sp-label { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; font-weight: 600; }
.sp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-appic { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.sp-chip { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); font: 700 10px var(--font); color: var(--text-2); }
.sp-chip.acc { background: var(--acc-soft); color: var(--text); }
.sp-card.skel .sp-thumb, .sp-card.skel .sp-label { background: linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sp-card.skel .sp-label { height: 14px; border-radius: 6px; }
.sp-opts { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.sp-opt { display: grid; gap: 4px; }
.sp-note { color: var(--text-3); font-size: 12px; padding-left: 2px; }
.sp-note:empty { display: none; }
.sp-browser { display: grid; justify-items: center; gap: 8px; padding: 26px 12px; text-align: center; color: var(--text-2); }
.live-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 7px; background: #e11d48; color: #fff; font: 800 10.5px var(--font); letter-spacing: .06em; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: liveBlink 1.6s ease-in-out infinite; }
@keyframes liveBlink { 50% { opacity: .35; } }
.flag.live { display: inline-flex; align-items: center; gap: 4px; background: #e11d48; color: #fff; border-color: transparent; }
.flag.live i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: liveBlink 1.6s ease-in-out infinite; }
.mini-tag.live { background: #e11d48; color: #fff; }
.tile.streaming { box-shadow: inset 0 0 0 1px rgba(225, 29, 72, .45); }
.tile-watch { position: absolute; right: 12px; top: 12px; z-index: 2; transform: translateY(-3px); display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 11px; background: var(--grad); color: #fff; font: 700 12.5px var(--font); box-shadow: 0 10px 24px -10px var(--accent); opacity: .92; transition: transform .25s var(--spring), opacity .2s; }
.tile:hover .tile-watch, .tile-watch:focus-visible { transform: none; opacity: 1; }
.tile-watch.on { background: rgba(0, 0, 0, .55); box-shadow: none; }
.lobby-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: rgba(225, 29, 72, .12); color: #fecdd3; font-size: 13px; }
.stream-stage { display: grid; gap: 12px; padding: 16px 22px 0; flex: none; }
.stream-stage.count-2 { grid-template-columns: 1fr 1fr; }
.stream-panel { display: grid; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px #000; animation: jmIn .4s var(--spring); }
.stream-screen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; max-height: 56vh; background: #000; }
.stream-screen:fullscreen { max-height: none; aspect-ratio: auto; }
.stream-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.stream-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--text-2); background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .05), transparent 60%); }
.stream-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; background: var(--bg-1); border-top: 1px solid var(--line); }
.stream-who { display: inline-flex; align-items: baseline; gap: 2px; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stream-nosound { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.stream-vol-wrap { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.stream-vol-ic.off { color: var(--bad); }
.stream-vol { width: 96px; accent-color: var(--accent); }
.stage-grid.compact { flex: none; align-content: start; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-top: 12px; padding-bottom: 12px; }
.stage-grid.compact .tile { min-height: 0; padding: 12px; }
.stage-grid.compact .tile .av { --s: 48px !important; width: 48px; height: 48px; }
.stage-grid.compact .tile-rings, .stage-grid.compact .tile-glow { display: none; }
.live-bar { display: flex; align-items: center; gap: 14px; margin: 0 22px 10px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(90deg, rgba(225, 29, 72, .14), rgba(255, 255, 255, .03) 60%); border: 1px solid rgba(225, 29, 72, .3); animation: jmIn .35s var(--spring); }
.live-preview { width: 112px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #000; flex: none; }
.stream-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-copy { display: grid; gap: 3px; min-width: 0; }
.live-copy .row { gap: 8px; }
.live-sound .toggle-row { padding: 0; gap: 10px; }
.share-ctl.on { background: #e11d48 !important; color: #fff; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@media (max-width: 900px) { .stream-stage.count-2 { grid-template-columns: 1fr; } .live-bar { flex-wrap: wrap; } }

/* ---------- 0.8 · Voice room adapts to its own width (members panel open, small windows) ---------- */
.stage { container-type: inline-size; container-name: stage; }
/* While watching a stream, people shrink to slim chips under it. */
.stage-grid.compact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stage-grid.compact .tile { aspect-ratio: auto; min-height: 0; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: 14px; }
.stage-grid.compact .tile .av { --s: 34px !important; width: 34px; height: 34px; }
.stage-grid.compact .tile-flags { position: static; }
.stage-grid.compact .tile-watch { position: static; transform: none; opacity: 1; padding: 4px 9px; font-size: 11.5px; box-shadow: none; }
@container stage (max-width: 760px) {
  .stage-dock { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; }
  .dock-info { justify-items: center; }
  .dock-meta { justify-content: center; }
  .dock-mode { justify-self: center; }
  .stage-grid:not(.compact) { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important; padding: 14px; }
  /* Narrower rooms: a tile's flags go under the name (down in the corner they covered it), and the tile
     grows to fit them. */
  .stage-grid:not(.compact) .tile { aspect-ratio: auto; min-height: 134px; padding: 18px 8px 12px; gap: 8px; align-content: start; }
  .stage-grid:not(.compact) .tile .av { --s: 64px !important; width: 64px; height: 64px; }
  .stage-grid:not(.compact) .tile-rings { top: 50px; } /* centred on the picture (18px down, 64px tall) */
  .stage-grid:not(.compact) .tile-rings i { left: -32px; top: -32px; width: 64px; height: 64px; }
  .stage-grid:not(.compact) .tile.speaking .av { box-shadow: 0 0 0 3px var(--ok), 0 0 10px var(--ok); } /* a glow that fits the smaller tile */
  .stage-grid:not(.compact) .tile-flags { position: static; flex-wrap: wrap; justify-content: center; }
  .stage-grid:not(.compact) .tile-name { max-width: 100%; min-width: 0; }
  .stage-grid:not(.compact) .tile-name .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tile-watch { top: 8px; right: 8px; padding: 5px 9px; font-size: 11.5px; }
  .stream-stage { padding: 12px 12px 0; }
  .stream-stage.count-2 { grid-template-columns: 1fr; }
  .stream-vol { width: 64px; }
  .live-bar { margin: 0 12px 10px; flex-wrap: wrap; }
}
@container stage (max-width: 460px) {
  /* Phones: two narrow tiles per row can't fit an 84px picture and a name in a 16:10 box, so the tile
     grows to fit and the picture gets smaller (nothing cut off at the top or bottom). */
  .stage-grid:not(.compact) .tile { min-height: 120px; }
  .stage-grid:not(.compact) .tile .av { --s: 60px !important; width: 60px; height: 60px; }
  .stage-grid:not(.compact) .tile-rings { top: 48px; }
  .stage-grid:not(.compact) .tile-rings i { left: -30px; top: -30px; width: 60px; height: 60px; }
  .dock-ctl { flex-wrap: wrap; justify-content: center; }
  .stream-who small { display: none; }
  .live-preview { display: none; }
}

/* ---------- 0.8 · Decorations: frames, name styles, banners ---------- */
:root {
  --mask-thorns: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20100%20100%27%3E%3Ccircle%20cx%3D%2750%27%20cy%3D%2750%27%20r%3D%2743%27%20fill%3D%27none%27%20stroke%3D%27%23fff%27%20stroke-width%3D%272.4%27%2F%3E%3Cpath%20d%3D%27M45.56%207.73L50.00%200.00L54.44%207.73Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M62.07%209.25L69.13%203.81L70.28%2012.65Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M76.75%2016.97L85.36%2014.64L83.03%2023.25Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M87.35%2029.72L96.19%2030.87L90.75%2037.93Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M92.27%2045.56L100.00%2050.00L92.27%2054.44Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M90.75%2062.07L96.19%2069.13L87.35%2070.28Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M83.03%2076.75L85.36%2085.36L76.75%2083.03Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M70.28%2087.35L69.13%2096.19L62.07%2090.75Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M54.44%2092.27L50.00%20100.00L45.56%2092.27Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M37.93%2090.75L30.87%2096.19L29.72%2087.35Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M23.25%2083.03L14.64%2085.36L16.97%2076.75Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M12.65%2070.28L3.81%2069.13L9.25%2062.07Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M7.73%2054.44L0.00%2050.00L7.73%2045.56Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M9.25%2037.93L3.81%2030.87L12.65%2029.72Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M16.97%2023.25L14.64%2014.64L23.25%2016.97Z%27%20fill%3D%27%23fff%27%2F%3E%3Cpath%20d%3D%27M29.72%2012.65L30.87%203.81L37.93%209.25Z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E");
  --mask-sakura: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20100%20100%27%3E%3Cellipse%20cx%3D%2750.00%27%20cy%3D%276.50%27%20rx%3D%278%27%20ry%3D%274.6%27%20transform%3D%27rotate(90%2050.00%206.50)%27%20fill%3D%27%23fff%27%2F%3E%3Ccircle%20cx%3D%2772.50%27%20cy%3D%2711.03%27%20r%3D%271.3%27%20fill%3D%27%23fff%27%20opacity%3D%27.85%27%2F%3E%3Cellipse%20cx%3D%2787.67%27%20cy%3D%2728.25%27%20rx%3D%278%27%20ry%3D%274.6%27%20transform%3D%27rotate(150%2087.67%2028.25)%27%20fill%3D%27%23fff%27%2F%3E%3Ccircle%20cx%3D%2795.00%27%20cy%3D%2750.00%27%20r%3D%271.3%27%20fill%3D%27%23fff%27%20opacity%3D%27.85%27%2F%3E%3Cellipse%20cx%3D%2787.67%27%20cy%3D%2771.75%27%20rx%3D%278%27%20ry%3D%274.6%27%20transform%3D%27rotate(210%2087.67%2071.75)%27%20fill%3D%27%23fff%27%2F%3E%3Ccircle%20cx%3D%2772.50%27%20cy%3D%2788.97%27%20r%3D%271.3%27%20fill%3D%27%23fff%27%20opacity%3D%27.85%27%2F%3E%3Cellipse%20cx%3D%2750.00%27%20cy%3D%2793.50%27%20rx%3D%278%27%20ry%3D%274.6%27%20transform%3D%27rotate(270%2050.00%2093.50)%27%20fill%3D%27%23fff%27%2F%3E%3Ccircle%20cx%3D%2727.50%27%20cy%3D%2788.97%27%20r%3D%271.3%27%20fill%3D%27%23fff%27%20opacity%3D%27.85%27%2F%3E%3Cellipse%20cx%3D%2712.33%27%20cy%3D%2771.75%27%20rx%3D%278%27%20ry%3D%274.6%27%20transform%3D%27rotate(330%2012.33%2071.75)%27%20fill%3D%27%23fff%27%2F%3E%3Ccircle%20cx%3D%275.00%27%20cy%3D%2750.00%27%20r%3D%271.3%27%20fill%3D%27%23fff%27%20opacity%3D%27.85%27%2F%3E%3Cellipse%20cx%3D%2712.33%27%20cy%3D%2728.25%27%20rx%3D%278%27%20ry%3D%274.6%27%20transform%3D%27rotate(390%2012.33%2028.25)%27%20fill%3D%27%23fff%27%2F%3E%3Ccircle%20cx%3D%2727.50%27%20cy%3D%2711.03%27%20r%3D%271.3%27%20fill%3D%27%23fff%27%20opacity%3D%27.85%27%2F%3E%3C%2Fsvg%3E");
  --mask-crystal: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20100%20100%27%3E%3Cpath%20d%3D%27M50.00%201.00L62.68%202.67L55.68%206.87Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M55.68%206.87L66.65%209.81L62.68%202.67Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M62.68%202.67L74.50%207.56L66.65%209.81Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M66.65%209.81L76.48%2015.49L74.50%207.56Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M74.50%207.56L84.65%2015.35L76.48%2015.49Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M76.48%2015.49L84.51%2023.52L84.65%2015.35Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M84.65%2015.35L92.44%2025.50L84.51%2023.52Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M84.51%2023.52L90.19%2033.35L92.44%2025.50Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M92.44%2025.50L97.33%2037.32L90.19%2033.35Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M90.19%2033.35L93.13%2044.32L97.33%2037.32Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M97.33%2037.32L99.00%2050.00L93.13%2044.32Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M93.13%2044.32L93.13%2055.68L99.00%2050.00Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M99.00%2050.00L97.33%2062.68L93.13%2055.68Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M93.13%2055.68L90.19%2066.65L97.33%2062.68Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M97.33%2062.68L92.44%2074.50L90.19%2066.65Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M90.19%2066.65L84.51%2076.48L92.44%2074.50Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M92.44%2074.50L84.65%2084.65L84.51%2076.48Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M84.51%2076.48L76.48%2084.51L84.65%2084.65Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M84.65%2084.65L74.50%2092.44L76.48%2084.51Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M76.48%2084.51L66.65%2090.19L74.50%2092.44Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M74.50%2092.44L62.68%2097.33L66.65%2090.19Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M66.65%2090.19L55.68%2093.13L62.68%2097.33Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M62.68%2097.33L50.00%2099.00L55.68%2093.13Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M55.68%2093.13L44.32%2093.13L50.00%2099.00Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M50.00%2099.00L37.32%2097.33L44.32%2093.13Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M44.32%2093.13L33.35%2090.19L37.32%2097.33Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M37.32%2097.33L25.50%2092.44L33.35%2090.19Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M33.35%2090.19L23.52%2084.51L25.50%2092.44Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M25.50%2092.44L15.35%2084.65L23.52%2084.51Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M23.52%2084.51L15.49%2076.48L15.35%2084.65Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M15.35%2084.65L7.56%2074.50L15.49%2076.48Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M15.49%2076.48L9.81%2066.65L7.56%2074.50Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M7.56%2074.50L2.67%2062.68L9.81%2066.65Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M9.81%2066.65L6.87%2055.68L2.67%2062.68Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M2.67%2062.68L1.00%2050.00L6.87%2055.68Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M6.87%2055.68L6.87%2044.32L1.00%2050.00Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M1.00%2050.00L2.67%2037.32L6.87%2044.32Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M6.87%2044.32L9.81%2033.35L2.67%2037.32Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M2.67%2037.32L7.56%2025.50L9.81%2033.35Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M9.81%2033.35L15.49%2023.52L7.56%2025.50Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M7.56%2025.50L15.35%2015.35L15.49%2023.52Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M15.49%2023.52L23.52%2015.49L15.35%2015.35Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M15.35%2015.35L25.50%207.56L23.52%2015.49Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M23.52%2015.49L33.35%209.81L25.50%207.56Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M25.50%207.56L37.32%202.67L33.35%209.81Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3Cpath%20d%3D%27M33.35%209.81L44.32%206.87L37.32%202.67Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.7%27%2F%3E%3Cpath%20d%3D%27M37.32%202.67L50.00%201.00L44.32%206.87Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%270.55%27%2F%3E%3Cpath%20d%3D%27M44.32%206.87L55.68%206.87L50.00%201.00Z%27%20fill%3D%27%23fff%27%20fill-opacity%3D%271%27%2F%3E%3C%2Fsvg%3E");
  --mask-inferno: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20100%20100%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M50.00%205.50%20Q53.21%204.11%2058.60%201.25%20Q63.09%204.34%2065.22%208.18%20Q68.71%207.98%2073.50%209.30%20Q77.92%2011.57%2078.60%2015.91%20Q81.95%2016.91%2087.92%2018.18%20Q89.38%2023.44%2088.54%2027.75%20Q91.34%2029.83%2094.17%2033.93%20Q96.09%2038.51%2093.82%2042.27%20Q95.75%2045.19%2099.50%2050.00%20Q97.24%2054.97%2093.82%2057.73%20Q94.63%2061.13%2094.17%2066.07%20Q92.69%2070.82%2088.54%2072.25%20Q88.14%2075.72%2087.92%2081.82%20Q83.00%2084.17%2078.60%2084.09%20Q77.04%2087.21%2073.50%2090.70%20Q69.32%2093.39%2065.22%2091.82%20Q62.68%2094.22%2058.60%2098.75%20Q53.31%2097.38%2050.00%2094.50%20Q46.79%2095.89%2041.84%2096.29%20Q36.91%2095.66%2034.78%2091.82%20Q31.29%2092.02%2025.25%2092.87%20Q22.08%2088.43%2021.40%2084.09%20Q18.05%2083.09%2014.00%2080.21%20Q10.62%2076.56%2011.46%2072.25%20Q8.66%2070.17%203.49%2066.93%20Q3.91%2061.49%206.18%2057.73%20Q4.25%2054.81%203.00%2050.00%20Q2.76%2045.03%206.18%2042.27%20Q5.37%2038.87%203.49%2033.07%20Q7.31%2029.18%2011.46%2027.75%20Q11.86%2024.28%2014.00%2019.79%20Q17.00%2015.83%2021.40%2015.91%20Q22.96%2012.79%2025.25%207.13%20Q30.68%206.61%2034.78%208.18%20Q37.32%205.78%2041.84%203.71%20Q46.69%202.62%2050.00%205.50%20Z%20M50%207.5a42.5%2042.5%200%201%200%200.01%200Z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E");
}
.av[class*='frame-']::before, .av[class*='frame-']::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none; }
.av[class*='frame-']::after { content: none; }
.av[class*='frame-'] > .av-in { position: relative; z-index: 1; }
.av[class*='frame-'] > .av-img, .av[class*='frame-'] > .av-dot { z-index: 1; }
/* Halo: two rings of light turning opposite ways, with a glow. */
.frame-halo::before { background: conic-gradient(from 0deg, var(--accent), transparent 26%, var(--accent-2) 50%, transparent 76%, var(--accent)); -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2.5px)); mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2.5px)); animation: spin 6s linear infinite; }
.frame-halo::after { content: ''; inset: -9px; border: 1.5px solid color-mix(in srgb, var(--accent-2) 60%, transparent); border-top-color: transparent; border-bottom-color: transparent; box-shadow: 0 0 16px -4px var(--accent); animation: spin 11s linear infinite reverse; }
/* Thorns: a crown of spikes. */
.frame-thorns::before { inset: -9px; background: conic-gradient(from 0deg, color-mix(in srgb, var(--accent-2) 80%, #fff), var(--accent), color-mix(in srgb, var(--accent-2) 80%, #fff)); -webkit-mask: var(--mask-thorns) center / 100% 100% no-repeat; mask: var(--mask-thorns) center / 100% 100% no-repeat; animation: spin 24s linear infinite; filter: drop-shadow(0 0 3px var(--accent)); }
/* Pulse: two ripples like a heartbeat. */
.frame-pulse::before, .frame-pulse::after { content: ''; border: 2px solid var(--accent); animation: ripple 2.4s cubic-bezier(.2, .6, .4, 1) infinite; }
.frame-pulse::after { border-color: var(--accent-2); animation-delay: -1.2s; }
@keyframes ripple { 0% { transform: scale(.94); opacity: .95; } 100% { transform: scale(1.32); opacity: 0; } }
/* Neon: a glowing tube that buzzes now and then. */
.frame-neon::before { inset: -4px; border: 2px solid #f0abfc; box-shadow: 0 0 6px #e879f9, 0 0 14px #c026d3, inset 0 0 6px #e879f9; animation: neonBuzz 5s steps(1) infinite; }
@keyframes neonBuzz { 0%, 86%, 90%, 100% { opacity: 1; } 87%, 89% { opacity: .35; } }
/* Sakura: petals drifting around. */
.frame-sakura::before { inset: -10px; background: linear-gradient(135deg, #fbcfe8, #f472b6); -webkit-mask: var(--mask-sakura) center / 100% 100% no-repeat; mask: var(--mask-sakura) center / 100% 100% no-repeat; animation: spin 16s linear infinite; }
.frame-sakura::after { content: ''; inset: -3px; border: 1px solid rgba(249, 168, 212, .45); box-shadow: 0 0 14px -4px #f472b6; }
/* Orbit: a crescent moon and a star going round. */
.frame-orbit::before { inset: -6px; border: 1px solid rgba(255, 255, 255, .16); background: radial-gradient(circle at 50% 2px, #fff 0 1.6px, transparent 2.4px); animation: spin 7s linear infinite reverse; }
.frame-orbit::after { content: ''; inset: auto; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; box-shadow: inset -4px -1px 0 0 #fde68a; filter: drop-shadow(0 0 4px #fde68a); animation: orbit 4s linear infinite; }
/* Eclipse: a dark ring with a burning corona sweeping round. */
.frame-eclipse::before { inset: -6px; background: conic-gradient(from 0deg, transparent 0 62%, #fff7ed 78%, #fb923c 86%, transparent 96%); -webkit-mask: radial-gradient(circle, transparent calc(50% - 3.5px), #000 calc(50% - 3px)); mask: radial-gradient(circle, transparent calc(50% - 3.5px), #000 calc(50% - 3px)); animation: spin 4.5s linear infinite; }
.frame-eclipse::after { content: ''; inset: -3px; box-shadow: 0 0 0 2px #0b0a12, 0 0 18px -2px rgba(251, 146, 60, .55); }
/* Crystal: a prism ring splitting light into colors. */
.frame-crystal::before { inset: -8px; background: conic-gradient(#f472b6, #fbbf24, #34d399, #38bdf8, #a78bfa, #f472b6); -webkit-mask: var(--mask-crystal) center / 100% 100% no-repeat; mask: var(--mask-crystal) center / 100% 100% no-repeat; animation: spin 14s linear infinite; }
.frame-crystal::after { content: ''; inset: -9px; box-shadow: 0 0 18px -6px #a78bfa, 0 0 18px -8px #38bdf8; }
/* Inferno: fire around the picture. */
.frame-inferno::before { inset: -10px; background: conic-gradient(from 90deg, #f97316, #fde047, #ef4444, #f97316, #fde047, #ef4444, #f97316); -webkit-mask: var(--mask-inferno) center / 100% 100% no-repeat; mask: var(--mask-inferno) center / 100% 100% no-repeat; animation: spin 9s linear infinite, flameFlick 1.1s ease-in-out infinite alternate; }
.frame-inferno::after { content: ''; inset: -4px; box-shadow: 0 0 16px -2px rgba(249, 115, 22, .7), inset 0 0 8px -2px rgba(253, 224, 71, .6); }
@keyframes flameFlick { to { filter: brightness(1.25) saturate(1.2); } }
/* The community's frames (Vault → Community designs): a square picture around the avatar, which sits in
   its middle 73.5% (the picture is 1.36× the avatar). Pictures stand still, so they cost nothing per frame. */
.av.dframe > .av-dframe { position: absolute; left: 50%; top: 50%; width: 136%; height: 136%; max-width: none; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; object-fit: contain; }
.av.dframe > .av-dot { z-index: 3; }
/* Animated frames (a GIF) move where the built-in frames do — profile cards, voice tiles, the Vault — and in
   long lists only while you hover that row. Idle, or under a full-screen panel, they show their still picture
   (a GIF can't be paused, so it's swapped out). */
.av.dframe > .av-dframe.anim, .av.dframe.animated > .av-dframe.still { display: none; }
.av.dframe.animated > .av-dframe.anim { display: block; }
:is(.msgs-scroll, .members-scroll, .side-scroll, .pick-list, .me-panel) .av.dframe.animated > .av-dframe.anim { display: none; }
:is(.msgs-scroll, .members-scroll, .side-scroll, .pick-list, .me-panel) .av.dframe.animated > .av-dframe.still { display: block; }
:is(.msg, .member, .vc-user, .pick-row, .me-id, .chan):hover .av.dframe.animated > .av-dframe.anim { display: block; }
:is(.msg, .member, .vc-user, .pick-row, .me-id, .chan):hover .av.dframe.animated > .av-dframe.still { display: none; }
:is(.app-idle, .overlay-open #root) .av.dframe.animated > .av-dframe.anim { display: none !important; }
:is(.app-idle, .overlay-open #root) .av.dframe.animated > .av-dframe.still { display: block !important; }

/* Name styles */
.uname[class*='ns-'] { display: inline-block; }
.ns-aurora, .ns-ember, .ns-frost, .ns-gold, .ns-galaxy { background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite; }
.ns-aurora { background-image: linear-gradient(90deg, var(--accent), #7dd3fc, var(--accent-2), #a7f3d0, var(--accent)); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 45%, transparent)); }
.ns-ember { background-image: linear-gradient(90deg, #fb923c, #f43f5e, #fde047, #fb923c); animation: shimmer 3s linear infinite, emberGlow 1.6s ease-in-out infinite alternate; }
@keyframes emberGlow { from { filter: drop-shadow(0 0 2px rgba(249, 115, 22, .5)); } to { filter: drop-shadow(0 0 7px rgba(244, 63, 94, .75)); } }
.ns-frost { background-image: linear-gradient(100deg, #7dd3fc 0%, #e0f2fe 35%, #ffffff 45%, #a5f3fc 55%, #38bdf8 100%); animation-duration: 3.5s; filter: drop-shadow(0 0 4px rgba(125, 211, 252, .45)); }
.ns-gold { background-image: linear-gradient(100deg, #b45309 0%, #fbbf24 25%, #fff7d6 40%, #f59e0b 55%, #92400e 100%); animation-duration: 3s; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .4)); }
.ns-galaxy { background-image: radial-gradient(1px 1px at 18% 30%, #fff 60%, transparent), radial-gradient(1px 1px at 62% 70%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 84% 25%, #fff 60%, transparent), linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #22d3ee, #6366f1); background-size: 60px 100%, 80px 100%, 70px 100%, 200% auto; animation: galaxyDrift 8s linear infinite; filter: drop-shadow(0 0 5px rgba(168, 85, 247, .45)); }
@keyframes galaxyDrift { to { background-position: 60px 0, -80px 0, 70px 0, 200% center; } }
.ns-neonsign { color: #fdf4ff; text-shadow: 0 0 2px #fff, 0 0 6px #f0abfc, 0 0 12px #e879f9, 0 0 22px #c026d3; animation: neonBuzz 6s steps(1) infinite; }
.ns-void { color: #ddd6fe; text-shadow: 0 0 1px #000, 0 0 8px rgba(124, 58, 237, .8); animation: voidBreath 3.2s ease-in-out infinite; }
@keyframes voidBreath { 50% { text-shadow: 0 0 1px #000, 0 0 16px rgba(109, 40, 217, 1), 0 0 3px rgba(0, 0, 0, .8); } }
.ns-glitch { position: relative; color: #fff; text-shadow: 1.5px 0 #f43f5e, -1.5px 0 #22d3ee; animation: glitchName 3.5s steps(1) infinite; }
/* The community's name styles: the designer's two or three colors (--c1…--c3); "shine" sweeps them along. */
.ns-d { background-image: linear-gradient(90deg, var(--c1), var(--c2), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c1) 40%, transparent)); }
.ns-d.ns-shine { background-image: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c1)); background-size: 200% auto; animation: shimmer 4s linear infinite; }
@keyframes glitchName { 0%, 90%, 100% { text-shadow: 1.5px 0 #f43f5e, -1.5px 0 #22d3ee; transform: none; } 92% { text-shadow: -3px 0 #f43f5e, 3px 0 #22d3ee; transform: translateX(1px) skewX(-8deg); } 94% { text-shadow: 3px -1px #f43f5e, -3px 1px #22d3ee; transform: translateX(-1px); clip-path: inset(10% 0 45% 0); } 96% { clip-path: none; transform: skewX(6deg); } }

/* Banners: each choice has its own pattern over the colors. */
.pc-banner[class*='bn-'], .banner-swatch[class*='bn-'] { background-blend-mode: soft-light, normal; }
.bn-dusk { background-image: radial-gradient(1.2px 1.2px at 12% 30%, #fff 50%, transparent), radial-gradient(1px 1px at 34% 70%, #fff 50%, transparent), radial-gradient(1.4px 1.4px at 58% 22%, #fff 50%, transparent), radial-gradient(1px 1px at 76% 60%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 90% 35%, #fff 50%, transparent), radial-gradient(circle at 82% 30%, rgba(255, 255, 255, .28) 0 12%, transparent 13%), linear-gradient(135deg, var(--a), var(--b)) !important; background-blend-mode: normal !important; }
.bn-abyss { background-image: radial-gradient(120% 60% at 50% 120%, rgba(255, 255, 255, .34) 0 30%, transparent 31%), radial-gradient(120% 60% at 20% 130%, rgba(255, 255, 255, .24) 0 35%, transparent 36%), radial-gradient(120% 60% at 85% 135%, rgba(255, 255, 255, .2) 0 35%, transparent 36%), radial-gradient(1px 1px at 30% 30%, #fff 50%, transparent), radial-gradient(1px 1px at 70% 20%, #fff 50%, transparent), linear-gradient(160deg, var(--a), var(--b)) !important; background-blend-mode: normal !important; }
.bn-ember { background-image: radial-gradient(2px 2px at 15% 80%, #fde047 50%, transparent), radial-gradient(1.5px 1.5px at 30% 55%, #fdba74 50%, transparent), radial-gradient(2px 2px at 52% 75%, #fde047 50%, transparent), radial-gradient(1.5px 1.5px at 68% 40%, #fdba74 50%, transparent), radial-gradient(2px 2px at 85% 65%, #fde047 50%, transparent), radial-gradient(80% 70% at 50% 120%, rgba(253, 224, 71, .45), transparent 70%), linear-gradient(135deg, var(--a), var(--b)) !important; background-blend-mode: normal !important; }
.bn-sakura { background-image: radial-gradient(ellipse 5px 3px at 14% 30%, rgba(255, 255, 255, .85) 50%, transparent), radial-gradient(ellipse 4px 2.5px at 40% 70%, rgba(255, 255, 255, .7) 50%, transparent), radial-gradient(ellipse 5px 3px at 63% 25%, rgba(255, 255, 255, .8) 50%, transparent), radial-gradient(ellipse 4px 2.5px at 86% 62%, rgba(255, 255, 255, .7) 50%, transparent), radial-gradient(circle at 100% 0, rgba(255, 255, 255, .3), transparent 50%), linear-gradient(135deg, var(--a), var(--b)) !important; background-blend-mode: normal !important; }
.bn-mint { background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px), radial-gradient(circle at 70% 40%, rgba(255, 255, 255, .3), transparent 45%), linear-gradient(135deg, var(--a), var(--b)) !important; background-size: 16px 16px, 16px 16px, auto, auto !important; background-blend-mode: normal !important; }
.bn-gold { background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0) 0 22px, rgba(255, 255, 255, .16) 22px 30px, rgba(255, 255, 255, 0) 30px 52px), radial-gradient(1.6px 1.6px at 20% 40%, #fff 50%, transparent), radial-gradient(1.6px 1.6px at 72% 30%, #fff 50%, transparent), linear-gradient(135deg, var(--a), var(--b)) !important; background-blend-mode: normal !important; }
.bn-mono { background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.5px), linear-gradient(135deg, var(--a), var(--b)) !important; background-size: 7px 7px, auto !important; background-blend-mode: normal !important; }

/* ---------- 0.8 · Motion & graphics (hover or one-shot only: nothing loops while idle) ---------- */
/* A light sweep across cards and primary buttons on hover. */
:is(.discover-card, .vault-item, .jm-card, .tpl-card, .sp-card, .badge-card) { position: relative; overflow: hidden; }
:is(.discover-card, .vault-item, .jm-card, .tpl-card, .sp-card, .badge-card)::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%); transform: translateX(-110%); transition: transform .8s var(--ease); }
:is(.discover-card, .vault-item, .jm-card, .tpl-card, .sp-card, .badge-card):hover::after { transform: translateX(110%); }
.btn.primary { position: relative; overflow: hidden; isolation: isolate; }
.btn.primary::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); }
.btn.primary:hover:not(:disabled)::before { transform: translateX(120%); transition: transform .7s var(--ease); }
/* Pages and settings sections fade in, cards one after another. */
.main-body.enter > .home > *, .set-body.enter > .set-page > * { animation: riseIn .45s var(--ease) both; }
.main-body.enter > .home > :nth-child(2), .set-body.enter > .set-page > :nth-child(2) { animation-delay: .04s; }
.main-body.enter > .home > :nth-child(3), .set-body.enter > .set-page > :nth-child(3) { animation-delay: .08s; }
.main-body.enter > .home > :nth-child(4), .set-body.enter > .set-page > :nth-child(4) { animation-delay: .12s; }
.main-body.enter > .home > :nth-child(n+5), .set-body.enter > .set-page > :nth-child(n+5) { animation-delay: .16s; }
.main-body.enter :is(.discover-grid, .vault-grid, .badge-grid) > * { animation: riseIn .5s var(--ease) both; }
.main-body.enter :is(.discover-grid, .vault-grid, .badge-grid) > :nth-child(2) { animation-delay: .03s; }
.main-body.enter :is(.discover-grid, .vault-grid, .badge-grid) > :nth-child(3) { animation-delay: .06s; }
.main-body.enter :is(.discover-grid, .vault-grid, .badge-grid) > :nth-child(4) { animation-delay: .09s; }
.main-body.enter :is(.discover-grid, .vault-grid, .badge-grid) > :nth-child(n+5) { animation-delay: .12s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } }
/* Unread badges pop in; the rail icons lift. */
.rail-badge { animation: badgePop .5s var(--spring); }
@keyframes badgePop { from { transform: scale(0); } 60% { transform: scale(1.25); } }
.rail-btn { transition: transform .25s var(--spring), border-radius .25s var(--ease), box-shadow .25s; }
.rail-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px var(--accent); }
/* Messages: an accent bar slides in on hover. */
.msg::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--grad); transform: scaleY(0); transition: transform .25s var(--ease); }
.msg:hover::before { transform: scaleY(1); }
.msg.mentioned::before { transform: scaleY(1); background: var(--warn); }
/* Empty states: the icon floats in on a soft halo. */
.empty > .ic:first-child { position: relative; padding: 16px; border-radius: 50%; background: radial-gradient(circle, var(--acc-soft), transparent 70%); animation: riseIn .6s var(--spring) both, floatOnce 2.4s ease-in-out .6s 2; }
@keyframes floatOnce { 50% { transform: translateY(-5px); } }
/* Switches: the knob squishes as it slides. */
.switch input:active + i::after { width: 24px; }
.switch input:checked:active + i::after { transform: translateX(14px); }
/* A fine grain over the whole app so gradients don't band. Static, so it costs nothing per frame. */
#app::after { content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- 0.8 · Idle: looping decoration pauses when Regret isn't being looked at (fx.js) ---------- */
.app-idle :is(.bg-aurora i, .flame, .badge-card.got .badge-big, .lobby-orb, .live-dot, .lab-hero-art i, .pulse-dot, .splash .logo-mark, .jm-orbit span, .jm-orbit i, .uname[class*='ns-'], .tile.speaking .tile-rings i, .live-pill i, .flag.live i, .dots i),
.app-idle :is(.wordmark, .av[class*='frame-'])::before, .app-idle :is(.wordmark, .av[class*='frame-'])::after { animation-play-state: paused !important; }

/* While a full-screen panel (Settings, Phase settings) covers the app, the background behind it stops. */
.overlay-open .bg-aurora i { animation-play-state: paused !important; }
.app-idle .live-dot::after, .overlay-open .wordmark::before, .overlay-open .wordmark::after { animation-play-state: paused !important; }
/* In long lists (chat, member list, sidebar, pickers) avatar frames and animated names hold still until
   you hover that row, like Discord: a busy channel shouldn't keep the GPU redrawing. Profile cards,
   voice tiles and the Vault animate fully. */
:is(.msgs-scroll, .members-scroll, .side-scroll, .pick-list, .me-panel) .av[class*='frame-']::before,
:is(.msgs-scroll, .members-scroll, .side-scroll, .pick-list, .me-panel) .av[class*='frame-']::after,
:is(.msgs-scroll, .members-scroll, .side-scroll, .pick-list, .me-panel) .uname[class*='ns-'] { animation-play-state: paused; }
:is(.msg, .member, .vc-user, .pick-row, .me-id, .chan):hover .av[class*='frame-']::before,
:is(.msg, .member, .vc-user, .pick-row, .me-id, .chan):hover .av[class*='frame-']::after,
:is(.msg, .member, .vc-user, .pick-row, .me-id, .chan):hover .uname[class*='ns-'] { animation-play-state: running; }
/* ---------- 0.8.1 · Phones & touch ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; } /* no pull-to-refresh reloading the app mid-chat */
button, [role="button"], a, label, .chan, .member { touch-action: manipulation; } /* no double-tap-zoom delay */
@media (pointer: coarse) {
  #app { bottom: auto; height: var(--app-h, 100%); } /* follows the on-screen keyboard (app.js) */
  input, textarea, select { font-size: 16px !important; } /* iPhones zoom the whole page into smaller fields */
}
@media (hover: none) {
  /* What appears on hover with a mouse appears on tap (or always) with a finger. */
  .msg:hover .msg-tools { opacity: 0; transform: translateY(4px) scale(.96); pointer-events: none; }
  .msg.touch-open .msg-tools { opacity: 1; transform: none; pointer-events: auto; }
  .msg.touch-open { background: rgba(255, 255, 255, .035); }
  .msg.touch-open .react-chip.add { opacity: 1; }
  .msg:hover::before { transform: scaleY(0); }
  .msg.touch-open::before { transform: scaleY(1); }
  .chan-opt { display: none; } /* long-press the channel instead */
  .jm-card-join, .tile-watch { opacity: 1; transform: none; }
  /* No hover lifts stuck on after a tap. */
  .discover-card:hover, .vault-item:hover, .jm-card:hover, .sp-card:hover, .rail-btn:hover, .btn.primary:hover:not(:disabled) { transform: none; }
  :is(.discover-card, .vault-item, .jm-card, .tpl-card, .sp-card, .badge-card)::after { display: none; }
}
@media (max-width: 760px) {
  .side { transform: translateX(calc(-100% - 100px)); } /* fully off-screen (it starts 76px in) */
  /* Notches and the home bar */
  .shell { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .composer-wrap { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .rail, .side { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .set-close { top: calc(10px + env(safe-area-inset-top)); }
  .set-side { padding-top: calc(10px + env(safe-area-inset-top)); }
  #toasts { left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom)); justify-items: stretch; }
  #toasts .toast { max-width: none; min-width: 0; }
  /* Dialogs slide up from the bottom on a solid sheet, like a phone app. */
  .scrim { place-items: end center; padding: 0; }
  .modal, .modal.sm, .modal.md, .modal.xl, .join-wrap, .sp-modal { width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; max-height: calc(var(--app-h, 100dvh) - 20px); background: var(--bg-2); backdrop-filter: none; transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom); }
  .scrim.in .modal { transform: none; }
  .modal-head { padding: 18px 18px 6px; }
  .modal-body { padding: 8px 16px 18px; }
  .join-wrap .modal-body { padding: 0; }
  /* More room to type: the phone keyboard has its own emoji. */
  .composer-row .emoji-btn { display: none; }
  .comp-btn { width: 36px; height: 36px; }
  /* While you type, the GIF / sticker / voice buttons step aside so the text has room. */
  .composer.typing .composer-row :is(.gif-btn, .sticker-btn, .mic-btn, .fx-btn) { display: none; }
  /* Popovers fit the screen. */
  .popover { max-width: calc(100vw - 16px); }
  .profile-card { width: min(320px, calc(100vw - 16px)); }
  .gif-pop, .emoji-pop { width: calc(100vw - 24px); }
  /* Discover & Home */
  .discover-hero { padding: 22px 18px; }
  .dh-side { width: 100%; }
  .featured-row { grid-auto-columns: minmax(260px, 86%); }
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 0.9 · Profiles: card color, phase pictures, badge picker ---------- */
/* Someone's card color: mixed with the app's dark so light text stays readable whatever they pick. */
:is(.profile-card, .profile-preview, .dm-profile).carded { background: linear-gradient(180deg, color-mix(in srgb, var(--cc1) 46%, #0c0a13), color-mix(in srgb, var(--cc2) 30%, #0c0a13) 85%); }
.carded .pc-av { background: color-mix(in srgb, var(--cc1) 46%, #0c0a13); }
.carded .pc-av .av-dot { border-color: color-mix(in srgb, var(--cc1) 46%, #0c0a13); }
.carded :is(.pc-bio, .pc-stats div, .pc-status) { background: rgba(0, 0, 0, .22); }
.phase-ic.has-img { background: var(--bg-3); overflow: hidden; }
.phase-ic.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-picker { display: grid; gap: 4px; }
.badge-pick { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); transition: opacity .2s; }
.badge-pick.off { opacity: .5; }
.badge-pick .badge { flex: none; }
.badge-pick.off .badge-art { filter: grayscale(.85); }
.badge-pick-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.badge-pick-txt b { font-size: 13.5px; }
.badge-pick-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.badge-pick .icon-btn { width: 30px; height: 30px; }
.badge-pick:first-child .bp-move:nth-of-type(1), .badge-pick:last-child .bp-move:nth-of-type(2) { visibility: hidden; } /* up on the first, down on the last */

/* ---------- 0.9.1 · Screen share zoom ---------- */
/* One finger still scrolls the page until you zoom in; then it moves the picture instead. */
.stream-screen { overflow: hidden; touch-action: pan-y; cursor: zoom-in; }
.stream-screen.zoomed { touch-action: none; cursor: grab; }
.stream-screen.zoomed:active { cursor: grabbing; }
.stream-video { transform-origin: 0 0; }
.stream-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.stream-zoom .zoom-btn { width: 28px; height: 28px; border-radius: 8px; }
.stream-zoom-reset { min-width: 38px; height: 28px; padding: 0 6px; border-radius: 8px; font: 700 12px var(--font); color: var(--text-2); }
.stream-zoom.on .stream-zoom-reset { color: var(--text); background: var(--acc-soft); }
@media (max-width: 560px) { .stream-zoom .zoom-btn { display: none; } } /* phones pinch instead */

/* ---------- 0.9.1 · Phones in voice: voice bar, hold to talk ---------- */
.m-voicebar { display: none; }
.ptt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); color: var(--text); font: 700 13px var(--font); touch-action: none; transition: background .15s, color .15s, transform .15s; }
.ptt-btn:hover { background: rgba(255, 255, 255, .14); }
.ptt-btn.down { background: color-mix(in srgb, var(--ok) 26%, transparent); color: var(--ok); transform: scale(.97); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ok) 55%, transparent); }
.ctl.ctl-ptt { width: auto; }
@media (max-width: 760px) {
  /* Under the drawers (z 40+), above the chat. */
  .m-voicebar.on { position: fixed; z-index: 38; top: calc(env(safe-area-inset-top) + 62px); left: 10px; right: 10px; display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 13%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); box-shadow: 0 14px 30px -14px #000; animation: riseIn .3s var(--ease); }
  .mvb-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; color: var(--ok); font: 700 13px var(--font); text-align: left; }
  .mvb-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-voicebar .icon-btn { width: 38px; height: 38px; }
  .m-voicebar .ptt-btn { height: 38px; padding: 0 10px; border-radius: 12px; font-size: 12px; }
  :has(> .m-voicebar.on) .msgs-scroll, :has(> .m-voicebar.on) .main-body.scroll { padding-top: 54px; } /* nothing hides under the bar */
}
/* Streams never push the room wider than the screen: the panel shrinks, and on phones the bar sheds extras. */
.stream-stage { grid-template-columns: minmax(0, 1fr); }
.stream-stage.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stream-panel, .stream-bar { min-width: 0; }
.stream-who { flex: 0 1 auto; }
@media (max-width: 560px) {
  .stream-stage.count-2 { grid-template-columns: minmax(0, 1fr); }
  .stream-bar { gap: 6px; padding: 6px 6px 6px 10px; }
  .stream-bar > .av, .stream-nosound span, .stream-who small { display: none; }
  .stream-bar .icon-btn { width: 32px; height: 32px; }
}

/* ---------- 0.10 · Regret Premium & files ---------- */
.role-chip.custom-badge { gap: 4px; background: color-mix(in srgb, var(--cb) 24%, transparent); color: color-mix(in srgb, var(--cb) 55%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cb) 40%, transparent); letter-spacing: .02em; text-transform: none; font-size: 10.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-chip.custom-badge .cb-emo { font-size: 11px; line-height: 1; }
.locked-perk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-2); }
.premium-hero { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 22px 26px; border-radius: 22px; background: linear-gradient(160deg, color-mix(in srgb, #f5c451 16%, var(--bg-2)), var(--bg-2) 60%); border: 1px solid color-mix(in srgb, #f5c451 30%, transparent); }
.premium-hero h1 { font-size: 30px; }
.premium-hero p { max-width: 460px; color: var(--text-2); }
.ph-glow { position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, #f5c451 30%, transparent), transparent 60%); pointer-events: none; }
.ph-badge { position: relative; width: 72px; height: 72px; display: grid; place-items: center; }
.ph-badge .badge-art svg { filter: drop-shadow(0 8px 14px rgba(245, 196, 81, .35)); }
.ph-price { position: relative; display: flex; align-items: baseline; gap: 4px; }
.ph-price b { font: 700 34px var(--display); }
.ph-price span { color: var(--text-3); }
.premium-hero .btn { position: relative; }
.premium-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 16px 0 12px; }
.pp-card { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.pp-card > .ic { color: #f5c451; }
.file-wrap { display: grid; gap: 6px; max-width: min(420px, 100%); margin-top: 4px; }
.file-card { display: flex; align-items: center; gap: 10px; padding: 9px 8px 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); min-width: 0; }
.file-card > .ic { color: var(--accent); }
.file-card.gone { opacity: .6; max-width: min(420px, 100%); margin-top: 4px; }
.file-txt { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.file-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-txt small { font-size: 12px; }
.file-video { width: 100%; max-height: 320px; border-radius: 12px; background: #000; }
.file-audio { width: 100%; }
.file-bit { align-items: center; }
.file-bit-txt { flex: 1; min-width: 0; display: grid; gap: 3px; line-height: 1.25; }
.file-bit-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-bar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.file-bar > i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transition: transform .2s; }

/* ---------- 0.10.1 · Phones: home-screen install, finger-sized buttons, safe areas ---------- */
.install-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(135deg, var(--acc-soft), rgba(255, 255, 255, .02)); }
.install-card .grow { display: grid; gap: 2px; min-width: 180px; }
.ic-art img { display: block; border-radius: 14px; box-shadow: 0 12px 26px -12px var(--accent); }
.install-btns { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.install-how { display: grid; gap: 12px; }
.ih-step { display: flex; gap: 12px; align-items: flex-start; }
.ih-step > div { display: grid; gap: 2px; }
.ih-n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-size: 13px; }
@media (pointer: coarse) {
  /* Finger-sized: message actions, small segmented switches and small buttons. */
  .msg-tools .tool { width: 36px; height: 36px; }
  .seg-sm > button, .btn.sm { min-height: 36px; }
  .react-chip { min-height: 30px; }
  /* Installed on a phone held sideways (or a tablet): keep clear of the notch and the home bar. */
  .shell { padding-left: env(safe-area-inset-left); padding-right: max(8px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* ---------- 0.12 · Search ---------- */
.search-modal .modal-body { display: flex; flex-direction: column; min-height: 0; }
.search-pop { display: flex; flex-direction: column; min-height: 0; max-height: min(72vh, 680px); }
.search-scope { padding: 10px 14px 2px; }
.search-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.search-list { display: grid; gap: 2px; }
.search-hit { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--text-2); }
.search-hit:hover, .search-hit:focus-visible { background: var(--acc-soft); }
.sh-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sh-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sh-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-head time { margin-left: auto; flex: none; font-size: 11.5px; }
.sh-text { color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.sh-text mark { background: var(--acc-soft); color: var(--text); border-radius: 4px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--accent); }
.search-wait { padding: 18px; text-align: center; }
.search-more { padding: 6px 0 2px; }

/* Polls */
.poll { margin-top: 6px; max-width: 440px; display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, rgba(20, 18, 30, .9)), rgba(20, 18, 30, .9)); border: 1px solid var(--acc-line); }
.poll-q { display: block; font: 700 16px var(--display); overflow-wrap: anywhere; }
.poll-answers { display: grid; gap: 6px; }
.poll-a { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-align: left; color: var(--text); transition: border-color .2s, background .2s; }
.poll-a:hover:not(:disabled) { border-color: var(--acc-line); background: rgba(255, 255, 255, .07); }
.poll-a:disabled { cursor: default; }
.poll-fill { position: absolute; inset: 0; background: var(--acc-soft); transform-origin: 0 50%; transition: transform .45s var(--spring); pointer-events: none; }
.poll-a.mine { border-color: var(--accent); }
.poll-a.mine .poll-fill { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.poll-a.win { border-color: var(--ok); }
.poll-check { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.poll.multi .poll-check { border-radius: 6px; }
.poll-a.mine .poll-check { background: var(--grad); border-color: transparent; }
.poll-txt { position: relative; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.poll-n { position: relative; flex: none; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.poll-edit { display: grid; gap: 8px; }
.poll-edit-row { display: flex; gap: 6px; align-items: center; }
.poll-edit-row .input { flex: 1; min-width: 0; }

/* A phase's own emoji */
.cemoji { display: inline-block; width: 1.375em; height: 1.375em; object-fit: contain; vertical-align: -.3em; }
.msg-text.jumbo .cemoji { width: 48px; height: 48px; vertical-align: middle; }
.react-emo .cemoji { width: 18px; height: 18px; vertical-align: -4px; }
.emoji-btn.custom img { width: 26px; height: 26px; object-fit: contain; }
.slash-item .cemoji, .sugg-emo { width: 22px; height: 22px; font-size: 18px; line-height: 22px; text-align: center; flex: none; }
@media (max-width: 760px) { .composer.own-emoji .composer-row .emoji-btn { display: inline-grid; } } /* the phone keyboard can't type these */
.emoji-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.emoji-tile { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.emoji-tile img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.emoji-tile code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; color: var(--text-2); }
.emoji-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.emoji-add .input { flex: 1; min-width: 160px; }
.emoji-add-preview { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .04); border: 1px dashed var(--line-2); flex: none; }
.emoji-add-preview img { width: 32px; height: 32px; object-fit: contain; }

/* ---------- 0.13 · Events, soundboard, watch together ---------- */
.event-strip { display: flex; align-items: center; gap: 10px; width: calc(100% - 16px); margin: 6px 8px 2px; padding: 9px 12px; border-radius: 12px; text-align: left; color: var(--text-2); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.event-strip:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.event-strip.empty { padding: 7px 12px; }
.event-strip.empty small { margin-left: auto; }
.event-strip.live { border-color: var(--acc-line); background: linear-gradient(135deg, var(--acc-soft), rgba(255, 255, 255, .02)); }
.es-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.es-txt b, .es-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-txt b { font-size: 13.5px; color: var(--text); }
.es-more { flex: none; padding: 1px 7px; border-radius: 99px; background: var(--acc-soft); color: var(--text); font-size: 11.5px; }
.ev-list { display: grid; gap: 10px; }
.ev-card { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.ev-card.live, .ev-chat.live { border-color: var(--acc-line); box-shadow: 0 16px 40px -24px var(--accent); }
.ev-date { flex: none; width: 52px; height: 58px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: var(--acc-soft); border: 1px solid var(--acc-line); line-height: 1.05; }
.ev-date small { font: 700 10px var(--font); letter-spacing: .08em; color: var(--accent-2); }
.ev-date b { font: 700 21px var(--display); }
.ev-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ev-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ev-title { font: 700 16px var(--display); overflow-wrap: anywhere; }
.ev-soon { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.ev-soon.live { color: var(--accent); font-weight: 700; }
.ev-desc { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.ev-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ev-faces { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ev-stack { display: flex; }
.ev-stack .av { margin-right: -6px; box-shadow: 0 0 0 2px var(--bg-2); border-radius: 50%; }
.ev-stack:not(:empty) { margin-right: 6px; }
.ev-rsvp { display: flex; gap: 6px; }
.ev-chat { margin-top: 6px; max-width: 440px; display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, rgba(20, 18, 30, .9)), rgba(20, 18, 30, .9)); border: 1px solid var(--acc-line); }
.ev-chat.gone { display: flex; align-items: center; gap: 10px; opacity: .8; }
.ev-chat .gw-top small.muted { display: block; }
.ev-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-when .field { margin: 0; }
.ev-form .field { margin: 10px 0; }
@media (max-width: 560px) { .ev-card { gap: 10px; padding: 12px; } .ev-date { width: 44px; height: 52px; } .ev-foot .ev-rsvp { margin-left: auto; } }

/* The desktop app's title bar: Regret's own colors instead of Windows' grey, fading into the app below.
   You drag the window by it; Windows draws its buttons on the right, tinted to match. */
.titlebar { position: fixed; top: 0; left: 0; right: 0; height: var(--frame); z-index: 80; display: flex; align-items: center; gap: 8px; padding-left: 14px; background: var(--frame-bg); color: var(--text-3); font: 600 12.5px var(--font); letter-spacing: .02em; -webkit-app-region: drag; animation: fadeIn .5s ease both; transition: background .7s ease; }
.titlebar::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: linear-gradient(var(--frame-bg), transparent); pointer-events: none; transition: background .7s ease; }
.titlebar .logo-mark { opacity: .85; }
.seg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
/* Dragging phases on the rail */
.rail.reordering .rail-item:not(.dragging) { transition: transform .18s var(--ease); }
.rail-item.dragging { position: relative; z-index: 3; }
.rail-item.dragging .rail-btn { box-shadow: 0 12px 20px -10px #000, 0 0 0 2px var(--acc-line); cursor: grabbing; }
.rail.reordering .tooltip, .rail.reordering .rail-badge { display: none; }
.members-more { display: block; width: calc(100% - 16px); margin: 6px 8px 12px; padding: 8px; border-radius: 10px; color: var(--text-2); font-size: 13px; background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-2); }
.members-more:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

/* Soundboard */
.sb-pop { width: min(360px, calc(100vw - 24px)); padding: 10px; display: grid; gap: 8px; }
.sb-watch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-align: left; background: linear-gradient(135deg, var(--acc-soft), rgba(255, 255, 255, .02)); border: 1px solid var(--acc-line); }
.sb-watch span { display: grid; gap: 1px; }
.sb-watch:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), rgba(255, 255, 255, .04)); }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.sb-tile { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: transform .15s var(--spring), background .15s; min-width: 0; }
.sb-tile small { font-size: 11.5px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-tile:hover { background: rgba(255, 255, 255, .08); transform: translateY(-1px); }
.sb-tile.sent { transform: scale(.94); background: var(--acc-soft); }
.sb-emo { font-size: 22px; line-height: 1.1; }
.sb-foot { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.sb-vol { flex: 1; min-width: 0; accent-color: var(--accent); }
.sb-emo-in { flex: 0 0 64px !important; min-width: 0 !important; text-align: center; font-size: 18px; }
.sound-note { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: rgba(8, 7, 13, .78); border: 1px solid var(--line-2); backdrop-filter: blur(12px); font-size: 13px; white-space: nowrap; pointer-events: none; animation: noteIn 2.6s ease both; }
@keyframes noteIn { 0% { opacity: 0; transform: translate(-50%, -8px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -4px); } }

/* One person in voice, for you only (right-click / long-press them) */
.vp-pop { width: min(300px, calc(100vw - 24px)); padding: 12px; display: grid; gap: 10px; }
.vp-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vp-who { display: grid; gap: 1px; min-width: 0; }
.vp-who .uname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-vol { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: -4px; }
.vp-lbl { display: inline-flex; align-items: center; gap: 6px; }
.vp-pct { color: var(--text); font-variant-numeric: tabular-nums; }
.vp-pop .range { width: 100%; }
.vp-pop .toggle-row { padding: 6px 2px; }
.vp-foot { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.vc-user { cursor: default; }
.vc-mine { display: inline-flex; }

/* ---------- 0.15 · Designer decorations (designers.js) ---------- */
/* The Regret bot in chat */
.bot-av { display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 34%, #15121f), #0c0a13 75%); border: 1px solid var(--acc-line); }
.bot-av .logo-mark { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 55%, transparent)); }
.bot-name { font-weight: 700; color: var(--text); }
.bot-chip { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 6px; font: 800 9.5px var(--font); letter-spacing: .08em; color: #fff; background: var(--accent); }
/* The card in #designer-applications */
.ds-card { margin-top: 8px; max-width: 540px; display: grid; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, rgba(20, 18, 30, .92)), rgba(20, 18, 30, .92)); border: 1px solid var(--acc-line); }
.ds-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-kind { display: grid; justify-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: border-color .15s, background .15s; min-width: 0; }
.ds-kind:hover { border-color: var(--acc-line); background: rgba(255, 255, 255, .07); }
.ds-kind small { font-size: 12px; }
.ds-kind-art { height: 58px; display: grid; place-items: center; font: 700 18px var(--display); max-width: 100%; overflow: hidden; }
.ds-ring { display: grid; place-items: center; padding: 6px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--accent-2) 70%, transparent); }
.ds-rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.ds-card-foot { display: flex; flex-wrap: wrap; gap: 8px; }
/* Sending one in */
.modal.ds-modal { width: min(720px, 100%); }
.ds-submit { display: grid; gap: 12px; }
.ds-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ds-split .field { margin: 0; }
.ds-preview { display: grid; gap: 12px; padding: 18px 14px; border-radius: 16px; background: radial-gradient(circle at 50% 25%, var(--acc-soft), rgba(0, 0, 0, .25)); border: 1px solid var(--line); min-height: 220px; align-content: center; }
.ds-preview-big { display: grid; place-items: center; min-height: 140px; }
.ds-preview-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); min-width: 0; }
.ds-preview-msg { display: grid; gap: 1px; min-width: 0; }
.ds-preview-msg .uname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ds-preview-empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--text-3); }
.ds-colors .color-in { width: 44px; height: 34px; }
/* Lists: your designs, decided ones */
.ds-list { display: grid; gap: 6px; }
.ds-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.ds-row-art { flex: none; width: 76px; display: grid; place-items: center; min-height: 60px; overflow: hidden; }
.ds-row-art .vault-name { font-size: 15px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-row-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ds-row-txt b { overflow-wrap: anywhere; }
.ds-note { display: flex; gap: 5px; align-items: flex-start; color: var(--text-2); overflow-wrap: anywhere; }
.ds-status { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, .07); justify-self: start; }
.ds-status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.ds-status.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.ds-status.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
/* The AI check on a frame (team only) */
.ds-ai { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ds-ai > .row { gap: 8px; }
.ds-ai.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.ds-ai.bad > .row b, .ds-ai.bad > .row .ic { color: var(--bad); }
.ds-ai.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.ds-ai.warn > .row b, .ds-ai.warn > .row .ic { color: var(--warn); }
.ds-ai.ok > .row b, .ds-ai.ok > .row .ic { color: var(--ok); }
.ds-ai-tags { margin: 2px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
/* "Created by @name" */
.ds-credit { color: var(--text-3); font-size: 12px; }
.ds-by { color: var(--accent-2); font-weight: 700; padding: 0; background: none; border: 0; font-size: inherit; cursor: pointer; }
.ds-by:hover { text-decoration: underline; }
/* The Vault */
.ds-vault { display: grid; gap: 4px; }
.ds-vault .section-head { flex-wrap: wrap; margin: 8px 0 0; }
.ds-sub { margin: 0 0 10px; font-size: 13px; }
.ds-empty { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.ds-empty > span { display: grid; gap: 2px; }
.vault-item .vault-preview .av.dframe { margin: 8px; }
/* The team's review */
.ds-review { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: start; }
.ds-review-art { display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 170px; padding: 24px 8px; border-radius: 14px; background: radial-gradient(circle at 50% 30%, var(--acc-soft), rgba(0, 0, 0, .25)); overflow: hidden; }
.ds-review-art .vault-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.ds-review-form .field { margin: 0; }
.ds-head { margin-top: 14px; }
.ds-top { margin: 10px 0 12px; }
.ds-foot { padding-bottom: 8px; } /* the last buttons' glow stays inside the scrolling dialog */
@media (max-width: 640px) {
  .ds-split, .ds-review { grid-template-columns: minmax(0, 1fr); }
  .ds-review-art { min-height: 0; grid-auto-flow: column; justify-content: center; align-items: center; }
  .ds-kinds { grid-template-columns: minmax(0, 1fr); }
}

/* Watch together */
.watch-host { flex: none; display: none; padding: 14px 22px 0; }
.watch-host.on { display: block; }
.watch-panel { max-width: 960px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 24px 60px -30px #000; }
.watch-screen { position: relative; aspect-ratio: 16 / 9; max-height: 52vh; margin: 0 auto; background: #000; }
.watch-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.watch-shield { position: absolute; inset: 0; cursor: pointer; }
.watch-tap { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: rgba(0, 0, 0, .55); color: #fff; }
.watch-tap[hidden] { display: none; }
.watch-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(12, 10, 19, .95); min-width: 0; }
.watch-time { font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.watch-seek { flex: 1; min-width: 60px; accent-color: var(--accent); }
.watch-vol-wrap { display: flex; align-items: center; gap: 6px; color: var(--text-2); flex: none; }
.watch-vol { width: 80px; accent-color: var(--accent); }
.watch-who { display: grid; min-width: 0; max-width: 220px; line-height: 1.2; }
.watch-who b, .watch-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-who b { font-size: 13px; }
@media (max-width: 760px) {
  .watch-host { padding: 8px 8px 0; }
  .watch-bar { flex-wrap: wrap; row-gap: 4px; }
  .watch-who { order: -1; flex: 1 0 100%; max-width: none; }
  .watch-vol-wrap { display: none; } /* phones: the side buttons set the volume */
}
@media (max-width: 760px) {
  .search-modal { align-self: stretch; margin-top: 20px; }
  .search-pop { max-height: none; height: calc(var(--app-h, 100dvh) - 40px - env(safe-area-inset-bottom)); }
  .sh-head { flex-wrap: wrap; row-gap: 0; }
  .sh-head time { margin-left: 0; }
}

/* ---------- 0.14 · friends online, birthdays, saved messages ---------- */
.fn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 4px 4px 2px; border-radius: 12px; transition: background .15s; }
.fn-row:hover { background: rgba(255, 255, 255, .035); }
/* (a long button drops under the name on narrow screens instead of squeezing it) */
.fn-who { display: flex; align-items: center; gap: 10px; flex: 1 1 150px; min-width: 0; padding: 3px 4px; border-radius: 10px; text-align: left; }
.fn-row > .btn { margin-left: auto; }
.fn-txt { display: grid; min-width: 0; line-height: 1.25; }
.fn-txt .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.friends-now > .btn { margin-top: 8px; }
.bday-card .section-head .ic { color: #f9a8d4; }
.bday-card.mine { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, color-mix(in srgb, #f472b6 16%, transparent), color-mix(in srgb, #a855f7 10%, transparent)); border-color: color-mix(in srgb, #f472b6 35%, transparent); }
.bday-card.mine h3 { font-size: 17px; margin-bottom: 4px; }
.bday-card.mine .badge-art { animation: hop 1.8s var(--spring) infinite alternate; }
.bday-row { flex-wrap: wrap; }
.bday-row select.bday-m { flex: 1 1 150px; min-width: 0; }
.bday-row select.bday-d { flex: 0 1 96px; min-width: 0; }
.pc-bday { white-space: nowrap; }
.pc-bday .ic { vertical-align: -2px; color: #f9a8d4; }
.saved-list { display: grid; gap: 10px; margin-top: 14px; }
.saved-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; }
.saved-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.saved-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.saved-head small, .saved-head time { font-size: 12px; }
.saved-text { margin: 0; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.saved-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.saved-empty { margin-top: 14px; }
.saved-empty .ic { color: var(--accent); }
.app-idle .bday-card.mine .badge-art { animation-play-state: paused; }
@media (max-width: 760px) {
  .saved-row { flex-wrap: wrap; }
  .saved-actions { width: 100%; justify-content: flex-end; }
  .bday-card.mine { flex-wrap: wrap; }
}

/* ---------- 0.18 · Message tools (chat-tools.js) ---------- */
/* Picking a time: "Remind me", "Send later" */
.tp-pop { width: min(300px, calc(100vw - 24px)); padding: 8px; display: grid; gap: 4px; }
.tp-list { display: grid; gap: 2px; }
.tp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--text); text-align: left; }
.tp-item:hover { background: var(--acc-soft); }
.tp-item small { font-size: 12px; }
.tp-custom { display: flex; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--line); }
.tp-custom .input { flex: 1; min-width: 0; padding: 7px 9px; font-size: 13px; color-scheme: dark; }
.tp-sched { display: grid; gap: 4px; max-height: 300px; overflow: auto; }
.sched-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.sched-row small { display: inline-flex; align-items: center; gap: 4px; }
.sched-text { font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 4.5em; overflow: hidden; }
.sched-bit { width: 100%; text-align: left; cursor: pointer; }
.sched-bit:hover { background: rgba(255, 255, 255, .08); }
/* Pinned messages */
.msg-pin { position: absolute; top: 6px; right: 14px; color: var(--accent-2); opacity: .85; pointer-events: auto; }
.pins-pop { width: min(380px, calc(100vw - 24px)); padding: 8px; display: grid; gap: 4px; }
.pins-list { display: grid; gap: 6px; max-height: min(60vh, 480px); overflow: auto; }
.pin-row { display: flex; gap: 10px; padding: 9px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.pin-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pin-body .row { gap: 8px; }
.pin-text { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; max-height: 6em; overflow: hidden; }
.pin-acts { gap: 6px; }
/* Reporting */
.report-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.report-reason { padding: 10px 12px; border-radius: 11px; text-align: left; font-size: 13.5px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text-2); }
.report-reason:hover { border-color: var(--line-2); color: var(--text); }
.report-reason.on { border-color: color-mix(in srgb, var(--bad) 60%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--text); }
.report-team { gap: 8px; font-size: 13.5px; color: var(--text-2); align-items: flex-start; }
.report-card { display: grid; gap: 8px; }
.report-card.handled { opacity: .75; }
.report-msg { display: flex; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .22); min-width: 0; }
.report-msg .grow { min-width: 0; display: grid; gap: 3px; }
.report-img { max-width: 220px; max-height: 160px; border-radius: 10px; object-fit: contain; }
/* Voice messages: recording */
.rec-bar { display: none; align-items: center; gap: 10px; padding: 8px 8px 0 14px; }
.rec-bar.on { display: flex; }
.composer.recording .composer-row { display: none; }
.composer.recording .rec-bar { padding-bottom: 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: recBlink 1.2s ease-in-out infinite; flex: none; }
@keyframes recBlink { 50% { opacity: .3; } }
.rec-time { font-variant-numeric: tabular-nums; min-width: 38px; }
.rec-wave { display: flex; align-items: center; gap: 2px; height: 26px; min-width: 0; overflow: hidden; }
.rec-wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--accent-2); transform-origin: center; }
.rec-send { margin-left: 0; }
/* Voice messages: playing */
.vm { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 12px 8px 8px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); max-width: 100%; }
.vm-play { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.vm-wave { display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; min-width: 0; }
.vm-wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--text-3); transform-origin: center; transition: background .15s; }
.vm-wave i.on { background: var(--accent-2); }
.vm-time { font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 32px; }
@media (max-width: 420px) { .vm-wave i:nth-child(even) { display: none; } }
.rem-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--accent-2); flex: none; }
.app-idle .rec-dot { animation-play-state: paused; }
/* Threads */
.chan-threads { display: grid; gap: 1px; margin: 1px 0 3px 22px; }
.chan.thread { padding-top: 5px; padding-bottom: 5px; font-size: 13.5px; }
.thread-line { width: 12px; height: 14px; margin: -6px 2px 0 0; border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); border-bottom-left-radius: 6px; flex: none; }
.thread-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 13px; max-width: 100%; color: var(--text-2); }
.thread-chip b { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.thread-chip .muted { white-space: nowrap; }
.thread-chip:hover { border-color: var(--acc-line); background: var(--acc-soft); }
.thread-start { display: flex; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); max-width: 640px; }
.thread-start .row { gap: 8px; }
.linklike { padding: 0; border: 0; background: none; color: var(--accent-2); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
/* Link previews */
.lp-slot:empty { display: none; }
.lp-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 6px; padding: 10px 12px; max-width: 460px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-left: 3px solid var(--lp, var(--accent)); color: var(--text); text-decoration: none; }
.lp-card:hover { background: rgba(255, 255, 255, .065); }
.lp-txt { display: grid; gap: 3px; min-width: 0; }
.lp-site { color: var(--text-3); font-size: 12px; }
.lp-title { color: var(--accent-2); font-size: 14.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-desc { color: var(--text-2); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lp-img { position: relative; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .3); max-height: 240px; }
.lp-img img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.lp-img:not(.only) img { aspect-ratio: 1.91 / 1; height: auto; }
.lp-card.image-only { padding: 0; border: 0; background: none; max-width: 360px; }
.lp-img.only img { object-fit: contain; }
.lp-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; }
/* Translations */
.tr-box { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border-left: 2px solid var(--acc-line); display: grid; gap: 4px; max-width: 640px; }
.tr-box.loading { display: flex; align-items: center; gap: 8px; }
.tr-text { overflow-wrap: anywhere; }
.tr-box small { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* Voice room status + AFK */
.vc-status { margin: -2px 0 2px 38px; padding-right: 10px; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-afk { display: inline-grid; place-items: center; color: var(--text-3); }
.vs-chip { display: inline-flex; align-items: center; gap: 6px; justify-self: center; max-width: 100%; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--text-3); border: 1px dashed var(--line); background: none; cursor: pointer; }
.vs-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vs-chip.on { color: var(--text); border-style: solid; background: rgba(255, 255, 255, .05); }
.vs-chip:hover { border-color: var(--acc-line); color: var(--text); }
.vs-ideas { gap: 6px; }
.chip-btn { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; color: var(--text-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); cursor: pointer; }
.chip-btn:hover { color: var(--text); border-color: var(--acc-line); background: var(--acc-soft); }
/* Profile effects: over the top of a profile card (transform/opacity only; paused when idle, and in lists
   until hovered). */
.profile-card, .dm-profile { position: relative; }
.pfx { position: absolute; left: 0; right: 0; top: 0; height: min(100%, 440px); pointer-events: none; overflow: hidden; z-index: 4; }
.pfx-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pfx-art.animated > .anim, .vault-item .pfx-art.animated > .anim { display: none; }
:is(.profile-card, .dm-profile, .ds-preview, .ds-review-art, .vault-item:hover) .pfx-art.animated > .anim { display: block; }
:is(.profile-card, .dm-profile, .ds-preview, .ds-review-art, .vault-item:hover) .pfx-art.animated > .still { display: none; }
.pfx i { position: absolute; left: var(--x); top: -16px; display: block; will-change: transform, opacity; animation: pfx-fall var(--t) linear var(--d) infinite; }
.pfx-snowfall i { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); opacity: .85; }
.pfx-petals i { width: 10px; height: 7px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #fbcfe8, #f472b6); animation-name: pfx-petal; }
.pfx-sparkles i { top: var(--y); width: 12px; height: 12px; background: #fde68a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 4px #fde68a); animation: pfx-twinkle calc(var(--t) * .5) ease-in-out var(--d) infinite; }
.pfx-hearts i { top: auto; bottom: -18px; width: 14px; height: 14px; background: #fb7185; clip-path: path('M7 13 1.3 7.4A3.6 3.6 0 0 1 7 2.6a3.6 3.6 0 0 1 5.7 4.8Z'); animation-name: pfx-rise; }
.pfx-embers i { top: auto; bottom: -10px; width: 5px; height: 5px; border-radius: 50%; background: #fb923c; box-shadow: 0 0 8px 2px rgba(251, 146, 60, .7); animation-name: pfx-rise; }
@keyframes pfx-fall { 0% { transform: translate(0, 0) scale(var(--s)); opacity: 0; } 12% { opacity: .9; } 85% { opacity: .9; } 100% { transform: translate(var(--w), 460px) scale(var(--s)); opacity: 0; } }
@keyframes pfx-petal { 0% { transform: translate(0, 0) rotate(0) scale(var(--s)); opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(calc(var(--w) * 2), 460px) rotate(540deg) scale(var(--s)); opacity: 0; } }
@keyframes pfx-rise { 0% { transform: translate(0, 0) scale(var(--s)); opacity: 0; } 15% { opacity: 1; } 80% { opacity: .8; } 100% { transform: translate(var(--w), -380px) scale(calc(var(--s) * .6)); opacity: 0; } }
@keyframes pfx-twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(var(--s)) rotate(45deg); opacity: 1; } }
:is(.app-idle, .overlay-open #root) .pfx i, .vault-item:not(:hover) .pfx i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .pfx i { animation-play-state: paused; } }
.fx-preview { position: relative; width: 132px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--bg-2, #15121f); border: 1px solid var(--line); display: grid; justify-items: start; align-content: start; padding: 0 0 8px; }
.ds-preview .fx-preview, .ds-review-art .fx-preview { width: 200px; height: 200px; }
.fx-prev-banner { display: block; width: 100%; height: 30px; background: var(--grad); opacity: .55; }
.ds-preview .fx-prev-banner, .ds-review-art .fx-prev-banner { height: 64px; }
.fx-preview .av { margin: -19px 0 0 10px; }
.fx-prev-line { display: block; height: 6px; width: 60%; margin: 8px 0 0 10px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.fx-prev-line.short { width: 36%; margin-top: 5px; }
.fx-preview .pfx { height: 100%; }
/* Sticker packs */
.ds-kind-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--acc-soft); color: var(--accent-2); }
.ds-stickers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; max-width: 100%; }
.ds-stickers img { width: var(--ss, 64px); height: var(--ss, 64px); object-fit: contain; }
.ds-stickers.all { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ss), 1fr)); width: 100%; justify-items: center; }
.ds-count { width: 100%; text-align: center; font-size: 11.5px; color: var(--text-3); }
.vault-preview .ds-stickers img { height: calc(var(--ss) * .9); }
button.vault-preview { cursor: zoom-in; border: 0; color: inherit; font: inherit; }
.ds-sticker-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
.ds-sticker-one { position: relative; aspect-ratio: 1; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); display: grid; place-items: center; }
.ds-sticker-one img { max-width: 86%; max-height: 86%; object-fit: contain; }
.ds-sticker-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2, #15121f); border: 1px solid var(--line); }
.stk-pop { width: min(340px, calc(100vw - 24px)); padding: 8px; display: grid; gap: 8px; }
.stk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.stk-one { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; transition: background .15s, transform .15s; }
.stk-one:hover, .stk-one:focus-visible { background: var(--acc-soft); transform: scale(1.04); }
.stk-one img { width: 86%; height: 86%; object-fit: contain; }
.stk-tabs { display: flex; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); overflow-x: auto; }
.stk-tab { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); }
.stk-tab img { width: 28px; height: 28px; object-fit: contain; }
.stk-tab.on { background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--acc-line); }
.stk-tab.add { border: 1px dashed var(--line); }
.stk-none { justify-items: center; text-align: center; padding: 18px 16px; gap: 6px; }
.stk-none-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--acc-soft); color: var(--accent-2); }
.msg-sticker { display: block; margin-top: 4px; padding: 0; border: 0; background: none; cursor: pointer; }
.msg-sticker img { display: block; width: 160px; height: 160px; object-fit: contain; }
@media (max-width: 560px) { .msg-sticker img { width: 128px; height: 128px; } }
/* App activity (activity.js) */
.act-line { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.act-line > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.act-line b { color: var(--text-2); font-weight: 650; }
.act-line .ic { flex: none; color: var(--accent-2); }
.act-line.music .ic { color: #1ed760; }
.act-cards { display: grid; gap: 8px; margin: 4px 0 2px; }
.act-card { display: grid; gap: 7px; padding: 10px 11px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); min-width: 0; }
.act-head { font: 800 10.5px var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-row { display: flex; align-items: center; gap: 11px; min-width: 0; }
.act-art { flex: none; width: 54px; height: 54px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: var(--acc-soft); color: var(--accent-2); }
.act-card.music .act-art:not(img) { background: rgba(30, 215, 96, .14); color: #1ed760; }
.act-txt { display: grid; gap: 1px; min-width: 0; }
.act-txt b, .act-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-txt b { font-size: 14px; }
.act-txt small { font-size: 12.5px; color: var(--text-2); }
.act-txt small.muted { color: var(--text-3); }
.act-prog i { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.act-prog i b { display: block; height: 100%; background: var(--text-2); transform-origin: left; transform: scaleX(0); }
.act-times { display: flex; justify-content: space-between; margin-top: 3px; font-variant-numeric: tabular-nums; }
.act-times small { font-size: 11px; color: var(--text-3); }
.member-txt .act-line, .friend-txt .act-line { font-size: inherit; }
/* Weekly recap (Home) */
.recap-card { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--glass-2, rgba(255, 255, 255, .04)); }
.rc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rc-stat { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: rgba(0, 0, 0, .2); text-align: center; min-width: 0; }
.rc-stat b { font: 800 20px var(--display); }
.rc-stat small { font-size: 11.5px; }
.rc-ic { font-size: 18px; }
.rc-line { margin: 10px 0 4px; color: var(--text-2); font-size: 13.5px; }
@media (max-width: 520px) { .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 0.19 · chat extras (chat-extras.js) ---------- */
.msg.folded { padding-top: 4px; padding-bottom: 4px; }
.fold-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: 56px; padding: 5px 10px; border-radius: 9px; font-size: 12.5px; color: var(--text-3); background: rgba(255, 255, 255, .03); border: 1px dashed var(--line); }
.fold-btn b { color: var(--accent-2); font-weight: 650; }
.fold-btn:hover { color: var(--text-2); border-color: var(--acc-line); }
.silent-chip { display: inline-grid; place-items: center; color: var(--text-3); }
.edited.has-edits { cursor: pointer; }
.edited.has-edits:hover { text-decoration: underline; color: var(--text-2); }
.edits-list .edit-ver { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); display: grid; gap: 4px; }
.fwd-card { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--acc-line); border-radius: 0 10px 10px 0; background: rgba(255, 255, 255, .03); display: grid; gap: 5px; max-width: 560px; min-width: 0; }
.fwd-head { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; flex-wrap: wrap; }
.fwd-head .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fwd-author { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.fwd-gif { max-width: 260px; border-radius: 10px; display: block; }
.fwd-file { display: inline-flex; align-items: center; gap: 5px; }
.fwd-list { max-height: min(360px, 50vh); overflow-y: auto; }
.fwd-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--acc-soft); color: var(--accent-2); flex: none; }
.pick-name { display: grid; min-width: 0; flex: 1; text-align: left; }
.pick-name b, .pick-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dice-card { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.dice-ic { font-size: 26px; }
.dice-txt { display: grid; gap: 1px; }
.dice-res { font: 800 20px var(--display); color: var(--text); }
.check-card { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); display: grid; gap: 10px; max-width: 460px; }
.check-bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.check-bar i { display: block; height: 100%; background: var(--ok); transform-origin: left; transition: transform .25s; }
.check-items { display: grid; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; font-size: 14px; cursor: pointer; min-width: 0; }
.check-item:hover { background: rgba(255, 255, 255, .04); }
.check-item input { accent-color: var(--ok); width: 17px; height: 17px; flex: none; }
.check-item span { overflow-wrap: anywhere; }
.check-item.done span { color: var(--text-3); text-decoration: line-through; }
.check-add { font-size: 13px; padding: 7px 10px; }
.blur-wrap { position: relative; display: block; max-width: 100%; width: fit-content; }
.blur-wrap.blurred > :not(.blur-note) { filter: blur(26px) saturate(.6); pointer-events: none; }
.blur-wrap.blurred { overflow: hidden; border-radius: 12px; cursor: pointer; }
.blur-note { display: none; }
.blur-wrap.blurred .blur-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .35); }
.saver-play { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; width: 100%; height: 100%; color: #fff; background: rgba(0, 0, 0, .45); font-size: 12px; }
.poll-a.right { border-color: color-mix(in srgb, var(--ok) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 50%, transparent); }
.poll-a.right .poll-fill { background: color-mix(in srgb, var(--ok) 26%, transparent); }
.poll-a.wrong { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.poll-a.wrong .poll-fill { background: color-mix(in srgb, var(--bad) 20%, transparent); }
.quiz-right { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: transparent; border: 1.5px solid var(--line); }
.poll-edit-row.right .quiz-right { color: #06281c; background: var(--ok); border-color: var(--ok); }
.fmt-bar { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--glass-3); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); z-index: 6; }
.fmt-bar.hidden { display: none; }
.fmt-btn { width: 32px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.fmt-btn:hover { background: var(--acc-soft); color: var(--text); }
.composer { position: relative; }
.quote-pop { position: fixed; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.quote-pop.hidden { display: none; }
.seen-line { display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 0 18px 6px; font-size: 11.5px; color: var(--text-3); }
.msg.swipe-ready { background: var(--acc-soft); }
.md-pre { position: relative; }
.md-copy { position: absolute; top: 6px; right: 6px; padding: 3px 8px; border-radius: 7px; font: 600 11px var(--font); color: var(--text-3); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); opacity: 0; transition: opacity .15s; }
.md-pre:hover .md-copy, .md-copy:focus-visible { opacity: 1; }
@media (hover: none) { .md-copy { opacity: 1; } }
.hl-c { color: #7f8aa3; font-style: italic; }
.hl-s { color: #a7f3a0; }
.hl-n { color: #fbbf72; }
.hl-k { color: #c4a5ff; }
.hl-f { color: #7cc7ff; }
.md-time { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; }
.menu-head { padding: 6px 10px 2px; font: 700 10.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.bell-btn.on { color: var(--text-3); }
.inbox-btn { position: relative; }
.inbox-btn.has::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg-2); }
.chan.muted { opacity: .5; }
.chan.muted.unread { opacity: .7; }
.mute-ic { color: var(--text-3); flex: none; }
.req-row .chan-badge { margin-left: auto; }
.req-card { display: grid; gap: 10px; }
.req-preview { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); font-size: 13.5px; color: var(--text-2); max-height: 160px; overflow: hidden; }
.req-msg { overflow-wrap: anywhere; }
.pc-note { display: flex; align-items: flex-start; gap: 6px; padding: 6px 9px; border-radius: 9px; font-size: 12.5px; color: var(--text-2); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); text-align: left; overflow-wrap: anywhere; }
.pc-note.empty { background: none; border: 1px dashed var(--line); color: var(--text-3); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-list .chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--text); background: var(--acc-soft); border: 1px solid var(--acc-line); }
.quiet-time { flex: 1; min-width: 140px; margin: 0; }
.watch-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.inbox-list { display: grid; gap: 2px; padding: 6px; }
.inbox-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; text-align: left; min-width: 0; width: 100%; }
.inbox-row:hover { background: rgba(255, 255, 255, .04); }
.inbox-row.new { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.inbox-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.inbox-txt .row { gap: 8px; flex-wrap: wrap; }
.inbox-why { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--acc-soft); color: var(--accent-2); }
.inbox-why.keyword { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.inbox-snip { font-size: 13.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.empty-card { display: grid; justify-items: center; gap: 6px; padding: 30px 20px; text-align: center; color: var(--text-3); }
.keys-sheet { display: grid; gap: 8px; }
.keys-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13.5px; color: var(--text-2); }
.keys { display: inline-flex; gap: 4px; flex: none; }
.audit-list { display: grid; gap: 2px; padding: 6px; }
.audit-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px; border-radius: 10px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.audit-row b { color: var(--text); }
.audit-row .grow { min-width: 0; overflow-wrap: anywhere; }
.audit-detail { display: block; margin-top: 2px; }
.appeal-card { display: grid; gap: 8px; }
.appeal-card.done { opacity: .65; }
.appeal-text { margin: 0; font-size: 14px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
/* High contrast and the readable font (Settings → Appearance → Easier to use). */
html.hi-contrast { --text: #ffffff; --text-2: #e6e2f3; --text-3: #c3bdd6; --line: rgba(255, 255, 255, .28); --glass: #120f1c; --glass-2: #1b1729; --glass-3: #262038; }
html.hi-contrast .muted, html.hi-contrast small { color: var(--text-2); }
html.hi-contrast :is(.card, .menu, .modal, .popover, .composer, .msg-tools) { border-color: rgba(255, 255, 255, .35) !important; }
html.hi-contrast a, html.hi-contrast .md-link { text-decoration: underline; }
/* A narrow chat column (the members panel open on a laptop): the channel name keeps its room; the streak and
   moonstone chips step aside and search shrinks to its icon. */
.main { container-type: inline-size; container-name: main; }
.main-head h1 { flex: 0 0 auto; max-width: 45%; }
@container main (max-width: 900px) {
  .main-head .streak-chip, .main-head .shard-chip { display: none; }
  .main-head .search-box { width: 36px; justify-content: center; padding: 0; }
  .main-head .search-box span:not(.ic), .main-head .search-box kbd { display: none; }
}
@container main (max-width: 640px) { .main-head .topic, .main-head .chan-flags, .main-head .inbox-btn { display: none; } .main-head { gap: 6px; padding-right: 8px; } }
html.readable-font { --font: 'Atkinson Hyperlegible', 'Inter', ui-sans-serif, system-ui, sans-serif; --display: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serif; letter-spacing: .01em; }

/* ============================== 0.20: phases and profiles ============================== */
/* Names: the font someone picked (system fonts only, nothing to download), role icons, the Creator chip. */
.uname.nf-serif { font-family: Georgia, 'Times New Roman', serif; letter-spacing: .01em; }
.uname.nf-mono { font-family: var(--mono); font-size: .94em; }
.uname.nf-rounded { font-family: ui-rounded, 'Nunito', 'Varela Round', 'Arial Rounded MT Bold', var(--font); }
.uname.nf-display { font-family: var(--display); font-weight: 800; letter-spacing: .02em; }
.uname.nf-script { font-family: 'Segoe Script', 'Brush Script MT', 'Comic Sans MS', cursive; font-weight: 600; }
.uname.nf-pixel { font-family: var(--mono); text-transform: uppercase; letter-spacing: .09em; font-size: .86em; text-shadow: 1px 1px 0 rgba(0, 0, 0, .5); }
.role-icon { font-size: 13px; line-height: 1; vertical-align: 1px; }
.role-chip.creator { background: #dc2626; color: #fff; }
.role-icon-pick { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-size: 20px; color: var(--text-2); }
.role-icon-pick:hover { border-color: var(--acc-line); }
.chan-tag.nsfw, .chan-flag.nsfw { color: #fecaca; background: rgba(220, 38, 38, .22); font-weight: 800; }
.chan-tag.nsfw { padding: 1px 5px; border-radius: 5px; font-size: 9.5px; }
.chan-flag.follow-btn { cursor: pointer; }
.chan-flag.follow-btn:hover { color: var(--text); background: var(--acc-soft); }
/* Bot messages: a webhook, a followed channel, the starboard, the phase itself. */
.bot-av.hook, .bot-av.follow { color: var(--text-2); }
.bot-av.star { background: rgba(250, 204, 21, .14); border-color: rgba(250, 204, 21, .4); }
.bot-av.phase-bot { background: none; border: 0; }
.bot-emo { font-size: 20px; line-height: 1; }
.bot-sub { font-size: 11.5px; }
.star-jump { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 9px; border-radius: 8px; font: 600 12px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .05); }
.star-jump:hover { color: var(--text); background: rgba(255, 255, 255, .09); }
/* Albums */
.msg-album { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 6px; max-width: min(420px, 100%); border-radius: 14px; overflow: hidden; }
.album-cell { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: rgba(255, 255, 255, .04); }
.album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.album-cell:hover img { transform: scale(1.03); }
.msg-album.n3 .album-cell:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.album-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 6, 14, .55); color: #fff; font: 800 22px var(--display); }
.album-bit { flex-wrap: wrap; }
.album-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.album-thumb { position: relative; width: 52px; height: 52px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; }
.album-thumb button { position: absolute; top: 2px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(8, 6, 14, .75); color: #fff; }
.album-thumb .thumb-x { right: 2px; }
.album-thumb .thumb-edit { left: 2px; }
/* A role menu card */
.role-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.role-pick { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; font: 600 13.5px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.role-pick .role-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rc, var(--text-3)); }
.role-pick:hover { color: var(--text); border-color: var(--acc-line); }
.role-pick.on { color: var(--text); background: color-mix(in srgb, var(--rc, var(--accent)) 22%, transparent); border-color: color-mix(in srgb, var(--rc, var(--accent)) 55%, transparent); }
/* The reply chain */
.reply-chain { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--text-3); }
.reply-chain:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.chain-list { display: grid; gap: 4px; }
.chain-msg { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 8px; border-radius: 12px; width: 100%; }
.chain-msg:hover { background: rgba(255, 255, 255, .04); }
.chain-text { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
/* The picture editor */
.pe { display: grid; gap: 12px; }
.pe-stage { display: grid; place-items: center; padding: 10px; border-radius: 14px; background: repeating-conic-gradient(rgba(255, 255, 255, .04) 0 25%, transparent 0 50%) 0 0 / 18px 18px; overflow: hidden; }
.pe-canvas { max-width: 100%; touch-action: none; cursor: crosshair; border-radius: 6px; }
.pe-tools { gap: 6px; align-items: center; }
.pe-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.pe-colors { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pe-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); }
.pe-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
/* Forums */
.forum { height: 100%; overflow-y: auto; padding: 20px clamp(12px, 3vw, 28px) 40px; }
.forum-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.forum-head h2 { margin: 0 0 2px; font: 800 22px var(--display); }
.forum-tags { flex-wrap: wrap; margin-bottom: 12px; }
.forum-list { display: grid; gap: 8px; }
.forum-post { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.forum-post:hover { border-color: var(--acc-line); background: rgba(255, 255, 255, .055); }
.forum-post.unread .fp-title { color: var(--text); }
.forum-post.unread .fp-title::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.fp-title { display: block; font: 700 15.5px var(--font); color: var(--text-2); overflow-wrap: anywhere; }
.fp-tags { display: inline-flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.fp-tags.head { margin: 0; flex-wrap: nowrap; overflow: hidden; }
.fp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font: 600 11.5px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .06); white-space: nowrap; }
.fp-tag.add { color: var(--text-3); border: 1px dashed var(--line); background: none; cursor: pointer; }
.fp-tag.add:hover { color: var(--text); }
.fp-snip { margin: 6px 0; color: var(--text-3); font-size: 13.5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-meta { display: inline-flex; align-items: center; gap: 6px; }
.fp-thumb { width: 84px; height: 84px; flex: none; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.fp-new-img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
/* 18+ */
.age-gate { display: grid; justify-items: center; align-content: center; gap: 12px; height: 100%; padding: 30px 20px; text-align: center; }
.age-gate h2 { margin: 0; font: 800 22px var(--display); }
.age-gate p { max-width: 420px; margin: 0; }
.age-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; font: 900 22px var(--display); color: #fecaca; background: rgba(220, 38, 38, .18); border: 1px solid rgba(220, 38, 38, .45); }
/* The welcome screen */
.welcome-screen { display: grid; gap: 14px; }
.ws-banner { position: relative; height: 120px; margin: -6px -6px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--a), var(--b)) center / cover; }
.ws-banner .phase-ic { position: absolute; left: 18px; bottom: -26px; box-shadow: 0 0 0 4px var(--bg-1); }
.welcome-screen h2 { margin: 6px 0 0; font: 800 24px var(--display); }
.ws-text { color: var(--text-2); }
.ws-chans { display: grid; gap: 6px; }
.ws-chan { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ws-chan:hover { border-color: var(--acc-line); }
.ws-chan small { display: block; }
.ws-emo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 18px; }
.ws-rules summary { cursor: pointer; font-weight: 700; color: var(--text-2); }
.ob-q { display: grid; gap: 6px; }
.ob-q .ftabs { flex-wrap: wrap; }
.ob-edit { gap: 10px; }
.ob-opt { padding-left: 12px; border-left: 2px solid var(--line); }
.ftab.sm { height: 26px; padding: 0 10px; font-size: 12.5px; }
/* Levels, goals, perks */
.lv-me { gap: 8px; }
.lv-list { display: grid; gap: 2px; max-height: min(52vh, 460px); overflow-y: auto; }
.lv-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.lv-row.me { background: var(--acc-soft); }
.lv-rank { width: 24px; text-align: center; color: var(--text-3); font: 800 13px var(--display); }
.lv-row:nth-child(-n+3) .lv-rank { color: var(--warn); }
.lv-chip { padding: 2px 7px; border-radius: 7px; font: 800 11px var(--font); color: var(--text); background: rgba(255, 255, 255, .07); }
.pbar.goal i { background: linear-gradient(90deg, var(--ok), var(--accent)); }
.perk-list { display: grid; gap: 4px; }
.perk { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text-3); background: rgba(255, 255, 255, .03); }
.perk.on { color: var(--text); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.perk.on .ic:last-child { color: var(--ok); }
/* Profile card parts */
.pc-extra { display: grid; gap: 8px; }
.pc-extra:empty { display: none; }
.pc-time { display: inline-flex; align-items: center; gap: 4px; }
.pc-games, .pc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-game, .pc-link { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; font: 600 12px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .06); }
.pc-link:hover { color: var(--text); background: rgba(255, 255, 255, .1); text-decoration: none; }
.pc-mutual { display: flex; align-items: center; gap: 8px; }
.pc-mutual:empty { display: none; }
.mutual-avs { display: flex; }
.mutual-avs .av + .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-1); }
.pc-gb { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9px; font: 600 12.5px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.pc-gb:hover { color: var(--text); border-color: var(--acc-line); }
.gb-list { display: grid; gap: 6px; max-height: min(50vh, 420px); overflow-y: auto; }
.gb-entry { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.gb-entry p { margin: 2px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
.more-profile { margin-top: 18px; gap: 14px; }
.font-prev { font-size: 17px; }
/* Phase settings parts */
.hook-row { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.hook-url { display: block; white-space: normal; overflow-wrap: anywhere; user-select: all; }
.cmd-row .cmd-name { width: 110px; flex: none; }
.cmd-row .input-prefix { color: var(--text-3); font-weight: 800; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-tile { display: grid; gap: 2px; }
.stat-tile b { font: 800 26px var(--display); }
.stat-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; align-items: end; }
.stat-col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; height: 100%; }
.stat-bar { align-self: end; width: min(34px, 100%); border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.raid-paused { padding: 10px 12px; border-radius: 12px; color: #fde68a; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35); }
.follow-line { margin-top: 6px; }
.sticker-tile img { width: 72px; height: 72px; object-fit: contain; }
.tp-repeat { display: flex; align-items: center; gap: 8px; padding: 6px 4px 8px; color: var(--text-2); }
.input.mono { font-family: var(--mono); font-size: 12px; }
@media (max-width: 640px) {
  .forum { padding: 14px 12px 30px; }
  .forum-head { flex-wrap: wrap; }
  .fp-thumb { width: 60px; height: 60px; }
  .cmd-row { flex-wrap: wrap; }
  .cmd-row .cmd-name { width: 90px; }
  .stat-bars { gap: 4px; }
  .ws-banner { height: 96px; }
}@container main (max-width: 640px) { .main-head .fp-tags.head { display: none; } }
@container main (max-width: 460px) { .main-head:has(.icon-btn.danger) .pins-btn { display: none; } }.ws-chan-edit .status-emoji { width: 56px; flex: none; text-align: center; }
@media (max-width: 640px) { .ws-chan-edit { flex-wrap: wrap; } .ws-chan-edit select { flex: 1; } .ws-chan-edit input:not(.status-emoji) { flex: 1 1 100%; order: 3; } }
/* ============================== 0.21: voice, fun and safety ============================== */
/* Voice tiles: a raised hand, a voice effect's badge, reactions that float up (only when one is sent). */
.flag.hand { background: rgba(250, 204, 21, .18); color: #fde68a; }
.flag.fx { background: rgba(168, 85, 247, .2); color: #e9d5ff; }
.tile { position: relative; }
.tile-react { position: absolute; left: 50%; bottom: 40%; font-size: 30px; pointer-events: none; animation: tileReact 1.8s var(--ease) forwards; }
@keyframes tileReact { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(calc(-50% + var(--x) * .3), -10px) scale(1.1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), -120px) scale(1); } }
.voice-timer { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 8px 12px; border-radius: 14px; background: rgba(8, 7, 13, .55); border: 1px solid var(--line-2); }
.voice-timer .pbar { flex: 1; }
.voice-timer .vt-left { font: 800 18px var(--display); font-variant-numeric: tabular-nums; }
.lobby-locked { display: inline-flex; align-items: center; gap: 6px; color: #fde68a; }
/* The room's text chat: a column on the right of wide rooms, a box under the tiles on narrow ones. */
.voice-chat { display: flex; flex-direction: column; min-height: 0; height: 300px; flex: none; margin: 0 16px 12px; border-radius: 18px; overflow: hidden; background: rgba(8, 7, 13, .55); border: 1px solid var(--line-2); }
.voice-chat .chat { min-height: 0; }
.voice-chat .chan-intro { padding: 16px; }
.voice-chat .chan-intro h2 { font-size: 17px; }
@container stage (min-width: 900px) {
  .stage.with-chat { padding-right: 356px; }
  .stage.with-chat .voice-chat { position: absolute; right: 16px; top: 16px; bottom: 96px; width: 340px; height: auto; margin: 0; }
}
/* The whiteboard */
.wb { display: grid; gap: 12px; }
.wb-stage { border-radius: 14px; overflow: hidden; background: #0d0b14; border: 1px solid var(--line); }
.wb-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 750; touch-action: none; cursor: crosshair; }
/* Mini games */
.game-card { margin-top: 6px; padding: 12px; border-radius: 16px; max-width: 300px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); display: grid; gap: 10px; }
.game-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-status { color: var(--text-2); }
.ttt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ttt-cell { aspect-ratio: 1; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font: 900 28px var(--display); color: var(--text); }
.ttt-cell:not(:disabled):hover { background: var(--acc-soft); border-color: var(--acc-line); }
.ttt-cell.x { color: #f472b6; }
.ttt-cell.o { color: #60a5fa; }
.ttt-cell.win { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: var(--ok); }
.rps-choices, .rps-result { display: flex; gap: 8px; }
.rps-btn, .rps-pick { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; font-size: 26px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.rps-btn small, .rps-pick small { font-size: 11px; color: var(--text-3); text-transform: capitalize; }
.rps-btn:not(:disabled):hover, .rps-btn.on { background: var(--acc-soft); border-color: var(--acc-line); }
.rps-pick.win { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
/* Looking for group */
.lfg-list { display: grid; gap: 8px; }
.lfg-post { gap: 6px; padding: 12px 14px; }
.lfg-note { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
/* The Vault: picks, gifts, sound packs; badge progress */
.picks { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pick-price s { color: var(--text-3); margin-right: 2px; }
.vault-actions { justify-content: space-between; }
.gift-btn { color: var(--text-3); }
.pack-prev { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pack-snd { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; background: rgba(255, 255, 255, .06); }
.pack-snd:hover { background: var(--acc-soft); }
.badge-prog { display: grid; gap: 3px; width: 100%; }
/* Chat bits: transcripts, picture descriptions, catch-up */
.transcript, .transcript-btn { display: inline-flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 13.5px; color: var(--text-2); }
.transcript { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); max-width: 520px; }
.transcript-btn { padding: 4px 9px; border-radius: 8px; font-weight: 600; background: rgba(255, 255, 255, .05); align-items: center; }
.transcript-btn:hover { color: var(--text); background: rgba(255, 255, 255, .09); }
.alt-chip { padding: 2px 7px; border-radius: 6px; font: 800 10.5px var(--font); letter-spacing: .06em; color: var(--text-3); border: 1px solid var(--line); }
.alt-chip.on { color: var(--text); background: var(--acc-soft); border-color: var(--acc-line); }
.catchup-text { color: var(--text); line-height: 1.6; }
/* DMs: a friend streak, disappearing messages */
.dm-streak { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 9px; background: rgba(251, 146, 60, .15); color: #fdba74; font-size: 13px; }
.ttl-btn.on { color: var(--warn); }
/* Sign-in and security */
.ob-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; margin-top: 8px; border-radius: 12px; font: 600 14px var(--font); color: var(--text-2); border: 1px solid var(--line); }
.ob-passkey:hover { color: var(--text); border-color: var(--acc-line); }
.otp-in { font: 700 22px var(--mono); letter-spacing: .3em; text-align: center; }
.otp-secret { display: block; font-size: 15px; letter-spacing: .08em; white-space: normal; overflow-wrap: anywhere; user-select: all; }
.backup-codes { margin: 0; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); font: 600 15px/1.7 var(--mono); columns: 2; user-select: all; }
.passkey-row { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
/* Activity: Ask to join, Open in Spotify */
.act-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 5px 10px; border-radius: 9px; font: 600 12.5px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .06); text-decoration: none; }
.act-btn:hover { color: var(--text); background: rgba(255, 255, 255, .1); text-decoration: none; }
.sb-tile { position: relative; }
.sb-tile.fav::after { content: '★'; position: absolute; top: 3px; right: 6px; font-size: 10px; color: var(--warn); }
.sb-key { position: absolute; top: 3px; left: 5px; padding: 0 4px; border-radius: 4px; font: 700 9.5px var(--mono); background: rgba(255, 255, 255, .1); color: var(--text-2); }
.watch-panel.twitch .watch-screen { aspect-ratio: 16 / 9; }
.watch-panel.twitch .live-pill { margin-right: 6px; }@container stage (max-width: 899px) { .stage.with-chat .voice-chat { height: clamp(200px, 42%, 300px); } }
/* ============================== 0.22: the app around the chat ============================== */
/* Streamer Mode: personal things blurred (and a chip saying it's on). */
html.streamer :is(.invite-chip code, .invite-code, .share-link, .otp-secret, .backup-codes, .hook-url, [data-private]) { filter: blur(6px); user-select: none; }
.streamer-chip { position: fixed; z-index: 60; top: 8px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font: 700 12px var(--font); color: #fff; background: #7c3aed; box-shadow: 0 6px 18px rgba(124, 58, 237, .4); }
html.desktop-frame .streamer-chip { top: 5px; }
/* The team's announcement banner */
.site-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 14px; color: #ede9fe; background: linear-gradient(90deg, rgba(124, 58, 237, .35), rgba(236, 72, 153, .25)); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-banner.tone-warn { color: #fef3c7; background: linear-gradient(90deg, rgba(245, 158, 11, .32), rgba(239, 68, 68, .22)); }
.site-banner .icon-btn { color: inherit; }
/* Settings bits */
.app-icons { gap: 8px; align-items: center; }
.app-icon-pick { width: 44px; height: 44px; border-radius: 12px; padding: 0; overflow: hidden; border: 1px solid var(--line); }
.app-icon-pick img { width: 100%; height: 100%; display: block; }
.app-icon-pick:hover { border-color: var(--acc-line); transform: translateY(-1px); }
.zoom-val { min-width: 48px; text-align: right; }
.game-row, .bot-row { padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.pc-recent { display: grid; gap: 4px; }
.ob-names { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-name { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font: 600 13px var(--font); color: var(--text-2); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.ob-name:hover { color: var(--text); border-color: var(--acc-line); }
.whats-new .rules-text { line-height: 1.6; }
/* Tablets (touch, 768–1100 px): bigger touch targets in lists and the composer. */
@media (min-width: 768px) and (max-width: 1100px) and (pointer: coarse) {
  .chan { min-height: 40px; }
  .composer-row .icon-btn { width: 40px; height: 40px; }
  .msg-tools .icon-btn { width: 36px; height: 36px; }
  .menu-item { min-height: 40px; }
  .set-nav .set-link { min-height: 44px; }
}
/* ============================== 0.23 ============================== */
/* The channel's top bar keeps one tidy line in every channel: the name, then the topic (it gives way first),
   then small marks and the buttons, which never shrink, wrap or move. */
.main-head > * { flex-shrink: 0; }
.main-head .topic { flex: 0 1 auto; min-width: 40px; max-width: none; }
.main-head .chan-flags { flex: none; }
.chan-flag.icon-only { padding: 4px 6px; }
.main-head .chan-flag { height: 24px; }
/* Live captions in a voice room (beta). */
.voice-cc { margin: 12px 16px 0; padding: 8px 12px 10px; border-radius: 14px; background: rgba(8, 7, 13, .72); border: 1px solid var(--line-2); min-width: 0; }
.voice-cc .cc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.voice-cc .cc-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chip { flex: none; font: 800 10px var(--display); letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: var(--text); color: #08070d; }
.cc-lines { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; max-height: 7.5em; overflow: hidden; }
.cc-line { margin: 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.cc-line b { color: #d8b4fe; font-weight: 700; }
/* A phase's welcome DM: the phase it's from, in the side panel. */
.wdm-card { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; text-align: center; }
.wdm-card b { font-size: 16px; overflow-wrap: anywhere; }
/* Tablets and narrow windows: the voice room's buttons wrap instead of running off the edge. */
@container stage (max-width: 760px) {
  .stage-dock > * { max-width: 100%; min-width: 0; }
  .dock-ctl { flex-wrap: wrap; justify-content: center; }
}
/* Team dashboard: today's usage against the Cloudflare plan (0.24). */
.usage-card { gap: 12px; }
.usage-row { display: grid; gap: 5px; min-width: 0; }
.usage-row .row small { text-align: right; overflow-wrap: anywhere; }
.usage-bar > i { box-shadow: none; }
.usage-row.warn .usage-bar > i { background: #f59e0b; }
.usage-row.bad .usage-bar > i { background: #ef4444; }
.usage-row.bad b { color: #fca5a5; }
