/* Wingmans Together — styles for Kairis & Puchi's homepage and room. */

:root,
[data-theme='cocoa'] {
  /* Default: the bear's fur at night, with the background peach as the accent. */
  --bg: #2a1e1a;
  --bg-deep: #211713;
  --panel: #35261f;
  --panel-2: #402e26;
  --line: #523c31;
  --text: #fff1e6;
  --muted: #c4a693;
  --accent: #ffc19d;
  --accent-ink: #3b1f12;
  --accent-soft: rgba(255, 193, 157, 0.14);
  --blush: #f5a3a6;
  --ok: #a6e3c3;
  --warn: #ff9a8a;
  --glow: radial-gradient(55% 45% at 75% 0%, rgba(255, 193, 157, 0.13), transparent 70%),
    radial-gradient(45% 40% at 0% 100%, rgba(245, 163, 166, 0.08), transparent 70%);
  color-scheme: dark;
}
[data-theme='peach'] {
  --bg: #ffe9dc;
  --bg-deep: #ffdcc8;
  --panel: #fff7f1;
  --panel-2: #fff0e6;
  --line: #f2cdb6;
  --text: #3b241c;
  --muted: #8d6656;
  --accent: #a65f3f;
  --accent-ink: #fff7f1;
  --accent-soft: rgba(166, 95, 63, 0.12);
  --blush: #e8868a;
  --ok: #2e9a6c;
  --warn: #c8442f;
  --glow: radial-gradient(55% 45% at 75% 0%, rgba(255, 193, 157, 0.7), transparent 70%);
  color-scheme: light;
}
[data-theme='panda'] {
  --bg: #000;
  --bg-deep: #000;
  --panel: #0c0c0c;
  --panel-2: #161616;
  --line: #2a2a2a;
  --text: #fff;
  --muted: #a0a0a0;
  --accent: #fff;
  --accent-ink: #000;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --blush: #f5a3a6;
  --ok: #8ef0c0;
  --warn: #ff8a7a;
  --glow: none;
  color-scheme: dark;
}
[data-theme='bamboo'] {
  --bg: #13201a;
  --bg-deep: #0e1814;
  --panel: #1a2b23;
  --panel-2: #20352b;
  --line: #2d4a3c;
  --text: #ecf6ee;
  --muted: #9dbba8;
  --accent: #b6e388;
  --accent-ink: #15260a;
  --accent-soft: rgba(182, 227, 136, 0.13);
  --blush: #f5a3a6;
  --ok: #b6e388;
  --warn: #ff9a8a;
  --glow: radial-gradient(55% 45% at 75% 0%, rgba(182, 227, 136, 0.1), transparent 70%);
  color-scheme: dark;
}
[data-theme='midnight'] {
  --bg: #141a2e;
  --bg-deep: #0f1424;
  --panel: #1b2340;
  --panel-2: #222b4c;
  --line: #313c63;
  --text: #eef0fb;
  --muted: #9aa3c7;
  --accent: #ffc19d;
  --accent-ink: #3b1f12;
  --accent-soft: rgba(255, 193, 157, 0.13);
  --blush: #f5a3a6;
  --ok: #8fe3c7;
  --warn: #ff9a8a;
  --glow: radial-gradient(55% 45% at 75% 0%, rgba(150, 160, 255, 0.12), transparent 70%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 'Figtree', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
svg[hidden],
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
h1,
h2,
h3,
.display {
  font-family: 'Fredoka', 'Figtree', sans-serif;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- shared controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover {
  border-color: var(--muted);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  border-color: var(--accent);
  filter: brightness(1.06);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--panel-2);
  border-color: transparent;
}
.btn-danger {
  color: var(--warn);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 9px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}
.icon-btn svg,
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.input,
.select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
.input:focus,
.select:focus {
  border-color: var(--accent);
}
.select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.select-sm {
  width: auto;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  border-radius: 10px;
  background-color: var(--panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.brand small {
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}

.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}
.toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.toggle span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--line);
  transition: background 0.15s;
  pointer-events: none;
}
.toggle span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.toggle input:checked + span {
  background: var(--accent);
}
.toggle input:checked + span::after {
  transform: translateX(18px);
}
.toggle input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.toggle input:disabled + span {
  opacity: 0.5;
}

/* ---------- homepage ---------- */
.landing {
  background: var(--glow), var(--bg);
  min-height: 100vh;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}
.site-head nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0 72px;
}
.duo-names {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
}
.duo-names img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffc19d;
  object-fit: cover;
}
.duo-names .amp {
  color: var(--accent);
  margin: 0 4px;
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 0.95;
  font-weight: 700;
  white-space: pre-line;
  letter-spacing: -0.02em;
}
:lang(vi) .hero h1 {
  font-size: clamp(38px, 4.9vw, 64px);
  line-height: 1.08;
}
.hero p.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 46ch;
  margin: 24px 0 28px;
}
.hero-actions .btn-primary {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 14px;
}
.hero-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  color: var(--muted);
  font-size: 14px;
}
.hero-meta b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hero > * {
  min-width: 0;
}
.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}
.mascot-disc {
  width: min(400px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffc19d;
  display: grid;
  place-items: end center;
  overflow: hidden;
}
.mascot-disc img {
  width: 82%;
  margin-bottom: -6%;
  transform-origin: 50% 100%;
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(-6px) rotate(-1.5deg);
  }
}

/* Live card: what's playing in the room right now, and who's there. */
.formation {
  position: relative;
  display: block;
  width: 420px;
  max-width: 100%;
  min-width: 0;
  margin-top: -70px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6);
  text-decoration: none;
  transition: border-color 0.15s;
}
.formation:hover {
  border-color: var(--accent);
}
.formation-now {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.formation-art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--blush));
  display: grid;
  place-items: center;
  flex: none;
  object-fit: cover;
}
.formation-art svg {
  width: 28px;
  height: 28px;
  color: var(--accent-ink);
}
.live-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.formation-now h3 {
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.formation-now p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lanes {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}
.lane {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.lane-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.lane-face {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffc19d;
  object-fit: cover;
}
.lane.off .lane-face {
  filter: grayscale(1);
  opacity: 0.5;
}
.lane-track {
  position: relative;
  height: 6px;
  border-radius: 6px;
  background: var(--bg-deep);
  overflow: hidden;
}
.lane-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 6px;
  background: var(--accent);
  width: 0;
  transition: width 0.5s linear;
}
.lane-ms {
  min-width: 52px;
  white-space: nowrap;
  text-align: right;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}
.lane.off .lane-ms {
  color: var(--muted);
}
.formation-foot {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}

.section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
.section h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  margin-bottom: 28px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 {
  margin-bottom: 0;
}
.section-count {
  color: var(--muted);
  font-size: 15px;
}
.recent {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.recent-item {
  display: grid;
  gap: 4px;
  text-decoration: none;
  min-width: 0;
}
.recent-item > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--panel);
  margin-bottom: 6px;
  transition: transform 0.15s;
}
.recent-item:hover > img {
  transform: translateY(-3px);
}
.recent-title {
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-sub {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-home {
  color: var(--muted);
  margin: 0;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  margin-bottom: 14px;
}
.steps h3,
.features h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.steps p,
.features p {
  margin: 0;
  color: var(--muted);
  max-width: 38ch;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 32px;
}
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-duo {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cta-duo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.cta-band h2 {
  margin: 0;
}
.site-foot {
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 24px;
  }
  .steps,
  .features,
  .recent {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  .steps,
  .features {
    grid-template-columns: 1fr;
  }
  .site-head nav .hide-sm {
    display: none;
  }
  .lane {
    grid-template-columns: 84px 1fr auto;
  }
}

/* ---------- room ---------- */
.room-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--glow), var(--bg);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 60px;
}
.topbar .brand small {
  display: none;
}
.room-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px 6px 5px 14px;
  min-width: 0;
}
.room-chip .name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
[data-conn='online'] .sync-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent);
}
[data-conn='reconnecting'] .sync-dot {
  background: var(--warn);
}
.sync-text {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avatars {
  display: flex;
  padding-left: 8px;
  cursor: pointer;
  background: none;
  border: 0;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #141414;
  border: 2px solid var(--bg);
  flex: none;
}
.avatars .avatar {
  margin-left: -8px;
}
.avatars .more {
  background: var(--panel-2);
  color: var(--text);
}

.room-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 400px;
}
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
}
.player-frame {
  position: relative;
  width: 100%;
  max-width: calc((100dvh - 260px) * 16 / 9);
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}
.player-frame iframe,
.player-frame #player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Blocks clicks on the YouTube iframe so everyone uses the synced controls. */
.player-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.audio-only .player-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.audio-card {
  display: none;
  text-align: center;
  max-width: 420px;
}
.audio-only .audio-card {
  display: block;
}
.audio-card img {
  width: min(320px, 60vw);
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 auto 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.audio-card h2 {
  font-size: 24px;
}
.audio-card p {
  color: var(--muted);
  margin: 4px 0 0;
}
.eq {
  display: flex;
  gap: 4px;
  justify-content: center;
  height: 26px;
  align-items: flex-end;
  margin-top: 16px;
}
.eq i {
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
  height: 30%;
  animation: eq 1s ease-in-out infinite;
}
.eq i:nth-child(2) {
  animation-delay: -0.3s;
}
.eq i:nth-child(3) {
  animation-delay: -0.6s;
}
.eq i:nth-child(4) {
  animation-delay: -0.15s;
}
.eq i:nth-child(5) {
  animation-delay: -0.45s;
}
.paused .eq i {
  animation-play-state: paused;
}
@keyframes eq {
  50% {
    height: 100%;
  }
}

.idle {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.is-idle .idle {
  display: grid;
}
.is-idle .player-frame,
.is-idle .audio-card {
  visibility: hidden;
}
.idle img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 16px;
  opacity: 0.95;
}
.idle h2 {
  font-size: 26px;
}
.idle p {
  color: var(--muted);
  margin: 6px auto 0;
  max-width: 34ch;
}

.unlock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  border: 0;
  cursor: pointer;
  text-align: center;
  padding: 24px;
}
.needs-unlock .unlock {
  display: grid;
}
.unlock .big-play {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.unlock .big-play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}
.unlock strong {
  display: block;
  font-size: 20px;
  font-family: 'Fredoka', sans-serif;
}
.unlock span {
  color: var(--muted);
}

.cant-play-note {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
}
.cant-play .cant-play-note {
  display: grid;
}
.cant-play-note > div {
  display: grid;
  gap: 8px;
  justify-items: center;
  max-width: 40ch;
}
.cant-play-note strong {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 600;
}
.cant-play-note span {
  color: var(--muted);
}
.cant-play-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.cant-play-note .code {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.reactions-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
.floater {
  position: absolute;
  bottom: 20px;
  font-size: 34px;
  animation: float 2.6s ease-out forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.floater small {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  color: #141414;
}
@keyframes float {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(-20px) scale(1.1);
  }
  100% {
    transform: translateY(-60vh) scale(1);
    opacity: 0;
  }
}
.react-bar {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  gap: 2px;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  backdrop-filter: blur(8px);
}
.react-bar button {
  border: 0;
  background: none;
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}
.react-bar button:hover {
  background: var(--panel-2);
}

.deck {
  border-top: 1px solid var(--line);
  padding: 12px 20px 14px;
  background: color-mix(in srgb, var(--panel) 60%, transparent);
}
.deck-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.np-thumb {
  width: 64px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
  flex: none;
}
.np-text {
  min-width: 0;
  flex: 1;
}
.np-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-sub {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.play-btn {
  width: 46px;
  height: 46px;
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.play-btn svg {
  width: 20px;
  height: 20px;
}
.volume {
  display: flex;
  align-items: center;
  gap: 6px;
}
input[type='range'] {
  accent-color: var(--accent);
}
.volume input {
  width: 90px;
}

/* Seek bar + the formation strip (each wingman's live position on the same timeline). */
.timeline {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline span:last-child {
  text-align: right;
}
.seek {
  position: relative;
  height: 22px;
  cursor: pointer;
  touch-action: none;
}
.seek-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 6px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}
.seek-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
}
.seek-knob {
  position: absolute;
  top: 4px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 3px var(--accent);
  left: 0;
}
.seek.locked {
  cursor: default;
}
.formation-strip {
  position: relative;
  height: 22px;
  margin: 2px 54px 0;
}
.wing {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  transition: left 0.5s linear;
}
.wing-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffc19d;
  border: 2px solid var(--bg);
  object-fit: cover;
}

/* ---------- the two of us ---------- */
img.avatar {
  background: #ffc19d;
  object-fit: cover;
  padding: 0;
}
.duo {
  display: flex;
  background: none;
  border: 0;
  padding: 0 0 0 8px;
  cursor: pointer;
}
.duo-face {
  position: relative;
  margin-left: -8px;
}
.duo-face .avatar {
  width: 34px;
  height: 34px;
  filter: grayscale(1);
  opacity: 0.45;
  transition: filter 0.3s, opacity 0.3s;
}
.duo-face.on .avatar {
  filter: none;
  opacity: 1;
}
.duo-face.on::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--bg);
}
.avatar-lg {
  width: 48px !important;
  height: 48px !important;
}
.crew-row.off img {
  filter: grayscale(1);
  opacity: 0.5;
}
.name-form span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-weight: 600;
}
.floater-face {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffc19d;
  object-fit: cover;
  margin-top: 2px;
}
.msg img.avatar {
  width: 28px;
  height: 28px;
  border: 0;
}
.who-pick {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}
.who-pick button {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 150px;
  padding: 20px 12px 16px;
  border-radius: 22px;
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
  transition: border-color 0.15s, transform 0.15s;
}
.who-pick button:hover,
.who-pick button:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.who-pick img {
  width: 96px;
  height: 96px;
  margin: 0;
  border-radius: 50%;
  background: #ffc19d;
  object-fit: cover;
}

/* ---------- keyboard shortcuts card ---------- */
.kbd-wrap {
  position: relative;
}
.kbd-pop {
  position: absolute;
  right: -6px;
  bottom: calc(100% + 12px);
  z-index: 20;
  width: 264px;
  padding: 14px 16px 12px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
}
/* little arrow pointing at the button */
.kbd-pop::after {
  content: '';
  position: absolute;
  right: 18px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.kbd-wrap:hover .kbd-pop,
.kbd-wrap:focus-within .kbd-pop,
.kbd-wrap.open .kbd-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.kbd-pop strong {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}
.kbd-pop dl {
  margin: 0;
  display: grid;
  gap: 6px;
}
.kbd-pop dl > div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.kbd-pop dt {
  display: flex;
  gap: 3px;
}
.kbd-pop dd {
  margin: 0;
  color: var(--muted);
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  font: 600 11px/1 'Figtree', system-ui, sans-serif;
  color: var(--text);
}
/* Phones and tablets have no keyboard shortcuts to show. */
@media (hover: none), (pointer: coarse) {
  .kbd-wrap {
    display: none;
  }
}

/* ---------- video quality menu ---------- */
.q-wrap {
  position: relative;
}
.q-btn {
  height: 38px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 99px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.q-btn svg {
  width: 16px;
  height: 16px;
}
.q-pop {
  position: absolute;
  right: -6px;
  bottom: calc(100% + 12px);
  z-index: 21;
  width: 250px;
  padding: 14px 10px 10px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.q-wrap.open .q-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.q-pop strong {
  display: block;
  padding: 0 6px 6px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 15px;
}
.q-opt {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.q-opt:hover,
.q-opt:focus-visible {
  background: var(--panel-2);
}
.q-opt b {
  font-size: 14px;
  font-weight: 600;
}
.q-opt small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.q-opt .check {
  width: 18px;
  height: 18px;
  color: var(--accent);
  visibility: hidden;
}
.q-opt[aria-checked='true'] .check {
  visibility: visible;
}
.q-note {
  margin: 6px 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .q-btn span {
    display: none;
  }
  .q-pop {
    right: -8px;
    bottom: auto;
    top: calc(100% + 10px);
    width: min(250px, calc(100vw - 24px));
    transform: translateY(-6px);
  }
}

/* ---------- favorites ---------- */
.fav-btn svg,
.item-actions .fav-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.fav-btn.on {
  color: var(--blush);
}
.fav-btn.on svg {
  fill: currentColor;
  stroke: currentColor;
}
.fav-btn.pop svg {
  animation: pop 0.35s ease-out;
}
@keyframes pop {
  40% {
    transform: scale(1.35);
  }
}
.fav-who {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffc19d;
  object-fit: cover;
  vertical-align: -3px;
  margin-right: 4px;
}

/* ---------- side panel ---------- */
.side {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: color-mix(in srgb, var(--panel) 55%, transparent);
}
.tabs {
  display: flex;
  gap: 0;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  white-space: nowrap;
  flex: none;
  border: 0;
  background: none;
  font-size: 14px;
  padding: 10px 8px 12px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tab[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 11px;
  display: inline-grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--muted);
}
.badge.hot {
  background: var(--accent);
  color: var(--accent-ink);
}
.panel {
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
}
.panel.active {
  display: flex;
}
.search-form {
  display: flex;
  gap: 6px;
  padding: 12px;
}
.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 12px 16px;
}
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
}
.list-head h3 {
  font-size: 16px;
}
.list-head .actions {
  display: flex;
  gap: 2px;
}
.results {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.results:empty {
  display: none;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px 12px;
  font-size: 14px;
}
.item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px;
  border-radius: 12px;
  position: relative;
}
.item:hover {
  background: var(--panel-2);
}
.item img {
  width: 72px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
}
.item .dur {
  position: absolute;
  left: 9px;
  top: 33px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 4px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.item-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-actions {
  display: flex;
  gap: 2px;
  opacity: 0.85;
}
.item-actions .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9px;
}
.item-actions .btn svg {
  width: 16px;
  height: 16px;
}
.item[draggable='true'] {
  cursor: grab;
}
.item.dragging {
  opacity: 0.4;
}
.item.drop-before {
  box-shadow: inset 0 2px 0 var(--accent);
}
.item.drop-after {
  box-shadow: inset 0 -2px 0 var(--accent);
}
.playlist-offer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
  margin: 6px 0;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 14px;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
}
.msg {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
}
.msg .avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border: 0;
}
.msg-head {
  font-size: 13px;
  font-weight: 700;
}
.msg-head time {
  color: var(--muted);
  font-weight: 500;
  margin-left: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.day-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.day-divider::before,
.day-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.day-divider span {
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--panel-2);
  white-space: nowrap;
}
.msg-text {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.chat-form {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.crew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
}
.crew-row:hover {
  background: var(--panel-2);
}
.crew-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}
.crew-name small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.host-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 1px;
}
.name-form {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.name-form label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.prefs {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.prefs label {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.prefs .select {
  width: 100%;
}

/* ---------- dialogs, gates, toasts ---------- */
dialog {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 22px;
  padding: 0;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}
dialog::backdrop {
  background: rgba(3, 7, 15, 0.6);
  backdrop-filter: blur(4px);
}
.dialog-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100dvh - 120px);
}
.dialog-body h2 {
  font-size: 24px;
}
.dialog-body > p {
  color: var(--muted);
  margin: 4px 0 20px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.switch-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 6px;
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.switch:last-child {
  border-bottom: 0;
}
.switch b {
  display: block;
  font-size: 14px;
}
.switch small {
  color: var(--muted);
}
.dialog-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}
.dialog-foot .right {
  display: flex;
  gap: 8px;
}
.note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--glow), var(--bg);
}
.gate[hidden] {
  display: none;
}
.gate-card {
  width: min(420px, 100%);
  text-align: center;
}
.gate-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.gate-card h1 {
  font-size: 28px;
}
.gate-card p {
  color: var(--muted);
  margin: 8px 0 20px;
}
.gate-card form {
  display: grid;
  gap: 10px;
  text-align: left;
}
.gate-card .err {
  color: var(--warn);
  font-size: 14px;
  min-height: 1.2em;
}
.gate-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.toasts {
  position: fixed;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.2s ease-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 64px;
    padding-top: 28px;
  }
  .steps,
  .features {
    grid-template-columns: 1fr 1fr;
  }
  .room-body {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .room-main {
    grid-template-columns: 1fr;
  }
  .screen {
    flex: none;
    padding: 12px;
    min-height: 220px;
  }
  .player-frame {
    max-width: none;
  }
  .side {
    border-left: 0;
    border-top: 1px solid var(--line);
    height: 75dvh;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  .steps,
  .features {
    grid-template-columns: 1fr;
  }
  .site-head nav .hide-sm,
  .topbar .hide-sm {
    display: none;
  }
  .topbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand span {
    display: none;
  }
  .room-chip .name {
    max-width: 30vw;
  }
  .deck {
    padding: 10px 12px;
  }
  .volume {
    display: none;
  }
  .np-thumb {
    display: none;
  }
  .react-bar {
    right: 8px;
    bottom: 8px;
  }
  .react-bar button {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .formation-strip {
    margin: 2px 54px 0;
  }
  .lane {
    grid-template-columns: 76px 1fr 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
