/* ==========================================================================
   LyricBingo V2 — Mobile scroll + host phone validator
   ========================================================================== */

/* Keep V2 root scrollable when legacy loader arms bd-content-armed */
html.lb-v2-html.bd-content-armed #lb-v2-root,
html.lb-v2-html.bd-page-loading #lb-v2-root {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── Phone validator (host scan) ── */
.v2-mobile-scan {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-mobile-scan header h1 {
  margin: 8px 0 4px;
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.v2-mobile-scan header p {
  margin: 0;
  color: var(--pro-muted, #b3b3b3);
  font-size: 15px;
}

.v2-scan-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: #000;
  aspect-ratio: 1 / 1;
  max-height: min(72vw, 360px);
  margin: 0 auto;
  width: 100%;
}

.v2-scan-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v2-scan-manual {
  display: grid;
  gap: 10px;
}

.v2-scan-manual label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-muted, #b3b3b3);
}

.v2-scan-manual input {
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--pro-border-strong, rgba(255, 255, 255, 0.14));
  background: var(--pro-elevated, #181818);
  color: var(--pro-text, #fff);
  font-size: 22px;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 0 12px;
}

.v2-scan-result {
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
}

.v2-scan-result.is-winner {
  border-color: rgba(30, 215, 96, 0.45);
  background: rgba(30, 215, 96, 0.12);
}

.v2-scan-result.is-miss {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.v2-scan-result h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.v2-scan-result p {
  margin: 0;
  color: var(--pro-muted, #b3b3b3);
  font-size: 14px;
}

.v2-host-handoff-page {
  justify-content: center;
  text-align: center;
  padding-top: clamp(48px, 18vh, 120px);
}

.v2-host-handoff-page .v2-lead {
  max-width: 28ch;
  margin: 0 auto 20px;
  line-height: 1.55;
}

.v2-host-handoff-page .v2-btn--lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 17px;
  margin: 0 auto;
}

.v2-scan-login-banner {
  display: grid;
  gap: 4px;
  text-align: center;
  padding: 16px 18px;
  margin-bottom: 8px;
  border-radius: 16px;
  border: 1px solid rgba(30, 215, 96, 0.45);
  background: linear-gradient(145deg, rgba(30, 215, 96, 0.18), rgba(30, 215, 96, 0.08));
  box-shadow: 0 12px 32px rgba(30, 215, 96, 0.12);
  animation: v2-login-banner-in 0.45s ease both;
}

.v2-scan-login-banner strong {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #b8ffcf;
}

.v2-scan-login-banner span:last-child {
  color: var(--pro-muted, #b3b3b3);
  font-size: 14px;
  line-height: 1.45;
}

.v2-scan-login-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 2px;
  border-radius: 999px;
  background: rgba(30, 215, 96, 0.22);
  color: #1ed760;
  font-size: 22px;
  font-weight: 900;
}

@keyframes v2-login-banner-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .v2-host-topbar {
    flex-direction: column;
  }

  .v2-host-utilitybar {
    width: 100%;
    justify-content: flex-start;
  }

  .v2-host-scan-qr {
    flex-direction: row;
    max-width: none;
    align-items: center;
    text-align: left;
    gap: 10px;
  }

  .v2-host-scan-qr span {
    max-width: 14ch;
  }
}

/* ── Bingo card song text (override legacy v2 tiny clamps) ── */
.v2-player-stage .bingo-card {
  font-size: clamp(12px, 2.8vw, 16px) !important;
}

.v2-player-stage .bd-digital-card--mobile .bingo-song-title,
.lb-v2 .v2-mobile-card-only .bingo-song-title {
  font-size: clamp(0.875rem, 3.4vw, 1.1875rem) !important;
  line-height: 1.1 !important;
  -webkit-line-clamp: 3 !important;
}

.v2-player-stage .bd-digital-card--mobile .bingo-song-artist,
.lb-v2 .v2-mobile-card-only .bingo-song-artist {
  font-size: clamp(0.75rem, 2.8vw, 1rem) !important;
  line-height: 1.08 !important;
  -webkit-line-clamp: 2 !important;
}

.v2-player-stage .v2-player-cell strong,
.lb-v2 .v2-mobile-card-only .v2-player-cell strong {
  font-size: clamp(0.875rem, 3.4vw, 1.1875rem) !important;
  line-height: 1.1 !important;
  -webkit-line-clamp: 3 !important;
}

.v2-player-stage .v2-player-cell small,
.lb-v2 .v2-mobile-card-only .v2-player-cell small {
  display: block !important;
  font-size: clamp(0.75rem, 2.8vw, 1rem) !important;
  line-height: 1.08 !important;
  -webkit-line-clamp: 2 !important;
}

@media (max-width: 680px) {
  .v2-player-stage .bd-digital-card--mobile .bingo-song-title,
  .lb-v2 .v2-mobile-card-only .bingo-song-title,
  .v2-player-stage .v2-player-cell strong,
  .lb-v2 .v2-mobile-card-only .v2-player-cell strong {
    font-size: clamp(0.8125rem, 3.6vw, 1.125rem) !important;
  }

  .v2-player-stage .bd-digital-card--mobile .bingo-song-artist,
  .lb-v2 .v2-mobile-card-only .bingo-song-artist,
  .v2-player-stage .v2-player-cell small,
  .lb-v2 .v2-mobile-card-only .v2-player-cell small {
    font-size: clamp(0.6875rem, 3vw, 0.9375rem) !important;
  }
}

@media print {
  .print-page .bingo-song-title,
  body.printing-bingo-cards .print-page .bingo-song-title {
    font-size: 8pt !important;
    line-height: 1.12 !important;
  }

  .print-page .bingo-song-artist,
  body.printing-bingo-cards .print-page .bingo-song-artist {
    font-size: 7pt !important;
    line-height: 1.1 !important;
  }
}
