/* BeatDesk Live Events — mode picker, display screen, guest join */

/* ── Mode picker ── */

.bd-event-mode-modal {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bd-event-mode-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 5, 15, 0.88);
  backdrop-filter: blur(6px);
}

.bd-event-mode-card {
  position: relative;
  width: min(100%, 32rem);
  padding: 1.75rem;
  border-radius: 16px;
  border: 2px solid var(--party-violet, #9d4edd);
  background: linear-gradient(160deg, #16102a, #0a0612);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.bd-event-mode-kicker {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--party-lime, #b8ff3c);
}

.bd-event-mode-card h2 {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: #fff8f0;
}

.bd-event-mode-card > p {
  margin: 0 0 1.25rem;
  color: var(--party-muted, #a89ec4);
  line-height: 1.55;
}

.bd-event-mode-options {
  display: grid;
  gap: 0.75rem;
}

.bd-event-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  width: 100%;
  padding: 1rem 1.125rem;
  border-radius: 12px;
  border: 2px solid rgba(157, 78, 221, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: #fff8f0;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.1s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.1s ease,
    background 0.1s ease;
}

.bd-event-mode-btn:active {
  transform: scale(0.99);
}

.bd-event-mode-btn:focus-visible {
  outline: 2px solid var(--party-lime, #b8ff3c);
  outline-offset: 2px;
}

.bd-event-mode-btn strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.bd-event-mode-btn span {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--party-muted, #a89ec4);
}

.bd-event-mode-btn:hover {
  border-color: var(--party-lime, #b8ff3c);
  background: rgba(184, 255, 60, 0.06);
}

.bd-event-mode-btn--online {
  border-color: rgba(255, 45, 149, 0.45);
}

.bd-event-mode-btn--online:hover {
  border-color: var(--party-hot, #ff2d95);
  background: rgba(255, 45, 149, 0.08);
}

.bd-event-mode-btn--locked {
  opacity: 0.88;
  border-style: dashed;
  cursor: pointer;
}

.bd-event-mode-btn--locked:hover {
  border-color: rgba(255, 214, 10, 0.55);
  background: rgba(255, 214, 10, 0.06);
}

.bd-event-mode-lock {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--party-gold, #ffd60a);
}

body.bd-event-mode-open {
  overflow: hidden;
}

/* ── Host dashboard — below music player ── */

.bd-host-console {
  max-width: min(100%, 72rem);
  width: 100%;
  margin: 0.75rem auto 0;
  padding: 0 var(--booth-pad, 1rem);
  order: 2;
}

.bd-host-page .game-player {
  order: 1;
}

.bd-host-console-shell {
  border-radius: 14px;
  border: 1px solid rgba(157, 78, 221, 0.28);
  background: linear-gradient(165deg, rgba(18, 14, 32, 0.94), rgba(8, 5, 15, 0.98));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

/* ── Control deck header ── */

.bd-control-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.bd-control-header__copy {
  flex: 1 1 14rem;
  min-width: 0;
}

.bd-control-header__kicker {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8ff3c;
}

.bd-control-header__hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #8a7fa8;
}

.bd-control-header__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.bd-control-live-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.bd-control-live-room {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.bd-control-live-room-label {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6288;
}

/* ── Quick actions row: prep + lobby ── */

.bd-control-quick {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-control-group {
  padding: 0.875rem 1rem;
  min-width: 0;
}

.bd-control-group--print {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-control-group-label {
  margin: 0 0 0.5rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6288;
}

.bd-host-toolbar-label {
  flex: 0 0 auto;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6288;
}

.bd-host-toolbar-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #8a7fa8;
  max-width: 28rem;
}

.bd-host-toolbar-hint--solo {
  margin-top: 0.35rem;
}

.bd-host-console-shell.is-live .bd-control-group--lobby .bd-host-console-actions--lobby {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.375rem;
  width: 100%;
}

.bd-host-console-badge-live,
.bd-host-console-badge-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bd-host-console-badge-live {
  border: 1px solid rgba(255, 45, 149, 0.45);
  background: rgba(255, 45, 149, 0.12);
  color: #ff2d95;
}

.bd-host-console-badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #ff2d95;
  box-shadow: 0 0 8px #ff2d95;
}

.bd-host-console-badge-offline {
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: rgba(157, 78, 221, 0.1);
  color: #c8bfd8;
}

.bd-host-console-badge-code {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.16em;
  color: #b8ff3c;
  line-height: 1;
}

.bd-host-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0;
}

.bd-host-console-shell.is-live .bd-host-console-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.bd-host-console-shell.is-live .bd-host-console-panel--game {
  order: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-left: none;
}

.bd-host-console-shell.is-live .bd-host-console-panel--sponsors {
  order: 2;
}

.bd-host-console-panel {
  padding: 0.875rem 1rem 1rem;
  min-width: 0;
}

.bd-host-console-panel--game {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-host-console-panel--game[hidden] {
  display: none !important;
}

.bd-host-console-shell:not(.is-live) .bd-host-console-grid {
  grid-template-columns: 1fr;
}

.bd-host-console-shell:not(.has-session) .bd-host-console-panel--game {
  display: none !important;
}

.bd-host-console-shell:not(.is-live) .bd-host-console-panel--sponsors {
  border-left: none;
}

.bd-host-panel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 0.75rem;
  margin-bottom: 0.625rem;
}

.bd-host-console-panel-title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00f0ff;
}

.bd-host-console-note {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: #8a7fa8;
  text-align: right;
}

.bd-host-console-note a {
  color: #b8ff3c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bd-host-console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.bd-host-btn {
  min-height: 2.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  border: 1px solid rgba(157, 78, 221, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: #fff8f0;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.1s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.1s ease,
    background 0.1s ease;
  white-space: nowrap;
}

.bd-host-btn:active {
  transform: scale(0.97);
}

.bd-host-btn:focus-visible {
  outline: 2px solid #b8ff3c;
  outline-offset: 2px;
}

.bd-host-btn:hover {
  border-color: rgba(184, 255, 60, 0.45);
  background: rgba(184, 255, 60, 0.06);
}

.bd-host-btn--primary {
  background: #b8ff3c;
  color: #0a0612;
  border-color: #b8ff3c;
}

.bd-host-btn--primary:hover {
  background: #d4ff7a;
  border-color: #d4ff7a;
}

.bd-host-btn--accent {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.45);
  color: #9efbff;
}

.bd-host-btn--accent:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: rgba(0, 240, 255, 0.65);
}

.bd-host-btn--locked {
  border-style: dashed;
  border-color: rgba(255, 214, 10, 0.45);
  color: #ffe08a;
  background: rgba(255, 214, 10, 0.06);
}

.bd-host-btn--locked:hover {
  border-color: rgba(255, 214, 10, 0.7);
  background: rgba(255, 214, 10, 0.12);
}

.bd-host-btn-lock {
  margin-right: 0.35rem;
}

.bd-host-btn--danger {
  border-color: rgba(255, 45, 149, 0.35);
  color: #ffb3d4;
}

.bd-sponsor-picks {
  display: grid;
  gap: 0.5rem;
}

.bd-sponsor-picks--inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bd-sponsor-pick-preview {
  min-height: 2rem;
}

.bd-host-console-subsection + .bd-host-console-subsection {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-host-players-details {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.5rem;
}

.bd-host-players-summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff2d95;
}

.bd-host-players-summary::-webkit-details-marker {
  display: none;
}

.bd-host-players-summary strong {
  color: #b8ff3c;
  margin-left: 0.25rem;
}

/* Hide duplicate print chips in hero — toolbar has them below the player */
.bd-host-page:has(#bd-host-console) .game-hero--detail .action-chip {
  display: none !important;
}

.bd-host-page .game-hero--detail .ui-icon-btn.is-fav,
.bd-host-page .game-hero--detail .ui-icon-btn[data-bde-favorite-btn].is-fav {
  color: var(--booth-hot, #ff2d95) !important;
}

.bd-sponsor-pick {
  display: grid;
  gap: 0.375rem;
}

.bd-sponsor-pick-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6288;
}

.bd-sponsor-select {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0.5rem 2rem 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(157, 78, 221, 0.28);
  background: rgba(8, 5, 15, 0.65);
  color: #fff8f0;
  font: inherit;
  font-size: 0.8125rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #a89ec4 50%),
    linear-gradient(135deg, #a89ec4 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% + 2px),
    calc(100% - 11px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.bd-sponsor-select:focus {
  outline: none;
  border-color: rgba(184, 255, 60, 0.55);
  box-shadow: 0 0 0 2px rgba(184, 255, 60, 0.12);
}

.bd-sponsor-pick-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.75rem;
  font-weight: 600;
  color: #c8bfd8;
}

.bd-sponsor-pick-preview img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  padding: 0.1rem;
}

.bd-sponsor-pick-fallback {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 4px;
  background: rgba(157, 78, 221, 0.35);
  color: #fff8f0;
  font-size: 0.75rem;
  font-weight: 800;
}

.bd-host-console-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff2d95;
}

.bd-host-console-subhead small {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #8a7fa8;
}

.bd-host-console-subhead strong {
  color: #b8ff3c;
  margin-left: 0.25rem;
}

.bd-host-pattern-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem;
}

.bd-host-pattern-btn {
  min-height: 2.25rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: #fff8f0;
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    transform 0.1s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.1s ease,
    background 0.1s ease,
    color 0.1s ease,
    box-shadow 0.1s ease;
}

.bd-host-pattern-btn:hover {
  border-color: rgba(184, 255, 60, 0.5);
  background: rgba(184, 255, 60, 0.08);
}

.bd-host-pattern-btn:active {
  transform: scale(0.97);
}

.bd-host-pattern-btn:focus-visible {
  outline: 2px solid #b8ff3c;
  outline-offset: 2px;
}

.bd-host-pattern-btn.is-active {
  border-color: #b8ff3c;
  background: rgba(184, 255, 60, 0.16);
  color: #b8ff3c;
  box-shadow: 0 0 0 1px rgba(184, 255, 60, 0.25);
}

.bd-host-players-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 10rem;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(157, 78, 221, 0.28);
  background: rgba(0, 0, 0, 0.18);
}

.bd-host-players-empty {
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  color: #8a7fa8;
  text-align: center;
}

.bd-host-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bd-host-player:last-child {
  border-bottom: none;
}

.bd-host-player-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff8f0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-host-player-time {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: #8a7fa8;
}

.bd-host-console-note {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #8a7fa8;
}

.bd-host-panel-top .bd-host-console-note {
  margin: 0;
  font-size: 0.6875rem;
  text-align: right;
}

.bd-host-sponsor-status {
  margin: 0.625rem 0 0;
  min-height: 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b8ff3c;
  opacity: 0;
  transition: opacity 0.2s;
}

.bd-host-sponsor-status.is-visible {
  opacity: 1;
}

@media (max-width: 1023px) {
  .bd-control-header {
    flex-direction: column;
    align-items: stretch;
  }

  .bd-control-header__status,
  .bd-control-live-badge,
  .bd-control-live-room {
    align-items: flex-start;
  }

  .bd-control-quick {
    grid-template-columns: 1fr;
  }

  .bd-control-group--print {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .bd-host-console-grid,
  .bd-host-console-shell.is-live .bd-host-console-grid {
    grid-template-columns: 1fr;
  }

  .bd-host-console-panel--game,
  .bd-host-console-shell.is-live .bd-host-console-panel--game {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .bd-host-console-shell.is-live .bd-host-console-panel--sponsors {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .bd-host-console-shell.is-live .bd-control-group--lobby .bd-host-console-actions--lobby {
    grid-template-columns: 1fr;
  }

  .bd-sponsor-picks--inline {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) {
  .bd-host-pattern-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bd-control-group .bd-host-console-actions,
  .bd-host-console-actions--lobby {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .bd-host-btn {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .bd-host-panel-top .bd-host-console-note {
    text-align: left;
    flex-basis: 100%;
  }

  .bd-sponsor-logo-row {
    grid-template-columns: 1fr;
  }

  .bd-sponsor-upload {
    width: 100%;
  }
}

/* ── Standalone event pages ── */

html.bd-event-page,
body.bd-event-page {
  height: 100%;
  overflow: hidden;
}

body.bd-event-page {
  overflow-x: clip;
}

body.bd-event-page .site-header,
body.bd-event-page footer {
  display: none !important;
}

#bd-event-mount {
  height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#bd-event-mount:has(.bd-display) {
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
}

/* ── Display screen (venue / projector) ── */

.bd-display {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #fff8f0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: #06040c;
}

.bd-display-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(157, 78, 221, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 100%, rgba(255, 45, 149, 0.25), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(0, 240, 255, 0.08), transparent 60%),
    #06040c;
}

.bd-display-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: bd-display-float 12s ease-in-out infinite;
}

.bd-display-orb--1 {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  left: -6rem;
  background: #9d4edd;
}

.bd-display-orb--2 {
  width: 22rem;
  height: 22rem;
  bottom: -6rem;
  right: 10%;
  background: #ff2d95;
  animation-delay: -4s;
}

.bd-display-orb--3 {
  width: 16rem;
  height: 16rem;
  top: 40%;
  left: 45%;
  background: #b8ff3c;
  animation-delay: -8s;
  opacity: 0.25;
}

@keyframes bd-display-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(2rem, -1.5rem) scale(1.08);
  }
}

.bd-display-head {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.875rem 1.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 5, 15, 0.72);
  backdrop-filter: blur(12px);
}

.bd-display-head-main {
  min-width: 0;
  flex: 1;
}

.bd-display-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.bd-display-brand img {
  width: 1.75rem;
  height: 1.75rem;
}

.bd-display-brand span {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff8f0;
}

.bd-display-brand em {
  font-style: normal;
  color: #ff2d95;
}

.bd-display-title {
  margin: 0;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff8f0 0%, #b8ff3c 45%, #00f0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.bd-display-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.bd-display-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 45, 149, 0.15);
  border: 1px solid rgba(255, 45, 149, 0.5);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff2d95;
}

.bd-display-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ff2d95;
  box-shadow: 0 0 10px #ff2d95;
  animation: bd-display-pulse 1.5s ease-in-out infinite;
}

@keyframes bd-display-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.bd-display-code {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: 0.18em;
  line-height: 1;
  padding: 0.35rem 1rem;
  border-radius: 10px;
  border: 2px solid rgba(184, 255, 60, 0.55);
  background: rgba(184, 255, 60, 0.1);
  color: #b8ff3c;
  box-shadow: 0 0 24px rgba(184, 255, 60, 0.2);
}

.bd-display-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.5rem 1.5rem max(0.75rem, env(safe-area-inset-bottom));
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bd-display-body--player {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(9rem, 24vh);
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.625rem;
}

.bd-display-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(13rem, 0.85fr);
  gap: 0.75rem;
  align-items: stretch;
  overflow: hidden;
}

.bd-display-pattern-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0.75rem 1rem 0.875rem;
  border-radius: 24px;
  border: 2px solid rgba(157, 78, 221, 0.45);
  background:
    linear-gradient(165deg, rgba(22, 16, 42, 0.92), rgba(8, 5, 15, 0.88)) padding-box,
    linear-gradient(135deg, rgba(255, 45, 149, 0.35), rgba(157, 78, 221, 0.35), rgba(0, 240, 255, 0.25)) border-box;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: bd-display-zone-glow 5s ease-in-out infinite;
}

.bd-display-pattern-zone.is-pattern-change {
  animation: bd-display-pattern-pop 0.65s ease;
}

@keyframes bd-display-zone-glow {
  0%,
  100% {
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.4),
      0 0 40px rgba(157, 78, 221, 0.12);
  }
  50% {
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.4),
      0 0 56px rgba(255, 45, 149, 0.18);
  }
}

@keyframes bd-display-pattern-pop {
  0% {
    transform: scale(0.98);
  }
  40% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.bd-display-note {
  position: absolute;
  font-size: clamp(2rem, 5vw, 4rem);
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  animation: bd-display-note-drift 18s ease-in-out infinite;
}

.bd-display-note--1 {
  top: 18%;
  left: 8%;
  color: rgba(255, 45, 149, 0.12);
}

.bd-display-note--2 {
  top: 62%;
  right: 12%;
  animation-delay: -5s;
  color: rgba(0, 240, 255, 0.1);
}

.bd-display-note--3 {
  bottom: 14%;
  left: 22%;
  animation-delay: -10s;
  color: rgba(184, 255, 60, 0.1);
}

.bd-display-note--4 {
  top: 32%;
  right: 28%;
  animation-delay: -14s;
}

@keyframes bd-display-note-drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(-8deg);
  }
  50% {
    transform: translate(1.5rem, -1rem) rotate(8deg);
  }
}

.bd-display-pattern-kicker {
  margin: 0 0 0.15rem;
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00f0ff;
}

.bd-display-pattern-title {
  margin: 0 0 0.35rem;
  flex-shrink: 0;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.35rem, 2.4vmin, 2.25rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff8f0, #b8ff3c 50%, #ff2d95);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bd-display-pattern-visual {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  max-width: min(16rem, 100%);
  margin: 0 auto 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd-display-pattern-visual .bd-pat {
  width: min(100%, min(22vmin, 13rem));
  max-height: 100%;
}

.bd-display-pattern-desc {
  margin: 0;
  flex-shrink: 0;
  max-width: 28rem;
  font-size: clamp(0.75rem, 1.15vmin, 0.9375rem);
  line-height: 1.35;
  color: #c8bfd8;
  font-weight: 500;
}

/* Pattern diagram (5×5) */
.bd-pat {
  width: 100%;
}

.bd-pat-letters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.bd-pat-letter {
  display: grid;
  place-items: center;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(0.875rem, 1.8vmin, 1.25rem);
  letter-spacing: 0.06em;
  color: #fff8f0;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.bd-pat-letter--n {
  color: #00f0ff;
}

.bd-pat-grid-wrap {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-height: min(22vmin, 12.5rem);
  margin: 0 auto;
  overflow: hidden;
}

.bd-pat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0.25rem;
  height: 100%;
}

.bd-pat-cell {
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bd-pat-cell--free {
  border-color: rgba(255, 45, 149, 0.65);
  background: linear-gradient(145deg, rgba(255, 45, 149, 0.55), rgba(157, 78, 221, 0.55));
  box-shadow: 0 0 20px rgba(255, 45, 149, 0.35);
  animation: bd-pat-free-pulse 2.5s ease-in-out infinite;
}

.bd-pat-cell--free span {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(0.5rem, 1.1vmin, 0.6875rem);
  letter-spacing: 0.08em;
  color: #fff8f0;
}

.bd-pat-cell--win {
  border-color: rgba(184, 255, 60, 0.75);
  background: rgba(184, 255, 60, 0.22);
  box-shadow: 0 0 18px rgba(184, 255, 60, 0.35);
  animation: bd-pat-win-pulse 2.2s ease-in-out infinite;
  animation-delay: calc((var(--cell-r) + var(--cell-c)) * 0.08s);
}

@keyframes bd-pat-free-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 45, 149, 0.35);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(255, 45, 149, 0.55);
  }
}

@keyframes bd-pat-win-pulse {
  0%,
  100% {
    background: rgba(184, 255, 60, 0.18);
    box-shadow: 0 0 12px rgba(184, 255, 60, 0.25);
  }
  50% {
    background: rgba(184, 255, 60, 0.38);
    box-shadow: 0 0 24px rgba(184, 255, 60, 0.55);
  }
}

.bd-pat-lines {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0.25rem;
  pointer-events: none;
}

.bd-pat-line {
  opacity: 0;
  border-radius: 12px;
  border: 3px solid #b8ff3c;
  background: rgba(184, 255, 60, 0.12);
  box-shadow:
    0 0 24px rgba(184, 255, 60, 0.45),
    inset 0 0 16px rgba(184, 255, 60, 0.15);
  animation: bd-pat-line-blink 12s linear infinite;
}

.bd-pat-line--row {
  grid-column: 1 / -1;
  grid-row: calc(var(--line-i) + 1);
}

.bd-pat-line--col {
  grid-row: 1 / -1;
  grid-column: calc(var(--line-i) + 1);
}

.bd-pat-line--diag {
  grid-area: 1 / 1 / 6 / 6;
  border-radius: 16px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.bd-pat-line--diag-a {
  background: linear-gradient(
    135deg,
    transparent 46%,
    rgba(184, 255, 60, 0.55) 48%,
    rgba(184, 255, 60, 0.55) 52%,
    transparent 54%
  );
}

.bd-pat-line--diag-b {
  background: linear-gradient(
    45deg,
    transparent 46%,
    rgba(184, 255, 60, 0.55) 48%,
    rgba(184, 255, 60, 0.55) 52%,
    transparent 54%
  );
}

.bd-pat-line:nth-child(1) { animation-delay: 0s; }
.bd-pat-line:nth-child(2) { animation-delay: -1s; }
.bd-pat-line:nth-child(3) { animation-delay: -2s; }
.bd-pat-line:nth-child(4) { animation-delay: -3s; }
.bd-pat-line:nth-child(5) { animation-delay: -4s; }
.bd-pat-line:nth-child(6) { animation-delay: -5s; }
.bd-pat-line:nth-child(7) { animation-delay: -6s; }
.bd-pat-line:nth-child(8) { animation-delay: -7s; }
.bd-pat-line:nth-child(9) { animation-delay: -8s; }
.bd-pat-line:nth-child(10) { animation-delay: -9s; }
.bd-pat-line:nth-child(11) { animation-delay: -10s; }
.bd-pat-line:nth-child(12) { animation-delay: -11s; }

@keyframes bd-pat-line-blink {
  0%,
  6% {
    opacity: 1;
  }
  8.5%,
  100% {
    opacity: 0;
  }
}

.bd-display-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.bd-display-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
  min-width: 0;
}

.bd-display-metrics {
  display: contents;
}

.bd-display-metric {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 9, 22, 0.88);
  backdrop-filter: blur(8px);
}

.bd-display-metric--songs {
  border-color: rgba(157, 78, 221, 0.45);
}

.bd-display-metric-ring {
  --pct: 0;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: conic-gradient(#b8ff3c calc(var(--pct) * 1%), rgba(255, 255, 255, 0.08) 0);
  display: grid;
  place-items: center;
}

.bd-display-metric-ring span {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #0c0916;
  border: 2px solid rgba(184, 255, 60, 0.35);
}

.bd-display-metric--songs.is-bump .bd-display-metric-value {
  animation: bd-display-count-bump 0.55s ease;
}

@keyframes bd-display-count-bump {
  0% {
    transform: scale(1);
    color: #fff8f0;
  }
  35% {
    transform: scale(1.18);
    color: #b8ff3c;
  }
  100% {
    transform: scale(1);
    color: #fff8f0;
  }
}

.bd-display-metric--players {
  border-color: rgba(0, 240, 255, 0.35);
}

.bd-display-metric--bingo {
  border-color: rgba(255, 45, 149, 0.5);
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.12), rgba(12, 9, 22, 0.9));
  animation: bd-display-bingo-glow 3s ease-in-out infinite;
}

@keyframes bd-display-bingo-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 45, 149, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 45, 149, 0.25);
  }
}

.bd-display-metric-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.bd-display-metric-copy {
  min-width: 0;
  text-align: left;
}

.bd-display-metric-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7fa8;
  margin-bottom: 0.15rem;
}

.bd-display-metric-value {
  display: block;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.5rem, 2.5vmin, 2.25rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff8f0;
  white-space: nowrap;
}

.bd-display-metric-of {
  font-size: 0.55em;
  color: #6b6288;
}

.bd-display-metric-value--shout {
  color: #ff2d95;
  text-shadow: 0 0 20px rgba(255, 45, 149, 0.45);
  animation: bd-display-shout-pulse 1.8s ease-in-out infinite;
}

@keyframes bd-display-shout-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.bd-display-metric-sub {
  display: none;
}

.bd-display-playbook {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
  align-items: stretch;
}

.bd-display-play-step {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: clamp(0.875rem, 1.8vh, 1.35rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 5, 15, 0.88);
  text-align: left;
  min-width: 0;
}

.bd-display-play-step--bingo {
  border-color: rgba(255, 45, 149, 0.55);
  background: rgba(255, 45, 149, 0.12);
}

.bd-display-play-num {
  flex-shrink: 0;
  width: clamp(2.25rem, 4.5vmin, 3rem);
  height: clamp(2.25rem, 4.5vmin, 3rem);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(157, 78, 221, 0.4);
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.25rem, 2.5vmin, 1.75rem);
  color: #fff8f0;
}

.bd-display-play-step strong {
  display: block;
  font-size: clamp(1.25rem, 2.4vmin, 1.875rem);
  font-weight: 700;
  color: #fff8f0;
  margin-bottom: 0.2rem;
  line-height: 1.15;
}

.bd-display-play-step span {
  display: block;
  font-size: clamp(0.9375rem, 1.7vmin, 1.1875rem);
  line-height: 1.35;
  color: #b8afd0;
}

.bd-display-loading,
.bd-display-error {
  margin: auto;
  text-align: center;
  padding: 3rem 1rem;
  color: #a89ec4;
  font-size: 1.125rem;
}

.bd-display-sponsors-bar {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: 0.35rem 1.5rem 0.625rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.bd-display-sponsors-bar[hidden] {
  display: none !important;
}

.bd-display-sponsors-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  border: 2px solid rgba(184, 255, 60, 0.35);
  background: rgba(8, 5, 15, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.bd-display-sponsors-label {
  margin: 0;
  font-size: clamp(0.75rem, 1.3vmin, 1rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8ff3c;
}

.bd-display-sponsors-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem 2.5rem;
  width: 100%;
}

.bd-display-sponsor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-width: 8rem;
  max-width: 14rem;
  text-align: center;
}

.bd-display-sponsor-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(3.5rem, 6.5vmin, 5.5rem);
  width: 100%;
}

.bd-display-sponsor-logo {
  display: block;
  height: clamp(3.25rem, 6vmin, 5rem);
  width: auto;
  max-width: 12rem;
  object-fit: contain;
  background: #fff;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.bd-display-sponsor-fallback {
  display: grid;
  place-items: center;
  width: clamp(3rem, 5.5vmin, 4.25rem);
  height: clamp(3rem, 5.5vmin, 4.25rem);
  border-radius: 10px;
  background: linear-gradient(145deg, #9d4edd, #ff2d95);
  color: #fff8f0;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.5rem, 2.8vmin, 2rem);
  font-weight: 700;
  line-height: 1;
}

.bd-display-sponsor-name {
  display: block;
  width: 100%;
  font-size: clamp(1rem, 1.75vmin, 1.3125rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #fff8f0;
  white-space: normal;
  word-break: break-word;
}

.bd-display-join-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.875rem 1rem;
  border-radius: 20px;
  border: 2px solid transparent;
  background:
    linear-gradient(160deg, rgba(22, 16, 42, 0.95), rgba(10, 6, 18, 0.98)) padding-box,
    linear-gradient(145deg, #ff2d95, #9d4edd, #00f0ff, #b8ff3c) border-box;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(255, 45, 149, 0.12);
  animation: bd-display-join-glow 4s ease-in-out infinite;
  overflow: hidden;
}

.bd-display-join-card--paper {
  background:
    linear-gradient(160deg, rgba(22, 16, 42, 0.95), rgba(10, 6, 18, 0.98)) padding-box,
    linear-gradient(145deg, #b8ff3c, #00f0ff, #9d4edd) border-box;
}

.bd-display-room-code {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #a89ec4;
}

.bd-display-room-code strong {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  color: #b8ff3c;
  margin-left: 0.35rem;
}

@keyframes bd-display-join-glow {
  0%,
  100% {
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.45),
      0 0 30px rgba(255, 45, 149, 0.15);
  }
  50% {
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.45),
      0 0 50px rgba(157, 78, 221, 0.25);
  }
}

.bd-display-join-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00f0ff;
}

.bd-display-join-card h2 {
  margin: 0 0 0.35rem;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.5rem, 2.8vmin, 2.25rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff8f0;
}

.bd-display-join-card > p {
  margin: 0 0 0.625rem;
  font-size: clamp(0.8125rem, 1.4vmin, 1rem);
  line-height: 1.35;
  color: #a89ec4;
  max-width: 16rem;
}

.bd-display-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0.625rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  line-height: 0;
}

.bd-display-qr {
  display: block;
  width: min(11rem, 20vmin);
  height: min(11rem, 20vmin);
  object-fit: contain;
  vertical-align: top;
}

.bd-display-url {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  word-break: break-all;
  color: #b8ff3c;
  max-width: 100%;
}

.bd-display-join-foot {
  margin: 0.375rem 0 0;
  padding-bottom: 0.125rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #6b6288;
  flex-shrink: 0;
}

@media (max-height: 820px) {
  .bd-display-head {
    padding: 0.5rem 1.25rem 0.5rem;
    gap: 0.5rem;
  }

  .bd-display-title {
    font-size: clamp(1.25rem, 3vmin, 1.75rem);
  }

  .bd-display-code {
    font-size: 1.25rem;
    padding: 0.2rem 0.65rem;
  }

  .bd-display-sponsors-inner {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .bd-display-main {
    padding: 0.35rem 1.25rem max(0.5rem, env(safe-area-inset-bottom));
  }

  .bd-display-body--player {
    gap: 0.5rem;
    grid-template-rows: minmax(0, 1fr) auto minmax(7.5rem, 20vh);
  }

  .bd-display-pattern-zone {
    padding: 0.5rem 0.75rem;
  }

  .bd-display-pattern-title {
    font-size: clamp(1.15rem, 2.2vmin, 1.65rem);
    margin-bottom: 0.25rem;
  }

  .bd-display-pattern-visual .bd-pat {
    width: min(100%, min(18vmin, 11rem));
  }

  .bd-pat-grid-wrap {
    max-height: min(18vmin, 11rem);
  }

  .bd-display-qr {
    width: min(9.5rem, 18vmin);
    height: min(9.5rem, 18vmin);
  }

  .bd-display-play-step strong {
    font-size: clamp(1.1rem, 2vmin, 1.5rem);
  }

  .bd-display-play-step span {
    font-size: clamp(0.875rem, 1.5vmin, 1.0625rem);
  }
}

@media (max-height: 680px) {
  .bd-display-hero {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow-y: auto;
  }

  .bd-display-side {
    max-height: none;
  }

  .bd-display-join-card {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .bd-display-join-card h2,
  .bd-display-join-kicker,
  .bd-display-join-card > p {
    width: 100%;
    margin-bottom: 0.15rem;
  }

  .bd-display-qr {
    width: min(8.5rem, 16vmin);
    height: min(8.5rem, 16vmin);
  }
}

@media (max-width: 900px) {
  #bd-event-mount:has(.bd-display) {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .bd-display {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .bd-display-main {
    flex: none;
    overflow: visible;
    height: auto;
  }

  .bd-display-body--player {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .bd-display-hero {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .bd-display-side {
    order: -1;
    max-height: none;
  }

  .bd-display-pattern-visual .bd-pat {
    width: min(100%, 20rem);
  }

  .bd-display-stats-row {
    grid-template-columns: 1fr;
  }

  .bd-display-playbook {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .bd-display-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(10rem, 0.8fr);
  }
}

/* ── Join page (guest phone) ── */

.bd-join {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #08050f;
  color: #fff8f0;
  padding: 0;
  overflow-y: auto;
}

.bd-join:has(.bd-join-game) {
  overflow: hidden;
}

.bd-join-welcome,
.bd-join-msg,
.bd-join-error {
  max-width: 24rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  padding-top: calc(2rem + env(safe-area-inset-top));
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  text-align: center;
}

.bd-join-logo {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  object-fit: contain;
}

.bd-join-welcome h1,
.bd-join-msg h1 {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 0.75rem;
}

.bd-join-welcome > p,
.bd-join-msg > p {
  color: #a89ec4;
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.bd-join-field {
  display: grid;
  gap: 0.375rem;
  text-align: left;
  margin-bottom: 1rem;
}

.bd-join-field span {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a89ec4;
}

.bd-join-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid rgba(157, 78, 221, 0.45);
  background: #0a0612;
  color: #fff8f0;
  font: inherit;
  box-sizing: border-box;
}

.bd-join-btn {
  width: 100%;
  min-height: 3rem;
  border: 2px solid #0a0612;
  border-radius: 10px;
  background: #b8ff3c;
  color: #0a0612;
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.bd-join-alt {
  margin-top: 1rem !important;
  font-size: 0.8125rem !important;
}

/* Active game — full-height card layout */
.bd-join-game {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding:
    max(0.375rem, env(safe-area-inset-top))
    max(0.375rem, env(safe-area-inset-right))
    max(0.25rem, env(safe-area-inset-bottom))
    max(0.375rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  overflow: hidden;
}

.bd-join-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: rgba(18, 16, 28, 0.92);
  font-size: 0.75rem;
  line-height: 1.25;
}

.bd-join-head > div {
  min-width: 0;
  flex: 1;
}

.bd-join-head strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-join-head > span:last-child {
  flex-shrink: 0;
  max-width: 5.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #a89ec4;
  font-size: 0.6875rem;
}

.bd-join-win-pattern {
  flex-shrink: 0;
  margin: 0;
  padding: 0.375rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(184, 255, 60, 0.35);
  background: rgba(184, 255, 60, 0.08);
  font-size: 0.6875rem;
  color: #a89ec4;
  text-align: center;
}

.bd-join-win-pattern strong {
  color: #b8ff3c;
}

.bd-join-bingo {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 5, 15, 0.82);
  backdrop-filter: blur(6px);
  animation: bd-bingo-in 0.35s ease;
}

@keyframes bd-bingo-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.bd-join-bingo-card {
  position: relative;
  width: min(100%, 20rem);
  padding: 1.75rem 1.25rem 1.25rem;
  border-radius: 16px;
  border: 3px solid #b8ff3c;
  background: linear-gradient(160deg, #16102a, #0a0612);
  box-shadow: 0 20px 60px rgba(184, 255, 60, 0.25);
  text-align: center;
}

.bd-join-bingo-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff8f0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.bd-join-bingo-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.bd-join-bingo-pattern {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #d4cce8;
}

.bd-join-bingo-pattern strong {
  color: #b8ff3c;
}

.bd-join-bingo-dismiss {
  display: block;
  width: 100%;
  margin-top: 1rem;
  min-height: 2.75rem;
  border: 2px solid rgba(157, 78, 221, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff8f0;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.bd-join-bingo-dismiss:hover {
  border-color: rgba(184, 255, 60, 0.55);
}

.bd-join-bingo-kicker {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00f0ff;
}

.bd-join-bingo-card h2 {
  margin: 0 0 0.5rem;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(3rem, 16vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0.06em;
  color: #b8ff3c;
  text-shadow: 0 0 24px rgba(184, 255, 60, 0.45);
}

.bd-join-bingo-card p:last-child {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #a89ec4;
}

.bd-join-code {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(184, 255, 60, 0.45);
  background: rgba(184, 255, 60, 0.12);
  color: #b8ff3c;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.bd-join-now {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 45, 149, 0.4);
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.16), rgba(157, 78, 221, 0.12));
}

.bd-join-now > div {
  min-width: 0;
  flex: 1;
}

.bd-join-now-letter {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #9d4edd, #7b2cbf);
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(157, 78, 221, 0.45);
}

.bd-join-now small {
  display: block;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00f0ff;
}

.bd-join-now strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-join-card-wrap {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  container-type: size;
  container-name: join-card;
}

.bd-join-hint {
  flex-shrink: 0;
  text-align: center;
  font-size: 0.625rem;
  color: #8a7fa8;
  line-height: 1.3;
  margin: 0;
  padding: 0 0.25rem;
}

/* ── Mobile guest bingo card ── */

.bd-digital-card--mobile.bingo-card,
.bd-digital-card--mobile {
  --bingo-ink: #fff8f0;
  --bingo-paper: #14101f;
  --bingo-muted: #1c1729;
  --bingo-muted-alt: #241f35;
  --bingo-line: rgba(157, 78, 221, 0.35);
  --bingo-line-strong: rgba(255, 255, 255, 0.14);
  --bingo-grid: rgba(255, 255, 255, 0.1);

  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 0;
  border: 2px solid rgba(157, 78, 221, 0.55);
  border-radius: 12px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.bd-digital-card--mobile .bingo-card-header {
  display: none;
}

.bd-digital-card--mobile .bingo-board {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bd-digital-card--mobile .bingo-letter-row {
  flex: 0 0 clamp(2rem, 6vmin, 2.75rem);
  border-bottom: none;
}

.bd-digital-card--mobile .bingo-letter-cell {
  min-height: 0;
  height: 100%;
  border-right-color: rgba(0, 0, 0, 0.2);
}

.bd-digital-card--mobile .bingo-letter-cell:nth-child(1) {
  background: #ff2d95;
}

.bd-digital-card--mobile .bingo-letter-cell:nth-child(2) {
  background: #9d4edd;
}

.bd-digital-card--mobile .bingo-letter-cell:nth-child(3) {
  background: #00f0ff;
}

.bd-digital-card--mobile .bingo-letter-cell:nth-child(4) {
  background: #b8ff3c;
}

.bd-digital-card--mobile .bingo-letter-cell:nth-child(5) {
  background: #ff6b35;
}

.bd-digital-card--mobile .bingo-letter-cell:nth-child(4) span,
.bd-digital-card--mobile .bingo-letter-cell:nth-child(5) span {
  color: #0a0612;
}

.bd-digital-card--mobile .bingo-letter-cell span {
  font-size: clamp(1rem, 4.5vmin, 1.5rem);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.bd-digital-card--mobile .bingo-columns {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.bd-digital-card--mobile .bingo-column {
  display: grid !important;
  grid-template-rows: repeat(5, minmax(0, 1fr)) !important;
  height: 100% !important;
  min-height: 0 !important;
}

.bd-digital-card--mobile .bingo-cell {
  flex: unset !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0.35rem 0.25rem !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.12s ease, transform 0.1s ease;
}

.bd-digital-card--mobile .bingo-song-text {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.12rem;
  overflow: hidden;
}

.bd-digital-card--mobile .bingo-song-title {
  width: 100%;
  font-size: clamp(0.8125rem, 3.8vmin, 1.125rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--bingo-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
}

@supports (font-size: 1cqh) {
  .bd-digital-card--mobile .bingo-letter-row {
    flex: 0 0 clamp(2rem, 7cqh, 2.75rem);
  }

  .bd-digital-card--mobile .bingo-letter-cell span {
    font-size: clamp(1rem, 5cqh, 1.5rem);
  }

  .bd-digital-card--mobile .bingo-cell {
    padding: clamp(0.25rem, 1.5cqh, 0.5rem) clamp(0.15rem, 1.2cqw, 0.35rem) !important;
  }

  .bd-digital-card--mobile .bingo-song-title {
    font-size: clamp(0.8125rem, 4.8cqh, 1.125rem);
  }

  .bd-digital-card--mobile .bingo-song-artist {
    font-size: clamp(0.6875rem, 3.6cqh, 0.9375rem);
  }

  .bd-digital-card--mobile .bingo-free-label {
    font-size: clamp(0.75rem, 4.5cqh, 1.125rem);
  }
}

.bd-digital-card--mobile .bingo-song-artist {
  width: 100%;
  font-size: clamp(0.6875rem, 3vmin, 0.9375rem);
  font-weight: 600;
  line-height: 1.1;
  color: #9d94b8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bd-digital-card--mobile .bingo-cell-alt {
  background: var(--bingo-muted);
}

.bd-digital-card--mobile .bingo-column-n .bingo-cell,
.bd-digital-card--mobile .bingo-column-n .bingo-cell-alt {
  background: var(--bingo-paper);
}

.bd-digital-card--mobile .bingo-column-n .bingo-cell-alt {
  background: var(--bingo-muted);
}

.bd-digital-card--mobile .bingo-cell-free {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 4px,
      rgba(157, 78, 221, 0.08) 4px,
      rgba(157, 78, 221, 0.08) 5px
    ),
    var(--bingo-muted) !important;
}

.bd-digital-card--mobile .bingo-free-text {
  border-color: rgba(157, 78, 221, 0.65);
  background: #1a1628;
  padding: 0.2rem 0.35rem;
}

.bd-digital-card--mobile .bingo-free-label {
  font-size: clamp(0.75rem, 3.5vmin, 1.125rem);
  color: #b8ff3c;
  letter-spacing: 0.12em;
}

/* Digital card tap marks */
.bd-digital-card .bingo-cell[data-bd-mark] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.bd-digital-card--mobile .bingo-cell[data-bd-mark]:active {
  transform: scale(0.97);
  background: rgba(157, 78, 221, 0.22) !important;
}

.bd-digital-card .bingo-cell.is-marked {
  background: rgba(255, 45, 149, 0.18) !important;
  box-shadow: inset 0 0 0 2px #ff2d95;
}

.bd-digital-card--mobile .bingo-cell.is-marked::after {
  content: "✓";
  position: absolute;
  top: 0.15rem;
  right: 0.2rem;
  font-size: clamp(0.6875rem, 3.5cqh, 1rem);
  font-weight: 800;
  line-height: 1;
  color: #ff2d95;
  pointer-events: none;
}

.bd-digital-card .bingo-cell.is-called:not(.bingo-cell-free) {
  box-shadow: inset 0 0 0 2px rgba(184, 255, 60, 0.55);
}

.bd-digital-card--mobile .bingo-cell.is-called:not(.bingo-cell-free):not(.is-marked) {
  background: rgba(184, 255, 60, 0.08) !important;
}

@media (max-width: 380px) {
  .bd-digital-card--mobile .bingo-song-title {
    -webkit-line-clamp: 4;
  }
}

@media (min-width: 768px) {
  .bd-join-game {
    max-width: 28rem;
    margin: 0 auto;
  }
}

.bd-join-loading {
  text-align: center;
  padding: 3rem 1rem;
  padding-top: calc(3rem + env(safe-area-inset-top));
  color: #a89ec4;
}

/* ── Print cards modal (host console) ── */

.bd-print-modal {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bd-print-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 5, 15, 0.88);
  backdrop-filter: blur(6px);
}

.bd-print-modal-panel {
  position: relative;
  width: min(100%, 28rem);
  padding: 1.5rem;
  border-radius: 16px;
  border: 2px solid rgba(157, 78, 221, 0.35);
  background: linear-gradient(180deg, #1a1230 0%, #120a22 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.bd-print-modal-head h2 {
  margin: 0;
  font-family: "Bebas Neue", "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  color: #fff8f0;
}

.bd-print-modal-head p {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #a89ec4;
}

.bd-print-modal-body {
  margin-top: 1.25rem;
}

.bd-print-modal-field {
  display: grid;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #d4c8f0;
}

.bd-print-modal-select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 78, 221, 0.3);
  background: #0f0a1c;
  color: #fff8f0;
  font: inherit;
}

.bd-print-modal-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: #6b6288;
}

.bd-print-modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ── Card verification (host) ── */

.bd-host-console-subsection--verify {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bd-verify-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
}

.bd-verify-input {
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid rgba(157, 78, 221, 0.35);
  background: rgba(8, 5, 15, 0.85);
  color: #fff8f0;
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
}

.bd-verify-input:focus {
  outline: none;
  border-color: #b8ff3c;
  box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.15);
}

.bd-verify-result {
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.bd-verify-result[hidden] {
  display: none !important;
}

.bd-verify-result--valid {
  border: 1px solid rgba(184, 255, 60, 0.45);
  background: rgba(184, 255, 60, 0.1);
  color: #eaffb8;
}

.bd-verify-result--invalid {
  border: 1px solid rgba(255, 107, 138, 0.45);
  background: rgba(255, 107, 138, 0.1);
  color: #ffd0dc;
}

.bd-verify-result code {
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.bd-verify-missing {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.bd-qr-scan-modal {
  position: fixed;
  inset: 0;
  z-index: 99960;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bd-qr-scan-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(4, 2, 10, 0.82);
  backdrop-filter: blur(4px);
}

.bd-qr-scan-card {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: #110a1f;
  color: #fff8f0;
  pointer-events: auto;
}

.bd-qr-scan-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
}

.bd-qr-scan-card p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #a89ec4;
}

.bd-qr-scan-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: #000;
}

.bd-qr-scan-viewport {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 0.65rem;
}

.bd-qr-scan-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: #c4b8e0;
  text-align: center;
}

.bd-qr-scan-photo-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.bd-qr-scan-card .bd-host-btn--ghost {
  width: 100%;
}

@media (max-width: 640px) {
  .bd-verify-form {
    grid-template-columns: 1fr;
  }
}

/* ── Validate card (navbar modal) ── */

.bd-nav-validate {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.bd-validate-modal {
  position: fixed;
  inset: 0;
  z-index: 99950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: auto;
}

.bd-validate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(4, 2, 10, 0.82);
  backdrop-filter: blur(4px);
}

.bd-validate-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: min(92vh, 40rem);
  overflow: auto;
  padding: 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: #110a1f;
  color: #fff8f0;
  pointer-events: auto;
  margin: 0;
}

.bd-validate-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.bd-validate-head p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #a89ec4;
  line-height: 1.45;
}

.bd-validate-fields {
  display: grid;
  gap: 0.5rem;
}

.bd-validate-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b8e0;
}

.bd-validate-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid rgba(157, 78, 221, 0.35);
  background: rgba(8, 5, 15, 0.85);
  color: #fff8f0;
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
}

.bd-validate-input--game {
  text-transform: uppercase;
}

.bd-validate-input:focus {
  outline: none;
  border-color: #b8ff3c;
  box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.15);
}

.bd-validate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.bd-validate-actions .bd-host-btn {
  pointer-events: auto;
  flex: 1 1 auto;
  min-width: 6.5rem;
}

.bd-validate-panel .bd-verify-result {
  margin-top: 0.875rem;
}

.bd-validate-panel .bd-verify-result[hidden] {
  display: none !important;
}

body.bd-validate-open,
body.bd-qr-scan-open {
  overflow: hidden;
}

body.bd-print-modal-open {
  overflow: hidden;
}

html.bd-guest-route #root,
html.bd-guest-route .site-header,
html.bd-guest-route footer {
  display: none !important;
}

html.bd-guest-route #bd-page-loader {
  display: none !important;
}

.bd-guest-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(91, 33, 182, 0.22), transparent),
    #0f0a1a;
}

.bd-guest-card-shell {
  width: min(100%, 24rem);
  padding: 1.4rem 1.25rem 1.2rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 12, 32, 0.94);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
  color: #f4f4f5;
}

.bd-guest-head {
  text-align: center;
  margin-bottom: 1.1rem;
}

.bd-guest-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  margin-bottom: 0.7rem;
}

.bd-guest-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.bd-guest-head h1 {
  margin: 0;
  font-family: "Bebas Neue", "Space Grotesk", sans-serif;
  font-size: 1.85rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.bd-guest-head p {
  margin: 0.55rem 0 0;
  color: #d4d4d8;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bd-guest-head-code {
  font-family: "Space Grotesk", ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.bd-guest-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 7.5rem;
  margin: 0 0 0.85rem;
  padding: 1.1rem 0.9rem;
  border-radius: 0.85rem;
  text-align: center;
  border: 2px solid transparent;
}

.bd-guest-status__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.bd-guest-status__title {
  font-family: "Bebas Neue", "Space Grotesk", sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.bd-guest-status__spinner {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #c4b5fd;
  animation: bd-guest-spin 0.8s linear infinite;
}

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

.bd-guest-status--loading {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.bd-guest-status--winner {
  background: rgba(22, 101, 52, 0.18);
  border-color: rgba(74, 222, 128, 0.45);
}

.bd-guest-status--winner .bd-guest-status__icon {
  background: #16a34a;
  color: #fff;
}

.bd-guest-status--winner .bd-guest-status__title {
  color: #bbf7d0;
}

.bd-guest-status--pending {
  background: rgba(120, 53, 15, 0.18);
  border-color: rgba(251, 191, 36, 0.35);
}

.bd-guest-status--pending .bd-guest-status__icon {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  font-size: 1.35rem;
}

.bd-guest-status--pending .bd-guest-status__title {
  color: #fde68a;
}

.bd-guest-status--ended,
.bd-guest-status--error {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.bd-guest-status--ended .bd-guest-status__icon,
.bd-guest-status--error .bd-guest-status__icon {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
}

.bd-guest-detail {
  margin-bottom: 1rem;
  text-align: center;
  color: #d4d4d8;
  font-size: 0.92rem;
  line-height: 1.5;
}

.bd-guest-detail p {
  margin: 0 0 0.55rem;
}

.bd-guest-detail p:last-child {
  margin-bottom: 0;
}

.bd-guest-detail code,
.bd-guest-card code {
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: #fff;
}

.bd-guest-missing {
  color: #fde68a !important;
  font-size: 0.84rem !important;
}

.bd-guest-hint {
  color: #71717a !important;
  font-size: 0.78rem !important;
}

.bd-guest-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bd-guest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.bd-guest-btn--primary {
  background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
  border-color: rgba(196, 181, 253, 0.35);
}

.bd-guest-btn--ghost {
  background: transparent;
}

.bd-guest-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bd-guest-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.bd-guest-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font: inherit;
  font-size: 1rem;
}

.bd-guest-input:focus {
  outline: none;
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

/* ══════════════════════════════════════
   Host deck v2 — step flow + action cards
   ══════════════════════════════════════ */

.bd-host-console-shell {
  border: 1px solid rgba(184, 255, 60, 0.12);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bd-control-header--deck {
  padding: 1rem 1.125rem;
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.08), rgba(157, 78, 221, 0.06));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bd-control-header__status.is-live .bd-control-live-badge {
  align-items: flex-end;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 45, 149, 0.35);
  background: rgba(255, 45, 149, 0.1);
}

.bd-control-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-control-step {
  padding: 1rem 1.125rem;
  min-width: 0;
}

.bd-control-step--prep {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-control-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.bd-control-step-head h4,
.bd-control-step-head--game h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff8f0;
}

.bd-control-step-head p,
.bd-control-step-head--game .bd-host-console-note {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #8a7fa8;
  text-align: left;
}

.bd-control-step-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: rgba(184, 255, 60, 0.14);
  border: 1px solid rgba(184, 255, 60, 0.45);
  color: #b8ff3c;
  font-size: 0.75rem;
  font-weight: 800;
}

.bd-host-action-grid {
  display: grid;
  gap: 0.5rem;
}

.bd-host-action-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bd-host-console-shell.is-live .bd-host-action-grid--lobby {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bd-host-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.25rem;
  padding: 0.65rem 0.5rem;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
}

.bd-host-action__icon {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: inherit;
}

.bd-host-action__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bd-host-action__text {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bd-host-btn--ghost.bd-host-action {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.bd-host-pattern-board {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(157, 78, 221, 0.28);
  background: rgba(0, 0, 0, 0.2);
}

.bd-host-pattern-active {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bd-host-pattern-active__label {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6288;
}

.bd-host-pattern-active strong {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  color: #b8ff3c;
}

.bd-host-pattern-hint {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #a89ec4;
}

.bd-host-pattern-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.bd-host-pattern-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 0;
  padding: 0.45rem 0.35rem 0.5rem;
  border-radius: 10px;
  border: 2px solid rgba(157, 78, 221, 0.32);
  background: rgba(255, 255, 255, 0.03);
  color: #fff8f0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.1s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.1s ease,
    background 0.1s ease,
    box-shadow 0.1s ease;
}

.bd-host-pattern-tile:hover {
  border-color: rgba(184, 255, 60, 0.45);
  background: rgba(184, 255, 60, 0.06);
}

.bd-host-pattern-tile.is-active {
  border-color: #b8ff3c;
  background: rgba(184, 255, 60, 0.12);
  box-shadow: 0 0 0 1px rgba(184, 255, 60, 0.25);
}

.bd-host-pattern-tile__viz {
  display: block;
  width: 100%;
  max-width: 4.5rem;
  pointer-events: none;
}

.bd-host-pattern-tile__viz .bd-pat-letters,
.bd-host-pattern-tile__viz .bd-pat-lines {
  display: none;
}

.bd-host-pattern-tile__viz .bd-pat-grid-wrap {
  max-height: 3.25rem;
  aspect-ratio: 1;
}

.bd-host-pattern-tile__viz .bd-pat-cell--free span {
  font-size: 0.3rem;
}

.bd-host-pattern-tile__viz .bd-pat-cell--free,
.bd-host-pattern-tile__viz .bd-pat-cell--win {
  animation: none;
}

.bd-host-pattern-tile__label {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8bfd8;
}

.bd-host-pattern-tile.is-active .bd-host-pattern-tile__label {
  color: #b8ff3c;
}

.bd-host-console-panel--game {
  padding: 1rem 1.125rem 1.125rem;
}

.bd-host-console-panel--game .bd-control-step-head--game {
  margin-bottom: 0.75rem;
}

.bd-host-console-panel--game .bd-host-console-panel-title {
  font-size: 0.8125rem;
  color: #ff2d95;
}

.bd-host-players-details[open] .bd-host-players-summary {
  margin-bottom: 0.5rem;
}

.bd-host-console-badge-offline {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

@media (max-width: 900px) {
  .bd-control-steps {
    grid-template-columns: 1fr;
  }

  .bd-control-step--prep {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .bd-host-console-shell.is-live .bd-host-action-grid--lobby {
    grid-template-columns: 1fr;
  }

  .bd-host-pattern-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) {
  .bd-host-action.bd-host-btn--primary,
  .bd-host-action.bd-host-btn--accent {
    min-height: 4.5rem;
  }
}
