/* m3llo web lounge — tokens mirror client/ui/theme.slint, not the marketing site. */

/* Values are lifted from client/ui/theme.slint. When they disagree with the HTML
   mockups in mello/designs/, theme.slint wins — it is what ships. */
:root {
  --frame-bg: #161616;      /* Theme.titlebar — the invite chrome around the app */
  --app-bg: #181818;        /* Theme.bg-app */
  --surface: #202020;       /* Theme.surface — crew panel, chat panel, control bar */
  --border: #2e2e2e;        /* Theme.graphic-light */
  --border-med: #404040;    /* Theme.graphic-med */
  --card: #222226;          /* Theme.card-bg */
  --card-border: #2a2a2e;   /* Theme.card-border */
  --inset: #19191d;         /* Theme.card-bg-inset */

  --text: #f5f5f5;          /* Theme.text-primary */
  --text-2: #888888;        /* Theme.text-sub */
  --text-3: #666666;        /* Theme.text-dim */
  --text-4: #404040;        /* Theme.text-tertiary */
  --text-value: #cccccc;    /* Theme.text-value */
  --text-card: #f5f5f5;
  --text-card-2: #888888;
  --text-card-3: #666666;

  --accent: #ff1e56;        /* Theme.accent */
  --accent-bg: rgba(255, 30, 86, .1);
  --green: #28c840;         /* Theme.accent-green — speaking ring */
  --voice: #46923c;         /* Theme.voice-active */
  --amber: #f59e0b;         /* Theme.clip-amber */
  --win: #4ade80;
  --loss: #f87171;

  --r-card: 10px;           /* Theme.r-outer */
  --r-ctl: 6px;             /* Theme.r-inner */
  --gap: 12px;              /* Theme.gap */
  --control-h: 81px;        /* Theme.control-bar-height */
  --rail-w: 240px;
  --chat-w: 340px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The lounge is an app viewport, not a document: it fills the window exactly and
   scrolls internally, so the control bar can never be pushed below the fold. */
html, body { height: 100%; overflow: hidden; }

body {
  background: var(--frame-bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }
.mono { font-family: var(--mono); }

/* ── invite frame ───────────────────────────────────────────────── */

.frame {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--frame-bg);
  overflow: hidden;
}

/* 1fr auto 1fr keeps the invite on the window's true centre no matter how wide
   the wordmark or the CTA get. */
.frame-head {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
}

.frame-brand { justify-self: start; }

.mark {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mark .three { color: var(--accent); font-size: 0.9em; }

.frame-invite {
  justify-self: center;
  display: flex; align-items: center; gap: 13px;
  min-width: 0;
}

.frame-invite .av {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  flex: none;
}

.frame-who { min-width: 0; }
.frame-kicker { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.frame-kicker b { color: var(--text-card); font-weight: 600; }
.frame-crew { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }

.frame-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }

.btn-ghost {
  border: 1px solid rgba(255,255,255,.13);
  color: #b3b7be;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 13px; font-weight: 600;
}
.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 13px; font-weight: 700;
}
.btn-accent:hover { filter: brightness(1.08); }

/* ── app window ─────────────────────────────────────────────────── */

.app {
  flex: 1;
  margin: 0 14px 14px;
  background: var(--app-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Mirrors main.slint: CrewPanel 240 | stage | ChatPanel 340, Theme.gap between. */
.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--chat-w);
  gap: var(--gap);
  min-height: 0;
}

/* Feed + control bar. The bar spans this column only, as in the native client. */
.center {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* ── voice coach mark ───────────────────────────────────────────── */

/* Floats over the feed and points back at the channel row in the rail, so the
   guest learns where the crew's voice channel is before they use it. */
.coach {
  position: absolute;
  top: 52px; left: 12px;
  z-index: 20;
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 12px 12px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}

/* While the coach mark is up, everything dims except the voice channel it points
   at and the panel itself, so the guest's eye lands on where voice lives.
   pointer-events stay off: this is a spotlight, not a modal. */
[data-onboarding="on"] .frame::after {
  content: '';
  position: fixed; inset: 0;
  background: rgba(8, 8, 8, .62);
  z-index: 10;
  pointer-events: none;
}

/* The region tint would double up with the overlay. */
[data-onboarding="on"] .feed,
[data-onboarding="on"] .side { filter: none; }

[data-onboarding="on"] .channel {
  position: relative;
  z-index: 15;
  background: var(--card);
  border-radius: var(--r-ctl);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 12px 32px rgba(0,0,0,.45);
}

.coach-arrow {
  position: absolute;
  left: -8px; top: 22px;
  width: 14px; height: 14px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

.coach-body { min-width: 0; }
.coach-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.coach-text { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.coach-row { display: flex; align-items: center; gap: 8px; }

.coach-input {
  width: 150px;
  background: var(--app-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
}
.coach-input::placeholder { color: var(--text-4); }
.coach-input:focus { outline: none; border-color: var(--accent); }

.coach-join {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent); color: #fff;
  border-radius: 8px; padding: 10px 16px;
  font-size: 13px; font-weight: 700;
  flex: none;
}
.coach-join:hover { filter: brightness(1.08); }
.coach-join i { font-size: 16px; }
.coach-join.is-busy { background: var(--border-med); cursor: default; }
.coach-join.is-busy i { animation: coachspin 1s linear infinite; }
@keyframes coachspin { to { transform: rotate(360deg); } }

.coach-error {
  margin-top: 10px;
  font-size: 12px;
  color: var(--accent);
  max-width: 260px;
  line-height: 1.4;
}

.coach-dismiss {
  width: 28px; height: 28px; border-radius: var(--r-ctl);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-3); flex: none;
}
.coach-dismiss:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* ── rail ───────────────────────────────────────────────────────── */

/* CrewPanel: a full-bleed surface panel with square corners, not a floating card. */
.rail {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0; overflow-y: auto;
}

.crew-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); overflow: hidden; }

.crew-card-head {
  padding: 11px;
  border-bottom: 1px solid var(--card-border);
  display: flex; align-items: center; gap: 11px;
}
.crew-tile {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
}
.crew-card-name { font-weight: 700; font-size: 14px; letter-spacing: .04em; flex: 1; text-transform: uppercase; }

.channel { padding: 9px; }
.channel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 6px; margin-bottom: 5px;
  border-radius: var(--r-ctl);
  cursor: pointer;
}
.channel-head:hover { background: rgba(255,255,255,.05); }
.channel-head:hover .channel-name { color: var(--text); }
.channel-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); }
.channel-count { font-size: 11px; font-weight: 700; color: var(--accent); }

.members { display: flex; flex-direction: column; gap: 3px; }

.member { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: var(--r-ctl); }
.member.is-active { background: var(--inset); border: 1px solid var(--card-border); }
.member.is-you { background: var(--accent-bg); border: 1px solid rgba(255,30,86,.25); }
.member-name { font-size: 13px; font-weight: 500; color: var(--text-2); }
.member.is-active .member-name, .member.is-you .member-name { color: #fff; }

.av-sm {
  width: 26px; height: 26px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  flex: none;
}
.member.is-speaking .av-sm { outline: 2px solid var(--green); outline-offset: 1px; }

.wave { margin-left: auto; display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.wave i {
  width: 3px; background: var(--green); border-radius: 2px;
  transform-origin: bottom;
  animation: wavepulse .8s ease-in-out infinite alternate;
}
@keyframes wavepulse { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

.member-icon { margin-left: auto; font-size: 13px; color: var(--accent); }

.tag-web {
  margin-left: auto;
  font-size: 9px; font-weight: 700; color: var(--accent);
  border: 1px solid rgba(255,30,86,.35); border-radius: 3px; padding: 1px 4px;
}

.channel-empty { border-top: 1px solid var(--card-border); margin-top: 9px; padding-top: 7px; }
.channel-empty div {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px; font-size: 13px; font-weight: 500; color: var(--text-3);
}

/* ── feed ───────────────────────────────────────────────────────── */

.feed {
  flex: 1;
  padding: 14px;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column; gap: 11px;
  overflow-y: auto;
}

.feed-head { display: flex; align-items: center; gap: 10px; }
.feed-title { font-size: 17px; font-weight: 600; }
.feed-pill {
  font-size: 11px; font-weight: 600; color: var(--text-2);
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 6px; padding: 3px 9px;
}

/* `align-items: start` stops the session card stretching to the recap's height
   and leaving a dead panel of empty card under its caption. */
.feed-top { display: grid; grid-template-columns: minmax(0, 1.5fr) 246px; gap: 11px; align-items: start; }
.feed-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; align-items: start; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.card.locked { cursor: pointer; }
.card.locked:hover { border-color: #3a3a40; }

.card-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 7px;
}
.card-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card-tag.stream { color: var(--accent); }
.card-tag.clip { color: var(--amber); }
.card-tag.recap { color: var(--accent); }
.card-tag.catchup { color: var(--green); }

.card-body { padding: 13px; }
.card-who { font-size: 14px; font-weight: 600; color: var(--text-card); margin-bottom: 4px; }
.card-what { font-size: 11px; color: var(--text-card-2); }
.card-row .card-who { font-size: 13px; margin-bottom: 3px; }
.card-row .card-body { padding: 11px; }
.card-row .card-what { color: var(--text-card-3); }

.thumb { position: relative; overflow: hidden; background: #14161a; }
.thumb.lg { height: 196px; }
.thumb.sm { height: 74px; }
.thumb-lock {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,.42);
}
.thumb-lock span {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(10,10,12,.72); border: 1px solid rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}
.thumb.sm .thumb-lock span { width: 34px; height: 34px; font-size: 16px; border: none; background: none; color: var(--text-2); }
.thumb-dur {
  position: absolute; bottom: 9px; right: 9px;
  background: rgba(10,10,12,.85); border-radius: 4px;
  padding: 3px 7px; font-size: 11px; font-weight: 500;
}
.thumb.sm .thumb-dur { bottom: 6px; right: 6px; padding: 2px 6px; font-size: 10px; }

/* fake in-game frame — flat blocks, no art assets */
.scene { position: absolute; inset: 0; padding: 10px; display: flex; flex-direction: column; gap: 5px; opacity: .55; }
.scene-hud { display: flex; gap: 5px; }
.scene-hud i { height: 9px; background: #262b33; border-radius: 2px; }
.scene-cols { display: flex; gap: 8px; flex: 1; margin-top: 6px; }
.scene-panel { background: #1b1f26; border-radius: 4px; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.scene-panel i { height: 7px; background: #252a33; border-radius: 2px; display: block; }
.scene-panel i.hi { background: #2b313b; }
.scene-panel .blk { margin-top: auto; height: 38px; background: #232833; border-radius: 3px; }

.wavebars { height: 100%; display: flex; align-items: center; justify-content: center; gap: 3px; background: var(--inset); }
.wavebars i { width: 2px; background: var(--amber); border-radius: 2px; display: block; }

.clip-badge {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  font-size: 9px; font-weight: 700; color: #0a0a0c;
  background: var(--amber); border-radius: 3px; padding: 2px 5px;
}
.live-badge {
  position: absolute; top: 7px; right: 7px;
  display: flex; align-items: center; gap: 4px;
  background: var(--accent); border-radius: 3px; padding: 2px 6px;
}
.live-badge i { width: 5px; height: 5px; border-radius: 50%; background: #fff; display: block; }
.live-badge span { font-size: 9px; font-weight: 700; }

.game-head { height: 74px; background: var(--inset); display: flex; align-items: center; gap: 10px; padding: 0 12px; position: relative; }
.game-tile {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; flex: none;
}
.game-name { font-size: 12px; font-weight: 600; color: var(--text-card); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-sub { font-size: 11px; color: var(--text-card-2); }

/* recap */
.recap { padding: 13px; display: flex; flex-direction: column; }
.recap-big { font-size: 32px; font-weight: 700; line-height: 1; color: var(--text-card); }
.recap-big-sub { font-size: 11px; color: var(--text-card-2); margin-top: 3px; margin-bottom: 11px; }
.recap-rows { display: flex; flex-direction: column; gap: 6px; font-size: 11px; padding-bottom: 10px; border-bottom: 1px solid var(--card-border); }
.recap-rows div, .recap-foot { display: flex; justify-content: space-between; }
.recap-rows span:first-child { color: var(--text-card-2); }
.recap-rows span:last-child { color: var(--text-card); font-weight: 500; }
.recap-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--text-card-3); margin: 11px 0 7px; }
.recap-person { display: flex; align-items: center; gap: 8px; }
.recap-person .av-xs { width: 22px; height: 22px; }
.recap-person-name { font-size: 12px; font-weight: 500; color: var(--text-card); }
.recap-person-val { margin-left: auto; font-size: 11px; color: var(--text-card-2); }
.recap-games { display: flex; flex-direction: column; gap: 6px; }
.recap-games .recap-person-name { font-size: 11px; }
.av-xs {
  width: 20px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #fff; flex: none;
}
.wl { margin-left: auto; font-size: 11px; }
.wl .w { color: var(--win); }
.wl .l { color: var(--loss); }
.recap-foot { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--card-border); font-size: 11px; }
.recap-foot span:first-child { color: var(--text-card-2); }
.recap-foot span:last-child { color: var(--text-card); font-weight: 500; }

.recap-pending {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 0 2px;
  color: var(--text-card-3);
}
.recap-pending i { font-size: 20px; color: var(--text-card-3); flex: none; margin-top: 1px; }
.recap-pending .card-who { margin-bottom: 3px; font-size: 13px; }

.catchup { padding: 11px 13px; display: flex; align-items: center; gap: 11px; }
.catchup .card-tag { margin-bottom: 0; flex: none; }
.catchup-text { font-size: 12px; color: var(--text-card); }
.catchup-time { margin-left: auto; font-size: 11px; color: var(--text-card-3); }

/* ── chat + upsell ──────────────────────────────────────────────── */

/* ChatPanel: surface panel, square corners, full height of the window. */
.side {
  background: var(--surface);
  padding: 12px;
  display: flex; flex-direction: column; gap: 11px;
  min-height: 0;
}
.side-title { font-size: 14px; font-weight: 600; }
.chat { flex: 1; display: flex; flex-direction: column; gap: 11px; min-height: 0; overflow-y: auto; }

.msg { display: flex; gap: 9px; }
.msg-av { width: 28px; height: 28px; border-radius: 7px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.msg-main { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 6px; }
.msg-name { font-size: 12px; font-weight: 600; }
.msg-time { margin-left: auto; font-size: 10px; color: var(--text-4); }
.msg-text { font-size: 12px; color: #cccccc; line-height: 1.45; }
.msg-text.subtle { color: var(--text-card-2); }
.msg-reply { border-left: 2px solid var(--accent); padding-left: 7px; margin: 3px 0; }
.msg-reply span { font-size: 10px; font-weight: 600; color: var(--accent); }

.chat-empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 20px 12px;
  color: var(--text-3);
}
.chat-empty i { font-size: 26px; color: var(--text-4); }

.composer {
  margin-top: auto;
  background: #141416; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 11px; font-size: 12px; color: #3f444b;
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
}
.composer i { margin-left: auto; font-size: 14px; color: var(--text-4); }

/* Pinned to the foot of the crew rail — `margin-top: auto` takes the rail's
   spare height so it sits on the bottom without absolute positioning. */
.upsell {
  flex: none;
  margin-top: auto;
  background: var(--card);
  border: 1px solid rgba(255,30,86,.32);
  border-radius: var(--r-card);
  padding: 13px;
}
.upsell-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.upsell-tile {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
}
.upsell-title { font-size: 13px; font-weight: 700; }
.upsell-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 13px; }
.upsell-list div { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); }
.upsell-list i { font-size: 15px; }
.upsell-btn { width: 100%; background: var(--accent); color: #fff; border-radius: 8px; padding: 11px; font-size: 13px; font-weight: 700; }
.upsell-foot { font-size: 10px; color: var(--text-3); text-align: center; margin-top: 8px; letter-spacing: .05em; }

/* ── read-only tint (experiment) ────────────────────────────────── */

/* The feed and chat are look-but-don't-touch, so they get desaturated and
   dimmed while the rail, the install panel and the control bar — everything a
   guest can actually use — stay at full strength. Compare with ?tint=0.
   Filter rather than an overlay: it survives internal scrolling, needs no extra
   wrapper, and can't intercept the clicks that open the gate dialogs. */
:root {
  --tint-saturate: 0.5;
  --tint-brightness: 0.78;
}

[data-tint="on"] .feed,
[data-tint="on"] .side,
[data-tint="chat"] .side {
  filter: saturate(var(--tint-saturate)) brightness(var(--tint-brightness));
  transition: filter 180ms ease;
}

/* ── control bar ────────────────────────────────────────────────── */

/* Fixed height, never flexes — the feed above it takes the remaining space, which
   is how the client guarantees the bar is always on screen. */
.controls {
  flex: none;
  height: var(--control-h);
  border-top: 1px solid var(--card-border);
  background: var(--surface);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
/* Identity / voice card. Values from control_bar.slint: bg-app fill, 12px
   radius, #FFFFFF0D hairline, 6px padding, 16px spacing. */
.cb-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--app-bg);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 6px 16px 6px 6px;
  flex: none;
}
.cb-card.in-voice { padding-right: 8px; }

.cb-avatar {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--app-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  position: relative; flex: none;
}
.cb-presence {
  position: absolute; right: -1px; bottom: -1px;
  width: 14px; height: 14px; border-radius: 7px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.cb-card.in-voice .cb-presence { background: var(--app-bg); }
.cb-presence i { width: 8px; height: 8px; border-radius: 4px; background: var(--green); display: block; }

.cb-who { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.cb-name {
  font-size: 15px; font-weight: 600; color: #e0e0e0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-tag {
  font-size: 10px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.cb-tag.is-error { color: var(--accent); }

.cb-channel { display: flex; align-items: center; gap: 6px; }
.cb-channel-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--green); flex: none; }
.cb-channel-name {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--green);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* A 9px wrapper holding a 1px x 24px rule, as in the Slint separator. */
.cb-sep { width: 9px; display: flex; justify-content: center; flex: none; }
.cb-sep i { width: 1px; height: 24px; background: rgba(255,255,255,.08); display: block; }

.cb-hangup {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--accent-bg);
  border: 1px solid rgba(255,30,86,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent); flex: none;
}
.cb-hangup:hover { background: rgba(255,30,86,.2); }

.cb-spacer { flex: 1; }

.cb-group {
  display: flex; align-items: center; gap: 0;
  background: var(--app-bg);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 6px;
  flex: none;
}

.cb-action {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-2);
  background: transparent;
}
.cb-action:hover { background: rgba(255,255,255,.1); color: var(--text); }
.cb-action.is-clip { color: var(--amber); }
.cb-action.is-clip:hover { background: rgba(245,158,11,.2); color: var(--amber); }
/* `alert` marks a muted mic or deafened output - never an active control. */
.cb-action.is-alert { background: var(--accent-bg); color: var(--accent); }
.cb-action.is-alert:hover { background: rgba(255,30,86,.2); color: var(--accent); }

/* ── gate dialog ────────────────────────────────────────────────── */

.gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,6,8,.72);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.gate[open] { display: flex; }

.gate-box {
  width: 372px; max-width: 100%;
  background: #15171b;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.gate-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.gate-wm { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: #f4f5f7; }
.gate-kicker { font-size: 10px; font-weight: 500; color: #5b6068; letter-spacing: .08em; }
.gate-main { display: flex; gap: 13px; margin-bottom: 16px; }
.gate-icon {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  background: rgba(255,30,86,.12); border: 1px solid rgba(255,30,86,.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent);
}
.gate-title { font-size: 15px; font-weight: 600; color: #f4f5f7; margin-bottom: 5px; line-height: 1.3; }
.gate-text { font-size: 13px; color: #b3b7be; line-height: 1.5; }
.gate-list {
  background: #0a0b0d; border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 12px; margin-bottom: 16px;
}
.gate-list-label { font-size: 10px; font-weight: 600; letter-spacing: .09em; color: #5b6068; margin-bottom: 9px; }
.gate-list ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.gate-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b3b7be; }
.gate-keep {
  display: flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.22);
  border-radius: 8px; padding: 9px 11px; margin-bottom: 16px;
}
.gate-keep i { font-size: 15px; color: var(--green); flex: none; }
.gate-keep span { font-size: 11px; color: var(--text-2); line-height: 1.45; }
.gate-cta { width: 100%; background: var(--accent); color: #fff; border-radius: 9px; padding: 12px; font-size: 14px; font-weight: 700; margin-bottom: 9px; }
.gate-dismiss { width: 100%; background: transparent; border: 1px solid rgba(255,255,255,.12); color: #b3b7be; border-radius: 9px; padding: 10px; font-size: 13px; font-weight: 500; }
.gate-foot { text-align: center; font-size: 10px; color: #6b7079; margin-top: 13px; letter-spacing: .06em; }

/* ── responsive ─────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .app-body { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .side { display: none; }
  .feed-top { grid-template-columns: minmax(0, 1fr); }
  .feed-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .frame-head { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .frame-crew { font-size: 21px; }
  .frame-actions { width: 100%; margin-left: 0; }
  .frame-actions button { flex: 1; }
  .app { margin: 0 10px 10px; }
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .feed-row { grid-template-columns: minmax(0, 1fr); }
  .thumb.lg { height: 160px; }
  .controls { position: sticky; bottom: 0; }
}
