/* Design tokens from docs/mockup. The sidebar is dark-only, like Netflix. */
:root {
  --bg: #0e0f13;
  --surface: #15171c;
  --surface-2: #1a1d26;
  --raised: #1b1e26;
  --footer: #121318;
  --border: #23262f;
  --border-card: #262a35;
  --border-strong: #2e323d;

  --text: #eceef3;
  --text-2: #c9ceda;
  --muted: #a3aab8;
  --faint: #8c93a3;

  --accent: #9aa8ff;
  --accent-hover: #c3ccff;
  --accent-bg: #171a28;
  --on-accent: #0e0f13;

  /* Status bars: teal = in sync, amber = catching up, orange = out of sync, periwinkle = host changed. */
  --ok: #5fd9ae;
  --ok-bg: #102720;
  --ok-border: #1b3a30;
  --ok-text: #bff0dd;
  --ok-strong: #e3faf1;
  --ok-tag: #8fe3c4;
  --warn: #f2c766;
  --warn-bg: #2a2210;
  --warn-border: #4a3b15;
  --warn-text: #f7d88a;
  --warn-strong: #fcebc0;
  --bad: #ff9a62;
  --bad-bg: #2d1a10;
  --bad-border: #553019;
  --bad-text: #ffc09a;
  --bad-strong: #ffe0cc;
  --info-bg: #171a28;
  --info-border: #2f3660;
  --info-text: #c9d0ff;
  --info-strong: #e6e9ff;

  --danger: #ffb4b8;
  --danger-border: #4a2f35;

  --tone-1: #f2b544;
  --on-tone-1: #2a1d00;
  --tone-2: #7fd1e8;
  --on-tone-2: #052a33;
  --tone-3: #e8a0c8;
  --on-tone-3: #3a0a24;
  --tone-4: #b7e08a;
  --on-tone-4: #1c2e05;
  /* Chat names: lighter tones for text on --bg. */
  --name-1: #f7cf7a;
  --name-2: #a8e2f1;
  --name-3: #f2c2dc;
  --name-4: #cfeaa9;

  --react-heart: #f09abf;
  --react-laugh: #f2c766;
  --react-fire: #ff9a62;
  --react-shock: #9aa8ff;

  --font: Figtree, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 10px;
  --target: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-hover);
}
button,
input {
  font-family: inherit;
}
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── layout ─────────────────────────────────────────────────────────────── */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}
.screen-start,
.screen-join,
.screen-message {
  gap: 24px;
  padding: 32px 24px 24px;
}
.grow {
  flex-grow: 1;
}
.stack-8,
.stack-10,
.stack-12,
.stack-24 {
  display: flex;
  flex-direction: column;
}
.stack-8 {
  gap: 8px;
}
.stack-10 {
  gap: 10px;
}
.stack-12 {
  gap: 12px;
}
.stack-24 {
  gap: 24px;
}
.row-10 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-between {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.truncate {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── type ───────────────────────────────────────────────────────────────── */
h1,
h2,
p {
  margin: 0;
}
.h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.h2 {
  font-size: 16px;
  font-weight: 700;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.label {
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.muted {
  color: var(--muted);
}
.text-2 {
  color: var(--text-2);
}
.hint {
  font-size: 12px;
  color: var(--muted);
}
.hint:empty,
.conn-note:empty {
  display: none;
}
.center {
  text-align: center;
}
.strong {
  font-weight: 600;
  color: var(--text);
}
.mono {
  font-family: var(--mono);
  font-weight: 500;
}
.code {
  letter-spacing: 0.06em;
}

/* ── controls ───────────────────────────────────────────────────────────── */
.btn {
  min-height: var(--target);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  border: 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn-lg {
  min-height: 48px;
}
.btn-sm {
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  gap: 6px;
}
.btn-bold {
  font-weight: 700;
}
.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger-border);
  font-size: 13px;
}
.btn-pill {
  border-radius: 22px;
}
.btn-link {
  min-height: var(--target);
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-link:hover:not(:disabled) {
  color: var(--accent-hover);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input {
  height: var(--target);
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
.input[aria-invalid="true"] {
  border-color: var(--bad);
}
.input-code {
  letter-spacing: 0.3em;
  font-size: 18px;
}
.field-error {
  font-size: 12px;
  color: var(--bad-text);
}

.choices {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choices legend {
  margin-bottom: 8px;
}
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
}
.choice[data-checked="true"] {
  border: 1.5px solid var(--accent);
  background: var(--accent-bg);
}
.choice input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── pieces ─────────────────────────────────────────────────────────────── */
.card {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}
.note-icon {
  flex: none;
  margin-top: 1px;
  color: var(--muted);
}

.title-card {
  height: 168px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 16px;
}
.title-card .eyebrow {
  font-size: 11px;
}
.title-card-title {
  font-size: 18px;
  font-weight: 700;
}
.title-card-sub {
  font-size: 13px;
  color: var(--text-2);
}

.avatar {
  flex: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.avatar-24 {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
.avatar-28 {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.avatar-32 {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.avatar[data-tone="accent"] {
  background: var(--accent);
  color: var(--on-accent);
}
.avatar[data-tone="1"] {
  background: var(--tone-1);
  color: var(--on-tone-1);
}
.avatar[data-tone="2"] {
  background: var(--tone-2);
  color: var(--on-tone-2);
}
.avatar[data-tone="3"] {
  background: var(--tone-3);
  color: var(--on-tone-3);
}
.avatar[data-tone="4"] {
  background: var(--tone-4);
  color: var(--on-tone-4);
}
.avatar-ring {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
.avatar-more {
  background: var(--raised);
  color: var(--text-2);
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.member-action {
  min-width: var(--target);
}
.member-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--raised);
  border: 1px solid var(--border-strong);
}
.member-confirm .btn-sm {
  height: var(--target);
  min-height: var(--target);
}
.member-name {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-tag {
  color: var(--muted);
  font-size: 12px;
}
.member-status {
  font-size: 12px;
  color: var(--muted);
}
.member-status[data-status="ready"] {
  color: var(--ok);
}
.member-status[data-status="netflix_open"] {
  color: var(--warn);
}
.member-status[data-sync="catching_up"] {
  color: var(--warn);
}
.member-status[data-sync="out_of_sync"] {
  color: var(--bad);
}

.invite {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invite-row {
  display: flex;
  gap: 8px;
}
.invite-url {
  flex-grow: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  line-height: 38px;
  text-overflow: ellipsis;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border-card);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  user-select: all;
}

.conn-note {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

/* ── start / join ───────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.step[data-state="current"] {
  background: var(--accent-bg);
  border: 1.5px solid var(--accent);
}
.step-check {
  color: var(--ok);
}
.step-num {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.step[data-state="current"] .step-num {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── lobby ──────────────────────────────────────────────────────────────── */
.lobby-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lobby-host {
  flex-grow: 1;
  font-size: 13px;
  color: var(--muted);
}

.screen-message {
  justify-content: center;
}

/* After leaving: rejoin, join another party by code or link, or host. */
.screen-left {
  gap: 28px;
  padding: 32px 24px 24px;
}
.stack-14 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row-8 {
  display: flex;
  gap: 8px;
}
.join-code-form {
  gap: 8px;
}
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.or-divider span {
  flex-grow: 1;
  height: 1px;
  background: var(--border);
}
.input-party-code {
  min-width: 0;
  font-family: var(--mono, "JetBrains Mono", ui-monospace, monospace);
  letter-spacing: 0.08em;
}
.input-party-code::placeholder {
  /* Dimmer than hint text, so the example never reads as a filled-in code. */
  color: #7d8494;
  letter-spacing: 0.08em;
}
.field-error-icon {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
}
.field-error-icon svg {
  flex: none;
  margin-top: 2px;
}

/* ── party ──────────────────────────────────────────────────────────────── */
.screen-party {
  height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  overflow: hidden;
}
.party-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.party-head-text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.h-party {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.party-invite {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.sync-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid;
}
.sync-text {
  flex-grow: 1;
}
.sync-text strong {
  font-weight: 600;
}
.sync-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sync-bar[data-tone="ok"] {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}
.sync-bar[data-tone="ok"] .sync-icon {
  color: var(--ok);
}
.sync-bar[data-tone="ok"] strong {
  color: var(--ok-strong);
}
.sync-bar[data-tone="ok"] .sync-tag {
  color: var(--ok-tag);
}
.sync-bar[data-tone="warn"] {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}
.sync-bar[data-tone="warn"] .sync-icon,
.sync-bar[data-tone="warn"] .sync-tag {
  color: var(--warn);
}
.sync-bar[data-tone="warn"] strong {
  color: var(--warn-strong);
}
.sync-bar[data-tone="bad"] {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: var(--bad-text);
}
.sync-bar[data-tone="bad"] .sync-icon,
.sync-bar[data-tone="bad"] .sync-tag {
  color: var(--bad);
}
.sync-bar[data-tone="bad"] strong {
  color: var(--bad-strong);
}
.sync-bar[data-tone="info"] {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-text);
}
.sync-bar[data-tone="info"] .sync-icon,
.sync-bar[data-tone="info"] .sync-tag {
  color: var(--accent);
}
.sync-bar[data-tone="info"] strong {
  color: var(--info-strong);
}
/* 44px hit area around the mockup's 32px button face; negative margins keep the bar's height. */
.sync-btn {
  flex: none;
  min-width: var(--target);
  min-height: var(--target);
  margin: -6px 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.sync-btn-face {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.sync-bar[data-tone="bad"] .sync-btn-face {
  background: var(--bad);
  color: #2d1205;
}
.sync-bar[data-tone="info"] .sync-btn-face {
  background: var(--accent);
  color: var(--on-accent);
}
.sync-btn-icon {
  color: var(--info-text);
}
.sync-btn-icon:hover {
  color: var(--info-strong);
}
.sync-countdown {
  white-space: nowrap;
}
.sync-note {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.blocked-notice {
  display: flex;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--raised);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 13px;
}
.blocked-notice svg {
  flex: none;
  margin-top: 1px;
}

.party-people {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.avatar-row {
  display: flex;
  gap: 6px;
}
.people-toggle {
  flex: none;
  min-height: var(--target);
  margin: -6px -8px -6px 0;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.people-toggle:hover {
  color: var(--text);
}
.people-toggle[aria-expanded="true"] .people-chevron {
  transform: rotate(180deg);
}
.party-members {
  flex: none;
  max-height: 40vh;
  overflow-y: auto;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--border);
}

/* ── cameras ─────────────────────────────────────────────────────────────── */
.cameras {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.cameras-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}
.cameras-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cameras-btn {
  flex: none;
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.cameras-btn:hover {
  color: var(--text);
}
.cameras-btn[aria-pressed="true"] {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--text);
}
.cameras-btn-icon {
  width: 28px;
  padding: 0;
}
.cameras-btn[aria-expanded="false"] .cameras-chevron {
  transform: rotate(180deg);
}
.cameras-audio {
  align-self: flex-start;
}
/* Two rows at most, then scroll, so chat below keeps a usable height. */
.cam-grid {
  --tile-h: 96px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: var(--tile-h);
  gap: 8px;
  /* Short windows: never more than about a third of the height. */
  max-height: min(calc(var(--tile-h) * 2 + 8px), 32vh);
  overflow-y: auto;
}
.cam-grid[data-dense] {
  --tile-h: 72px;
}
.cam-tile {
  position: relative;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}
/* The ring sits above the video, inset like the mockup's box-shadow. */
.cam-tile[data-speaking]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--ok);
  pointer-events: none;
}
.cam-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Your own preview reads like a mirror; others see you unflipped. */
.cam-mirror {
  transform: scaleX(-1);
}
.cam-name {
  position: absolute;
  left: 8px;
  bottom: 6px;
  max-width: calc(100% - 16px);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(14, 15, 19, 0.75);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.cam-off {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: 12px;
}
.cam-off > .truncate {
  max-width: 100%;
}
.cam-off-sub {
  font-size: 11px;
}
.media-note {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 12px;
}
.media-toggle {
  flex: none;
  width: var(--target);
  height: var(--target);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: var(--raised);
  color: var(--text-2);
  cursor: pointer;
}
.media-toggle:hover:not(:disabled) {
  color: var(--text);
}
.media-toggle[aria-pressed="true"] {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--text);
}
.media-toggle:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── chat ───────────────────────────────────────────────────────────────── */
.chat {
  flex-grow: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-log-wrap {
  position: relative;
  flex-grow: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-log {
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
}
/* Messages sit at the bottom while the log is short, as in the mockup. */
.chat-log > :first-child {
  margin-top: auto;
}
.chat-log:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.chat-empty {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}
.chat-event {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  overflow-wrap: anywhere;
}
.chat-event-icon {
  display: inline-flex;
  vertical-align: -2px;
}
.chat-group {
  display: flex;
  gap: 8px;
}
.chat-group-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-name {
  font-size: 13px;
  font-weight: 600;
}
.chat-name[data-tone="accent"] {
  color: var(--accent-hover);
}
.chat-name[data-tone="1"] {
  color: var(--name-1);
}
.chat-name[data-tone="2"] {
  color: var(--name-2);
}
.chat-name[data-tone="3"] {
  color: var(--name-3);
}
.chat-name[data-tone="4"] {
  color: var(--name-4);
}
.chat-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-text[data-status="pending"] {
  color: var(--text-2);
}
.chat-status {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}
.chat-failed {
  color: var(--danger);
}
.chat-retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.chat-retry:hover {
  color: var(--accent-hover);
}
.chat-pill {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.chat-pill:hover {
  background: var(--surface-2);
}
.chat .conn-note {
  padding: 0 16px 6px;
}
.chat-notice {
  padding: 0 16px 6px;
  font-size: 12px;
  color: var(--danger);
}
.chat-reactions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px 8px;
}
.reaction-btn {
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.reaction-btn:hover {
  background: var(--raised);
}
.reaction-btn[data-pressed] {
  background: var(--accent-bg);
  border-color: currentColor;
  transform: scale(0.92);
}
.reaction-btn[data-reaction="heart"],
.chat-event-icon[data-reaction="heart"],
.cam-badge[data-reaction="heart"] {
  color: var(--react-heart);
}
.reaction-btn[data-reaction="laugh"],
.chat-event-icon[data-reaction="laugh"],
.cam-badge[data-reaction="laugh"] {
  color: var(--react-laugh);
}
.reaction-btn[data-reaction="fire"],
.chat-event-icon[data-reaction="fire"],
.cam-badge[data-reaction="fire"] {
  color: var(--react-fire);
}
.reaction-btn[data-reaction="shock"],
.chat-event-icon[data-reaction="shock"],
.cam-badge[data-reaction="shock"] {
  color: var(--react-shock);
}
/* Zoom-style echo of a reaction on the sender's camera tile. */
.cam-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 15, 19, 0.8);
  animation: cam-badge-in 200ms ease-out;
}
@keyframes cam-badge-in {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cam-badge { animation: none; }
}
.chat-form {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}
.chat-input {
  flex-grow: 1;
  min-width: 0;
  height: var(--target);
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}
.chat-input::placeholder {
  color: var(--faint);
}
.chat-input[aria-invalid="true"] {
  border-color: var(--danger-border);
}
.chat-send {
  flex: none;
  width: var(--target);
  height: var(--target);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--border-card);
  color: var(--text);
  cursor: pointer;
}
.chat-send:hover {
  background: var(--border-strong);
}
.chat-limit {
  margin-top: -6px;
  padding: 0 16px 10px;
  font-size: 12px;
  color: var(--faint);
  text-align: right;
}
.chat-limit[data-over] {
  color: var(--danger);
}
/* Link-styled action inside running text (the blocked notice's "Ask in chat"). */
.btn-inline {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.btn-inline:hover {
  color: var(--accent-hover);
}
@media (prefers-reduced-motion: reduce) {
  .reaction-btn {
    transition: none;
  }
  .reaction-btn[data-pressed] {
    transform: none;
  }
}
.party-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--footer);
}

/* ── web join page ──────────────────────────────────────────────────────── */
.join-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.join-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 24px 24px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
}
body[data-mode="join"] {
  background: #08090c;
}
.install-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-2);
}
