/* ReactRoom — design system v2 "Marquee".
   Cinema-inspired: warm near-black, ember coral→amber accent (marquee glow),
   mint reserved for "in sync" success states. Inter variable, self-hosted.

   COMPLIANCE: nothing in this stylesheet may overlap, cover, or shrink the
   YouTube player below 200x200. The player region is reserved exclusively. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f0c0d;
  --bg-elevated: #161214;
  --bg-card: #1a1518;
  --border: #2a2127;
  --border-strong: #3a2e35;
  --text: #f4eef0;
  --text-dim: #a89ca3;
  --text-faint: #6e6168;
  --accent: #ff4d59;
  --accent-warm: #ffa94d;
  --accent-grad: linear-gradient(135deg, #ff4d59 0%, #ff8a3d 100%);
  --accent-glow: rgba(255, 77, 89, 0.35);
  --green: #3ddc97;
  --amber: #ffb547;
  --red: #ff5c74;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv05", "cv08", "ss01";
}

body {
  background:
    radial-gradient(1100px 480px at 75% -12%, rgba(255, 77, 89, 0.10), transparent 60%),
    radial-gradient(900px 420px at 12% -8%, rgba(255, 138, 61, 0.07), transparent 55%),
    var(--bg);
}

a { color: var(--accent-warm); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(255, 77, 89, 0.35); }

/* ---------- motion ---------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-10px) rotate(0.4deg); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.78); }
}
@keyframes progressSlide {
  from { width: 18%; }
  to { width: 82%; }
}
@keyframes shimmer {
  from { background-position: -300px 0; }
  to { background-position: 300px 0; }
}
@keyframes glowDrift {
  0%, 100% { opacity: 0.7; transform: translate(0, 0) scale(1); }
  50% { opacity: 1; transform: translate(12px, -8px) scale(1.06); }
}

.reveal { animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
.reveal.d4 { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- header ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 12, 13, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }

.logo-mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--accent-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.topbar .spacer { flex: 1; }

/* ---------- pills & badges ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-dim);
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.pill.ok { color: var(--green); border-color: rgba(61, 220, 151, 0.35); }
.pill.ok .dot { background: var(--green); box-shadow: 0 0 8px rgba(61, 220, 151, 0.8); animation: pulseDot 2s ease-in-out infinite; }
.pill.warn { color: var(--amber); border-color: rgba(255, 181, 71, 0.35); }
.pill.warn .dot { background: var(--amber); }
.pill.err { color: var(--red); border-color: rgba(255, 92, 116, 0.35); }
.pill.err .dot { background: var(--red); }
.pill.accent { color: #ffb3a3; border-color: rgba(255, 77, 89, 0.4); }
.pill.accent .dot { background: var(--accent); animation: pulseDot 2s ease-in-out infinite; }

/* ---------- buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); background: #221a1e; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: var(--accent-grad);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 6px 26px var(--accent-glow); }
.btn.small { padding: 6px 12px; font-size: 13px; }

.input, select.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 89, 0.16); }
.input::placeholder { color: var(--text-faint); }

label.field {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- cards ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.2px; }
.card h3 { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 700; }
.card .hint { color: var(--text-faint); font-size: 13px; margin-top: 8px; }

/* ---------- landing ---------- */

.landing {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.hero-copy h1 {
  font-size: clamp(34px, 5vw, 50px);
  margin: 0 0 16px;
  letter-spacing: -1.6px;
  line-height: 1.07;
  font-weight: 800;
}
.hero-copy h1 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy > p {
  color: var(--text-dim);
  font-size: 16.5px;
  margin: 0 0 28px;
  max-width: 480px;
}
.hero-copy > p em { color: var(--text); font-style: normal; font-weight: 600; }

/* join box */
.join-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.join-row { display: flex; gap: 10px; }
.join-row .input { flex: 1; font-size: 15px; padding: 12px 15px; }
.detect-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 28px;
  flex-wrap: wrap;
}
.detect-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-faint);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.detect-chip.live { color: var(--text); border-color: rgba(255, 138, 61, 0.5); }
.detect-chip .plat { color: var(--accent-warm); }
.seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
}
.seg button {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 650;
  padding: 5px 12px;
  cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--border); }
.seg button.active { background: var(--bg-elevated); color: var(--accent-warm); }
.join-error { color: var(--red); font-size: 13px; margin: 10px 2px 0; min-height: 1em; }

.host-cta { margin: 18px 2px 0; font-size: 14px; color: var(--text-dim); }
.host-cta a { font-weight: 650; }

/* ---------- hero mockup (pure CSS product preview) ---------- */

.mockup { position: relative; }
.mockup::before {
  content: "";
  position: absolute;
  inset: -8% -6%;
  background:
    radial-gradient(60% 55% at 55% 45%, var(--accent-glow), transparent 70%),
    radial-gradient(45% 40% at 30% 70%, rgba(255, 138, 61, 0.22), transparent 70%);
  filter: blur(14px);
  z-index: 0;
  animation: glowDrift 7s ease-in-out infinite;
}

.mock-window {
  position: relative;
  z-index: 1;
  background: #141014;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: floaty 7s ease-in-out infinite;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-title { margin-left: 8px; font-size: 11.5px; color: var(--text-faint); font-weight: 600; flex: 1; }
.mock-sync {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid rgba(61, 220, 151, 0.4);
  border-radius: 999px;
  padding: 2px 9px;
}
.mock-sync::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(61, 220, 151, 0.9);
  animation: pulseDot 2s ease-in-out infinite;
}

.mock-body {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
  padding: 12px;
}

.mock-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 77, 89, 0.20), transparent 55%),
    radial-gradient(110% 90% at 80% 85%, rgba(255, 138, 61, 0.14), transparent 55%),
    #08070a;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-play {
  width: 48px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 22px var(--accent-glow);
}
.mock-progress {
  position: absolute;
  left: 10px; right: 10px; bottom: 9px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.mock-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent-grad);
  animation: progressSlide 9s ease-in-out infinite alternate;
}

.mock-side { display: flex; flex-direction: column; gap: 8px; }
.mock-cam {
  position: relative;
  aspect-ratio: 4 / 3.4;
  border-radius: 9px;
  background:
    radial-gradient(80% 80% at 50% 38%, #3a2730, #1b1318 70%),
    #1b1318;
  border: 1px solid var(--border);
  overflow: hidden;
}
.mock-avatar {
  position: absolute;
  left: 50%; top: 42%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(140deg, #ffce9e, #c98259);
}
.mock-avatar::after {
  content: "";
  position: absolute;
  left: 50%; top: 116%;
  width: 52px; height: 30px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background: linear-gradient(140deg, #4b3540, #2b1e26);
}
.mock-live {
  position: absolute;
  top: 6px; left: 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
}
.mock-stat {
  font-size: 9.5px;
  font-weight: 650;
  color: var(--text-faint);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px;
  text-align: center;
}
.mock-stat.ok { color: var(--green); border-color: rgba(61, 220, 151, 0.3); }

/* ---------- steps ---------- */

.steps h2 {
  text-align: center;
  font-size: 26px;
  letter-spacing: -0.6px;
  margin: 0 0 28px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; } }

.step-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.step-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.step-num {
  position: absolute;
  top: -12px;
  left: 18px;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.step-card svg { width: 26px; height: 26px; stroke: var(--accent-warm); margin-bottom: 10px; }
.step-card h3 { margin: 0 0 6px; font-size: 15.5px; letter-spacing: -0.2px; }
.step-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; }

/* ---------- trust strip / footer ---------- */

.trust-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 64px 0 0;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 7px 14px;
}
.trust-badge::before { content: "✓"; color: var(--green); font-weight: 800; }

footer.site-footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
  padding: 26px 20px 36px;
}

/* ---------- watch / host layout ----------
   Two NON-OVERLAPPING regions: the player (large, >=200x200 guaranteed by
   minimums below) and the sidebar with the host cam (small). Nothing is ever
   positioned over the player. */

.stage {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 340px;
  gap: 16px;
  padding: 16px 22px 28px;
  max-width: 1700px;
  margin: 0 auto;
  align-items: start;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; }
}

.player-region { min-width: 0; }

.player-shell {
  position: relative; /* for aspect ratio only — no children besides the iframe */
  width: 100%;
  aspect-ratio: 16 / 9;
  min-width: 320px;
  min-height: 200px; /* COMPLIANCE: never below 200px */
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.player-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The join banner sits ABOVE the player in document flow — never over it. */
.join-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255, 77, 89, 0.14), rgba(255, 138, 61, 0.10));
  border: 1px solid rgba(255, 77, 89, 0.45);
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 12px;
  font-weight: 600;
}
.join-banner .icon { font-size: 20px; }
.join-banner.hidden { display: none; }
.join-banner small { display: block; font-weight: 400; color: var(--text-dim); }

.below-player { margin-top: 12px; }
.now-playing { color: var(--text-dim); font-size: 14px; margin-top: 10px; min-height: 20px; }
.now-playing b { color: var(--text); }

.sidebar { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.cam-shell {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.cam-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cam-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 13.5px;
  text-align: center;
  padding: 12px;
  background-image: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.035) 50%, transparent 65%);
  background-size: 600px 100%;
  background-repeat: no-repeat;
  animation: shimmer 2.4s linear infinite;
}

.cam-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 2px 0;
  font-size: 13px;
  color: var(--text-dim);
}

.statline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 2px;
  font-size: 14px;
  color: var(--text-dim);
}

/* switch */
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.15s;
  cursor: pointer;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }

.field-row { margin-bottom: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.notice {
  font-size: 12.5px;
  color: var(--text-faint);
  border-left: 3px solid var(--border-strong);
  padding-left: 10px;
  margin-top: 14px;
}
.notice.compliance { border-left-color: var(--accent); }

.copy-link {
  display: flex;
  gap: 8px;
  align-items: center;
}
.copy-link code {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
  z-index: 100;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }

/* ---------- logo mark (SVG: screen + cam tile + live dot) ---------- */

svg.logo-mark {
  width: 28px;
  height: 28px;
  background: none;
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* ---------- room chat ---------- */

.chat-card { position: relative; display: flex; flex-direction: column; }
.chat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chat-head h3 { margin: 0; }
.chat-nick {
  background: none;
  border: none;
  color: var(--accent-warm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-log {
  height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.chat-msg { font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.chat-name { font-weight: 700; margin-right: 6px; font-size: 12.5px; }
.chat-host-badge {
  display: inline-block;
  background: var(--accent-grad);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 6px;
  vertical-align: 1px;
}
.chat-text { color: var(--text-dim); }
.chat-reactions { display: flex; gap: 6px; margin: 10px 0; }
.chat-emoji {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  padding: 5px 0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.chat-emoji:hover { transform: translateY(-2px) scale(1.08); border-color: var(--border-strong); }
.chat-compose { display: flex; gap: 8px; }
.chat-compose .chat-input { flex: 1; padding: 9px 12px; font-size: 13.5px; }
.chat-compose .btn { padding: 9px 14px; font-size: 13px; }

/* Reaction bursts: strictly contained within the chat panel (sidebar) —
   never anywhere near the player region. */
.react-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--radius);
}
.react-float {
  position: absolute;
  bottom: 70px;
  font-size: 22px;
  animation: reactUp 2s ease-out forwards;
}
@keyframes reactUp {
  from { opacity: 0; transform: translateY(0) scale(0.6); }
  15% { opacity: 1; }
  to { opacity: 0; transform: translateY(-190px) translateX(var(--drift, 0)) scale(1.25); }
}

/* ---------- header status language (shared across all pages) ----------
   Twitch/YouTube-style: solid LIVE badge, icon+number stats, colored sync
   text. One language everywhere — headers, cam label, host page. */

.room-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.2px;
  color: var(--text);
  min-width: 0;
}
.room-id svg { width: 16px; height: 16px; flex-shrink: 0; }
.room-id .plat-twitch { color: #a970ff; }
.room-id .plat-youtube { color: #ff0033; }
.room-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.live-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
}
.live-badge.off {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-faint);
  padding: 2px 9px;
}
.live-badge.mini { font-size: 9.5px; padding: 2px 7px; }
.live-badge.mini.off { padding: 1px 6px; }

.stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-dim);
}
.stat svg { width: 15px; height: 15px; flex-shrink: 0; }
.stat b { color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; }
.stat.viewers-live b { color: var(--accent); }
.stat.ok { color: var(--green); }
.stat.warn { color: var(--amber); }
.stat.err { color: var(--red); }
.stat .sync-ico { display: inline-flex; }
.stat .sync-ico svg { width: 14px; height: 14px; }

.stat-divider { width: 1px; height: 16px; background: var(--border-strong); }

.host-as {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-dim);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.host-as b { color: var(--text); }

/* ---------- chat tabs + twitch chat embed ---------- */

.chat-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 4px;
  margin-bottom: 12px;
}
.chat-tabs button {
  flex: 1;
  background: none;
  border: none;
  border-radius: 6px;
  padding: 7px 0;
  color: var(--text-faint);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.chat-tabs button.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.chat-panel { position: relative; }
.platform-chat-frame {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 9px;
  background: #0e0e10;
}
.chat-foot-note { color: var(--text-faint); font-size: 11.5px; margin: 8px 2px 0; }

/* ---------- chat command card rows ---------- */

.cmd-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 12px 0 4px;
}

/* ---------- explore page ---------- */

.explore {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}
.explore-head { margin-bottom: 28px; }
.explore-head h1 { font-size: 32px; letter-spacing: -0.8px; margin: 0 0 8px; }
.explore-head p { color: var(--text-dim); margin: 0; max-width: 560px; }

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.room-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.room-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.room-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.room-card-title {
  margin: 0;
  color: var(--text-dim);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 1.4em;
}
.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}
.room-card-join {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-warm);
}

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state h2 { margin-bottom: 6px; }
