/* ============================================================
   iCinema — watch rooms
   ============================================================ */
.rooms-page { padding-top: var(--header-h); transition: padding-top 0.42s var(--ease-out); }
.rooms-page .site-header { position: fixed; }

/* With the header gone the stage reclaims its height, so the room goes
   genuinely full-screen rather than leaving a gap where the bar was. */
.rooms-page.chrome-hidden { padding-top: 0; }
.rooms-page.chrome-hidden .room-shell { height: 100vh; }

/* ---------- lobby ---------- */
.rooms-lobby { padding-block: clamp(28px, 5vw, 56px) 90px; }
.lobby-head { margin-bottom: clamp(26px, 4vw, 44px); max-width: 680px; }
.lobby-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.lobby-head p { color: var(--text-dim); font-size: 15px; }

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 26px);
  margin-bottom: clamp(36px, 5vw, 60px);
}

.room-form {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--raise);
  box-shadow: var(--shadow-sm);
}
.room-form h2 { font-size: 1.15rem; font-weight: 700; }
.room-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-dim); }

.room-form input {
  height: 48px; padding-inline: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 15px; color: var(--text);
  outline: none;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.room-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.room-form .primary-btn, .room-form .secondary-btn { justify-content: center; margin-top: 4px; }

.privacy-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.privacy-option {
  display: flex; flex-direction: column; gap: 4px;
  padding: 13px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: start;
  transition: all var(--fast) var(--ease);
}
.privacy-option strong { font-size: 13.5px; font-weight: 700; }
.privacy-option small { font-size: 11px; color: var(--text-faint); line-height: 1.4; }
.privacy-option:hover { background: var(--surface-2); }
.privacy-option.active { border-color: var(--brand); background: var(--brand-soft); }

.public-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(14px, 1.6vw, 22px); }

.room-card {
  display: flex; flex-direction: column; gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--raise);
  cursor: pointer;
  transition: transform var(--mid) var(--ease-out), border-color var(--fast) var(--ease), box-shadow var(--mid) var(--ease);
}
.room-card:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: var(--shadow); }

.room-card-art { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.room-card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow) var(--ease-out); }
.room-card:hover .room-card-art img { transform: scale(1.07); }
.room-card-blank { width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; color: var(--surface-3); }

.room-live {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(6, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 700;
}
.room-live b { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-hot); animation: pulse 2s var(--ease) infinite; }

.room-card-body { padding: 15px 16px 6px; display: flex; flex-direction: column; gap: 4px; }
.room-card-body h3 { font-size: 15px; font-weight: 700; }
.room-card-body p { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card-body small { font-size: 11.5px; color: var(--text-faint); }
.room-join { margin: 12px 16px 16px; justify-content: center; height: 42px; font-size: 14px; }

/* ---------- room shell ---------- */
/* Immersive layout: the video owns the screen, chat sits beside it. */
.room-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
  transition: height 0.42s var(--ease-out);
}

@media (min-width: 1060px) {
  .room-shell { grid-template-columns: minmax(0, 1fr) 368px; }
}

.room-stage {
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0; min-height: 0;
  padding: 12px 16px 14px;
  overflow-y: auto;
}

.room-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.room-topbar h1 { font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 700; letter-spacing: -0.02em; }
.room-topbar .section-kicker { margin-bottom: 2px; }
.room-topbar-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding-inline: 17px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--raise);
  font-size: 13px; font-weight: 600;
  color: var(--text-dim);
  transition: all var(--fast) var(--ease);
}
.chip-btn:hover { background: var(--surface-2); color: var(--text); transform: translateY(-2px); }
.chip-btn b { color: var(--gold); letter-spacing: 0.1em; }
.chip-btn.danger:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.room-settings {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--raise);
  animation: popIn var(--fast) var(--ease-out) both;
}
.room-settings[hidden] { display: none; }
.room-settings .picker-field { flex: 1; min-width: 180px; height: 42px; }
.room-settings .primary-btn { height: 42px; padding-inline: 22px; font-size: 13.5px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; cursor: pointer; }
.switch input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }

.room-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.room-video video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.room-video video[hidden] { display: none; }

.room-video-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center;
  background: var(--surface);
}
.room-video-empty[hidden] { display: none; }
.room-video-empty b { font-size: 40px; color: var(--surface-3); font-weight: 400; }
.room-video-empty p { color: var(--text-faint); font-size: 14px; }

/* ---------- YouTube stage + follower lock ---------- */
#ytHost { position: absolute; inset: 0; }
#ytHost[hidden] { display: none; }
#ytHost iframe, #ytFrame { width: 100%; height: 100%; border: 0; display: block; }

/* Swallows clicks for everyone except the leader, so a follower cannot
   pause or scrub the embed out from under the room. */
.yt-shield { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: transparent; }
#roomStage.follower .yt-shield { pointer-events: auto; }

.follow-lock {
  position: absolute;
  inset-block-end: 12px; inset-inline-start: 12px;
  z-index: 4;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 14, 0.82);
  border: 1px solid rgba(245, 183, 60, 0.3);
  backdrop-filter: blur(12px);
  font-size: 11.5px; font-weight: 600;
  color: var(--gold);
  pointer-events: none;
}
.follow-lock[hidden] { display: none; }

/* ---------- leader's content picker ---------- */
.picker {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--raise);
  animation: popIn var(--fast) var(--ease-out) both;
}
.picker[hidden] { display: none; }

.picker-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface); align-self: flex-start; }
.picker-tab { padding: 8px 18px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--text-faint); transition: all var(--fast) var(--ease); }
.picker-tab.active { background: var(--brand); color: #fff; }

.picker-body { display: flex; flex-direction: column; gap: 11px; }
.picker-body[hidden] { display: none; }

.picker-field {
  height: 46px; padding-inline: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 14px; color: var(--text); outline: none;
  transition: border-color var(--fast) var(--ease);
}
.picker-field:focus { border-color: var(--brand); }
.picker-note { font-size: 12.5px; color: var(--text-faint); }
.picker-body .primary-btn { height: 46px; justify-content: center; font-size: 14px; }

.picker-results { display: flex; flex-direction: column; gap: 5px; max-height: 280px; overflow-y: auto; }

.pick-hit {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-align: start;
  transition: all var(--fast) var(--ease);
}
/* ---------- YouTube browser ---------- */
.yt-link-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; border: 1px solid rgba(229,9,20,.3); border-radius: 16px; background: linear-gradient(135deg, rgba(94,16,29,.3), rgba(17,18,27,.94)); }
.yt-link-title { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 14px; font-weight: 800; }
.yt-link-title span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--brand); color: #fff; font-size: 18px; }
.yt-link-card p, .yt-link-card small { margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.5; }
.yt-link-card small { color: var(--text-faint); }
.yt-link-card .picker-field { background: rgba(0,0,0,.4); }
@media (max-width: 520px) {
  .yt-link-card { padding: 13px; }
  .yt-link-card .field-pair { flex-wrap: wrap; }
  .yt-link-card .field-pair .picker-field { flex-basis: 100%; }
  .yt-link-card .field-pair .primary-btn { flex: 1; }
}
.yt-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.yt-bar .picker-field { flex: 1; min-width: 170px; }

.yt-modes { display: inline-flex; padding: 4px; gap: 3px; border-radius: var(--radius-pill); background: var(--surface); }
.yt-mode { padding: 7px 15px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; color: var(--text-faint); transition: all var(--fast) var(--ease); }
.yt-mode.active { background: var(--brand); color: #fff; }

.yt-results { max-height: 340px; gap: 4px; }

.yt-hit {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--fast) var(--ease);
}
.yt-hit:hover { background: var(--surface); border-color: var(--line-strong); }

.yt-thumb { position: relative; display: block; }
.yt-thumb img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--surface-2); display: block; }
.yt-thumb i {
  position: absolute; inset-block-end: 4px; inset-inline-end: 4px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 10px; font-weight: 700; font-style: normal;
  color: #fff;
}

.yt-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: block; }
.yt-channel-hit { grid-template-columns: 56px minmax(0, 1fr) auto; }

.yt-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yt-hit strong {
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-hit small { font-size: 11px; color: var(--text-faint); }
.yt-hit .yt-channel { cursor: pointer; transition: color var(--fast) var(--ease); }
.yt-hit .yt-channel:hover { color: var(--gold); text-decoration: underline; }
.yt-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: 0.8; }

.yt-more { height: 40px; justify-content: center; font-size: 13px; }
.yt-more[hidden] { display: none; }

.yt-channel-head {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.yt-channel-head img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.yt-channel-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yt-channel-head strong { font-size: 13.5px; font-weight: 700; }
.yt-channel-head small { font-size: 11px; color: var(--text-faint); }
#ytChannelHead[hidden] { display: none; }

.yt-watch {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
  transition: all var(--fast) var(--spring);
}
.yt-watch:hover { background: var(--brand-hot); transform: scale(1.05); }

.picker-or { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 11.5px; }
.picker-or::before, .picker-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.field-pair { display: flex; gap: 8px; align-items: center; }
.field-pair .picker-field { flex: 1; min-width: 0; }
.field-pair .primary-btn { height: 46px; padding-inline: 22px; white-space: nowrap; }

.picker-note.bad { color: #ff8da0; }
.picker-note b { color: var(--gold); font-family: ui-monospace, Consolas, monospace; }

.pick-hit:hover { background: var(--surface); border-color: var(--brand); }
.pick-hit img { width: 38px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; background: var(--surface-2); }
.pick-hit span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-hit strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-hit small { font-size: 11px; color: var(--text-faint); }

.leader-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 183, 60, 0.3);
  background: rgba(245, 183, 60, 0.08);
}
.leader-bar[hidden] { display: none; }
.leader-tag { font-size: 12.5px; font-weight: 700; color: var(--gold); margin-inline-end: auto; }

/* ---------- side panel ---------- */
.room-side {
  display: flex; flex-direction: column;
  min-height: 0;
  border-inline-start: 1px solid var(--line);
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(22px) saturate(150%);
}

.side-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--line); flex-shrink: 0; }

.side-tab {
  padding: 14px 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  transition: all var(--fast) var(--ease);
}
.side-tab:hover { color: var(--text-dim); background: rgba(255, 255, 255, 0.03); }
.side-tab.active { color: var(--text); border-bottom-color: var(--brand); }
.side-tab b { font-size: 11px; color: var(--gold); margin-inline-start: 5px; }

.side-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.side-panel[hidden] { display: none; }

/* ---------- chat ---------- */
/* Compact, conversational lines rather than bubbles — far more readable in a
   narrow column while a film is playing. */
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; scroll-behavior: smooth; }

.chat-row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px; align-items: start;
  animation: popIn var(--fast) var(--ease-out) both;
}

.chat-avatar {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 10px; font-weight: 700;
  color: var(--text-dim);
  margin-top: 1px;
}
.chat-row.mine .chat-avatar { background: var(--brand); color: #fff; }

.chat-line { min-width: 0; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.chat-line b { color: var(--gold); font-weight: 700; margin-inline-end: 6px; cursor: default; }
.chat-row.mine .chat-line b { color: var(--brand-hot); }
.chat-line span { color: var(--text); }

.chat-media { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 5px; background: var(--surface-2); }

.chat-draft { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.chat-draft[hidden] { display: none; }
.chat-draft img, .chat-draft video { width: 58px; height: 58px; object-fit: cover; border-radius: var(--radius-sm); background: #000; }
.chat-draft span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-dim); }
.chat-draft button { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: 18px; }
.chat-draft button:hover { background: var(--brand); color: #fff; }

.chat-composer {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.chat-composer #chatInput {
  flex: 1; min-width: 0;
  height: 42px; padding-inline: 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35);
  font-size: 14px; color: var(--text);
  outline: none;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.chat-composer #chatInput:focus { border-color: var(--brand); background: rgba(0, 0, 0, 0.5); }

.icon-round {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--fast) var(--spring);
}
.icon-round:hover { background: var(--surface-2); transform: scale(1.07); }
.icon-round.send { background: var(--brand); border-color: var(--brand); color: #fff; }
.icon-round.send:hover { background: var(--brand-hot); }
.icon-round.send:disabled { opacity: 0.55; cursor: wait; }

/* Mic is the one control people reach for mid-film, so it reads as live. */
#micToggle.active {
  background: var(--green); border-color: var(--green); color: #fff;
  box-shadow: 0 0 0 0 rgba(47, 160, 92, 0.5);
  animation: micLive 2s var(--ease) infinite;
}
@keyframes micLive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 160, 92, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(47, 160, 92, 0); }
}
.icon-round:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* ---------- members ---------- */
.member-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }

.member-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background var(--fast) var(--ease);
}
.member-row:hover { background: var(--surface); }
.member-row.me { background: var(--brand-soft); border-color: rgba(216, 28, 63, 0.26); }

.member-avatar {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
}
.member-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.member-meta strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-meta small { font-size: 11px; color: var(--text-faint); }

.mic-state { font-size: 14px; opacity: 0.45; }
.mic-state.on { opacity: 1; }

.member-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.mini-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 11.5px; font-weight: 600;
  color: var(--text-dim);
  transition: all var(--fast) var(--ease);
}
.mini-btn:hover { background: var(--surface-3); color: var(--text); }
.mini-btn.danger:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Phone/tablet: video pinned on top, chat takes everything underneath. */
@media (max-width: 1059px) {
  .room-shell {
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100vh - var(--header-h));
  }
  .room-stage { padding: 10px 12px; overflow: visible; flex-shrink: 0; }
  .room-topbar h1 { font-size: 1.05rem; }
  .room-side { border-inline-start: 0; border-top: 1px solid var(--line); min-height: 0; }
  .leader-bar { padding: 9px 11px; gap: 7px; }
  .leader-tag { width: 100%; margin-inline-end: 0; }
  /* The lobby keeps the site dock; inside a room the film gets the screen. */
  body.rooms-page.in-room { padding-bottom: 0; }
  .rooms-page.in-room .mobile-dock { display: none; }
}

@media (max-width: 560px) {
  .room-topbar-actions .chip-btn { height: 34px; padding-inline: 12px; font-size: 12px; }
  .chat-log { padding: 11px; }
}

/* ============================================================
   Member lobby — account-first watch party experience
   ============================================================ */
.rooms-page {
  background:
    radial-gradient(900px 520px at 88% 8%, rgba(229, 9, 20, 0.12), transparent 66%),
    radial-gradient(720px 520px at 8% 42%, rgba(82, 35, 130, 0.1), transparent 64%),
    var(--bg-deep);
}

.rooms-header-actions { min-width: 220px; }
.room-account { display: flex; justify-content: flex-end; min-width: 0; }
.account-skeleton { width: 142px; height: 40px; border-radius: var(--radius-pill); background: var(--surface); animation: shimmer 1.5s infinite; }
.account-chip, .account-login {
  min-height: 42px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 8px 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.045);
  color: var(--text);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--spring);
}
.account-chip:hover, .account-login:hover { border-color: rgba(229,9,20,.65); background: var(--brand-soft); transform: translateY(-1px); }
.account-avatar {
  width: 32px; height: 32px; display: grid; place-items: center; object-fit: cover;
  border-radius: 50%; background: var(--accent-grad); color: #fff; font-size: 10px; font-weight: 800;
  box-shadow: 0 0 0 3px rgba(229,9,20,.12);
}
.account-chip > span:not(.account-avatar) { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.account-chip strong { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-chip small { direction: ltr; color: var(--text-faint); font-size: 9.5px; }
.account-login { padding-inline: 17px; font-size: 12.5px; font-weight: 700; }
.account-login span { color: var(--brand-hot); font-size: 18px; }

.rooms-lobby { padding-block: 18px 100px; }
.lobby-hero {
  position: relative; isolation: isolate;
  min-height: 430px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); align-items: center; gap: clamp(30px, 6vw, 90px);
  margin-bottom: 28px; padding: clamp(34px, 5vw, 70px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08); border-radius: 30px;
  background: linear-gradient(120deg, rgba(17,18,25,.96), rgba(8,9,14,.92));
  box-shadow: 0 32px 90px rgba(0,0,0,.36);
}
.lobby-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.022) 50%, transparent 50.2%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 44px;
  mask-image: linear-gradient(90deg, transparent, #000 48%, #000);
}
.lobby-hero::after {
  content: ''; position: absolute; width: 420px; height: 420px; inset-inline-end: -120px; top: -210px; z-index: -1;
  border-radius: 50%; background: rgba(229,9,20,.16); filter: blur(70px);
}
.live-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px;
  color: #ff5a65; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; direction: ltr;
}
.live-eyebrow b, .room-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ff2636;
  box-shadow: 0 0 0 5px rgba(255,38,54,.12), 0 0 18px #e50914; animation: pulse 2s infinite;
}
.lobby-hero-copy h1 { max-width: 680px; font-size: clamp(2.5rem, 5.8vw, 5.6rem); line-height: .98; font-weight: 900; letter-spacing: -.055em; }
.lobby-hero-copy h1 em { font-style: normal; color: #ff1423; text-shadow: 0 10px 44px rgba(229,9,20,.22); }
.lobby-hero-copy > p { max-width: 600px; margin-top: 22px; color: var(--text-dim); font-size: clamp(14px, 1.35vw, 17px); line-height: 1.85; }
.hero-feature-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.hero-feature-row span { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: rgba(255,255,255,.035); color: var(--text-dim); font-size: 11px; }

.lobby-visual { position: relative; min-height: 310px; perspective: 1000px; }
.visual-glow { position: absolute; width: 78%; aspect-ratio: 1; left: 9%; top: -3%; border-radius: 50%; background: rgba(229,9,20,.22); filter: blur(68px); }
.watch-screen {
  position: absolute; inset: 30px 5% 32px 7%;
  overflow: hidden; border: 8px solid #1a1c24; border-bottom-width: 18px; border-radius: 20px;
  background:
    linear-gradient(0deg, rgba(0,0,0,.82), transparent 52%),
    radial-gradient(circle at 65% 38%, rgba(229,9,20,.3), transparent 19%),
    linear-gradient(125deg, #201116, #090a10 52%, #2b171b);
  box-shadow: 0 35px 70px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.1) inset;
  transform: rotateY(-9deg) rotateX(3deg);
}
.watch-screen::before { content: 'iCinema'; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.035); font-size: 64px; font-weight: 900; direction: ltr; }
.screen-live { position: absolute; top: 15px; inset-inline-start: 15px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; background: #e50914; font-size: 9px; font-weight: 900; direction: ltr; }
.screen-live b { width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.screen-play { position: absolute; inset: 0; display: grid; place-items: center; margin: auto; width: 56px; height: 56px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(0,0,0,.38); color: #fff; padding-inline-start: 4px; backdrop-filter: blur(12px); }
.screen-progress { position: absolute; left: 18px; right: 18px; bottom: 15px; height: 4px; border-radius: 8px; background: rgba(255,255,255,.18); }
.screen-progress i { display: block; width: 62%; height: 100%; border-radius: inherit; background: #e50914; box-shadow: 0 0 14px #e50914; }
.floating-member { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 3px solid #11131a; border-radius: 50%; color: #fff; font: 800 11px/1 Arial; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.member-one { right: -3px; top: 28px; background: #7040d0; }
.member-two { left: -8px; bottom: 52px; background: #d12f58; }
.member-three { right: 8px; bottom: 18px; background: #1f8569; }
.sync-pill { position: absolute; z-index: 2; left: 20%; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid rgba(74,222,128,.28); border-radius: 13px; background: rgba(10,16,15,.86); box-shadow: 0 18px 38px rgba(0,0,0,.42); backdrop-filter: blur(18px); }
.sync-pill > b { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #2fa05c; }
.sync-pill span { display: flex; flex-direction: column; }
.sync-pill strong { font-size: 10.5px; }
.sync-pill small { direction: ltr; color: #65d58f; font: 700 9px/1.4 ui-monospace, monospace; }

.member-access {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); gap: clamp(22px, 4vw, 58px); align-items: stretch;
  margin-bottom: 76px; padding: clamp(22px, 4vw, 54px);
  border: 1px solid var(--line); border-radius: 28px;
  background: rgba(12,13,19,.78); box-shadow: var(--shadow-lg);
}
.auth-story { display: flex; flex-direction: column; justify-content: center; padding: clamp(4px, 2vw, 24px); }
.auth-story h2 { max-width: 560px; font-size: clamp(1.7rem, 3vw, 3rem); line-height: 1.2; letter-spacing: -.035em; }
.auth-story > p { max-width: 590px; margin-top: 15px; color: var(--text-dim); font-size: 14px; line-height: 1.8; }
.auth-benefits { display: grid; gap: 10px; margin-top: 28px; }
.auth-benefits > div { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 12px; padding: 11px; border: 1px solid transparent; border-radius: 13px; transition: border-color var(--fast), background var(--fast); }
.auth-benefits > div:hover { border-color: var(--line); background: rgba(255,255,255,.025); }
.auth-benefits i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: #ff4350; font-style: normal; }
.auth-benefits span { display: flex; flex-direction: column; gap: 2px; }
.auth-benefits strong { font-size: 13px; }
.auth-benefits small { color: var(--text-faint); font-size: 11px; }
.privacy-note { display: flex; align-items: center; gap: 9px; margin-top: 25px; color: #65d58f; font-size: 11px; }
.privacy-note b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(47,160,92,.16); }

.auth-card { padding: clamp(20px, 3vw, 34px); border: 1px solid rgba(255,255,255,.09); border-radius: 22px; background: rgba(6,7,11,.84); box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.pending-invite { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; padding: 11px 13px; border: 1px solid rgba(245,183,60,.28); border-radius: 12px; background: rgba(245,183,60,.08); }
.pending-invite > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(245,183,60,.12); color: var(--gold); }
.pending-invite div { display: flex; flex-direction: column; }
.pending-invite strong { font-size: 12px; }
.pending-invite small { color: var(--text-faint); font-size: 10.5px; }
.pending-invite small b { direction: ltr; color: var(--gold); letter-spacing: .1em; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface); }
.auth-tab { height: 42px; border-radius: 10px; color: var(--text-faint); font-size: 12.5px; font-weight: 700; transition: all var(--fast); }
.auth-tab.active { background: #e50914; color: #fff; box-shadow: 0 8px 24px rgba(229,9,20,.24); }
.auth-form { display: flex; flex-direction: column; gap: 13px; padding-top: 24px; animation: popIn var(--mid) var(--ease-out) both; }
.auth-form[hidden] { display: none; }
.auth-heading { margin-bottom: 3px; }
.auth-heading h3 { font-size: 1.35rem; }
.auth-heading p { margin-top: 4px; color: var(--text-faint); font-size: 11.5px; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--text-dim); font-size: 11.5px; font-weight: 700; }
.auth-field > span { display: flex; justify-content: space-between; }
.auth-field > span small { color: var(--text-faint); font-size: 9.5px; font-weight: 500; }
.auth-field input { width: 100%; height: 47px; padding-inline: 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #090a0f; color: var(--text); font-size: 13.5px; outline: none; transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
.auth-field input:focus { border-color: #e50914; background: #0c0d13; box-shadow: 0 0 0 4px rgba(229,9,20,.11); }
.password-field { position: relative; }
.password-field input { padding-inline-end: 64px; }
.password-field button { position: absolute; inset-inline-end: 8px; top: 8px; height: 31px; padding-inline: 9px; border-radius: 7px; color: #ff5661; font-size: 10px; font-weight: 700; }
.password-field button:hover { background: var(--brand-soft); }
.auth-error { padding: 9px 11px; border: 1px solid rgba(255,74,94,.24); border-radius: 9px; background: rgba(229,9,20,.08); color: #ff8f9b; font-size: 11px; }
.auth-error[hidden] { display: none; }
.auth-submit, .room-primary-action, .room-secondary-action {
  min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 18px;
  border-radius: 11px; background: #e50914; color: #fff; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 12px 28px rgba(229,9,20,.2); transition: transform var(--fast) var(--spring), background var(--fast), box-shadow var(--fast);
}
.auth-submit:hover, .room-primary-action:hover { background: #ff1523; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(229,9,20,.3); }
.auth-submit:disabled, .room-primary-action:disabled, .room-secondary-action:disabled { opacity: .62; cursor: wait; transform: none; }
.button-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-switch, .auth-legal { color: var(--text-faint); font-size: 10.5px; text-align: center; line-height: 1.5; }
.auth-switch button { color: #ff5661; font-weight: 700; }

.member-workspace { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: 18px; margin-bottom: 76px; }
.workspace-stack { display: grid; grid-template-rows: 1fr auto; gap: 18px; }
.room-action-card, .member-profile-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(15,16,23,.9); box-shadow: var(--shadow-sm); }
.room-action-card { display: flex; flex-direction: column; gap: 16px; padding: clamp(22px, 3vw, 34px); }
.create-room-card::after { content: ''; position: absolute; width: 230px; height: 230px; inset-inline-end: -100px; top: -110px; border-radius: 50%; background: rgba(229,9,20,.13); filter: blur(38px); pointer-events: none; }
.action-card-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(229,9,20,.34); border-radius: 14px; background: var(--brand-soft); color: #ff3140; font-size: 25px; }
.action-card-icon.join { border-color: rgba(245,183,60,.3); background: rgba(245,183,60,.08); color: var(--gold); }
.action-card-head > span { color: #ff5661; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.action-card-head h2 { margin-top: 5px; font-size: clamp(1.35rem, 2.4vw, 2rem); }
.action-card-head p { max-width: 520px; margin-top: 6px; color: var(--text-faint); font-size: 12px; line-height: 1.65; }
.room-input { position: relative; display: flex; flex-direction: column; gap: 7px; color: var(--text-dim); font-size: 11.5px; font-weight: 700; }
.room-input input { height: 52px; padding-inline: 15px 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: #090a0f; color: var(--text); outline: none; font-size: 14px; }
.room-input input:focus { border-color: #e50914; box-shadow: 0 0 0 4px rgba(229,9,20,.1); }
.room-input > i { position: absolute; inset-inline-end: 15px; bottom: 15px; color: #ff3c4a; font-style: normal; }
.code-input input { direction: ltr; text-align: center; font: 800 20px/1 ui-monospace, Consolas, monospace; letter-spacing: .28em; text-transform: uppercase; }
.member-workspace .privacy-pick { gap: 9px; }
.member-workspace .privacy-option { display: grid; grid-template-columns: 34px minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 12px; }
.member-workspace .privacy-option > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--text-faint); font-style: normal; }
.member-workspace .privacy-option > span { display: flex; flex-direction: column; gap: 2px; }
.member-workspace .privacy-option > b { display: none; color: #ff4350; }
.member-workspace .privacy-option.active > b { display: block; }
.member-workspace .privacy-option.active > i { background: rgba(229,9,20,.15); color: #ff4350; }
.room-secondary-action { background: rgba(255,255,255,.065); border: 1px solid var(--line-strong); box-shadow: none; }
.room-secondary-action:hover { background: rgba(255,255,255,.1); border-color: rgba(229,9,20,.45); transform: translateY(-2px); }
.member-profile-card { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 16px 18px; }
.member-profile-avatar { width: 54px; height: 54px; display: grid; place-items: center; object-fit: cover; border-radius: 16px; background: var(--accent-grad); color: #fff; font-size: 15px; font-weight: 900; }
.member-profile-card > div { min-width: 0; }
.member-profile-card > div > span { color: var(--text-faint); font-size: 9.5px; }
.member-profile-card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.member-profile-card p { direction: ltr; color: var(--text-faint); font-size: 10px; text-align: end; }
.member-status { display: flex; align-items: center; gap: 6px; color: #65d58f; font-size: 10px; white-space: nowrap; }
.member-status b { width: 7px; height: 7px; border-radius: 50%; background: #35c46b; box-shadow: 0 0 10px #35c46b; }
.logout-button { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 10.5px; text-align: start; }
.logout-button:hover { color: #ff6873; }

.rooms-discovery { padding-top: 2px; }
.rooms-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.rooms-section-head h2 { margin-top: 3px; font-size: clamp(1.45rem, 2.5vw, 2rem); }
.rooms-section-head p { margin-top: 5px; color: var(--text-faint); font-size: 11.5px; }
.refresh-rooms { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-dim); font-size: 11px; font-weight: 700; }
.refresh-rooms:hover { border-color: rgba(229,9,20,.46); color: #fff; }
.refresh-rooms span { color: #ff4a57; font-size: 16px; }
.rooms-loading, .rooms-empty { grid-column: 1 / -1; min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px dashed var(--line-strong); border-radius: 20px; background: rgba(255,255,255,.018); }
.rooms-loading span { width: 8px; height: 8px; border-radius: 50%; background: #e50914; animation: loadingDots 1.1s infinite alternate; }
.rooms-loading span:nth-child(2) { animation-delay: .18s; }.rooms-loading span:nth-child(3) { animation-delay: .36s; }
@keyframes loadingDots { to { opacity: .2; transform: translateY(-7px); } }
.rooms-empty { flex-direction: column; text-align: center; }
.rooms-empty > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); color: #ff4b58; font-size: 22px; }
.rooms-empty h3 { font-size: 14px; }.rooms-empty p { color: var(--text-faint); font-size: 11px; }
.public-rooms { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.room-card { border-radius: 20px; cursor: default; }
.room-card:hover { transform: translateY(-5px); border-color: rgba(229,9,20,.52); box-shadow: 0 22px 55px rgba(0,0,0,.34); }
.room-card-art::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(8,9,13,.9)); }
.room-card-kicker { color: #ff5661; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.room-card-body { gap: 5px; padding: 17px 17px 7px; }
.room-card-body h3 { font-size: 16px; }
.room-card-body small { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.room-card-body small i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-style: normal; font-size: 8px; }
.room-join { margin: 13px 16px 16px; min-height: 43px; display: flex; align-items: center; justify-content: space-between; padding-inline: 15px; border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(255,255,255,.04); color: var(--text-dim); font-size: 11.5px; font-weight: 800; transition: all var(--fast); }
.room-join:hover { border-color: #e50914; background: #e50914; color: #fff; }
.room-join b { font-size: 17px; }

/* Friendlier in-room command bar */
.room-title-group .section-kicker { display: flex; align-items: center; gap: 8px; }
.room-title-group > small { display: block; margin-top: 2px; color: var(--text-faint); font-size: 10px; }
.room-command { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255,255,255,.045); color: var(--text-dim); transition: all var(--fast) var(--spring); }
.room-command:hover { border-color: rgba(229,9,20,.5); background: rgba(229,9,20,.1); color: #fff; transform: translateY(-2px); }
.command-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: #ff5661; font-size: 15px; }
.invite-command > span:nth-child(2) { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.invite-command small { color: var(--text-faint); font-size: 8.5px; }
.invite-command b { direction: ltr; color: var(--gold); font: 800 12px/1.25 ui-monospace, monospace; letter-spacing: .11em; }
.invite-command > i { color: var(--text-faint); font-style: normal; }
.icon-command { font-size: 11px; font-weight: 700; }
.leave-command:hover { border-color: rgba(245,183,60,.46); background: rgba(245,183,60,.09); }
.close-command { color: #ff6d78; }.close-command:hover { border-color: #e50914; background: #e50914; color: #fff; }
.leader-bar { border-color: rgba(229,9,20,.26); background: rgba(229,9,20,.065); }
.leader-tag { display: flex; align-items: center; gap: 9px; }
.leader-tag > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(245,183,60,.13); color: var(--gold); font-style: normal; }
.leader-tag > span { display: flex; flex-direction: column; }.leader-tag strong { color: var(--text); font-size: 11.5px; }.leader-tag small { color: var(--text-faint); font-size: 8.5px; font-weight: 500; }
.leader-action { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding-inline: 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255,255,255,.04); color: var(--text-dim); font-size: 10.5px; font-weight: 700; }
.leader-action:hover { background: rgba(255,255,255,.08); color: #fff; }.leader-action i { color: var(--gold); font-style: normal; }
.leader-action.primary { border-color: #e50914; background: #e50914; color: #fff; }.leader-action.primary i { color: #fff; }

.auth-tab:focus-visible, .auth-submit:focus-visible, .room-primary-action:focus-visible, .room-secondary-action:focus-visible,
.privacy-option:focus-visible, .room-command:focus-visible, .leader-action:focus-visible, .room-join:focus-visible,
.account-chip:focus-visible, .account-login:focus-visible { outline: 3px solid rgba(255,68,81,.38); outline-offset: 3px; }

@media (max-width: 1040px) {
  .lobby-hero { grid-template-columns: 1fr; }
  .lobby-hero-copy { text-align: center; }.lobby-hero-copy > p { margin-inline: auto; }.hero-feature-row { justify-content: center; }
  .lobby-visual { width: min(560px, 100%); margin-inline: auto; }
  .member-access { grid-template-columns: 1fr; }.auth-story { text-align: center; }.auth-story h2, .auth-story > p { margin-inline: auto; }
  .auth-benefits { grid-template-columns: repeat(3, 1fr); }.auth-benefits > div { grid-template-columns: 1fr; text-align: center; }.auth-benefits i { margin-inline: auto; }
  .privacy-note { justify-content: center; }
}

@media (max-width: 820px) {
  .member-workspace { grid-template-columns: 1fr; }
  .workspace-stack { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .member-profile-card { grid-template-columns: 48px minmax(0,1fr); }
  .member-status { grid-column: 1 / -1; }.member-profile-card .logout-button { grid-column: 1 / -1; }
  .room-topbar { align-items: flex-start; }.room-topbar-actions { width: 100%; }
}

@media (max-width: 620px) {
  .rooms-header-actions { min-width: 44px; }.account-chip { width: 42px; height: 42px; padding: 4px; justify-content: center; }.account-chip > span:not(.account-avatar) { display: none; }
  .account-login { width: 42px; padding: 0; justify-content: center; font-size: 0; }.account-login span { font-size: 18px; }
  .rooms-lobby { padding-top: 10px; }
  .lobby-hero { min-height: 0; padding: 30px 18px; border-radius: 22px; }
  .lobby-hero-copy h1 { font-size: clamp(2.2rem, 13vw, 3.35rem); }
  .lobby-visual { min-height: 230px; }.watch-screen { inset: 20px 5% 25px; }.floating-member { width: 39px; height: 39px; font-size: 9px; }.sync-pill { left: 13%; }
  .hero-feature-row { display: grid; grid-template-columns: 1fr; }
  .member-access { padding: 14px; border-radius: 20px; }.auth-story { padding: 18px 7px; }.auth-benefits { grid-template-columns: 1fr; }.auth-benefits > div { grid-template-columns: 42px 1fr; text-align: start; }.auth-benefits i { margin: 0; }
  .auth-card { padding: 16px; }.auth-field-row { grid-template-columns: 1fr; }
  .workspace-stack { grid-template-columns: 1fr; }.room-action-card { padding: 20px 16px; }
  .member-workspace .privacy-pick { grid-template-columns: 1fr; }
  .rooms-section-head { align-items: flex-start; }.rooms-section-head p { max-width: 26ch; }
  .refresh-rooms { width: 40px; padding: 0; justify-content: center; font-size: 0; }.refresh-rooms span { font-size: 17px; }
  .public-rooms { grid-template-columns: 1fr; }
  .room-topbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .invite-command { grid-column: 1 / -1; }.room-command { justify-content: center; }
  .leader-bar { display: grid; grid-template-columns: 1fr 1fr; }.leader-tag { grid-column: 1 / -1; }.leader-action.primary { grid-column: 1 / -1; }
}

/* Room choices remain readable above the player on narrow Safari/Android viewports. */
.room-command[hidden], .room-vote-panel[hidden], .room-skip[hidden], #emptyPick[hidden] { display: none !important; }
.room-skip { color: #ffcf93; border-color: rgba(255,190,91,.27); }
.room-skip.voted { background: rgba(255,181,69,.2); color: #fff; }
.room-skip #skipLabel { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.room-vote-setting { display: grid; gap: 5px; color: #e8e8ef; font-size: 12px; }
.room-vote-setting select { width: 100%; }
.room-vote-panel { flex-shrink: 0; margin: 10px 0; padding: 12px; border: 1px solid rgba(241,92,110,.5); border-radius: 16px; background: #17151e; }
.room-vote-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.room-vote-head span { color: #ffcf93; font-variant-numeric: tabular-nums; }
.room-vote-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(175px,1fr)); gap: 8px; }
.room-vote-option { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 58px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 11px; background: rgba(255,255,255,.07); color: #fff; text-align: start; cursor: pointer; }
.room-vote-option:hover { border-color: #f26479; background: rgba(229,41,69,.14); }
.room-vote-option.selected { border-color: #f26479; background: rgba(229,41,69,.2); }
.room-vote-option img { width: 33px; height: 42px; flex: none; object-fit: cover; border-radius: 5px; }
.room-vote-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.room-vote-count { flex: none; color: #ffc87c; font-size: 11px; font-variant-numeric: tabular-nums; }
.room-vote-action { flex: none; padding: 5px 8px; border-radius: 8px; background: #e50914; color: #fff; font-size: 11px; font-weight: 800; }
.room-vote-option.selected .room-vote-action { background: rgba(255,255,255,.16); }
.room-vote-option:disabled { cursor: default; opacity: .8; }
.room-vote-option:disabled .room-vote-action { display: none; }
.room-media-error { position: absolute; z-index: 12; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; background: rgba(9,10,15,.91); text-align: center; }
.room-media-error strong { font-size: clamp(16px,3vw,22px); }
.room-media-error p { max-width: 380px; color: #c8c5d0; font-size: 13px; }
@media (max-width: 620px) {
  .room-skip { min-width: 38px; min-height: 38px; padding-inline: 5px; font-size: 18px; }
  .room-skip #skipLabel { display: inline; font-size: 10px; }
  .room-vote-panel { margin: 7px 0; padding: 10px; }
  .room-vote-options { grid-template-columns: 1fr; max-height: 180px; overflow-y: auto; }
  .room-vote-option { min-height: 50px; }
}

/* ============================================================
   Simplified room controls
   Room administration hides behind one menu; the stage keeps a
   single obvious primary action.
   ============================================================ */
.room-menu-wrap { position: relative; }

.room-menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 30;
  min-width: 212px;
  padding: 7px;
  display: flex; flex-direction: column; gap: 2px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(18, 18, 26, 0.98);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-lg);
  animation: popIn var(--fast) var(--ease-out) both;
}
.room-menu[hidden] { display: none; }

.room-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  color: var(--text-dim);
  text-align: start;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.room-menu button i { font-style: normal; width: 18px; text-align: center; opacity: 0.75; }
.room-menu button:hover { background: var(--surface-2); color: var(--text); }
.room-menu button.danger:hover { background: var(--brand); color: #fff; }

/* One primary action, kept directly under the video it changes. */
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stage-bar[hidden] { display: none; }

.stage-action {
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding-inline: 26px;
  border-radius: var(--radius-pill);
  background: var(--brand); color: #fff;
  font-size: 14.5px; font-weight: 700;
  box-shadow: var(--shadow-brand);
  transition: transform var(--fast) var(--spring), background var(--fast) var(--ease);
}
.stage-action i { font-style: normal; }
.stage-action:hover { background: var(--brand-hot); transform: translateY(-2px); }

.stage-mic { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }

#videoEmpty .primary-btn { margin-top: 6px; }

/* ---------- room fullscreen ---------- */
.stage-fullscreen {
  position: absolute;
  inset-block-start: 10px; inset-inline-start: 10px;
  z-index: 7; /* above the follower shield, lock badge and error panel */
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 8, 12, 0.66);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  transition: opacity 0.32s var(--ease), transform var(--fast) var(--spring), background var(--fast) var(--ease);
}
.stage-fullscreen:hover { background: var(--brand); border-color: var(--brand); }
.stage-fullscreen:active { transform: scale(0.92); }
.stage-fullscreen svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage-fullscreen .fs-exit, .stage-fullscreen.active .fs-enter { display: none; }
.stage-fullscreen.active .fs-exit { display: block; }

/* Nothing to enlarge until something is playing. */
.room-video:has(#videoEmpty:not([hidden])) .stage-fullscreen { display: none; }

/* Steps aside with the rest of the chrome when the room goes idle. */
.rooms-page.chrome-hidden .stage-fullscreen { opacity: 0; pointer-events: none; }

.room-video.is-fullscreen { border: 0; box-shadow: none; }
.room-video.is-fullscreen video { object-fit: contain; }
.room-video.is-fullscreen .stage-fullscreen {
  inset-block-start: max(14px, env(safe-area-inset-top));
  inset-inline-start: max(14px, env(safe-area-inset-right));
}

/* ---------- intro + "start for everyone" ----------
   Layering on the stage: shield 3 · lock 4 · start 4 (later in the markup)
   · error 5 · intro 6 · fullscreen and CC 7. */
#roomStage .intro-layer { z-index: 6; }
.room-video.intro-on .stage-cc-wrap,
.room-video.intro-on .follow-lock { visibility: hidden; }

.stage-start {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-items: center;
  padding: 20px; text-align: center;
  overflow: hidden;
  background: #06060a;
  animation: stageStartIn 0.45s var(--ease-out) both;
}
.stage-start-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(14px) brightness(0.42) saturate(1.15);
  transform: scale(1.12); /* pushes the blur's soft edges out of frame */
}
.stage-start::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}
.stage-start-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stage-start-body b { margin-top: 10px; font-size: clamp(1rem, 2.2vw, 1.3rem); font-weight: 700; }
.stage-start-body small { font-size: 12.5px; color: var(--text-dim); }
.stage-start-btn {
  width: 86px; height: 86px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  animation: startPulse 2.4s ease-in-out infinite;
  transition: transform var(--fast) var(--spring), background var(--fast) var(--ease);
}
.stage-start-btn:hover { background: var(--brand-hot); transform: scale(1.06); }
.stage-start-btn:active { transform: scale(0.94); }
/* Physical margin: the play triangle points right in every language. */
.stage-start-btn svg { width: 36px; height: 36px; fill: currentColor; margin-left: 5px; }
.stage-start-wait {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  animation: spin 1.1s linear infinite;
}
@keyframes startPulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(216, 28, 63, 0.2), 0 20px 48px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 20px rgba(216, 28, 63, 0.05), 0 20px 48px rgba(0, 0, 0, 0.55); }
}
@keyframes stageStartIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) {
  .stage-start-btn { width: 66px; height: 66px; }
  .stage-start-btn svg { width: 28px; height: 28px; }
  .stage-start-body small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-start, .stage-start-btn { animation: none; }
}

/* A refused embed explains itself and offers a way forward. */
.yt-error {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px;
  padding: 24px; text-align: center;
  background: var(--surface);
}
.yt-error b { font-size: 34px; color: var(--gold); font-weight: 400; }
.yt-error strong { font-size: 15px; font-weight: 700; max-width: 40ch; }
.yt-error p { font-size: 13px; color: var(--text-faint); }
.yt-error-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 4px; }
.yt-error-actions .primary-btn, .yt-error-actions .secondary-btn { height: 42px; padding-inline: 20px; font-size: 13.5px; }

@media (max-width: 760px) {
  .stage-action { width: 100%; justify-content: center; }
  .stage-mic { width: 100%; margin-inline-start: 0; }
  .stage-mic .leader-action { flex: 1; justify-content: center; }
}

/* ============================================================
   Who is talking — a ring that ripples while someone speaks
   ============================================================ */
[data-speaker] { position: relative; }
[data-speaker]::before, [data-speaker]::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
/* Inner ring: grows with how loud they are right now. */
[data-speaker].speaking::before {
  opacity: 1;
  border: 2.5px solid #3ddc84;
  box-shadow: 0 0 calc(6px + var(--level, 0) * 18px) rgba(61, 220, 132, 0.55);
  transform: scale(calc(1 + var(--level, 0) * 0.16));
  transition: transform 0.07s linear, box-shadow 0.07s linear;
}
/* Outer ring: the wave travelling outward. */
[data-speaker].speaking::after {
  border: 2px solid rgba(61, 220, 132, 0.7);
  animation: voiceWave 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes voiceWave {
  0% { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}

.speakers {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(61, 220, 132, 0.22);
  background: linear-gradient(100deg, rgba(47, 160, 92, 0.12), rgba(16, 16, 23, 0.6) 55%);
  overflow-x: auto;
  scrollbar-width: none;
  animation: popIn var(--mid) var(--ease-out) both;
}
.speakers[hidden] { display: none; }
.speakers::-webkit-scrollbar { display: none; }
.speakers-label {
  display: inline-flex; align-items: center; gap: 7px;
  flex: none;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  color: #6ee7a8;
}
.speakers-label i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; animation: pulse 1.6s var(--ease) infinite; }

.speaker {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: none; width: 66px;
  transition: transform var(--fast) var(--spring);
}
.speaker:hover { transform: translateY(-2px); }
.speaker-face { width: 52px; height: 52px; border-radius: 50%; font-size: 16px; }
.speaker small { max-width: 100%; font-size: 11px; font-weight: 600; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crown {
  position: absolute; z-index: 2;
  inset-block-start: -7px; inset-inline-end: -5px;
  font-style: normal; font-size: 14px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

/* ============================================================
   Subtitles button on the stage (per viewer)
   ============================================================ */
.stage-cc-wrap { position: absolute; z-index: 7; inset-block-start: 10px; inset-inline-start: 60px; }
.stage-cc-wrap[hidden] { display: none; }
.stage-cc {
  height: 42px; padding-inline: 12px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 8, 12, 0.66);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--spring), opacity 0.32s var(--ease);
}
.stage-cc b { padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.85); color: #111; font-size: 11px; font-weight: 900; letter-spacing: 0.06em; }
.stage-cc.active b { background: var(--gold); color: #1a1205; }
.stage-cc:hover { background: rgba(30, 30, 40, 0.85); }
.stage-cc:active { transform: scale(0.92); }
.rooms-page.chrome-hidden .stage-cc { opacity: 0; pointer-events: none; }
.room-video.is-fullscreen .stage-cc-wrap { inset-block-start: max(14px, env(safe-area-inset-top)); inset-inline-start: calc(max(14px, env(safe-area-inset-right)) + 52px); }

.stage-cc-menu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0;
  min-width: 200px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(16, 16, 23, 0.97);
  box-shadow: var(--shadow-lg);
  animation: menuIn 0.2s var(--ease-out) both;
}
.stage-cc-menu[hidden] { display: none; }
.cc-note { padding: 6px 10px 4px; font-size: 11px; color: var(--text-faint); }
.stage-cc-menu button { padding: 9px 12px; border-radius: var(--radius-sm); text-align: start; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.stage-cc-menu button:hover { background: var(--surface-2); color: var(--text); }
.stage-cc-menu button.active { background: var(--brand); color: #fff; }

/* Subtitle text inside the room's player. */
#roomVideo::cue { background: rgba(0, 0, 0, 0.72); color: #fff; font-family: var(--font); font-size: 1.05em; line-height: 1.45; }

/* Subtitles drawn by the page (captions.js): over the lock badge and the
   start panel, under the intro, fullscreen and CC buttons. */
#roomStage .kf-captions { z-index: 5; }
/* A title that has not begun shows its start panel, not stray subtitles. */
.room-video:has(> .stage-start:not([hidden])) .kf-captions { visibility: hidden; }

/* ============================================================
   Chat: real faces, tappable names, system lines
   ============================================================ */
.chat-row .chat-avatar { padding: 0; overflow: visible; cursor: pointer; background: none; font-size: 10px; }
.chat-row .chat-avatar .avatar-img { width: 26px; height: 26px; }
.chat-name { padding: 0; font: inherit; font-weight: 700; color: var(--gold); margin-inline-end: 6px; cursor: pointer; }
.chat-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.chat-row.mine .chat-name { color: var(--brand-hot); }

.chat-system { display: flex; justify-content: center; padding: 2px 0; animation: popIn var(--fast) var(--ease-out) both; }
.chat-system span {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 92%;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
  color: var(--text-dim);
}
.chat-system i { font-style: normal; font-size: 11px; }
.chat-system time { font-size: 10px; color: var(--text-faint); font-weight: 500; }
.chat-system-join span { border-color: rgba(61, 220, 132, 0.28); color: #8ff0b8; background: rgba(47, 160, 92, 0.08); }
.chat-system-leave span { color: var(--text-faint); }
.chat-system-kick span { border-color: rgba(216, 28, 63, 0.35); color: #ff9aac; }
.chat-system-crown span { border-color: rgba(245, 183, 60, 0.35); color: var(--gold); background: rgba(245, 183, 60, 0.07); }

/* ============================================================
   Members: faces, roles, tap for the card
   ============================================================ */
.member-row {
  width: 100%;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 9px 11px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-align: start;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.member-row:hover { background: var(--surface); border-color: var(--line); transform: translateX(-2px); }
.member-row.host { background: linear-gradient(100deg, rgba(245, 183, 60, 0.08), transparent 70%); }
.member-row .member-avatar { width: 44px; height: 44px; background: none; overflow: visible; font-size: 14px; }
.member-row .member-meta strong em { font-style: normal; font-weight: 500; color: var(--text-faint); font-size: 12px; }
.member-row .member-meta small { direction: ltr; text-align: end; }
.member-row .mic-state { font-size: 15px; }

/* ---------- the member card ---------- */
.member-card-layer {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(3, 3, 6, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn var(--fast) var(--ease) both;
}
.member-card {
  position: relative;
  width: min(360px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 22px 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(216, 28, 63, 0.22), transparent 60%),
    var(--raise);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: popIn var(--mid) var(--ease-out) both;
}
.mc-close { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 18px; color: var(--text-dim); }
.mc-close:hover { background: var(--brand); color: #fff; }
.mc-avatar { width: 96px; height: 96px; border-radius: 50%; font-size: 30px; margin-bottom: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.member-card h3 { font-size: 1.25rem; font-weight: 800; }
.member-card h3 em { font-style: normal; font-weight: 500; font-size: 0.8em; color: var(--text-faint); }
.mc-handle { font-size: 13px; color: var(--text-faint); direction: ltr; }
.mc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 8px; }
.chip { padding: 5px 11px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--text-dim); }
.chip.gold { background: rgba(245, 183, 60, 0.12); border-color: rgba(245, 183, 60, 0.4); color: var(--gold); }
.chip.green { background: rgba(47, 160, 92, 0.14); border-color: rgba(61, 220, 132, 0.4); color: #8ff0b8; }
.chip.red { background: var(--brand-soft); border-color: rgba(216, 28, 63, 0.45); color: #ff9aac; }
.mc-profile { width: 100%; justify-content: center; }
.mc-note { font-size: 11px; color: var(--text-faint); }
.mc-tools { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.mc-tools button { height: 42px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--text-dim); transition: all var(--fast) var(--ease); }
.mc-tools button:hover { background: var(--surface-2); color: var(--text); }
.mc-tools .danger:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 560px) {
  /* A bottom sheet on phones: easier to reach with a thumb. */
  .member-card-layer { place-items: end center; padding: 0; }
  .member-card { width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .speaker { width: 58px; }
  .speaker-face { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-speaker].speaking::after { animation: none; }
}

/* ============================================================
   Watch party 2.0: one clear lobby decision, then an immersive room.
   ============================================================ */
.hero-room-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; max-width: 670px; margin-top: 29px; }
.hero-room-choice { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 68px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.19); border-radius: 16px; background: rgba(255,255,255,.055); text-align: start; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.hero-room-choice.primary { background: linear-gradient(125deg, #a70712, #e50914); border-color: rgba(255,75,88,.7); box-shadow: 0 14px 32px rgba(229,9,20,.2); }
.hero-room-choice:hover, .hero-room-choice.active { transform: translateY(-3px); border-color: #ff4652; background: rgba(229,9,20,.18); }
.hero-room-choice.primary:hover, .hero-room-choice.primary.active { background: linear-gradient(125deg, #b70814, #f42530); }
.hero-room-choice:focus-visible { outline: 3px solid rgba(255,75,88,.5); outline-offset: 3px; }
.hero-room-choice .choice-mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.13); font-size: 23px; }
.hero-room-choice > span:nth-child(2) { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.hero-room-choice strong { font-size: 14px; line-height: 1.35; }
.hero-room-choice small { color: rgba(255,255,255,.68); font-size: 10.5px; line-height: 1.35; }
.hero-room-choice > b { font-size: 19px; font-weight: 400; opacity: .7; }
.hero-room-panel { grid-column: 1 / -1; width: 100%; padding: clamp(18px, 3vw, 30px); margin-top: 5px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: linear-gradient(140deg, rgba(20,22,30,.94), rgba(9,10,15,.97)); box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: popIn .28s ease-out both; }
.hero-room-panel[hidden], .hero-room-panel .room-action-card[hidden] { display: none; }
.hero-room-panel .member-workspace { display: block; margin: 0; }
.hero-room-panel .workspace-stack { display: contents; }
.hero-room-panel .room-action-card { width: min(690px, 100%); margin-inline: auto; background: rgba(11,12,18,.74); }
.hero-room-panel .member-profile-card { width: min(690px, 100%); margin: 13px auto 0; box-shadow: none; }
.hero-room-panel .member-access { margin: 0; box-shadow: none; background: transparent; border: 0; padding: 0; }
.lobby-hero:has(.hero-room-panel:not([hidden])) { min-height: 0; }

/* The stage is the screen; chat is the social room, not a narrow afterthought. */
.room-shell { background: #07080d; }
.room-stage { background: radial-gradient(75% 55% at 50% 24%, rgba(133,11,23,.11), transparent), #08090e; }
.room-topbar { padding: 4px 2px 8px; border-bottom: 1px solid rgba(255,255,255,.075); }
.room-title-group { min-width: 0; }
.room-title-group h1 { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-subline { display: flex !important; align-items: center; gap: 6px; min-width: 0; }
.room-subline #roomNowTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-subline i { font-style: normal; }
.room-subline #roomAudience { flex: none; }
.pick-command { border-color: rgba(229,9,20,.34); color: #fff; background: rgba(229,9,20,.11); }
.pick-command .command-icon { background: #e50914; color: #fff; font-size: 10px; }
.room-video { border-color: rgba(255,255,255,.1); box-shadow: 0 22px 80px rgba(0,0,0,.48); }
.room-video.is-fullscreen, .room-video:fullscreen { height: 100dvh !important; max-height: none !important; aspect-ratio: auto; }
.room-side { position: relative; isolation: isolate; overflow: hidden; background: #0e0d14; }
.chat-atmosphere { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.chat-atmosphere img { width: 100%; height: 100%; object-fit: cover; filter: blur(48px) saturate(.85); transform: scale(1.3); opacity: .23; }
.chat-atmosphere img[hidden] { display: none; }
.room-side .side-tabs { background: rgba(9,9,14,.74); backdrop-filter: blur(16px); }
.room-side .side-tab { min-height: 48px; font-size: 13px; font-weight: 800; }
.room-side .side-tab.active { color: #fff; border-bottom-color: #ff2636; }
.chat-log { min-height: 0; padding: 19px 16px 26px; gap: 13px; overscroll-behavior: contain; }
.chat-row { display: flex; align-items: flex-start; direction: ltr; width: fit-content; max-width: min(94%, 540px); gap: 9px; }
.chat-row:not(.mine) { margin-right: auto; }
.chat-row.mine { margin-left: auto; }
.chat-row.mine .chat-avatar { order: 2; box-shadow: 0 0 0 2px rgba(229,9,20,.65); }
.chat-row:not(.mine) .chat-avatar { box-shadow: 0 0 0 2px rgba(169,219,255,.48); }
.chat-row .chat-avatar, .chat-row .chat-avatar .avatar-img { width: 32px; height: 32px; flex: none; }
.chat-line { display: flex; flex: 0 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; direction: rtl; gap: 2px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px 15px 15px 5px; background: rgba(27,28,38,.92); box-shadow: 0 7px 20px rgba(0,0,0,.14); font-size: 13.5px; line-height: 1.6; }
.chat-row.mine .chat-line { order: 1; border-radius: 15px 15px 5px 15px; border-color: rgba(229,9,20,.38); background: rgba(67,19,31,.94); }
.chat-name { display: block; margin: 0; font-size: 11px; color: #a9dbff; }
.chat-row.mine .chat-name { color: #ffe08b; }
.chat-line > span { display: block; white-space: pre-wrap; }
.chat-media { width: min(100%, 300px); max-height: 310px; margin-top: 5px; }
.chat-system { padding-block: 4px; }
.chat-composer { gap: 7px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(13,13,19,.94); backdrop-filter: blur(18px); border-top-color: rgba(255,255,255,.12); }
.chat-composer #chatInput { height: 44px; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.12); }
.chat-composer #chatInput::placeholder { color: rgba(255,255,255,.44); }

@media (max-width: 1059px) {
  .rooms-page.in-room { padding-top: 0; height: var(--room-visual-height, 100dvh); min-height: 0; overflow: hidden; }
  .rooms-page.in-room .site-header { display: none; }
  /* Safari pans its visual viewport when the keyboard opens. Keep the room in
     that viewport instead of letting the document scroll the composer away. */
  .rooms-page.in-room #roomsApp {
    position: fixed;
    top: var(--room-visual-top, 0px);
    left: var(--room-visual-left, 0px);
    width: var(--room-visual-width, 100vw);
    height: var(--room-visual-height, 100dvh);
    overflow: hidden;
  }
  .rooms-page.in-room .room-shell, .rooms-page.in-room.chrome-hidden .room-shell { height: 100%; grid-template-rows: auto minmax(0, 1fr); transition: none; }
  .room-stage { gap: 7px; max-height: var(--room-stage-max-height, 52dvh); padding: 8px 10px; overflow-y: auto; scrollbar-width: thin; }
  .room-video { flex: 0 0 auto; height: min(var(--room-video-max-height, 36dvh), 56.25vw); aspect-ratio: auto; border-radius: 13px; }
  .room-side { border-top-color: rgba(255,255,255,.12); }
  .room-menu { position: fixed; top: 55px; inset-inline-end: 10px; }
  /* A 16px input stops iOS Safari from zooming/panning on focus. */
  .chat-composer #chatInput { font-size: 16px; }
  .room-keyboard-open .room-stage { max-height: 110px; padding: 4px 8px; overflow: hidden; }
  .room-keyboard-open .room-topbar, .room-keyboard-open .speakers, .room-keyboard-open .room-vote-panel, .room-keyboard-open .picker { display: none; }
  .room-keyboard-open .room-video { height: 100px; }
  .room-keyboard-open .room-side { padding-top: max(6px, env(safe-area-inset-top)); }
  .room-keyboard-open .chat-composer { padding-bottom: 10px; }
  .room-keyboard-compact .room-stage { display: none; }
  .rooms-page.in-room.room-keyboard-compact .room-shell { grid-template-rows: minmax(0, 1fr); }
  .chat-log { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 620px) {
  .lobby-hero { grid-template-columns: minmax(0, 1fr); }
  .lobby-hero-copy { min-width: 0; overflow-wrap: anywhere; }
  .lobby-hero-copy h1 { max-width: 100%; font-size: clamp(2rem, 10vw, 3rem); line-height: 1.15; }
  .lobby-hero-copy > p { max-width: 100%; }
  .hero-room-choices { grid-template-columns: 1fr; }
  .hero-room-choice { width: 100%; min-height: 61px; }
  .lobby-hero:has(.hero-room-panel:not([hidden])) .lobby-visual { display: none; }
  .hero-room-panel { padding: 12px; }
  .hero-room-panel .member-access { padding: 0; }
  .hero-room-panel .member-profile-card { grid-template-columns: 48px minmax(0,1fr); }
  .room-topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; }
  .room-topbar .section-kicker { font-size: 8px; }
  .room-title-group h1 { max-width: none; font-size: 14px; }
  .room-subline { font-size: 9px !important; }
  .room-subline #roomNowTitle { max-width: 17ch; }
  .room-topbar-actions { display: flex; width: auto; gap: 5px; }
  .room-command { min-height: 38px; padding: 4px 7px; border-radius: 10px; }
  .invite-command { grid-column: auto; }
  .invite-command .command-icon, .invite-command > i, .invite-command small { display: none; }
  .invite-command b { font-size: 10px; letter-spacing: .04em; }
  .pick-command > span:last-child, .icon-command > span:last-child { display: none; }
  .pick-command .command-icon, .icon-command .command-icon { width: 26px; height: 26px; }
  .chat-log { padding: 16px 12px 22px; }
  .chat-composer { padding-inline: 8px; }
  .chat-composer .icon-round { width: 40px; height: 40px; }
  .chat-composer #chatInput { height: 42px; padding-inline: 12px; }
}

@media (max-width: 1059px) and (orientation: landscape) and (max-height: 620px) {
  .rooms-page.in-room .room-shell, .rooms-page.in-room.chrome-hidden .room-shell { grid-template-columns: minmax(0,1fr) minmax(270px,38vw); grid-template-rows: minmax(0,1fr); }
  .room-stage { max-height: none; min-height: 0; overflow-y: auto; }
  .room-video { height: min(68dvh, 56.25vw); }
  .room-side { border-top: 0; border-inline-start: 1px solid var(--line); }
  .rooms-page.in-room.room-keyboard-open .room-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .room-keyboard-open .room-stage { max-height: 110px; }
  .room-keyboard-open .room-video { height: 100px; }
  .rooms-page.in-room.room-keyboard-compact .room-shell { grid-template-rows: minmax(0, 1fr); }
  .room-keyboard-open .room-side { border-top: 1px solid var(--line); border-inline-start: 0; }
}

@media (max-width: 620px) and (max-height: 650px) {
  .room-stage { max-height: var(--room-stage-short-height, 44dvh); }
  .room-video { height: min(var(--room-video-short-height, 29dvh), 56.25vw); }
  .room-title-group .section-kicker, .room-subline { display: none !important; }
}

/* Room conversations: reliable portrait crops, replies, mentions and personal themes. */
.room-avatar-frame {
  display: grid; place-items: center; flex: none; width: 100%; height: 100%;
  min-width: 0; min-height: 0; aspect-ratio: 1; overflow: hidden; border-radius: 50%;
  background: linear-gradient(135deg, #d70d28, #572f83); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.room-avatar-frame .avatar-img,
.room-avatar-frame .room-avatar-image {
  display: block; width: 100%; height: 100%; min-width: 0; min-height: 0;
  max-width: 100%; max-height: 100%; aspect-ratio: 1;
  object-fit: cover; object-position: 50% 50%; border-radius: 50%;
}
.room-avatar-frame .avatar-initials { display: grid; place-items: center; font-weight: 850; font-size: .8em; }
.speaker-face, .member-avatar, .chat-row .chat-avatar, .mc-avatar {
  display: grid; place-items: center; flex: none; padding: 0; overflow: visible;
  border-radius: 50%; aspect-ratio: 1; min-width: 0; min-height: 0;
}
.speaker-face { width: 34px; height: 34px; }
.member-row .member-avatar { width: 46px; height: 46px; }
.chat-row .chat-avatar { width: 32px; height: 32px; }
.mc-avatar { width: 96px; height: 96px; }
.speaker-face .room-avatar-frame, .member-avatar .room-avatar-frame, .chat-avatar .room-avatar-frame, .mc-avatar .room-avatar-frame { width: 100%; height: 100%; }
.speaker-face .crown, .member-avatar .crown { inset-block-start: -5px; inset-inline-end: -7px; }
.speakers { min-height: 54px; gap: 8px; padding: 7px 10px; border-color: rgba(75,230,152,.26); }
.speakers-label { font-size: 11px; white-space: nowrap; margin-inline-end: 4px; }
.speaker {
  display: inline-flex; flex-direction: row; align-items: center; gap: 7px;
  width: auto; max-width: 170px; min-height: 39px; padding: 3px 11px 3px 3px;
  border: 1px solid rgba(100,245,165,.25); border-radius: 999px;
  background: rgba(12,45,33,.65); text-align: start;
}
.speaker small { max-width: 95px; color: #e8fff1; font-size: 11px; }
.member-list { padding: 14px; gap: 9px; }
.member-row { grid-template-columns: 46px minmax(0,1fr) auto; min-height: 68px; background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.065); }
.member-row.host { border-color: rgba(245,183,60,.3); background: linear-gradient(110deg,rgba(245,183,60,.12),rgba(255,255,255,.035)); }
.member-row .member-meta strong { color: #fff; }
.member-row .member-meta small { color: #b6b5c3; }
.mic-state { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.06); color: #9a9ca9; opacity: 1; }
.mic-state.on { background: rgba(52,212,123,.16); color: #74eaa8; }
.mic-state svg { width: 17px; height: 17px; }
.mc-mention { width: 100%; min-height: 42px; margin: 6px 0 2px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 800; }
.mc-mention:hover { background: rgba(255,255,255,.16); }

.room-side { background-color: #101017; background-repeat: no-repeat; background-size: cover; }
.room-side:not([data-chat-theme="cinema"]) .chat-atmosphere { display: none; }
.room-side[data-chat-theme="kitty"] { background-image: radial-gradient(circle at 86% 12%,rgba(255,193,219,.28),transparent 36%),radial-gradient(circle at 12% 78%,rgba(235,133,177,.18),transparent 37%),repeating-linear-gradient(35deg,transparent 0 26px,rgba(255,196,220,.035) 26px 28px),linear-gradient(145deg,#332034,#15111e); }
.room-side[data-chat-theme="spider"] { background-image: repeating-radial-gradient(circle at 74% 28%,transparent 0 26px,rgba(246,77,82,.075) 27px 28px),repeating-conic-gradient(from 8deg at 74% 28%,rgba(248,70,80,.06) 0 1deg,transparent 1deg 30deg),linear-gradient(145deg,#241627,#0b1526 70%,#180e19); }
.room-side[data-chat-theme="knight"] { background-image: radial-gradient(ellipse at 72% 22%,rgba(93,130,164,.26),transparent 38%),repeating-linear-gradient(130deg,transparent 0 43px,rgba(151,179,213,.025) 43px 44px),linear-gradient(160deg,#182431,#090d17 70%); }
.room-side[data-chat-theme="scary"] { background-image: radial-gradient(ellipse at 15% 72%,rgba(173,28,50,.3),transparent 48%),radial-gradient(ellipse at 87% 8%,rgba(179,47,32,.16),transparent 36%),linear-gradient(160deg,#1b1219,#07090d); }
.room-side[data-chat-theme="kurdistan"] { background-image: radial-gradient(circle at 51% 49%,rgba(255,220,88,.19) 0 9%,transparent 26%),linear-gradient(165deg,rgba(217,32,54,.23) 0 27%,rgba(245,245,231,.085) 48%,rgba(29,150,83,.2) 77%),linear-gradient(#16191a,#121617); }
.room-side[data-chat-theme="army"] { background-image: radial-gradient(ellipse at 80% 16%,rgba(153,172,96,.23),transparent 31%),radial-gradient(ellipse at 18% 70%,rgba(87,113,68,.27),transparent 33%),repeating-linear-gradient(145deg,transparent 0 43px,rgba(207,217,165,.035) 43px 59px,transparent 59px 89px),linear-gradient(#1d251b,#101713); }
.room-side[data-chat-theme="nebula"] { background-image: radial-gradient(circle at 23% 28%,rgba(175,111,244,.26),transparent 39%),radial-gradient(circle at 88% 77%,rgba(46,143,231,.22),transparent 39%),radial-gradient(circle at 74% 15%,rgba(236,236,255,.44) 0 1px,transparent 2px),linear-gradient(#151126,#0b0e1b); }
.room-side[data-chat-theme="nightcity"] { background-image: repeating-linear-gradient(90deg,transparent 0 44px,rgba(36,186,208,.06) 44px 46px),linear-gradient(160deg,transparent 47%,rgba(20,179,196,.14) 49%,transparent 52%),radial-gradient(circle at 78% 20%,rgba(240,72,155,.25),transparent 40%),linear-gradient(#101522,#120e1f); }
.room-side .side-tabs { grid-template-columns: 1fr 1fr 54px; grid-auto-flow: unset; grid-auto-columns: unset; background: rgba(7,8,13,.81); }
.theme-trigger { display: grid; place-items: center; border-inline-start: 1px solid rgba(255,255,255,.09); color: #d7b8fa; font-size: 21px; }
.theme-trigger:hover, .theme-trigger[aria-expanded="true"] { background: rgba(170,103,235,.14); color: #fff; }
.theme-picker { position: absolute; z-index: 25; inset: 54px 8px auto; max-height: min(470px,65%); overflow-y: auto; padding: 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 17px; background: #17151e; box-shadow: 0 22px 60px rgba(0,0,0,.65); }
.theme-picker[hidden] { display: none; }
.theme-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.theme-picker-head span { display: flex; flex-direction: column; gap: 2px; }
.theme-picker-head strong { font-size: 14px; }
.theme-picker-head small { font-size: 11px; color: #aaa5b6; }
.theme-picker-head button { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 18px; }
.theme-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.theme-option { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 54px; padding: 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.04); text-align: start; }
.theme-option:hover, .theme-option.active { border-color: #ef6376; background: rgba(233,38,62,.1); }
.theme-option > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.theme-option strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-option small { font-size: 9px; color: #a9a7b2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-option i { font-size: 10px; font-style: normal; opacity: 0; color: #ff7185; }
.theme-option.active i { opacity: 1; }
.theme-swatch { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: #fff; font-size: 23px; background: #20212c; }
.theme-swatch[data-theme="cinema"] { background: linear-gradient(140deg,#2d2935,#8e2838); }
.theme-swatch[data-theme="kitty"] { background: linear-gradient(140deg,#ffc3de,#a7558f); }
.theme-swatch[data-theme="spider"] { background: linear-gradient(140deg,#bf1826,#192e56); }
.theme-swatch[data-theme="knight"] { background: linear-gradient(140deg,#101522,#66819d); }
.theme-swatch[data-theme="scary"] { background: linear-gradient(140deg,#090809,#94202e); }
.theme-swatch[data-theme="kurdistan"] { background: linear-gradient(#d52d42 0 33%,#eeeccf 33% 66%,#268751 66%); color: #e9af31; }
.theme-swatch[data-theme="army"] { background: linear-gradient(140deg,#47563b,#a0a783); }
.theme-swatch[data-theme="nebula"] { background: linear-gradient(140deg,#5e2d95,#252e7e); }
.theme-swatch[data-theme="nightcity"] { background: linear-gradient(140deg,#a72484,#075b74); }

.chat-line { gap: 5px; max-width: 100%; }
.chat-line-head { display: flex; align-items: center; gap: 7px; min-width: 0; width: 100%; }
.chat-line-head time { font-size: 9px; color: #bec0ca; white-space: nowrap; }
.chat-line-head .chat-name { min-width: 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-actions { display: inline-flex !important; align-items: center; gap: 2px; margin-inline-start: auto; opacity: .7; }
.chat-actions button { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; color: #d6d8e4; font-size: 15px; font-weight: 800; }
.chat-actions button:hover, .chat-actions button:focus-visible { background: rgba(255,255,255,.16); color: #fff; }
.chat-message-text { display: block; white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
.chat-mention { display: inline; padding: 1px 3px; border-radius: 4px; background: rgba(115,178,255,.16); color: #add9ff !important; font: inherit; font-weight: 800; unicode-bidi: isolate; }
button.chat-mention { cursor: pointer; }
.chat-row.mine .chat-mention { color: #ffe08b !important; background: rgba(255,217,119,.12); }
.chat-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; width: 100%; padding: 5px 8px; border-inline-start: 3px solid #8ecbf4; border-radius: 5px; background: rgba(255,255,255,.075); text-align: start; }
.chat-quote strong { max-width: 100%; font-size: 10px; color: #b8e1ff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-quote small { max-width: 100%; font-size: 10px; color: #d3d3db; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-row.mine .chat-quote { border-color: #ffd28c; }
.chat-row.mine .chat-quote strong { color: #ffe0a2; }
.chat-jump .chat-line { animation: chatJump 1.8s ease; }
@keyframes chatJump { 30% { outline: 3px solid #ffb84d; outline-offset: 2px; } }
.reply-draft { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 13px; border-top: 1px solid rgba(255,255,255,.12); background: rgba(15,18,26,.95); }
.reply-draft[hidden] { display: none; }
.reply-draft-mark { font-size: 22px; color: #9bd3ff; }
.reply-draft-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.reply-draft-copy strong { color: #bde2ff; font-size: 11px; }
.reply-draft-copy small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #b7b8c1; font-size: 11px; }
.reply-draft button { width: 30px; height: 30px; flex: none; border-radius: 50%; background: rgba(255,255,255,.09); font-size: 20px; }
.mention-menu { position: absolute; z-index: 20; bottom: 58px; inset-inline: 10px; max-height: 260px; overflow-y: auto; padding: 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: #181920; box-shadow: 0 -12px 35px rgba(0,0,0,.55); }
.mention-menu[hidden] { display: none; }
.mention-choice { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px; border-radius: 9px; text-align: start; }
.mention-choice:hover, .mention-choice.active { background: rgba(255,255,255,.11); }
.mention-choice .room-avatar-frame { width: 32px; height: 32px; }
.mention-choice > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.mention-choice strong { font-size: 12px; }
.mention-choice small { font-size: 10px; color: #aaaebc; }
@media (max-width: 620px) {
  .speaker { max-width: 145px; }
  .speaker-face { width: 32px; height: 32px; }
  .theme-picker { inset-inline: 6px; max-height: 50%; }
  .chat-log { gap: 12px; }
  .chat-row { max-width: min(94%,420px); }
}
