/* ═══════════════════════════════════════════════════════════════════
   JAM INFINITA: estilo
   Um app para namorados: escuro, quente, com a música no centro.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f6f2ee;
  --muted: #a49fb1;
  --faint: #6f6a7d;

  --rose: #ff6f8b;
  --rose-deep: #e8456b;
  --apricot: #ffb26b;
  --gold: #ffd479;
  --amber: #ffd0a0;
  --mint: #62e6c4;

  --grad-warm: linear-gradient(120deg, #ff6f8b 0%, #ff9a6b 52%, #ffd479 100%);

  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;

  --shadow-card: 0 18px 44px -28px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-warm: 0 22px 54px -38px rgba(255, 111, 139, 0.45);

  --font-display: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58% 48% at 10% 2%, rgba(255, 111, 139, 0.2) 0%, transparent 70%),
    radial-gradient(52% 44% at 94% 10%, rgba(255, 178, 107, 0.14) 0%, transparent 72%),
    radial-gradient(64% 56% at 52% 110%, rgba(98, 230, 196, 0.08) 0%, transparent 74%),
    var(--bg);
}

::selection {
  background: rgba(255, 111, 139, 0.32);
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}

p {
  margin: 0;
}

/* ── Peças reutilizáveis ────────────────────────────────────────── */

.eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.chip strong {
  color: var(--text);
  font-weight: 600;
}

.chip--live {
  border-color: rgba(255, 111, 139, 0.32);
  background: rgba(255, 111, 139, 0.09);
  color: #ffc4d0;
}

a.chip {
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

a.chip:hover {
  background: rgba(255, 111, 139, 0.16);
  border-color: rgba(255, 111, 139, 0.5);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.dot--on {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(98, 230, 196, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}

.dot--warm {
  background: var(--rose);
  box-shadow: 0 0 0 3px rgba(255, 111, 139, 0.16);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s, opacity 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.975);
}

.btn:focus-visible,
.icon-btn:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--grad-warm);
  color: #24101a;
  box-shadow: 0 14px 40px -16px rgba(255, 122, 122, 0.75);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -18px rgba(255, 122, 122, 0.9);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn--quiet {
  color: var(--muted);
  padding: 8px 12px;
}

.btn--quiet:hover {
  color: var(--text);
}

.btn--sm {
  padding: 9px 15px;
  font-size: 0.85rem;
}

.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  flex: none;
}

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

.icon-btn:active {
  transform: scale(0.94);
}

.card {
  background:
    linear-gradient(165deg, rgba(37, 34, 47, 0.95) 0%, rgba(24, 23, 32, 0.97) 55%, rgba(18, 17, 24, 0.98) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING
   ═══════════════════════════════════════════════════════════════════ */

.landing {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  width: min(1240px, 100% - 56px);
  margin: 0 auto;
  padding: clamp(40px, 7vh, 90px) 0;
}

.landing__intro {
  max-width: 560px;
  animation: rise 0.9s var(--ease) both;
}

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

.brandline {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.heart-mark {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--rose);
  filter: drop-shadow(0 0 12px rgba(255, 111, 139, 0.6));
}

.landing h1 {
  margin: 26px 0 20px;
  font-size: clamp(2.9rem, 6.4vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.landing h1 em {
  font-style: normal;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}

.landing__lede {
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

.landing__lede strong {
  color: var(--text);
  font-weight: 500;
}

/* Mini "janela" decorativa com duas capas se encontrando */
.meet {
  margin-top: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 96px;
}

.meet__cover {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(255, 255, 255, 0.32), transparent 60%),
    linear-gradient(140deg, #ff6f8b, #7a2d55 60%, #2b1230);
  box-shadow: 0 20px 50px -22px rgba(255, 111, 139, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  animation: sway 7s var(--ease) infinite alternate;
}

.meet__cover:last-child {
  border-radius: 50%;
  background:
    radial-gradient(70% 70% at 30% 25%, rgba(255, 255, 255, 0.26), transparent 58%),
    conic-gradient(from 210deg, #ffb26b, #b0523a, #2b1a2e, #ffb26b);
  animation: sway 7s var(--ease) infinite alternate-reverse;
}

.meet__cover:last-child::after {
  content: '';
  position: absolute;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: rgba(12, 10, 16, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.meet__link {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 111, 139, 0.55), rgba(255, 178, 107, 0.55), transparent);
  position: relative;
}

.meet__link::after {
  content: '';
  position: absolute;
  left: 0;
  top: -1.5px;
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: var(--grad-warm);
  filter: blur(0.3px);
  animation: travel 3.4s linear infinite;
}

@keyframes sway {
  to {
    transform: translateY(-9px) rotate(-2.4deg);
  }
}

@keyframes travel {
  from {
    left: 0;
    opacity: 0;
  }
  12%,
  88% {
    opacity: 1;
  }
  to {
    left: calc(100% - 26px);
    opacity: 0;
  }
}

.landing__points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 34px;
}

/* Painel de entrada */
.enter {
  width: 100%;
  max-width: 470px;
  justify-self: end;
  padding: 26px;
  animation: rise 0.9s 0.12s var(--ease) both;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}

.tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 11px 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.25s, color 0.25s;
}

.tab[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.panel {
  display: none;
}

.panel[data-active='true'] {
  display: block;
  animation: fade 0.35s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.field {
  display: block;
  margin-bottom: 15px;
}

.field > span {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: border-color 0.2s, background 0.2s;
}

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

.input:focus {
  border-color: rgba(255, 111, 139, 0.55);
  background: rgba(0, 0, 0, 0.42);
}

.input--code {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  padding: 16px 10px 16px 22px;
}

.enter .btn--primary {
  width: 100%;
  margin-top: 6px;
}

.enter__hint {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--faint);
  text-align: center;
  line-height: 1.6;
}

.enter__error {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 111, 139, 0.3);
  background: rgba(255, 111, 139, 0.08);
  color: #ffc4d0;
  font-size: 0.85rem;
  display: none;
}

.enter__error[data-show='true'] {
  display: block;
  animation: fade 0.3s ease both;
}

.spotify-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.5;
}

/* Código da sala */
.code-reveal {
  display: none;
  text-align: center;
  animation: fade 0.4s ease both;
}

.code-reveal[data-show='true'] {
  display: block;
}

.code-reveal__label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.code-reveal__code {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 10px 0 6px;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.code-reveal__sub {
  color: var(--muted);
  font-size: 0.87rem;
  margin-bottom: 22px;
}

.code-reveal__actions {
  display: grid;
  gap: 9px;
}

/* Configuração do Spotify */
.setup {
  width: 100%;
  max-width: 470px;
  justify-self: end;
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--muted);
}

.setup > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  cursor: pointer;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.setup > summary::-webkit-details-marker {
  display: none;
}

.setup > summary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.setup[open] > summary {
  border-style: solid;
  border-color: rgba(255, 178, 107, 0.3);
  background: rgba(255, 178, 107, 0.06);
  color: var(--amber, #ffd0a0);
}

.setup__body {
  padding: 16px 4px 4px;
  line-height: 1.7;
}

.setup__body ol {
  margin: 0 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}

.setup__body code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5px 6px;
  color: var(--gold);
  word-break: break-all;
}

.setup__body a {
  color: var(--gold);
  text-decoration-color: rgba(255, 212, 121, 0.4);
}

.statusline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--faint);
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   APP
   ═══════════════════════════════════════════════════════════════════ */

.app {
  width: min(1320px, 100% - 44px);
  margin: 0 auto;
  padding: 26px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 15, 21, 0.94);
  position: sticky;
  top: 14px;
  z-index: 20;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__brand .heart-mark {
  width: 19px;
  height: 19px;
}

.topbar__title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__sub {
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.roomcode {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.roomcode__label {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.roomcode button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.roomcode button:hover {
  background: rgba(255, 111, 139, 0.22);
  color: #ffd9e0;
}

.livebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 34px 2px 20px;
}

.livebar__status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

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

/* ── Pausa sincronizada ─────────────────────────────────────────── */

.syncbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -4px 2px 18px;
}

.sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sync-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.sync-toggle__switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
  flex: none;
}

.sync-toggle__switch::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b9b3c6;
  transition: transform 0.2s var(--ease), background 0.2s;
}

.sync-toggle[aria-pressed='true'] {
  border-color: rgba(98, 230, 196, 0.28);
  background: rgba(98, 230, 196, 0.07);
  color: #c9fff1;
}

.sync-toggle[aria-pressed='true'] .sync-toggle__switch {
  background: rgba(98, 230, 196, 0.3);
}

.sync-toggle[aria-pressed='true'] .sync-toggle__switch::after {
  transform: translateX(14px);
  background: var(--mint);
}

.syncbar__hint {
  font-size: 0.72rem;
  color: var(--faint);
  min-height: 18px;
}

.syncbar__hint[data-error='true'] {
  color: #ffc4d0;
}

/* ── Duas pessoas lado a lado ───────────────────────────────────── */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.2vw, 26px);
  align-items: stretch;
}

.person {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 2.4vw, 30px);
  min-height: 430px;
  overflow: hidden;
  contain: layout paint;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease);
}

.person::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: radial-gradient(80% 60% at 50% 0%, rgba(255, 111, 139, 0.14), transparent 70%);
}

.person[data-playing='true']::before {
  opacity: 1;
}

.person--partner[data-playing='true'] {
  border-color: rgba(255, 111, 139, 0.24);
  box-shadow: var(--shadow-card), var(--shadow-warm);
}

.person__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #221d28;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.9);
}

.avatar-wrap {
  display: inline-flex;
  flex: none;
  width: 46px;
  height: 46px;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: #2a1420;
  background: var(--grad-warm);
}

.person__who {
  min-width: 0;
  flex: 1;
}

.person__name {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.you-tag {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px 6px;
  flex: none;
}

.person__state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 3px;
}

.premium-tag {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 212, 121, 0.28);
  background: rgba(255, 212, 121, 0.07);
  border-radius: 5px;
  padding: 1px 5px;
}

/* Disco / capa */
.disc-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin: 2px 0 4px;
}

.disc {
  position: relative;
  width: clamp(168px, 21vw, 236px);
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  background: #15121a;
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.6s var(--ease), filter 0.5s;
  isolation: isolate;
}

.disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.disc__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.disc::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -60px 80px -50px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.disc[data-playing='true'] {
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, 0.95), 0 0 40px -18px rgba(255, 111, 139, 0.35);
}

.disc__empty {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 100% at 30% 10%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(150deg, #1d1922, #121016);
  color: var(--faint);
}

/* equalizador */
.eq {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 12, 17, 0.92);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.4s;
}

.person[data-playing='true'] .eq {
  opacity: 1;
}

.eq i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--rose), var(--apricot));
  height: 35%;
  animation: bounce 1s ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-delay: -0.25s;
  height: 70%;
}

.eq i:nth-child(3) {
  animation-delay: -0.5s;
  height: 45%;
}

.eq i:nth-child(4) {
  animation-delay: -0.12s;
  height: 85%;
}

@keyframes bounce {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

/* Informações da faixa */
.track {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
}

.track__name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.7vw, 1.42rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.track__artist {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track__album {
  font-size: 0.76rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track--empty .track__name {
  color: var(--muted);
  font-weight: 500;
}

.track--empty .track__artist {
  color: var(--faint);
}

/* Barra de progresso */
.progress {
  display: flex;
  align-items: center;
  gap: 11px;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--faint);
}

.progress__track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.progress__fill {
  position: absolute;
  inset: 0;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: inherit;
  background: var(--grad-warm);
  transition: transform 0.5s linear;
  will-change: transform;
}

.progress__time {
  flex: none;
  min-width: 34px;
}

.progress__time--right {
  text-align: right;
}

/* Rodapé do cartão */
.person__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.device {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: var(--faint);
  min-width: 0;
}

.device span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person__actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

/* Botão de reação */
.react-wrap {
  position: relative;
}

.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 111, 139, 0.28);
  background: rgba(255, 111, 139, 0.09);
  color: #ffc4d0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s var(--ease), border-color 0.2s;
}

.react-btn:hover {
  background: rgba(255, 111, 139, 0.18);
  border-color: rgba(255, 111, 139, 0.5);
}

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

.react-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  display: none;
  gap: 2px;
  padding: 7px;
  border-radius: 16px;
  background: #1b1a23;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.95);
  z-index: 12;
}

.react-pop[data-open='true'] {
  display: flex;
  animation: pop 0.28s var(--ease) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.94);
  }
}

.react-pop button {
  border: 0;
  background: transparent;
  font-size: 1.28rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  transition: background 0.16s, transform 0.16s;
}

.react-pop button:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.16);
}

/* Voando: corações recebidos */
.reactions-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9;
  border-radius: inherit;
}

.float-heart {
  position: absolute;
  bottom: 14%;
  font-size: 1.6rem;
  animation: floatUp 3.1s var(--ease) forwards;
  filter: drop-shadow(0 6px 14px rgba(255, 111, 139, 0.5));
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(0, 20px) scale(0.5) rotate(var(--r, 0deg));
  }
  12% {
    opacity: 1;
    transform: translate(0, 0) scale(1.15) rotate(var(--r, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 12px), -320px) scale(0.75) rotate(var(--r2, 12deg));
  }
}

/* Estado vazio / esqueleto do parceiro */
.person--ghost {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: var(--line-strong);
  background: rgba(20, 20, 28, 0.42);
}

.ghost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  flex: 1;
  padding: 26px 14px;
  min-height: 250px;
}

.ghost__icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  color: var(--faint);
  background: rgba(255, 255, 255, 0.02);
}

.ghost h3 {
  font-size: 1.06rem;
}

.ghost p {
  font-size: 0.84rem;
  color: var(--muted);
  max-width: 240px;
  line-height: 1.6;
}

.ghost__code {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
  padding: 7px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 212, 121, 0.34);
  background: rgba(255, 212, 121, 0.06);
}

.alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 0.79rem;
  line-height: 1.5;
  border: 1px solid rgba(255, 178, 107, 0.26);
  background: rgba(255, 178, 107, 0.07);
  color: #ffd6ac;
}

.alert[data-show='true'] {
  display: flex;
}

.alert--error {
  border-color: rgba(255, 111, 139, 0.3);
  background: rgba(255, 111, 139, 0.08);
  color: #ffc4d0;
}

/* ── Linha do tempo compartilhada ───────────────────────────────── */

.section {
  margin-top: clamp(28px, 4vw, 46px);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.section__title {
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
}

.section__sub {
  font-size: 0.8rem;
  color: var(--faint);
  margin-top: 5px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 11px;
}

.tl-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  transition: background 0.22s, border-color 0.22s, transform 0.22s var(--ease);
  animation: fade 0.4s ease both;
}

.tl-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.tl-item__art {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  flex: none;
  background: #1b1720;
}

.tl-item__body {
  min-width: 0;
  flex: 1;
}

.tl-item__name {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-item__meta {
  font-size: 0.71rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.tl-item__who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.tl-item__who img {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.tl-item__time {
  font-size: 0.66rem;
  color: var(--faint);
  flex: none;
  align-self: flex-start;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}

.timeline-empty {
  padding: 26px;
  text-align: center;
  color: var(--faint);
  font-size: 0.85rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

/* ── Rodapé ─────────────────────────────────────────────────────── */

.foot {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--faint);
  padding: 0 4px;
}

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

.foot a,
.foot button.linklike {
  color: var(--faint);
  text-decoration: none;
  border: 0;
  background: none;
  padding: 0;
  font-size: inherit;
  transition: color 0.2s;
}

.foot a:hover,
.foot button.linklike:hover {
  color: var(--text);
}

/* ── Toasts ─────────────────────────────────────────────────────── */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, calc(100% - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 11px 17px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #1c1b24;
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.95);
  font-size: 0.85rem;
  color: var(--text);
  animation: toastIn 0.35s var(--ease) both;
  line-height: 1.4;
}

.toast[data-kind='error'] {
  border-color: rgba(255, 111, 139, 0.36);
  background: rgba(46, 18, 28, 0.95);
  color: #ffd3dc;
}

.toast[data-kind='good'] {
  border-color: rgba(98, 230, 196, 0.3);
  background: rgba(14, 38, 33, 0.95);
  color: #c9fff1;
}

.toast[data-leaving='true'] {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

/* ── Modal ──────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(6, 6, 9, 0.82);
}

.modal[data-open='true'] {
  display: grid;
  animation: fade 0.25s ease both;
}

.modal__card {
  width: min(520px, 100%);
  padding: 26px;
  max-height: 86dvh;
  overflow: auto;
  animation: rise 0.35s var(--ease) both;
}

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

.modal__title {
  font-size: 1.4rem;
}

.modal__body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.modal__body h4 {
  color: var(--text);
  font-size: 0.95rem;
  margin: 20px 0 8px;
}

.modal__body ol,
.modal__body ul {
  padding-left: 20px;
  margin: 0 0 10px;
  display: grid;
  gap: 8px;
}

.modal__body code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.82em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--gold);
  word-break: break-all;
}

.modal__body a {
  color: var(--gold);
}

.modal__foot {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.kbd {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text);
}

/* ── Carregando ─────────────────────────────────────────────────── */

.skeleton {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.skeleton__heart {
  width: 46px;
  height: 46px;
  color: var(--rose);
  animation: thump 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(255, 111, 139, 0.5));
}

@keyframes thump {
  0%,
  100% {
    transform: scale(1);
  }
  18% {
    transform: scale(1.16);
  }
  32% {
    transform: scale(0.98);
  }
  46% {
    transform: scale(1.08);
  }
}

/* ── Responsivo ─────────────────────────────────────────────────── */

@media (max-width: 1020px) {
  .landing {
    grid-template-columns: 1fr;
    gap: 36px;
    width: min(620px, 100% - 40px);
    padding: 46px 0 60px;
  }

  .landing__intro {
    max-width: none;
    text-align: center;
  }

  .meet {
    justify-content: center;
  }

  .landing__points {
    justify-content: center;
  }

  .landing__lede {
    margin-inline: auto;
  }

  .enter,
  .setup {
    justify-self: stretch;
    max-width: none;
    margin-inline: auto;
  }

  .duo {
    grid-template-columns: 1fr;
  }

  .person {
    min-height: 0;
  }

  .disc {
    width: min(240px, 54vw);
  }

  .topbar {
    position: static;
    padding: 11px 13px;
  }

  .topbar__sub {
    display: none;
  }
}

@media (max-width: 620px) {
  .app {
    width: calc(100% - 24px);
    padding-top: 14px;
  }

  .topbar__title {
    font-size: 0.86rem;
  }

  .roomcode__label {
    display: none;
  }

  .roomcode {
    padding-left: 11px;
    font-size: 0.78rem;
  }

  .livebar {
    margin-top: 22px;
  }

  .livebar__status {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .hide-sm {
    display: none !important;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .person {
    padding: 18px;
    gap: 16px;
  }

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

  .meet__cover {
    width: 74px;
    height: 74px;
  }

  .meet {
    height: 78px;
  }

  .enter {
    padding: 20px;
  }
}

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

/* Foco apenas para navegação por teclado */
.capsule-card {
  max-width: 460px;
}

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

.capsule-card__art {
  width: 100%;
  max-height: 230px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  background: #1b1720;
  border: 1px solid var(--line);
}

.capsule-card__from {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.capsule-card__song {
  font-size: 1.3rem;
  margin-top: 4px;
}

.capsule-card__artist {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.capsule-card__message {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.capsule-card__date {
  font-size: 0.72rem;
  color: var(--faint);
}

:focus:not(:focus-visible) {
  outline: none;
}
