/* ============================================================
   Katebox
   ============================================================ */

:root {
  --bg: #09090b;
  --bg-deep: #060608;
  --panel: rgba(20, 20, 25, 0.86);
  --panel-solid: #141419;
  --panel-soft: #191920;
  --field: #0d0d11;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f3f6;
  --text-soft: #d4cad3;
  --muted: #a49ca7;
  --faint: #746c79;
  --blue: #5bcffa;
  --blue-bright: #8fe3ff;
  --blue-soft: rgba(91, 207, 250, 0.13);
  --accent: #f5a9b8;
  --accent-bright: #ffb6cc;
  --accent-deep: #67d6fb;
  --accent-soft: rgba(245, 169, 184, 0.13);
  --flag-gradient: linear-gradient(120deg, #8fe3ff 0%, #ffffff 50%, #ffb6cc 100%);
  --green: #58d68d;
  --amber: #f4c56b;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 10px 30px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 18px 60px -22px rgba(91, 207, 250, 0.3), 0 18px 60px -32px rgba(245, 169, 184, 0.35);
}

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

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  flex: none;
}

::selection {
  background: rgba(245, 169, 184, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

/* ---------- ambient background ---------- */

.page {
  position: relative;
  isolation: isolate;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}

.ambient-orb--a {
  width: 560px;
  height: 560px;
  top: -260px;
  left: -140px;
  background: radial-gradient(circle at 50% 50%, rgba(91, 207, 250, 0.28), transparent 68%);
}

.ambient-orb--b {
  width: 640px;
  height: 520px;
  top: -160px;
  right: -240px;
  background: radial-gradient(circle at 50% 50%, rgba(245, 169, 184, 0.2), transparent 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- shared bits ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-name {
  font-size: 16.5px;
  letter-spacing: -0.02em;
}

.brand-mark {
  border-radius: 10px;
  box-shadow: 0 8px 26px -12px rgba(91, 207, 250, 0.6), 0 8px 26px -16px rgba(255, 182, 204, 0.65);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary {
  color: #11131a;
  background: var(--flag-gradient);
  box-shadow: 0 12px 30px -14px rgba(91, 207, 250, 0.55), 0 12px 30px -18px rgba(245, 169, 184, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn-primary:hover {
  background: linear-gradient(120deg, #a7ecff 0%, #ffffff 50%, #ffc4d7 100%);
  box-shadow: 0 16px 36px -14px rgba(91, 207, 250, 0.7), 0 16px 36px -18px rgba(245, 169, 184, 0.8),
    inset 0 1px 0 #fff;
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--text-soft);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.btn-outline:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.btn-lg {
  height: 52px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 14.5px;
}

.btn-small {
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(17, 19, 26, 0.25);
  border-top-color: #11131a;
  animation: spin 0.7s linear infinite;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input::placeholder {
  color: var(--faint);
}

.input:hover {
  border-color: rgba(255, 255, 255, 0.13);
}

.input:focus {
  outline: none;
  border-color: rgba(143, 227, 255, 0.7);
  background: #0f0f15;
  box-shadow: 0 0 0 4px rgba(91, 207, 250, 0.13), 0 0 0 7px rgba(245, 169, 184, 0.05);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.form-error {
  margin: 0;
  color: #ff8f82;
  font-size: 12.5px;
  line-height: 1.45;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.icon-btn.is-active {
  color: var(--blue-bright);
  border-color: rgba(91, 207, 250, 0.28);
  background: rgba(91, 207, 250, 0.08);
}

.spin {
  animation: spin 0.8s linear infinite;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 44px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.015em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(88, 214, 141, 0.1);
}

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

.landing-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 44px 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(36px, 6vw, 84px);
  padding: clamp(34px, 7vh, 80px) 0 clamp(48px, 8vh, 92px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #5bcffa 0 20%,
    #f5a9b8 20% 40%,
    #ffffff 40% 60%,
    #f5a9b8 60% 80%,
    #5bcffa 80% 100%
  );
  box-shadow: 0 0 14px rgba(91, 207, 250, 0.25);
}

.hero h1 {
  margin: 0;
  font-size: clamp(52px, 6.6vw, 90px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.07em;
  letter-spacing: -0.025em;
  background: linear-gradient(100deg, #9fe8ff 0%, #ffffff 48%, #ffb1c9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.lede {
  max-width: 52ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: -0.005em;
}

.entry-card {
  width: 100%;
  max-width: 470px;
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(25, 25, 31, 0.9), rgba(16, 16, 20, 0.92));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.entry-card .input {
  height: 47px;
}

.entry-primary {
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
}

.or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 16px;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.or::before,
.or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.join-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.code-input {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13.5px;
}

.code-input::placeholder {
  font-weight: 500;
  letter-spacing: 0.12em;
}

.join-row .btn {
  height: 47px;
}

.entry-card .form-error {
  margin-top: 12px;
}

.fineprint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 16px 0 0 4px;
  color: var(--faint);
  font-size: 12px;
}

.fineprint svg {
  color: #83818c;
}

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

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 430px;
  padding: 20px 0 50px;
}

.art-halo {
  position: absolute;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 207, 250, 0.18) 0%, rgba(245, 169, 184, 0.16) 45%, transparent 68%);
  filter: blur(30px);
}

.art-stack {
  position: relative;
  width: min(100%, 480px);
  perspective: 1400px;
}

.art-card {
  position: relative;
  z-index: 1;
  padding: 13px 13px 50px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background: linear-gradient(165deg, #1b1b22 0%, #111116 58%, #0d0d11 100%);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95), 0 24px 60px -30px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: rotate(-2.4deg);
  animation: float 9s ease-in-out infinite;
}

.art-player {
  padding: 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #15151a;
}

.art-screen {
  position: relative;
  aspect-ratio: 16 / 8.6;
  border-radius: 13px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 90% at 18% 10%, rgba(91, 207, 250, 0.42), transparent 60%),
    radial-gradient(ellipse 55% 90% at 86% 20%, rgba(245, 169, 184, 0.32), transparent 62%),
    linear-gradient(150deg, #102030 0%, #141322 48%, #22131e 100%);
}

.screen-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
}

.screen-orb--one {
  width: 150px;
  height: 150px;
  top: -30px;
  left: 12%;
  background: rgba(91, 207, 250, 0.38);
}

.screen-orb--two {
  width: 170px;
  height: 170px;
  bottom: -50px;
  right: 6%;
  background: rgba(245, 169, 184, 0.28);
}

.screen-label {
  position: absolute;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(8, 8, 12, 0.45);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.75);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-label span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(88, 214, 141, 0.8);
}

.art-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  color: #fff;
  padding-left: 3px;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.6);
}

.art-now {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 4px 9px;
}

.art-now-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 169, 184, 0.13);
}

.art-now-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.art-now-text strong {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.art-now-text span {
  color: var(--faint);
  font-size: 9.5px;
}

.art-time {
  color: var(--faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.art-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 0 4px;
}

.art-track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-bright), var(--accent));
}

.art-queue {
  position: absolute;
  right: -22px;
  bottom: -58px;
  z-index: 2;
  width: 62%;
  min-width: 230px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  background: linear-gradient(170deg, rgba(32, 32, 40, 0.97), rgba(19, 19, 24, 0.98));
  box-shadow: 0 34px 70px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  transform: rotate(1.4deg);
}

.art-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px 9px;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.art-count {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0;
}

.art-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 3px;
}

.art-thumb {
  width: 38px;
  height: 22px;
  border-radius: 5px;
}

.art-thumb--a {
  background: linear-gradient(135deg, #7c4c6b, #35234d);
}

.art-thumb--b {
  background: linear-gradient(135deg, #2f7188, #1c304d);
}

.art-thumb--c {
  background: linear-gradient(135deg, #6b6390, #372d4c);
}

.art-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-lines i {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.art-lines i:last-child {
  width: 55%;
  background: rgba(255, 255, 255, 0.07);
}

.art-row-num {
  color: var(--faint);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.art-add {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  padding: 8px 9px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--faint);
  font-size: 9px;
}

.art-add span {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 600;
}

.art-people {
  position: absolute;
  top: -20px;
  left: 6px;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 6px 11px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(23, 23, 28, 0.94);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-right: -6px;
  border: 2px solid #17171c;
  border-radius: 50%;
  background: hsl(var(--h) 40% 22%);
  color: hsl(var(--h) 80% 78%);
  font-size: 8.5px;
  font-weight: 600;
}

.art-people-label {
  margin-left: 11px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 52px);
  padding: 40px 0 10px;
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  max-width: 340px;
}

.step-num {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  letter-spacing: 0.02em;
}

.step h2 {
  margin: 0 0 7px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 44px 34px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11.5px;
}

.footer-meta {
  color: #5c5a64;
}

/* ============================================================
   Room
   ============================================================ */

.room-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 26px;
  height: 64px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(20px) saturate(1.2);
}

.room-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #5bcffa 12%,
    #f5a9b8 36%,
    #ffffff 50%,
    #f5a9b8 64%,
    #5bcffa 88%,
    transparent 100%
  );
  opacity: 0.55;
  pointer-events: none;
}

.brand--room {
  flex: none;
}

.room-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.room-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.code-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

.code-chip svg {
  color: var(--faint);
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.conn-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
}

.conn.is-live .conn-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(88, 214, 141, 0.12);
}

.conn.is-live {
  color: #7fbf99;
}

.conn.is-reconnecting .conn-dot {
  background: var(--amber);
  animation: blink 1.2s ease-in-out infinite;
}

.conn.is-reconnecting {
  color: var(--amber);
}

.room-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.presence {
  display: flex;
  align-items: center;
  padding-right: 2px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: -8px;
  padding: 0;
  border: 2px solid #0c0c0f;
  border-radius: 50%;
  background: var(--avatar-bg, #26262e);
  color: var(--avatar-fg, #ccc);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  appearance: none;
  transition: transform 0.16s ease;
}

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

.avatar:hover {
  transform: translateY(-2px);
  z-index: 2;
}

.avatar.is-self {
  box-shadow: 0 0 0 2px rgba(245, 169, 184, 0.65);
}

.avatar .crown {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 2px solid #0c0c0f;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffca63, #f09a2e);
  color: #4a2c00;
}

.avatar.is-more {
  background: #1c1c22;
  color: var(--muted);
  font-size: 9.5px;
}

.share-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12.5px;
}

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

.room-main {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 26px 28px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 386px);
  gap: 26px;
  align-items: start;
}

.stage {
  min-width: 0;
}

.host-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 9px 11px 9px 14px;
  border: 1px solid rgba(244, 183, 91, 0.24);
  border-radius: 13px;
  background: linear-gradient(90deg, rgba(244, 183, 91, 0.09), rgba(244, 183, 91, 0.035));
  color: #e8c48b;
  font-size: 12.5px;
  animation: fadeDown 0.35s ease both;
}

.host-banner-icon {
  display: grid;
  place-items: center;
  color: var(--amber);
}

.host-banner p {
  flex: 1;
  margin: 0;
  color: #cdb184;
}

.host-banner strong {
  color: #f0d3a1;
  font-weight: 600;
}

.host-banner .btn {
  flex: none;
}

/* ---------- player ---------- */

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.youtube-player,
.youtube-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-frame.is-guest .youtube-player {
  pointer-events: none;
}

/* ---------- SoundCloud audio stage ---------- */

.audio-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b0b11;
}

.audio-backdrop {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  filter: blur(54px) saturate(1.15);
  opacity: 0.5;
  transform: scale(1.12);
}

.audio-backdrop[hidden] {
  display: none;
}

.audio-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 50% 45%, transparent 0%, rgba(7, 7, 11, 0.28) 55%, rgba(7, 7, 11, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 7, 11, 0.18), rgba(7, 7, 11, 0.52));
}

.audio-art-wrap {
  position: relative;
  z-index: 1;
  width: min(42%, 300px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 18%, rgba(91, 207, 250, 0.32), transparent 55%),
    radial-gradient(circle at 80% 82%, rgba(245, 169, 184, 0.3), transparent 55%),
    #14141d;
  box-shadow:
    0 34px 80px -24px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 80px -26px rgba(245, 169, 184, 0.35);
}

.audio-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-art-note {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
}

.audio-art-wrap.is-missing .audio-art {
  display: none;
}

.audio-art-wrap.is-missing .audio-art-note {
  display: grid;
}

.audio-source {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.56);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.audio-source svg {
  color: var(--blue-bright);
}

.audio-source:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(24, 24, 32, 0.8);
}

.sc-host {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sc-host iframe {
  width: 1px;
  height: 1px;
  border: 0;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 70% at 50% 12%, rgba(91, 207, 250, 0.1), transparent 65%),
    radial-gradient(ellipse 80% 80% at 80% 100%, rgba(245, 169, 184, 0.09), transparent 70%),
    linear-gradient(160deg, #121318, #0a0a0f);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.player-placeholder.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.placeholder-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
}

.placeholder-halo {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 207, 250, 0.16) 0%, rgba(245, 169, 184, 0.14) 50%, transparent 70%);
  filter: blur(8px);
}

.placeholder-play {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding-left: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.placeholder-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.placeholder-sub {
  max-width: 320px;
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.55;
}

.sound-pill {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(14, 14, 18, 0.78);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  animation: fadeUp 0.3s ease both;
}

.sound-pill:hover {
  background: rgba(30, 30, 36, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.sound-pill svg {
  color: var(--blue-bright);
}

.now-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 4px 0;
}

.now-copy {
  min-width: 0;
}

.now-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.now-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
}

.now-eyebrow.is-live .now-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 169, 184, 0.13);
}

.now-bar h2 {
  overflow: hidden;
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-bar p {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-top: 13px;
}

.now-actions .btn {
  height: 38px;
  font-size: 12.5px;
  border-radius: 9px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px 0;
}

.time {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.075);
}

.progress-track.is-seekable {
  cursor: pointer;
}

.progress-track.is-seekable::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  bottom: -8px;
}

.progress-fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-bright), var(--accent));
  transition: width 0.5s linear;
}

.progress-track.is-seekable .progress-fill::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -3px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 169, 184, 0.22);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.progress-track.is-seekable:hover .progress-fill::after,
.progress-track.is-seekable:focus-within .progress-fill::after {
  opacity: 1;
}

/* ---------- queue ---------- */

.queue-panel {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 106px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(22, 22, 28, 0.9), rgba(14, 14, 18, 0.94));
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 20px 14px;
}

.queue-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.queue-head p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 11.5px;
}

.shuffle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  margin-top: 1px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease, transform 0.16s ease;
}

.shuffle-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.shuffle-btn:active {
  transform: translateY(1px);
}

.shuffle-btn.is-active {
  color: #11131a;
  border-color: transparent;
  background: var(--flag-gradient);
  box-shadow: 0 6px 18px -8px rgba(91, 207, 250, 0.6), 0 6px 18px -10px rgba(245, 169, 184, 0.7);
}

.shuffle-btn.is-active:hover {
  color: #11131a;
  background: linear-gradient(120deg, #a7ecff 0%, #ffffff 50%, #ffc4d7 100%);
}

.shuffle-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.qr-invite {
  display: flex;
  align-items: center;
  gap: 13px;
  width: calc(100% - 40px);
  margin: 0 20px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  color: var(--text);
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.qr-invite:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.qr-invite:active {
  transform: translateY(1px);
}

.qr-frame {
  display: grid;
  flex: none;
  width: 108px;
  height: 108px;
  padding: 2px;
  border-radius: 15px;
  background: var(--flag-gradient);
  box-shadow: 0 12px 30px -18px rgba(91, 207, 250, 0.55);
}

.qr-inner {
  display: block;
  width: 100%;
  height: 100%;
  padding: 7px;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.qr-inner svg,
.qr-large-inner svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.qr-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.qr-copy > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.qr-copy .qr-hint {
  margin-top: 3px;
  color: var(--blue-bright);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.qr-copy .qr-hint.is-warning {
  color: var(--amber);
  opacity: 0.95;
}

.qr-expand {
  align-self: flex-start;
  margin-left: auto;
  color: var(--faint);
  flex: none;
}

.qr-invite:hover .qr-expand {
  color: var(--text-soft);
}

.add-form {
  display: flex;
  gap: 8px;
  padding: 0 20px 14px;
}

.add-form .input {
  height: 44px;
  font-size: 13px;
  border-radius: 11px;
}

.add-btn {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 11px;
}

.add-btn svg {
  transition: transform 0.2s ease;
}

.add-btn:hover svg {
  transform: rotate(90deg);
}

.add-error {
  padding: 0 20px 12px;
  margin-top: -4px;
}

.queue-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.queue-body::-webkit-scrollbar {
  width: 6px;
}

.queue-body::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0 12px 12px;
  list-style: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 16px 22px 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.q-drag {
  display: grid;
  place-items: center;
  width: 16px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  cursor: grab;
  touch-action: none;
  transition: color 0.16s ease, background 0.16s ease;
}

.q-drag:hover,
.q-drag:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.q-drag:active {
  cursor: grabbing;
}

.queue-item.queue-ghost {
  opacity: 0.28;
  border-color: var(--line-strong);
  border-style: dashed;
  background: transparent;
}

.queue-item.queue-chosen {
  border-color: rgba(91, 207, 250, 0.28);
  background: rgba(91, 207, 250, 0.06);
}

.queue-item.queue-drag {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--panel-solid);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
}

.queue-item:hover,
.queue-item:focus-within {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.032);
}

.queue-item.is-new {
  animation: queueIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.q-index {
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.q-thumb {
  position: relative;
  width: 62px;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, #24242d, #16161c);
}

.q-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.q-source {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: rgba(8, 8, 12, 0.72);
  color: var(--blue-bright);
  backdrop-filter: blur(4px);
}

.q-thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding-left: 1px;
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.55);
  color: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
  opacity: 0.75;
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(4px);
}

.queue-item:hover .q-thumb-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.06);
}

.q-text {
  min-width: 0;
}

.q-title {
  overflow: hidden;
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.q-meta {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.q-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transform: translateX(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.queue-item:hover .q-actions,
.queue-item:focus-within .q-actions {
  opacity: 1;
  transform: none;
}

.q-action {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  transition: background 0.15s ease, color 0.15s ease;
}

.q-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.q-action--remove:hover {
  background: rgba(255, 118, 118, 0.14);
  color: #ff9b9b;
}

.queue-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 26px 44px;
  text-align: center;
}

.empty-art {
  position: relative;
  width: 72px;
  height: 62px;
  margin-bottom: 16px;
}

.empty-art span {
  position: absolute;
  left: 50%;
  width: 62px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17171d;
  transform: translateX(-50%);
}

.empty-art span:nth-child(1) {
  top: 0;
  opacity: 0.36;
  transform: translateX(-50%) scale(0.82);
}

.empty-art span:nth-child(2) {
  top: 9px;
  opacity: 0.6;
  transform: translateX(-50%) scale(0.91);
}

.empty-art span:nth-child(3) {
  top: 19px;
  background: linear-gradient(160deg, #22222b, #15151a);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.8);
}

.empty-art svg {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-bright);
}

.queue-empty h3 {
  margin: 0 0 5px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.queue-empty p {
  max-width: 250px;
  margin: 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.55;
}

.queue-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.queue-foot-icon {
  color: var(--faint);
}

.queue-foot p {
  margin: 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.4;
}

.queue-foot strong {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- not found / modal / toast ---------- */

.notfound {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 170px);
  padding: 40px 24px 80px;
}

.notfound-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(24, 24, 30, 0.92), rgba(15, 15, 19, 0.94));
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.notfound-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.notfound-card h1 {
  margin: 0 0 9px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.notfound-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.notfound-card .eyebrow {
  justify-content: center;
  margin-bottom: 10px;
}

.notfound-card .btn {
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(5, 5, 8, 0.72);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease both;
}

.modal-card {
  position: relative;
  width: min(390px, 100%);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, #1a1a21, #121216);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 182, 204, 0.24);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 0.16s ease, background 0.16s ease;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.modal-card h2 {
  margin: 0 0 5px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.modal-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.modal-sub strong {
  color: var(--text-soft);
  font-weight: 500;
}

.modal-card .input {
  height: 46px;
}

.modal-card .btn-lg {
  width: 100%;
  margin-top: 14px;
}

.modal-card .form-error {
  margin-top: 10px;
}

.qr-modal-card {
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  text-align: center;
}

.qr-modal-card .modal-mark {
  margin-left: auto;
  margin-right: auto;
}

.qr-modal-card .modal-sub {
  margin-bottom: 4px;
}

.qr-large-frame {
  width: min(262px, 74vw);
  max-width: 100%;
  margin: 18px auto 16px;
  padding: 3px;
  border-radius: 20px;
  background: var(--flag-gradient);
  box-shadow: 0 20px 50px -24px rgba(91, 207, 250, 0.5), 0 20px 50px -28px rgba(245, 169, 184, 0.55);
}

.qr-large-inner {
  width: 100%;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 17px;
  background: #fff;
  overflow: hidden;
}

.qr-modal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.qr-modal-link > span {
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.qr-modal-link .btn {
  flex: none;
}

.qr-local-note {
  margin: 10px 0 0;
  color: var(--amber);
  font-size: 10.5px;
  line-height: 1.55;
}

.qr-local-note code {
  color: #f6d9a4;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(28, 28, 35, 0.96);
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.9);
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(16px);
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast--error {
  border-color: rgba(255, 118, 118, 0.35);
  color: #ffb4b4;
}

/* ---------- animations ---------- */

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2.4deg);
  }
  50% {
    transform: translateY(-8px) rotate(-1.8deg);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

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

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes queueIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
    background: rgba(245, 169, 184, 0.13);
  }
  to {
    opacity: 1;
    transform: none;
    background: transparent;
  }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: 48px;
  }

  .room-main {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
    padding: 24px;
    gap: 22px;
  }
}

@media (max-width: 980px) {
  .site-header,
  .landing-main,
  .site-footer {
    padding-left: 30px;
    padding-right: 30px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 30px;
  }

  .hero-copy {
    max-width: 600px;
  }

  .hero-art {
    min-height: 0;
    margin-top: 36px;
    padding: 30px 0 64px;
  }

  .art-stack {
    width: min(100%, 460px);
  }

  .room-header {
    gap: 16px;
    padding: 0 18px;
  }

  .room-main {
    grid-template-columns: 1fr;
    max-width: 860px;
  }

  .queue-panel {
    position: static;
    max-height: none;
  }

  .queue-body {
    max-height: min(52vh, 460px);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 22px 20px;
  }

  .header-badge {
    display: none;
  }

  .landing-main {
    padding: 0 20px 48px;
  }

  .hero {
    padding: 14px 0 40px;
  }

  .hero h1 {
    font-size: clamp(46px, 13vw, 64px);
  }

  .lede {
    font-size: 15.5px;
    margin-top: 20px;
  }

  .entry-card {
    padding: 18px;
    margin-top: 28px;
  }

  .hero-art {
    margin-top: 26px;
  }

  .art-card {
    animation: none;
  }

  .art-queue {
    right: -10px;
    bottom: -46px;
  }

  .art-people {
    left: 0;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 30px;
  }

  .step {
    max-width: none;
    padding-left: 0;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 22px 20px 30px;
  }

  .room-header {
    height: 58px;
    gap: 10px;
    padding: 0 14px;
  }

  .brand--room .brand-name {
    display: none;
  }

  .room-identity {
    gap: 8px;
  }

  .room-name {
    max-width: 150px;
    font-size: 13px;
  }

  .conn-label {
    display: none;
  }

  .conn {
    padding: 0;
  }

  .room-header-right {
    gap: 10px;
  }

  .share-btn {
    width: 36px;
    padding: 0;
  }

  .share-label {
    display: none;
  }

  .room-main {
    padding: 16px 14px 30px;
    gap: 18px;
  }

  /* Keep iOS from zooming when a field gets focus. */
  .input,
  .add-form .input {
    font-size: 16px;
  }

  .player-frame {
    border-radius: 15px;
  }

  .audio-art-wrap {
    width: min(46%, 190px);
    border-radius: 14px;
  }

  .audio-source {
    top: 10px;
    left: 10px;
    height: 28px;
    padding: 0 9px;
    font-size: 10px;
  }

  .player-placeholder {
    padding: 16px;
  }

  .placeholder-art {
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
  }

  .placeholder-play {
    width: 46px;
    height: 46px;
  }

  .placeholder-play svg {
    width: 20px;
    height: 20px;
  }

  .placeholder-sub {
    max-width: 260px;
    font-size: 11.5px;
  }

  .now-bar {
    padding-top: 14px;
    gap: 10px;
  }

  .now-bar h2 {
    font-size: 16px;
  }

  .now-bar p {
    font-size: 11.5px;
  }

  .now-actions {
    padding-top: 8px;
  }

  .skip-btn span {
    display: none;
  }

  .skip-btn {
    width: 38px;
    padding: 0;
  }

  .queue-panel {
    border-radius: 18px;
  }

  .queue-head,
  .add-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .qr-invite {
    width: calc(100% - 32px);
    margin: 0 16px 12px;
    padding: 10px;
    gap: 11px;
  }

  .qr-frame {
    width: 86px;
    height: 86px;
    border-radius: 13px;
  }

  .qr-inner {
    padding: 6px;
    border-radius: 11px;
  }

  .qr-copy strong {
    font-size: 12.5px;
  }

  .qr-copy > span {
    font-size: 10.5px;
  }


  .qr-expand {
    display: none;
  }

  .add-error {
    padding-left: 16px;
    padding-right: 16px;
  }

  .queue-list {
    padding-left: 8px;
    padding-right: 8px;
  }

  .q-actions {
    opacity: 1;
    transform: none;
  }

  .queue-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .host-banner {
    flex-wrap: wrap;
    font-size: 12px;
  }

  .host-banner p {
    flex-basis: calc(100% - 40px);
  }

  .host-banner .btn {
    margin-left: 29px;
  }

  .sound-pill {
    left: 12px;
    bottom: 12px;
    height: 34px;
    font-size: 11px;
  }

  .notfound {
    min-height: calc(100vh - 140px);
  }

  .notfound-card {
    padding: 26px 22px;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .hero h1 {
    font-size: clamp(42px, 13.5vw, 56px);
  }

  .entry-card {
    padding: 16px;
    border-radius: 20px;
  }

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

  .join-row .btn {
    width: 100%;
  }

  .art-screen {
    aspect-ratio: 16 / 9.6;
  }

  .art-queue {
    width: 72%;
    min-width: 210px;
    right: -6px;
    bottom: -40px;
  }

  .art-people {
    top: -14px;
  }

  .room-name {
    display: none;
  }

  .presence .avatar:nth-child(n + 4) {
    display: none;
  }

  .queue-item {
    grid-template-columns: 14px 18px 54px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 6px;
  }

  .q-drag {
    width: 14px;
    height: 28px;
  }

  .q-drag svg {
    opacity: 0.8;
  }

  .q-thumb {
    width: 54px;
  }

  .q-title {
    font-size: 12px;
  }

  .q-meta {
    font-size: 10px;
  }

  .q-action {
    width: 24px;
    height: 24px;
  }

  .sound-pill span {
    display: none;
  }

  .sound-pill {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}

@media (hover: none) {
  .q-actions {
    opacity: 1;
    transform: none;
  }
}

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