/* Vibein — interface styles.
   Direction: lively, quick, a little cheeky. Graphite chrome stays quiet; people's
   avatars, cosmetics and streams carry the color. Lime is the brand accent and marks
   only what is live right now, the current selection and you being mentioned.
   Spacing on a 4px grid. Type: Geist + Geist Mono. One easing curve. */

:root {
  --bg0: #0f0f10;   /* app + sidebar */
  --bg1: #121213;   /* sunken: inputs, code */
  --bg2: #151516;   /* main panel */
  --bg3: #1c1c1e;   /* hover, raised controls */
  --bg4: #242426;   /* selected */
  --pop: #1a1a1c;   /* menus, modals */
  --line: rgba(237, 237, 237, .07);
  --line2: rgba(237, 237, 237, .11);
  --text: #ededed;
  --muted: #a1a1a6;
  --faint: #7c7c83;
  --btn: #ededed;
  --btn-ink: #121213;
  --accent: #c6f432;
  --accent-ink: #141a03;
  --accent-text: #c6f432;
  --accent-soft: rgba(198, 244, 50, .10);
  --danger: #e5484d;
  --ok: #4cc38a;
  --idle: #e5a84a;
  --dnd: #e5484d;
  --link: #8ab4ff;
  --mention: rgba(198, 244, 50, .05);
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 140ms;
  --t-pop: 180ms;
  --t-enter: 320ms;
  --font: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Geist Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
:root.light {
  --bg0: #f4f4f5;
  --bg1: #fafafa;
  --bg2: #ffffff;
  --bg3: #f1f1f2;
  --bg4: #e8e8ea;
  --pop: #ffffff;
  --line: rgba(23, 23, 23, .08);
  --line2: rgba(23, 23, 23, .13);
  --text: #171717;
  --muted: #525252;
  --faint: #737373;
  --btn: #171717;
  --btn-ink: #ffffff;
  --accent-text: #4d6b00;
  --accent-soft: rgba(110, 150, 0, .12);
  --danger: #dc2626;
  --ok: #16a34a;
  --idle: #c27c0e;
  --dnd: #dc2626;
  --link: #2459c9;
  --mention: rgba(110, 150, 0, .07);
  --shadow: 0 8px 24px rgba(0, 0, 0, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { background: var(--bg0); color: var(--text); font: 400 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
b, strong { font-weight: 600; }
::selection { background: rgba(198, 244, 50, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 14px; height: 14px; }

/* signature: the live dot. Only for things happening right now. */
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.live { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- buttons + fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line2); font-weight: 500; white-space: nowrap; transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.btn:hover { background: var(--bg4); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: color-mix(in srgb, var(--btn) 88%, var(--bg2)); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg3); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; gap: 4px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.icon-btn:hover { background: var(--bg3); color: var(--text); }
.icon-btn.on { color: var(--text); background: var(--bg3); }
.icon-btn.bad { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--muted); }
.input, .field input[type=text], .field input[type=password], .field input[type=number], .field input[type=datetime-local], .field input:not([type]), .field textarea, .field select, select.input {
  width: 100%; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px; outline: none; transition: border-color var(--t-fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 72px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--faint); }
select { background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 8px; color: var(--text); }
.hint { font-size: 12px; color: var(--faint); }
.err { color: var(--danger); font-size: 13px; min-height: 20px; }
input[type=color] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg1); cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 4px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
input[type=range] { accent-color: var(--text); }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--bg4); border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; transition: background-color var(--t-fast) var(--ease); }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--accent-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; height: 20px; border-radius: 4px; font-size: 12px; color: var(--muted); border: 1px solid var(--line2); }
.chip.dim { color: var(--faint); }
.count { min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--btn); color: var(--btn-ink); font: 500 11px/18px var(--mono); text-align: center; font-variant-numeric: tabular-nums; }
kbd { font: 12px var(--mono); background: var(--bg3); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; color: var(--muted); }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--bg0); }
.auth-card { width: min(380px, 100%); background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 32px; animation: enter var(--t-enter) var(--ease); }
.auth-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.auth-logo img { width: 28px; height: 28px; border-radius: 8px; }
.wordmark { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.wordmark b { color: inherit; font-weight: 600; }
.auth-sub { color: var(--muted); margin: 0 0 24px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button { height: 28px; border-radius: 6px; font-weight: 500; color: var(--muted); }
.auth-tabs button.on { background: var(--bg4); color: var(--text); }
.auth-foot { margin-top: 16px; display: flex; justify-content: center; }
.auth-foot select { background: transparent; border: 1px solid var(--line2); color: var(--muted); font-size: 13px; }

/* ---------- shell ---------- */
.shell { height: 100%; display: grid; grid-template-columns: 256px minmax(0, 1fr); background: var(--bg0); }
.panel { margin: 8px 8px 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); display: flex; min-width: 0; min-height: 0; overflow: hidden; }
.tip { position: fixed; z-index: 90; background: var(--pop); border: 1px solid var(--line2); color: var(--text); padding: 4px 8px; border-radius: 6px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); }

/* ---------- sidebar ---------- */
.side { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.brand { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 20px; }
.brand img { width: 20px; height: 20px; border-radius: 6px; }
.brand .wordmark { font-size: 16px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.nav, .crew-row, .ch, .dm-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; margin-bottom: 2px; border-radius: 8px; color: var(--muted); text-align: left; position: relative; font-size: 14px; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.nav:hover, .crew-row:hover, .ch:hover, .dm-item:hover { background: var(--bg3); color: var(--text); }
.nav.on, .crew-row.on, .ch.on, .dm-item.on { background: var(--bg4); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.nav svg, .ch .ic { color: var(--faint); }
.nav.on svg, .ch.on .ic { color: var(--muted); }
.nav .vibes { margin-left: auto; }
.sec-title { display: flex; align-items: center; justify-content: space-between; height: 20px; margin: 24px 0 8px; padding: 0 8px; font-size: 12px; font-weight: 500; color: var(--faint); }
.sec-title button { color: var(--faint); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; }
.sec-title button:hover { color: var(--text); background: var(--bg3); }
.crew-ic { width: 20px; height: 20px; border-radius: 6px; flex: none; display: grid; place-items: center; overflow: hidden; font-size: 10px; font-weight: 600; color: #0b0b0c; }
.crew-ic img { width: 100%; height: 100%; object-fit: cover; }
.crew-row { font-weight: 500; }
.crew-row.unread { color: var(--text); }
.crew-row.unread::after, .ch.unread::after, .dm-item.unread::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); flex: none; }
.crew-row .crew-more { display: none; color: var(--faint); }
.crew-row:hover .crew-more { display: inline-grid; }
.crew-row .crew-more:hover { color: var(--text); }
.crew-row.muted { opacity: .6; }
.crew-rooms { position: relative; padding: 2px 0 8px 20px; }
.crew-rooms::before { content: ""; position: absolute; left: 17px; top: 4px; bottom: 12px; width: 1px; background: var(--line2); }
.crew-rooms .ch { height: 30px; }
.ch.unread { color: var(--text); font-weight: 500; }
.ch .ch-act { display: none; color: var(--faint); }
.ch:hover .ch-act { display: inline-grid; }
.ch .ch-act:hover { color: var(--text); }
.ch .badge, .dm-item .badge { min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--btn); color: var(--btn-ink); font: 500 11px/18px var(--mono); text-align: center; }
.ch .here { display: inline-flex; align-items: center; gap: 4px; font: 12px var(--mono); color: var(--muted); }
.ch.add { color: var(--faint); }
.vc-users { padding: 0 0 4px 24px; display: flex; flex-direction: column; gap: 2px; }
.vc-user { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.vc-user:hover { background: var(--bg3); color: var(--text); cursor: pointer; }
.dm-item { height: 36px; }
.dm-item.unread { color: var(--text); font-weight: 500; }
.crumb { color: var(--muted); font-weight: 400; }
.crumb-sep { color: var(--faint); margin: 0 4px; }

/* voice bar + user bar */
.voicebar { margin: 0 12px 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.voicebar .vb-status { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.voicebar .vb-where { font-size: 12px; color: var(--muted); margin-top: 2px; }
.voicebar .vb-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 12px; }
.voicebar .vb-btns button { height: 32px; border-radius: 8px; background: var(--bg3); display: grid; place-items: center; color: var(--text); transition: background-color var(--t-fast) var(--ease); }
.voicebar .vb-btns button:hover { background: var(--bg4); }
.voicebar .vb-btns button.on { background: var(--btn); color: var(--btn-ink); }
.userbar { height: 56px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 12px 8px; }
.userbar .me { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 4px; border-radius: 8px; text-align: left; }
.userbar .me:hover { background: var(--bg3); }
.userbar .me-name { font-weight: 500; font-size: 13px; }
.userbar .me-sub { font-size: 12px; color: var(--muted); }

/* ---------- main ---------- */
.main { background: var(--bg2); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.main-head .title { font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.main-head .title svg { color: var(--faint); }
.main-head .topic { color: var(--muted); font-size: 13px; border-left: 1px solid var(--line2); padding-left: 12px; margin-left: 4px; }
.main-head .tabs { display: flex; gap: 2px; margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line2); }
.main-head .tabs button { height: 28px; padding: 0 12px; border-radius: 6px; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.main-head .tabs button:hover { background: var(--bg3); color: var(--text); }
.main-head .tabs button.on { background: var(--bg4); color: var(--text); }
.main-head .tabs button.accent { color: var(--text); }
.main-body { flex: 1; display: flex; min-height: 0; }
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 0 8px; overflow-anchor: none; }
.msgs-top { padding: 16px 20px 24px; }
.msgs-top .big-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--bg3); border: 1px solid var(--line2); display: grid; place-items: center; margin-bottom: 12px; color: var(--muted); }
.msgs-top h2 { margin: 0 0 4px; font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 16px 20px 8px; color: var(--faint); font: 12px var(--mono); }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.unread-line { display: flex; align-items: center; gap: 12px; margin: 8px 20px; color: var(--accent-text); font: 500 12px var(--mono); }
.unread-line::before, .unread-line::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 50%, transparent); }
.jump-unread { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--btn); color: var(--btn-ink); font-size: 13px; font-weight: 500; box-shadow: var(--shadow); }
.chat { position: relative; }
.msg { position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 2px 20px 2px 16px; }
.msg.first { margin-top: 16px; padding-top: 4px; }
.msg:hover { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.msg.mentioned { background: var(--mention); box-shadow: inset 2px 0 0 var(--accent); }
.msg.editing { background: color-mix(in srgb, var(--text) 3%, transparent); }
.msg .gutter { padding-top: 2px; }
.msg .gutter .ts { display: none; font: 11px/22px var(--mono); color: var(--faint); text-align: right; }
.msg:not(.first):hover .gutter .ts { display: block; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-head .when { font: 12px var(--mono); color: var(--faint); }
.msg-name { font-weight: 500; cursor: pointer; }
.msg-name:hover { text-decoration: underline; }
.msg-body { overflow-wrap: anywhere; min-width: 0; }
.msg-body .edited { font-size: 12px; color: var(--faint); margin-left: 4px; }
.msg-reply { grid-column: 2; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 2px; cursor: pointer; position: relative; }
.msg-reply::before { content: ""; position: absolute; left: -36px; top: 10px; width: 28px; height: 10px; border-left: 2px solid var(--bg4); border-top: 2px solid var(--bg4); border-top-left-radius: 8px; }
.msg-reply:hover { color: var(--text); }
.fwd { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); margin: 2px 0; }
.fwd-body { border-left: 2px solid var(--line2); padding-left: 12px; margin: 2px 0; }
.msg-tools { position: absolute; right: 16px; top: -16px; display: none; background: var(--pop); border: 1px solid var(--line2); border-radius: 8px; padding: 2px; z-index: 2; box-shadow: var(--shadow); }
.msg:hover .msg-tools { display: flex; }
.msg-tools button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 15px; }
.msg-tools button:hover { background: var(--bg3); color: var(--text); }
.pinned-mark { color: var(--faint); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.bot-tag { font: 500 10px var(--mono); border: 1px solid var(--line2); color: var(--muted); border-radius: 4px; padding: 0 4px; height: 16px; display: inline-flex; align-items: center; align-self: center; }
.blocked-msg { grid-column: 2; font-size: 13px; color: var(--faint); padding: 2px 0; }
.blocked-msg button { color: var(--muted); text-decoration: underline; font-size: 13px; }
.md-quote { border-left: 2px solid var(--line2); padding: 0 0 0 12px; margin: 2px 0; }
.md-h1 { font-size: 20px; font-weight: 600; margin: 8px 0 4px; }
.md-h2 { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.md-h3 { font-size: 15px; font-weight: 600; margin: 4px 0 2px; }
.md-li { padding-left: 16px; position: relative; }
.md-li::before { content: "•"; position: absolute; left: 4px; color: var(--muted); }
code.inline { font-family: var(--mono); font-size: 13px; background: var(--bg1); border: 1px solid var(--line); padding: 0 4px; border-radius: 4px; }
pre.code { font-family: var(--mono); font-size: 13px; background: var(--bg1); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 4px 0; overflow-x: auto; white-space: pre; max-width: 720px; }
.spoiler { background: var(--bg4); color: transparent; border-radius: 4px; padding: 0 2px; cursor: pointer; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.spoiler.shown { background: color-mix(in srgb, var(--text) 8%, transparent); color: inherit; }
.mention { background: var(--accent-soft); color: var(--accent-text); border-radius: 4px; padding: 0 2px; font-weight: 500; cursor: pointer; }
.mention:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cemoji { width: 22px; height: 22px; display: inline-block; vertical-align: -5px; object-fit: contain; }
.jumbo .cemoji { width: 48px; height: 48px; }
.jumbo .uemoji { font-size: 44px; line-height: 1.15; }
.attachments { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; align-items: flex-start; }
.att-img { max-width: min(420px, 100%); max-height: 340px; border-radius: 8px; cursor: zoom-in; object-fit: contain; background: var(--bg1); }
.att-video { max-width: min(520px, 100%); max-height: 380px; border-radius: 8px; background: #000; }
.att-audio { width: min(420px, 100%); }
.att-file { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg1); border: 1px solid var(--line); border-radius: 8px; min-width: 260px; max-width: 420px; }
.att-file .fname { font-weight: 500; }
.att-spoiler { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; }
.att-spoiler > * { filter: blur(40px); pointer-events: none; }
.att-spoiler::after { content: "Spoiler"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 500; color: #fff; background: rgba(0, 0, 0, .4); }
.att-spoiler.shown > * { filter: none; pointer-events: auto; }
.att-spoiler.shown::after { display: none; }
.sticker { width: 160px; height: 160px; object-fit: contain; margin-top: 4px; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bg3); border: 1px solid var(--line); font-size: 14px; transition: border-color var(--t-fast) var(--ease); }
.react:hover { border-color: var(--line2); }
.react.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.react .n { font: 12px var(--mono); color: var(--muted); }
.react.mine .n { color: var(--accent-text); }
.react img { width: 16px; height: 16px; object-fit: contain; }
.edit-box textarea { width: 100%; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px; resize: none; outline: none; }
.edit-box .hint { margin-top: 4px; }

/* composer */
.composer-wrap { padding: 0 16px 4px; flex: none; }
.replying { display: flex; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid var(--line2); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 4px 4px 4px 12px; font-size: 13px; color: var(--muted); }
.pending-files { display: flex; gap: 12px; overflow-x: auto; background: var(--bg3); border: 1px solid var(--line2); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 12px; }
.pending-file { width: 148px; flex: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; position: relative; }
.pending-file .thumb { height: 100px; border-radius: 4px; background: var(--bg1) center / cover; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.pending-file .thumb video { width: 100%; height: 100%; object-fit: cover; }
.pending-file .pf-name { font-size: 12px; margin-top: 8px; }
.pending-file .bar { height: 4px; background: var(--bg4); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.pending-file .bar i { display: block; height: 100%; background: var(--text); width: 0; transition: width var(--t-pop) linear; }
.pending-file .pf-x { position: absolute; top: 4px; right: 4px; background: var(--pop); border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; }
.pending-file .pf-spoil { position: absolute; top: 4px; left: 4px; background: var(--pop); border-radius: 6px; height: 24px; padding: 0 8px; font-size: 11px; font-weight: 500; }
.pending-file .pf-spoil.on { background: var(--btn); color: var(--btn-ink); }
.composer { display: flex; align-items: flex-end; gap: 2px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 12px; padding: 4px; }
.replying + .composer, .pending-files + .composer, .replying + .pending-files { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer textarea { flex: 1; resize: none; border: 0; outline: none; background: transparent; padding: 8px 4px; max-height: 40vh; min-height: 40px; line-height: 24px; }
.composer .icon-btn { height: 40px; width: 36px; }
.composer .count { align-self: center; background: none; color: var(--faint); min-width: 0; height: auto; padding: 0 4px; font: 12px var(--mono); }
.composer .count.over { color: var(--danger); }
.typing-line { height: 24px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.typing-line b { color: var(--text); font-weight: 500; }
.autocomplete { background: var(--pop); border: 1px solid var(--line2); border-radius: 12px; margin-bottom: 8px; padding: 4px; max-height: 260px; overflow-y: auto; box-shadow: var(--shadow); }
.autocomplete .ac-title { font-size: 12px; color: var(--faint); padding: 4px 8px; }
.autocomplete button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 4px 8px; height: 36px; border-radius: 8px; text-align: left; }
.autocomplete button.sel, .autocomplete button:hover { background: var(--bg4); }
.recording { display: flex; align-items: center; gap: 12px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 12px; padding: 8px 8px 8px 12px; margin-bottom: 8px; font-size: 13px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.rec-time { font: 500 13px var(--mono); }

/* ---------- members ---------- */
#right { display: flex; min-height: 0; }
.members { height: 100%; width: 248px; background: var(--bg2); border-left: 1px solid var(--line); overflow-y: auto; padding: 4px 12px 12px; flex: none; }
.members .sec-title { margin: 16px 0 4px; }
.member { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 8px; margin-bottom: 2px; border-radius: 8px; text-align: left; position: relative; overflow: hidden; transition: background-color var(--t-fast) var(--ease); }
.member:hover { background: var(--bg3); }
.member.offline { opacity: .45; }
.member .m-name { font-weight: 500; font-size: 14px; }
.member .m-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.member > * { position: relative; z-index: 1; }

/* ---------- avatars ---------- */
.av { --s: 40px; position: relative; width: var(--s); height: var(--s); flex: none; }
.av > .av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--bg4); }
.av > .av-fb { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-weight: 500; color: #121213; font-size: calc(var(--s) * .4); }
.av .st { position: absolute; right: -2px; bottom: -2px; width: calc(var(--s) * .34); height: calc(var(--s) * .34); min-width: 10px; min-height: 10px; border-radius: 50%; border: 3px solid var(--st-bg, var(--bg2)); background: var(--faint); z-index: 3; }
.av .st.online { background: var(--ok); }
.av .st.idle { background: var(--idle); }
.av .st.dnd { background: var(--dnd); }
.av .st.offline { background: var(--bg4); box-shadow: inset 0 0 0 2px var(--faint); }
.av.speaking > .av-img, .av.speaking > .av-fb { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--ok); }
.nm { font-weight: 500; }
.stag { display: inline-flex; align-items: center; gap: 4px; font: 500 11px var(--mono); padding: 0 4px; height: 16px; border-radius: 4px; border: 1px solid var(--line2); color: var(--muted); margin-left: 4px; vertical-align: 2px; }
.role-ic { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-left: 4px; object-fit: contain; font-size: 14px; }

/* ---------- profile card (a moment: people's colors live here) ---------- */
.pcard { width: 320px; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, var(--t1, #1c1c1e), var(--t2, #151516)); position: relative; box-shadow: var(--shadow); border: 1px solid var(--line); }
.pcard.themed { padding: 4px; border: 0; }
.pcard.themed > .pc-inner { border-radius: 12px; overflow: hidden; }
.pc-inner { position: relative; }
.pc-banner { height: 112px; background: var(--bnr, var(--bg4)) center / cover; }
.pc-av { position: absolute; left: 16px; top: 68px; }
.pc-av .av { --st-bg: var(--t1, #1c1c1e); }
.pc-av .av > .av-img, .pc-av .av > .av-fb { box-shadow: 0 0 0 6px var(--t1, #1c1c1e); }
.pc-badges { display: flex; justify-content: flex-end; gap: 4px; padding: 8px 12px 0; min-height: 36px; }
.pc-body { margin: 20px 12px 12px; background: rgba(0, 0, 0, .32); border-radius: 12px; padding: 12px; }
:root.light .pc-body { background: rgba(255, 255, 255, .7); }
.pc-name { font-size: 20px; line-height: 1.2; font-weight: 500; }
.pc-user { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pc-sec { border-top: 1px solid var(--line2); margin-top: 12px; padding-top: 12px; }
.pc-sec h4 { margin: 0 0 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.pc-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-role { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); padding: 2px 8px; border-radius: 6px; }
.pc-role i { width: 8px; height: 8px; border-radius: 50%; }
.badge-ic { height: 20px; padding: 0 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; font: 500 11px var(--mono); background: rgba(0, 0, 0, .45); color: #ededed; }
.badge-ic.plus { color: #c6f432; }

/* ---------- popovers / menus ---------- */
.pop { position: fixed; z-index: 70; animation: enter-pop var(--t-pop) var(--ease); }
.menu { background: var(--pop); border: 1px solid var(--line2); border-radius: 12px; padding: 4px; min-width: 208px; box-shadow: var(--shadow); }
.menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border-radius: 8px; text-align: left; font-size: 14px; color: var(--text); }
.menu button svg { color: var(--muted); }
.menu button:hover { background: var(--bg4); }
.menu button.bad { color: var(--danger); }
.menu button.bad svg { color: var(--danger); }
.menu button.bad:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.menu hr { border: 0; height: 1px; background: var(--line2); margin: 4px 8px; }
.picker { width: 360px; height: 400px; background: var(--pop); border: 1px solid var(--line2); border-radius: 12px; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.picker-top { padding: 8px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.picker-top input { flex: 1; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 12px; outline: none; }
.picker-tabs { display: flex; gap: 2px; }
.picker-tabs button { padding: 0 12px; height: 32px; border-radius: 8px; font-weight: 500; font-size: 13px; color: var(--muted); }
.picker-tabs button.on { background: var(--bg4); color: var(--text); }
.picker-body { flex: 1; overflow-y: auto; padding: 4px 8px 8px; }
.picker-sec { font-size: 12px; color: var(--faint); padding: 8px 4px 4px; }
.picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.picker-grid button { aspect-ratio: 1; border-radius: 8px; font-size: 24px; display: grid; place-items: center; }
.picker-grid button:hover { background: var(--bg4); }
.picker-grid img { width: 28px; height: 28px; object-fit: contain; }
.picker-grid.stickers { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.picker-grid.stickers img { width: 88px; height: 88px; }
.picker-foot { height: 36px; border-top: 1px solid var(--line); display: flex; align-items: center; padding: 0 12px; font-size: 13px; color: var(--muted); }

/* ---------- modals ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: grid; place-items: center; padding: 20px; animation: fade var(--t-pop) var(--ease); }
.modal { width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--pop); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); animation: enter var(--t-enter) var(--ease); }
.modal-head { padding: 24px 24px 4px; }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.modal-body { padding: 16px 24px; }
.modal-foot { padding: 12px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line2); border-radius: 12px; text-align: left; margin-bottom: 8px; background: var(--bg3); transition: border-color var(--t-fast) var(--ease); }
.choice:hover { border-color: var(--faint); }
.choice .ci { width: 40px; height: 40px; border-radius: 8px; background: var(--bg4); color: var(--text); display: grid; place-items: center; flex: none; }
.icon-upload { width: 88px; height: 88px; border-radius: 20px; border: 1px dashed var(--faint); display: grid; place-items: center; margin: 0 auto 16px; cursor: pointer; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; }
.icon-upload:hover { border-color: var(--text); color: var(--text); }
.icon-upload img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 80; display: grid; place-items: center; cursor: zoom-out; animation: fade var(--t-pop) var(--ease); }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox a { position: absolute; bottom: 20px; color: #a1a1a6; font-size: 13px; }
.modal-switcher { padding: 0; overflow: hidden; }
.switcher input { width: 100%; border: 0; border-bottom: 1px solid var(--line2); background: transparent; padding: 16px 20px; font-size: 16px; outline: none; }
.sw-list { max-height: 360px; overflow-y: auto; padding: 4px; }
.sw-list button { display: flex; align-items: center; gap: 12px; width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; text-align: left; }
.sw-list button.sel, .sw-list button:hover { background: var(--bg4); }
.sw-kind { font: 12px var(--mono); color: var(--faint); width: 56px; flex: none; }
.sw-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line2); font-size: 12px; color: var(--faint); }

/* ---------- settings (full screen) ---------- */
.settings { position: fixed; inset: 0; z-index: 55; display: grid; grid-template-columns: minmax(208px, 1fr) minmax(0, 760px) minmax(64px, .6fr); background: var(--bg2); animation: fade var(--t-pop) var(--ease); }
.settings-nav { background: var(--bg0); display: flex; justify-content: flex-end; padding: 48px 12px 20px; overflow-y: auto; }
.settings-nav > div { width: 208px; }
.settings-nav .nav-title { font-size: 12px; font-weight: 500; color: var(--faint); padding: 0 8px; margin: 20px 0 8px; }
.settings-nav .nav-title:first-child { margin-top: 0; }
.settings-nav button { display: flex; width: 100%; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--muted); text-align: left; font-weight: 400; margin-bottom: 2px; gap: 8px; align-items: center; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.settings-nav button:hover { background: var(--bg3); color: var(--text); }
.settings-nav button.on { background: var(--bg4); color: var(--text); }
.settings-nav button.bad { color: var(--danger); }
.settings-nav hr { border: 0; height: 1px; background: var(--line2); margin: 12px 8px; }
.settings-main { padding: 48px 40px 80px; overflow-y: auto; }
.settings-main h1 { font-size: 24px; font-weight: 500; margin: 0 0 4px; letter-spacing: -.01em; }
.settings-main > p.muted, .settings-main h1 + p { margin: 0; }
.settings-main h3 { font-size: 14px; font-weight: 500; color: var(--text); margin: 32px 0 12px; }
.settings-close { padding: 48px 20px; }
.settings-close button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.settings-close button:hover { border-color: var(--faint); color: var(--text); }
.settings-close span { display: block; font: 11px var(--mono); color: var(--faint); margin-top: 4px; width: 36px; text-align: center; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 32px 0 12px; }
.section-head h3 { margin: 0 !important; }
.split { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.sticky { position: sticky; top: 0; }
.save-row { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.locked-set { opacity: .45; pointer-events: none; user-select: none; }
.plus-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; font-size: 12px; color: var(--muted); border: 1px solid var(--line2); border-radius: 4px; padding: 0 6px; }
.free-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--bg3); border: 1px solid var(--line2); margin: 12px 0 8px; font-size: 14px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.opt { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 8px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--bg1); font-size: 12px; color: var(--muted); text-align: center; position: relative; overflow: hidden; min-height: 88px; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.opt:hover { border-color: var(--faint); color: var(--text); }
.opt.on { border-color: var(--text); color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.opt .np-demo { width: 100%; height: 32px; border-radius: 8px; position: relative; overflow: hidden; background: var(--bg2); }
.opt .fx-demo { width: 100%; height: 48px; border-radius: 8px; position: relative; overflow: hidden; background: var(--bg2); }
.opt .fr-demo { width: 52px; height: 52px; border-radius: 12px; }
.opt .fr-demo > div { width: 100%; height: 100%; border-radius: 8px; background: var(--bg2); }
.opt .name-demo { font-size: 16px; }
.color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.swatches { display: flex; gap: 4px; flex-wrap: wrap; }
.swatches button { width: 24px; height: 24px; border-radius: 6px; border: 2px solid transparent; }
.swatches button.on { border-color: var(--text); }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); margin-bottom: 8px; }
.role-pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 8px; background: var(--bg3); font-size: 13px; cursor: pointer; border: 1px solid var(--line); }
.role-pill.on { border-color: var(--text); }
.role-pill i { width: 8px; height: 8px; border-radius: 50%; }
.roles-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.roles-list button { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border-radius: 8px; text-align: left; color: var(--muted); }
.roles-list button:hover { background: var(--bg3); color: var(--text); }
.roles-list button.on { background: var(--bg4); color: var(--text); }
.roles-list i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.perm-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perm-row b { font-weight: 500; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.asset { background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; position: relative; }
.asset img { width: 48px; height: 48px; object-fit: contain; }
.asset.st img { width: 80px; height: 80px; }
.asset button { position: absolute; top: 4px; right: 4px; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.asset:hover button { opacity: 1; }
.seg { display: inline-flex; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 2px; }
.seg button { height: 28px; padding: 0 12px; border-radius: 6px; color: var(--muted); font-size: 13px; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg button.on { background: var(--bg4); color: var(--text); }

/* ---------- pages ---------- */
.page { flex: 1; overflow-y: auto; padding: 32px; animation: enter var(--t-enter) var(--ease); }
.page.narrow { max-width: 800px; }
.page h1 { margin: 0 0 4px; font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.page p { margin: 4px 0 16px; }
.list-label { font-size: 12px; color: var(--faint); margin: 4px 0 8px; }
.person { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 12px; border-radius: 12px; border-top: 1px solid var(--line); transition: background-color var(--t-fast) var(--ease); }
.person:hover { background: var(--bg3); border-top-color: transparent; }
.person:hover + .person { border-top-color: transparent; }
.person .icon-btn { background: var(--bg3); border-radius: 50%; }
.person:hover .icon-btn { background: var(--bg2); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.add-friend h2 { margin: 0; font-size: 18px; font-weight: 500; }
.add-friend form { margin-top: 12px; }
.add-friend .hint { margin-top: 8px; min-height: 20px; }
.empty-state { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }

/* vibes */
.vibes { display: inline-flex; align-items: center; gap: 4px; font: 500 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.vibes svg { width: 12px; height: 12px; fill: var(--muted); stroke: none; }
.vibes.dim { color: var(--muted); font-weight: 400; font-size: 12px; }
.vibes.lg { font-size: 20px; }
.vibes.lg svg { width: 16px; height: 16px; fill: var(--accent); }
.btn .vibes { color: inherit; }
.btn .vibes svg { fill: currentColor; }

/* quests */
.quest { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--bg1); }
.quest b { font-weight: 500; }
.quest.claimed { opacity: .55; }
.quest .q-ic { width: 36px; height: 36px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); flex: none; }
.quest .muted { font-size: 13px; }
.quest .bar { height: 4px; background: var(--bg4); border-radius: 2px; margin-top: 8px; overflow: hidden; max-width: 320px; }
.quest .bar i { display: block; height: 100%; background: var(--text); border-radius: 2px; }
.quest .q-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 12px var(--mono); color: var(--muted); }
.quest.checkin { margin-bottom: 20px; }
.streak { display: flex; gap: 4px; margin-top: 8px; }
.streak i { width: 24px; height: 4px; border-radius: 2px; background: var(--bg4); }
.streak i.on { background: var(--accent); }

/* shop */
.shop-switch { display: inline-flex; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 2px; }
.shop-switch button { height: 28px; padding: 0 12px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.shop-switch button.on { background: var(--bg4); color: var(--text); }
.shop-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.shop-bar .input { width: 240px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin-bottom: 24px; }
.shop-item { background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; transition: border-color var(--t-fast) var(--ease); }
.shop-item:hover { border-color: var(--line2); }
.shop-item b { font-weight: 500; }
.shop-item .preview { height: 92px; width: 100%; display: grid; place-items: center; position: relative; border-radius: 8px; background: var(--bg2); overflow: hidden; }
.shop-item .price { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; min-height: 20px; }
.shop-item .price s { color: var(--faint); font: 12px var(--mono); }
.price .free { color: var(--muted); }
.creator { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.status-pill { font-size: 11px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line2); color: var(--muted); }
.status-pill.pending { color: var(--idle); }
.status-pill.rejected, .status-pill.removed { color: var(--danger); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg3); transition: border-color var(--t-fast) var(--ease); }
.pack:hover { border-color: var(--faint); }
.make-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 16px; }
.make-preview > div { height: 120px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); display: grid; place-items: center; position: relative; overflow: hidden; }
.review-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line2); border-radius: 12px; margin-bottom: 8px; }
.review-row .rv-prev { width: 80px; height: 80px; border-radius: 8px; background: var(--bg2); display: grid; place-items: center; position: relative; overflow: hidden; flex: none; }

/* checkout */
.co-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.co-line b, .co-total b { font: 500 14px var(--mono); }
.co-total { display: flex; padding: 16px 0 0; font-size: 16px; }

/* vibein+ */
.plus-hero { padding: 8px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.plus-hero h1 { font-size: 32px !important; font-weight: 500 !important; letter-spacing: -.02em; }
.plus-sign { color: var(--accent-text); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; max-width: 464px; }
.plan { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg1); text-align: left; transition: border-color var(--t-fast) var(--ease); }
.plan b { font: 500 24px var(--mono); }
.plan:hover { border-color: var(--text); }
.plan-status { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding: 16px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg1); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
table.compare td { padding: 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.compare td:first-child { color: var(--muted); }
table.compare th:last-child, table.compare td:last-child { color: var(--text); }
.pos { color: var(--ok); text-align: right; font-family: var(--mono); }
.neg { color: var(--muted); text-align: right; font-family: var(--mono); }

/* polls */
.poll { margin-top: 8px; max-width: 440px; border: 1px solid var(--line2); border-radius: 12px; padding: 12px; background: var(--bg1); }
.poll-q { font-weight: 500; margin-bottom: 12px; }
.poll-opt { position: relative; display: flex; align-items: center; width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; margin-bottom: 4px; overflow: hidden; text-align: left; background: var(--bg2); transition: border-color var(--t-fast) var(--ease); }
.poll-opt > * { position: relative; }
.poll-opt i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--text) 7%, transparent); transition: width var(--t-enter) var(--ease); }
.poll-opt.mine { border-color: var(--text); }
.poll-opt:hover { border-color: var(--faint); }
.poll-opt .pct { color: var(--muted); font: 12px var(--mono); }
.poll-foot { font-size: 12px; color: var(--faint); margin-top: 4px; }

/* voice messages */
.vnote { --p: 0%; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--line2); border-radius: 24px; background: var(--bg1); width: 300px; max-width: 100%; }
.vn-play { width: 32px; height: 32px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; flex: none; }
.vn-play svg { fill: currentColor; }
.vn-bars { flex: 1; height: 24px; display: flex; align-items: center; gap: 2px; position: relative; }
.vn-bars i { flex: 1; border-radius: 2px; min-height: 4px; background: var(--faint); }
.vn-bars::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); border-right: 2px solid var(--text); pointer-events: none; }
.vnote.playing .vn-bars i { background: var(--muted); }
.vn-time { font: 12px var(--mono); color: var(--muted); min-width: 32px; text-align: right; }

/* discover */
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chips button { height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line2); color: var(--muted); font-size: 13px; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chips button:hover { color: var(--text); border-color: var(--faint); }
.chips button.on { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 12px; }
.crew-card { border: 1px solid var(--line); border-radius: 16px; background: var(--bg1); overflow: hidden; position: relative; display: flex; flex-direction: column; transition: border-color var(--t-fast) var(--ease); }
.crew-card:hover { border-color: var(--line2); }
.cc-banner { height: 92px; background-size: cover; background-position: center; }
.cc-icon { position: absolute; left: 16px; top: 64px; width: 48px; height: 48px; border-radius: 12px; border: 4px solid var(--bg1); display: grid; place-items: center; font-weight: 600; color: #0b0b0c; overflow: hidden; }
.cc-icon img { width: 100%; height: 100%; object-fit: cover; }
.cc-body { padding: 32px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-body b { font-weight: 500; }
.cc-desc { margin: 0 !important; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cc-tags span { font: 11px var(--mono); color: var(--muted); background: var(--bg3); border-radius: 4px; padding: 0 4px; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; font-size: 12px; }
.cc-foot .muted { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--accent); }

/* bots */
.bot-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 12px; background: var(--bg1); }
.bot-card b { font-weight: 500; }
.bot-ic { width: 36px; height: 36px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); flex: none; }
.bot-opts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bot-opts .field:last-child { margin-bottom: 0; }

/* events */
.event-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg1); margin-bottom: 8px; }
.event-date { width: 48px; flex: none; text-align: center; border: 1px solid var(--line2); border-radius: 8px; padding: 4px 0; height: fit-content; }
.event-date small { display: block; font: 11px var(--mono); color: var(--muted); }
.event-date b { display: block; font: 500 20px/1.2 var(--mono); }
.event-card .ev-title { font-weight: 500; }
.event-card .ev-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 2px; font-family: var(--mono); }
.event-card .ev-desc { font-size: 13px; color: var(--muted); margin-top: 8px; }
.event-card.now { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* saved messages */
.saved-row { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg1); margin-bottom: 8px; cursor: pointer; transition: border-color var(--t-fast) var(--ease); }
.saved-row:hover { border-color: var(--line2); }
.saved-row .sv-meta { font-size: 12px; color: var(--faint); display: flex; gap: 8px; margin-bottom: 4px; font-family: var(--mono); }

/* ---------- voice stage (a moment: people's streams) ---------- */
.stage { flex: 1; display: flex; flex-direction: column; background: #09090a; min-height: 0; }
:root.light .stage { background: #18181a; color: #ededed; }
.stage-grid { flex: 1; display: grid; gap: 12px; padding: 16px; align-content: center; justify-content: center; min-height: 0; overflow: auto; }
.tile { position: relative; background: #1c1c1e; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; min-width: 0; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow var(--t-fast) var(--ease); }
.tile.speaking { box-shadow: inset 0 0 0 2px var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.screen video { object-fit: contain; }
.tile.self video.mirror { transform: scaleX(-1); }
.tile .tname { position: absolute; left: 12px; bottom: 12px; background: rgba(0, 0, 0, .6); color: #ededed; padding: 4px 8px; border-radius: 8px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; z-index: 2; }
.tile .ttools { position: absolute; right: 12px; top: 12px; display: none; gap: 4px; z-index: 2; }
.tile:hover .ttools { display: flex; }
.tile .ttools button { height: 32px; padding: 0 12px; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #ededed; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.tile .ttools button:hover { background: #ededed; color: #121213; }
.tile .live-tag { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, .6); color: #ededed; font: 500 11px var(--mono); padding: 2px 8px; border-radius: 4px; z-index: 2; }
.tile .live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c6f432; }
.tile .q-tag { position: absolute; left: 72px; top: 12px; background: rgba(0, 0, 0, .6); color: #a1a1a6; font: 11px var(--mono); padding: 2px 8px; border-radius: 4px; z-index: 2; }
.stage-bar { flex: none; display: flex; justify-content: center; gap: 8px; padding: 16px; }
.stage-bar button { width: 48px; height: 48px; border-radius: 50%; background: #242426; color: #ededed; display: grid; place-items: center; transition: background-color var(--t-fast) var(--ease); }
.stage-bar button:hover { background: #2e2e31; }
.stage-bar button.on { background: #ededed; color: #121213; }
.stage-bar button.off { background: #ededed; color: #121213; }
.stage-bar button.leave { background: var(--danger); color: #fff; }
.stage-empty { flex: 1; display: grid; place-items: center; text-align: center; color: #a1a1a6; }
.stage-empty h2 { color: #ededed; margin: 12px 0 4px; font-weight: 500; }
.call-bar { background: #09090a; color: #ededed; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.call-bar .call-avs { display: flex; gap: 16px; }

/* ---------- toasts, ring, drop ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--pop); border: 1px solid var(--line2); padding: 8px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: enter var(--t-pop) var(--ease); display: flex; align-items: center; gap: 8px; }
.toast.bad::before, .toast.good::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.toast.bad::before { background: var(--danger); }
.toast.good::before { background: var(--ok); }
.ring { position: fixed; right: 20px; bottom: 20px; z-index: 95; width: 280px; background: var(--pop); border: 1px solid var(--line2); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow); animation: enter var(--t-enter) var(--ease); }
.ring .row button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.drop-overlay { position: fixed; inset: 0; z-index: 85; background: color-mix(in srgb, var(--bg0) 88%, transparent); display: grid; place-items: center; pointer-events: none; }
.drop-overlay div { border: 1px dashed var(--faint); border-radius: 20px; padding: 40px 64px; text-align: center; font-size: 20px; font-weight: 500; }
.drop-overlay small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; margin-top: 4px; }

/* ---------- motion ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes enter-pop { from { opacity: 0; transform: translateY(4px); } }
:root.reduce-motion *, :root.reduce-motion *::before, :root.reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .page, .modal, .auth-card, .pop, .toast { animation: none; } }

/* ---------- density ---------- */
:root.compact .msg.first { margin-top: 8px; padding-top: 2px; }
:root.compact .msg { padding-top: 0; padding-bottom: 0; }
:root.compact .nav, :root.compact .crew-row, :root.compact .ch { height: 28px; }
:root.compact .crew-rooms .ch { height: 26px; }
:root.compact .dm-item { height: 32px; }
:root.compact .member { height: 36px; }
:root.compact .sec-title { margin: 16px 0 4px; }
:root.compact .day-sep { margin: 8px 20px 4px; }
:root.compact .composer textarea { min-height: 36px; padding: 6px 4px; }

/* ---------- small screens ---------- */
.icon-btn.mob { display: none; }
@media (max-width: 960px) { .members { display: none; } .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .panel { margin: 0; border-radius: 0; border: 0; }
  .shell .side { display: none; }
  .shell.side-open .side { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 40; background: var(--bg0); border-right: 1px solid var(--line); }
  .icon-btn.mob { display: inline-grid; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav, .settings-close { display: none; }
  .settings-main { padding: 20px; }
  .page { padding: 20px; }
  .main-head .tabs { overflow-x: auto; }
}

/* ---------- right to left ---------- */
[dir=rtl] .crew-rooms { padding: 2px 20px 8px 0; }
[dir=rtl] .crew-rooms::before { left: auto; right: 17px; }
[dir=rtl] .vc-users { padding: 0 24px 4px 0; }
[dir=rtl] .msg-reply::before { left: auto; right: -36px; border-left: 0; border-right: 2px solid var(--bg4); border-top-left-radius: 0; border-top-right-radius: 8px; }
[dir=rtl] .msg-tools { right: auto; left: 16px; }
[dir=rtl] .panel { margin: 8px 0 8px 8px; }
[dir=rtl] .members { border-left: 0; border-right: 1px solid var(--line); }
[dir=rtl] .av .st { right: auto; left: -2px; }
[dir=rtl] .pc-av { left: auto; right: 16px; }
[dir=rtl] .pc-badges { justify-content: flex-start; }
[dir=rtl] .main-head .tabs, [dir=rtl] .main-head .topic { margin-left: 0; padding-left: 0; border-left: 0; margin-right: 12px; padding-right: 12px; border-right: 1px solid var(--line2); }
[dir=rtl] .settings-nav { justify-content: flex-start; }
[dir=rtl] .cc-icon { left: auto; right: 16px; }
[dir=rtl] table.compare th { text-align: right; }
[dir=rtl] .fwd-body, [dir=rtl] .md-quote { border-left: 0; padding-left: 0; border-right: 2px solid var(--line2); padding-right: 12px; }

/* ---------- group chats, pickers, extra badges ---------- */
.group-ic { border-radius: 8px; background: var(--bg4); color: var(--muted); display: inline-grid; place-items: center; overflow: hidden; flex: none; }
.group-ic img { width: 100%; height: 100%; object-fit: cover; }
.pick-box { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line2); flex: none; }
.sw-list button.picked .pick-box { background: var(--btn); border-color: var(--btn); box-shadow: inset 0 0 0 3px var(--pop); }
.badge-ic.creator { color: #ffd166; }
.badge-ic.partner { color: #ff9ec0; }

/* ---------- GIFs ---------- */
.gif-btn { width: auto !important; padding: 0 8px; font: 600 11px var(--mono); letter-spacing: .02em; }
.gif-picker { width: 400px; height: 440px; }
.gif-grid { columns: 2; column-gap: 4px; }
.gif-cell { position: relative; break-inside: avoid; margin-bottom: 4px; border-radius: 8px; overflow: hidden; background: var(--bg3); }
.gif-cell img { width: 100%; display: block; cursor: pointer; }
.gif-star { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; display: grid; place-items: center; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.gif-cell:hover .gif-star, .gif-embed:hover .gif-star, .gif-star.on { opacity: 1; }
.gif-star.on { color: #ffd166; }
.gif-embed { position: relative; margin-top: 4px; max-width: min(360px, 100%); border-radius: 8px; overflow: hidden; background: var(--bg3); }
.gif-embed img, .gif-embed video { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------- super reactions ---------- */
.react.super { position: relative; border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, var(--bg3)); }
.react.super img, .react.super > :first-child { animation: super-bob 2.4s var(--ease) infinite; }
@keyframes super-bob { 0%, 80%, 100% { transform: none; } 88% { transform: scale(1.25) rotate(-8deg); } }
.burst { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.burst i { position: absolute; font-style: normal; font-size: 16px; transform: translate(-50%, -50%); animation: burst 700ms var(--ease) forwards; }
.burst i img { width: 16px; height: 16px; }
@keyframes burst { to { transform: translate(-50%, -50%) rotate(var(--a)) translateY(-36px) scale(.6); opacity: 0; } }

/* ---------- soundboard ---------- */
.sound-board { width: 320px; padding: 8px; }
.sound-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.sound-btn { display: flex !important; align-items: center; gap: 8px; height: 36px !important; padding: 0 8px !important; border-radius: 8px; background: var(--bg3) !important; font-size: 13px !important; }
.sound-btn:hover { background: var(--bg4) !important; color: var(--text) !important; }

/* ---------- name style presets, color themes ---------- */
.grad-presets { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.grad-presets button { width: 40px; height: 24px; border-radius: 6px; border: 1px solid var(--line2); }
.theme-swatches { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 320px; }
.theme-swatches button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; }
.theme-swatches button.on { border-color: var(--text); }
:root.ct-dusk { --bg0: #110f17; --bg1: #15121c; --bg2: #18151f; --bg3: #211d2b; --bg4: #2a2537; --pop: #1d1a26; }
:root.ct-ocean { --bg0: #0b1216; --bg1: #0e161b; --bg2: #11191f; --bg3: #18232b; --bg4: #1f2d37; --pop: #152028; }
:root.ct-forest { --bg0: #0d120f; --bg1: #101612; --bg2: #131a15; --bg3: #1a241d; --bg4: #222f26; --pop: #17201a; }
:root.ct-berry { --bg0: #140e12; --bg1: #191116; --bg2: #1c1419; --bg3: #261b22; --bg4: #31222c; --pop: #22171e; }
:root.ct-ember { --bg0: #140f0c; --bg1: #19130f; --bg2: #1c1612; --bg3: #261e18; --bg4: #31261f; --pop: #221a15; }
:root.ct-midnight { --bg0: #0a0b13; --bg1: #0d0e18; --bg2: #10111c; --bg3: #171928; --bg4: #1f2234; --pop: #151726; }

/* ---------- categories, threads, forums, moderation, mentions ---------- */
.cat { display: flex; align-items: center; gap: 2px; margin: 12px 0 2px; padding-right: 4px; }
.cat:first-child { margin-top: 4px; }
.cat-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px; color: var(--faint); font-size: 12px; font-weight: 500; border-radius: 6px; }
.cat-row:hover { color: var(--muted); }
.cat-row .i { transition: transform var(--t-fast) var(--ease); }
.cat.shut .cat-row .i { transform: rotate(-90deg); }
.cat-act { display: none; width: 20px; height: 20px; place-items: center; color: var(--faint); border-radius: 4px; }
.cat:hover .cat-act { display: inline-grid; }
.cat-act:hover { color: var(--text); background: var(--bg3); }
.crew-rooms .ch.thread { height: 26px; padding-left: 20px; font-size: 13px; }
.ch.thread .ic { color: var(--faint); }
[draggable=true].dragging { opacity: .4; }
.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.mention.role { background: color-mix(in srgb, var(--rc) 16%, transparent); color: color-mix(in srgb, var(--rc) 70%, var(--text)); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tag-quiet { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--bg3); color: var(--muted); font-size: 12px; margin-left: 8px; }
.crumb.link { cursor: pointer; }
.crumb.link:hover { color: var(--text); text-decoration: underline; }
.thread-chip { display: flex; align-items: center; gap: 8px; max-width: 480px; margin-top: 6px; padding: 8px 12px; border-radius: 8px; background: var(--bg1); border: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: left; }
.thread-chip b { color: var(--text); font-weight: 500; min-width: 0; }
.thread-chip:hover { border-color: var(--line2); background: var(--bg3); }
.thread-row { width: 100%; gap: 10px; border-radius: 8px; padding: 8px 6px; }
.thread-row:hover { background: var(--bg3); }
.composer-block { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 16px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 12px; cursor: pointer; }
.rule { display: grid; gap: 8px; }
.rule.off { opacity: .45; pointer-events: none; }
.rule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; font-size: 13px; }
.rule-head b { font-weight: 500; }
.rule-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-pills .role-pill { height: 26px; padding: 0 10px; font-size: 12px; }
.seg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; height: 36px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.seg input:checked + span { border-color: var(--text); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.audit-row { align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.forum { flex: 1; overflow-y: auto; padding: 24px 32px 40px; }
.forum-top { display: flex; gap: 8px; align-items: center; max-width: 920px; margin: 0 auto 16px; }
.forum-top select { height: 36px; }
.search-box { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--bg1); border: 1px solid var(--line); color: var(--faint); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; }
.forum-guide { max-width: 920px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); font-size: 14px; color: var(--muted); }
.forum-guide b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.forum-posts { display: grid; gap: 8px; max-width: 920px; margin: 0 auto; }
.post-card { display: flex; gap: 16px; align-items: flex-start; width: 100%; padding: 16px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); text-align: left; }
.post-card:hover { border-color: var(--line2); background: var(--bg3); }
.post-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--text); }
.post-card.unread .post-title::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.post-text { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--faint); font-size: 12px; }
.post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-img { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; flex: none; }
@media (max-width: 700px) { .forum { padding: 16px; } .post-img { width: 64px; height: 64px; } .seg-grid { grid-template-columns: repeat(2, 1fr); } }
.owner-tag { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-text); }
.badge-ic.owner { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.compiwer-btn { width: 100%; height: 44px; gap: 10px; background: var(--bg3); border: 1px solid var(--line2); color: var(--text); }
.compiwer-btn:hover { background: var(--bg4); }
.compiwer-btn img { width: 20px; height: 20px; }
:root.light .compiwer-ic { filter: invert(1); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-note { margin: 16px 0 4px; color: var(--muted); font-size: 13px; text-align: center; }
.auth-link { display: block; margin: 12px auto 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover { color: var(--text); }

.custom-swatch { background: conic-gradient(from 90deg, #ff6b6b, #ffd166, #c6f432, #38ef7d, #7cc4ff, #b388ff, #ff6b6b) !important; }
.custom-theme { flex-wrap: wrap; gap: 12px; }
.color-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.color-pick input { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line2); border-radius: 8px; background: none; cursor: pointer; }
.color-pick input::-webkit-color-swatch-wrapper { padding: 3px; }
.color-pick input::-webkit-color-swatch { border: 0; border-radius: 5px; }
.friend-state { color: var(--muted); }
.standing { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); }
.standing-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.standing.warned .standing-dot { background: var(--idle); }
.standing.suspended .standing-dot { background: var(--danger); }
.adm-user { width: 100%; gap: 10px; padding: 8px; border-radius: 8px; }
.adm-user:hover { background: var(--bg3); }

/* color themes with their own accent */
:root.ct-sakura { --bg0: #140d11; --bg1: #191015; --bg2: #1d1318; --bg3: #281a21; --bg4: #33212b; --pop: #21151b; --accent: #ff8fb8; --accent-text: #ff8fb8; --accent-ink: #1a0a11; --accent-soft: rgba(255, 143, 184, .12); --mention: rgba(255, 143, 184, .06); }
:root.ct-nord { --bg0: #12161d; --bg1: #151a22; --bg2: #181e27; --bg3: #212935; --bg4: #2b3543; --pop: #1c232d; --accent: #88c0d0; --accent-text: #88c0d0; --accent-ink: #0d1418; --accent-soft: rgba(136, 192, 208, .12); --mention: rgba(136, 192, 208, .06); }
:root.ct-mocha { --bg0: #13100d; --bg1: #17130f; --bg2: #1b1612; --bg3: #251e18; --bg4: #30271f; --pop: #1f1914; --accent: #e0b080; --accent-text: #e0b080; --accent-ink: #1a1209; --accent-soft: rgba(224, 176, 128, .12); --mention: rgba(224, 176, 128, .06); }
:root.ct-cyber { --bg0: #080b12; --bg1: #0b0e17; --bg2: #0e121c; --bg3: #151b29; --bg4: #1d2437; --pop: #111622; --accent: #00f0ff; --accent-text: #00f0ff; --accent-ink: #001417; --accent-soft: rgba(0, 240, 255, .10); --mention: rgba(0, 240, 255, .05); }
:root.ct-vapor { --bg0: #110a19; --bg1: #150d1f; --bg2: #191024; --bg3: #231731; --bg4: #2e1f40; --pop: #1c1229; --accent: #ff71ce; --accent-text: #ff71ce; --accent-ink: #1a0614; --accent-soft: rgba(255, 113, 206, .12); --mention: rgba(1, 205, 254, .06); }
:root.ct-sunset { --bg0: #160d0a; --bg1: #1a100c; --bg2: #1f130e; --bg3: #2a1b14; --bg4: #36231a; --pop: #221610; --accent: #ff8a4c; --accent-text: #ff8a4c; --accent-ink: #1c0b03; --accent-soft: rgba(255, 138, 76, .12); --mention: rgba(255, 138, 76, .06); }
:root.ct-mint { --bg0: #09130f; --bg1: #0c1713; --bg2: #0f1b16; --bg3: #16251f; --bg4: #1e3129; --pop: #121f1a; --accent: #5df2b0; --accent-text: #5df2b0; --accent-ink: #04170e; --accent-soft: rgba(93, 242, 176, .12); --mention: rgba(93, 242, 176, .06); }
:root.ct-royal { --bg0: #0e0b18; --bg1: #110e1d; --bg2: #141022; --bg3: #1d172f; --bg4: #271f3d; --pop: #171226; --accent: #b48cff; --accent-text: #b48cff; --accent-ink: #120a22; --accent-soft: rgba(180, 140, 255, .12); --mention: rgba(180, 140, 255, .06); }
:root.ct-gold { --bg0: #121009; --bg1: #16130b; --bg2: #1a160d; --bg3: #241f13; --bg4: #2f281a; --pop: #1e1a10; --accent: #f5c542; --accent-text: #f5c542; --accent-ink: #1a1403; --accent-soft: rgba(245, 197, 66, .12); --mention: rgba(245, 197, 66, .06); }
:root.ct-blood { --bg0: #14090b; --bg1: #180b0e; --bg2: #1c0e11; --bg3: #271418; --bg4: #331b20; --pop: #201014; --accent: #ff4d5e; --accent-text: #ff6b79; --accent-ink: #ffffff; --accent-soft: rgba(255, 77, 94, .12); --mention: rgba(255, 77, 94, .06); }
:root.ct-ice { --bg0: #0a1016; --bg1: #0d141b; --bg2: #10181f; --bg3: #17222c; --bg4: #1f2d3a; --pop: #131c25; --accent: #9fd8ff; --accent-text: #9fd8ff; --accent-ink: #06131c; --accent-soft: rgba(159, 216, 255, .12); --mention: rgba(159, 216, 255, .06); }
:root.ct-matrix { --bg0: #040805; --bg1: #060b07; --bg2: #080e09; --bg3: #0e170f; --bg4: #142116; --pop: #0a120b; --accent: #39ff6a; --accent-text: #39ff6a; --accent-ink: #021206; --accent-soft: rgba(57, 255, 106, .10); --mention: rgba(57, 255, 106, .05); }

/* badges: small colored icons with a tooltip */
.badge-i { --bs: 20px; width: var(--bs); height: var(--bs); display: inline-grid; place-items: center; border-radius: 6px; vertical-align: middle; flex: none; background: color-mix(in srgb, var(--bc, #98a1ad) 16%, transparent); color: var(--bc, #98a1ad); }
.badge-i svg { width: 72%; height: 72%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-owner { --bc: #f5c542; } .b-owner svg path:first-child { fill: currentColor; fill-opacity: .25; }
.b-partner { --bc: #ff8fb8; } .b-creator { --bc: #ffd166; } .b-artist { --bc: #c792ff; } .b-early { --bc: #5df2b0; }
.b-bot { --bc: #8ab4ff; } .b-verified { --bc: #4cc3ff; } .b-admin { --bc: #c6f432; } .b-crew { --bc: #a1a1a6; }
.msg-head .badge-i { margin-left: 2px; align-self: center; }
.pc-badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* admin page */
.adm-page { max-width: 980px; }
.adm-tabs { margin-left: 8px; }
.adm-list { display: grid; gap: 4px; margin-top: 16px; }
.adm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg1); text-align: left; }
.adm-row:not(.static):hover { background: var(--bg3); }
.adm-row .btn { flex: none; }
.adm-badges { display: flex; gap: 4px; margin-top: 2px; }
.adm-badges .badge-i { --bs: 16px; }
.adm-badges.big .badge-i { --bs: 24px; }
.adm-head { display: flex; gap: 16px; align-items: center; }
.adm-body { display: grid; gap: 4px; }
.adm-sec { padding: 12px 0; border-top: 1px solid var(--line); }
.adm-sec:first-child { border-top: 0; padding-top: 0; }
.adm-sec h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.adm-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line2); background: var(--bg3); font-size: 13px; color: var(--muted); }
.chip.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-text); }
.danger-zone h3 { color: var(--danger); }
.tag-quiet.bad { color: var(--danger); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.adm-card { display: grid; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); }
.adm-thumb { height: 120px; display: grid; place-items: center; border-radius: 8px; background: var(--bg3); }
.adm-thumb img { max-width: 90%; max-height: 110px; object-fit: contain; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.adm-stat { padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); }
.adm-num { font: 500 28px var(--mono); font-variant-numeric: tabular-nums; }

/* beta label */
.beta { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 8px; border-radius: 9px; font: 500 10px var(--mono); letter-spacing: .02em; color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); vertical-align: middle; }
/* crew tags */
.stag { --tc: #a1a1a6; display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px 0 5px; margin-left: 6px; border-radius: 6px; font: 600 11px var(--font); letter-spacing: .02em; vertical-align: 1px; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); white-space: nowrap; }
.stag svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stag .stag-emoji { font-size: 11px; line-height: 1; }
.stag b { font-weight: 600; }
.tag-icons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-icons button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); color: var(--muted); }
.tag-icons button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag-icons button.on, .tag-emoji-in.on { border-color: var(--text); color: var(--text); }
.tag-emoji-in { width: 56px; height: 36px; text-align: center; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); color: var(--text); font-size: 18px; }
.tag-colors { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag-colors button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.tag-colors button.on { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--bg2); }
.tag-preview .stag { height: 22px; font-size: 13px; }

.b-recruiter { --bc: #ff8a4c; }
.invite-card { margin: 16px 0; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); display: grid; gap: 16px; }
.invite-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.invite-stats div { display: grid; gap: 2px; }
.invite-stats b { font: 500 22px var(--mono); font-variant-numeric: tabular-nums; }
.invite-stats span { font-size: 12px; color: var(--muted); }

/* ---------- landing page ---------- */
.lp { min-height: 100%; overflow-y: auto; background: var(--bg0); color: var(--text); }
.lp a { color: inherit; text-decoration: none; }
.lp-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 32px; background: color-mix(in srgb, var(--bg0) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.lp-logo img { width: 28px; height: 28px; }
.lp-top nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); }
.lp-top nav a:hover, .lp-link:hover { color: var(--text); }
.lp-link { color: var(--muted); font-size: 14px; }
.lp-ref { margin: 16px auto 0; max-width: 640px; padding: 10px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 14px; text-align: center; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.lp-hero { max-width: 760px; margin: 0 auto; padding: 88px 24px 40px; text-align: center; }
.lp-hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.lp-hero p { margin: 20px auto 0; max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.5; }
.lp-cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.lp-cta .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.lp-cta .compiwer-btn { width: auto; }
.lp-hint { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.lp-shot { max-width: 1040px; margin: 24px auto 0; padding: 0 24px; }
.lp-app { display: grid; grid-template-columns: 240px 1fr; height: 460px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); background: var(--bg2); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); text-align: left; font-size: 14px; }
.lp-side { background: var(--bg0); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.lp-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; margin: 0 6px 12px; }
.lp-brand img { width: 22px; height: 22px; }
.lp-nav, .lp-room, .lp-crew, .lp-vc { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 6px; }
.lp-sec, .lp-cat { font-size: 12px; color: var(--faint); padding: 10px 8px 4px; }
.lp-crew.on, .lp-room.on { background: var(--bg3); color: var(--text); }
.lp-crew i { width: 18px; height: 18px; border-radius: 6px; }
.lp-room b { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 400 12px var(--mono); }
.lp-vc { padding-left: 24px; font-size: 13px; }
.lp-vc i { width: 18px; height: 18px; border-radius: 50%; }
.lp-chat { display: flex; flex-direction: column; padding: 0 20px 16px; min-width: 0; }
.lp-head { height: 48px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 -20px 12px; padding: 0 20px; }
.lp-msg { display: flex; gap: 12px; padding: 8px 0; }
.lp-msg > i { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.lp-msg.bot > i { visibility: hidden; height: 0; }
.lp-msg p { margin: 2px 0 0; color: var(--text); }
.lp-tag { display: inline-flex; height: 16px; padding: 0 5px; border-radius: 5px; font: 600 10px var(--font); color: #ff8a4c; background: rgba(255, 138, 76, .14); vertical-align: 1px; }
.lp-react { display: flex; gap: 6px; margin-top: 6px; }
.lp-react span { height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); font-size: 12px; }
.lp-input { margin-top: auto; height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--bg1); border: 1px solid var(--line); color: var(--faint); }
.lp-features { max-width: 1040px; margin: 96px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-f { padding: 24px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg1); }
.lp-f svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lp-f h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 500; }
.lp-f p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lp-free { max-width: 1040px; margin: 24px auto 0; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg1); }
.lp-free h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.lp-free p { margin: 0; color: var(--muted); max-width: 620px; line-height: 1.5; }
.lp-foot { max-width: 1040px; margin: 80px auto 0; padding: 24px; display: flex; justify-content: space-between; gap: 16px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lp-foot nav { display: flex; gap: 16px; }
.lp-foot a:hover { color: var(--text); }
.auth-back { position: absolute; top: 14px; left: 14px; font-size: 13px; color: var(--muted); }
.auth-back:hover { color: var(--text); }
.auth-card { position: relative; }
@media (max-width: 800px) {
  .lp-top { padding: 0 16px; } .lp-top nav a { display: none; }
  .lp-hero { padding-top: 56px; } .lp-app { grid-template-columns: 1fr; height: 400px; } .lp-side { display: none; }
  .lp-features { grid-template-columns: 1fr; margin-top: 56px; } .lp-free { flex-direction: column; align-items: flex-start; }
}

/* ---------- phones ---------- */
.msg.tapped .msg-tools { display: flex; }
.msg.tapped { background: color-mix(in srgb, var(--text) 3%, transparent); }
@media (max-width: 760px) {
  html, body, #app { height: 100dvh; }
  /* settings: the tabs become a strip you swipe, with a close button */
  .settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .settings-nav { display: block !important; padding: 8px 56px 8px 8px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav > div { width: auto; display: flex; gap: 4px; white-space: nowrap; align-items: center; }
  .settings-nav .nav-title, .settings-nav hr { display: none; }
  .settings-nav button { flex: none; width: auto; }
  .settings-close { display: block !important; position: fixed; top: 6px; right: 6px; z-index: 3; margin: 0; }
  .settings-close span { display: none; }
  .settings-main { padding: 16px; overflow-y: auto; min-height: 0; }
  .settings-main h1 { font-size: 22px; }
  /* headers fit on one line */
  .main-head { padding: 0 8px; gap: 2px; }
  .main-head .topic, .main-head .crumb, .main-head .crumb-sep, .main-head .tag-quiet { display: none; }
  .main-head .title { min-width: 0; overflow: hidden; flex: 1 1 auto; }
  .main-head .title > span, .main-head .title .ell { overflow: hidden; text-overflow: ellipsis; }
  .main-head .grow { display: none; }
  /* chat */
  .msg-tools { right: 8px; }
  .composer-wrap { padding-left: 8px; padding-right: 8px; }
  .composer [data-act="sticker"], .composer [data-act="voice-note"] { display: none; }
  .msg { padding-left: 8px; padding-right: 8px; }
  .thread-chip { max-width: 100%; }
  /* pop-ups */
  .modal { max-height: calc(100dvh - 24px); }
  .menu { max-width: calc(100vw - 16px); }
  /* pages */
  .forum-top { flex-wrap: wrap; }
  .forum-top .search-box { flex: 1 1 100%; }
  .post-card { padding: 12px; gap: 10px; }
  .perm-row { flex-wrap: wrap; gap: 8px; }
  .theme-swatches { justify-content: flex-start; max-width: none; }
  .roles-layout { grid-template-columns: 1fr !important; }
  .invite-stats { grid-template-columns: repeat(2, 1fr); }
  .tag-icons button { width: 32px; height: 32px; }
  .adm-tabs { margin-left: auto; overflow-x: auto; max-width: 62vw; }
  .adm-row { flex-wrap: wrap; }
  .adm-row.static .btn { flex: 1 1 auto; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .auth-card { width: calc(100vw - 32px); max-width: 400px; }
  .stage-grid { padding: 8px; gap: 8px; }
}
@media (max-width: 760px) { .shell.side-open::after { content: ""; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .5); } }

/* Settings → Developer: coding agents */
.dev-h { font-size: 18px; font-weight: 500; margin: 32px 0 4px; }
.code-copy { position: relative; }
.code-copy pre { margin: 0; padding: 12px 72px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg1); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto; }
.code-copy .btn { position: absolute; top: 8px; right: 8px; }

/* "/" menu: commands grouped by bot, with a bot filter */
.autocomplete.ac-cmds { max-height: 340px; padding-top: 0; }
.ac-bots { position: sticky; top: 0; z-index: 1; display: flex; gap: 4px; padding: 8px 4px; overflow-x: auto; background: var(--pop); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ac-bots::-webkit-scrollbar { display: none; }
.autocomplete .ac-bot { flex: none; width: auto; height: 28px; gap: 6px; padding: 0 10px 0 6px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13px; color: var(--muted); }
.autocomplete .ac-bot[data-bot=""] { padding: 0 10px; }
.autocomplete .ac-bot.on { background: var(--bg4); color: var(--text); border-color: var(--line2); }
.ac-group { display: flex; align-items: center; gap: 8px; padding: 10px 8px 4px; font-size: 12px; color: var(--faint); }
.ac-face { border-radius: 50%; object-fit: cover; flex: none; }
.autocomplete button .faint.ell { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a bot's commands on its profile */
.bot-cmds { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; margin: 4px -6px 0; }
.bot-cmd { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; text-align: left; font-size: 13px; }
.bot-cmd:hover { background: var(--bg4); }
.bot-cmd b { font-weight: 500; flex: none; }
.bot-cmd .ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* event cards (reminders from Vibein Bot) */
.event-card { display: flex; align-items: center; gap: 16px; margin-top: 8px; padding: 12px 16px; max-width: 480px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg2); }
.event-card b { display: block; font-weight: 500; margin: 2px 0; }
.event-card .faint { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.event-card .row { gap: 8px; flex: none; }
@media (max-width: 760px) { .event-card { flex-direction: column; align-items: stretch; } }

/* hangout activities */
#activity.activity-host { flex: none; display: flex; flex-direction: column; max-height: 62vh; min-height: 0; border-bottom: 1px solid var(--line); background: var(--bg1); }
.act-head { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.act-head b { font-weight: 500; }
.act-head .faint { font-size: 12px; }
.act-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: auto; }
.act-body.watch { flex-direction: column; gap: 8px; }
.yt-frame { width: min(100%, calc((62vh - 110px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.yt-frame iframe, .yt-frame > div { width: 100%; height: 100%; border: 0; }
.watch-bar { display: flex; align-items: center; gap: 8px; }
.watch-bar .faint { font-size: 12px; }
.act-menu { min-width: 280px; }
.act-menu .menu-item { align-items: flex-start; gap: 10px; padding: 8px 10px; height: auto; }
.act-menu .menu-item b { display: block; font-weight: 500; }
.act-menu .menu-item .faint { display: block; font-size: 12px; }
.doodle { width: min(100%, 900px); display: flex; flex-direction: column; gap: 8px; }
.doodle canvas { width: 100%; aspect-ratio: 16 / 9; max-height: calc(62vh - 120px); background: #18181a; border-radius: 12px; touch-action: none; cursor: crosshair; }
.doodle-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doodle-tools .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; }
.doodle-tools .dot.on { border-color: var(--text); }
.game { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.game .players { display: flex; gap: 20px; font-size: 13px; color: var(--muted); }
.ttt { display: grid; grid-template-columns: repeat(3, 72px); gap: 6px; }
.ttt button { height: 72px; border-radius: 12px; background: var(--bg3); font-size: 32px; font-weight: 600; }
.ttt button:hover:not(:disabled) { background: var(--bg4); }
.ttt .m-X { color: #c6f432; } .ttt .m-O { color: #7cc4ff; }
.ttt .last { box-shadow: inset 0 0 0 2px var(--line2); }
.c4 { display: grid; grid-template-columns: repeat(7, 44px); gap: 4px; padding: 8px; border-radius: 14px; background: #1d3b8a; }
.c4 button { display: flex; flex-direction: column; gap: 4px; padding: 2px; border-radius: 10px; }
.c4 button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.disc { display: inline-block; width: 36px; height: 36px; border-radius: 50%; background: #0f1d47; }
.game .players .disc { width: 12px; height: 12px; vertical-align: -1px; }
.disc.R { background: #ff5f5f; } .disc.Y { background: #ffd166; }
.disc.last { box-shadow: 0 0 0 2px #fff; }
.chess { display: grid; grid-template-columns: repeat(8, min(44px, 6vh)); grid-auto-rows: min(44px, 6vh); border-radius: 8px; overflow: hidden; }
.chess button { display: grid; place-items: center; font-size: min(30px, 4.2vh); line-height: 1; position: relative; }
.chess .lt { background: #e8e3d3; } .chess .dk { background: #7a8b5d; }
.chess .pc.w { color: #fff; -webkit-text-stroke: 1px #222; } .chess .pc.b { color: #111; }
.chess .last { box-shadow: inset 0 0 0 100px rgba(198, 244, 50, .35); }
.chess .pick { box-shadow: inset 0 0 0 3px #c6f432; }
.chess .can::after { content: ""; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(0, 0, 0, .35); }
.act-menu .menu-item { display: flex; width: 100%; text-align: left; border-radius: 8px; }
.act-menu .menu-item:hover { background: var(--bg4); }

/* two-factor sign-in */
.tfa-qr { width: 220px; margin: 0 auto; padding: 12px; background: #fff; border-radius: 12px; }
.tfa-qr svg { display: block; width: 100%; height: auto; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 15px; }
.backup-codes span { padding: 8px 12px; border: 1px solid var(--line2); border-radius: 8px; text-align: center; }

/* images from brand-new accounts stay blurred until tapped */
.att-spoiler.new-acct::after { content: "New account · tap to show"; font-size: 13px; }
/* reported images in admin review */
.report-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.report-imgs img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line2); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; color: var(--faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
