@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;700&display=swap');

@font-face {
  font-family: 'Skewer';
  src: url('./Skewer.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --song-cue-height: 42vh;
  --easy-keyboard-offset: 0px;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: 'Lexend', sans-serif;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  font-size: 20px;
}

body.no-scroll {
  height: 100vh;
  overflow: hidden;
}

.waiting-status-card {
  position: fixed;
  top: 0;
  left: 50%;
  width: min(100vw, 640px);
  margin-top: 0;
  transform: translateX(-50%);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 18px 14px;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) brightness(1.1);
  -webkit-backdrop-filter: blur(12px) brightness(1.1);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.waiting-status-card h1 {
  margin: 0;
}

.waiting-status-card #countdown {
  margin: 10px 0 0;
  font-size: clamp(24px, 6.2vw, 38px);
  font-weight: 700;
}

nav {
  position: relative;
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

nav a {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 16px 0;
  font-size: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(12px) brightness(1.1);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
}

.nav-underline {
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 4px;
  width: 0;
  background: #fff;
  border-radius: 2px;
  transition: left 0.3s ease, width 0.3s ease;
}

.nav-underline.no-transition {
  transition: none;
}

nav a:hover {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25), 0 8px 28px rgba(0,0,0,0.4);
}

h1, h2 {
  font-weight: 400;
  font-size: 32px;
}

button {
  margin: 10px;
  padding: 16px 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(12px) brightness(1.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: scale(1.02);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25), 0 6px 20px rgba(0,0,0,0.4);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.cooldown {
  cursor: wait;
}

input, textarea, select {
  margin: 10px;
  padding: 16px 16px;
  width: 100%;
  max-width: 650px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #fff;
  backdrop-filter: blur(12px) brightness(1.1);
  font-size: 20px;
}

#player-type-select {
  margin: 10px auto 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 650px;
}

.player-type-heading {
  margin: 0 0 12px;
  width: 100%;
  max-width: 650px;
  text-align: left;
  font-size: 24px;
  font-weight: 700;
}

#player-type-select label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 20px;
  text-align: left;
  font-weight: 400;
}

#player-type-select label.team-option-label {
  align-items: flex-start;
}

#player-type-select input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #1db954;
}

input::placeholder,
textarea::placeholder {
  font-size: 18px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 10px auto;
  max-width: 800px;
}

.field-row label {
  width: 120px;
  margin-right: 20px;
  text-align: left;
  font-size: 20px;
}

.songs-controls-row {
  flex-wrap: wrap;
  gap: 10px 14px;
  max-width: 1120px;
  align-items: flex-end;
}

.songs-controls-row label {
  width: auto;
  margin-right: 0;
}

.songs-controls-row #music-type {
  width: 100%;
  max-width: 480px;
  margin: 0;
}

.songs-controls-row #refresh-songs {
  margin: 0;
}

.song-row {
  margin-bottom: 16px;
  border-bottom: 1px solid #555;
  padding-bottom: 8px;
}

.song-text {
  color: #fff;
  font-size: 20px;
  margin-bottom: 8px;
}

.button-row {
  display: flex;
  gap: 12px;
}

.play-now {
  background: #3498db;
}

.play-next {
  background: #9b59b6;
}

#voice-text {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) brightness(1.1);
}

#ws-status {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: #222;
  color: #fff;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #666;
  transition: background 0.3s ease;
}

#ws-status.connected {
  background: #1db954;
}

#ws-status.disconnected {
  background: #e74c3c;
}

/* Fade just the page content, not the persistent nav */
body.fade-in,
body.fade-out {
  animation: none;
}

body.fade-in > :not(nav) {
  animation: fadeIn 0.2s forwards;
}

body.fade-out > :not(nav) {
  animation: fadeOut 0.2s forwards;
}

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

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

/* --- Layout tweaks for the tabs --- */
#control-tab {
  padding: 40px 0;
  margin-left: -5px; /* small nudge to center */
}

#venue-tab {
  padding: 40px 0;
  margin-left: -5px;
}

#control-tab button {
  width: 150px;
  padding: 10px 14px;
  font-size: 16px;
  border-radius: 10px;
  margin: 6px auto;
}

#control-tab button.inactive {
  background: #777;
  border: 1px solid #555;
  backdrop-filter: none;
}

#control-tab button.inactive:hover {
  transform: none;
  box-shadow: none;
}

#control-tab .control-buttons button:not(.inactive):not(#pause-game-btn):not(.danger-control) {
  background: linear-gradient(135deg, #2f80ed, #56ccf2);
  border-color: rgba(86, 204, 242, 0.65);
  box-shadow: 0 6px 18px rgba(47, 128, 237, 0.35);
}

#control-tab .control-buttons button:not(.inactive):not(#pause-game-btn):not(.danger-control):hover {
  box-shadow: 0 10px 26px rgba(47, 128, 237, 0.45);
}

#control-tab #begin-night-btn:not(.inactive),
.control-buttons #begin-night-btn:not(.inactive) {
  background: linear-gradient(135deg, #ff4d4d, #ff7a6a);
  border-color: rgba(255, 106, 136, 0.7);
  box-shadow: 0 6px 18px rgba(255, 77, 77, 0.35);
}

#control-tab #begin-night-btn:not(.inactive):hover,
.control-buttons #begin-night-btn:not(.inactive):hover {
  box-shadow: 0 10px 26px rgba(255, 77, 77, 0.45);
}

#control-tab #pause-game-btn:not(.inactive) {
  background: linear-gradient(135deg, #ff4d4d, #ff6a88);
  border-color: rgba(255, 90, 90, 0.7);
  box-shadow: 0 6px 18px rgba(255, 77, 77, 0.35);
}

#control-tab #pause-game-btn:not(.inactive):hover {
  box-shadow: 0 10px 26px rgba(255, 77, 77, 0.45);
}

#control-tab .control-buttons .danger-control:not(.inactive) {
  background: linear-gradient(135deg, #a30f24, #ff4d4d);
  border-color: rgba(255, 104, 104, 0.78);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(255, 77, 77, 0.38);
}

#control-tab .control-buttons .danger-control:not(.inactive):hover {
  box-shadow: 0 12px 30px rgba(255, 77, 77, 0.5);
}

#control-tab .control-buttons button.mode-active {
  background: linear-gradient(135deg, #18c5a9, #2f80ed);
  border-color: rgba(24, 197, 169, 0.82);
  box-shadow: 0 0 0 rgba(24, 197, 169, 0.45);
  animation: controlButtonPulse 1.8s ease-in-out infinite;
}

#control-tab .control-buttons button.mode-active:hover {
  box-shadow: 0 0 0 rgba(24, 197, 169, 0.45);
}

@keyframes controlButtonPulse {
  0% {
    opacity: 0.82;
    box-shadow: 0 0 0 0 rgba(24, 197, 169, 0.45);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 12px rgba(24, 197, 169, 0.08);
  }
  100% {
    opacity: 0.82;
    box-shadow: 0 0 0 0 rgba(24, 197, 169, 0);
  }
}

.control-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.venue-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: clamp(12px, 2vw, 18px);
  width: 100%;
  max-width: 1040px;
  margin: 16px auto 0;
  padding: 0 clamp(10px, 4vw, 24px) 110px;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .venue-layout {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }

  .venue-layout .full-width {
    grid-column: 1 / -1;
  }
}

.venue-layout h1 {
  font-size: clamp(28px, 3vw, 32px);
  margin-bottom: 6px;
}

.venue-layout p {
  margin: 0;
}

.venue-layout input,
.venue-layout select,
.venue-layout textarea,
.venue-layout button {
  font-size: clamp(18px, 3vw, 20px);
  padding: 12px 14px;
}

.venue-layout .field-row {
  width: 100%;
  max-width: 900px;
  gap: clamp(12px, 2.5vw, 20px);
  align-items: flex-start;
  margin: 0;
  box-sizing: border-box;
}

.venue-layout .field-row label {
  width: clamp(120px, 26vw, 160px);
  margin-right: clamp(12px, 3vw, 20px);
  font-size: clamp(18px, 2.5vw, 20px);
}

.venue-layout #save-venue-info-btn {
  width: min(220px, 100%);
  margin-top: 8px;
}

.venue-save-bar {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1200;
  width: min(720px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(18, 22, 30, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.venue-save-bar.is-hidden {
  display: none;
}

.venue-save-bar.is-dirty {
  border-color: rgba(255, 209, 102, 0.9);
  background: rgba(34, 28, 18, 0.96);
  box-shadow: 0 18px 48px rgba(255, 209, 102, 0.16), 0 16px 42px rgba(0, 0, 0, 0.44);
}

.venue-save-bar__status {
  min-width: 0;
  color: #d7dce2;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.venue-save-bar.is-dirty .venue-save-bar__status {
  color: #ffd166;
}

.venue-save-bar__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: min(360px, 58vw);
}

.venue-save-bar button {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 12px;
}

.venue-save-bar button[data-venue-save] {
  background: linear-gradient(135deg, #1db954, #74f7c6);
  color: #07110b;
}

.venue-save-bar:not(.is-dirty) button[data-venue-save] {
  background: rgba(255, 255, 255, 0.12);
  color: #d7dce2;
}

.venue-save-bar button[data-venue-cancel] {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.venue-save-bar button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.venue-layout .venue-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.venue-layout .venue-profile-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.venue-layout .venue-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.venue-layout .venue-profile-row label {
  width: auto;
  margin-right: 0;
}

.venue-layout #venue-profile-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.venue-layout #delete-venue-btn {
  width: auto;
  min-width: 0;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.1;
  margin: 0;
}

.venue-layout #venue-profile-select option {
  color: #fff;
  background: #111;
}

.venue-layout .nttn-only-field[hidden] {
  display: none !important;
}

.venue-layout .status-line {
  text-align: left;
  opacity: 0.9;
}

.venue-layout .random-genre-row {
  align-items: stretch;
}

.random-genre-label {
  width: clamp(120px, 26vw, 160px);
  margin-right: clamp(12px, 3vw, 20px);
  text-align: left;
  font-size: clamp(18px, 2.5vw, 20px);
}

.random-genre-panel {
  flex: 1;
  min-width: 0;
}

.random-genre-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.venue-layout #random-game-genre-btn {
  width: auto;
  min-width: 190px;
  margin: 0;
}

.song-rotation-memory {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  text-align: left;
}

.song-rotation-memory__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.song-rotation-memory h2 {
  margin: 0 0 5px;
  font-size: 21px;
}

.song-rotation-memory__header p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.venue-layout #reset-song-rotation-btn {
  width: auto;
  min-width: 220px;
  margin: 0;
  border: 1px solid rgba(255, 209, 102, 0.75);
  border-radius: 8px;
  background: rgba(255, 209, 102, 0.12);
  color: #ffe29a;
}

.venue-layout #reset-song-rotation-btn:disabled {
  opacity: 0.48;
  cursor: default;
}

.song-rotation-memory__counts {
  margin-top: 12px !important;
  color: #9ae6b4;
  font-size: 16px;
  font-weight: 700;
}

.song-rotation-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 0 2px;
  border-top: 1px solid rgba(255, 209, 102, 0.35);
}

.song-rotation-reminder[hidden] {
  display: none;
}

.song-rotation-reminder strong {
  color: #ffe29a;
  font-size: 18px;
}

.song-rotation-reminder p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.song-rotation-reminder__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.venue-layout .song-rotation-reminder__actions button {
  width: auto;
  min-width: 132px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
}

.venue-layout #song-rotation-reminder-reset {
  background: #ffd166;
  color: #1b1608;
}

.venue-layout #song-rotation-reminder-keep {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.genre-additives {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  text-align: left;
}

.genre-additives label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0;
  font-size: 16px;
}

.genre-additives input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #1db954;
}

.venue-layout textarea {
  min-height: 120px;
}

@media (max-width: 680px) {
  .venue-layout .venue-profile-header {
    align-items: flex-start;
  }

  .venue-layout #delete-venue-btn {
    align-self: flex-end;
  }

  .venue-layout .random-genre-row {
    flex-direction: column;
  }

  .random-genre-label {
    width: auto;
    margin-right: 0;
  }

  .song-rotation-memory__header,
  .song-rotation-reminder {
    align-items: stretch;
    flex-direction: column;
  }

  .venue-layout #reset-song-rotation-btn,
  .song-rotation-reminder__actions {
    width: 100%;
  }

  .song-rotation-reminder__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .venue-save-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .venue-save-bar__status {
    text-align: center;
  }

  .venue-save-bar__actions {
    width: 100%;
    min-width: 0;
  }
}

.volume-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 12px;
}

.control-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.dj-mode-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.dj-mode-actions button {
  width: 120px !important;
  margin: 0 !important;
}

.pulse-pairing-panel {
  align-self: stretch;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 760px);
  max-width: none;
  margin: 12px auto 0;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.pulse-pairing-panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.pulse-pairing-panel p {
  margin: 0;
  color: #d7d7d7;
}

.pulse-pairing-panel .easy-pulse-address-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.pulse-pairing-panel .status-line {
  min-height: 20px;
}

.dj-hype-toggle,
.song-fetch-toggle,
.assistant-model-toggle,
.audio-processing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(12px) brightness(1.05);
}

.dj-hype-toggle input[type="checkbox"],
.song-fetch-toggle input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #1db954;
  transform: scale(1.2);
}

.dj-hype-toggle label,
.song-fetch-toggle label {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.assistant-model-toggle {
  gap: 14px;
}

.assistant-model-option,
.audio-processing-option {
  min-width: 42px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
}

.audio-processing-toggle {
  gap: 12px;
}

.audio-processing-option {
  min-width: 96px;
  font-size: 16px;
}

.assistant-model-switch {
  position: relative;
  display: inline-flex;
  width: 70px;
  height: 36px;
  cursor: pointer;
}

.assistant-model-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.assistant-model-slider {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.assistant-model-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.assistant-model-switch input[type="checkbox"]:checked + .assistant-model-slider {
  background: rgba(29, 185, 84, 0.38);
  border-color: rgba(29, 185, 84, 0.8);
}

.assistant-model-switch input[type="checkbox"]:checked + .assistant-model-slider::after {
  transform: translateX(34px);
}

.assistant-model-switch input[type="checkbox"]:disabled + .assistant-model-slider {
  opacity: 0.55;
  cursor: not-allowed;
}

.assistant-model-caption {
  margin: -4px 0 4px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.begin-night-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.status-text {
  margin: 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
}

.status-text.error {
  color: #ffb4b4;
}

.hidden {
  display: none !important;
}

.setup-choice-page,
.role-selection-page,
.team-name-page,
.easy-start-page,
.easy-control-page {
  align-items: stretch;
  background: linear-gradient(180deg, #050608 0%, #101319 100%);
  text-align: left;
}

.easy-start-page {
  scroll-padding-bottom: calc(120px + var(--easy-keyboard-offset));
}

.setup-choice-shell,
.easy-wizard-shell,
.easy-control-shell {
  width: min(1040px, calc(100vw - 32px));
  margin: 0 auto;
  box-sizing: border-box;
}

.setup-choice-shell {
  display: grid;
  gap: 22px;
  padding-top: clamp(28px, 8vh, 84px);
}

.setup-choice-header,
.easy-wizard-header,
.easy-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.setup-choice-header {
  display: block;
  text-align: center;
}

.setup-choice-kicker {
  margin: 0 0 8px;
  color: #8fd9ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setup-choice-header h1,
.easy-wizard-header h1,
.easy-control-header h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
}

.setup-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.setup-choice-option--wide {
  grid-column: 1 / -1;
  min-height: 150px;
}

.setup-choice-option {
  display: grid;
  gap: 12px;
  min-height: 210px;
  margin: 0;
  padding: clamp(20px, 4vw, 30px);
  text-align: left;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.setup-choice-option:hover {
  transform: translateY(-2px);
}

.setup-choice-option__title {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.05;
}

.setup-choice-option__body {
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(16px, 2.5vw, 19px);
  line-height: 1.45;
}

.role-selection-shell {
  display: grid;
  gap: 22px;
  padding-top: clamp(28px, 8vh, 84px);
}

.role-selection-option {
  min-height: 190px;
}

.setup-choice-option__eyebrow {
  color: #7edcff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.setup-choice-option__action {
  align-self: end;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.role-withdraw-button {
  justify-self: center;
}

.role-status {
  margin: 0;
  text-align: center;
}

.role-status:empty {
  display: none;
}

.team-name-shell {
  display: grid;
  gap: 22px;
  padding-top: clamp(28px, 8vh, 84px);
}

.team-name-card {
  display: grid;
  gap: 16px;
  width: min(760px, 100%);
  justify-self: center;
  box-sizing: border-box;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.team-name-label {
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.team-name-card input[type="text"] {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 8px;
}

.team-type-options {
  max-width: none;
  margin: 2px 0 0;
  gap: 12px;
}

.team-type-options .player-type-heading {
  max-width: none;
  margin: 4px 0 0;
  color: #ffffff;
  font-size: clamp(19px, 3vw, 25px);
}

.team-type-options label {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
}

.team-type-options label:has(input:checked) {
  background: rgba(29, 185, 84, 0.18);
  border-color: rgba(126, 240, 180, 0.62);
  color: #ffffff;
}

.team-name-submit {
  justify-self: end;
  min-width: 148px;
  margin: 4px 0 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1db954, #7ef0b4);
  color: #06130b;
  font-weight: 700;
}

.team-name-submit:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.setup-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
}

.easy-wizard-shell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: calc(100vh - 40px);
  padding-top: 74px;
  padding-bottom: calc(112px + var(--easy-keyboard-offset));
}

.easy-wizard-header {
  position: fixed;
  left: 50%;
  top: 0;
  z-index: 1250;
  width: min(1040px, calc(100vw - 32px));
  box-sizing: border-box;
  margin: 0;
  padding: 10px 16px 12px;
  background: rgba(5, 6, 8, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.easy-wizard-header > div,
.easy-control-header > div {
  text-align: center;
}

.easy-control-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.easy-step-count {
  min-width: 110px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.easy-status-line {
  min-height: 20px;
  text-align: center;
}

.easy-status-line:empty {
  display: none;
}

.easy-keyboard-anchor {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--easy-keyboard-offset));
  z-index: 1;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0.01;
  pointer-events: none;
  resize: none;
}

.wizard-step {
  display: none;
  min-height: 0;
  grid-template-columns: minmax(220px, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
  padding: clamp(22px, 5vw, 44px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
}

.wizard-step-copy,
.easy-field-stack,
.easy-review-list {
  align-self: start;
}

.wizard-step.is-active {
  display: grid;
  animation: wizardFadeIn 170ms ease both;
}

.wizard-step.is-leaving {
  display: grid;
  animation: wizardFadeOut 170ms ease both;
}

.wizard-step-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.wizard-step-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(16px, 2.4vw, 20px);
  line-height: 1.48;
}

.easy-field-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.easy-field-stack label,
.easy-field-stack .venue-profile-header label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.easy-field-stack input,
.easy-field-stack textarea,
.easy-field-stack select {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 8px;
}

.easy-field-stack textarea {
  min-height: 132px;
}

.easy-field-stack option {
  color: #fff;
  background: #111;
}

.easy-field-stack .venue-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.easy-field-stack #delete-venue-btn,
.easy-field-stack #random-game-genre-btn,
.easy-field-stack #random-pre-game-genre-btn,
.easy-field-stack .default-fun-night-btn,
.easy-field-stack #genre-list-toggle-btn,
.easy-field-stack #pre-game-genre-list-toggle-btn,
.easy-field-stack #custom-genre-toggle-btn,
.easy-field-stack #pre-game-custom-genre-toggle-btn,
.easy-field-stack #custom-game-genre-btn,
.easy-field-stack #pre-game-custom-genre-btn,
.easy-field-stack .genre-clear-button,
.easy-field-stack .genre-style-toggle,
.easy-field-stack .genre-chip {
  width: auto;
  min-width: 0;
  margin: 0;
  border-radius: 8px;
  font-size: 16px;
}

.easy-field-stack .genre-clear-button {
  justify-self: start;
  padding: 9px 13px;
  color: #ffd8d8;
  background: rgba(127, 29, 29, 0.3);
  border-color: rgba(248, 113, 113, 0.58);
}

.easy-field-stack .genre-style-toggle {
  justify-self: start;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.genre-picker-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.genre-picker-panel[hidden] {
  display: none !important;
}

.custom-genre-panel[hidden] {
  display: none !important;
}

.genre-picker-help {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.genre-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-style-groups {
  display: grid;
  gap: 8px;
}

.genre-style-group {
  display: grid;
  gap: 8px;
}

.genre-style-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.genre-style-panel[hidden] {
  display: none !important;
}

.easy-field-stack .genre-chip {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.easy-field-stack .genre-chip--subgenre {
  padding: 8px 10px;
  font-size: 15px;
}

.easy-field-stack .genre-chip.is-selected {
  color: #03140d;
  background: #9ae6b4;
  border-color: #9ae6b4;
  box-shadow: 0 0 0 2px rgba(154, 230, 180, 0.24);
}

.easy-field-stack .genre-style-toggle.has-selected-children {
  border-color: rgba(154, 230, 180, 0.78);
  box-shadow: inset 0 0 0 1px rgba(154, 230, 180, 0.26);
}

.easy-field-stack .default-fun-night-btn {
  color: #07111f;
  background: linear-gradient(135deg, #fff7ad, #9ae6b4 46%, #7dd3fc);
  border-color: rgba(255, 255, 255, 0.64);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(154, 230, 180, 0.16);
}

.easy-field-stack .genre-custom-toggle {
  justify-self: start;
  padding: 10px 14px;
  border-color: rgba(255, 255, 255, 0.24);
}

.custom-genre-panel {
  display: grid;
  gap: 10px;
}

.custom-genre-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.custom-genre-row input {
  min-width: 0;
}

.easy-field-stack .genre-examples-output {
  min-height: 168px;
}

.easy-field-stack .status-line {
  min-height: 22px;
  margin: 0;
  text-align: left;
}

.schedule-step {
  grid-template-columns: minmax(190px, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(14px, 2.6vw, 28px);
  padding: clamp(16px, 3vw, 26px);
}

.schedule-planner {
  gap: 9px;
}

.schedule-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.schedule-input-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.schedule-alarm-field[hidden],
.schedule-helper-row[hidden] {
  display: none;
}

.schedule-step .wizard-step-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3.4vw, 36px);
}

.schedule-step .wizard-step-copy p {
  font-size: clamp(14px, 1.9vw, 18px);
  line-height: 1.34;
}

.schedule-planner > label,
.schedule-input-grid label {
  font-size: 14px;
}

#game-length-half-label {
  color: rgba(143, 217, 255, 0.94);
  white-space: nowrap;
}

.schedule-planner input,
.schedule-planner select {
  min-height: 42px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.schedule-helper-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.schedule-helper-row button {
  width: auto;
  min-width: 150px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
}

.schedule-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.schedule-clock span,
.schedule-time-row span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 700;
}

.schedule-clock strong {
  color: #ffffff;
  font-size: clamp(17px, 2.4vw, 24px);
  text-align: right;
}

#schedule-alarm-countdown.is-due {
  color: #74f7c6;
}

.schedule-timeline {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.schedule-time-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
}

.schedule-time-row strong {
  color: #ffffff;
  font-size: 15px;
  text-align: center;
}

.schedule-time-row span:last-child {
  text-align: right;
}

.schedule-bar {
  display: flex;
  min-height: 70px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.schedule-segment {
  min-width: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px 7px;
  color: #ffffff;
  text-align: center;
}

.schedule-segment span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.schedule-segment strong {
  font-size: clamp(15px, 2.1vw, 20px);
  line-height: 1;
}

.schedule-segment-pregame {
  background: linear-gradient(135deg, #256d85, #3fb6a8);
}

.schedule-segment-first {
  background: linear-gradient(135deg, #3553a4, #4e8df6);
}

.schedule-segment-halftime {
  background: linear-gradient(135deg, #9a6b1d, #f1bd4d);
  color: #171006;
}

.schedule-segment-second {
  background: linear-gradient(135deg, #216b3b, #52c46d);
}

.schedule-variance {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.25;
}

.schedule-variance.is-balanced {
  color: #9ae6b4;
}

.schedule-variance.is-over {
  color: #ffcf8a;
}

.easy-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.easy-checkbox-row input[type="checkbox"],
.easy-field-stack .genre-additives input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #1db954;
}

.easy-field-stack .genre-additives {
  margin-top: 2px;
}

.easy-review-list {
  display: grid;
  gap: 8px;
  max-height: min(480px, 52vh);
  overflow-y: auto;
}

.easy-review-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.easy-review-row span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.easy-review-row strong {
  min-width: 0;
  color: #ffffff;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.easy-save-row {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.easy-save-row #save-venue-info-btn {
  width: 100%;
  margin: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1db954, #74f7c6);
  color: #06130b;
  font-weight: 700;
}

.easy-wizard-error {
  align-self: center;
  min-height: 22px;
  color: #ffb4b4;
  text-align: center;
}

.easy-wizard-nav {
  position: fixed;
  left: 50%;
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--easy-keyboard-offset));
  z-index: 1300;
  width: min(720px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(7, 9, 13, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  transition: none;
}

.easy-keyboard-disabled .easy-wizard-nav {
  bottom: max(12px, env(safe-area-inset-bottom));
}

.easy-wizard-nav button {
  width: 100%;
  margin: 0;
  border-radius: 8px;
}

.easy-keyboard-open .wizard-step.is-active {
  align-items: start;
}

.easy-keyboard-open .easy-field-stack {
  padding-bottom: 0;
}

.easy-keyboard-disabled .easy-field-stack {
  padding-bottom: 0;
}

.easy-control-shell {
  display: grid;
  gap: clamp(18px, 4vw, 30px);
  padding-top: clamp(18px, 6vh, 58px);
}

.easy-control-panel {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.easy-control-panel h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.easy-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.easy-schedule-grid div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.easy-schedule-grid span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.easy-schedule-grid strong {
  color: #ffffff;
  font-size: clamp(18px, 2.8vw, 26px);
  line-height: 1.1;
}

.easy-schedule-grid strong.is-due {
  color: #74f7c6;
}

.easy-pulse-panel {
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: center;
}

.easy-pulse-panel p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.easy-pulse-address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.easy-pulse-address-row code {
  display: block;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #9ae6b4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.35;
}

.easy-pulse-address-row button {
  margin: 0;
  white-space: nowrap;
}

.easy-pulse-panel .status-line {
  grid-column: 2;
  min-height: 20px;
  margin: -8px 0 0;
}

.easy-volume-row {
  max-width: none;
  margin: 0;
}

.easy-volume-panel {
  padding-top: clamp(22px, 4.5vw, 34px);
  padding-bottom: clamp(22px, 4.5vw, 34px);
}

.easy-schedule-panel {
  padding-top: clamp(20px, 4vw, 30px);
  padding-bottom: clamp(20px, 4vw, 30px);
}

.easy-control-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.easy-control-actions button {
  width: 100%;
  min-height: 132px;
  margin: 0;
  border-radius: 8px;
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.15;
}

.easy-primary-action:not(.inactive) {
  background: linear-gradient(135deg, #1db954, #7ef0b4);
  color: #06130b;
}

.easy-secondary-action {
  background: linear-gradient(135deg, #2f80ed, #56ccf2);
  color: #ffffff;
}

.easy-danger-action:not(.inactive) {
  background: linear-gradient(135deg, #ff4d4d, #ff8b6d);
  color: #ffffff;
}

.easy-stop-action:not(.inactive) {
  background: linear-gradient(135deg, #a30f24, #ff4d4d);
  color: #ffffff;
}

.easy-begin-night-meta {
  min-height: 74px;
}

@keyframes wizardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wizardFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 760px) {
  .setup-choice-grid,
  .easy-pulse-panel,
  .easy-control-actions {
    grid-template-columns: 1fr;
  }

  .easy-control-page {
    min-height: 100vh;
  }

  .easy-control-shell {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .easy-control-panel {
    gap: 8px;
    padding: 12px;
  }

  .easy-control-panel h2 {
    font-size: 20px;
  }

  .easy-schedule-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .easy-schedule-grid div {
    gap: 3px;
    padding: 8px 6px;
  }

  .easy-schedule-grid span {
    font-size: 10px;
  }

  .easy-schedule-grid strong {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .easy-pulse-panel .status-line {
    grid-column: auto;
  }

  .easy-pulse-address-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .easy-pulse-panel p {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.3;
  }

  .easy-pulse-address-row code {
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.2;
  }

  .easy-pulse-address-row button {
    padding: 9px 12px;
  }

  .easy-volume-panel {
    padding-top: 24px;
    padding-bottom: 44px;
  }

  .easy-schedule-panel {
    padding-top: 16px;
    padding-bottom: 26px;
  }

  .setup-choice-option {
    min-height: 170px;
  }

  .easy-wizard-header,
  .easy-control-header {
    align-items: center;
    text-align: center;
  }

  .easy-wizard-header .setup-secondary-button,
  .easy-control-header .setup-secondary-button {
    align-self: auto;
  }

  .easy-control-header-actions {
    justify-content: center;
    width: 100%;
  }

  .easy-control-header h1 {
    font-size: 30px;
  }

  .easy-control-header .setup-choice-kicker {
    margin-bottom: 2px;
    font-size: 12px;
  }

  .easy-step-count {
    min-width: 0;
    text-align: center;
  }

  .wizard-step,
  .wizard-step.is-active,
  .wizard-step.is-leaving {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding: 18px;
    scroll-margin-top: 18px;
    scroll-margin-bottom: calc(220px + var(--easy-keyboard-offset));
  }

  .easy-keyboard-open .wizard-step,
  .easy-keyboard-open .wizard-step.is-active,
  .easy-keyboard-open .wizard-step.is-leaving {
    min-height: auto;
    padding-top: 18px;
  }

  .easy-keyboard-open .easy-field-stack {
    padding-bottom: 0;
  }

  .easy-review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .easy-control-actions button {
    min-height: 62px;
    font-size: 17px;
  }

  .easy-control-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(7, 9, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
  }

  #skip-final-round-btn {
    grid-column: 1;
    grid-row: 2;
  }

  #stop-run-btn {
    grid-column: 2;
    grid-row: 2;
  }

  #skip-song-btn {
    grid-column: 1;
    grid-row: 1;
  }

  #begin-night-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .easy-begin-night-meta {
    margin-top: -4px;
  }

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

  .schedule-input-grid,
  .schedule-helper-row {
    grid-template-columns: 1fr;
  }

  .schedule-step {
    gap: 12px;
    padding: 14px;
  }

  .schedule-step .wizard-step-copy h2 {
    margin-bottom: 5px;
    font-size: 26px;
  }

  .schedule-step .wizard-step-copy p {
    font-size: 14px;
    line-height: 1.25;
  }

  .schedule-step .schedule-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .schedule-planner {
    gap: 7px;
  }

  .schedule-planner > label,
  .schedule-input-grid label {
    font-size: 12px;
    line-height: 1.2;
  }

  .schedule-planner input,
  .schedule-planner select {
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .schedule-helper-row button {
    width: 100%;
  }

  .schedule-clock {
    padding: 6px 0;
  }

  .schedule-clock strong {
    font-size: 17px;
  }

  .schedule-bar {
    min-height: 58px;
  }

  .schedule-segment {
    min-width: 42px;
    padding: 6px 4px;
  }

  .schedule-segment span {
    font-size: 10px;
  }

  .schedule-segment strong {
    font-size: 14px;
  }

  .schedule-variance {
    min-height: 16px;
    font-size: 12px;
  }
}

.volume-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 16px 0;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.volume-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.volume-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex: 1;
}

.volume-label {
  font-size: 16px;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.volume-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #f5f5f5;
  font-size: clamp(12px, 3vw, 16px);
  line-height: 1;
  cursor: pointer;
  transition: transform 120ms ease, color 120ms ease;
  flex: 0 0 10px;
}

.volume-button:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.volume-button:active {
  transform: translateY(0);
}

.notification-stack {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
  pointer-events: none;
}

.notification {
  background: rgba(17, 17, 17, 0.85);
  color: #f5f5f5;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 16px;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
  max-width: min(320px, 80vw);
  backdrop-filter: blur(4px);
}

.notification.visible {
  opacity: 1;
  transform: translateY(0);
}

.notification.hide {
  opacity: 0;
  transform: translateY(16px);
}

.notification.error {
  background: rgba(143, 28, 28, 0.92);
}

.notification.warning,
.notification.warn {
  background: rgba(142, 97, 0, 0.92);
}

.song-rotation-notification {
  box-sizing: border-box;
  width: min(390px, calc(100vw - 32px));
  max-width: none;
  border-radius: 8px;
}

.song-rotation-notification strong {
  display: block;
  font-size: 17px;
}

.song-rotation-notification p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
}

.song-rotation-notification__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.song-rotation-notification__actions button {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.34);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.song-rotation-notification__actions button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.song-rotation-notification__actions button:disabled {
  opacity: 0.48;
  cursor: default;
}

.notification.success {
  background: rgba(27, 120, 55, 0.92);
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1));
  cursor: pointer;
  outline: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18) inset;
  touch-action: none;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  margin-top: -4px;
}

#volume-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1));
}

#volume-slider::-moz-range-thumb {
  background: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#volume-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1));
}

.equalizer-panel {
  margin-top: 1rem;
  padding: 0.75rem 1rem 1rem;
  border: 1px solid rgba(105, 190, 255, 0.22);
  border-radius: 14px;
  background: rgba(3, 13, 28, 0.55);
}

.equalizer-panel > summary {
  cursor: pointer;
  font-weight: 700;
  color: #dbefff;
}

.equalizer-panel-advanced {
  max-width: 920px;
  margin: 0.75rem auto 1rem;
}

.equalizer-toolbar {
  display: flex;
  gap: 0.65rem;
  margin: 0.9rem 0 1rem;
}

.eq-bypass-button.eq-active {
  color: #06111f;
  border-color: #72d3ff;
  background: #72d3ff;
}

.equalizer-bands {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  width: 100%;
  padding: 0.25rem 0;
  transition: opacity 160ms ease;
  overscroll-behavior: contain;
}

.equalizer-bands.eq-is-bypassed { opacity: 0.4; }

.equalizer-band {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1fr) 48px;
  align-items: center;
  gap: 0.7rem;
  min-height: 38px;
  color: #bcd7e8;
  font-size: 0.8rem;
}

.equalizer-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 34px;
  background: linear-gradient(
    to right,
    #53c5ff 0,
    #53c5ff var(--eq-position),
    rgba(151, 191, 218, 0.3) var(--eq-position),
    rgba(151, 191, 218, 0.3) 100%
  ) center / 100% 6px no-repeat;
}

.equalizer-band input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 34px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.equalizer-slider-marker {
  position: absolute;
  left: var(--eq-position);
  top: 50%;
  width: 12px;
  height: 24px;
  border: 2px solid #dff6ff;
  border-radius: 7px;
  background: #159bdc;
  box-shadow: 0 0 8px rgba(83, 197, 255, 0.65);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.equalizer-frequency { font-weight: 700; color: #eef9ff; text-align: right; }
.equalizer-gain { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

@media (min-width: 760px) {
  .equalizer-bands { grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 0.45rem 1.25rem; }
}

#voice {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#voice .voice-group {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
}

#voice .voice-group h2 {
  margin-top: 0;
}

#voice textarea,
#voice input,
#voice select {
  margin-left: 4px; /* align with buttons */
  margin-right: 4px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 12px 12px;
  font-size: 18px;
}

#voice button {
  width: 180px;
  padding: 12px 20px;
  font-size: 18px;
}


#results-container .song-search-label {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 6px;
  text-align: left;
  font-size: 20px;
}

#results-container #pregame-genre-examples,
#song-search {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

#results-container #pregame-genre-examples {
  margin-bottom: 10px;
}


#songs-tab h1 {
  margin-bottom: 24px;
}

#ws-status {
  opacity: 0.8;
}

/* --- Song cue layout --- */
#songs {
  position: relative;
  padding-bottom: var(--song-cue-height); /* space for fixed cue */
}

#results-container {
  max-height: 58vh;
  overflow-y: auto;
}

#song-cue {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--song-cue-height);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid #555;
  padding: 10px;
}

#song-cue-resizer {
  width: min(180px, 45vw);
  height: 18px;
  margin: -10px auto 8px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  cursor: ns-resize;
  touch-action: none;
}

#song-cue-resizer::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  margin: 7px auto 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}

#song-cue-resizer.active {
  background: linear-gradient(90deg, rgba(95, 196, 255, 0.35), rgba(95, 196, 255, 0.7), rgba(95, 196, 255, 0.35));
}

#cue-list {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.cue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#song-cue h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.cue-row {
  padding: 8px;
  border-bottom: 1px solid #555;
  cursor: grab;
}

.now-playing {
  font-weight: bold;
  color: #0f0;
}

.cue-row.dragging {
  opacity: 0.5;
}

.cue-placeholder {
  height: 36px;
  margin: 4px 0;
  border: 2px dashed #fff;
  border-radius: 6px;
}
/* ===================== BUZZER (SLIM REFINED MODE) ===================== */
.buzzer-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
}

.low-power-toggle {
  z-index: 5;
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  transform: translateX(-50%);
  width: 150px;
  height: 34px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) brightness(1.1);
  -webkit-backdrop-filter: blur(12px) brightness(1.1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 4px 14px rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: clamp(12px, 2.8vmin, 16px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.low-power-mode .low-power-toggle {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 4px 14px rgba(0, 0, 0, 0.28);
}

.player-connection-status {
  z-index: 1000;
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(42px, calc(env(safe-area-inset-bottom) + 28px));
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f6e05e;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(246, 224, 94, 0.72);
}

.player-connection-status[data-status="connected"] {
  background: #42f584;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(66, 245, 132, 0.72);
}

.player-connection-status[data-status="disconnected"] {
  background: #ff4f6d;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(255, 79, 109, 0.72);
}

.buzzer__label {
  z-index: 2;
  position: absolute;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: clamp(22px, 4.5vmin, 36px);
  font-weight: 700;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.halftime-status {
  z-index: 3;
  position: absolute;
  top: max(4vh, 24px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-width: min(82vw, 320px);
  overflow: hidden;
  isolation: isolate;
  padding: 16px 22px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(231, 251, 255, 0.20) 28%, rgba(82, 214, 232, 0.15) 48%, rgba(8, 15, 30, 0.34) 78%, rgba(255, 255, 255, 0.13)),
    rgba(9, 13, 25, 0.38);
  backdrop-filter: blur(24px) saturate(1.55) brightness(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.55) brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -18px 42px rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(143, 247, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.54);
}

.halftime-status::before,
.halftime-status::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}

.halftime-status::before {
  inset: 1px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06) 44%, transparent 70%),
    linear-gradient(12deg, transparent 58%, rgba(143, 247, 255, 0.18));
}

.halftime-status::after {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(143, 247, 255, 0.18),
    inset 0 0 28px rgba(255, 199, 231, 0.10);
}

.halftime-status[hidden] {
  display: none !important;
}

.game-paused-status {
  z-index: 30;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 42%, rgba(36, 86, 120, 0.42), transparent 58%),
    rgba(3, 8, 16, 0.94);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.game-paused-status[hidden] {
  display: none !important;
}

.game-paused-status strong {
  font-size: clamp(38px, 10vmin, 72px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.game-paused-status span {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(22px, 5vmin, 36px);
  font-weight: 650;
}

.halftime-status__label,
.halftime-status__timer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  text-align: center;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.halftime-status__label {
  font-size: clamp(22px, 4.8vmin, 34px);
  font-weight: 700;
}

.halftime-status__timer {
  font-size: clamp(28px, 8vmin, 54px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.game-end-status {
  z-index: 4;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 22px;
  min-width: min(84vw, 360px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: clamp(28px, 6.2vmin, 52px);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 1;
  transition: opacity 420ms ease, transform 420ms ease;
  pointer-events: none;
}

.game-end-status[hidden] {
  display: none !important;
}

.game-end-status.is-fading {
  opacity: 0;
  transform: translate(-50%, -52%);
}

.player-thank-you-screen {
  z-index: 20;
  position: fixed;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #000;
}

.player-thank-you-screen[hidden] {
  display: none !important;
}

.player-thank-you-screen__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-thank-you-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 174, 255, 0.18), rgba(0, 0, 0, 0) 44%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
}

.player-thank-you-screen__message {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 18vh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  box-sizing: border-box;
  color: #d9d9d9;
  font-family: 'Skewer', 'Lexend', sans-serif;
  font-size: clamp(30px, 8.6vmin, 58px);
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: pre-line;
  transform: translateY(100px);
  text-shadow:
    0 3px 8px rgba(0, 0, 0, 0.96),
    0 10px 24px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(0, 174, 255, 0.34);
}

.player-thank-you-screen__pop-button {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 8vh);
  transform: translateX(-50%);
  width: min(78vw, 340px);
  min-height: 58px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.36), transparent 34%),
    linear-gradient(135deg, rgba(255, 209, 102, 0.94), rgba(239, 71, 111, 0.92) 54%, rgba(17, 138, 178, 0.94));
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(255, 209, 102, 0.38),
    inset 0 0 0 2px rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: 'Skewer', 'Lexend', sans-serif;
  font-size: clamp(22px, 6.3vmin, 34px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
  touch-action: manipulation;
}

.player-thank-you-screen__pop-button:active {
  transform: translateX(-50%) scale(0.96);
}

.player-thank-you-screen__pop-button:disabled {
  opacity: 0.72;
  filter: saturate(0.75);
}

.player-thank-you-screen__pop-button.is-popped {
  animation: pop-button-flash 520ms ease both;
}

@keyframes pop-button-flash {
  0% { transform: translateX(-50%) scale(1); }
  36% { transform: translateX(-50%) scale(1.12); }
  100% { transform: translateX(-50%) scale(1); }
}

.buzzer {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;

  background: center center / cover no-repeat url('./assets/images/buzzers_closed.png');

  /* subtle base frame */
  box-shadow:
    inset 0 0 0 8px rgba(255,255,255,0.10),
    inset 0 0 18px rgba(0,0,0,0.85);

  transition:
    box-shadow 200ms ease,
    filter 120ms ease,
    opacity 120ms ease,
    transform 180ms ease;

  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.buzzer::before,
.buzzer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: none;
  filter: saturate(0.95) brightness(0.98);
  will-change: opacity, filter;
}

.buzzer::before {
  background: center center / cover no-repeat url('./assets/images/buzzers_open.png');
  filter: saturate(1) brightness(1);
}

.buzzer::after {
  background: center center / cover no-repeat url('./assets/images/buzzer_yes_no_split.png');
  filter: saturate(0.95) brightness(0.98);
}

/* 🟠 PENDING — slim pulse */
.buzzer--pending {
  animation: pulse-orange 1.1s infinite alternate;

  box-shadow:
    inset 0 0 0 12px rgba(255, 155, 0, 0.95),
    inset 0 0 32px rgba(255, 120, 0, 0.45),
    0 0 18px rgba(255, 140, 0, 0.55);
}

/* 🟢 CHOSEN — tight lock */
.buzzer--chosen {
  animation: none;

  box-shadow:
    inset 0 0 0 14px rgba(0, 230, 140, 0.95),
    inset 0 0 36px rgba(0, 120, 70, 0.45),
    0 0 22px rgba(0, 255, 160, 0.65);

  transform: scale(0.995);

  filter: hue-rotate(110deg) saturate(1.15) brightness(1.05);
}

.buzzer--disabled { opacity: 0.4; pointer-events: none; filter: grayscale(0.6); }
.buzzer--listening {
  box-shadow: inset 0 0 0 14px rgba(0, 230, 140, 0.95), inset 0 0 36px rgba(0, 120, 70, 0.45), 0 0 22px rgba(0, 255, 160, 0.65);
  filter: hue-rotate(110deg) saturate(1.15) brightness(1.05);
}

.buzzer__listening-icon {
  z-index: 2;
  position: absolute;
  left: 50%;
  top: calc(50% - 20px);
  display: none;
  align-items: center;
  justify-content: center;
  width: min(34vw, 220px);
  height: min(34vw, 220px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 48%, rgba(255, 255, 255, 0) 72%);
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.45));
}

.buzzer__listening-icon svg {
  width: 100%;
  height: 100%;
  fill: #fff;
  opacity: 0.96;
}

.buzzer-container[data-state="listening"] .buzzer__listening-icon {
  display: flex;
  animation: listening-icon-pulse 0.95s ease-in-out infinite alternate;
}

.buzzer-visual-open {
  background-image: url('./assets/images/buzzers_open.png');
}

.buzzer-visual-closed {
  background-image: url('./assets/images/buzzers_closed.png');
}

.buzzer-visual-open::before {
  opacity: 0;
}

.buzzer-visual-closed::before {
  opacity: 0;
}

.buzzer__finished {
  display: none;
  z-index: 2;
  position: absolute;
  top: 65vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 12px 28px;
  font-size: clamp(20px, 4vmin, 32px);
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.buzzer__confirm-controls {
  z-index: 3;
  position: absolute;
  top: calc(50% + min(24vw, 152px));
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(58vw, 250px);
  transform: translate(-50%, 14px) scale(0.97);
  padding: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.buzzer__confirm-controls.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.buzzer__confirm-controls.is-fading-out {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px) scale(0.97);
}

.buzzer__confirm-controls[hidden] {
  display: none !important;
}

.buzzer__confirm-button {
  flex: 1 1 0;
  min-height: 54px;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  color: #fff;
  font-size: clamp(20px, 5vmin, 30px);
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 14px 28px rgba(0, 0, 0, 0.34);
  touch-action: manipulation;
}

.buzzer__confirm-button--yes {
  display: none;
  background: linear-gradient(135deg, rgba(32, 210, 150, 0.96), rgba(0, 124, 255, 0.92));
}

.buzzer__confirm-button--no {
  background: linear-gradient(135deg, rgba(255, 105, 135, 0.96), rgba(255, 122, 50, 0.92));
}

.buzzer__transcript {
  display: none;
  z-index: 2;
  position: absolute;
  top: 8vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 0 12px;
  font-size: clamp(18px, 3.5vmin, 26px);
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* ---------------------------------- */
/* Animation                          */
/* ---------------------------------- */

@keyframes pulse-orange {
  from {
    box-shadow:
      inset 0 0 0 6px rgba(255, 170, 0, 0.8),
      0 0 12px rgba(255, 140, 0, 0.45);
  }
  to {
    box-shadow:
      inset 0 0 0 10px rgba(255, 120, 0, 1),
      0 0 26px rgba(255, 150, 0, 0.75);
  }
}

@keyframes listening-icon-pulse {
  from {
    transform: translate(-50%, -50%) scale(0.94);
    opacity: 0.88;
  }
  to {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 1;
  }
}

.buzzer-container[data-state="confirm"] .buzzer__label {
  display: none;
}

.buzzer-container[data-state="confirm"] .buzzer {
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
  overflow: hidden;
  border-radius: 0;
  opacity: 1;
  pointer-events: auto;
  filter: none;
  box-shadow:
    inset 0 0 0 8px rgba(255,255,255,0.10),
    inset 0 0 18px rgba(0,0,0,0.85);
  transition:
    opacity 120ms ease,
    box-shadow 260ms ease,
    filter 260ms ease,
    transform 220ms ease;
}

.buzzer-container[data-state="confirm"] .buzzer::before {
  opacity: 0;
}

.buzzer-container[data-state="confirm"] .buzzer::after {
  opacity: 1;
  filter: saturate(1.06) brightness(1.02);
}

.buzzer-container[data-state="confirm"] .buzzer__finished {
  display: none !important;
}

.buzzer-container[data-state="submitted"] .buzzer {
  pointer-events: none;
  opacity: 0;
  background-image: none !important;
  box-shadow: none;
}

.buzzer-container[data-state="submitted"] .buzzer::after {
  opacity: 0;
}

.buzzer-container[data-state="submitted"] .buzzer::before {
  opacity: 0;
}

body.low-power-mode .buzzer,
body.low-power-mode .game-end-status {
  transition: none !important;
}

body.low-power-mode .buzzer--pending {
  animation: none !important;
}

body.low-power-mode .halftime-status,
body.low-power-mode .game-end-status,
body.low-power-mode .waiting-status-card,
body.low-power-mode .low-power-toggle {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Confirm modal */
.confirm.hidden { display: none; }
.confirm { position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.8); display:flex; align-items:center; justify-content:center; }
.confirm__dialog { background:#222; padding:20px; border-radius:12px; width:90%; max-width:400px; text-align:center; }
.confirm__dialog textarea { width:100%; height:120px; }
.confirm__buttons { margin-top:10px; display:flex; gap:10px; justify-content:center; }

/* Advanced host menus use the owner dashboard's game-derived palette. */
html:has(body.advanced-theme) { background: #070718; }
body.advanced-theme {
  --advanced-red: #ff1a25;
  --advanced-blue: #596dff;
  --advanced-ink: #ffffff;
  --advanced-muted: #b9bee8;
  --advanced-panel: rgba(15, 16, 49, 0.88);
  --advanced-border: #343b82;
  position: relative;
  background: radial-gradient(circle at 82% 7%, rgba(255, 25, 35, 0.38), transparent 29%), linear-gradient(145deg, #070718 0%, #11133c 47%, #090919 73%, #32000b 100%);
  background-attachment: fixed;
  color: var(--advanced-ink);
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
body.advanced-theme::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -18vh -12vw auto auto;
  width: 72vw;
  height: 32vh;
  transform: rotate(-22deg);
  background: linear-gradient(180deg, transparent, rgba(113, 128, 255, 0.68) 48%, rgba(16, 19, 75, 0.7) 58%, transparent 78%);
  pointer-events: none;
}
body.advanced-theme nav {
  position: sticky;
  z-index: 20;
  top: 14px;
  padding: 8px;
  border: 1px solid rgba(70, 82, 167, 0.8);
  border-radius: 16px;
  background: rgba(7, 7, 24, 0.78);
  box-shadow: 0 16px 42px rgba(0, 0, 12, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.advanced-theme nav a {
  border: 0;
  background: transparent;
  color: var(--advanced-muted);
  backdrop-filter: none;
}
body.advanced-theme nav a[hidden] { display: none !important; }
body.advanced-theme nav a:hover,
body.advanced-theme nav a[aria-current="page"] {
  background: rgba(89, 109, 255, 0.18);
  color: #fff;
  box-shadow: none;
}
body.advanced-theme .nav-underline { background: var(--advanced-red); }
body.advanced-theme .tab-section { width: min(100%, 1080px); }
body.advanced-theme.fade-in > .tab-section { animation: none; }
body.advanced-theme #control-tab,
body.advanced-theme #venue-tab { margin-left: 0; }
body.advanced-theme h1 { font-weight: 700; letter-spacing: -0.7px; }
body.advanced-theme .control-layout,
body.advanced-theme .venue-layout,
body.advanced-theme #voice,
body.advanced-theme #songs,
body.advanced-theme .equalizer-panel,
body.advanced-theme .pulse-pairing-panel {
  border-color: var(--advanced-border);
}
body.advanced-theme .pulse-pairing-panel,
body.advanced-theme .equalizer-panel,
body.advanced-theme .random-genre-panel,
body.advanced-theme .song-rotation-memory,
body.advanced-theme .genre-picker-panel,
body.advanced-theme .custom-genre-panel,
body.advanced-theme .venue-save-bar {
  background: var(--advanced-panel);
  border: 1px solid var(--advanced-border);
  box-shadow: inset 0 1px 0 rgba(133, 145, 255, 0.14), 0 18px 48px rgba(0, 0, 12, 0.22);
}
body.advanced-theme .pulse-pairing-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body.advanced-theme input,
body.advanced-theme textarea,
body.advanced-theme select,
body.advanced-theme #voice-text {
  border-color: #4652a7;
  background: rgba(12, 13, 43, 0.88);
}
body.advanced-theme button,
body.advanced-theme .setup-secondary-button {
  border-color: #4652a7;
  background: #171a4a;
}
body.advanced-theme #control-tab button.inactive {
  border-color: #343b82;
  background: #151630;
  color: #8e94bf;
}
body.advanced-theme #control-tab .control-buttons button:not(.inactive):not(#pause-game-btn):not(.danger-control),
body.advanced-theme .venue-layout #save-venue-info-btn,
body.advanced-theme .venue-save-bar button[data-venue-save] {
  border-color: rgba(255, 74, 85, 0.82);
  background: linear-gradient(135deg, #ff2631, #cf0018);
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 26, 37, 0.25);
}
body.advanced-theme #control-tab .control-buttons button.mode-active {
  border-color: #7180ff;
  background: linear-gradient(135deg, #3546ca, #596dff);
}
body.advanced-theme input[type="checkbox"],
body.advanced-theme input[type="range"] { accent-color: var(--advanced-red); }
body.advanced-theme .equalizer-panel > summary,
body.advanced-theme .setup-choice-kicker,
body.advanced-theme .status-text { color: #9da8ff; }
body.advanced-theme #ws-status { border-color: var(--advanced-border); background: #11122d; }
body.advanced-theme #ws-status.connected { background: #252b72; }
body.advanced-theme .confirm__dialog { border: 1px solid var(--advanced-border); background: #11122d; }

@media (max-width: 680px) {
  body.advanced-theme { padding: 12px; }
  body.advanced-theme nav { top: 8px; gap: 3px; padding: 5px; margin-bottom: 24px; }
  body.advanced-theme nav a { padding: 12px 4px; font-size: 14px; }
}

/* Easy Start continues the owner dashboard's red-and-indigo game theme. */
html:has(body.dashboard-game-theme) { background: #070718; }
body.dashboard-game-theme {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  background: radial-gradient(circle at 82% 7%, rgba(255, 25, 35, 0.38), transparent 29%), linear-gradient(145deg, #070718 0%, #11133c 47%, #090919 73%, #32000b 100%);
  background-attachment: fixed;
}
body.dashboard-game-theme::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -18vh -12vw auto auto;
  width: 72vw;
  height: 32vh;
  transform: rotate(-22deg);
  background: linear-gradient(180deg, transparent, rgba(113, 128, 255, 0.68) 48%, rgba(16, 19, 75, 0.7) 58%, transparent 78%);
  pointer-events: none;
}
.dashboard-game-theme .easy-wizard-header {
  background: rgba(7, 7, 24, 0.82);
  border-color: #343b82;
  box-shadow: 0 12px 36px rgba(0, 0, 12, 0.3);
}
.dashboard-game-theme .setup-choice-kicker { color: #ff5b63; }
.dashboard-game-theme .easy-step-count,
.dashboard-game-theme .wizard-step-copy p,
.dashboard-game-theme .genre-picker-help { color: #b9bee8; }
.dashboard-game-theme .wizard-step {
  background: linear-gradient(145deg, rgba(19, 21, 61, 0.94), rgba(8, 8, 29, 0.94));
  border-color: #343b82;
  box-shadow: inset 0 1px 0 rgba(133, 145, 255, 0.14), 0 22px 60px rgba(0, 0, 12, 0.32);
}
.dashboard-game-theme .easy-field-stack input,
.dashboard-game-theme .easy-field-stack textarea,
.dashboard-game-theme .easy-field-stack select {
  border-color: #4652a7;
  background: rgba(12, 13, 43, 0.9);
}
.dashboard-game-theme .easy-field-stack option { background: #101231; }
.dashboard-game-theme button,
.dashboard-game-theme .setup-secondary-button,
.dashboard-game-theme .easy-field-stack .genre-chip,
.dashboard-game-theme .easy-field-stack .genre-style-toggle {
  border-color: #4652a7;
  background: #171a4a;
  color: #fff;
}
.dashboard-game-theme button:hover { box-shadow: inset 0 0 0 1px rgba(141, 154, 255, 0.45), 0 7px 22px rgba(0, 0, 12, 0.34); }
.dashboard-game-theme .genre-picker-panel,
.dashboard-game-theme .custom-genre-panel,
.dashboard-game-theme .genre-style-panel,
.dashboard-game-theme .easy-review-row {
  background: rgba(10, 11, 40, 0.78);
  border-color: #343b82;
}
.dashboard-game-theme .easy-field-stack .genre-chip.is-selected {
  border-color: #8d9aff;
  background: #596dff;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(89, 109, 255, 0.24);
}
.dashboard-game-theme .easy-field-stack .default-fun-night-btn,
.dashboard-game-theme .easy-save-row #save-venue-info-btn,
.dashboard-game-theme #wizard-next-btn {
  border-color: rgba(255, 74, 85, 0.82);
  background: linear-gradient(135deg, #ff2631, #cf0018);
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 26, 37, 0.24);
}
.dashboard-game-theme .easy-field-stack .genre-clear-button {
  border-color: rgba(255, 91, 99, 0.64);
  background: rgba(115, 0, 14, 0.62);
  color: #ffd9dc;
}
.dashboard-game-theme .easy-wizard-nav {
  background: rgba(7, 7, 24, 0.9);
  border-color: #343b82;
  box-shadow: 0 12px 36px rgba(0, 0, 12, 0.36);
}
.dashboard-game-theme input[type="checkbox"],
.dashboard-game-theme input[type="range"] { accent-color: #ff1a25; }
.dashboard-game-theme .pg-filter-disclaimer {
  margin-top: 4px;
  padding: 11px 13px;
  border-left: 3px solid #ff5b63;
  border-radius: 0 7px 7px 0;
  background: rgba(255, 26, 37, 0.08);
}

.dashboard-game-theme .easy-control-header {
  padding: 15px 18px;
  border: 1px solid #343b82;
  border-radius: 12px;
  background: rgba(7, 7, 24, 0.78);
  box-shadow: 0 14px 38px rgba(0, 0, 12, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dashboard-game-theme .easy-control-shell { min-width: 0; }
.dashboard-game-theme .easy-control-panel {
  background: linear-gradient(145deg, rgba(19, 21, 61, 0.94), rgba(8, 8, 29, 0.94));
  border-color: #343b82;
  box-shadow: inset 0 1px 0 rgba(133, 145, 255, 0.14), 0 18px 48px rgba(0, 0, 12, 0.26);
}
.dashboard-game-theme .easy-schedule-grid div {
  background: rgba(10, 11, 40, 0.78);
  border-color: #343b82;
}
.dashboard-game-theme .easy-schedule-grid span,
.dashboard-game-theme .easy-pulse-panel p { color: #b9bee8; }
.dashboard-game-theme .easy-pulse-address-row code {
  background: rgba(7, 7, 24, 0.82);
  border-color: #4652a7;
  color: #9da8ff;
}
.dashboard-game-theme .easy-volume-row { box-sizing: border-box; }
.dashboard-game-theme .equalizer-panel {
  background: rgba(7, 7, 24, 0.66);
  border-color: #343b82;
}
.dashboard-game-theme .easy-control-actions button {
  border-color: #4652a7;
  background: #171a4a;
  color: #fff;
}
.dashboard-game-theme .easy-primary-action:not(.inactive) {
  border-color: rgba(255, 74, 85, 0.82);
  background: linear-gradient(135deg, #ff2631, #cf0018);
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 26, 37, 0.25);
}
.dashboard-game-theme .easy-secondary-action:not(.inactive) {
  border-color: #7180ff;
  background: linear-gradient(135deg, #3546ca, #596dff);
}
.dashboard-game-theme .easy-danger-action:not(.inactive) {
  border-color: #ff5b63;
  background: linear-gradient(135deg, #79000e, #d30018);
}
.dashboard-game-theme .easy-control-actions button.inactive {
  border-color: #2f356e;
  background: #12132d;
  color: #858bb8;
  box-shadow: none;
}
.dashboard-game-theme #ws-status {
  border-color: #343b82;
  background: #11122d;
}
.dashboard-game-theme #ws-status:empty { display: none; }
.dashboard-game-theme #ws-status.connected { background: #252b72; }

@media (max-width: 760px) {
  .dashboard-game-theme .easy-control-shell { max-width: calc(100vw - 32px); }
  .dashboard-game-theme .easy-control-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }
  .dashboard-game-theme .easy-control-header-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .dashboard-game-theme .easy-control-header-actions .setup-secondary-button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}
