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

:root {
  --bg: #0a0a0f;
  --surface: #13131c;
  --surface-soft: #171725;
  --border: #26263b;
  --accent: #7c3aed;
  --accent2: #a855f7;
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.14);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --amber: #f59e0b;
  --text: #e2e8f0;
  --muted: #7b8299;
  --radius: 14px;
  --touch-min: 44px;
  --nav-height: 58px;
  --font-body: "Inter", sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --font-display: "Oswald", sans-serif;
  --font-ornate: "Cinzel", serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.12), transparent 24%),
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 22%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

/* ── Global Scrollbar — theme-matched ────────────────────── */
/* Firefox / modern standard */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

/* Webkit / Chrome / Edge / Safari */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.35);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: content-box;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.55);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:active {
  background: rgba(168, 85, 247, 0.72);
  background-clip: content-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(19, 19, 28, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.logo span { color: var(--accent2); }

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--red);
  transition: background 0.2s ease;
}

.status-dot.connected { background: var(--green); }

#join-screen {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.45) transparent;
}
#join-screen.active { display: flex; }
#join-screen::-webkit-scrollbar { width: 5px; }
#join-screen::-webkit-scrollbar-track { background: transparent; }
#join-screen::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.45); border-radius: 999px; }
#join-screen::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.65); }

.join-card {
  width: 100%;
  max-width: 1120px;
  padding: 46px 40px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(19, 19, 28, 0.95);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.join-form-panel {
  text-align: center;
}

.join-card h2 {
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.95rem;
  font-weight: 800;
}

.join-card p {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.92rem;
}

.room-mode-toggle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.mode-btn,
.room-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.mode-btn {
  padding: 11px 14px;
  min-height: var(--touch-min);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.mode-btn:hover {
  transform: translateY(-1px);
}

.mode-btn:hover,
.mode-btn.active {
  border-color: rgba(124, 58, 237, 0.28);
  background: rgba(124, 58, 237, 0.12);
  color: #ede9fe;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: left;
}

input[type="text"] {
  width: 100%;
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  outline: none;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

.btn,
.url-bar button,
.search-area button,
.chat-input-area button,
.moment-compose button {
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn {
  width: 100%;
  padding: 13px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.btn:hover,
.url-bar button:hover,
.chat-input-area button:hover,
.moment-compose button:hover {
  background: var(--accent2);
}

.btn:active,
.url-bar button:active,
.chat-input-area button:active,
.moment-compose button:active,
.ghost-btn:active,
.ctrl-btn:active { transform: scale(0.98); }

.btn.secondary {
  margin-top: 10px;
  background: var(--surface-soft);
  color: var(--text);
}

.btn.secondary:hover {
  background: #23233a;
}

#active-rooms-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 8px 0 0;
  text-align: left;
}

#active-rooms-container h3,
.playlist-header h3,
.section-heading-row h3,
.chat-heading,
.event-log-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#active-rooms-container h3 {
  color: var(--muted);
  font-size: 0.95rem;
}

.directory-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.directory-toolbar input {
  margin-bottom: 0;
}

.directory-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#active-rooms-list,
#room-playlist,
#participants-list,
#game-seat-list,
#voice-seat-list,
#history-list,
#moments-list,
#banned-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-item,
.playlist-item,
.participant-item,
.history-item,
.moment-item,
.request-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.room-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.room-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.room-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-item-mode {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.room-item-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.room-item-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.room-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.room-item-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
}

.room-item-track {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 0.75rem;
}

.room-item-users {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.78rem;
}

.empty-rooms,
.micro-copy {
  padding: 10px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
}

.micro-copy.error { color: var(--red); }

.inline-action-feedback {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.inline-action-feedback:empty {
  display: none;
}

.inline-action-feedback.is-pending {
  color: #93c5fd;
}

.inline-action-feedback.is-success {
  color: #86efac;
}

.inline-action-feedback.is-error {
  color: #fca5a5;
}

#room-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
#room-screen.active { display: flex; }

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(19, 19, 28, 0.92);
}

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

.room-status-copy {
  justify-content: flex-end;
  min-width: 0;
}

.current-media-copy {
  min-width: 0;
  text-align: right;
}

.room-id-badge,
.room-mode-badge,
.room-control-badge,
.sidebar-meta,
.participant-role,
.voice-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.room-id-badge {
  padding: 5px 12px;
  background: var(--surface-soft);
  color: var(--accent2);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
}

.room-mode-badge {
  padding: 5px 11px;
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  font-size: 0.74rem;
}

.room-control-badge {
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.room-control-badge.everyone {
  background: rgba(124, 58, 237, 0.16);
  color: #d6bcfa;
}

.room-control-badge.host-only {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.current-video-title {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.current-video-subtitle {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.76rem;
}

.user-count {
  color: var(--muted);
  font-size: 0.82rem;
}

.main-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: block;
}

.video-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
}

.url-bar,
.search-area,
.chat-input-area,
.moment-compose,
.section-heading-row,
.playlist-item-votes,
.participant-name-row,
.request-actions,
.room-settings-card,
.participant-meta-row,
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.url-bar input,
.search-area input,
.chat-input-area input,
.moment-compose input { flex: 1; margin-bottom: 0; }

.url-bar button,
.search-area button,
.chat-input-area button,
.moment-compose button {
  padding: 12px 18px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
}

#player-wrapper {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #000;
  padding-top: 56.25%;
}

#player-wrapper iframe,
#player-wrapper #player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.player-placeholder svg { opacity: 0.28; }

.music-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 24%),
    radial-gradient(circle at bottom center, rgba(16, 185, 129, 0.16), transparent 34%),
    linear-gradient(140deg, rgba(17, 24, 39, 0.98), rgba(9, 9, 12, 0.98));
}

.music-stage-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(217, 70, 239, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.music-stage-marquee {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  background: linear-gradient(135deg, rgba(34, 34, 46, 0.92), rgba(20, 20, 28, 0.92));
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.04),
    0 0 28px rgba(250, 204, 21, 0.12);
}

.music-stage-marquee-label {
  flex-shrink: 0;
  color: #fde68a;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.music-stage-marquee-track {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.music-stage-marquee-track span {
  display: inline-block;
  padding-left: 100%;
  color: #f8fafc;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  animation: marqueeSlide 14s linear infinite;
  animation-play-state: paused;
}

.music-stage-deck {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  flex: 1;
}

.music-stage-jukebox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-stage-halo {
  position: absolute;
  inset: 10% 18%;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(236, 72, 153, 0.32), transparent 52%),
    radial-gradient(circle, rgba(16, 185, 129, 0.28), transparent 66%);
  filter: blur(36px);
  opacity: 0.88;
}

.music-stage-cabinet {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1 / 1.12;
  padding: 24px;
  border-radius: 30px 30px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.2), rgba(190, 24, 93, 0.08) 28%, rgba(15, 23, 42, 0.94) 72%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.4);
}

.music-stage-cabinet::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 24px 24px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.music-stage-window {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(100% - 48px);
  padding: 18px;
  border-radius: 22px 22px 18px 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(2, 6, 23, 0.98));
  overflow: hidden;
}

.music-stage-vinyl {
  position: relative;
  width: min(78%, 220px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(15, 23, 42, 0.36) 0 14%, transparent 14%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 62%),
    linear-gradient(135deg, #171717, #000);
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.02),
    0 24px 50px rgba(0, 0, 0, 0.42);
  animation: recordSpin 8s linear infinite;
  animation-play-state: paused;
}

.music-stage-vinyl-rings {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background:
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 10px);
  opacity: 0.32;
}

.music-stage-vinyl img {
  position: relative;
  z-index: 1;
  width: 38%;
  height: 38%;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 8px rgba(248, 250, 252, 0.06);
}

.music-stage-vinyl-center {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, #f8fafc 0 26%, #94a3b8 26% 54%, #0f172a 54%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.music-stage-leds {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.music-stage-leds span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #f9a8d4;
  box-shadow: 0 0 10px currentColor;
}

.music-stage-leds span:nth-child(2n) {
  background: #fcd34d;
}

.music-stage-leds span:nth-child(3n) {
  background: #6ee7b7;
}

.music-stage-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.music-stage-label {
  color: #f9a8d4;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.music-stage-status {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.music-stage-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.9rem);
  font-weight: 800;
  line-height: 1.05;
}

.music-stage-meta {
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.92rem;
  max-width: 48ch;
}

.music-stage-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 36px;
  margin-top: 8px;
}

.music-stage-bars span {
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fcd34d, #ec4899 58%, #10b981);
  animation: equalize 1.2s ease-in-out infinite;
  animation-play-state: paused;
}

.music-stage-bars span:nth-child(1) { height: 46%; animation-delay: 0s; }
.music-stage-bars span:nth-child(2) { height: 80%; animation-delay: 0.12s; }
.music-stage-bars span:nth-child(3) { height: 58%; animation-delay: 0.24s; }
.music-stage-bars span:nth-child(4) { height: 92%; animation-delay: 0.36s; }
.music-stage-bars span:nth-child(5) { height: 52%; animation-delay: 0.48s; }

.music-stage-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  color: #fef3c7;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.music-stage-link:hover {
  color: #fff7ed;
}

.music-stage-footer {
  color: rgba(226, 232, 240, 0.64);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.music-stage.is-playing .music-stage-status {
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
}

.music-stage.is-playing .music-stage-vinyl,
.music-stage.is-playing .music-stage-bars span,
.music-stage.is-playing .music-stage-marquee-track span {
  animation-play-state: running;
}

.music-stage.is-playing .music-stage-leds span {
  box-shadow:
    0 0 10px currentColor,
    0 0 22px currentColor;
}

body.mode-music #player-wrapper {
  background: #0f1720;
}

body.mode-music #player-wrapper iframe,
body.mode-music #player-wrapper #player {
  opacity: 0.01;
  pointer-events: none;
}

body.mode-music .player-placeholder {
  display: none !important;
}

body.mode-music .music-stage {
  display: flex;
}

.ctrl-btn,
.ghost-btn,
.mini-btn,
.vote-btn,
.moment-time,
.playlist-item-remove {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.ctrl-btn {
  padding: 10px 18px;
  min-height: var(--touch-min);
  font-size: 0.84rem;
  font-weight: 500;
}

.ctrl-btn:hover,
.ghost-btn:hover,
.mini-btn:hover,
.vote-btn:hover,
.moment-time:hover,
.playlist-item-remove:hover {
  background: var(--surface-soft);
  border-color: #363655;
}

.ctrl-btn.play {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ctrl-btn.play:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

.voice-btn.active {
  background: var(--red-soft);
  border-color: rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.ctrl-btn.disabled,
.ctrl-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#sync-indicator {
  margin-left: auto;
  display: none;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
}

#sync-indicator.visible { display: inline-flex; }

.playlist-section,
.clip-room-section,
.draw-room-section,
.game-room-section,
.lyrics-section,
.moments-section,
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(19, 19, 28, 0.96);
}

.lyrics-panel {
  max-height: 320px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow-y: auto;
}

.lyrics-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lyrics-line {
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.lyrics-line.active {
  background: rgba(236, 72, 153, 0.12);
  color: var(--text);
  transform: translateX(2px);
}

.lyrics-line.pending {
  opacity: 0.72;
}

.lyrics-plain {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.65;
}

.lyrics-plain-block + .lyrics-plain-block {
  margin-top: 20px;
}

.lyrics-plain-line + .lyrics-plain-line {
  margin-top: 4px;
}

.clip-reaction-bar,
.draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reaction-btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.reaction-btn:hover {
  border-color: rgba(124, 58, 237, 0.28);
  background: rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}

#clip-reaction-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clip-reaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.clip-reaction-emoji {
  font-size: 1.3rem;
}

.clip-reaction-user {
  font-weight: 600;
}

.clip-reaction-meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.draw-room-section {
  gap: 14px;
}

.draw-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.draw-toolbar-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.08), transparent 72%),
    var(--surface-soft);
}

.draw-toolbar-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draw-tool-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.draw-tool-btn,
.draw-toolbar-actions .ghost-btn {
  justify-content: center;
  min-height: 42px;
}

.draw-tool-btn {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(10, 10, 15, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.draw-tool-btn:hover,
.draw-toolbar-actions .ghost-btn:hover {
  transform: translateY(-1px);
}

.draw-tool-btn.active,
.draw-toolbar-actions .ghost-btn.active {
  border-color: rgba(124, 58, 237, 0.7);
  background: rgba(124, 58, 237, 0.18);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.16);
}

.draw-tool-btn:disabled,
.draw-toolbar-actions .ghost-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.draw-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#draw-color-input {
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.draw-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draw-swatch {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: var(--swatch);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.draw-swatch:hover,
.draw-swatch.active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.draw-toolbar-sliders {
  gap: 14px;
}

.draw-slider-tool {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.82rem;
}

.draw-slider-tool span:first-child {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.draw-slider-tool input[type="range"] {
  width: 100%;
}

.draw-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.draw-toolbar-actions .ghost-btn {
  width: 100%;
}

.draw-canvas-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(19, 19, 28, 0.9);
}

.draw-status-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draw-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
}

.draw-canvas-shell {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(10, 10, 15, 0.14)),
    #12141d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#draw-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.section-heading-row {
  justify-content: space-between;
  gap: 12px;
}

.section-heading-row h3,
.playlist-header h3,
.chat-heading {
  color: var(--muted);
  font-size: 0.82rem;
}

#queue-help-text,
#moment-helper,
.settings-copy,
.request-meta,
.playlist-item-meta,
.history-meta,
.moment-meta,
.sidebar-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.ghost-btn {
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 600;
}

.room-settings-card {
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#auto-dj-row {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.discovery-editor {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.discovery-editor-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discovery-editor-grid input {
  margin-bottom: 0;
}

.discovery-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sidebar-meta {
  padding: 5px 10px;
  background: var(--surface-soft);
}

.role-pill.role-host,
.participant-role.role-host {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.role-pill.role-manager,
.participant-role.role-manager {
  background: rgba(124, 58, 237, 0.16);
  color: #d6bcfa;
}

.role-pill.role-member,
.participant-role.role-member {
  background: rgba(123, 130, 153, 0.18);
  color: #cbd5e1;
}

.participant-item,
.request-item,
.history-item,
.moment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
}

.participant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #1e1b2e, #0d0b1a);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.participant-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.participant-avatar-initial {
  font-size: 14px;
  font-weight: 700;
  color: rgba(241, 240, 254, 0.6);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.participant-name-clickable {
  text-decoration: none;
}

.participant-name-clickable:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.participant-copy,
.moment-copy {
  min-width: 0;
  flex: 1;
}

.participant-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.participant-name,
.request-name,
.history-title,
.moment-text,
.playlist-item-title {
  font-weight: 600;
}

.participant-name,
.history-title,
.moment-text,
.playlist-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-role,
.voice-pill {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.voice-pill {
  background: var(--green-soft);
  color: var(--green);
}

.voice-pill.live {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.request-group {
  padding: 12px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, 0.08);
}

.request-group-title {
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #d6bcfa;
}

.request-item + .request-item { margin-top: 8px; }

.mini-btn,
.vote-btn,
.playlist-item-remove,
.moment-time {
  padding: 7px 10px;
  font-size: 0.74rem;
  font-weight: 600;
}

.mini-btn.approve {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.24);
}

.mini-btn.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.24);
}

.mini-btn.danger {
  background: var(--red-soft);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.24);
}

.playlist-header {
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

#search-results {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.search-result-item {
  min-width: 156px;
  max-width: 156px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.search-result-thumb {
  width: 100%;
  height: 88px;
  object-fit: cover;
}

.search-result-info { padding: 10px; }

.search-result-title {
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.search-result-time {
  color: var(--muted);
  font-size: 0.72rem;
}

.search-result-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.btn-small {
  flex: 1;
  padding: 7px;
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.btn-small.play { background: var(--accent); }
.btn-small.queue { background: var(--surface-soft); color: var(--text); }

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.playlist-item img {
  width: 64px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

/* ══════════════════════════════════════════════════════════════
   GAME LOBBY — Premium redesign
   ══════════════════════════════════════════════════════════════ */

.game-room-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: none;
  background: none;
}

/* ── Selection view wrapper ──────────────────────────────────── */
#game-selection-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ══════════════════════════════════════════════════════════════
   Game Lobby Hero Envelope — theme-aware via data-game attribute
   ══════════════════════════════════════════════════════════════ */

/* ── Default (fallback) theme variables ── */
#game-lobby-view {
  --gl-accent:      212, 162, 76;      /* r g b  — gold */
  --gl-accent2:     140, 96,  32;
  --gl-bg1:         16,  11,  7;
  --gl-bg2:         26,  18,  11;
  --gl-glow1:       212, 162, 76;
  --gl-glow2:       89,  57,  33;
  --gl-text:        #f5e6c8;
  --gl-text-muted:  rgba(245, 230, 200, 0.55);
  --gl-heading-from: #f5e6c8;
  --gl-heading-to:   #d4a24c;
  --gl-font-heading: "Oswald", sans-serif;
  --gl-dark: 1;      /* 1 = dark bg, 0 = light bg */
}

/* ── Chess — dark walnut + gold ── */
#game-lobby-view[data-game="chess"] {
  --gl-accent:      212, 162, 76;
  --gl-accent2:     140, 96,  32;
  --gl-bg1:         16,  11,  7;
  --gl-bg2:         26,  18,  11;
  --gl-glow1:       212, 162, 76;
  --gl-glow2:       89,  57,  33;
  --gl-text:        #f5e6c8;
  --gl-text-muted:  rgba(245, 230, 200, 0.52);
  --gl-heading-from: #f5e6c8;
  --gl-heading-to:   #d4a24c;
  --gl-dark: 1;
}

/* ── Poker — deep green felt + gold ── */
#game-lobby-view[data-game="poker"] {
  --gl-accent:      5,   150, 105;
  --gl-accent2:     212, 168, 83;
  --gl-bg1:         6,   78,  59;
  --gl-bg2:         2,   44,  34;
  --gl-glow1:       5,   150, 105;
  --gl-glow2:       212, 168, 83;
  --gl-text:        #effcf6;
  --gl-text-muted:  rgba(209, 250, 229, 0.52);
  --gl-heading-from: #effcf6;
  --gl-heading-to:   #d4a853;
  --gl-dark: 1;
}

/* ── Blackjack — near-black + red/white card ── */
#game-lobby-view[data-game="blackjack"] {
  --gl-accent:      220, 38,  38;
  --gl-accent2:     180, 20,  20;
  --gl-bg1:         10,  10,  14;
  --gl-bg2:         20,  16,  22;
  --gl-glow1:       220, 38,  38;
  --gl-glow2:       100, 20,  20;
  --gl-text:        #faf5f5;
  --gl-text-muted:  rgba(250, 230, 230, 0.52);
  --gl-heading-from: #fff0f0;
  --gl-heading-to:   #dc2626;
  --gl-dark: 1;
}

/* ── Connect 4 — navy + red/yellow ── */
#game-lobby-view[data-game="connect4"] {
  --gl-accent:      239, 68,  68;
  --gl-accent2:     250, 204, 21;
  --gl-bg1:         15,  23,  42;
  --gl-bg2:         30,  41,  59;
  --gl-glow1:       239, 68,  68;
  --gl-glow2:       250, 204, 21;
  --gl-text:        #f8fafc;
  --gl-text-muted:  rgba(226, 232, 240, 0.52);
  --gl-heading-from: #f8fafc;
  --gl-heading-to:   #ef4444;
  --gl-font-heading: "Space Grotesk", sans-serif;
  --gl-dark: 1;
}

/* ── UNO — warm cream + red/green/yellow ── */
#game-lobby-view[data-game="uno"] {
  --gl-accent:      239, 68,  68;
  --gl-accent2:     22,  163, 74;
  --gl-bg1:         255, 250, 242;
  --gl-bg2:         243, 236, 218;
  --gl-glow1:       239, 68,  68;
  --gl-glow2:       250, 204, 21;
  --gl-text:        #16213e;
  --gl-text-muted:  rgba(22, 33, 62, 0.55);
  --gl-heading-from: #16213e;
  --gl-heading-to:   #dc2626;
  --gl-dark: 0;
}

/* ── Ludo — warm white + primary colours ── */
#game-lobby-view[data-game="ludo"] {
  --gl-accent:      59,  130, 246;
  --gl-accent2:     250, 204, 21;
  --gl-bg1:         255, 254, 248;
  --gl-bg2:         240, 232, 214;
  --gl-glow1:       239, 68,  68;
  --gl-glow2:       59,  130, 246;
  --gl-text:        #172554;
  --gl-text-muted:  rgba(23, 37, 84, 0.52);
  --gl-heading-from: #172554;
  --gl-heading-to:   #1d4ed8;
  --gl-dark: 0;
}

/* ── Monopoly — dark navy/green + Monopoly red ── */
#game-lobby-view[data-game="monopoly"] {
  --gl-accent:      220, 38,  38;
  --gl-accent2:     212, 168, 83;
  --gl-bg1:         10,  15,  30;
  --gl-bg2:         18,  28,  52;
  --gl-glow1:       220, 38,  38;
  --gl-glow2:       212, 168, 83;
  --gl-text:        #f5f0e8;
  --gl-text-muted:  rgba(245, 240, 232, 0.52);
  --gl-heading-from: #f5f0e8;
  --gl-heading-to:   #dc2626;
  --gl-dark: 1;
}

/* ── Codenames — espionage dark teal/slate ── */
#game-lobby-view[data-game="codenames"] {
  --gl-accent:      20,  184, 166;
  --gl-accent2:     15,  118, 110;
  --gl-bg1:         15,  23,  42;
  --gl-bg2:         17,  31,  56;
  --gl-glow1:       20,  184, 166;
  --gl-glow2:       56,  189, 248;
  --gl-text:        #f0fdfa;
  --gl-text-muted:  rgba(204, 251, 241, 0.52);
  --gl-heading-from: #f0fdfa;
  --gl-heading-to:   #14b8a6;
  --gl-font-heading: "Space Grotesk", sans-serif;
  --gl-dark: 1;
}

/* ── Wormo — earthy terrain + green/brown ── */
#game-lobby-view[data-game="wormo"] {
  --gl-accent:      101, 163, 13;
  --gl-accent2:     77,  124, 9;
  --gl-bg1:         20,  26,  10;
  --gl-bg2:         33,  42,  15;
  --gl-glow1:       101, 163, 13;
  --gl-glow2:       180, 130, 50;
  --gl-text:        #f7fee7;
  --gl-text-muted:  rgba(220, 252, 231, 0.52);
  --gl-heading-from: #f7fee7;
  --gl-heading-to:   #65a30d;
  --gl-dark: 1;
}

/* ── Skribblish (Party Drawing) — bright white + colourful ── */
#game-lobby-view[data-game="skribblish"] {
  --gl-accent:      124, 58,  237;
  --gl-accent2:     99,  102, 241;
  --gl-bg1:         250, 250, 255;
  --gl-bg2:         237, 233, 254;
  --gl-glow1:       124, 58,  237;
  --gl-glow2:       239, 68,  68;
  --gl-text:        #1e1b4b;
  --gl-text-muted:  rgba(30, 27, 75, 0.55);
  --gl-heading-from: #1e1b4b;
  --gl-heading-to:   #7c3aed;
  --gl-font-heading: "Space Grotesk", sans-serif;
  --gl-dark: 0;
}

/* ── Musical Chairs — party pink/yellow ── */
#game-lobby-view[data-game="musicalchairs"] {
  --gl-accent:      236, 72,  153;
  --gl-accent2:     250, 204, 21;
  --gl-bg1:         24,  10,  30;
  --gl-bg2:         40,  18,  50;
  --gl-glow1:       236, 72,  153;
  --gl-glow2:       250, 204, 21;
  --gl-text:        #fdf4ff;
  --gl-text-muted:  rgba(253, 244, 255, 0.52);
  --gl-heading-from: #fdf4ff;
  --gl-heading-to:   #ec4899;
  --gl-dark: 1;
}

/* ── Shared envelope styles (use variables) ── */
#game-lobby-view {
  position: relative;
  padding: 22px 20px 20px !important;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at top left,    rgba(var(--gl-glow1), 0.13) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(var(--gl-glow2), 0.16) 0%, transparent 52%),
    linear-gradient(155deg, rgba(var(--gl-bg1), 0.98) 0%, rgba(var(--gl-bg2), 0.97) 100%);
  border: 1px solid rgba(var(--gl-accent), 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(var(--gl-accent), 0.07),
    0 12px 40px rgba(0, 0, 0, 0.38);
  gap: 14px !important;
}

#game-lobby-view::before,
#game-lobby-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(var(--gl-accent), 0.18);
}

#game-lobby-view::before { inset: 6px; border-radius: 18px; }
#game-lobby-view::after  { inset: 9px; border-radius: 15px; border-color: rgba(var(--gl-accent), 0.07); }

/* ── Lobby topbar ── */
.game-lobby-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  position: relative;
  z-index: 1;
}

.game-lobby-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-lobby-heading {
  font-family: var(--gl-font-heading, "Oswald", sans-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, var(--gl-heading-from) 20%, var(--gl-heading-to) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-lobby-back-btn,
.game-lobby-browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid rgba(var(--gl-accent), 0.32);
  border-radius: 999px;
  background: rgba(var(--gl-accent), 0.09);
  color: rgba(var(--gl-accent), 1);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.game-lobby-back-btn:hover,
.game-lobby-browse-btn:hover {
  border-color: rgba(var(--gl-accent), 0.6);
  background: rgba(var(--gl-accent), 0.18);
  color: var(--gl-text);
  box-shadow: 0 0 16px rgba(var(--gl-accent), 0.15);
}

.game-lobby-back-btn:focus-visible,
.game-lobby-browse-btn:focus-visible {
  outline: 2px solid rgba(var(--gl-accent), 0.7);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════
   Game Selection View — full hero envelope + premium cards
   ══════════════════════════════════════════════════════════════ */

/* ── Selection view outer shell ── */
#game-selection-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  padding: 24px 22px 22px;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 20% 0%,   rgba(251, 191, 36, 0.11) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(124, 58, 237, 0.10) 0%, transparent 48%),
    radial-gradient(ellipse at 100% 0%,  rgba(56, 189, 248, 0.07) 0%, transparent 38%),
    linear-gradient(168deg, rgba(14, 14, 22, 0.99) 0%, rgba(10, 10, 16, 1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 56px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

/* animated shimmer sweep across the whole shell */
#game-selection-view::before {
  content: "";
  position: absolute;
  top: 0; left: -120%; width: 70%; bottom: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.03), transparent);
  animation: shimmerX 9s 0.5s infinite;
  pointer-events: none;
}

/* top-edge highlight line */
#game-selection-view::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(251,191,36,0.35) 40%, rgba(124,58,237,0.25) 70%, transparent 100%);
  pointer-events: none;
}

/* ── Topbar inside selection view ── */
#game-selection-view .game-lobby-topbar {
  position: relative;
  z-index: 2;
  padding: 0;
}

#game-selection-view .game-lobby-heading {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, #f8fafc 20%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero banner inside selection view ── */
.game-room-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 26px 24px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  background:
    radial-gradient(ellipse at 70% 0%, rgba(251, 191, 36, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(124, 58, 237, 0.12) 0%, transparent 44%),
    linear-gradient(148deg, rgba(22, 20, 36, 0.98) 0%, rgba(12, 11, 20, 0.99) 100%);
  overflow: hidden;
  z-index: 1;
}

.game-room-hero::before {
  content: "";
  position: absolute;
  top: 0; left: -100%; width: 60%; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent);
  animation: shimmerX 7s 1.2s infinite;
  pointer-events: none;
}

/* decorative corner dot grid — top-right */
.game-room-hero::after {
  content: "";
  position: absolute;
  top: 12px; right: 14px;
  width: 72px; height: 72px;
  background-image: radial-gradient(circle, rgba(251,191,36,0.22) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
  opacity: 0.7;
}

.game-room-hero-copy { min-width: 0; position: relative; z-index: 1; }

.game-room-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.6);
  margin-bottom: 8px;
}

.game-room-kicker::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: rgba(251, 191, 36, 0.5);
}

.game-room-title {
  font-family: "Oswald", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 40%, #f59e0b 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(251,191,36,0.2));
}

.game-room-note {
  margin-top: 10px;
  color: rgba(200, 200, 220, 0.58);
  line-height: 1.6;
  font-size: 0.82rem;
  max-width: 360px;
}

.game-room-badge {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background:
    linear-gradient(135deg, rgba(251,191,36,0.14) 0%, rgba(245,158,11,0.07) 100%);
  color: #fde68a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(251,191,36,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}

.game-room-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251,191,36,0.8);
  animation: pulseGlow 2s infinite ease-in-out;
  flex-shrink: 0;
}

/* ── Category tab strip ── */
.game-category-strip {
  display: flex;
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  width: fit-content;
  position: relative;
  z-index: 1;
}

.game-cat-btn {
  padding: 7px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(200, 200, 220, 0.5);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.game-cat-btn:hover {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
}

.game-cat-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(245, 158, 11, 0.14) 100%);
  color: #fef3c7;
  box-shadow:
    0 2px 8px rgba(251, 191, 36, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.game-cat-btn:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: -2px;
}

/* ── Game catalog grid ── */
.game-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 14px;
  position: relative;
  z-index: 1;
}

/* ── Game card ── */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(168deg, rgba(26, 26, 38, 0.97) 0%, rgba(16, 16, 24, 0.99) 100%);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  will-change: transform;
}

/* top highlight edge */
.game-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}

/* hover glow fill */
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.10), transparent 65%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-5px) scale(1.018);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(251, 191, 36, 0.12);
}

.game-card:hover::after { opacity: 1; }
.game-card:active { transform: translateY(-1px) scale(1.002); transition-duration: 80ms; }

.game-card.active {
  border-color: rgba(251, 191, 36, 0.52);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.22),
    0 10px 28px rgba(251, 191, 36, 0.12);
}

.game-card.active::after { opacity: 0.7; }

/* Card icon area */
.game-card-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.game-card-icon-bg {
  position: absolute;
  inset: -10px;
  filter: blur(26px);
  opacity: 0.18;
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.game-card:hover .game-card-icon-bg { opacity: 0.4; }

.game-card-icon-big {
  font-size: 2.6rem;
  z-index: 1;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.5));
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .game-card-icon-big { transform: scale(1.18) translateY(-2px); }

/* "active" badge on icon */
.game-card-active-pip {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: none;
}

.game-card.active .game-card-active-pip { display: block; }

/* Card body */
.game-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.game-card-category {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.55);
}

.game-card-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.22rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.15;
  color: #f8fafc;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.game-card-players {
  font-size: 0.68rem;
  color: rgba(200, 200, 220, 0.46);
}

/* Card CTA — slides up on hover */
.game-card-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.game-card:hover .game-card-cta,
.game-card.active .game-card-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.game-btn:active { transform: scale(0.95); }

.game-btn:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.7);
  outline-offset: 2px;
}

.game-btn.primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1a0800;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.32);
  flex: 1;
}

.game-btn.primary:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.48);
  transform: translateY(-1px);
}

.game-btn.primary:disabled {
  opacity: 0.46;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.game-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(200, 200, 220, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 8px 11px;
}

.game-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}

/* ── Active game banner (lobby view) ─────────────────────────── */
.game-active-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background:
    radial-gradient(ellipse at 80% 50%, rgba(251, 191, 36, 0.08), transparent 56%),
    linear-gradient(160deg, rgba(22, 22, 32, 0.98), rgba(14, 14, 20, 0.99));
}

.game-active-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.game-active-copy { flex: 1; min-width: 0; }

.game-active-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.6);
  margin-bottom: 2px;
}

.game-active-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.game-active-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Seat panel (game-lobby-view) ────────────────────────────── */
#game-seat-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(var(--gl-accent), 0.16);
  background: rgba(var(--gl-bg1), 0.55);
  position: relative;
  z-index: 1;
}

.game-seat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-seat-heading {
  font-family: var(--gl-font-heading, "Oswald", sans-serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: rgba(var(--gl-accent), 0.8);
}

.game-seat-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(var(--gl-accent), 0.2);
  background: rgba(var(--gl-accent), 0.07);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(var(--gl-accent), 0.7);
  letter-spacing: 0.04em;
}

.game-seat-count-pill.has-seats {
  border-color: rgba(var(--gl-accent), 0.38);
  background: rgba(var(--gl-accent), 0.14);
  color: var(--gl-text);
}

/* Main seat action CTA */
.game-seat-cta-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.game-seat-btn {
  flex: 1;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(var(--gl-accent), 0.35);
  background: linear-gradient(135deg, rgba(var(--gl-accent), 0.16) 0%, rgba(var(--gl-accent2), 0.1) 100%);
  color: var(--gl-text);
  font-family: var(--gl-font-heading, "Oswald", sans-serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.game-seat-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(var(--gl-accent), 0.28) 0%, rgba(var(--gl-accent2), 0.18) 100%);
  border-color: rgba(var(--gl-accent), 0.58);
  box-shadow: 0 4px 18px rgba(var(--gl-accent), 0.2);
  transform: translateY(-1px);
}

.game-seat-btn:active:not(:disabled) { transform: translateY(0); transition-duration: 80ms; }

.game-seat-btn:focus-visible {
  outline: 2px solid rgba(var(--gl-accent), 0.7);
  outline-offset: 2px;
}

.game-seat-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.game-seat-btn.is-seated {
  border-color: rgba(239, 68, 68, 0.32);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(180, 30, 30, 0.07) 100%);
  color: #fca5a5;
}

.game-seat-btn.is-seated:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.52);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(180, 30, 30, 0.12) 100%);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.18);
}

.game-seat-note {
  font-size: 0.75rem;
  color: var(--gl-text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* Seat player cards */
.game-seat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-seat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(var(--gl-accent), 0.1);
  background: rgba(var(--gl-accent), 0.04);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.game-seat-card.is-me {
  border-color: rgba(var(--gl-accent), 0.28);
  background: rgba(var(--gl-accent), 0.09);
}

.game-seat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--gl-accent), 0.55), rgba(var(--gl-accent2), 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(var(--gl-bg1), 1);
  flex-shrink: 0;
  letter-spacing: 0;
  border: 1px solid rgba(var(--gl-accent), 0.3);
}

.game-seat-card.is-me .game-seat-avatar {
  background: linear-gradient(135deg, rgba(var(--gl-accent), 0.9), rgba(var(--gl-accent2), 1));
  border-color: rgba(var(--gl-accent), 0.55);
  box-shadow: 0 0 10px rgba(var(--gl-accent), 0.22);
}

.game-seat-avatar.has-img {
  background: none;
  overflow: hidden;
  padding: 0;
}

.game-seat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.game-seat-card-copy { flex: 1; min-width: 0; }

.game-seat-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gl-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-seat-role {
  font-size: 0.68rem;
  color: var(--gl-text-muted);
  margin-top: 1px;
  letter-spacing: 0.04em;
}

.game-seat-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Seat request cards */
.game-seat-requests-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-seat-request-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 2px;
}

.game-seat-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(124, 58, 237, 0.06);
}

.game-seat-request-name {
  font-size: 0.84rem;
  font-weight: 600;
}

.game-seat-request-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1px;
}

.game-seat-request-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Sidebar Tabs — pill slider ── */
.sidebar-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.sidebar-tab {
  flex: 1;
  position: relative;
  padding: 8px 4px 10px;
  background: transparent;
  border: none;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.18s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent2);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.18s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

.sidebar-tab:hover {
  color: var(--text);
  background: rgba(168, 85, 247, 0.06);
}

.sidebar-tab.active {
  color: var(--accent2);
  background: rgba(168, 85, 247, 0.1);
}

.sidebar-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* notification badge inside Chat tab */
.chat-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
  animation: chat-badge-pop 0.25s ease;
}
.chat-notif-badge.hidden { display: none; }

@keyframes chat-badge-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.25); }
  100% { transform: scale(1); opacity: 1; }
}

.sidebar-pane {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-pane.active {
  display: flex;
}
.sidebar-pane-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}
.modal-header h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin: 0;
}
.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}
.close-modal-btn:hover {
  color: var(--text);
}
.modal-body {
  padding: 24px;
  line-height: 1.6;
  color: #cbd5e1;
  max-height: 70vh;
  overflow-y: auto;
}

/* Mic toggle on game seat */
.seat-mic-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.seat-mic-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.seat-mic-btn.active {
  color: var(--green);
}

@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmerX {
  0% { transform: translateX(0); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(0); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

#game-runtime-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Active-game banner in lobby view */
#game-active-banner { position: relative; z-index: 1; }

.game-active-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(var(--gl-accent), 0.22);
  background: linear-gradient(135deg, rgba(var(--gl-accent), 0.1) 0%, rgba(var(--gl-accent2), 0.07) 100%);
  position: relative;
  overflow: hidden;
}

.game-active-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left center, rgba(var(--gl-accent), 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.game-active-banner-icon {
  font-size: 2.6rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 10px rgba(var(--gl-accent), 0.4));
  position: relative;
}

.game-active-banner-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}

.game-active-banner-title {
  font-family: var(--gl-font-heading, "Oswald", sans-serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--gl-heading-from), var(--gl-heading-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-active-banner-meta {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--gl-accent), 0.65);
}

.game-active-banner-tagline {
  font-size: 0.76rem;
  color: var(--gl-text-muted);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 2px;
}

.game-runtime-placeholder {
  position: relative;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, #13131c, #0a0a0f);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
}

.game-runtime-placeholder-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.game-runtime-placeholder-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.playlist-item-info {
  min-width: 0;
  flex: 1;
}

.playlist-item-meta {
  margin-top: 4px;
  margin-bottom: 8px;
}

body.mode-music {
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 26%),
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.08), transparent 24%),
    var(--bg);
}

body.mode-music .room-mode-badge,
body.mode-music .room-item-mode {
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
}

body.mode-game {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.12), transparent 26%),
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.08), transparent 24%),
    var(--bg);
}

body.mode-game .room-mode-badge,
body.mode-game .room-item-mode,
.voice-pill.seat-player {
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
}

.vote-btn.active {
  background: rgba(124, 58, 237, 0.16);
  color: #e9d5ff;
  border-color: rgba(124, 58, 237, 0.24);
}

.vote-score {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
}

.vote-score.positive { color: var(--green); }
.vote-score.negative { color: #fca5a5; }

.playlist-item-remove {
  color: #fecaca;
  background: var(--red-soft);
  border-color: rgba(239, 68, 68, 0.22);
}

.moment-compose button { flex-shrink: 0; }

.moment-time {
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
  border-color: rgba(124, 58, 237, 0.22);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19,19,28,0.98) 0%, rgba(13,13,20,0.98) 100%);
  width: 340px;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 901px) {
  #room-screen.active {
    display: grid !important;
    grid-template-areas:
      "header header"
      "main chat";
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 340px;
    height: 100%;   /* give grid a concrete height so 1fr resolves */
  }
  .room-header { grid-area: header; }
  .main-area { grid-area: main; min-height: 0; overflow-y: auto; display: block; }
  .chat-panel { grid-area: chat; width: 100%; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
}

.chat-heading {
  display: none;
}

#pane-chat {
  padding-top: 0;
}

#chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.3) transparent;
}

.chat-input-area {
  padding: 10px 12px 12px;
}

#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.3); border-radius: 999px; }

/* ── Chat bubbles ─────────────────────────────────────────── */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 18px 18px 18px 4px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.5;
  font-size: 0.84rem;
  animation: msgPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  align-self: flex-start;
}

.chat-msg.self {
  align-self: flex-end;
  border-radius: 18px 18px 4px 18px;
  background: rgba(124, 58, 237, 0.22);
  border: none;
}

.msg-user {
  margin-bottom: 3px;
  color: #d8b4fe;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chat-msg.self .msg-user { text-align: right; }

.msg-text {
  color: var(--text);
  word-break: break-word;
}

.system-msg {
  align-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
  font-style: italic;
}

/* ── Chat input area ──────────────────────────────────────── */
.chat-input-area {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-input-area input {
  flex: 1;
  border-radius: 999px;
  padding: 11px 16px;
}

/* Emoji/GIF toggle button — sits left of the text field */
.chat-input-area .chat-picker-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  line-height: 1;
}
.chat-input-area .chat-picker-toggle:hover,
.chat-input-area .chat-picker-toggle[aria-expanded="true"] {
  background: rgba(124,58,237,0.22);
  border-color: rgba(124,58,237,0.5);
  transform: scale(1.08);
}

/* Send button */
.chat-input-area > button:last-child {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ── Chat notification badge ─────────────────────────────── */
.chat-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
  pointer-events: none;
}

.chat-notif-badge.hidden { display: none; }

/* nav-tab inner wrapper for badge overlay */
.nav-tab-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-tab-inner .chat-notif-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  margin: 0;
}

/* ── Floating emoji animation ─────────────────────────────── */
#emoji-float-layer {
  /* Container exists only as a DOM anchor; floats are position:fixed themselves */
  display: contents;
  pointer-events: none;
}

.emoji-float {
  position: fixed;
  font-size: 2rem;
  /* bottom is set purely by JS — no CSS default here */
  animation: emojiFloat 2.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform, opacity;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  z-index: 9999;
}

@keyframes emojiFloat {
  0% {
    transform: translateY(0) scale(0.6) rotate(-8deg);
    opacity: 0;
  }
  12% {
    transform: translateY(-30px) scale(1.15) rotate(6deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(-280px) translateX(var(--drift, 0px)) scale(0.8) rotate(-4deg);
    opacity: 0;
  }
}

@keyframes msgPop {
  0% { transform: scale(0.88) translateY(6px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── GIF inline display ──────────────────────────────────── */
.msg-gif-wrap { border-radius: 12px; overflow: hidden; max-width: 200px; margin-top: 4px; }
.msg-gif { display: block; width: 100%; height: auto; border-radius: 12px; }

/* ── Message reaction trigger (hover button) ─────────────── */
.chat-msg { position: relative; }

.msg-react-trigger {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,10,40,0.95);
  font-size: 0.85rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.12s ease, background 0.12s ease;
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.chat-msg:hover .msg-react-trigger,
.chat-msg:focus-within .msg-react-trigger { display: inline-flex; }
.msg-react-trigger:hover { transform: scale(1.15); background: rgba(124,58,237,0.4); }

/* ── Reaction popup ──────────────────────────────────────── */
.msg-reaction-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(18,10,36,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 20;
  animation: popupIn 0.15s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.8) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.msg-react-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
  display: inline-flex; align-items: center; justify-content: center;
}

.msg-react-btn:hover { transform: scale(1.35); background: rgba(255,255,255,0.08); }

/* ── Reaction chips below message ───────────────────────── */
.msg-reactions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.msg-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.msg-reaction-chip span { color: var(--muted); font-size: 0.78rem; }
.msg-reaction-chip.mine { background: rgba(124,58,237,0.25); border-color: rgba(124,58,237,0.5); }
.msg-reaction-chip:hover { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.35); }


/* ── Full Picker Panel ───────────────────────────────────── */
/* Panel is a flex child in #pane-chat, sits between messages and input */
.chat-picker-panel {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  background: rgba(14,8,30,0.98);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.55);
  transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.22s ease;
  opacity: 0;
  pointer-events: none;
  margin-bottom: 4px;
}

#pane-chat { position: relative; }

.chat-picker-panel.open {
  max-height: 360px;
  opacity: 1;
  pointer-events: auto;
}

/* ── Picker tab bar ──────────────────────────────────────── */
.chat-picker-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.chat-picker-tab {
  flex: 1;
  padding: 7px 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.chat-picker-tab.active {
  color: #c4b5fd;
  background: rgba(124,58,237,0.15);
}
.chat-picker-tab:not(.active):hover { color: var(--text); }

/* ── Picker panes ────────────────────────────────────────── */
.chat-picker-pane { display: flex; flex-direction: column; height: 100%; }
.chat-picker-pane.hidden { display: none; }

/* ── Search row ──────────────────────────────────────────── */
.chat-picker-search-row { padding: 8px 10px 4px; }

.chat-picker-search {
  width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.14s ease;
}
.chat-picker-search::placeholder { color: var(--muted); }
.chat-picker-search:focus { border-color: rgba(124,58,237,0.5); }

/* ── Emoji category bar ──────────────────────────────────── */
.emoji-cat-bar {
  display: flex;
  gap: 2px;
  padding: 4px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.emoji-cat-bar::-webkit-scrollbar { display: none; }

.emoji-cat-btn {
  flex-shrink: 0;
  width: 32px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.emoji-cat-btn:hover { background: rgba(255,255,255,0.07); }
.emoji-cat-btn.active {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.4);
}

/* ── Emoji grid ──────────────────────────────────────────── */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 36px);
  gap: 2px;
  padding: 6px 8px 8px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.3) transparent;
}
.emoji-grid::-webkit-scrollbar { width: 4px; }
.emoji-grid::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 999px; }

.emoji-cell {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.emoji-cell:hover { background: rgba(255,255,255,0.09); transform: scale(1.2); }
.emoji-cell:active { transform: scale(0.9); }

.emoji-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 16px 0;
}

/* ── GIF grid ────────────────────────────────────────────── */
.gif-trending-label {
  padding: 2px 12px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 0 8px 4px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.3) transparent;
}
.gif-grid::-webkit-scrollbar { width: 4px; }
.gif-grid::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 999px; }

.gif-cell {
  display: block;
  border: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  aspect-ratio: 16/9;
  -webkit-tap-highlight-color: transparent;
}
.gif-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-cell:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(124,58,237,0.4); }
.gif-cell:active { transform: scale(0.98); }

.gif-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 16px 0;
}

.gif-load-more { padding: 4px 8px 2px; text-align: center; }
.gif-load-btn {
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,0.35);
  background: rgba(124,58,237,0.12);
  color: #c4b5fd;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.14s ease;
}
.gif-load-btn:hover { background: rgba(124,58,237,0.25); }

.gif-attribution {
  padding: 4px 10px 6px;
  display: flex;
  justify-content: flex-end;
  opacity: 0.5;
}

/* ── Mobile adjustments ──────────────────────────────────── */
@media (max-width: 600px) {
  .chat-picker-panel { border-radius: 12px; }
  .gif-grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
  .emoji-grid { grid-template-columns: repeat(auto-fill, 34px); }
  .emoji-cell { width: 34px; height: 34px; font-size: 1.2rem; }
  .chat-input-area .chat-picker-toggle { width: 34px; height: 34px; font-size: 1.15rem; }
}

/* ── Shared game log collapsible panel ───────────────────── */
/* Add class="game-log-panel" to any game log wrapper to get this behaviour */
.game-log-panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.game-log-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game-log-count {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.game-log-toggle:hover { color: rgba(255, 255, 255, 0.78); }

.game-log-toggle-icon {
  font-size: 0.66rem;
  transition: transform 0.22s ease;
}

.game-log-panel.is-open .game-log-toggle-icon { transform: rotate(180deg); }

.game-log-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.game-log-panel.is-open .game-log-body {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.game-log-panel.is-open .game-log-body::-webkit-scrollbar { width: 3px; }
.game-log-panel.is-open .game-log-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 999px; }

/* ── Mobile: make game canvases/boards full-width ─────────── */
@media (max-width: 480px) {
  .emoji-float { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .emoji-float { animation: none; display: none; }
  .chat-msg { animation: none; }
  .event-log-body, .game-log-body { transition: none; }
}

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

@keyframes recordSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes equalize {
  0%, 100% { transform: scaleY(0.6); opacity: 0.72; }
  50% { transform: scaleY(1.05); opacity: 1; }
}

@keyframes marqueeSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@keyframes navTabPop {
  0% { transform: translateY(2px) scale(0.95); opacity: 0.7; }
  60% { transform: translateY(-2px) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── Mobile Landing Feature Strip ───────────────────────── */
.landing-mob-feature-strip {
  display: none;
}

.landing-mob-feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.landing-mob-feat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-mob-feat-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent2);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-mob-feat span {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Mobile Bottom Panel Nav ─────────────────────────────── */
#mobile-panel-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(13, 13, 20, 0.96);
  border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

#mobile-panel-nav .nav-tabs {
  display: flex;
  height: 100%;
}

#mobile-panel-nav .nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

#mobile-panel-nav .nav-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#mobile-panel-nav .nav-tab.active {
  color: var(--accent2);
  animation: navTabPop 0.22s ease;
}

#mobile-panel-nav .nav-tab.active svg {
  filter: drop-shadow(0 0 6px var(--accent2));
}

@media (max-width: 900px) {
  .main-area {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

/* ── Tablet: 768px ────────────────────────────────────────── */
@media (max-width: 768px) {
  .join-card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .room-mode-toggle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .game-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Mobile Tab Overlays (Chat / People / Settings) ────────── */
.mob-tab-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
  animation: mobOverlayFadeIn 0.18s ease;
}
.mob-tab-overlay.open {
  display: flex;
}

@keyframes mobOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.mob-tab-sheet {
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #13131c;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.6);
  animation: mobSheetSlideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

.mob-tab-sheet-handle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 4px;
}
.mob-tab-sheet-handle::before {
  content: '';
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.mob-tab-sheet-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.mob-tab-sheet-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.mob-tab-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.mob-tab-sheet-close:hover { background: rgba(255, 255, 255, 0.16); }

.mob-tab-sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Chat overlay specific — keep input pinned to bottom */
#mob-chat-overlay .mob-tab-sheet {
  max-height: 92vh;
}
#mob-chat-overlay .mob-tab-sheet-body {
  display: flex;
  flex-direction: column;
}

@media (max-width: 760px) {
  header,
  .room-header,
  .video-panel,
  .chat-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Room screen: bottom nav visible only when in a room */
  body.room-active #room-screen {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  }

  body.room-active #mobile-panel-nav {
    display: flex;
    flex-direction: column;
  }

  /* On mobile, chat panel is always hidden — accessed via overlay */
  #room-screen .chat-panel {
    display: none;
  }

  /* Legacy panel-chat class kept for backwards compat but not needed */
  #room-screen.panel-chat .main-area > .video-panel {
    display: none;
  }

  .join-card {
    padding: 24px 16px;
    border-radius: 16px;
  }

  .join-grid,
  .directory-filters,
  .discovery-inline-fields {
    grid-template-columns: 1fr;
  }

  .room-mode-toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .room-status-copy,
  .room-meta,
  .controls,
  .room-settings-card,
  .setting-row,
  .section-heading-row,
  .moment-compose,
  .chat-input-area,
  .search-area {
    width: 100%;
    flex-wrap: wrap;
  }

  .controls {
    gap: 8px;
  }

  .ctrl-btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }

  .current-video-title {
    max-width: none;
  }

  .current-video-subtitle {
    max-width: none;
  }

  #sync-indicator {
    margin-left: 0;
  }

  .playlist-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .music-stage {
    padding: 14px;
  }

  .music-stage-shell {
    padding: 12px;
  }

  .music-stage-deck {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .music-stage-cabinet {
    width: min(100%, 260px);
    margin: 0 auto;
  }

  body.mode-music #player-wrapper {
    height: clamp(430px, calc(100svh - 245px), 620px);
    min-height: 430px;
    padding-top: 0;
  }

  body.mode-music .music-stage {
    padding: 10px;
  }

  body.mode-music .music-stage-shell {
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
    border-radius: 20px;
  }

  body.mode-music .music-stage-marquee {
    gap: 9px;
    padding: 9px 11px;
    border-radius: 16px;
  }

  body.mode-music .music-stage-marquee-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  body.mode-music .music-stage-marquee-track span {
    font-size: 0.78rem;
  }

  body.mode-music .music-stage-deck {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
  }

  body.mode-music .music-stage-jukebox {
    min-height: 0;
    flex: 0 0 auto;
  }

  body.mode-music .music-stage-cabinet {
    width: clamp(174px, 54vw, 230px);
    padding: 18px;
    border-radius: 24px 24px 18px 18px;
  }

  body.mode-music .music-stage-leds {
    bottom: 12px;
    gap: 7px;
  }

  body.mode-music .music-stage-leds span {
    width: 8px;
    height: 8px;
  }

  body.mode-music .music-stage-copy {
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  body.mode-music .music-stage-label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  body.mode-music .music-stage-status {
    padding: 5px 9px;
    font-size: 0.62rem;
  }

  body.mode-music .music-stage-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(1.18rem, 5vw, 1.55rem);
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.mode-music .music-stage-meta {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.74rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.mode-music .music-stage-bars {
    height: 26px;
    margin-top: 2px;
  }

  body.mode-music .music-stage-link {
    margin-top: 0;
    font-size: 0.74rem;
  }

  body.mode-music .music-stage-footer {
    font-size: 0.58rem;
    line-height: 1.35;
    text-align: center;
  }

  .draw-tool-buttons,
  .draw-toolbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draw-canvas-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .draw-canvas-shell {
    height: 360px;
  }

  .game-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* On mobile, always show the CTA — no hover */
  .game-card-cta {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

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

  .game-room-badge { align-self: flex-start; }
}

/* ── Phone: 480px ─────────────────────────────────────────── */
@media (max-width: 480px) {
  header {
    padding: 12px 14px;
  }

  .logo { font-size: 1.25rem; }

  .join-card {
    padding: 20px 14px;
  }

  .join-card h2 {
    font-size: 1.6rem;
  }

  .room-mode-toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mode-btn {
    font-size: 0.8rem;
    padding: 10px 10px;
  }

  body.mode-music #player-wrapper {
    height: clamp(405px, calc(100svh - 230px), 560px);
    min-height: 405px;
    border-radius: 16px;
  }

  body.mode-music .music-stage {
    padding: 8px;
  }

  body.mode-music .music-stage-shell {
    padding: 10px;
    gap: 10px;
  }

  body.mode-music .music-stage-marquee {
    padding: 8px 9px;
  }

  body.mode-music .music-stage-cabinet {
    width: clamp(158px, 52vw, 205px);
    padding: 16px;
  }

  body.mode-music .music-stage-title {
    font-size: clamp(1.04rem, 5.4vw, 1.36rem);
  }

  body.mode-music .music-stage-footer {
    display: none;
  }

  .draw-canvas-shell {
    height: 280px;
  }

  .draw-toolbar {
    grid-template-columns: 1fr;
  }

  /* Inside chat overlay: messages fill, input stays pinned */
  #mob-chat-body #chat-messages {
    min-height: 0;
    max-height: none;
    flex: 1;
  }

  #mob-chat-body .chat-picker-panel {
    max-height: 40vh;
  }

  #chat-messages {
    min-height: 160px;
    max-height: 240px;
  }

  .room-id-badge,
  .room-mode-badge,
  .room-control-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .game-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .game-card-icon-wrap { height: 64px; }
  .game-card-icon-big { font-size: 2rem; }
  .game-card-body { padding: 9px 10px 10px; }
  .game-card-title { font-size: 0.84rem; }

  .game-room-title { font-size: 1.25rem; }
  .game-room-hero { padding: 14px 16px; }

  .game-category-strip { gap: 4px; }
  .game-cat-btn { padding: 5px 10px; font-size: 0.7rem; }
}

body[data-landing-mode="video"] {
  --landing-glow: #64d2ff;
  --landing-glow-soft: rgba(100, 210, 255, 0.18);
}

body[data-landing-mode="music"] {
  --landing-glow: #c084fc;
  --landing-glow-soft: rgba(192, 132, 252, 0.2);
}

body[data-landing-mode="clip"] {
  --landing-glow: #fb7185;
  --landing-glow-soft: rgba(251, 113, 133, 0.18);
}

body[data-landing-mode="draw"] {
  --landing-glow: #fbbf24;
  --landing-glow-soft: rgba(251, 191, 36, 0.18);
}

body[data-landing-mode="game"] {
  --landing-glow: #34d399;
  --landing-glow-soft: rgba(52, 211, 153, 0.18);
}

.landing-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(15, 18, 29, 0.84);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.landing-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.landing-brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(135deg, rgba(100, 210, 255, 0.28), rgba(192, 132, 252, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.landing-brand-mark svg {
  width: 28px;
  height: 28px;
  stroke: #f8fafc;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.landing-brand-copy {
  color: #98a3b9;
  font-size: 0.82rem;
}

.landing-desktop-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-nav-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.landing-nav-btn:hover,
.landing-nav-btn.active {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.landing-presence-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#join-screen .join-card {
  max-width: none;
  padding: 28px;
  border-radius: 28px;
  border-color: rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 28%),
    linear-gradient(180deg, rgba(17, 20, 31, 0.96), rgba(12, 14, 23, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.landing-hero-copy,
.landing-hero-preview,
.landing-mode-panel,
.join-form-card,
.landing-directory-section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(16, 18, 29, 0.84);
}

.landing-hero-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.landing-kicker,
.landing-form-eyebrow,
.landing-preview-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--landing-glow, #64d2ff);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hero-copy h1 {
  max-width: 10ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

/* ── Text morph hero heading ─────────────────────────────── */
.hero-morph-heading {
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 0.06em;
}

.hero-morph-prefix {
  display: block;
  color: #e2e8f0;
}

.hero-morph-word {
  display: block;
  position: relative;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.22s ease, filter 0.22s ease;
  will-change: opacity, filter;
}

.hero-morph-word.morph-out {
  opacity: 0;
  filter: blur(10px);
}

.hero-morph-word.morph-in {
  opacity: 1;
  filter: blur(0px);
}

@keyframes morphWordIn {
  from { opacity: 0; filter: blur(12px); transform: translateY(6px); }
  to   { opacity: 1; filter: blur(0px);  transform: translateY(0); }
}

@keyframes morphWordOut {
  from { opacity: 1; filter: blur(0px);  transform: translateY(0); }
  to   { opacity: 0; filter: blur(12px); transform: translateY(-6px); }
}

.landing-hero-copy p {
  margin: 0;
  max-width: 560px;
  color: #9ba7bc;
  font-size: 1rem;
  line-height: 1.6;
}

.landing-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.landing-stat-card {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.landing-stat-card strong {
  display: block;
  margin-bottom: 5px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  color: #f8fafc;
}

.landing-stat-card span {
  color: #94a3b8;
  font-size: 0.8rem;
}

.landing-hero-preview {
  min-height: 360px;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, var(--landing-glow-soft, rgba(100, 210, 255, 0.18)), transparent 30%),
    linear-gradient(180deg, rgba(11, 14, 24, 0.74), rgba(10, 12, 20, 0.94));
}

.landing-preview-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  pointer-events: none;
}

.landing-preview-orbit.orbit-a {
  width: 260px;
  height: 260px;
  top: 26px;
  right: 22px;
}

.landing-preview-orbit.orbit-b {
  width: 340px;
  height: 340px;
  bottom: -120px;
  right: -60px;
}

.landing-preview-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(14, 18, 30, 0.78);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.landing-preview-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--landing-glow, #64d2ff);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 32px var(--landing-glow-soft, rgba(100, 210, 255, 0.18));
}

.landing-preview-icon svg,
.mode-btn-icon svg,
.room-item-icon svg,
#landing-mobile-nav svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-preview-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.landing-preview-copy p {
  margin-top: 8px;
  color: #9ba7bc;
  line-height: 1.55;
}

.landing-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-preview-actions .btn {
  width: auto;
  min-width: 180px;
  flex: 1;
}

.landing-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.65fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.landing-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-mode-panel,
.join-form-card,
.landing-directory-section {
  padding: 22px;
}

.landing-section-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.landing-section-head h3 {
  color: #f8fafc;
  font-size: 1.05rem;
}

.landing-section-copy {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.45;
}

.landing-meta-pill {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.landing-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

.mode-btn {
  --mode-glow: #64d2ff;
  --mode-glow-soft: rgba(100, 210, 255, 0.18);
  min-height: 178px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(10, 12, 20, 0.82);
}

.mode-btn-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbeafe;
}

.mode-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.mode-btn-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.mode-btn-note {
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.45;
}

.mode-btn[data-mode="video"] .mode-btn-icon,
.room-item.mode-video .room-item-icon,
.room-item.mode-video .room-item-live-badge {
  color: #64d2ff;
}

.mode-btn[data-mode="video"] {
  --mode-glow: #64d2ff;
  --mode-glow-soft: rgba(100, 210, 255, 0.18);
}

.mode-btn[data-mode="music"] .mode-btn-icon,
.room-item.mode-music .room-item-icon,
.room-item.mode-music .room-item-live-badge {
  color: #c084fc;
}

.mode-btn[data-mode="music"] {
  --mode-glow: #c084fc;
  --mode-glow-soft: rgba(192, 132, 252, 0.2);
}

.mode-btn[data-mode="clip"] .mode-btn-icon,
.room-item.mode-clip .room-item-icon,
.room-item.mode-clip .room-item-live-badge {
  color: #fb7185;
}

.mode-btn[data-mode="clip"] {
  --mode-glow: #fb7185;
  --mode-glow-soft: rgba(251, 113, 133, 0.18);
}

.mode-btn[data-mode="draw"] .mode-btn-icon,
.room-item.mode-draw .room-item-icon,
.room-item.mode-draw .room-item-live-badge {
  color: #fbbf24;
}

.mode-btn[data-mode="draw"] {
  --mode-glow: #fbbf24;
  --mode-glow-soft: rgba(251, 191, 36, 0.18);
}

.mode-btn[data-mode="game"] .mode-btn-icon,
.room-item.mode-game .room-item-icon,
.room-item.mode-game .room-item-live-badge {
  color: #34d399;
}

.mode-btn[data-mode="game"] {
  --mode-glow: #34d399;
  --mode-glow-soft: rgba(52, 211, 153, 0.18);
}

.mode-btn:hover,
.mode-btn.active {
  transform: translateY(-2px);
  border-color: var(--mode-glow);
  background:
    radial-gradient(circle at top left, var(--mode-glow-soft), transparent 44%),
    rgba(15, 18, 30, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.join-form-card h2 {
  margin: 10px 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  line-height: 1.05;
}

.landing-form-mode-chip {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--landing-glow-soft, rgba(100, 210, 255, 0.18));
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 700;
}

.landing-form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-form-hints {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.45;
}

.landing-directory-section {
  margin-top: 22px;
}

.directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 12px;
  margin-bottom: 18px;
}

.directory-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#active-rooms-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.room-item {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(11, 14, 24, 0.9);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.room-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.room-item.mode-video:hover { border-color: rgba(100, 210, 255, 0.4); }
.room-item.mode-music:hover { border-color: rgba(192, 132, 252, 0.4); }
.room-item.mode-clip:hover { border-color: rgba(251, 113, 133, 0.4); }
.room-item.mode-draw:hover { border-color: rgba(251, 191, 36, 0.4); }
.room-item.mode-game:hover { border-color: rgba(52, 211, 153, 0.4); }

.room-item-media {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 40%),
    #131828;
}

.room-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-item-media-overlay,
.room-item-media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.room-item-media-overlay {
  background: linear-gradient(180deg, transparent, rgba(9, 11, 18, 0.8));
}

.room-item-media-fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(145deg, rgba(23, 28, 45, 0.9), rgba(11, 14, 24, 0.96));
}

.room-item-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.room-item-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.room-item-head {
  align-items: flex-start;
  justify-content: space-between;
}

.room-item-head-copy {
  min-width: 0;
}

.room-item-mode {
  width: fit-content;
  margin-bottom: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.room-item-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.18rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  white-space: normal;
}

.room-item-subtitle {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 0.84rem;
}

.room-item-meta {
  margin-top: 12px;
}

.room-item-pill {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.room-item-live-badge {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

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

.room-item-avatars {
  display: flex;
  align-items: center;
}

.room-item-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-left: -8px;
  border-radius: 50%;
  border: 2px solid rgba(11, 14, 24, 0.95);
  background: linear-gradient(135deg, rgba(100, 210, 255, 0.8), rgba(192, 132, 252, 0.85));
  color: #06111b;
  font-size: 0.72rem;
  font-weight: 800;
}

.room-item-avatar:first-child {
  margin-left: 0;
}

.room-item-avatar.ghost {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.55), rgba(71, 85, 105, 0.9));
}

.room-item-users {
  padding: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.8rem;
}

.room-item-cta {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.room-item-cta:hover {
  background: rgba(255, 255, 255, 0.11);
}

#landing-mobile-nav {
  display: none;
}

@media (max-width: 1180px) {
  .landing-hero,
  #active-rooms-list {
    grid-template-columns: 1fr;
  }

  /* Stack main grid but keep pick-your-style card from ballooning */
  .landing-main-grid {
    grid-template-columns: 1fr;
  }

  /* Mode cards: cap at desktop-equivalent width so they don't over-stretch */
  .landing-mode-panel {
    max-width: 860px;
  }

  /* Keep mode grid at 3 columns until it gets too tight */
  .landing-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mode-btn {
    min-height: 178px;
    padding: 18px 16px;
  }

  .mode-btn-icon {
    width: 66px;
    height: 66px;
  }

  /* Forms row: side-by-side up to 760px */
  .landing-room-forms-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 860px;
  }

  /* Meet panel: visible as a regular card below forms */
  .landing-meet-panel {
    display: none;
  }

  .landing-hero-copy h1 {
    max-width: 14ch;
  }

  .landing-desktop-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  #join-screen {
    padding: 14px 14px calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .landing-shell {
    gap: 14px;
  }

  .landing-topbar {
    padding: 14px;
    border-radius: 20px;
  }

  .landing-brand-copy,
  .landing-presence-pill {
    display: none;
  }

  /* Mobile: swap verbose stat row for icon strip */
  .landing-stat-row-desktop {
    display: none;
  }

  .landing-mob-feature-strip {
    display: flex;
    gap: 6px;
    margin-top: 16px;
  }

  /* Tighten hero copy on mobile */
  #join-copy {
    font-size: 0.92rem;
    color: var(--muted);
  }

  #join-screen .join-card {
    padding: 16px;
    border-radius: 24px;
  }

  .landing-hero-copy,
  .landing-hero-preview,
  .landing-mode-panel,
  .join-form-card,
  .landing-directory-section {
    padding: 18px;
    border-radius: 22px;
  }

  .landing-hero-copy h1 {
    max-width: none;
    font-size: 2.4rem;
  }

  .landing-stat-row {
    grid-template-columns: 1fr;
  }

  /* Show mobile meet section, stack forms */
  .landing-meet-mobile-section {
    display: block;
  }

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

  .landing-mode-panel {
    max-width: none;
  }

  .landing-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #mode-game-btn {
    grid-column: auto;
  }

  .mode-btn {
    min-height: 78px;
    padding: 12px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
      rgba(10, 12, 20, 0.82);
  }

  .mode-btn-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .mode-btn-icon svg {
    width: 22px;
    height: 22px;
  }

  .mode-btn-copy {
    min-width: 0;
    gap: 2px;
  }

  .mode-btn-title {
    font-size: 0.9rem;
  }

  .mode-btn-note {
    display: none;
    color: #8d99ad;
    font-size: 0.68rem;
    line-height: 1.25;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.22s ease;
  }

  .mode-btn:active .mode-btn-note,
  .mode-btn:hover .mode-btn-note,
  .mode-btn.active .mode-btn-note,
  .mode-btn.mob-auto-active .mode-btn-note {
    display: -webkit-box;
    max-height: 2.5em;
    opacity: 1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mode-btn:hover,
  .mode-btn.active {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 0 0 1px color-mix(in srgb, var(--mode-glow) 28%, transparent);
  }

  .directory-toolbar {
    grid-template-columns: 1fr;
  }

  .room-item {
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 12px;
    gap: 12px;
  }

  .room-item-media {
    min-height: 106px;
    border-radius: 18px;
  }

  .room-item-name {
    font-size: 1rem;
  }

  .room-item-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-item-cta {
    width: 100%;
  }

  #landing-mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(22, 25, 42, 0.97) 0%, rgba(10, 12, 22, 0.99) 100%);
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.5),
      0 1px 0 rgba(255, 255, 255, 0.05) inset;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
  }

  .landing-mobile-tab {
    position: relative;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(148, 163, 184, 0.7);
    font: inherit;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .landing-mobile-tab:active {
    transform: scale(0.93);
  }

  .landing-mobile-tab svg {
    width: 21px;
    height: 21px;
    transition: stroke 0.18s ease;
  }

  .landing-mobile-tab.active {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.07);
  }

  .landing-mobile-tab.active svg {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
  }

  /* Colored accent dot under active tab */
  .landing-mobile-tab.active::after {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #818cf8;
    box-shadow: 0 0 6px #818cf8;
  }

  /* Meet tab — pink accent */
  .landing-mobile-tab[data-nav="meet"].active {
    color: #f9a8d4;
  }
  .landing-mobile-tab[data-nav="meet"].active::after {
    background: #f472b6;
    box-shadow: 0 0 6px #f472b6;
  }

  /* Create tab — special pill style */
  .landing-mobile-tab[data-nav="create"] {
    color: rgba(129, 140, 248, 0.85);
  }

  .landing-mobile-tab[data-nav="create"] svg {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.22) 100%);
    border-radius: 10px;
    padding: 4px;
    box-sizing: content-box;
    border: 1px solid rgba(129, 140, 248, 0.25);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  }

  .landing-mobile-tab[data-nav="create"].active,
  .landing-mobile-tab[data-nav="create"]:hover {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
  }

  .landing-mobile-tab[data-nav="create"].active svg {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.38) 0%, rgba(139, 92, 246, 0.38) 100%);
    border-color: rgba(129, 140, 248, 0.55);
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.35);
  }

  .landing-mobile-tab[data-nav="create"].active::after {
    background: #818cf8;
    box-shadow: 0 0 8px #818cf8;
    width: 5px;
    height: 5px;
  }
}

@media (max-width: 480px) {
  .landing-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .landing-brand-title {
    font-size: 1.05rem;
  }

  .landing-preview-card {
    padding: 18px;
  }

  .landing-preview-copy h2 {
    font-size: 1.6rem;
  }

  .landing-preview-actions {
    flex-direction: column;
  }

  .landing-preview-actions .btn {
    width: 100%;
  }

  .mode-btn {
    min-height: 70px;
    padding: 10px;
    gap: 8px;
  }

  .mode-btn-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 12px;
  }

  .mode-btn-icon svg {
    width: 19px;
    height: 19px;
  }

  .mode-btn-title {
    font-size: 0.82rem;
  }

  .mode-btn-note {
    font-size: 0.63rem;
    -webkit-line-clamp: 1;
  }

  .room-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .room-item-media {
    min-height: 92px;
  }

  .room-item-users {
    font-size: 0.75rem;
  }
}

/* ── Sound Mute Toggle ── */

.sound-mute-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sound-mute-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--accent2);
  transform: scale(1.08);
}

.sound-mute-btn svg {
  display: block;
}

/* ── Room Gifts + Lottie Delivery ── */

.pm-gift-trigger {
  border-color: rgba(168, 85, 247, 0.38);
  color: #e9d5ff;
}

.pm-gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.64);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.pm-gift-card {
  width: min(440px, 94vw);
  max-height: min(720px, 92vh);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #11111b;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.56);
}

.pm-gift-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.pm-gift-kicker {
  margin-bottom: 4px;
  color: #a7f3d0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pm-gift-head h3 {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  line-height: 1.15;
}

.pm-gift-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
}

.pm-gift-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.pm-gift-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.pm-gift-tile.active {
  border-color: rgba(168, 85, 247, 0.7);
  background: rgba(124, 58, 237, 0.16);
}

.pm-gift-tile-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.pm-gift-tile-name {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.pm-gift-tile-cost {
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1;
}

.pm-gift-preview {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 152px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 34%, rgba(168, 85, 247, 0.16), transparent 42%),
    rgba(0, 0, 0, 0.2);
}

.pm-gift-preview-icon {
  font-size: 3rem;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.pm-gift-message-label {
  margin-top: 2px;
}

.pm-gift-card input[type="text"] {
  margin-bottom: 12px;
}

.pm-gift-feedback {
  margin-bottom: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-size: 0.8rem;
}

.pm-gift-send {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #7c3aed);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 800;
}

.pm-gift-send:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

/* Body-level layer — for direct gift notifications outside the room */
#pm-drop-animation-layer {
  position: fixed;
  inset: 0;
  z-index: 9400;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: max(72px, env(safe-area-inset-top));
}

/* Room-scoped layer — lives inside #room-screen, toasts appear inside the room */
#pm-room-gift-layer {
  position: absolute;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 70px;
}

#room-screen { position: relative; }

/* ── Room Gift Toast ── */
.pm-room-gift-toast {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  width: min(480px, calc(100vw - 24px));
  min-height: 110px;
  padding: 12px 18px 12px 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(12, 10, 22, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
  overflow: hidden;
  animation: roomGiftIn 0.46s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.pm-room-gift-toast::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.12;
  pointer-events: none;
}

.pm-room-gift-toast.leaving {
  animation: roomGiftOut 0.48s ease both;
}

/* ── Emoji animation cell ── */
.pm-room-gift-anim {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.pm-room-gift-anim > span {
  font-size: 3.4rem;
  line-height: 1;
  display: block;
  animation: roomGiftFallbackPulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.4));
}

/* ── Copy area ── */
.pm-room-gift-copy {
  min-width: 0;
  padding-left: 4px;
}

.pm-room-gift-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
  color: #fff;
  margin-bottom: 4px;
}

.pm-room-gift-copy strong {
  display: block;
  color: #f1f5f9;
  font-family: var(--font-heading, inherit);
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.pm-room-gift-copy span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-room-gift-msg {
  display: block;
  margin-top: 5px;
  font-size: 0.74rem;
  font-style: italic;
  color: rgba(226, 232, 240, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Tone variants ── */
.pm-room-gift-toast.tone-bright {
  border-color: rgba(250, 204, 21, 0.35);
}
.pm-room-gift-toast.tone-bright::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(250,204,21,0.7) 0%, transparent 65%);
}
.pm-room-gift-toast.tone-bright .pm-room-gift-anim {
  background: rgba(250,204,21,0.08);
}

.pm-room-gift-toast.tone-gold {
  border-color: rgba(251, 191, 36, 0.4);
}
.pm-room-gift-toast.tone-gold::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(251,191,36,0.7) 0%, transparent 65%);
}
.pm-room-gift-toast.tone-gold .pm-room-gift-anim {
  background: rgba(251,191,36,0.08);
}

.pm-room-gift-toast.tone-heart {
  border-color: rgba(244, 114, 182, 0.38);
}
.pm-room-gift-toast.tone-heart::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(244,114,182,0.7) 0%, transparent 65%);
}
.pm-room-gift-toast.tone-heart .pm-room-gift-anim {
  background: rgba(244,114,182,0.08);
}

.pm-room-gift-toast.tone-vip {
  border-color: rgba(167, 139, 250, 0.42);
}
.pm-room-gift-toast.tone-vip::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(167,139,250,0.7) 0%, transparent 65%);
}
.pm-room-gift-toast.tone-vip .pm-room-gift-anim {
  background: rgba(167,139,250,0.1);
}

@keyframes roomGiftIn {
  from { opacity: 0; transform: translateY(-28px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes roomGiftOut {
  to { opacity: 0; transform: translateY(-16px) scale(0.95); }
}

@keyframes roomGiftFallbackPulse {
  0%, 100% { transform: scale(1) rotate(-5deg); }
  50%       { transform: scale(1.15) rotate(6deg); }
}

/* ── Gift CSS Burst Animation ── */

/* Main emoji cell when playing CSS burst */
.pm-room-gift-anim.pm-gift-burst {
  position: relative;
  overflow: visible;
}

/* The big bouncing emoji */
.pm-gift-burst-icon {
  font-size: 3.2rem;
  line-height: 1;
  display: block;
  animation: giftIconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             giftIconFloat 2.4s ease-in-out 0.55s infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  position: relative;
  z-index: 2;
}

/* Expanding ring pulse behind emoji */
.pm-gift-burst-ring {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: giftRingPulse 1.8s ease-out 0.1s infinite;
  pointer-events: none;
}

/* Floating particles */
.pm-gift-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  animation: giftParticleFloat var(--dur, 1.4s) ease-out var(--delay, 0s) both;
  transform-origin: center;
}

/* Shine streak */
.pm-gift-burst-shine {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 28px;
  margin: -14px 0 0 -3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.7);
  opacity: 0;
  animation: giftShine 0.6s ease-out var(--delay, 0s) both;
  transform-origin: bottom center;
}

/* Lottie overlay center card burst */
.pm-gift-lottie-card.pm-gift-burst {
  position: relative;
  overflow: visible;
}

.pm-gift-lottie-card .pm-gift-burst-icon {
  font-size: 5rem;
  margin-bottom: 8px;
}

@keyframes giftIconPop {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

@keyframes giftIconFloat {
  0%, 100% { transform: scale(1) translateY(0) rotate(-2deg); }
  50%       { transform: scale(1.08) translateY(-5px) rotate(3deg); }
}

@keyframes giftRingPulse {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0.7; width: 20px; height: 20px; }
  100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0;   width: 20px; height: 20px; }
}

@keyframes giftParticleFloat {
  0%   { transform: translate(var(--tx0,0), var(--ty0,0)) scale(0) rotate(0deg);   opacity: 1; }
  30%  { opacity: 1; }
  100% { transform: translate(var(--tx,0),  var(--ty,0))  scale(1) rotate(var(--rot,180deg)); opacity: 0; }
}

@keyframes giftShine {
  0%   { opacity: 0.9; transform: rotate(var(--angle, 45deg)) scaleY(0); }
  50%  { opacity: 0.6; transform: rotate(var(--angle, 45deg)) scaleY(1.2); }
  100% { opacity: 0;   transform: rotate(var(--angle, 45deg)) scaleY(1) translateY(-40px); }
}

@media (max-width: 520px) {
  .pm-gift-tile-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pm-room-gift-toast {
    grid-template-columns: 80px minmax(0, 1fr);
    min-height: 90px;
    padding: 10px 14px 10px 6px;
    border-radius: 18px;
  }

  .pm-room-gift-anim {
    width: 76px;
    height: 76px;
    border-radius: 14px;
  }

  .pm-room-gift-anim > span { font-size: 2.6rem; }
  .pm-room-gift-copy strong { font-size: 0.9rem; }
  .pm-room-gift-copy span   { font-size: 0.74rem; }
}

/* ── Confetti Canvas ── */

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99999;
}

/* ── Room Type Badge ── */

.room-type-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.room-type-temporary {
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  border: 1px solid rgba(250, 204, 21, 0.22);
}

.room-type-advanced {
  background: rgba(124, 58, 237, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.32);
}

/* ── Create Room Card ── */

@keyframes createCardPopOverlay {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

.create-room-card {
  position: relative;
  border-color: rgba(100, 210, 255, 0.15) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(100, 210, 255, 0.06), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(124, 58, 237, 0.06), transparent 50%),
    rgba(16, 18, 29, 0.84) !important;
}

.create-room-card--highlight::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(129, 140, 248, 0.55);
  pointer-events: none;
  animation: createCardPopOverlay 1.4s ease-out forwards;
}

.create-room-eyebrow {
  background: linear-gradient(135deg, rgba(100, 210, 255, 0.15), rgba(124, 58, 237, 0.12)) !important;
  color: #bae6fd !important;
}

.create-room-cta-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.create-room-cta-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.create-room-cta-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.create-room-cta-btn:hover::before {
  opacity: 1;
}

.create-room-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.create-room-cta-btn:active {
  transform: translateY(0);
  transition-duration: 60ms;
}

/* Temporary Room CTA */
.create-room-cta-temp {
  border-color: rgba(52, 211, 153, 0.2);
}

.create-room-cta-temp::before {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(34, 197, 94, 0.04));
}

.create-room-cta-temp:hover {
  border-color: rgba(52, 211, 153, 0.45);
}

/* Advanced Room CTA */
.create-room-cta-adv {
  border-color: rgba(124, 58, 237, 0.2);
}

.create-room-cta-adv::before {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.04));
}

.create-room-cta-adv:hover {
  border-color: rgba(124, 58, 237, 0.45);
}

/* Locked (not enough sparks / not signed in) */
.create-room-cta-btn.create-room-cta-locked {
  opacity: 0.58;
  cursor: not-allowed;
}

.create-room-cta-btn.create-room-cta-locked:hover {
  transform: none;
  box-shadow: none;
}

.create-room-cta-btn.create-room-cta-locked::before {
  display: none;
}

/* Loading state */
.create-room-cta-btn.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

.create-room-cta-btn.is-loading .create-room-cta-title::after {
  content: "Creating…";
  margin-left: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

/* Icon */
.create-room-cta-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  font-size: 1.35rem;
}

.create-room-cta-temp .create-room-cta-icon {
  background: rgba(52, 211, 153, 0.12);
}

.create-room-cta-adv .create-room-cta-icon {
  background: rgba(124, 58, 237, 0.14);
}

/* Copy */
.create-room-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.create-room-cta-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.create-room-cta-note {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Spark Badge */
.create-room-cta-spark-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.create-room-cta-locked .create-room-cta-spark-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.2);
}

.advanced-room-feedback,
.room-convert-feedback {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  margin-top: 4px;
}

.advanced-room-feedback.success,
.room-convert-feedback.success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.advanced-room-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.18);
}

@media (max-width: 520px) {
  .create-room-cta-btn {
    min-height: 62px;
    padding: 12px;
    gap: 10px;
  }

  .create-room-cta-icon {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .create-room-cta-spark-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.66rem;
    padding: 3px 7px;
  }
}

/* ── Game Result Overlay ────────────────────────────────────── */
#game-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.38s ease;
}

#game-result-overlay.is-visible {
  pointer-events: auto;
  opacity: 1;
}

.gro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.gro-card {
  position: relative;
  z-index: 1;
  width: min(480px, 92vw);
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  transform: translateY(32px) scale(0.94);
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

#game-result-overlay.is-visible .gro-card {
  transform: translateY(0) scale(1);
}

/* Win variant */
.gro-card.is-win {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(251, 191, 36, 0.32) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(34, 197, 94, 0.18) 0%, transparent 50%),
    linear-gradient(160deg, #0f1f10 0%, #0a1a0d 60%, #071510 100%);
  border: 1px solid rgba(251, 191, 36, 0.36);
}

/* Lose variant */
.gro-card.is-lose {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(239, 68, 68, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(99, 102, 241, 0.14) 0%, transparent 50%),
    linear-gradient(160deg, #1a0a0d 0%, #14070a 60%, #0f0812 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Draw variant */
.gro-card.is-draw {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(148, 163, 184, 0.22) 0%, transparent 50%),
    linear-gradient(160deg, #0f1520 0%, #0a0f18 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

/* Top accent bar */
.gro-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 28px 28px 0 0;
}

.gro-card.is-win::before {
  background: linear-gradient(90deg, transparent, #fbbf24 30%, #22c55e 70%, transparent);
}

.gro-card.is-lose::before {
  background: linear-gradient(90deg, transparent, #ef4444 35%, #ec4899 65%, transparent);
}

.gro-card.is-draw::before {
  background: linear-gradient(90deg, transparent, #94a3b8 50%, transparent);
}

.gro-inner {
  padding: 36px 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.gro-emblem {
  font-size: 3.8rem;
  line-height: 1;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.6));
  animation: gro-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.15s;
}

@keyframes gro-pop {
  from { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);     opacity: 1; }
}

.gro-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
}

.gro-card.is-win  .gro-kicker { color: rgba(251, 191, 36, 0.82); }
.gro-card.is-lose .gro-kicker { color: rgba(239, 68, 68, 0.78); }
.gro-card.is-draw .gro-kicker { color: rgba(148, 163, 184, 0.72); }

.gro-headline {
  font-family: "Oswald", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.gro-card.is-win  .gro-headline {
  background: linear-gradient(135deg, #fff7ed 0%, #fbbf24 45%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gro-card.is-lose .gro-headline {
  background: linear-gradient(135deg, #fecdd3 0%, #ef4444 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gro-card.is-draw .gro-headline {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gro-sub {
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.5;
  max-width: 340px;
  margin-top: 2px;
}

.gro-game-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.gro-card.is-win  .gro-game-label { background: rgba(251, 191, 36, 0.12); color: rgba(251, 191, 36, 0.9); border: 1px solid rgba(251, 191, 36, 0.2); }
.gro-card.is-lose .gro-game-label { background: rgba(239, 68, 68, 0.10); color: rgba(248, 113, 113, 0.9); border: 1px solid rgba(239, 68, 68, 0.18); }
.gro-card.is-draw .gro-game-label { background: rgba(148, 163, 184, 0.1); color: rgba(203, 213, 225, 0.82); border: 1px solid rgba(148, 163, 184, 0.16); }

.gro-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
  max-width: 320px;
}

/* Base button */
.gro-btn {
  width: 100%;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
  text-align: center;
}

.gro-btn:not(:disabled):hover { transform: translateY(-2px); }
.gro-btn:not(:disabled):active { transform: translateY(0); transition-duration: 60ms; }
.gro-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.4); outline-offset: 3px; }
.gro-btn:disabled { opacity: 0.38; cursor: not-allowed; }

/* Primary — Play Again (color inherits from card variant) */
.gro-card.is-win  .gro-btn-primary { background: linear-gradient(135deg, #fbbf24, #22c55e); color: #0a1a09; box-shadow: 0 8px 24px -8px rgba(251, 191, 36, 0.65); }
.gro-card.is-lose .gro-btn-primary { background: linear-gradient(135deg, #ef4444, #7c3aed); color: #fff;    box-shadow: 0 8px 24px -8px rgba(239, 68, 68, 0.55); }
.gro-card.is-draw .gro-btn-primary { background: linear-gradient(135deg, #64748b, #94a3b8);  color: #f8fafc; box-shadow: 0 8px 24px -8px rgba(100, 116, 139, 0.4); }

/* Secondary — Other Game */
.gro-btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 232, 240, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.gro-btn-secondary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Exit / End Room — always muted red */
.gro-btn-exit {
  background: rgba(239, 68, 68, 0.1);
  color: rgba(252, 165, 165, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.22);
}
.gro-btn-exit:not(:disabled):hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.38);
}

/* Waiting state for guests */
.gro-waiting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2px;
}

.gro-waiting-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(226, 232, 240, 0.7);
  animation: gro-spin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

.gro-waiting-copy {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.68);
  line-height: 1.4;
}

/* Shimmer sweep on card */
.gro-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── End Game Result Overlay ─────────────────────────────────── */

.advanced-room-feedback.error,
.room-convert-feedback.error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

/* ══════════════════════════════════════════════════════════════
   HOW TO PLAY — Visual Rich Overlay
   ══════════════════════════════════════════════════════════════ */

#how-to-play-modal {
  --htp-accent: #a78bfa;
  --htp-bg: linear-gradient(135deg,#1e1b2e,#0d0b1a);
}

.htp-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: htpFadeIn 0.2s ease both;
}

@keyframes htpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.htp-card {
  width: 100%;
  max-width: 680px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: htpPop 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.28) both;
  background: #0d0d14;
  flex-shrink: 0;
}

@keyframes htpPop {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.htp-header {
  position: relative;
  padding: 28px 28px 24px;
  background: var(--htp-bg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.htp-header-glow {
  position: absolute;
  width: 340px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--htp-accent) 0%, transparent 70%);
  opacity: 0.12;
  top: -80px;
  left: -60px;
  pointer-events: none;
  animation: htpGlowPulse 3.5s ease-in-out infinite alternate;
}

@keyframes htpGlowPulse {
  0%   { opacity: 0.10; transform: scale(1); }
  100% { opacity: 0.18; transform: scale(1.08); }
}

.htp-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.htp-header-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 16px var(--htp-accent));
  animation: htpIconFloat 4s ease-in-out infinite;
}

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

.htp-header-copy { min-width: 0; }

.htp-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.htp-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--htp-accent);
  opacity: 0.8;
}

.htp-close-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  position: relative;
  line-height: 1;
  padding: 0;
  margin-top: 2px;
}

.htp-close-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  transform: scale(1.1) rotate(8deg);
}

.htp-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
  background: #0d0d14;
}

.htp-body::-webkit-scrollbar { width: 5px; }
.htp-body::-webkit-scrollbar-track { background: transparent; }
.htp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }

.htp-objective {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  position: relative;
  overflow: hidden;
}

.htp-objective::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--htp-accent);
  border-radius: 3px;
  opacity: 0.7;
}

.htp-objective-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 1px; }

.htp-objective-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--htp-accent);
  margin-bottom: 5px;
  opacity: 0.85;
}

.htp-objective-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
  font-weight: 500;
}

.htp-section { display: flex; flex-direction: column; gap: 12px; }

.htp-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--htp-accent);
  opacity: 0.7;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.htp-steps { display: flex; flex-direction: column; gap: 10px; }

.htp-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.htp-step:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.10); }

.htp-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--htp-accent);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  font-family: "Space Grotesk", sans-serif;
}

.htp-step-body { display: flex; align-items: flex-start; gap: 12px; flex: 1; }
.htp-step-icon { font-size: 1.35rem; flex-shrink: 0; line-height: 1.3; }

.htp-step-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.htp-step-text { font-size: 0.8rem; color: rgba(255,255,255,0.55); line-height: 1.55; }

.htp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.htp-chip {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background 0.15s ease;
}

.htp-chip:hover { background: rgba(255,255,255,0.06); }

.htp-chip-label { font-size: 0.72rem; font-weight: 800; color: var(--htp-accent); letter-spacing: 0.04em; opacity: 0.9; }
.htp-chip-text { font-size: 0.76rem; color: rgba(255,255,255,0.52); line-height: 1.5; }

.htp-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.htp-tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.022);
  border: 1px solid rgba(255,255,255,0.04);
}

.htp-tips li::before {
  content: "\2736";
  color: var(--htp-accent);
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.75;
}

.htp-fallback { font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin: 0; }

@media (max-width: 600px) {
  .htp-card { border-radius: 22px; }
  .htp-header { padding: 20px 18px; }
  .htp-body { padding: 20px 18px; max-height: 72vh; }
  .htp-chips { grid-template-columns: 1fr; }
  .htp-header-icon { font-size: 2.4rem; }
  .htp-title { font-size: 1.35rem; }
}

/* ══════════════════════════════════════════════════════════════
   PERMANENT ROOM PANEL
   ══════════════════════════════════════════════════════════════ */

#perm-room-panel {
  background: rgba(15,23,42,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── Header ── */
.perm-room-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.perm-room-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.perm-room-identity {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.perm-room-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perm-room-slug {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  font-family: monospace;
}

/* ── Level Badge ── */
.perm-room-level-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--level-color, #6b7280);
  border: 1.5px solid currentColor;
  background: color-mix(in srgb, var(--level-color, #6b7280) 14%, transparent);
  white-space: nowrap;
}

/* ── Stats Row ── */
.perm-room-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.perm-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 6px 4px;
}

.perm-stat-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
}

.perm-stat-lbl {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

/* ── XP Bar ── */
.perm-room-xp-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-bottom: 4px;
  overflow: hidden;
}

.perm-room-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.perm-room-xp-label {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.38);
  text-align: right;
  margin-bottom: 10px;
}

/* ── Action Buttons ── */
.perm-room-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.perm-follow-btn {
  flex: 1;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(99,102,241,0.6);
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-follow-btn:hover {
  background: rgba(99,102,241,0.24);
  border-color: rgba(99,102,241,0.9);
}

.perm-follow-btn.following {
  background: rgba(99,102,241,0.22);
  border-color: #6366f1;
  color: #c7d2fe;
}

.perm-announce-btn {
  flex: 1;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.08);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-announce-btn:hover {
  background: rgba(251,191,36,0.18);
}

/* ── Section Label ── */
.perm-room-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}

/* ── Announcements ── */
.perm-room-announcements {
  margin-bottom: 12px;
}

.perm-room-ann {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  margin-bottom: 5px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.4;
}

.perm-room-ann.pinned {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
}

.perm-ann-pin { flex-shrink: 0; }

/* ── Poll ── */
.perm-room-poll {
  margin-bottom: 12px;
}

.perm-poll-question {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
  line-height: 1.4;
}

.perm-poll-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 6px;
}

.perm-poll-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  overflow: hidden;
}

.perm-poll-option:hover:not(:disabled) {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.1);
}

.perm-poll-option.voted {
  border-color: rgba(99,102,241,0.6);
  background: rgba(99,102,241,0.15);
  color: #c7d2fe;
}

.perm-poll-option:disabled { cursor: default; }

.perm-poll-option-bar {
  position: absolute;
  inset: 0;
  background: rgba(99,102,241,0.12);
  border-radius: 7px;
  pointer-events: none;
  transition: width 0.4s ease;
}

.perm-poll-option-text { position: relative; z-index: 1; flex: 1; }
.perm-poll-option-pct  { position: relative; z-index: 1; font-size: 0.72rem; color: rgba(255,255,255,0.5); min-width: 32px; text-align: right; }
.perm-poll-voted-mark  { position: relative; z-index: 1; color: #6366f1; font-size: 0.8rem; }

.perm-poll-meta {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}

.perm-poll-close-btn,
.perm-poll-create-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-poll-close-btn:hover,
.perm-poll-create-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}

.perm-poll-add-opt-btn {
  width: 100%;
  margin-top: 4px;
  padding: 5px;
  border-radius: 6px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 0.75rem;
  cursor: pointer;
}

.perm-poll-add-opt-btn:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.7);
}

.perm-poll-none {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin: 4px 0 8px;
}

/* ── Forms ── */
.perm-room-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.perm-room-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f1f5f9;
  font-size: 0.8rem;
  margin-bottom: 6px;
  outline: none;
  resize: vertical;
}

.perm-room-input:focus {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.08);
}

.perm-room-input-suffix {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

.perm-room-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
  cursor: pointer;
}

.perm-room-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.perm-room-submit-btn {
  flex: 1;
  padding: 7px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.perm-room-submit-btn:hover { opacity: 0.88; }

.perm-room-cancel-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.perm-room-cancel-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

/* ── Ranked Rooms Directory ── */
.perm-rooms-directory {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perm-room-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.perm-room-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.perm-room-card-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  flex-shrink: 0;
}

.perm-room-card-info { flex: 1; min-width: 0; }

.perm-room-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perm-room-card-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.perm-room-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.perm-room-card-level {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid currentColor;
}

.perm-room-card-followers {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
}

/* ── Room Ranking Banner ── */
.perm-room-ranking-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 12px;
  margin-bottom: 12px;
}

.perm-room-rank-pos {
  font-size: 1.1rem;
  font-weight: 900;
  color: #a78bfa;
  min-width: 32px;
  text-align: center;
}

.perm-room-rank-info { flex: 1; }
.perm-room-rank-label { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-bottom: 1px; }
.perm-room-rank-value { font-size: 0.85rem; font-weight: 700; color: #f1f5f9; }

/* ── Entrance animation toast ── */
.entrance-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 25, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  pointer-events: none;
  z-index: 9999;
  animation: entrance-toast-in 2.2s ease forwards;
}
@keyframes entrance-toast-in {
  0%   { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}
/* tint per animation type */
/* Tint only — do NOT override animation, which is set by .entrance-toast */
.entrance-toast.entrance-sparks { border-color: rgba(250,204,21,0.4); color: #fde68a; animation: entrance-toast-in 2.2s ease forwards; }
.entrance-toast.entrance-flame  { border-color: rgba(249,115,22,0.4); color: #fdba74; animation: entrance-toast-in 2.2s ease forwards; }
.entrance-toast.entrance-galaxy { border-color: rgba(168,85,247,0.4); color: #c084fc; animation: entrance-toast-in 2.2s ease forwards; }

/* ── Landing: room actions row (Join + Create side by side under Pick Your Style) ── */
.landing-room-actions-row {
  margin-top: 20px;
}

.landing-room-forms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Landing: Make New Friends panel ── */
.landing-meet-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meet-friends-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.meet-friends-eyebrow {
  color: #f472b6;
  background: rgba(244, 114, 182, 0.1);
  border-color: rgba(244, 114, 182, 0.22);
}

.meet-friends-sub {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0 0 14px;
  line-height: 1.45;
}

#meet-friends-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.meet-friends-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: 0.84rem;
  padding: 10px 0;
}

.meet-friends-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(244,114,182,0.3);
  border-top-color: #f472b6;
  border-radius: 50%;
  animation: meet-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes meet-spin {
  to { transform: rotate(360deg); }
}

.meet-friends-empty {
  color: #475569;
  font-size: 0.84rem;
  padding: 10px 0;
}

.meet-friends-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.meet-friends-user:hover {
  background: rgba(244,114,182,0.05);
  border-color: rgba(244,114,182,0.15);
}

.meet-friends-user-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.meet-friends-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.1);
}

.meet-friends-avatar-init {
  background: linear-gradient(135deg, rgba(244,114,182,0.25), rgba(167,139,250,0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

.meet-friends-user-info {
  min-width: 0;
}

.meet-friends-username {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.meet-friends-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 0.73rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meet-friends-mode-dot {
  font-size: 0.73rem;
  flex-shrink: 0;
}

.meet-friends-room-label {
  color: #94a3b8;
  flex-shrink: 0;
}

.meet-friends-room-name {
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.meet-friends-follow-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid rgba(244,114,182,0.35);
  background: rgba(244,114,182,0.08);
  color: #f9a8d4;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.meet-friends-follow-btn:hover {
  background: rgba(244,114,182,0.18);
  border-color: rgba(244,114,182,0.6);
  color: #fce7f3;
}

.meet-friends-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
  transition: background 0.15s ease, color 0.15s ease;
  align-self: flex-start;
}

.meet-friends-refresh-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
}

/* Mobile meet section — hidden on desktop, shown on mobile */
.landing-meet-mobile-section {
  display: none;
}

#meet-friends-list-mobile {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meet-refresh-pill {
  cursor: pointer;
  background: rgba(244,114,182,0.1);
  color: #f9a8d4;
  border-color: rgba(244,114,182,0.22);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  transition: background 0.15s ease;
}
.meet-refresh-pill:hover {
  background: rgba(244,114,182,0.18);
}

/* ── Landing mobile card polish ─────────────────────────────── */
@media (max-width: 760px) {
  .landing-room-actions-row {
    margin-top: 14px;
  }

  .landing-room-forms-grid {
    gap: 12px;
  }

  .join-form-card,
  .landing-meet-mobile-section,
  #active-rooms-container {
    border-radius: 20px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(12, 15, 25, 0.9);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  }

  .join-form-card h2 {
    margin: 8px 0 10px;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
  }

  .landing-form-eyebrow {
    padding: 5px 9px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .landing-form-mode-chip {
    margin-bottom: 12px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }

  .join-form-card label {
    margin-bottom: 5px;
    font-size: 0.72rem;
  }

  .join-form-card input[type="text"],
  .directory-toolbar input,
  .directory-toolbar select {
    min-height: 42px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 0.84rem;
    background: rgba(7, 10, 18, 0.72);
  }

  .join-form-card .btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0.84rem;
  }

  .landing-form-hints {
    margin-top: 10px;
    gap: 5px;
    font-size: 0.69rem;
    line-height: 1.35;
  }

  .create-room-cta-grid {
    gap: 8px;
  }

  .create-room-cta-btn {
    min-height: 66px;
    padding: 10px;
    gap: 9px;
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
      rgba(8, 11, 19, 0.68);
  }

  .create-room-cta-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .create-room-cta-title {
    font-size: 0.82rem;
  }

  .create-room-cta-note {
    display: none;
  }

  .create-room-cta-spark-badge {
    position: static;
    align-self: flex-start;
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  .landing-meet-mobile-section {
    margin-top: 16px;
  }

  .landing-section-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .landing-section-head h3 {
    font-size: 0.95rem;
  }

  .landing-section-copy {
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  #meet-friends-list-mobile {
    gap: 8px;
  }

  .meet-friends-user {
    padding: 9px;
    gap: 8px;
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(244, 114, 182, 0.07), rgba(124, 58, 237, 0.035)),
      rgba(8, 11, 19, 0.62);
  }

  .meet-friends-user-left {
    gap: 8px;
  }

  .meet-friends-avatar {
    width: 32px;
    height: 32px;
  }

  .meet-friends-username {
    max-width: 42vw;
    font-size: 0.8rem;
  }

  .meet-friends-location {
    max-width: 44vw;
    font-size: 0.65rem;
  }

  .meet-friends-follow-btn,
  .meet-friends-refresh-btn,
  .meet-refresh-pill {
    padding: 5px 9px;
    font-size: 0.66rem;
  }

  #active-rooms-container {
    margin-top: 16px;
  }

  .directory-toolbar {
    gap: 8px;
    margin-bottom: 12px;
  }

  .directory-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #active-rooms-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .room-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
      rgba(8, 11, 19, 0.74);
  }

  .room-item-media {
    min-height: 78px;
    border-radius: 14px;
  }

  .room-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .room-item-icon svg {
    width: 20px;
    height: 20px;
  }

  .room-item-mode {
    margin-bottom: 4px;
    padding: 3px 7px;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .room-item-name {
    font-size: 0.9rem;
    line-height: 1.1;
  }

  .room-item-subtitle {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px;
    font-size: 0.68rem;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .room-item-meta {
    margin-top: 7px;
  }

  .room-item-pill,
  .room-item-live-badge {
    padding: 3px 7px;
    font-size: 0.6rem;
  }

  .room-item-footer {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
  }

  .room-item-presence {
    min-width: 0;
    gap: 7px;
  }

  .room-item-avatar {
    width: 23px;
    height: 23px;
    margin-left: -7px;
    font-size: 0.6rem;
    border-width: 1.5px;
  }

  .room-item-users {
    overflow: hidden;
    font-size: 0.66rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .room-item-cta {
    width: auto;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 12px;
    font-size: 0.68rem;
  }

  .empty-rooms,
  .meet-friends-loading,
  .meet-friends-empty {
    padding: 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .join-form-card,
  .landing-meet-mobile-section,
  #active-rooms-container {
    padding: 14px;
  }

  .directory-filters {
    grid-template-columns: 1fr;
  }

  .room-item {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 9px;
  }

  .room-item-media {
    min-height: 70px;
  }

  .room-item-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-item-cta {
    width: 100%;
  }
}

/* meet-mobile-section is shown at 760px — handled in the main @media block below */

/* ── Mobile topbar banner — clean, no animations ── */
@media (max-width: 760px) {
  .landing-topbar {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border-radius: 20px;
  }

  .landing-brand-lockup {
    gap: 10px;
  }

  .landing-brand-title {
    font-size: 1.1rem;
  }

  .landing-brand-copy {
    font-size: 0.7rem;
    color: rgba(148,163,184,0.75);
  }

  .landing-topbar-mob-pills {
    display: none;
  }

  .landing-topbar .landing-desktop-nav,
  .landing-topbar .landing-presence-pill {
    display: none;
  }
}

/* ── Mobile Lottie hero animation ── */
.mob-lottie-wrap {
  display: none;
}

/* ── Mobile form tabs (hidden on desktop) ── */
.mob-form-tabs {
  display: none;
}

/* ── Mode button entrance animation ── */
@keyframes modeBtnIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@media (max-width: 760px) {

  /* Hide subtext on mobile — lottie takes its place */
  .join-copy-desktop {
    display: none;
  }

  /* Lottie container */
  .mob-lottie-wrap {
    display: block;
    width: 100%;
    max-width: 260px;
    height: 130px;
    margin: 8px auto 0;
    pointer-events: none;
  }

  /* Animated mode buttons — stagger entrance on load */
  .mode-btn {
    animation: modeBtnIn 0.35s ease both;
  }
  .mode-btn:nth-child(1) { animation-delay: 0.00s; }
  .mode-btn:nth-child(2) { animation-delay: 0.06s; }
  .mode-btn:nth-child(3) { animation-delay: 0.12s; }
  .mode-btn:nth-child(4) { animation-delay: 0.18s; }
  .mode-btn:nth-child(5) { animation-delay: 0.24s; }
  .mode-btn:nth-child(6) { animation-delay: 0.30s; }

  /* Auto-highlight pulse for the currently auto-rotated button */
  .mode-btn.mob-auto-active {
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.18),
      0 12px 28px rgba(0, 0, 0, 0.25),
      inset 0 0 0 1px color-mix(in srgb, var(--mode-glow, #6366f1) 36%, transparent);
    transform: translateY(-2px) scale(1.02);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
  }

  /* ── Tabbed join/create forms ── */
  .mob-form-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
  }

  .mob-form-tab {
    position: relative;
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: 13px;
    background: transparent;
    color: rgba(148, 163, 184, 0.7);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.22s ease;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
  }

  .mob-form-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.14));
    color: #e2e8f0;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
  }

  /* Subtext shown on hover/focus (tooltip style) */
  .mob-tab-hint {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(15, 18, 30, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 10;
  }

  .mob-form-tab:hover .mob-tab-hint,
  .mob-form-tab:focus .mob-tab-hint {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* Tab panel slide animation */
  @keyframes tabPanelIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .mob-tab-panel-entering {
    animation: tabPanelIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  /* On mobile: single panel occupies full grid width */
  .landing-room-forms-grid {
    grid-template-columns: 1fr !important;
  }

  #mob-tab-panel-join,
  #mob-tab-panel-create {
    width: 100%;
  }

  /* Hide non-active tab panel */
  #mob-tab-panel-join.mob-tab-hidden,
  #mob-tab-panel-create.mob-tab-hidden {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   VOICE SEAT STAGE — inline 5-seat strip in the video panel
   ═══════════════════════════════════════════════════════════════ */
.vs-stage {
  margin: 14px 0 12px;
  padding: 14px 16px 12px;
  border-radius: 18px;
  border: 1px solid rgba(124, 58, 237, .18);
  background:
    radial-gradient(ellipse 110% 60% at 30% -10%, rgba(124,58,237,.16) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,.01) 100%),
    rgba(11, 14, 24, .82);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 8px 28px rgba(0,0,0,.35);
}

.vs-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.vs-stage-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #cbd5e1;
}
.vs-stage-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.45);
  animation: vs-stage-pulse 2.4s ease-out infinite;
}
@keyframes vs-stage-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.vs-stage-count {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: -.01em;
}

/* Seat row */
.vs-seat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.vs-seat {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .14s var(--ease, ease);
  font: inherit;
}
.vs-seat[tabindex="-1"] { cursor: default; }
.vs-seat:hover { transform: translateY(-2px); }
.vs-seat:active { transform: translateY(0) scale(.98); }

.vs-seat-circle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
  color: #475569;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.vs-seat-icon { width: 22px; height: 22px; }
.vs-seat-initial {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}
.vs-seat-name {
  display: block;
  width: 100%;
  font-size: .72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .005em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Host slot — distinct gradient ring */
.vs-seat[data-slot="0"] .vs-seat-circle {
  border-style: solid;
  border-color: transparent;
  background:
    linear-gradient(#0f1422, #0f1422) padding-box,
    linear-gradient(135deg, #f59e0b, #fb7185 50%, #c084fc) border-box;
  border-width: 2px;
}
.vs-seat[data-slot="0"] .vs-seat-icon { stroke: #fbbf24; }
.vs-seat-host-tag {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: .54rem;
  font-weight: 800;
  letter-spacing: .14em;
  background: linear-gradient(135deg, #f59e0b, #fb7185);
  color: #1a0f02;
  box-shadow: 0 4px 10px rgba(245,158,11,.35);
}

/* Empty member seat — hover invites action */
.vs-seat-empty:not([data-slot="0"]):hover .vs-seat-circle {
  border-color: rgba(100,210,255,.5);
  color: #64d2ff;
  background: rgba(100,210,255,.06);
  box-shadow: 0 0 0 4px rgba(100,210,255,.08);
}
.vs-seat-empty:not([data-slot="0"]):hover .vs-seat-name { color: #cbd5e1; }

/* Occupied seat */
.vs-seat-occupied .vs-seat-circle {
  border: 2px solid rgba(100,210,255,.45);
  background: linear-gradient(135deg, rgba(100,210,255,.16), rgba(124,58,237,.18));
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 6px 16px rgba(100,210,255,.18);
}
.vs-seat-occupied .vs-seat-name { color: #e2e8f0; font-weight: 700; }

/* Speaking — animated outer ring */
.vs-seat-speaking .vs-seat-circle {
  border-color: #22c55e;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 0 3px rgba(34,197,94,.18),
    0 8px 22px rgba(34,197,94,.25);
}
.vs-seat-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(34,197,94,.55);
  animation: vs-seat-pulse-ring 1.4s ease-out infinite;
  pointer-events: none;
}
@keyframes vs-seat-pulse-ring {
  0%   { transform: scale(.92); opacity: .85; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* Pending request from this user */
.vs-seat-pending .vs-seat-circle {
  border-color: rgba(251,191,36,.55);
  color: #fbbf24;
  background: rgba(251,191,36,.06);
  animation: vs-seat-pending-pulse 1.6s ease-in-out infinite;
}
.vs-seat-pending .vs-seat-name { color: #fbbf24; }
@keyframes vs-seat-pending-pulse {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .vs-stage-dot, .vs-seat-pulse, .vs-seat-pending .vs-seat-circle { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE: compact controls row — Play / Pause / -10 / +10 single-row
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .controls {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .controls::-webkit-scrollbar { display: none; }
  .controls .ctrl-btn {
    flex: 1 1 0 !important;
    min-width: 0;
    padding: 8px 6px !important;
    font-size: .78rem !important;
    min-height: 38px !important;
    white-space: nowrap;
  }
  /* The mic button (when visible) gets its own row beneath the seek row */
  .controls #mic-btn {
    flex: 1 1 100% !important;
    margin-top: 6px;
  }
  /* Compact seat strip on mobile */
  .vs-stage { padding: 11px 12px 10px; margin: 10px 0; border-radius: 14px; }
  .vs-stage-head { margin-bottom: 9px; }
  .vs-seat-row { gap: 6px; }
  .vs-seat-circle { width: 48px; height: 48px; }
  .vs-seat-icon { width: 18px; height: 18px; }
  .vs-seat-initial { font-size: .96rem; }
  .vs-seat-name { font-size: .66rem; }
  .vs-seat-host-tag { font-size: .48rem; padding: 1px 6px; }
}
