:root {
  --bg: #060510;
  --ink: #f5f3ff;
  --muted: #9aa0bd;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --lime: #a3e635;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.045);
  --radius: 22px;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------- atmosphere -------------------------------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% -10%, #140a33 0%, #08061a 45%, #050410 100%);
}

.aurora .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.orb-1 {
  width: 540px;
  height: 540px;
  top: -160px;
  left: -120px;
  background: #7c3aed;
  animation: drift 20s ease-in-out infinite;
}

.orb-2 {
  width: 480px;
  height: 480px;
  right: -140px;
  bottom: -180px;
  background: #0891b2;
  animation: drift 26s ease-in-out infinite reverse;
}

.orb-3 {
  width: 400px;
  height: 400px;
  top: 28%;
  left: 46%;
  background: #be185d;
  opacity: 0.35;
  animation: drift 32s ease-in-out infinite;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 70%);
  opacity: 0.55;
}

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

.site-header {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 26px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #ddd6fe;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.35), rgba(34, 211, 238, 0.12));
  box-shadow: 0 0 26px -8px rgba(139, 92, 246, 0.9);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  background: linear-gradient(100deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.meta {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b90b3;
}

/* ---------------------------------- shell ---------------------------------- */

main {
  position: relative;
  z-index: 2;
}

.screen {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px 64px;
  animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Keep the landing composed on tall screens instead of hugging the top. */
#screen-home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Capped so very tall windows don't leave the hero floating in empty space. */
  min-height: min(100vh - 110px, 780px);
  padding-bottom: 40px;
}

/* ---------------------------------- hero ----------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 54px;
  padding: 54px 0 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cfd2e8;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px 1px rgba(163, 230, 53, 0.8);
  flex: none;
}

h1 {
  margin: 20px 0 0;
  font-size: clamp(2.7rem, 5.8vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.grad {
  background: linear-gradient(100deg, #a78bfa 5%, #22d3ee 48%, #f472b6 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 20px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

/* ------------------------------ hero mock -------------------------------- */

.hero-visual {
  position: relative;
  padding: 8px;
}

.mock-stage {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.16), rgba(6, 182, 212, 0.08));
  padding: 12px;
  backdrop-filter: blur(14px);
  box-shadow: 0 50px 130px -50px rgba(139, 92, 246, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: floaty 9s ease-in-out infinite;
}

.mock-window {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: radial-gradient(120% 140% at 15% 0%, #2a1a5c 0%, #0a0a1f 55%, #030310 100%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.mock-bar {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 40px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f472b6, #8b5cf6);
  opacity: 0.8;
}

.mock-sweep {
  position: absolute;
  inset: -45%;
  background: conic-gradient(
    from 90deg,
    transparent 0deg,
    rgba(34, 211, 238, 0.3) 70deg,
    transparent 155deg,
    rgba(244, 114, 182, 0.28) 245deg,
    transparent 330deg
  );
  filter: blur(22px);
  animation: spin 16s linear infinite;
}

.mock-code {
  position: relative;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #c4b5fd;
  background: rgba(4, 4, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 8px;
}

.mock-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 2px;
}

.mock-seats {
  display: flex;
}

.mock-avatar {
  width: 26px;
  height: 26px;
  margin-left: -7px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: #0a0a18;
  border: 2px solid #0d0a1e;
}

.a1 {
  background: linear-gradient(140deg, #8b5cf6, #c084fc);
}
.a2 {
  background: linear-gradient(140deg, #22d3ee, #0ea5e9);
}
.a3 {
  background: linear-gradient(140deg, #f472b6, #fb7185);
}
.a4 {
  background: linear-gradient(140deg, #a3e635, #22c55e);
}
.a5 {
  background: linear-gradient(140deg, #fbbf24, #f97316);
}

.mock-float {
  position: absolute;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #d9dcf2;
  background: rgba(10, 8, 26, 0.85);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px -20px #000;
}

.f1 {
  top: -6px;
  right: -6px;
  animation: floaty 7s ease-in-out infinite;
}

.f2 {
  bottom: 6px;
  left: -10px;
  animation: floaty 8s ease-in-out infinite reverse;
}

/* --------------------------------- panels --------------------------------- */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.018));
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.card::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card h2 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.card .muted {
  margin: 0;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

label {
  margin-top: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a6aac9;
}

input {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 18, 0.62);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder {
  color: #55597b;
}

input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.code-input {
  font-family: var(--mono);
  font-size: 1.08rem;
  letter-spacing: 0.42em;
  text-align: center;
  padding-left: 0.42em;
  text-transform: uppercase;
}

/* --------------------------------- buttons -------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.82rem 1.2rem;
  margin-top: 10px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #db2777 58%, #06b6d4);
  box-shadow: 0 16px 40px -16px rgba(139, 92, 246, 0.9);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b5cf6, #ec4899 58%, #22d3ee);
  box-shadow: 0 20px 50px -16px rgba(139, 92, 246, 1);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  margin: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

.btn.wide {
  width: 100%;
}

.icon-btn {
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #d5d8ee;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.icon-btn:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.5);
  color: #fff;
}

.hint {
  margin: 4px 0 0;
  font-size: 0.77rem;
  line-height: 1.5;
  color: #7f84a6;
}

.error {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: #fda4af;
}

/* -------------------------------- features -------------------------------- */

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  color: #b9bdd8;
}

/* --------------------------------- room bar -------------------------------- */

.room-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 18px;
  padding: 16px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.room-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kicker {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8d92b4;
}

.code-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.code-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: 0 0 24px rgba(167, 139, 250, 0.65);
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seat-count {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  color: #b9bdd8;
  font-variant-numeric: tabular-nums;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.65);
  animation: pulse 1.6s infinite;
}

/* --------------------------------- layout ---------------------------------- */

.room-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
}

/* ---------------------------------- stage ---------------------------------- */

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #03030b;
  box-shadow: 0 40px 90px -40px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.stage.is-live {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 60px -12px rgba(139, 92, 246, 0.65), 0 40px 90px -40px #000;
}

.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stage video.is-live {
  opacity: 1;
}

.stage-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px;
  text-align: center;
  background: radial-gradient(70% 90% at 50% 0%, rgba(139, 92, 246, 0.18), transparent 72%), #03030c;
}

.stage-empty h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  letter-spacing: -0.02em;
}

.stage-empty p {
  margin: 0;
  max-width: 42ch;
  font-size: 0.9rem;
}

.stage-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  height: 30px;
  margin-top: 16px;
}

.stage-waves i {
  width: 5px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22d3ee, #8b5cf6);
  animation: wave 1.3s ease-in-out infinite;
}

.stage-waves i:nth-child(2) {
  animation-delay: 0.16s;
}

.stage-waves i:nth-child(3) {
  animation-delay: 0.32s;
}

.stage-hud {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(3, 3, 11, 0.9), rgba(3, 3, 11, 0));
  /* Always visible: "Enable sound" must be discoverable without hovering. */
  opacity: 0.94;
  transition: opacity 0.25s ease;
}

.stage:hover .stage-hud,
.stage:focus-within .stage-hud {
  opacity: 1;
}

.hud-role {
  margin-right: auto;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9cbe4;
}

.hud-btn {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 8, 26, 0.7);
  color: #eef0ff;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.18s, border-color 0.18s;
}

.hud-btn:hover {
  background: rgba(139, 92, 246, 0.4);
  border-color: rgba(167, 139, 250, 0.6);
}

/* ----------------------------------- side ---------------------------------- */

.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-block {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8d92b4;
  font-weight: 600;
}

.side-title span {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  color: #c4b5fd;
}

.seat-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.035);
}

.seat.empty {
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.09);
  border-style: dashed;
  background: transparent;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0a0a18;
  background: linear-gradient(140deg, var(--a, #8b5cf6), var(--b, #c084fc));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07);
}

.avatar.ghost {
  background: none;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.seat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.seat-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-name em {
  font-style: normal;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 1px 5px;
  border-radius: 999px;
}

.seat-role {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f84a6;
}

.tag.host {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.45);
}

/* ---------------------------------- relay ---------------------------------- */

.relay-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  font-size: 0.82rem;
  color: #c9cbe4;
}

.relay-row:last-child {
  margin-bottom: 0;
}

.relay-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #6b6f90;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.relay-dot.ok {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.7);
}

.relay-dot.relay {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}

.relay-dot.warn {
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.relay-path {
  justify-content: space-between;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f84a6;
}

.relay-path strong {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #e6e8f7;
}

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

.chat-block {
  display: flex;
  flex-direction: column;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0 4px 0 0;
  max-height: 230px;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.5) transparent;
}

.chat-list::-webkit-scrollbar {
  width: 6px;
}

.chat-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.45);
}

.chat-list:empty::after {
  content: "No messages yet — say hi.";
  font-size: 0.8rem;
  color: #7f84a6;
}

.chat-msg {
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.035);
}

.chat-msg.mine {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.12);
}

.chat-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #c4b5fd;
}

.chat-msg.mine .chat-name {
  color: #67e8f9;
}

.chat-time {
  font-size: 0.62rem;
  color: #6b6f90;
  font-variant-numeric: tabular-nums;
}

.chat-text {
  margin: 3px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #e6e8f7;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0.58rem 0.72rem;
  font-size: 0.86rem;
}

.chat-send {
  flex: none;
  width: 40px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.chat-send:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ---------------------------------- toast ---------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  padding: 0.8rem 1.15rem;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(12, 10, 30, 0.94);
  color: var(--ink);
  font-size: 0.88rem;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px -24px #000;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* -------------------------------- animation -------------------------------- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(40px, -30px, 0) scale(1.12);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.65);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(244, 63, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
  }
}

@keyframes wave {
  0%,
  100% {
    height: 8px;
    opacity: 0.55;
  }
  50% {
    height: 26px;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------------------------------- responsive ------------------------------- */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 38px;
  }

  .hero-visual {
    max-width: 520px;
  }

  .room-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .screen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .meta {
    display: none;
  }

  .card {
    padding: 20px;
  }

  .room-bar {
    padding: 14px 16px;
  }

  .code-value {
    font-size: 1.25rem;
    letter-spacing: 0.16em;
  }

  h1 {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }

  /* Taller stage and clearance for the always-on HUD on phones. */
  .stage {
    aspect-ratio: 4 / 3;
  }

  .stage-empty {
    padding-bottom: 92px;
  }

  .mock-float {
    display: none;
  }
}
