:root {
  color-scheme: dark;
  --black: #050607;
  --shell: #0b0c0e;
  --panel: #111315;
  --panel-2: #17191c;
  --panel-3: #202328;
  --line: #30343a;
  --line-soft: #23262b;
  --text: #e8e9e7;
  --muted: #8b9096;
  --dim: #585d63;
  --orange: #4da3ff;
  --orange-soft: #2d79c7;
  --gold: #f0b43f;
  --green: #58d68d;
}

/* V9 — engineered desktop instrument */
body {
  padding: 22px;
  background:
    radial-gradient(circle at 50% -20%, #ffffff 0, #eeeeee 42%, #d9d9d9 100%);
}

.discovery-machine {
  width: calc(100vw - 44px);
  height: calc(100vh - 44px);
  padding: 12px;
  gap: 5px;
  border: 1px solid #35383c;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 0%, rgba(255, 255, 255, 0.055), transparent 31%),
    linear-gradient(145deg, #292c30 0%, #141619 48%, #1d2023 100%);
  box-shadow:
    0 28px 55px rgba(0, 0, 0, 0.38),
    0 6px 14px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.7);
}

.machine-header,
.song-deck,
.board-panel,
.command-row > button,
.quick-folders,
.scan-console {
  border-color: #42464b;
  background:
    radial-gradient(circle at 40% 0%, rgba(255, 255, 255, 0.035), transparent 50%),
    linear-gradient(155deg, #202327, #111315 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 2px rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.75);
}

.machine-header {
  border-radius: 12px 12px 5px 5px;
}

.control-board,
.discovery-mode.active,
.playback-strip,
.discovery-controls,
.command-row {
  gap: 5px;
}

.song-deck,
.board-panel,
.quick-folders,
.scan-console,
.command-row > button {
  border-radius: 7px;
}

.song-deck {
  padding: 8px;
}

.preview-frame {
  border-color: #050607;
  box-shadow:
    0 0 0 2px #34373b,
    inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.player-column {
  border-inline: 1px solid #303338;
  padding-inline: 14px;
}

.player-scrubber {
  height: 6px;
  background: #363a3e;
  box-shadow: inset 0 1px 2px #050607, 0 1px rgba(255, 255, 255, 0.04);
}

.scan-display {
  border-color: #30343a;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #07090a;
  background-size: 100% 13px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.75);
}

.board-panel {
  padding: 11px;
}

.setting-module {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 42%),
    #171a1d;
}

.setting-module::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.45px, transparent 0.55px);
  background-size: 4px 4px;
}

.setting-header,
.setting-options,
.switch-control,
.mode-toggle {
  position: relative;
  z-index: 1;
}

.setting-options {
  justify-items: center;
  gap: 14px;
  padding: 9px 8px 13px;
}

.setting-button {
  position: relative;
  width: min(68px, 100%);
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #4f545a;
  border-radius: 50%;
  color: #d7d9db;
  background:
    radial-gradient(circle at 46% 39%, #50545a 0 16%, #35393e 17% 39%, #17191c 40% 67%, #0a0b0d 68% 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.13),
    inset 0 -6px 9px rgba(0, 0, 0, 0.7),
    0 4px 7px rgba(0, 0, 0, 0.88),
    0 0 0 5px #121416,
    0 0 0 6px #34383d;
  text-shadow: 0 1px 2px #000;
}

.setting-button::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #090a0b;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
  transform: translateX(-50%);
}

.setting-button:hover {
  border-color: #686d73;
  transform: translateY(-1px);
}

.setting-button.active {
  color: #ffffff;
  border-color: #62676d;
  background:
    radial-gradient(circle at 46% 39%, #61666c 0 16%, #3d4247 17% 39%, #1c1f22 40% 67%, #0a0b0d 68% 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.18),
    inset 0 -6px 9px rgba(0, 0, 0, 0.72),
    0 4px 7px rgba(0, 0, 0, 0.88),
    0 0 0 5px #121416,
    0 0 0 6px #5b6066;
}

.setting-button.active::before {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 126, 25, 0.95);
}

.setting-button small,
.setting-button.active small {
  color: var(--muted);
}

.mode-toggle {
  border-color: #4d5258;
  background:
    radial-gradient(circle at 44% 38%, #4d5257 0 16%, #30343a 17% 39%, #131518 40% 68%, #08090a 69% 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.12),
    inset 0 -7px 10px rgba(0, 0, 0, 0.75),
    0 5px 8px rgba(0, 0, 0, 0.8),
    0 0 0 5px #101214,
    0 0 0 6px #393d42;
}

.mode-toggle::after {
  width: 6px;
  height: 6px;
  border: 0;
  background: #070809;
  box-shadow: none;
}

.mode-toggle.active {
  border-color: #60656b;
  background:
    radial-gradient(circle at 44% 38%, #5c6167 0 16%, #393e43 17% 39%, #17191c 40% 68%, #08090a 69% 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.16),
    inset 0 -7px 10px rgba(0, 0, 0, 0.75),
    0 5px 8px rgba(0, 0, 0, 0.8),
    0 0 0 5px #101214,
    0 0 0 6px #565b61;
}

.mode-toggle.active::after {
  background: var(--orange);
  box-shadow: 0 0 9px rgba(255, 126, 25, 0.95);
}

.switch-control,
.switch-control.active {
  border: 1px solid #555a60;
  background: linear-gradient(#2d3034, #17191c);
  box-shadow: inset 0 2px 4px #08090a, 0 1px rgba(255, 255, 255, 0.08);
}

.switch-knob {
  background: linear-gradient(#f1f1ef, #a9acae);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.switch-copy {
  color: var(--orange);
}

.command-row > button {
  position: relative;
  overflow: hidden;
  color: #d5d7d9;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.command-row > button::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #090a0b;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.command-row > button:hover {
  border-color: #60656b;
  background: linear-gradient(155deg, #282c30, #151719 72%);
  transform: translateY(-1px);
}

.command-row .start-scan {
  color: #e6e7e8;
  border-color: #555a60;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 126, 25, 0.09), transparent 18%),
    linear-gradient(155deg, #282b2f, #131517 72%);
}

.command-row .start-scan > span,
.command-row .start-scan > strong {
  color: var(--orange);
}

.command-row .start-scan > small {
  color: var(--muted);
}

.command-row .start-scan::after,
.command-row > button.active::after {
  background: var(--orange);
  box-shadow: 0 0 9px rgba(255, 126, 25, 0.92);
}

.quick-folders {
  padding: 9px 11px 11px;
}

.quick-folder-buttons {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(48px, 1fr));
  align-content: stretch;
  gap: 6px;
}

.quick-folder,
.quick-folder-slot {
  position: relative;
  min-height: 0;
  padding: 9px 12px;
  border: 1px solid #44494f;
  border-radius: 7px;
  color: #c9cccf;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.055), transparent 42%),
    linear-gradient(#24272b, #151719);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.07),
    inset 0 -3px 3px rgba(0, 0, 0, 0.42),
    0 2px 3px rgba(0, 0, 0, 0.65);
}

.quick-folder::after,
.quick-folder-slot::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #65696d;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
}

.quick-folder:hover,
.quick-folder-slot:hover {
  border-color: #646a70;
  background: linear-gradient(#2c3034, #181a1d);
}

.quick-folder.saved {
  color: #d9eee2;
  border-color: #2e7d55;
  background: linear-gradient(#183426, #10251b);
}

.quick-folder.saved::after {
  background: var(--green);
  box-shadow: 0 0 8px rgba(56, 230, 137, 0.9);
}

.quick-folder-slot {
  color: #676c71;
}

.quick-folder-slot span {
  margin-right: 7px;
  color: var(--orange);
  font-size: 14px;
  vertical-align: -1px;
}

.quick-folder-slot::after {
  background: #25282b;
}

.scan-console {
  padding: 5px 7px 7px;
}

.scan-track {
  gap: 3px;
}

.scan-step {
  border-color: #3e4247;
  background:
    radial-gradient(circle at 50% 42%, #383c41 0 23%, #202327 24% 56%, #111315 57% 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 2px 3px rgba(0, 0, 0, 0.65);
}

.scan-step.heard {
  color: #ffe36c;
  border-color: #7c6b21;
  background: radial-gradient(circle at 50% 42%, #8c7723 0 23%, #3d3619 24% 56%, #16150f 57% 100%);
}

.scan-step.saved {
  color: #84f3b4;
  border-color: #278053;
  background: radial-gradient(circle at 50% 42%, #267b51 0 23%, #173d2c 24% 56%, #0e1712 57% 100%);
}

@media (max-width: 1200px), (max-height: 760px) {
  body {
    padding: 10px;
  }

  .discovery-machine {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    padding: 8px;
    border-radius: 18px;
  }

  .setting-options {
    gap: 10px;
  }

  .setting-button {
    width: min(58px, 100%);
  }
}

/* V12 — website panels, not a hardware gadget */
body {
  padding: 0;
  background: #0b0d0f;
}

.discovery-machine {
  width: 100vw;
  height: 100vh;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: #0b0d0f;
  box-shadow: none;
}

.machine-header,
.song-deck,
.board-panel,
.command-row > button,
.quick-folders,
.scan-console {
  border-color: #2b3035;
  border-radius: 0;
  background: #121519;
  box-shadow: none;
}

.machine-header {
  border-width: 0 0 1px;
}

.machine-body {
  grid-template-columns: minmax(210px, 22vw) minmax(0, 1fr);
  gap: 0;
}

.song-deck {
  padding: 8px 7px;
  border-width: 0 1px 0 0;
}

.control-board {
  grid-template-rows: 132px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #0b0d0f;
}

.playback-strip,
.discovery-mode.active,
.discovery-controls,
.command-row {
  gap: 8px;
}

.board-panel,
.command-row > button {
  border-radius: 6px;
}

.playback-strip {
  grid-template-columns: minmax(150px, 190px) minmax(280px, 1fr) minmax(180px, 23%);
  padding: 9px;
}

.mini-screen,
.scan-readout {
  border-radius: 4px;
}

.transport-controls button,
.transport-controls .main-play {
  width: 58px;
  height: 38px;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.transport-controls .main-play {
  width: 76px;
}

.song-progress::-webkit-slider-thumb {
  width: 14px;
  height: 20px;
  margin-top: -7px;
  border-radius: 3px;
  box-shadow: none;
}

.discovery-mode.active {
  grid-template-rows: 144px 76px minmax(96px, 1fr);
}

.discovery-controls {
  grid-template-columns: minmax(118px, .55fr) minmax(330px, 1.45fr) minmax(260px, 1.12fr) minmax(135px, .62fr);
}

.control-module {
  padding: 10px;
}

.control-module header span {
  width: auto;
  height: auto;
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 8px;
}

.setting-options {
  justify-items: stretch;
  gap: 7px;
  padding: 8px 0 5px;
}

.setting-button,
.setting-button.active {
  width: 100%;
  height: 64px;
  aspect-ratio: auto;
  padding: 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
  text-shadow: none;
}

.setting-button::before,
.setting-button.active::before {
  content: none;
}

.setting-button.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.setting-button:hover {
  transform: none;
}

.mode-toggle,
.mode-toggle.active {
  display: grid;
  grid-template-columns: auto 1fr;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  margin: auto 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.mode-toggle.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.mode-toggle::after,
.mode-toggle.active::after {
  content: none;
}

.mode-toggle span,
.mode-toggle.active span {
  color: inherit;
  font-size: 16px;
}

.switch-control,
.switch-control.active {
  display: grid;
  place-items: center;
  width: 100%;
  height: 54px;
  margin: auto 0;
  padding: 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.switch-control span {
  display: none;
}

.switch-control.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.switch-control.active strong {
  transform: none;
}

.command-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .72fr) minmax(180px, .92fr);
}

.command-row > button {
  grid-template-columns: 34px 1fr;
  padding: 8px 12px;
  background: #171b1f;
}

.command-row > button::after {
  content: none;
}

.command-row > button:hover {
  transform: none;
  background: #20252a;
}

.command-row .start-scan {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.quick-folders {
  padding: 9px 10px 10px;
}

.quick-folder-buttons {
  grid-template-rows: repeat(2, minmax(40px, 1fr));
  gap: 6px;
}

.quick-folder,
.quick-folder-slot {
  border-radius: 5px;
  background: #181c20;
  box-shadow: none;
}

.scan-console {
  border-width: 1px 0 0;
}

.scan-step,
.scan-step.heard,
.scan-step.saved {
  border-radius: 3px;
  background: #1b1f23;
  box-shadow: none;
}

.scan-step.heard { background: #4a3c12; }
.scan-step.saved { background: #143824; }

.workspace-switch button,
#manageQuickFolders,
#addSkipRange,
.remove-skip,
.rule-toggle,
.repeat-option,
.quick-folder,
.quick-folder-slot,
.folder-choice,
.close-dialog {
  border-radius: 5px;
  box-shadow: none;
}

.rule-toggle span {
  display: none;
}

.rule-toggle,
.rule-toggle.active {
  justify-content: center;
  padding: 0 12px;
}

.rule-toggle.active strong {
  transform: none;
}

@media (max-width: 1200px), (max-height: 760px) {
  body { padding: 0; }
  .discovery-machine { width: 100vw; height: 100vh; padding: 0; border-radius: 0; }
  .control-board { padding: 6px; }
  .setting-button { width: 100%; height: 58px; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  min-width: 980px;
  height: 100vh;
  overflow: hidden;
  color: var(--text);
  background: #030405;
  font-family: "Arial Narrow", "Roboto Condensed", Inter, system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.discovery-machine {
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr) 82px;
  gap: 8px;
  width: 100vw;
  height: 100vh;
  padding: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 0%, rgba(255, 138, 29, 0.04), transparent 30%),
    linear-gradient(135deg, #0a0b0d, #050607 70%);
  border: 1px solid #1f2226;
}

.machine-header,
.song-deck,
.board-panel,
.command-row > button,
.scan-console {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #141619, #0d0f11);
  box-shadow: inset 0 1px rgba(255,255,255,.035), 0 5px 16px rgba(0,0,0,.24);
}

.machine-header {
  display: grid;
  grid-template-columns: minmax(205px, 22%) minmax(0, 1fr) 138px;
  align-items: stretch;
  overflow: hidden;
  border-radius: 7px;
}

.machine-brand,
.heard-display {
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.machine-brand {
  gap: 11px;
  border-right: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #111;
  background: var(--orange);
  border-radius: 50%;
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(255,138,29,.1);
}

.machine-brand div,
.heard-display,
.deck-header div {
  display: grid;
  gap: 3px;
}

.machine-brand strong {
  font-size: 19px;
  letter-spacing: 0;
}

.machine-brand small,
.heard-display span,
.deck-header span,
.scan-label span {
  color: var(--muted);
  font: 700 8px/1.2 "Courier New", monospace;
  letter-spacing: .13em;
}

.now-display {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 78px;
  align-items: center;
  min-width: 0;
  padding: 0 14px;
  background: #08090a;
}

.now-display > span,
.now-display > strong {
  color: var(--orange);
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.now-display > strong {
  padding: 7px 6px;
  color: var(--gold);
  border: 1px solid #473118;
  border-radius: 4px;
  text-align: center;
}

.now-copy { min-width: 0; text-align: center; }
.now-copy h1, .now-copy p { margin: 0; }

.now-copy h1 {
  overflow: hidden;
  font: 700 clamp(15px, 1.45vw, 24px)/1.1 "Courier New", monospace;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-copy p {
  margin-top: 4px;
  color: var(--muted);
  font: 700 8px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.now-copy i {
  margin: 0 8px;
  color: var(--orange);
  font-style: normal;
}

#currentViews { color: var(--gold); }

.heard-display {
  justify-content: center;
  border-left: 1px solid var(--line);
  text-align: center;
}

.heard-display strong {
  color: var(--orange);
  font: 800 21px/1 "Courier New", monospace;
}

.machine-body {
  display: grid;
  grid-template-columns: minmax(205px, 22%) minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

.song-deck {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border-radius: 7px;
}

.deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 10px;
  border-bottom: 1px solid var(--line);
}

.deck-header strong {
  font: 700 15px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.deck-header > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 28px;
  color: var(--orange);
  background: #08090a;
  border: 1px solid #3a3d42;
  border-radius: 4px;
}

.song-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 12px 5px 80px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--orange-soft) #090a0b;
}

.song-card {
  position: relative;
  flex: 0 0 auto;
  width: min(86%, 245px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  color: #fff;
  background-color: #111;
  background-position: center;
  background-size: cover;
  border: 1px solid #4a4d51;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0,0,0,.34);
  text-align: left;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.song-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.08) 42%, rgba(0,0,0,.9)),
    linear-gradient(90deg, rgba(0,0,0,.24), transparent 55%);
}

.song-card:hover { transform: translateY(-2px); border-color: #777c82; }

.song-card.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255,138,29,.14), 0 14px 30px rgba(0,0,0,.45);
}

.song-card.saved { border-color: var(--green); }

.card-number,
.card-status,
.card-copy { position: absolute; z-index: 2; }

.card-number {
  top: 13px;
  left: 14px;
  font: 700 13px/1 "Courier New", monospace;
}

.card-status {
  top: 12px;
  right: 13px;
  width: 9px;
  height: 9px;
  background: #5a5e63;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0,0,0,.25);
}

.song-card.heard .card-status { background: var(--gold); }
.song-card.saved .card-status { background: var(--green); }

.card-copy {
  right: 14px;
  bottom: 15px;
  left: 14px;
  display: grid;
  gap: 5px;
}

.card-copy strong,
.card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-copy strong { font-size: 14px; letter-spacing: .04em; }
.card-copy span { color: #c5c7c8; font: 700 9px/1 "Courier New", monospace; }

.deck-loading {
  color: var(--muted);
  font: 700 9px/1.6 "Courier New", monospace;
  text-align: center;
}

.control-board {
  display: grid;
  grid-template-rows: 136px 160px 96px minmax(105px, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.board-panel { border-radius: 7px; }

.playback-strip {
  display: grid;
  grid-template-columns: 205px minmax(300px, 1fr) minmax(180px, 25%);
  gap: 12px;
  min-width: 0;
  padding: 10px;
}

.mini-screen {
  position: relative;
  overflow: hidden;
  background: #050607;
  border: 1px solid #3d4146;
  border-radius: 5px;
}

.mini-screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.08); }

.mini-screen span {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 4px 6px;
  color: var(--orange);
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,138,29,.35);
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: .1em;
}

.transport-bank {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: center;
  min-width: 0;
  padding: 4px 8px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 700 8px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.time-row strong { color: #cdd0d1; }

.song-progress {
  width: 100%;
  height: 25px;
  appearance: none;
  background: transparent;
}

.song-progress::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0 var(--progress, 0%), #35383d var(--progress, 0%) 100%);
  border-radius: 10px;
}

.song-progress::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  background: #1b1d20;
  border: 2px solid var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 3px #0b0c0e;
}

.transport-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.transport-controls button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: #c7c9ca;
  background: #191b1e;
  border: 1px solid #45494e;
  border-radius: 50%;
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 3px 5px #050607;
  font-size: 12px;
}

.transport-controls .main-play {
  width: 54px;
  height: 54px;
  color: var(--orange);
  border-color: var(--orange-soft);
  font-size: 18px;
}

.scan-readout {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  background: #090a0b;
  border: 1px solid #292c30;
  border-radius: 5px;
}

.scan-readout span,
.scan-readout small {
  color: var(--muted);
  font: 700 7px/1.3 "Courier New", monospace;
  letter-spacing: .08em;
}

.scan-readout strong {
  overflow: hidden;
  color: var(--orange);
  font: 700 11px/1.2 "Courier New", monospace;
  text-overflow: ellipsis;
}

.discovery-controls {
  display: grid;
  grid-template-columns: minmax(145px, .7fr) minmax(300px, 1.45fr) minmax(245px, 1.15fr) minmax(160px, .8fr);
  gap: 8px;
  min-width: 0;
}

.control-module {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 12px;
}

.control-module header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d2d4d4;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: .06em;
}

.control-module header span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--orange);
  background: #090a0b;
  border: 1px solid #34373b;
  border-radius: 50%;
  font-size: 7px;
}

.control-module > small {
  color: var(--muted);
  font: 700 7px/1 "Courier New", monospace;
  text-align: center;
}

.mode-toggle,
.switch-control {
  align-self: center;
  color: #c8cbcc;
  background: #191b1e;
  border: 1px solid #45494e;
}

.mode-toggle {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 74px;
  height: 74px;
  margin: 0 auto;
  border-radius: 50%;
}

.mode-toggle span { color: var(--muted); font-size: 20px; }
.mode-toggle strong { font: 700 8px/1 "Courier New", monospace; }

.mode-toggle.active {
  color: var(--orange);
  border-color: var(--orange-soft);
  box-shadow: inset 0 0 0 3px #0c0d0f, 0 0 14px rgba(255,138,29,.11);
}

.mode-toggle.active span { color: var(--orange); }

.setting-options {
  display: grid;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.setting-options.five-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.setting-options.four-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.setting-button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  height: 78px;
  color: #c5c7c8;
  background: #1b1d20;
  border: 1px solid #45494e;
  border-radius: 10px;
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 3px 5px #060708;
  font: 500 19px/1 "Courier New", monospace;
}

.setting-button small {
  color: var(--muted);
  font: 700 7px/1 "Courier New", monospace;
}

.setting-button:hover { border-color: #686d73; }

.setting-button.active {
  color: #111;
  background: var(--orange);
  border-color: #ffad54;
  box-shadow: inset 0 1px rgba(255,255,255,.24), 0 0 14px rgba(255,138,29,.16);
}

.setting-button.active small { color: #3f2209; }

.switch-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: center;
  width: 105px;
  height: 46px;
  margin: 0 auto;
  padding: 5px 12px 5px 6px;
  border-radius: 24px;
  font: 700 9px/1 "Courier New", monospace;
}

.switch-control span {
  width: 32px;
  height: 32px;
  background: #5c6065;
  border-radius: 50%;
  transition: transform .16s, background .16s;
}

.switch-control.active { color: #111; background: var(--orange); border-color: #ffad54; }
.switch-control.active span { transform: translateX(54px); background: #f3f3ef; }
.switch-control.active strong { transform: translateX(-35px); }

.command-row {
  display: grid;
  grid-template-columns: 1.5fr .7fr 1fr .8fr;
  gap: 8px;
}

.command-row > button {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 0;
  padding: 10px 13px;
  color: #d5d7d7;
  border-radius: 7px;
  text-align: left;
}

.command-row button > span {
  grid-row: 1 / span 2;
  color: var(--orange);
  font-size: 24px;
}

.command-row button > strong {
  overflow: hidden;
  font: 700 12px/1 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-row button > small {
  color: var(--muted);
  font: 700 7px/1 "Courier New", monospace;
}

.command-row .start-scan {
  color: #111;
  background: linear-gradient(180deg, #ff9d39, #e87413);
  border-color: #ffb05f;
}

.start-scan > span { color: #111 !important; }
.start-scan > small { color: #5e2d08 !important; }

.command-button:hover,
.command-button.saved,
.command-button.active {
  border-color: var(--orange-soft);
  background: #1d1712;
}

.command-button.saved > span,
.command-button.active > span { color: var(--orange); }

.quick-folders {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 12px;
}

.quick-folders header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.quick-folders header div { display: grid; gap: 4px; }
.quick-folders header span { font: 700 11px/1 "Courier New", monospace; letter-spacing: .08em; }
.quick-folders header strong { color: var(--muted); font: 700 7px/1 "Courier New", monospace; }

#manageQuickFolders {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  color: var(--orange);
  background: #191b1e;
  border: 1px solid #4a4d51;
  border-radius: 5px;
  font-size: 20px;
}

.quick-folder-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: center;
  gap: 7px;
  min-height: 0;
  padding-top: 9px;
}

.quick-folder {
  position: relative;
  min-width: 0;
  min-height: 45px;
  padding: 7px 24px 7px 9px;
  overflow: hidden;
  color: #b8bbbd;
  background: #181a1d;
  border: 1px solid #3d4146;
  border-radius: 6px;
  font: 700 8px/1.2 "Courier New", monospace;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-folder::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  background: #5a5e63;
  border-radius: 50%;
}

.quick-folder.saved {
  color: #dffbea;
  background: #10231a;
  border-color: #327a53;
}

.quick-folder.saved::after { background: var(--green); box-shadow: 0 0 7px rgba(88,214,141,.6); }

.quick-folder-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font: 700 8px/1.4 "Courier New", monospace;
  text-align: center;
}

.scan-console {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr) 245px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 14px;
  border-radius: 7px;
}

.scan-label { display: grid; gap: 5px; }
.scan-label strong { color: var(--orange); font: 700 10px/1 "Courier New", monospace; }

.scan-steps {
  display: grid;
  grid-template-columns: repeat(30, minmax(19px, 1fr));
  gap: 3px;
  min-width: 0;
}

.scan-step {
  position: relative;
  display: grid;
  place-items: start center;
  min-width: 0;
  height: 47px;
  padding-top: 5px;
  color: #71767b;
  background: #111315;
  border: 1px solid #30343a;
  border-radius: 5px;
  font: 700 7px/1 "Courier New", monospace;
}

.scan-step::after {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 8px;
  height: 8px;
  background: #4d5156;
  border: 2px solid #090a0b;
  border-radius: 50%;
}

.scan-step.heard::after { background: var(--gold); box-shadow: 0 0 6px rgba(240,180,63,.55); }
.scan-step.saved::after { background: var(--green); box-shadow: 0 0 6px rgba(88,214,141,.55); }

.scan-step.active {
  color: var(--orange);
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px rgba(255,138,29,.2);
}

.scan-step:disabled { opacity: .23; cursor: default; }

.step-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  color: var(--muted);
  font: 700 7px/1 "Courier New", monospace;
}

.step-legend span { display: flex; align-items: center; gap: 5px; }
.step-legend i { width: 8px; height: 8px; background: #4d5156; border-radius: 50%; }
.step-legend i.heard { background: var(--gold); }
.step-legend i.saved { background: var(--green); }

.folder-dialog {
  width: min(650px, calc(100vw - 40px));
  padding: 0;
  color: var(--text);
  background: #101214;
  border: 1px solid #45494e;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}

.folder-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.folder-sheet { padding: 22px; }

.folder-sheet header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.folder-sheet header p,
.folder-sheet header h2,
.folder-status { margin: 0; }

.folder-sheet header p { color: var(--orange); font: 700 8px/1 "Courier New", monospace; letter-spacing: .1em; }
.folder-sheet header h2 { margin-top: 6px; font: 700 20px/1.1 "Courier New", monospace; }

.close-dialog {
  width: 36px;
  height: 36px;
  color: #ddd;
  background: #1a1c1f;
  border: 1px solid #45494e;
  border-radius: 50%;
  font-size: 20px;
}

.folder-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 0;
}

.folder-choice {
  min-height: 54px;
  padding: 0 14px;
  color: #b9bcbe;
  background: #181a1d;
  border: 1px solid #3e4247;
  border-radius: 7px;
  font: 700 9px/1 "Courier New", monospace;
  text-align: left;
}

.folder-choice.saved {
  color: #111;
  background: var(--orange);
  border-color: #ffad54;
}

.folder-choice.quick-selected {
  color: #dffbea;
  background: #123220;
  border-color: #409568;
}

.folder-status {
  padding: 11px 12px;
  color: var(--orange);
  background: #090a0b;
  border-left: 3px solid var(--orange);
  font: 700 8px/1.3 "Courier New", monospace;
}

.audio-host {
  position: fixed;
  top: -2000px;
  left: -2000px;
  width: 320px;
  height: 180px;
  opacity: .01;
  pointer-events: none;
}

[hidden] { display: none !important; }

.machine-header {
  grid-template-columns: minmax(205px, 22%) minmax(0, 1fr) 292px;
}

.header-controls {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: stretch;
  border-left: 1px solid var(--line);
}

.header-controls .heard-display {
  padding: 0 7px;
  border: 0;
  border-right: 1px solid var(--line);
}

.header-controls .heard-display strong { font-size: 13px; }

.workspace-switch {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 5px;
  align-items: center;
  padding: 8px;
}

.workspace-switch button {
  height: 38px;
  padding: 0 8px;
  color: var(--muted);
  background: #131518;
  border: 1px solid #383c41;
  border-radius: 5px;
  font: 700 8px/1 "Courier New", monospace;
  letter-spacing: .04em;
}

.workspace-switch button.active {
  color: #111;
  background: var(--orange);
  border-color: #ffad54;
}

.song-list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  padding: 8px 8px 6px 50px;
  color: var(--dim);
  border-bottom: 1px solid var(--line-soft);
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.song-list-heading span:last-child { text-align: right; }

.song-list {
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px 60px;
  scrollbar-width: thin;
  scrollbar-color: var(--orange-soft) #090a0b;
}

.song-row {
  display: grid;
  grid-template-columns: 10px 30px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 31px;
  padding: 0 7px;
  color: #aeb1b3;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #1e2125;
  text-align: left;
}

.song-row:hover { background: #17191c; }

.song-row.active {
  color: #fff;
  background: #20170f;
  box-shadow: inset 2px 0 var(--orange);
}

.song-row .song-led {
  width: 7px;
  height: 7px;
  background: #50545a;
  border-radius: 50%;
}

.song-row.seen .song-led { background: #f4f4f1; box-shadow: 0 0 5px rgba(255,255,255,.45); }
.song-row.heard .song-led { background: var(--gold); box-shadow: 0 0 5px rgba(240,180,63,.5); }
.song-row.saved .song-led { background: var(--green); box-shadow: 0 0 5px rgba(88,214,141,.5); }
.song-row.liked .song-led { background: #ff5f7d; box-shadow: 0 0 6px rgba(255,95,125,.62); }

.song-row .song-number,
.song-row .song-views {
  color: var(--dim);
  font: 700 7px/1 "Courier New", monospace;
}

.song-row .song-title,
.song-row .song-views {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-row .song-title { font: 700 8px/1 "Courier New", monospace; }
.song-row .song-views { color: #a66b27; text-align: right; }
.song-row.active .song-number, .song-row.active .song-views { color: var(--orange); }

.control-board { grid-template-rows: 136px minmax(0, 1fr); }

.mode-view { min-width: 0; min-height: 0; }

.discovery-mode.active {
  display: grid;
  grid-template-rows: 160px 96px minmax(105px, 1fr);
  gap: 8px;
}

.command-row { grid-template-columns: 1.5fr .75fr 1fr; }

.player-mode {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(300px, .9fr);
  grid-template-rows: minmax(145px, 1fr) minmax(145px, 1fr) 76px;
  gap: 8px;
}

.rule-panel {
  min-width: 0;
  min-height: 0;
  padding: 14px;
}

.rule-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.rule-panel header div { display: grid; gap: 4px; }
.rule-panel header span, .rule-summary > span { color: var(--orange); font: 700 10px/1 "Courier New", monospace; }
.rule-panel header strong, .rule-summary > small { color: var(--muted); font: 700 7px/1.2 "Courier New", monospace; }

.skip-rules { grid-row: 1 / span 3; }

#addSkipRange {
  min-width: 100px;
  height: 34px;
  color: #111;
  background: var(--orange);
  border: 1px solid #ffad54;
  border-radius: 5px;
  font: 700 8px/1 "Courier New", monospace;
}

.rule-columns,
.skip-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr 34px;
  gap: 8px;
}

.rule-columns {
  padding: 12px 3px 6px;
  color: var(--dim);
  font: 700 7px/1 "Courier New", monospace;
}

.skip-ranges {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: calc(100% - 76px);
  overflow-y: auto;
}

.skip-range-row input,
.time-rule-inputs input {
  width: 100%;
  height: 42px;
  color: var(--text);
  background: #090a0b;
  border: 1px solid #3d4146;
  border-radius: 5px;
  outline: 0;
  font: 700 12px/1 "Courier New", monospace;
  text-align: center;
}

.skip-range-row input:focus,
.time-rule-inputs input:focus { border-color: var(--orange); }

.remove-skip {
  width: 34px;
  height: 42px;
  color: #c4c6c7;
  background: #1a1c1f;
  border: 1px solid #3d4146;
  border-radius: 5px;
  font-size: 16px;
}

.empty-rules {
  margin: 20px 0 0;
  color: var(--muted);
  font: 700 8px/1.5 "Courier New", monospace;
  text-align: center;
}

.loop-rules,
.repeat-rules { display: grid; grid-template-rows: auto 1fr; }

.rule-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 128px;
  height: 38px;
  margin: 13px auto 8px;
  padding: 5px 10px 5px 5px;
  color: var(--muted);
  background: #191b1e;
  border: 1px solid #45494e;
  border-radius: 22px;
  font: 700 8px/1 "Courier New", monospace;
}

.rule-toggle span { width: 27px; height: 27px; background: #555a60; border-radius: 50%; }
.rule-toggle.active { color: #111; background: var(--orange); border-color: #ffad54; }
.rule-toggle.active span { transform: translateX(84px); background: #f4f4ef; }
.rule-toggle.active strong { transform: translateX(-35px); }

.time-rule-inputs {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: end;
  gap: 8px;
}

.time-rule-inputs label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font: 700 7px/1 "Courier New", monospace;
}

.time-rule-inputs > span { padding-bottom: 14px; color: var(--orange); text-align: center; }

.repeat-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: center;
  padding-top: 12px;
}

.repeat-option {
  display: grid;
  place-items: center;
  gap: 7px;
  min-width: 0;
  height: 76px;
  color: var(--muted);
  background: #191b1e;
  border: 1px solid #3d4146;
  border-radius: 7px;
}

.repeat-option span { font: 700 21px/1 "Courier New", monospace; }
.repeat-option strong { font: 700 7px/1.2 "Courier New", monospace; }
.repeat-option.active { color: #111; background: var(--orange); border-color: #ffad54; }

.rule-summary {
  display: grid;
  align-content: center;
  gap: 7px;
  background: #090a0b;
}

.rule-summary > strong {
  overflow: hidden;
  color: #d6d8d8;
  font: 700 10px/1 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .discovery-machine { grid-template-rows: 62px minmax(0, 1fr) 76px; }
  .machine-header { grid-template-columns: 205px minmax(0, 1fr) 255px; }
  .machine-body { grid-template-columns: 205px minmax(0, 1fr); }
  .control-board { grid-template-rows: 125px minmax(0, 1fr); }
  .playback-strip { grid-template-columns: 175px minmax(260px, 1fr) 170px; }
  .discovery-controls { grid-template-columns: 135px minmax(270px, 1.4fr) minmax(215px, 1.1fr) 150px; }
  .setting-button { height: 70px; }
  .command-row button > strong { font-size: 10px; }
  .scan-console { grid-template-columns: 135px minmax(0, 1fr) 190px; padding-inline: 10px; }
  .step-legend { gap: 8px; }
}

@media (max-height: 760px) {
  .discovery-machine { grid-template-rows: 58px minmax(0, 1fr) 70px; gap: 6px; padding: 6px; }
  .control-board { grid-template-rows: 115px minmax(0, 1fr); gap: 6px; }
  .discovery-mode.active { grid-template-rows: 136px 82px minmax(88px, 1fr); gap: 6px; }
  .playback-strip { padding: 7px; }
  .setting-button { height: 62px; }
  .command-row > button { padding: 7px 10px; }
  .quick-folders { padding: 9px; }
  .quick-folder { min-height: 38px; }
  .song-card { width: min(80%, 210px); }
  .scan-step { height: 41px; }
}

/* V9 final cascade — Midlife Engineering-inspired control surface */
body {
  padding: 22px;
  background: radial-gradient(circle at 50% -20%, #fff 0, #eee 42%, #d9d9d9 100%);
}

.discovery-machine {
  width: calc(100vw - 44px);
  height: calc(100vh - 44px);
  padding: 12px;
  gap: 5px;
  border: 1px solid #35383c;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 0%, rgba(255,255,255,.055), transparent 31%),
    linear-gradient(145deg, #292c30, #141619 48%, #1d2023);
  box-shadow: 0 28px 55px rgba(0,0,0,.38), 0 6px 14px rgba(0,0,0,.24),
    inset 0 1px rgba(255,255,255,.08), inset 0 -2px rgba(0,0,0,.7);
}

.machine-header,
.song-deck,
.board-panel,
.command-row > button,
.quick-folders,
.scan-console {
  border-color: #42464b;
  border-radius: 7px;
  background:
    radial-gradient(circle at 40% 0%, rgba(255,255,255,.035), transparent 50%),
    linear-gradient(155deg, #202327, #111315 72%);
  box-shadow: inset 0 1px rgba(255,255,255,.06), inset 0 -2px 2px rgba(0,0,0,.55),
    0 1px 2px rgba(0,0,0,.75);
}

.machine-header { border-radius: 12px 12px 5px 5px; }
.control-board, .discovery-mode.active, .playback-strip, .discovery-controls, .command-row { gap: 5px; }
.song-deck { padding: 8px; }
.player-column { padding-inline: 14px; border-inline: 1px solid #303338; }
.player-scrubber { height: 6px; background: #363a3e; box-shadow: inset 0 1px 2px #050607; }
.preview-frame { border-color: #050607; box-shadow: 0 0 0 2px #34373b, inset 0 0 18px rgba(0,0,0,.55); }
.scan-display { border-color: #30343a; background: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), #07090a; background-size: 100% 13px; box-shadow: inset 0 0 20px rgba(0,0,0,.75); }

.board-panel { padding: 11px; }
.setting-module { position: relative; background: linear-gradient(155deg, rgba(255,255,255,.035), transparent 42%), #171a1d; }
.setting-module::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background-image: radial-gradient(rgba(255,255,255,.16) .45px, transparent .55px); background-size: 4px 4px; }
.setting-header, .setting-options, .switch-control, .mode-toggle { position: relative; z-index: 1; }
.setting-options { justify-items: center; gap: 14px; padding: 9px 8px 13px; }

.setting-button {
  position: relative;
  width: min(68px, 100%);
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #4f545a;
  border-radius: 50%;
  color: #d7d9db;
  background: radial-gradient(circle at 46% 39%, #50545a 0 16%, #35393e 17% 39%, #17191c 40% 67%, #0a0b0d 68%);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.13), inset 0 -6px 9px rgba(0,0,0,.7),
    0 4px 7px rgba(0,0,0,.88), 0 0 0 5px #121416, 0 0 0 6px #34383d;
  text-shadow: 0 1px 2px #000;
}

.setting-button::before { content: ""; position: absolute; top: 8px; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: #090a0b; transform: translateX(-50%); }
.setting-button:hover { border-color: #686d73; transform: translateY(-1px); }
.setting-button.active { color: #fff; border-color: #62676d; background: radial-gradient(circle at 46% 39%, #61666c 0 16%, #3d4247 17% 39%, #1c1f22 40% 67%, #0a0b0d 68%); box-shadow: inset 0 2px 3px rgba(255,255,255,.18), inset 0 -6px 9px rgba(0,0,0,.72), 0 4px 7px rgba(0,0,0,.88), 0 0 0 5px #121416, 0 0 0 6px #5b6066; }
.setting-button.active::before { background: var(--orange); box-shadow: 0 0 8px rgba(255,126,25,.95); }
.setting-button small, .setting-button.active small { color: var(--muted); }

.mode-toggle { border-color: #4d5258; background: radial-gradient(circle at 44% 38%, #4d5257 0 16%, #30343a 17% 39%, #131518 40% 68%, #08090a 69%); box-shadow: inset 0 2px 3px rgba(255,255,255,.12), inset 0 -7px 10px rgba(0,0,0,.75), 0 5px 8px rgba(0,0,0,.8), 0 0 0 5px #101214, 0 0 0 6px #393d42; }
.mode-toggle::after { width: 6px; height: 6px; border: 0; background: #070809; box-shadow: none; }
.mode-toggle.active { border-color: #60656b; background: radial-gradient(circle at 44% 38%, #5c6167 0 16%, #393e43 17% 39%, #17191c 40% 68%, #08090a 69%); box-shadow: inset 0 2px 3px rgba(255,255,255,.16), inset 0 -7px 10px rgba(0,0,0,.75), 0 5px 8px rgba(0,0,0,.8), 0 0 0 5px #101214, 0 0 0 6px #565b61; }
.mode-toggle.active::after { background: var(--orange); box-shadow: 0 0 9px rgba(255,126,25,.95); }

.switch-control, .switch-control.active { border: 1px solid #555a60; background: linear-gradient(#2d3034, #17191c); box-shadow: inset 0 2px 4px #08090a, 0 1px rgba(255,255,255,.08); }
.switch-knob { background: linear-gradient(#f1f1ef, #a9acae); box-shadow: 0 2px 5px rgba(0,0,0,.8); }
.switch-copy { color: var(--orange); }

.command-row > button { position: relative; overflow: hidden; color: #d5d7d9; transition: 140ms ease; }
.command-row > button::after { content: ""; position: absolute; top: 12px; right: 13px; width: 6px; height: 6px; border-radius: 50%; background: #090a0b; }
.command-row > button:hover { border-color: #60656b; background: linear-gradient(155deg, #282c30, #151719 72%); transform: translateY(-1px); }
.command-row .start-scan { color: #e6e7e8; border-color: #555a60; background: radial-gradient(circle at 12% 50%, rgba(255,126,25,.09), transparent 18%), linear-gradient(155deg, #282b2f, #131517 72%); }
.command-row .start-scan > span, .command-row .start-scan > strong { color: var(--orange); }
.command-row .start-scan > small { color: var(--muted); }
.command-row .start-scan::after, .command-row > button.active::after { background: var(--orange); box-shadow: 0 0 9px rgba(255,126,25,.92); }
.command-row { grid-template-columns: 1.5fr .75fr 1fr; }

.quick-folders { padding: 9px 11px 11px; }
.quick-folder-buttons { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(48px, 1fr)); align-content: stretch; gap: 6px; }
.quick-folder, .quick-folder-slot { position: relative; min-height: 0; padding: 9px 12px; border: 1px solid #44494f; border-radius: 7px; color: #c9cccf; font: 700 8px/1 "Courier New", monospace; letter-spacing: .04em; text-align: left; cursor: pointer; background: radial-gradient(circle at 30% 0%, rgba(255,255,255,.055), transparent 42%), linear-gradient(#24272b, #151719); box-shadow: inset 0 1px rgba(255,255,255,.07), inset 0 -3px 3px rgba(0,0,0,.42), 0 2px 3px rgba(0,0,0,.65); }
.quick-folder::after, .quick-folder-slot::after { content: ""; position: absolute; top: 10px; right: 11px; width: 6px; height: 6px; border-radius: 50%; background: #65696d; }
.quick-folder:hover, .quick-folder-slot:hover { border-color: #646a70; background: linear-gradient(#2c3034, #181a1d); }
.quick-folder.saved { color: #d9eee2; border-color: #2e7d55; background: linear-gradient(#183426, #10251b); }
.quick-folder.saved::after { background: var(--green); box-shadow: 0 0 8px rgba(56,230,137,.9); }
.quick-folder-slot { color: #676c71; }
.quick-folder-slot span { margin-right: 7px; color: var(--orange); font-size: 14px; vertical-align: -1px; }
.quick-folder-slot::after { background: #25282b; }

.scan-console { padding: 5px 7px 7px; }
.scan-track { gap: 3px; }
.scan-step { border-color: #3e4247; background: radial-gradient(circle at 50% 42%, #383c41 0 23%, #202327 24% 56%, #111315 57%); box-shadow: inset 0 1px rgba(255,255,255,.07), 0 2px 3px rgba(0,0,0,.65); }
.scan-step.heard { color: #ffe36c; border-color: #7c6b21; background: radial-gradient(circle at 50% 42%, #8c7723 0 23%, #3d3619 24% 56%, #16150f 57%); }
.scan-step.saved { color: #84f3b4; border-color: #278053; background: radial-gradient(circle at 50% 42%, #267b51 0 23%, #173d2c 24% 56%, #0e1712 57%); }

@media (max-width: 1200px), (max-height: 760px) {
  body { padding: 10px; }
  .discovery-machine { width: calc(100vw - 20px); height: calc(100vh - 20px); padding: 8px; border-radius: 18px; }
  .setting-options { gap: 10px; }
  .setting-button { width: min(58px, 100%); height: auto; }
  .quick-folder, .quick-folder-slot { min-height: 0; }
}

/* Flat website layout: playlist panel + controls panel. */
body {
  padding: 0;
  background: #0b0d0f;
}

.discovery-machine {
  width: 100vw;
  height: 100vh;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: #0b0d0f;
  box-shadow: none;
}

.machine-header,
.song-deck,
.board-panel,
.command-row > button,
.quick-folders,
.scan-console {
  border-color: #2b3035;
  background: #121519;
  box-shadow: none;
}

.machine-header {
  grid-template-columns: minmax(210px, 22vw) minmax(0, 1fr) 112px;
  align-items: center;
  border-width: 0 0 1px;
  border-radius: 0;
}

.machine-brand {
  height: 100%;
  padding: 0 18px;
}

.machine-brand strong {
  font-size: 18px;
}

.now-display {
  display: block;
  padding: 0 18px;
  background: #08090a;
  text-align: center;
}

.now-display h1 {
  margin: 0;
  overflow: hidden;
  font: 700 clamp(16px, 1.35vw, 23px)/1.1 "Courier New", monospace;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-count {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: var(--orange);
  border-left: 1px solid #2b3035;
  font: 800 18px/1 "Courier New", monospace;
}

.machine-body {
  grid-template-columns: minmax(210px, 22vw) minmax(0, 1fr);
  gap: 0;
}

.song-deck {
  padding: 8px 7px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

.control-board {
  grid-template-rows: 132px 48px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #0b0d0f;
}

.playback-strip,
.discovery-mode.active,
.discovery-controls,
.command-row {
  gap: 8px;
}

.board-panel,
.command-row > button,
.quick-folders {
  border-radius: 6px;
}

.playback-strip {
  grid-template-columns: minmax(150px, 190px) minmax(280px, 1fr) minmax(180px, 23%);
  padding: 9px;
}

.mini-screen,
.scan-readout {
  border-radius: 4px;
}

.scan-readout { gap: 7px; padding: 10px 12px; }

.transport-controls button,
.transport-controls .main-play {
  width: 58px;
  height: 38px;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.transport-controls .main-play { width: 76px; }

.song-progress::-webkit-slider-thumb {
  width: 14px;
  height: 20px;
  margin-top: -7px;
  border-radius: 3px;
  box-shadow: none;
}

.discovery-mode.active {
  grid-template-rows: 144px 76px;
  align-content: start;
}

.discovery-controls {
  grid-template-columns: 140px minmax(430px, 550px) minmax(350px, 440px) 140px;
  justify-content: start;
}

.control-module { padding: 10px; }

.control-module header span {
  width: auto;
  height: auto;
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 8px;
}

.setting-options {
  justify-items: start;
  gap: 7px;
  padding: 8px 0 5px;
}

.setting-button,
.setting-button.active {
  width: 82px;
  height: 64px;
  aspect-ratio: auto;
  padding: 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
  text-shadow: none;
}

.setting-button::before,
.setting-button.active::before { content: none; }

.setting-button.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.setting-button:hover { transform: none; }

.mode-toggle,
.mode-toggle.active {
  display: grid;
  grid-template-columns: auto 1fr;
  place-items: center;
  gap: 8px;
  width: 112px;
  height: 54px;
  margin: auto;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.mode-toggle.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.mode-toggle::after,
.mode-toggle.active::after { content: none; }

.mode-toggle span,
.mode-toggle.active span {
  color: inherit;
  font-size: 16px;
}

.switch-control,
.switch-control.active {
  display: grid;
  place-items: center;
  width: 112px;
  height: 54px;
  margin: auto;
  padding: 0;
  border-radius: 5px;
  background: #1b1f23;
  box-shadow: none;
}

.switch-control span { display: none; }

.switch-control.active {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.switch-control.active strong { transform: none; }

.command-row {
  display: flex;
  justify-content: flex-start;
}

.command-row > button {
  width: 210px;
  flex: 0 0 210px;
  grid-template-columns: 34px 1fr;
  padding: 8px 12px;
  border-radius: 5px;
  background: #171b1f;
}

.command-row .start-scan { width: 230px; flex-basis: 230px; }
.command-row .command-button:last-child { width: 230px; flex-basis: 230px; }

.command-row > button::after { content: none; }

.command-row > button:hover {
  transform: none;
  background: #20252a;
}

.command-row .start-scan {
  color: #111;
  border-color: #ffad54;
  background: var(--orange);
}

.quick-folders { padding: 9px 10px 10px; }

.discovery-mode > .quick-folders { display: none; }

.quick-folder-buttons {
  grid-template-rows: repeat(2, 42px);
  gap: 6px;
}

.quick-folder,
.quick-folder-slot {
  border-radius: 5px;
  background: #181c20;
  box-shadow: none;
}

.scan-console {
  border-width: 1px 0 0;
  border-radius: 0;
}

.scan-step,
.scan-step.heard,
.scan-step.saved {
  border-radius: 3px;
  background: #1b1f23;
  box-shadow: none;
}

.scan-step.heard { background: #4a3c12; }
.scan-step.saved { background: #143824; }

.workspace-switch button,
#manageQuickFolders,
#addSkipRange,
.remove-skip,
.rule-toggle,
.repeat-option,
.quick-folder,
.quick-folder-slot,
.folder-choice,
.close-dialog {
  border-radius: 5px;
  box-shadow: none;
}

.song-list-heading,
.song-row .song-number,
.song-row .song-title {
  font-size: 8px;
}

.song-row .song-title { font-size: 9px; }

.song-list-heading span:last-child,
.song-row .song-views {
  font-size: 9px;
}

.rule-toggle span { display: none; }

.rule-toggle,
.rule-toggle.active {
  justify-content: center;
  padding: 0 12px;
}

.rule-toggle.active strong { transform: none; }

@media (max-width: 1200px), (max-height: 760px) {
  body { padding: 0; }
  .discovery-machine { width: 100vw; height: 100vh; padding: 0; border-radius: 0; }
  .control-board { padding: 6px; }
  .discovery-controls { grid-template-columns: 120px minmax(360px, 1fr) minmax(290px, .8fr) 120px; }
  .setting-button { width: 68px; height: 58px; }
}

/* V15 — cohesive professional right-side control console */
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 6px 8px 6px 16px;
}

.panel-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.panel-toolbar > div:first-child strong {
  color: #e7e8e6;
  font: 700 11px/1 "Arial", sans-serif;
  letter-spacing: .035em;
}

.panel-toolbar > div:first-child span {
  color: #747a80;
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: .08em;
}

.panel-toolbar .workspace-switch {
  display: grid;
  grid-template-columns: 108px 120px;
  gap: 3px;
  padding: 0;
}

.panel-toolbar .workspace-switch button {
  position: relative;
  height: 34px;
  color: #8e9499;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font: 700 8px/1 "Courier New", monospace;
}

.panel-toolbar .workspace-switch button:hover {
  color: #d7d9da;
  background: #191d21;
}

.panel-toolbar .workspace-switch button.active {
  color: var(--orange);
  background: #191d21;
  box-shadow: inset 0 -2px var(--orange);
}

.discovery-mode.active {
  display: block;
  min-height: 0;
}

.discovery-console {
  width: 100%;
  overflow: hidden;
  padding: 0;
}

.control-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  min-height: 82px;
  padding: 10px 16px;
  border-bottom: 1px solid #2b3035;
}

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

.row-label > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--orange);
  background: #0c0e10;
  border: 1px solid #363b40;
  border-radius: 4px;
  font: 700 7px/1 "Courier New", monospace;
}

.now-display {
  background: transparent;
}

.discovery-console .command-row .start-scan > span {
  color: #ffffff !important;
}

/* V17 — full-height, balanced right-panel composition */
.control-board {
  grid-template-rows: minmax(250px, 42%) minmax(0, 1fr);
  min-height: 0;
}

.playback-strip {
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  padding: 18px;
}

.mini-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.transport-bank {
  align-self: stretch;
  align-content: center;
  padding: 22px 34px;
}

.transport-controls {
  margin-top: 12px;
}

.discovery-mode.active {
  min-height: 0;
}

.discovery-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 100%;
  min-height: 0;
}

.control-row {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #2b3035;
}

.control-row:nth-child(odd) {
  border-right: 1px solid #2b3035;
}

.row-label {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.row-label > span {
  padding-top: 2px;
}

.row-label strong {
  font-size: 12px;
}

.row-label small {
  margin-top: 1px;
  font-size: 8px;
}

.control-row .setting-options,
.behavior-options {
  align-self: center;
  justify-content: center;
  width: 100%;
}

.control-row .setting-options {
  gap: 10px;
}

.control-row .setting-button,
.control-row .setting-button.active {
  width: 84px;
  height: 62px;
  flex-basis: 84px;
  font-size: 19px;
}

.behavior-options {
  gap: 10px;
}

.behavior-options .mode-toggle,
.behavior-options .mode-toggle.active,
.behavior-options .switch-control,
.behavior-options .switch-control.active {
  width: 190px;
  height: 54px;
}

.discovery-console .command-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 184px));
  align-content: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #2b3035;
  background: #0f1215;
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  width: 100%;
  height: 62px;
  flex-basis: auto;
}

@media (max-width: 1250px) {
  .control-board { grid-template-rows: minmax(220px, 38%) minmax(0, 1fr); }
  .playback-strip { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .control-row { padding: 14px 16px; }
  .control-row .setting-button,
  .control-row .setting-button.active { width: 68px; height: 56px; flex-basis: 68px; }
  .behavior-options .mode-toggle,
  .behavior-options .mode-toggle.active,
  .behavior-options .switch-control,
  .behavior-options .switch-control.active { width: 160px; }
  .discovery-console .command-row { grid-template-columns: repeat(3, minmax(0, 150px)); padding: 14px 16px; }
}

.row-label > div {
  display: grid;
  gap: 5px;
}

.row-label strong {
  color: #dfe1e1;
  font: 700 10px/1 "Arial", sans-serif;
  letter-spacing: .025em;
}

.row-label small {
  color: #686e74;
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: .05em;
}

.control-row .setting-options {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.control-row .setting-button,
.control-row .setting-button.active {
  width: 76px;
  height: 52px;
  flex: 0 0 76px;
  border-radius: 4px;
  font-size: 17px;
}

.control-row .setting-button {
  color: #c9cccf;
  background: #1a1e22;
  border-color: #3a4046;
}

.control-row .setting-button:hover {
  color: #fff;
  border-color: #697078;
  background: #22272c;
}

.control-row .setting-button.active {
  color: #111;
  border-color: #ffab59;
  background: var(--orange);
}

.behavior-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.behavior-options .mode-toggle,
.behavior-options .mode-toggle.active,
.behavior-options .switch-control,
.behavior-options .switch-control.active {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  width: 184px;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  color: #b9bdc0;
  background: #1a1e22;
  border: 1px solid #3a4046;
  border-radius: 4px;
  box-shadow: none;
}

.behavior-options .mode-toggle span,
.behavior-options .switch-control span {
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font: 700 9px/1 "Arial", sans-serif;
  text-align: left;
  transform: none;
}

.behavior-options .switch-control.active span {
  background: transparent;
  transform: none;
}

.behavior-options .mode-toggle strong,
.behavior-options .switch-control strong {
  color: #777d83;
  font: 700 8px/1 "Courier New", monospace;
  transform: none;
}

.behavior-options .mode-toggle.active,
.behavior-options .switch-control.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.behavior-options .mode-toggle.active strong,
.behavior-options .switch-control.active strong {
  color: var(--orange);
}

.discovery-console .command-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px 206px;
  background: #0f1215;
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  width: 184px;
  height: 58px;
  flex: 0 0 184px;
  padding: 9px 12px;
  border-radius: 4px;
}

.discovery-console .command-row .start-scan {
  color: #111;
  background: var(--orange);
  border-color: #ffad5c;
}

.discovery-console .command-row .command-button {
  color: #d9dbdc;
  background: #1a1e22;
  border-color: #3a4046;
}

.discovery-console .command-row .command-button:hover {
  background: #22272c;
  border-color: #697078;
}

@media (max-width: 1250px) {
  .control-row { grid-template-columns: 165px minmax(0, 1fr); }
  .discovery-console .command-row { padding-left: 181px; }
  .control-row .setting-button,
  .control-row .setting-button.active { width: 68px; flex-basis: 68px; }
}

/* V16 — remove redundant status and mode toolbar */
.scan-readout,
.panel-toolbar {
  display: none;
}

.control-board {
  grid-template-rows: 132px minmax(0, 1fr);
}

.playback-strip {
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  grid-template-columns: 30px 1fr;
  grid-template-rows: 1fr;
  column-gap: 14px;
}

.discovery-console .command-row button > span {
  grid-row: 1;
}

.discovery-console .command-row button > small {
  display: none;
}

.control-row .setting-button small {
  font-size: 8px;
}

.control-row .setting-button.active small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 900;
}

.control-row .setting-button.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.discovery-console .command-row .start-scan {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.discovery-console .command-row .start-scan > span,
.discovery-console .command-row .start-scan > strong {
  color: var(--orange);
}

.row-label > span {
  width: 20px;
  height: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* Final right-panel composition. This file is intentionally last in the cascade. */

.now-display { background: transparent; }

.song-row.active { box-shadow: none; }

.scan-readout,
.panel-toolbar,
.discovery-mode > .quick-folders {
  display: none;
}

.control-board {
  grid-template-rows: minmax(260px, 42%) minmax(0, 1fr);
  min-height: 0;
  gap: 8px;
  padding: 8px;
}

.playback-strip {
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  padding: 18px;
}

.mini-screen {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.transport-bank {
  align-self: stretch;
  align-content: center;
  padding: 24px 40px;
}

.transport-controls { margin-top: 12px; }

.discovery-mode.active {
  display: block;
  min-height: 0;
}

.discovery-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr)) 82px;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.discovery-console > .behavior-row {
  display: none;
}

.control-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  min-height: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #2b3035;
}

.control-row:nth-child(odd) { border-right: 0; }

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

.row-label > span {
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: 700 8px/1 "Courier New", monospace;
}

.row-label > div { display: block; }

.row-label strong {
  color: #e2e4e4;
  font: 700 12px/1 "Arial", sans-serif;
  letter-spacing: .025em;
}

.row-label small { display: none; }

.control-row .setting-options,
.behavior-options {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  width: 100%;
  gap: 10px;
  padding: 0;
}

.control-row .setting-button,
.control-row .setting-button.active {
  width: 84px;
  height: 62px;
  flex: 0 0 84px;
  aspect-ratio: auto;
  border-radius: 4px;
  box-shadow: none;
  font-size: 19px;
  text-shadow: none;
}

.control-row .setting-button {
  color: #c9cccf;
  background: #1a1e22;
  border-color: #3a4046;
}

.control-row .setting-button:hover {
  color: #fff;
  background: #22272c;
  border-color: #697078;
  transform: none;
}

.control-row .setting-button.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.control-row .setting-button::before,
.control-row .setting-button.active::before { content: none; }

.control-row .setting-button small {
  color: #8f959a;
  font-size: 8px;
}

.control-row .setting-button.active small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 900;
}

.behavior-options .mode-toggle,
.behavior-options .mode-toggle.active,
.behavior-options .switch-control,
.behavior-options .switch-control.active {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  width: 190px;
  height: 54px;
  margin: 0;
  padding: 0 14px;
  color: #b9bdc0;
  background: #1a1e22;
  border: 1px solid #3a4046;
  border-radius: 4px;
  box-shadow: none;
}

.behavior-options .mode-toggle span,
.behavior-options .switch-control span,
.behavior-options .switch-control.active span {
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font: 700 9px/1 "Arial", sans-serif;
  text-align: left;
  transform: none;
}

.behavior-options .mode-toggle strong,
.behavior-options .switch-control strong,
.behavior-options .switch-control.active strong {
  color: #777d83;
  font: 700 8px/1 "Courier New", monospace;
  transform: none;
}

.behavior-options .mode-toggle.active,
.behavior-options .switch-control.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.behavior-options .mode-toggle.active strong,
.behavior-options .switch-control.active strong { color: var(--orange); }

.discovery-console .command-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 184px));
  align-content: center;
  justify-content: start;
  gap: 10px;
  min-height: 0;
  padding: 10px 22px 10px 252px;
  border-bottom: 1px solid #2b3035;
  background: #0f1215;
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  width: 100%;
  height: 62px;
  min-width: 0;
  flex: none;
  column-gap: 14px;
  padding: 9px 12px;
  border-radius: 4px;
}

.discovery-console .command-row button > span { grid-row: 1; }
.discovery-console .command-row button > small { display: none; }

.discovery-console .command-row .start-scan {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.discovery-console .command-row .start-scan > span {
  color: #fff !important;
}

.discovery-console .command-row .start-scan > strong { color: var(--orange); }

.discovery-console .command-row .command-button {
  color: #d9dbdc;
  background: #1a1e22;
  border-color: #3a4046;
}

.discovery-console .command-row .command-button:hover {
  background: #22272c;
  border-color: #697078;
}

@media (max-width: 1250px) {
  .control-board { grid-template-rows: minmax(230px, 38%) minmax(0, 1fr); }
  .playback-strip { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .transport-bank { padding-inline: 24px; }
  .control-row { grid-template-columns: 175px minmax(0, 1fr); padding: 15px 16px; }
  .control-row .setting-button,
  .control-row .setting-button.active { width: 68px; height: 56px; flex-basis: 68px; }
  .behavior-options .mode-toggle,
  .behavior-options .mode-toggle.active,
  .behavior-options .switch-control,
  .behavior-options .switch-control.active { width: 160px; }
  .discovery-console .command-row { grid-template-columns: repeat(3, minmax(0, 150px)); padding: 10px 16px 10px 207px; }
}

:root {
  --v4-bg: #0a0d0f;
  --v4-panel: #12161a;
  --v4-panel-raised: #181d22;
  --v4-line: #30363c;
  --v4-line-soft: #252b30;
  --v4-text: #ecece8;
  --v4-muted: #7f878d;
  --v4-orange: #4da3ff;
  --v4-active: #111f2d;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--v4-bg);
}

button,
input { font: inherit; }

.discovery-machine {
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  padding: 0;
  gap: 0;
  color: var(--v4-text);
  background: var(--v4-bg);
  font-family: Arial, Helvetica, sans-serif;
}

.machine-header {
  display: grid;
  grid-template-columns: 260px repeat(3, minmax(0, 1fr));
  min-height: 0;
  background: #111519;
  border: 0;
  border-bottom: 1px solid var(--v4-line);
}

.machine-brand,
.now-display,
.header-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-setting {
  display: grid;
  grid-template-rows: auto 38px;
  align-content: center;
  min-width: 0;
  padding: 0 12px;
  gap: 7px;
  border-right: 1px solid var(--v4-line);
}

.header-setting > span {
  overflow: hidden;
  color: var(--v4-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-toggle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  background: #171c20;
  border: 1px solid #454c52;
  border-radius: 4px;
}

.header-toggle .setting-button,
.header-toggle .setting-button.active {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 36px;
  min-height: 0;
  padding: 0;
  gap: 3px;
  color: #aeb4b8;
  background: transparent;
  border: 0;
  border-right: 1px solid #353c41;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  text-shadow: none;
  cursor: pointer;
}

.header-toggle .setting-button:last-child { border-right: 0; }
.header-toggle .setting-button::before { content: none; }
.header-toggle .setting-button:hover { color: #fff; background: #20262b; }

.header-toggle .setting-button.active {
  color: #111416;
  background: var(--v4-orange);
  border-color: transparent;
}

.header-toggle .setting-button small {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .04em;
}

.heard-count {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 20;
  color: var(--v4-orange);
  background: transparent;
  border: 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .03em;
  pointer-events: none;
}

.machine-brand {
  gap: 12px;
  padding: 0 18px;
  border-right: 1px solid var(--v4-line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--v4-orange);
  border-radius: 50%;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.05em;
}

.brand-copy {
  display: grid;
  gap: 5px;
}

.machine-brand strong {
  color: var(--v4-text);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-copy small {
  color: var(--v4-muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.auth-entry {
  display: grid;
  place-items: center;
  min-width: 76px;
  height: 34px;
  padding: 0 12px;
  color: #c3c7c9;
  background: #171c20;
  border: 1px solid #3d444a;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
}

.auth-entry:hover,
.auth-entry.signed-in {
  color: var(--v4-orange);
  border-color: #285f92;
}

.now-display {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  justify-content: center;
  padding: 0 24px;
  background: transparent;
}

.now-display > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--v4-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .15em;
}

.now-display > span i {
  width: 6px;
  height: 6px;
  background: var(--v4-orange);
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(77,163,255,.55);
}

.now-display h1 {
  overflow: hidden;
  margin: 0;
  color: var(--v4-text);
  font-size: clamp(16px, 1.2vw, 21px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-meta {
  justify-content: flex-end;
  gap: 22px;
  padding: 0 18px;
  border-left: 1px solid var(--v4-line);
}

.heard-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.heard-meta span {
  color: var(--v4-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.heard-meta strong {
  color: var(--v4-orange);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .045em;
}

.three-column-workspace {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  min-height: 0;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.country-panel,
.playlist-panel,
.library-panel,
.player-control-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--v4-panel);
  border: 1px solid var(--v4-line);
  border-radius: 7px;
}

.country-panel,
.playlist-panel,
.library-panel {
  display: grid;
}

.country-panel { grid-template-rows: 52px 34px minmax(0, 1fr); }
.playlist-panel { grid-template-rows: 52px 34px minmax(0, 1fr); }
.library-panel { grid-template-rows: 52px 34px minmax(0, 1fr); }

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--v4-line);
}

.library-header strong {
  color: var(--v4-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
}

.library-header span {
  color: var(--v4-orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.country-list,
.playlist-list,
.single-song-list {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #535b61 #0e1215;
}

.library-empty {
  margin: 0;
  padding: 28px 24px;
  color: #6f8aa1;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .08em;
}

.country-list,
.playlist-list { overflow-y: scroll; }

.playlist-row {
  display: grid;
  grid-template-columns: 10px 40px minmax(0, 1fr) 68px;
  align-items: center;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: #9da4a9;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--v4-line-soft);
  cursor: pointer;
  gap: 7px;
}

.country-row {
  grid-template-columns: 22px minmax(0, 1fr) 68px;
}

.country-row > span:nth-child(2) { display: none; }

.country-row .country-flag,
.country-row.active .country-flag {
  display: block;
  width: 20px;
  color: initial;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.playlist-row:hover { background: #181d21; }

.playlist-row.active {
  color: var(--v4-orange);
  background: var(--v4-active);
}

.playlist-row > span:not(.playlist-led),
.playlist-row em {
  color: #697178;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.playlist-row strong {
  overflow: hidden;
  font-size: 11px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  line-height: 11px;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-row em {
  color: #438fd6;
  text-align: right;
}

.playlist-row .playlist-led {
  width: 7px;
  height: 7px;
  background: #50575d;
  border-radius: 50%;
}

.playlist-row.active .playlist-led {
  background: #f0f0ed;
  box-shadow: 0 0 8px rgba(255,255,255,.35);
}

.playlist-row.active > span:not(.playlist-led),
.playlist-row.active strong,
.playlist-row.active em { color: var(--v4-orange); }

.library-panel > .song-list-heading,
.country-panel > .country-list-heading,
.playlist-panel > .playlist-list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  align-items: center;
  padding: 0 12px 0 72px;
  color: var(--v4-muted);
  border-bottom: 1px solid var(--v4-line-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.library-panel > .song-list-heading span:last-child,
.country-panel > .country-list-heading span:last-child,
.playlist-panel > .playlist-list-heading span:last-child { text-align: right; }

.single-song-list .song-row {
  display: grid;
  grid-template-columns: 10px 40px minmax(0, 1fr) 68px;
  align-items: center;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: #9da4a9;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--v4-line-soft);
  cursor: pointer;
}

.single-song-list .song-row:hover { background: #181d21; }

.single-song-list .song-row.active {
  color: var(--v4-orange);
  background: var(--v4-active);
  box-shadow: none;
}

.single-song-list .song-led {
  width: 7px;
  height: 7px;
  background: #50575d;
  border-radius: 50%;
}

.single-song-list .song-row.seen .song-led { background: #f0f0ed; box-shadow: 0 0 8px rgba(255,255,255,.35); }
.single-song-list .song-row.heard .song-led { background: #efb83f; box-shadow: 0 0 8px rgba(239,184,63,.45); }
.single-song-list .song-row.saved .song-led { background: #48d889; box-shadow: 0 0 8px rgba(72,216,137,.45); }
.single-song-list .song-row.liked .song-led { background: #f05d72; box-shadow: 0 0 8px rgba(240,93,114,.45); }

.single-song-list .song-number {
  color: #697178;
  font-size: 10px;
  font-weight: 800;
}

.single-song-list .song-title {
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.single-song-list .song-views {
  color: #438fd6;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.single-song-list .song-row.active .song-number,
.single-song-list .song-row.active .song-title,
.single-song-list .song-row.active .song-views { color: var(--v4-orange); }

.browser-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--v4-panel);
  border: 1px solid var(--v4-line);
  border-radius: 7px;
}

.browser-level {
  display: none;
  grid-template-rows: 52px 34px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.browser-level.active { display: grid; }

.level-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.level-back {
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  padding: 0;
  color: #aeb4b8;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.level-back:hover { color: var(--v4-orange); }

.browser-level > .country-list-heading,
.browser-level > .playlist-list-heading,
.browser-level > .song-list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  align-items: center;
  padding: 0 12px 0 72px;
  color: var(--v4-muted);
  border-bottom: 1px solid var(--v4-line-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.browser-level > .country-list-heading span:last-child,
.browser-level > .playlist-list-heading span:last-child,
.browser-level > .song-list-heading span:last-child { text-align: right; }

.browser-level > .country-list-heading { padding-left: 41px; }

.song-card-stage {
  grid-column: span 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(77,163,255,.07), transparent 38%),
    #0c1013;
  border: 1px solid var(--v4-line-soft);
  border-radius: 7px;
}

.song-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 54px 72px;
  width: min(66vh, calc(100% - 72px));
  min-width: 320px;
  aspect-ratio: auto;
  padding: 12px;
  gap: 10px;
  overflow: hidden;
  background: #12171b;
  border: 1px solid #394149;
  border-radius: 12px;
  box-shadow: 0 28px 70px rgba(0,0,0,.42);
  text-align: left;
  transform: none;
  transition: none;
}

.song-card::before { content: none; }
.song-card:hover { transform: none; border-color: #394149; }

.song-card-artwork {
  aspect-ratio: 1;
  overflow: hidden;
  background: #090c0f;
  border: 1px solid #343c43;
  border-radius: 8px;
}

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

.song-card-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 4px;
  gap: 18px;
}

.song-card-details h2 {
  overflow: hidden;
  margin: 0;
  color: var(--v4-text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-details span {
  flex: 0 0 auto;
  color: var(--v4-orange);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  white-space: nowrap;
}

#currentViews { color: var(--v4-orange); }

.song-card-scrubber {
  display: grid;
  grid-template-rows: 18px 30px;
  align-content: center;
  padding: 7px 12px;
  background: #0f1418;
  border: 1px solid var(--v4-line);
  border-radius: 7px;
}

.song-card-scrubber .time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8d959b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}

.song-card-scrubber .song-progress {
  width: 100%;
  height: 30px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.song-card-scrubber .song-progress::-webkit-slider-runnable-track {
  height: 5px;
  background: linear-gradient(90deg, var(--v4-orange) var(--progress, 0%), #3d444a var(--progress, 0%));
  border-radius: 2px;
}

.song-card-scrubber .song-progress::-webkit-slider-thumb {
  width: 12px;
  height: 20px;
  margin-top: -8px;
  appearance: none;
  background: #13171a;
  border: 2px solid var(--v4-orange);
  border-radius: 3px;
}

.player-control-panel {
  display: grid;
  grid-template-rows: auto 58px auto;
  align-self: start;
  height: auto;
  padding: 10px;
  gap: 8px;
}

.artwork-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: #090b0d;
  border: 1px solid #3c4349;
  border-radius: 5px;
}

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

.artwork-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,5,6,.8) 0%, rgba(4,5,6,.24) 52%, rgba(4,5,6,.08) 100%),
    linear-gradient(0deg, rgba(4,5,6,.78) 0%, transparent 55%);
  pointer-events: none;
}

.artwork-copy {
  position: absolute;
  left: clamp(24px, 4vw, 62px);
  right: 28px;
  bottom: clamp(22px, 4vh, 52px);
  z-index: 1;
  text-align: left;
}

.artwork-copy span {
  display: block;
  margin-bottom: 10px;
  color: var(--v4-orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
}

.artwork-copy h2 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 2.6vw, 52px);
  font-style: italic;
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-align: left;
  text-shadow: 0 3px 24px rgba(0,0,0,.55);
}

.center-scrubber {
  display: grid;
  grid-template-rows: 16px 20px;
  align-content: center;
  padding: 6px 12px;
  background: #101418;
  border: 1px solid var(--v4-line);
  border-radius: 5px;
}

.center-scrubber .time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--v4-muted);
  font-size: 9px;
  font-weight: 700;
}

.center-scrubber .time-row strong {
  color: #c8cccf;
  font-size: 9px;
  letter-spacing: .1em;
}

.center-scrubber .song-progress {
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.center-scrubber .song-progress::-webkit-slider-runnable-track {
  height: 5px;
  background: linear-gradient(90deg, var(--v4-orange) var(--progress, 0%), #3d444a var(--progress, 0%));
  border-radius: 2px;
}

.center-scrubber .song-progress::-webkit-slider-thumb {
  width: 12px;
  height: 20px;
  margin-top: -8px;
  appearance: none;
  background: #13171a;
  border: 2px solid var(--v4-orange);
  border-radius: 3px;
}

.discovery-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, 108px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #101418;
  border: 1px solid var(--v4-line);
  border-radius: 5px;
}

.control-group {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  align-content: center;
  min-width: 0;
  padding: 13px 14px;
  gap: 12px;
  border-right: 0;
  border-bottom: 1px solid var(--v4-line);
}

.control-group:last-child { border-bottom: 0; }

.control-group h2 {
  margin: 0;
  color: #dfe1e1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.control-group .setting-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 0;
}

.control-group .setting-button,
.control-group .setting-button.active {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  width: 100%;
  height: 64px;
  min-height: 0;
  max-width: none;
  aspect-ratio: auto;
  padding: 8px 4px;
  color: #b8bdc0;
  background: var(--v4-panel-raised);
  border: 1px solid #454c52;
  border-radius: 4px;
  box-shadow: none;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 700;
  text-shadow: none;
  cursor: pointer;
}

.control-group .setting-button::before,
.control-group .setting-button.active::before { content: none; }

.control-group .setting-button:hover { border-color: #777f85; }

.control-group .setting-button.active {
  color: #fff;
  background: #241f1a;
  border-color: var(--v4-orange);
  box-shadow: inset 0 0 0 1px rgba(77,163,255,.15);
}

.control-group .setting-button small {
  display: block;
  margin-top: 6px;
  color: #899096;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.control-group .setting-button.active small { color: var(--v4-orange); }

.deck-loading {
  padding: 20px;
  color: var(--v4-muted);
  font-size: 11px;
  font-weight: 800;
}

.legacy-hooks { display: none !important; }

@media (max-width: 1350px) {
  .machine-header { grid-template-columns: 210px repeat(3, minmax(0, 1fr)); }
  .machine-brand { padding: 0 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .machine-brand strong { font-size: 14px; }
  .header-setting { padding: 0 7px; }
  .header-toggle .setting-button,
  .header-toggle .setting-button.active { font-size: 10px; }
  .heard-count { right: 14px; bottom: 12px; font-size: 18px; }
  .three-column-workspace { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .player-control-panel { grid-template-rows: auto 56px auto; padding: 8px; gap: 7px; }
  .discovery-controls { grid-template-rows: repeat(3, 100px); }
  .control-group { grid-template-columns: 118px minmax(0, 1fr); padding: 12px 10px; gap: 10px; }
  .control-group .setting-options { gap: 5px; }
  .control-group .setting-button,
  .control-group .setting-button.active { height: 58px; }
}

/* Quest swipe layout */
.discovery-machine {
  grid-template-rows: 70px minmax(0, 1fr) 68px;
}

.machine-header {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.machine-brand {
  display: flex;
  align-items: center;
  width: 250px;
  flex: 0 0 250px;
  padding: 0 24px;
  border-right: 0;
}

.machine-brand strong {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: .18em;
  white-space: nowrap;
}

.header-context {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 18px 0 8px;
  gap: 10px;
  overflow: hidden;
}

.context-line {
  width: 2px;
  height: 30px;
  flex: 0 0 auto;
  margin-right: 8px;
  background: var(--v4-orange);
  box-shadow: 0 0 10px rgba(77,163,255,.5);
}

.context-tag {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  gap: 7px;
  color: #bedcff;
  background: #10243a;
  border: 1px solid #245e98;
  border-radius: 2px;
}

.context-tag[hidden] { display: none; }

.context-tag small {
  color: #609bd4;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .11em;
  white-space: nowrap;
}

.context-tag strong {
  overflow: hidden;
  max-width: 190px;
  color: #d7eaff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-browser-level="countries"] {
  grid-template-rows: 52px 34px minmax(0, 1fr) 62px;
}

.country-discovery {
  display: grid;
  align-content: center;
  padding: 9px 14px 8px;
  gap: 8px;
  background: #0d1216;
  border-top: 1px solid var(--v4-line);
}

.country-discovery > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.country-discovery span {
  color: #8b9399;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .11em;
}

.country-discovery strong {
  color: var(--v4-orange);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}

.country-discovery .country-discovery-track {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: #27313a;
}

.country-discovery-track i {
  display: block;
  width: 3.125%;
  height: 100%;
  background: var(--v4-orange);
  box-shadow: 0 0 8px rgba(77,163,255,.7);
}

.playlist-row { position: relative; }

.playlist-row.active::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(#d9edff,#d9edff) left top / 11px 2px no-repeat,
    linear-gradient(#d9edff,#d9edff) left top / 2px 11px no-repeat,
    linear-gradient(#d9edff,#d9edff) right top / 11px 2px no-repeat,
    linear-gradient(#d9edff,#d9edff) right top / 2px 11px no-repeat,
    linear-gradient(#d9edff,#d9edff) left bottom / 11px 2px no-repeat,
    linear-gradient(#d9edff,#d9edff) left bottom / 2px 11px no-repeat,
    linear-gradient(#d9edff,#d9edff) right bottom / 11px 2px no-repeat,
    linear-gradient(#d9edff,#d9edff) right bottom / 2px 11px no-repeat;
  filter: drop-shadow(0 0 4px rgba(77,163,255,.8));
}

.song-card-stage {
  position: relative;
  grid-template-columns: 80px minmax(320px, 640px) 80px;
  justify-content: center;
  align-items: center;
  padding: 16px 28px;
  overflow: hidden;
}

.song-card {
  z-index: 2;
  width: min(61vh, 100%);
  min-width: 300px;
  overflow: visible;
}

.song-card::after {
  content: "";
  position: absolute;
  inset: 14px -20px -14px 20px;
  z-index: -1;
  background: #11171c;
  border: 1px solid #343e47;
  border-radius: 12px;
  box-shadow: 0 22px 55px rgba(0,0,0,.3);
}

.song-card-artwork,
.song-card-details,
.song-card-scrubber { position: relative; z-index: 1; }

.swipe-arrow {
  display: grid;
  place-items: center;
  width: 64px;
  height: 120px;
  padding: 0;
  color: #9ba6ae;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 54px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
}

.swipe-arrow:hover { color: var(--v4-orange); }

.song-card-scrubber {
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  padding: 7px 12px 7px 8px;
  gap: 8px;
}

.card-play {
  display: grid;
  place-items: center;
  width: 30px;
  height: 36px;
  padding: 0;
  color: var(--v4-orange);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  cursor: pointer;
}

.scrubber-main {
  display: grid;
  grid-template-rows: 18px 30px;
  min-width: 0;
}

.site-footer {
  display: flex;
  align-items: stretch;
  min-width: 0;
  padding-right: 330px;
  background: #0d1115;
  border-top: 1px solid var(--v4-line);
}

.footer-stat,
.footer-toggle {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 150px;
  padding: 0 22px;
  gap: 7px;
  color: #c4c9cc;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--v4-line);
  border-radius: 0;
  text-align: left;
}

.footer-toggle {
  min-width: 188px;
  cursor: pointer;
}

.footer-toggle:hover { background: #121a21; }

.footer-stat span,
.footer-toggle span {
  color: #7f8990;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .12em;
}

.footer-stat strong,
.footer-toggle strong {
  color: #dce0e2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
}

.footer-toggle strong { color: var(--v4-orange); }

.quest-completion {
  position: fixed;
  right: 24px;
  bottom: 8px;
  z-index: 30;
  display: grid;
  justify-items: end;
  pointer-events: none;
}

.quest-completion > span {
  color: var(--v4-orange);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .24em;
}

.quest-completion strong {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
  font-size: 39px;
  font-weight: 500;
  line-height: .95;
  letter-spacing: .05em;
}

.quest-completion b {
  color: var(--v4-orange);
  font-weight: 500;
}

.quest-completion i,
.quest-completion em {
  color: #f2f5f7;
  font-style: normal;
  font-weight: 400;
}

@media (max-width: 1350px) {
  .machine-brand { width: 210px; flex-basis: 210px; padding-inline: 16px; }
  .context-tag strong { max-width: 130px; }
  .song-card-stage { grid-template-columns: 64px minmax(300px, 540px) 64px; padding-inline: 18px; }
  .swipe-arrow { width: 52px; }
  .site-footer { padding-right: 280px; }
  .footer-stat { min-width: 120px; padding-inline: 15px; }
  .footer-toggle { min-width: 155px; padding-inline: 15px; }
  .quest-completion { right: 16px; }
  .quest-completion strong { font-size: 32px; }
}

/* Country index — large field-guide treatment */
[data-browser-level="countries"] {
  grid-template-rows: 74px minmax(0, 1fr);
}

[data-browser-level="countries"] > .country-list-heading { display: none; }

[data-browser-level="countries"] > .library-header {
  padding: 0 28px;
  background: #0c1116;
}

[data-browser-level="countries"] > .library-header strong {
  color: #c9ced2;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: .14em;
}

.country-crosshair {
  color: #7a838a !important;
  font-family: Arial, sans-serif;
  font-size: 30px !important;
  font-weight: 300 !important;
  line-height: 1;
  letter-spacing: 0 !important;
}

.country-row {
  grid-template-columns: 46px minmax(0, 1fr) 86px;
  height: 58px;
  padding: 0 18px 0 20px;
  gap: 14px;
}

.country-row .country-flag,
.country-row.active .country-flag {
  width: 44px;
  font-size: 29px;
  line-height: 1;
  filter: saturate(.96) contrast(1.04);
}

/* Beat the generic playlist-span rule so flags retain their intended scale. */
.playlist-row.country-row > .country-flag,
.playlist-row.country-row.active > .country-flag {
  width: 44px;
  color: initial;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.country-row strong {
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  font-stretch: condensed;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.country-row em {
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: .06em;
}

.country-row em::after { content: none; }

.playlist-row.country-row.active strong,
.playlist-row.country-row.active em {
  color: #e4e8eb;
}

.country-row.active {
  background: linear-gradient(90deg, #10253a 0%, #102236 72%, #0d1a27 100%);
  box-shadow: inset 0 0 20px rgba(77,163,255,.07);
}

.country-row.active::before {
  inset: 1px 4px;
  background:
    linear-gradient(#dff1ff,#dff1ff) left top / 14px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) left top / 3px 14px no-repeat,
    linear-gradient(#dff1ff,#dff1ff) right top / 14px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) right top / 3px 14px no-repeat,
    linear-gradient(#dff1ff,#dff1ff) left bottom / 14px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) left bottom / 3px 14px no-repeat,
    linear-gradient(#dff1ff,#dff1ff) right bottom / 14px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) right bottom / 3px 14px no-repeat;
}

.country-discovery {
  padding: 12px 28px 11px;
  gap: 10px;
}

.country-discovery span {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: .14em;
}

.country-discovery strong {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-stretch: condensed;
  letter-spacing: .08em;
}

.country-discovery .country-discovery-track {
  height: 4px;
  overflow: visible;
  background: repeating-linear-gradient(90deg, #29343e 0 15px, transparent 15px 19px);
}

.country-discovery-track i {
  width: 15px;
  box-shadow: 0 0 8px rgba(77,163,255,.85);
}

/* One definitive song card */
.song-card-stage {
  grid-template-columns: 84px minmax(360px, 720px) 84px;
  padding: 22px 32px;
}

.song-card {
  grid-template-rows: auto auto 82px 74px;
  width: min(68vh, 100%);
  padding: 14px;
  gap: 12px;
  overflow: hidden;
  background: linear-gradient(155deg, #141b21 0%, #10151a 68%, #0d1216 100%);
  border: 1px solid #45515b;
  border-radius: 16px;
  box-shadow: 0 32px 90px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03);
}

.song-card::after { content: none; }

.song-card-artwork {
  position: relative;
  border-color: #4a5762;
  border-radius: 11px;
}

.song-card-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(5,10,14,.5) 100%);
}

.card-entry {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 9px;
  color: #e8f3ff;
  background: rgba(7,17,27,.78);
  border-left: 2px solid var(--v4-orange);
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.song-card-details {
  align-items: flex-end;
  min-height: 86px;
  padding: 2px 4px 0;
}

.card-title-block {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-kicker > span {
  color: var(--v4-orange);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.card-kicker b {
  padding-left: 10px;
  color: #8c969e;
  border-left: 1px solid #34404a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}

.song-card-details .card-title-block h2 {
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: clamp(28px, 2.4vw, 40px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.02em;
}

.card-title-block p {
  overflow: hidden;
  margin: 0;
  color: #969fa6;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #0d1318;
  border: 1px solid #303b44;
  border-radius: 8px;
}

.song-card-stats > div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 12px 14px;
  gap: 7px;
  border-right: 1px solid #2b353d;
}

.song-card-stats > div:last-child { border-right: 0; }

.song-card-stats dt {
  color: #68747d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.song-card-stats dd {
  overflow: hidden;
  margin: 0;
  color: #dfe5e9;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-stats > div:first-child dd { color: var(--v4-orange); }

@media (max-width: 1350px) {
  .song-card-stage { grid-template-columns: 58px minmax(320px, 600px) 58px; padding-inline: 16px; }
  .song-card { width: min(64vh, 100%); }
  .song-card-details .card-title-block h2 { font-size: 34px; }
  .song-card-stats > div { padding-inline: 10px; }
  .song-card-stats dd { font-size: 15px; }
}

/* Header reads as one continuous line of context */
.machine-brand {
  width: auto;
  flex: 0 0 auto;
  padding: 0 20px 0 30px;
}

.machine-brand strong,
.context-tag small,
.context-tag strong {
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .14em;
}

.header-context {
  flex: 1 1 auto;
  padding: 0 24px;
  gap: 18px;
  overflow: hidden;
}

.context-line { display: none; }

.context-tag {
  display: flex;
  align-items: center;
  min-width: 0;
  height: auto;
  padding: 0;
  gap: 9px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.context-tag small {
  flex: 0 0 auto;
  color: #6f9dcc;
  white-space: nowrap;
}

.context-tag strong {
  overflow: hidden;
  max-width: 230px;
  color: #e3e7ea;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1350px) {
  .machine-brand { width: auto; flex-basis: auto; padding-inline: 16px; }
  .header-context { padding-inline: 12px; gap: 20px; }
  .machine-brand strong,
  .context-tag small,
  .context-tag strong { font-size: 14px; }
  .context-tag strong { max-width: 145px; }
}

/* Footer reads as one continuous sentence, mirroring the header */
.site-footer {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 78px;
  padding: 0 26px;
  gap: 34px;
  background: #0d1115;
  border-top: 1px solid var(--v4-line-soft);
}

.footer-stat,
.footer-toggle {
  display: flex;
  align-items: baseline;
  min-width: 0;
  padding: 0;
  gap: 8px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
  white-space: nowrap;
}

.footer-toggle { cursor: pointer; }
.footer-toggle:hover { background: transparent; }

.footer-stat span,
.footer-toggle span,
.quest-completion > span {
  color: #6f9dcc;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
}

.footer-stat strong,
.footer-toggle strong {
  color: #f2f5f7;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: .9;
  letter-spacing: .015em;
}

.quest-completion {
  position: static;
  display: flex;
  align-items: baseline;
  justify-items: initial;
  margin-left: 0;
  gap: 10px;
}

.quest-completion strong {
  margin: 0;
  gap: 8px;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 39px;
  line-height: .9;
  letter-spacing: .015em;
}

.quest-completion b,
.quest-completion i,
.quest-completion em {
  color: #f2f5f7;
  font-weight: 500;
}

@media (max-width: 1350px) {
  .site-footer { min-height: 72px; padding-inline: 16px; gap: 20px; }
  .footer-stat,
  .footer-toggle { min-width: 0; padding: 0; gap: 8px; }
  .footer-stat span,
  .footer-toggle span,
  .quest-completion > span { font-size: 9px; }
  .footer-stat strong,
  .footer-toggle strong { font-size: 34px; }
  .quest-completion { gap: 10px; }
  .quest-completion strong { font-size: 32px; }
}

/* Unified navy browser: Countries → Playlists → Songs */
.browser-panel {
  background: #07101a;
  border-color: #1d2c3a;
  box-shadow: inset 0 0 34px rgba(17,55,88,.1);
}

.browser-level {
  background: linear-gradient(180deg, #08121d 0%, #07101a 48%, #060d15 100%);
}

[data-browser-level="playlists"],
[data-browser-level="songs"] {
  grid-template-rows: 74px minmax(0, 1fr);
}

[data-browser-level="playlists"] > .playlist-list-heading,
[data-browser-level="songs"] > .song-list-heading { display: none; }

.browser-level > .library-header,
[data-browser-level="countries"] > .library-header {
  padding: 0 26px;
  background: #07111b;
  border-bottom-color: #1c2b38;
}

.browser-level > .library-header strong,
[data-browser-level="countries"] > .library-header strong {
  color: #edf2f5;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .085em;
}

.level-back {
  color: #7faee0;
  font-size: 25px;
  font-weight: 400;
}

.browser-level > .library-header > span:not(.country-crosshair) {
  color: #dfe8ef;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.country-list,
.playlist-list,
.single-song-list {
  background: linear-gradient(180deg, rgba(9,22,35,.86), rgba(6,14,23,.96));
  scrollbar-color: #41576a #07101a;
}

.playlist-row,
.single-song-list .song-row {
  position: relative;
  height: 58px;
  color: #e5ebef;
  background: rgba(8,18,29,.42);
  border-bottom-color: #172634;
}

.playlist-row:hover,
.playlist-row.active,
.single-song-list .song-row:hover,
.single-song-list .song-row.active {
  color: #e5ebef;
  background:
    linear-gradient(90deg, rgba(18,49,78,.96), rgba(11,34,56,.94)),
    #0d2235;
  box-shadow:
    inset 0 1px 0 rgba(77,163,255,.22),
    inset 0 -1px 0 rgba(77,163,255,.18),
    inset 0 0 22px rgba(77,163,255,.08);
}

.playlist-row::before,
.playlist-row.active::before,
.single-song-list .song-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(#dff1ff,#dff1ff) left top / 7px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) left top / 2px 7px no-repeat,
    linear-gradient(#dff1ff,#dff1ff) right top / 7px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) right top / 2px 7px no-repeat,
    linear-gradient(#dff1ff,#dff1ff) left bottom / 7px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) left bottom / 2px 7px no-repeat,
    linear-gradient(#dff1ff,#dff1ff) right bottom / 7px 2px no-repeat,
    linear-gradient(#58aaff,#58aaff) right bottom / 2px 7px no-repeat;
  filter: drop-shadow(0 0 3px rgba(77,163,255,.75));
}

.playlist-row:hover::before,
.playlist-row.active::before,
.single-song-list .song-row:hover::before,
.single-song-list .song-row.active::before { opacity: 1; }

.country-row {
  grid-template-columns: 46px max-content minmax(26px, 1fr) 92px;
  padding-inline: 20px;
}

.country-row .country-flag { grid-column: 1; grid-row: 1; }
.country-row strong { grid-column: 2; grid-row: 1; max-width: 190px; }
.country-row em { grid-column: 4; grid-row: 1; }

.country-row::after {
  content: "";
  grid-column: 3;
  grid-row: 1;
  width: 100%;
  height: 3px;
  align-self: center;
  background:
    linear-gradient(90deg,
      #426f9d 0,
      #426f9d var(--country-progress, 0%),
      #1b2d3d var(--country-progress, 0%),
      #1b2d3d 100%);
  box-shadow: inset 0 0 0 1px rgba(113,153,190,.08);
}

.country-row strong,
.playlist-row strong,
.single-song-list .song-title {
  color: #e8edf1;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .075em;
}

.country-row em,
.playlist-row em,
.single-song-list .song-views {
  color: #e8edf1;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .035em;
}

.playlist-row.active > span:not(.playlist-led),
.playlist-row.active strong,
.playlist-row.active em,
.single-song-list .song-row.active .song-number,
.single-song-list .song-row.active .song-title,
.single-song-list .song-row.active .song-views {
  color: #e8edf1;
}

[data-browser-level="playlists"] .playlist-row {
  grid-template-columns: 10px minmax(0, 1fr) 72px;
  padding-inline: 20px;
  gap: 10px;
}

[data-browser-level="playlists"] .playlist-led,
.single-song-list .song-led {
  display: block;
  width: 6px;
  height: 6px;
  background: #4c7399;
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(76,115,153,.55);
}

[data-browser-level="playlists"] .playlist-row.active .playlist-led,
.single-song-list .song-row.active .song-led {
  background: #73b5f5;
  box-shadow: 0 0 9px rgba(77,163,255,.8);
}

/* Footer separators match the short top-bar dividers */
.site-footer > .footer-stat:not(:first-child),
.site-footer > .footer-toggle,
.quest-completion {
  border-left-color: transparent;
}

.site-footer > .footer-toggle::before,
.quest-completion::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 1px;
  height: 22px;
  background: #253746;
  transform: translateY(-50%);
  pointer-events: none;
}

.site-footer > .footer-toggle::before { left: -11px; }
.quest-completion::before { left: 0; }

/* Footer order: completion left, controls grouped right */
.site-footer {
  padding-right: 26px;
}

.quest-completion {
  position: static;
  width: auto;
  min-width: 0;
  padding-left: 0;
  border-left: 0;
  transform: none;
}

.quest-completion::before { display: none; }

.site-footer > .footer-toggle:first-of-type { margin-left: auto; }

@media (max-width: 1350px) {
  .site-footer { padding-right: 16px; }
}

.footer-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #5f87af;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer > .footer-toggle:hover .footer-icon,
.site-footer > .footer-toggle:focus-visible .footer-icon { color: #78aee1; }

@media (max-width: 1350px) {
  .footer-icon { width: 20px; height: 20px; flex-basis: 20px; }
}

/* Selected-country context replaces the generic Playlists heading */
.country-context-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-right: 18px !important;
  gap: 18px;
}

.country-context-header .level-heading { gap: 10px; }

.country-context-header .level-back {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  color: #6f9dcc;
  background: transparent;
  border: 1px solid #456b90;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.country-context-header .level-back:hover {
  color: #9ccaff;
  border-color: #6f9dcc;
  background: #0c1d2c;
}

.country-context-header .level-heading strong {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-country-flag {
  flex: 0 0 auto;
  color: initial !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif !important;
  font-size: 25px !important;
  font-weight: 400 !important;
  line-height: 1;
  letter-spacing: 0 !important;
}

.country-context-header .header-country-count {
  color: #e8edf1;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .035em;
  text-align: right;
  white-space: nowrap;
}

/* Row indices remain muted blue in every interaction state. */
[data-browser-level="playlists"] .playlist-row > span:nth-child(2),
[data-browser-level="playlists"] .playlist-row.active > span:nth-child(2),
[data-browser-level="playlists"] .playlist-row:hover > span:nth-child(2),
[data-browser-level="songs"] .song-row .song-number,
[data-browser-level="songs"] .song-row.active .song-number,
[data-browser-level="songs"] .song-row:hover .song-number {
  color: #4c7399;
}

.country-globe {
  width: 28px;
  height: 28px;
  color: #788997;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#headerSongTag {
  flex: 1 1 auto;
  min-width: 0;
}

#headerSong {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.machine-brand,
.context-tag {
  cursor: pointer;
}

button.machine-brand {
  color: inherit;
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
}

.machine-brand:hover,
.machine-brand:focus-visible,
.context-tag:hover,
.context-tag:focus-visible {
  background: #0d1a25;
  outline: 0;
}

.machine-brand:focus-visible,
.context-tag:focus-visible {
  box-shadow: inset 0 -2px 0 #4c7399;
}

/* Unified deep-navy surface system */
:root {
  --v4-bg: #050c13;
  --v4-panel: #08131e;
  --v4-panel-raised: #0c1b28;
  --v4-line: #21384a;
  --v4-line-soft: #172b3a;
  --v4-active: #102b43;
}

html,
body,
.discovery-machine {
  background: #050c13;
}

.machine-header {
  background: linear-gradient(90deg, #040a10 0%, #050d15 58%, #040a10 100%);
  border-bottom-color: #21384a;
}

.machine-brand:hover,
.machine-brand:focus-visible,
.context-tag:hover,
.context-tag:focus-visible {
  background: #0b2031;
}

.three-column-workspace {
  background: #050c13;
}

.song-card-stage {
  background:
    radial-gradient(circle at 50% 43%, rgba(54,112,165,.08), transparent 44%),
    linear-gradient(180deg, #08121d 0%, #07101a 48%, #060d15 100%);
  border-color: #1d2c3a;
}

.song-card {
  background: linear-gradient(155deg, #0d1d2a 0%, #091722 62%, #07121c 100%);
  border-color: #2c485d;
  box-shadow: 0 32px 90px rgba(0,6,12,.58), inset 0 1px 0 rgba(129,184,232,.035);
}

.song-card:hover { border-color: #2c485d; }

.song-card-artwork {
  background: #050b11;
  border-color: #29465a;
}

.card-entry {
  background: rgba(6,19,30,.86);
}

.song-card-stats {
  background: #08141e;
  border-color: #233d50;
}

.song-card-stats > div {
  border-right-color: #1c3445;
}

.song-card-scrubber {
  background: #07131d;
  border-color: #223c4e;
}

.site-footer {
  background: linear-gradient(90deg, #040a10 0%, #050d15 54%, #040a10 100%);
  border-top-color: #21384a;
}

.footer-toggle:hover,
.footer-toggle:focus-visible {
  background: #0c2437;
}

[data-browser-level="playlists"] .playlist-row > span:nth-child(2),
.single-song-list .song-number {
  color: #4c7399;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .07em;
}

.single-song-list .song-row {
  grid-template-columns: 10px 42px minmax(0, 1fr) 72px;
  padding-inline: 20px;
  gap: 10px;
}

.single-song-list .song-led {
  width: 6px;
  height: 6px;
  background: #35516a;
}

.country-discovery {
  background: #06101a;
  border-top-color: #1d2c3a;
}

.country-discovery strong { color: #4c7399; }

/* Thin typography and clarified bar hierarchy */
.machine-brand strong,
.context-tag strong,
.context-tag small,
.footer-stat span,
.footer-toggle span,
.footer-stat strong,
.footer-toggle strong,
.quest-completion > span,
.quest-completion strong {
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-weight: 400;
}

.machine-brand strong,
.context-tag strong {
  font-size: 17px;
  letter-spacing: .095em;
}

.context-tag small {
  color: #5f87af;
  font-size: 11px;
  letter-spacing: .11em;
}

.header-context { gap: 0; }

.context-tag {
  padding: 0 24px;
  gap: 9px;
  border-left: 1px solid #253746;
}

.context-tag:first-child { border-left-color: #314b62; }

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  width: 100vw;
  max-width: 100vw;
  padding-right: 300px;
  gap: 20px;
  overflow: hidden;
}

.footer-stat,
.footer-toggle,
.quest-completion {
  align-items: center;
}

.quest-completion {
  position: absolute;
  top: 50%;
  right: 26px;
  justify-content: flex-end;
  width: 260px;
  min-width: 260px;
  margin-left: 0;
  transform: translateY(-50%);
}

.footer-stat span,
.footer-toggle span,
.quest-completion > span {
  color: #5f87af;
  font-weight: 400;
}

.footer-stat strong,
.footer-toggle strong,
.quest-completion strong,
.quest-completion b,
.quest-completion i,
.quest-completion em {
  font-weight: 400;
}

@media (max-width: 1350px) {
  .machine-brand strong,
  .context-tag strong { font-size: 14px; }
  .context-tag small { font-size: 9px; }
  .context-tag { padding-inline: 14px; gap: 7px; }
  .site-footer { padding-right: 250px; gap: 14px; }
  .quest-completion { right: 16px; width: 220px; min-width: 220px; }
}

/* Footer group separators and visible toggle affordance */
.site-footer > .footer-stat,
.site-footer > .footer-toggle {
  position: relative;
  height: 58px;
  padding: 0 22px;
}

.site-footer > .footer-stat:not(:first-child),
.site-footer > .footer-toggle {
  border-left: 1px solid #263a4b;
}

.site-footer > .footer-toggle {
  border-top: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-radius: 3px;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.site-footer > .footer-toggle,
.quest-completion { gap: 14px; }

.site-footer > .footer-toggle:hover,
.site-footer > .footer-toggle:focus-visible {
  background: #0d2031;
  border-color: #3e78af;
  box-shadow: 0 0 0 1px rgba(77,163,255,.12), inset 0 0 18px rgba(77,163,255,.07);
  outline: 0;
}

.site-footer > .footer-toggle:hover span,
.site-footer > .footer-toggle:focus-visible span { color: #78aee1; }

.quest-completion {
  padding-left: 20px;
  border-left: 1px solid #263a4b;
}

@media (max-width: 1350px) {
  .site-footer > .footer-stat,
  .site-footer > .footer-toggle { height: 54px; padding-inline: 16px; }
  .quest-completion { padding-left: 12px; }
}

/* Right panel card stays fully visible; artwork is supporting content */
.song-card-stage {
  align-items: center;
  overflow: hidden;
}

.song-card {
  grid-template-rows: auto minmax(104px, auto) 92px 78px;
  width: min(78vh, 760px, calc(100% - 16px));
  max-height: calc(100% - 24px);
  height: auto;
  padding: 14px;
  gap: 13px;
  overflow: hidden;
}

.song-card-artwork {
  width: 100%;
  height: clamp(220px, 34vh, 400px);
  max-height: none;
  aspect-ratio: auto;
}

.song-card-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.card-entry {
  top: 14px;
  bottom: auto;
}

.song-card-details {
  align-items: center;
  min-height: 104px;
  padding: 8px 8px 4px;
}

.card-title-block { gap: 7px; }

.card-kicker > span { font-size: 10px; }
.card-kicker b { font-size: 9px; }

.song-card-details .card-title-block h2 {
  font-size: clamp(38px, 3vw, 48px);
  font-weight: 600;
  line-height: .96;
}

.card-title-block p {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .075em;
}

.song-card-stats { min-height: 92px; }

.song-card-stats dt {
  font-size: 10px;
  font-weight: 500;
}

.song-card-stats dd {
  font-size: 19px;
  font-weight: 500;
}

.song-card-scrubber { min-height: 78px; }

@media (max-width: 1350px) {
  .song-card {
    grid-template-rows: auto minmax(90px, auto) 82px 70px;
    width: min(74vh, 640px, calc(100% - 8px));
    max-height: calc(100% - 16px);
    gap: 10px;
  }
  .song-card-artwork { height: clamp(190px, 30vh, 300px); max-height: none; }
  .song-card-details { min-height: 90px; padding-top: 5px; }
  .song-card-details .card-title-block h2 { font-size: 42px; }
  .card-title-block p { font-size: 13px; }
  .song-card-stats { min-height: 82px; }
  .song-card-stats dd { font-size: 16px; }
  .song-card-scrubber { min-height: 70px; }
}

/* Final footer placement — completion left, controls right */
.site-footer { padding-right: 26px; }

.site-footer > .quest-completion {
  position: static;
  top: auto;
  right: auto;
  width: auto;
  min-width: 0;
  padding-left: 0;
  border-left: 0;
  transform: none;
}

.site-footer > .quest-completion::before { display: none; }
.site-footer > .footer-toggle:first-of-type { margin-left: auto; }

@media (max-width: 1350px) {
  .site-footer { padding-right: 16px; }
}

/* Final top-nav interaction: mouse hover is intentionally visually static. */
.machine-brand:hover,
.context-tag:hover {
  background: transparent;
  box-shadow: none;
}

/* Final footer label scale: every blue label shares one size. */
.footer-stat span,
.footer-toggle span,
.quest-completion > span {
  font-size: 15px;
}

@media (max-width: 1350px) {
  .footer-stat span,
  .footer-toggle span,
  .quest-completion > span { font-size: 13px; }
}

/* Header context mirrors the footer controls; the brand remains compact. */
.header-context {
  flex: 1 1 auto;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.context-tag {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 58px;
  padding: 0 22px;
  gap: 14px;
  background: transparent;
  border: 0;
  border-left: 1px solid #263a4b;
  border-radius: 0;
  box-shadow: none;
  white-space: nowrap;
}

.context-tag:first-child { border-left-color: #263a4b; }
.context-tag:last-child { flex: 1 1 auto; }

.context-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #5f87af;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.context-tag small {
  flex: 0 0 auto;
  color: #5f87af;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .12em;
}

.context-tag strong {
  overflow: visible;
  max-width: none;
  color: #f2f5f7;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: .9;
  letter-spacing: .015em;
  text-overflow: clip;
  white-space: nowrap;
}

.machine-brand:hover,
.context-tag:hover {
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1350px) {
  .context-tag { height: 54px; padding-inline: 16px; gap: 10px; }
  .context-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .context-tag small { font-size: 13px; }
  .context-tag strong { font-size: 34px; }
}

/* Left browser remains scrollable without displaying a scrollbar. */
.country-list,
.playlist-list,
.single-song-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.country-list::-webkit-scrollbar,
.playlist-list::-webkit-scrollbar,
.single-song-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Top navigation stays clickable without a visual mouse-hover state. */
.machine-brand,
.context-tag {
  transition: none;
}

.machine-brand:hover,
.context-tag:hover {
  color: inherit;
  background: transparent;
  box-shadow: none;
  filter: none;
  opacity: 1;
  transform: none;
}

.context-tag:hover .context-icon,
.context-tag:hover small { color: #5f87af; }
.context-tag:hover strong { color: #f2f5f7; }

.header-selected-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 2px;
  font-family: system-ui, sans-serif;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
}

@media (max-width: 1350px) {
  .header-selected-flag { font-size: 21px; }
}

/* Live card position sits immediately after the next-card arrow. */
.song-card-stage {
  grid-template-columns: minmax(0, 1fr);
  padding-inline: 20px;
}

.card-carousel {
  display: grid;
  grid-template-columns: 64px minmax(360px, 1fr) 140px;
  align-items: center;
  justify-content: center;
  width: min(calc(100% - 60px), 904px);
  min-width: 0;
  transform: translateX(-86px);
}

.next-card-control {
  display: flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 8px;
}

.card-position {
  display: flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 5px;
  color: #f2f5f7;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .035em;
  white-space: nowrap;
}

.card-position b { color: #5f87af; font-weight: 400; }
.card-position i,
.card-position em { color: #f2f5f7; font-style: normal; font-weight: 400; }

@media (max-width: 1350px) {
  .song-card-stage { grid-template-columns: minmax(0, 1fr); padding-inline: 14px; }
  .card-carousel { grid-template-columns: 52px minmax(320px, 1fr) 112px; width: min(calc(100% - 48px), 716px); transform: translateX(-68px); }
  .next-card-control { gap: 5px; }
  .card-position { font-size: 17px; gap: 4px; }
}

/* Both bars use only short centered separators. */
.site-footer > .footer-toggle {
  border-left-color: transparent;
}

.context-tag,
.context-tag:first-child {
  position: relative;
  border-left: 0;
}

.context-tag::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 22px;
  background: #253746;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Simplified, taller song card: artwork, identity, views, scrubber. */
.card-carousel { height: 100%; }

.song-card {
  grid-template-rows: minmax(300px, 1fr) minmax(150px, auto) 78px;
  align-self: center;
  height: min(82vh, 760px, calc(100% - 24px));
  max-height: calc(100% - 24px);
}

.song-card-artwork {
  height: 100%;
  min-height: 0;
}

.song-card-details {
  align-items: center;
  min-height: 150px;
  padding: 18px 8px 14px;
}

.card-title-block { gap: 10px; }

.song-card-details .card-title-block h2 {
  font-size: clamp(42px, 3.25vw, 54px);
  font-weight: 500;
}

#currentArtist {
  color: #a2abb2;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: .025em;
  text-transform: none;
}

.card-views-line {
  color: #77838c;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .045em;
}

.card-views-line #currentViews {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

@media (max-width: 1350px) {
  .song-card {
    grid-template-rows: minmax(250px, 1fr) minmax(132px, auto) 70px;
    height: min(82vh, 720px, calc(100% - 16px));
    max-height: calc(100% - 16px);
  }
  .song-card-artwork { height: 100%; }
  .song-card-details { min-height: 132px; padding-block: 14px 10px; }
  .song-card-details .card-title-block h2 { font-size: 44px; }
  #currentArtist { font-size: 16px; }
  .card-views-line { font-size: 14px; }
}

/* Full-bleed video panel: the thumbnail is the surface, not a card inside it. */
.song-card-stage {
  position: relative;
  display: block;
  padding: 0;
  background: #050b12;
  border-color: #1d3345;
  isolation: isolate;
}

.card-carousel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
}

.song-card {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  max-height: none;
  padding: 0;
  overflow: hidden;
  background: #050b12;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

.song-card-artwork {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #050b12;
  border: 0;
  border-radius: 0;
}

.song-card-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.04) brightness(.88);
}

.song-card-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2,8,14,.34) 0%, transparent 42%),
    linear-gradient(180deg, transparent 38%, rgba(3,9,15,.22) 58%, rgba(3,9,15,.96) 100%);
}

.song-card-details {
  position: absolute;
  left: clamp(34px, 4vw, 70px);
  right: clamp(34px, 4vw, 70px);
  bottom: 116px;
  z-index: 2;
  display: block;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.card-title-block {
  display: grid;
  gap: 5px;
}

.song-card-details .card-title-block h2 {
  overflow: visible;
  color: #fff;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: clamp(58px, 5.4vw, 96px);
  font-weight: 500;
  line-height: .88;
  letter-spacing: -.035em;
  text-wrap: balance;
  text-overflow: clip;
  white-space: normal;
  text-shadow: 0 3px 28px rgba(0,0,0,.72);
}

#currentArtist {
  color: rgba(255,255,255,.84);
  font-size: clamp(18px, 1.55vw, 26px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: .015em;
  text-transform: none;
  text-shadow: 0 2px 14px rgba(0,0,0,.8);
}

.card-views-line,
.card-views-line #currentViews {
  color: rgba(255,255,255,.62);
  font-size: clamp(14px, 1vw, 18px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: none;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}

.song-card-scrubber {
  position: absolute;
  right: clamp(34px, 4vw, 70px);
  bottom: 38px;
  left: clamp(34px, 4vw, 70px);
  z-index: 3;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 52px;
  align-items: center;
  min-height: 0;
  padding: 0;
  gap: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.card-play {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0 0 1px 2px;
  color: #05090d;
  background: #fff;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
  font-size: 20px;
  font-weight: 800;
}

.card-play:hover,
.card-play:focus-visible {
  color: #05090d;
  background: #fff;
  outline: 2px solid #5f87af;
  outline-offset: 3px;
}

.scrubber-main {
  display: grid;
  grid-template-rows: 18px 30px;
  min-width: 0;
}

.song-card-scrubber .time-row {
  color: rgba(255,255,255,.72);
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}

.song-card-scrubber .song-progress::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #fff var(--progress, 0%), rgba(255,255,255,.35) var(--progress, 0%));
}

.song-card-scrubber .song-progress::-webkit-slider-thumb {
  background: #05090d;
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.swipe-arrow,
.next-card-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
}

.swipe-arrow-left { left: 12px; }

.next-card-control {
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.next-card-control .swipe-arrow {
  position: static;
  transform: none;
}

.swipe-arrow {
  width: 54px;
  height: 92px;
  color: rgba(255,255,255,.82);
  text-shadow: 0 2px 14px rgba(0,0,0,.9);
}

.swipe-arrow:hover { color: #fff; }

.card-position {
  color: rgba(255,255,255,.82);
  font-size: 18px;
  text-shadow: 0 2px 14px rgba(0,0,0,.9);
}

.card-position b { color: #8ebae2; }

@media (max-width: 1350px) {
  .song-card-stage { padding: 0; }
  .card-carousel { width: 100%; height: 100%; transform: none; }
  .song-card { inset: 0; width: 100%; height: 100%; max-height: none; }
  .song-card-artwork { height: 100%; }
  .song-card-details { bottom: 102px; }
  .song-card-details .card-title-block h2 { font-size: clamp(48px, 5vw, 72px); }
  #currentArtist { font-size: 18px; }
  .song-card-scrubber { bottom: 28px; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: 46px; }
  .card-play { width: 46px; height: 46px; }
  .swipe-arrow-left { left: 5px; }
  .next-card-control { right: 8px; }
  .card-position { font-size: 16px; }
}

/* Live YouTube video, contained without cropping inside the right panel. */
.song-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto 68px;
  align-content: stretch;
  padding: clamp(18px, 2vw, 34px);
  gap: 14px;
  background: #07111a;
}

.song-card-artwork {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid #2a4559;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
}

.song-card-artwork::after { content: none; }

.song-card-artwork img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.song-card-artwork .audio-host,
.song-card-artwork iframe.audio-host,
#youtubePlayer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #000;
}

.song-card-artwork.video-error .audio-host,
.song-card-artwork.video-unavailable .audio-host {
  visibility: hidden;
}

.song-card-details {
  position: static;
  z-index: 2;
  display: block;
  min-height: 0;
  padding: 2px 4px 0;
  pointer-events: none;
}

.card-title-block { gap: 4px; }

.song-card-details .card-title-block h2 {
  color: #fff;
  font-size: clamp(48px, 4.4vw, 76px);
  line-height: .9;
  text-shadow: none;
}

#currentArtist {
  color: #b7c1c9;
  font-size: clamp(17px, 1.3vw, 22px);
  text-shadow: none;
}

.card-views-line,
.card-views-line #currentViews {
  color: #71808c;
  font-size: 15px;
  text-shadow: none;
}

.song-card-scrubber {
  position: static;
  z-index: 2;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  grid-template-rows: 50px;
  align-self: end;
  min-height: 0;
  padding: 0 4px;
  gap: 16px;
  background: transparent;
  border: 0;
}

.card-play {
  width: 50px;
  height: 50px;
}

.swipe-arrow-left { left: 6px; }
.next-card-control { right: 10px; }

@media (max-width: 1350px) {
  .song-card {
    grid-template-rows: minmax(0, 1fr) auto 58px;
    padding: 14px 18px;
    gap: 10px;
  }
  .song-card-artwork { height: 100%; }
  .song-card-details { position: static; padding: 0 3px; }
  .song-card-details .card-title-block h2 { font-size: clamp(40px, 4vw, 58px); }
  #currentArtist { font-size: 16px; }
  .song-card-scrubber {
    position: static;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: 44px;
    padding-inline: 3px;
    gap: 12px;
  }
  .card-play { width: 44px; height: 44px; }
}

/* Long header context remains complete and starts at the country every time it changes. */
.machine-header {
  overflow: hidden;
}

.header-context {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-color: #304d64 transparent;
  scrollbar-width: thin;
}

.header-context::-webkit-scrollbar { height: 4px; }
.header-context::-webkit-scrollbar-track { background: transparent; }
.header-context::-webkit-scrollbar-thumb {
  background: #304d64;
  border-radius: 999px;
}

.header-context:focus-visible {
  outline: 0;
  box-shadow: inset 0 -2px 0 #304d64;
}

.header-context .context-tag,
#headerSongTag {
  flex: 0 0 auto;
  min-width: max-content;
}

.header-context .context-tag strong {
  overflow: visible;
  max-width: none;
  text-overflow: clip;
  white-space: nowrap;
}

/* Long song titles wrap cleanly while metadata and transport keep their space. */
.song-card-details {
  min-width: 0;
}

.card-title-block {
  min-width: 0;
  gap: 0;
}

.song-card-details .card-title-block h2 {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  margin: 0;
  font-size: clamp(40px, 4vw, 70px);
  line-height: .94;
  overflow-wrap: anywhere;
  text-wrap: balance;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#currentArtist {
  margin-top: clamp(10px, 1vw, 16px);
}

.card-views-line {
  margin-top: 4px;
}

@media (max-width: 1350px) {
  .song-card-details .card-title-block h2 {
    font-size: clamp(34px, 3.7vw, 56px);
  }

  #currentArtist { margin-top: 9px; }
}

/* Top-bar white context values: exactly 8px smaller. */
.context-tag strong {
  font-size: 32px;
}

@media (max-width: 1350px) {
  .context-tag strong { font-size: 26px; }
}

/* Bottom-bar toggle values are 8px smaller; Quest Completion is unchanged. */
.site-footer > .footer-toggle strong {
  font-size: 32px;
}

@media (max-width: 1350px) {
  .site-footer > .footer-toggle strong { font-size: 26px; }
}

/* The right panel is one continuous discovery field; playback stays off-canvas. */
.song-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto 68px;
  align-content: stretch;
  gap: 18px;
  padding: clamp(32px, 4vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(76, 105, 130, .18), transparent 38%),
    radial-gradient(circle at 20% 82%, rgba(42, 82, 114, .12), transparent 34%),
    linear-gradient(145deg, #071521 0%, #081824 52%, #050e17 100%);
}

.song-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .62;
  background-image: radial-gradient(circle, rgba(148, 160, 171, .38) 1px, transparent 1.35px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .86) 46%, transparent 100%);
  mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .86) 46%, transparent 100%);
}

.song-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 12, 20, .1), transparent 58%),
    linear-gradient(180deg, transparent 44%, rgba(3, 10, 17, .7) 100%);
}

.song-card-details {
  position: relative;
  inset: auto;
  z-index: 2;
  align-self: end;
  padding: 0 4px;
}

.song-card-scrubber {
  position: relative;
  inset: auto;
  z-index: 2;
  align-self: end;
  padding: 0 4px;
}

.hidden-media-host {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 320px;
  height: 180px;
  overflow: hidden;
  pointer-events: none;
}

.hidden-media-host img { display: none; }

.hidden-media-host #youtubePlayer,
.hidden-media-host iframe {
  position: static;
  inset: auto;
  display: block;
  width: 320px;
  height: 180px;
  min-width: 0;
  min-height: 0;
  border: 0;
}

@media (max-width: 1350px) {
  .song-card {
    grid-template-rows: minmax(0, 1fr) auto 58px;
    gap: 14px;
    padding: clamp(24px, 3vw, 46px);
  }
}

/* Alternate right-panel view: a dense, live playlist-completion field. */
.playlist-grid-view {
  position: absolute;
  inset: clamp(24px, 3vw, 54px);
  z-index: 2;
  display: none;
  min-width: 0;
  min-height: 0;
  padding-right: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #8b6b2d rgba(74, 82, 89, .14);
  scrollbar-width: thin;
}

.playlist-grid-view::-webkit-scrollbar { width: 7px; }
.playlist-grid-view::-webkit-scrollbar-track { background: rgba(74, 82, 89, .14); }
.playlist-grid-view::-webkit-scrollbar-thumb {
  background: #8b6b2d;
  border-radius: 999px;
}

.song-card.grid-mode {
  display: block;
  padding: 0;
}

.song-card.grid-mode .playlist-grid-view { display: block; }

.song-card.grid-mode .song-card-details,
.song-card.grid-mode .song-card-scrubber { display: none; }

.playlist-completion-grid {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: clamp(3px, .22vw, 5px);
}

.playlist-grid-cell {
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  background: rgba(115, 111, 102, .035);
  border: 1px solid rgba(151, 144, 128, .46);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.playlist-grid-cell.complete {
  background: linear-gradient(145deg, #d4aa4d 0%, #a97620 100%);
  border-color: #efcf7d;
  box-shadow: inset 0 0 9px rgba(255, 232, 160, .26), 0 0 8px rgba(202, 148, 45, .3);
}

.playlist-grid-cell.current {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #fffef8 0%, #f4ead2 100%);
  border-color: #fff;
  box-shadow:
    0 0 0 1px #f8d982,
    0 0 16px rgba(255, 251, 226, .98),
    0 0 34px rgba(226, 170, 58, .76);
}

@media (max-width: 1350px) {
  .playlist-grid-view { inset: 22px; }
}

/* The active song in the header doubles as a copy control. */
#headerSongTag {
  box-sizing: border-box;
  height: 58px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

#headerSongTag:hover,
#headerSongTag:focus-visible,
#headerSongTag.copied {
  background: #0d2031;
  border-color: #3e78af;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, .12), inset 0 0 18px rgba(77, 163, 255, .07);
  outline: 0;
}

#headerSongTag:hover .context-icon,
#headerSongTag:focus-visible .context-icon,
#headerSongTag.copied .context-icon,
#headerSongTag:hover small,
#headerSongTag:focus-visible small,
#headerSongTag.copied small { color: #78aee1; }

#headerSongTag.copied strong { color: #f2f5f7; }

@media (max-width: 1350px) {
  #headerSongTag {
    height: 54px;
    padding-inline: 16px;
  }
}

/* The completion field is the whole right panel: 200 cells per viewport. */
.song-card-stage {
  padding: 0;
  overflow: hidden;
}

.card-carousel {
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
}

.swipe-arrow,
.next-card-control {
  display: none !important;
}

.song-card.grid-mode {
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: inherit;
}

.playlist-grid-view {
  inset: 0;
  padding: 0;
  scrollbar-width: none;
}

@media (max-width: 1350px) {
  .playlist-grid-view { inset: 0; }
}

.playlist-grid-view::-webkit-scrollbar { display: none; }

.playlist-completion-grid {
  min-height: 100%;
  gap: clamp(2px, .18vw, 4px);
}

.playlist-grid-cell {
  aspect-ratio: auto;
  background: rgba(0, 4, 8, .38);
  border-color: rgba(150, 166, 178, .4);
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, .28),
    0 0 4px rgba(101, 122, 137, .08);
}

.playlist-grid-cell.complete {
  background: linear-gradient(145deg, #f2c760 0%, #c38a24 52%, #8f5f13 100%);
  border-color: #ffe49a;
  box-shadow:
    inset 0 0 12px rgba(255, 242, 187, .55),
    0 0 8px rgba(255, 201, 77, .72),
    0 0 18px rgba(213, 143, 25, .44);
}

.playlist-grid-cell.current {
  background: linear-gradient(145deg, #ffffff 0%, #fff9e6 100%);
  border-color: #fff;
  box-shadow:
    0 0 0 1px #ffe493,
    0 0 18px rgba(255, 255, 248, 1),
    0 0 38px rgba(243, 190, 65, .98),
    0 0 62px rgba(213, 143, 25, .72);
}

.playlist-grid-cell.liked:not(.current) {
  background: linear-gradient(145deg, #f07891 0%, #c83f63 52%, #7c1f3b 100%);
  border-color: #ffb0c1;
  box-shadow:
    inset 0 0 12px rgba(255, 218, 228, .38),
    0 0 10px rgba(244, 76, 116, .74),
    0 0 22px rgba(180, 39, 75, .48);
}

/* The top bar is one song line: transport icons followed by the title. */
.header-context {
  align-items: center;
  overflow-x: auto;
}

.header-song-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 58px;
  padding: 0 12px 0 22px;
  gap: 12px;
  border-left: 1px solid #263a4b;
}

.header-icon-control svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon-control {
  display: grid;
  width: 30px;
  height: 44px;
  place-items: center;
  padding: 0;
  color: #91a9bb;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.header-icon-control:hover,
.header-icon-control:focus-visible {
  color: #fff;
  background: transparent;
  outline: 0;
}

.header-like-control.liked {
  color: #e75a79;
}

.header-like-control.liked svg { fill: currentColor; }

#headerSongTag.header-song-title {
  flex: 0 0 auto;
  height: 58px;
  margin-left: 6px;
  padding: 0 22px;
  border: 1px solid transparent;
}

#headerSongTag.header-song-title:hover,
#headerSongTag.header-song-title:focus-visible,
#headerSongTag.header-song-title.copied {
  border-color: #3e78af;
}

@media (max-width: 1350px) {
  .header-song-controls { height: 54px; padding-left: 16px; gap: 9px; }
  .header-icon-control svg { width: 20px; height: 20px; }
  .header-icon-control { width: 26px; height: 40px; font-size: 18px; }
  #headerSongTag.header-song-title { height: 54px; padding-left: 16px; }
}

/* Song view keeps playback in the top bar and anchors metadata bottom-left. */
.song-card:not(.grid-mode) {
  display: block;
  padding: 0;
}

.song-card:not(.grid-mode) .song-card-scrubber {
  display: none;
}

.song-card:not(.grid-mode) .song-card-details {
  position: absolute;
  right: auto;
  bottom: clamp(34px, 4vw, 70px);
  left: clamp(34px, 4vw, 70px);
  z-index: 2;
  width: min(760px, calc(100% - clamp(68px, 8vw, 140px)));
  margin: 0;
  padding: 0;
  text-align: left;
}

@media (max-width: 1350px) {
  .song-card:not(.grid-mode) .song-card-details {
    bottom: 30px;
    left: 32px;
    width: calc(100% - 64px);
  }
}

/* Three-song carousel: previous, current, and next stay visible together. */
.three-column-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.song-card-stage {
  grid-column: 1;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.song-card:not(.grid-mode) {
  display: block;
  padding: clamp(18px, 2vw, 34px);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.song-card:not(.grid-mode)::before,
.song-card:not(.grid-mode)::after {
  content: none;
}

.card-carousel {
  background: transparent;
}

.song-card-stage:not(.has-playlist-selection) .card-carousel {
  display: none;
}

.song-card-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center;
  gap: clamp(12px, 1.4vw, 24px);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.song-card-strip.middle .previous-card { grid-column: 1; grid-row: 1; }
.song-card-strip.middle .current-card { grid-column: 2; grid-row: 1; }
.song-card-strip.middle .next-card { grid-column: 3; grid-row: 1; }

.song-card-strip.edge-start {
  grid-template-columns: minmax(0, 1.12fr) repeat(2, minmax(0, .88fr));
}

.song-card-strip.edge-start .current-card { grid-column: 1; grid-row: 1; }
.song-card-strip.edge-start .previous-card { grid-column: 2; grid-row: 1; }
.song-card-strip.edge-start .next-card { grid-column: 3; grid-row: 1; }

.song-card-strip.edge-end {
  grid-template-columns: repeat(2, minmax(0, .88fr)) minmax(0, 1.12fr);
}

.song-card-strip.edge-end .previous-card { grid-column: 1; grid-row: 1; }
.song-card-strip.edge-end .next-card { grid-column: 2; grid-row: 1; }
.song-card-strip.edge-end .current-card { grid-column: 3; grid-row: 1; }

.song-preview-card {
  min-width: 0;
  overflow: hidden;
  color: #eef3f6;
  background: linear-gradient(155deg, #0d1d2a 0%, #091722 62%, #07121c 100%);
  border: 1px solid #2c485d;
  border-radius: 12px;
  box-shadow: 0 24px 58px rgba(0, 5, 10, .48), inset 0 1px 0 rgba(150, 198, 237, .055);
}

.side-card {
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr) auto;
  align-self: center;
  width: 100%;
  height: 78%;
  padding: 0;
  text-align: left;
  opacity: .8;
  cursor: pointer;
  transition: opacity 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.side-card:hover,
.side-card:focus-visible {
  opacity: 1;
  border-color: #5d8eb4;
  outline: 0;
  transform: translateY(-3px);
}

.preview-card-kicker {
  display: none;
  align-items: center;
  min-width: 0;
  padding: 0 16px;
  color: #6e91ae;
  font: 700 10px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .16em;
}

.side-card-position {
  align-self: center;
  margin-left: 16px;
  font-size: 15px;
}

.preview-artwork {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #03080d;
  border-block: 1px solid #203b4f;
}

.preview-artwork img,
.song-card:not(.grid-mode) .current-card .song-card-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-card-copy {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 144px;
  padding: 18px 16px 16px;
}

.preview-card-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #f1f4f6;
  font: 500 clamp(20px, 1.65vw, 30px)/1.03 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-card-copy > small {
  overflow: hidden;
  margin-top: 8px;
  color: #8699a8;
  font: 500 12px/1.2 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-save-state,
.current-card-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 86px;
  height: 32px;
  margin-top: 15px;
  padding: 0 14px;
  color: #758594;
  background: #07111a;
  border: 1px solid #273b4b;
  border-radius: 999px;
  font: 800 10px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .11em;
}

.card-save-state.saved {
  color: #76e6a6;
  background: rgba(20, 73, 45, .52);
  border-color: #34885a;
  box-shadow: 0 0 14px rgba(72, 216, 137, .13);
}

.current-card {
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr) auto;
  align-self: center;
  width: 100%;
  height: 94%;
  min-height: 0;
  border-color: #5a84a4;
  box-shadow: 0 32px 78px rgba(0, 4, 9, .66), 0 0 0 1px rgba(87, 139, 178, .1), inset 0 1px 0 rgba(184, 220, 247, .09);
}

.current-card-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding-right: 16px;
}

.current-card-topline .preview-card-kicker {
  height: 46px;
}

.current-card-topline .card-position {
  margin-left: 16px;
  font-size: 15px;
}

.song-card:not(.grid-mode) .current-card .song-card-artwork {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  background: #03080d;
  border: 0;
  border-block: 1px solid #34566f;
  border-radius: 0;
}

.song-card:not(.grid-mode) .current-card .song-card-details {
  position: static;
  inset: auto;
  z-index: auto;
  align-self: auto;
  width: 100%;
  min-height: 176px;
  margin: 0;
  padding: 20px 20px 18px;
  text-align: left;
}

.song-card:not(.grid-mode) .current-card .card-title-block h2 {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  color: #fff;
  font-size: clamp(25px, 2.15vw, 38px);
  line-height: 1;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.song-card:not(.grid-mode) .current-card .card-title-block {
  display: grid;
  min-width: 0;
}

.song-card:not(.grid-mode) .current-card #currentArtist {
  overflow: hidden;
  margin-top: 9px;
  color: #aebcc7;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card:not(.grid-mode) .current-card .card-views-line {
  margin-top: 3px;
  color: #738796;
  font-size: 10px;
}

.current-card-save {
  margin-top: 13px;
  margin-left: auto;
  justify-self: end;
  color: #e8f3fa;
  background: #112b40;
  border-color: #477b9f;
  cursor: pointer;
}

.current-card-save:hover,
.current-card-save:focus-visible {
  color: #fff;
  background: #194261;
  border-color: #75acd1;
  outline: 0;
}

.current-card-save.saved {
  color: #83ecae;
  background: rgba(18, 75, 43, .56);
  border-color: #3b9964;
}

.song-card:not(.grid-mode) .current-card .song-card-scrubber {
  display: none;
}

@media (max-width: 1350px) {
  .song-card:not(.grid-mode) { padding: 14px; }
  .song-card-strip { gap: 10px; }
  .side-card { height: 76%; grid-template-rows: 40px minmax(0, 1fr) auto; }
  .current-card { height: 92%; grid-template-rows: 40px minmax(0, 1fr) auto; }
  .current-card-topline .preview-card-kicker { height: 40px; }
  .preview-card-kicker { padding-inline: 12px; font-size: 8px; }
  .preview-card-copy { min-height: 118px; padding: 13px 12px 12px; }
  .preview-card-copy > strong { font-size: clamp(17px, 1.6vw, 23px); }
  .song-card:not(.grid-mode) .current-card .song-card-details { min-height: 146px; padding: 15px 14px 13px; }
  .song-card:not(.grid-mode) .current-card .card-title-block h2 { font-size: clamp(21px, 2.05vw, 30px); }
  .card-save-state,
  .current-card-save { min-width: 74px; height: 28px; margin-top: 10px; padding-inline: 11px; font-size: 8px; }
}

/* Viewport-safe frame: keep the header, footer, and hover outlines fully on-screen. */
.discovery-machine {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  padding-block: 2px 4px;
  grid-template-rows: 68px minmax(0, 1fr) 68px;
  overflow: hidden;
}

.machine-header {
  min-height: 0;
  overflow: hidden;
}

.site-footer {
  width: 100%;
  max-width: 100%;
  height: 68px;
  min-height: 0;
  padding: 0 26px 4px;
  overflow: visible;
}

.site-footer > .footer-toggle,
.site-footer > .quest-completion {
  align-self: center;
  transform: translateY(5px);
}

.site-footer > .footer-toggle {
  height: 53px;
  padding-inline: 17px;
  gap: 12px;
}

.footer-play-pause {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin-right: 2px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 1px solid #38556d;
  border-radius: 50%;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(5px);
}

.footer-play-pause:hover,
.footer-play-pause:focus-visible {
  color: #fff;
  background: #10283a;
  border-color: #79b8e6;
  box-shadow: 0 0 0 1px rgba(121, 184, 230, .14), 0 0 16px rgba(67, 143, 199, .16);
  outline: 0;
}

.site-footer > .quest-completion + .footer-toggle {
  margin-left: auto;
}

/* Every playlist keeps its status light, followed by its first-song artwork. */
[data-browser-level="playlists"] .playlist-row.playlist-row-with-cover {
  grid-template-columns: 10px 40px minmax(0, 1fr) 72px;
  padding-left: 14px;
  gap: 10px;
}

[data-browser-level="playlists"] .playlist-cover,
[data-browser-level="playlists"] .playlist-row.active .playlist-cover {
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  color: inherit;
  background: #06101a;
  border: 1px solid #29465a;
  border-radius: 2px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .32);
}

[data-browser-level="playlists"] .playlist-cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

[data-browser-level="playlists"] .playlist-cover-empty {
  background: linear-gradient(145deg, #10283b, #07131e);
}

/* Current-song card now owns its navigation and save controls below the card. */
.song-card-strip.middle .current-card-stack { grid-column: 2; grid-row: 1; }
.song-card-strip.edge-start .current-card-stack { grid-column: 1; grid-row: 1; }
.song-card-strip.edge-end .current-card-stack { grid-column: 3; grid-row: 1; }

.current-card-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 58px;
  align-self: center;
  width: 100%;
  height: 94%;
  min-width: 0;
  min-height: 0;
  gap: 14px;
}

.current-card-stack > .current-card {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: stretch;
  height: 100%;
}

.current-card-actions {
  display: flex;
  grid-column: 1;
  grid-row: 2;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.current-card-action {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  color: #a9bfd0;
  background: #091725;
  border: 1px solid #35536a;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 3, 7, .35), inset 0 1px 0 rgba(166, 205, 236, .06);
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.current-card-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.current-card-action:hover,
.current-card-action:focus-visible {
  color: #fff;
  background: #0d2031;
  border-color: #5f9bcc;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, .14), inset 0 0 18px rgba(77, 163, 255, .09), 0 8px 20px rgba(0, 3, 7, .35);
  outline: 0;
  transform: translateY(-1px);
}

.current-card-action:disabled {
  color: #526472;
  background: #07111b;
  border-color: #233744;
  box-shadow: none;
  cursor: default;
  opacity: .42;
  transform: none;
}

.current-card-heart {
  width: 54px;
  height: 54px;
  color: #0b2c46;
  background: #f7fafc;
  border-color: #fff;
}

.current-card-heart svg {
  width: 25px;
  height: 25px;
}

.current-card-heart.saved,
.current-card-heart.saved:hover,
.current-card-heart.saved:focus-visible {
  color: #ec5f7d;
  background: transparent;
  border-color: rgba(236, 95, 125, .62);
  box-shadow: 0 0 18px rgba(236, 95, 125, .15);
}

.current-card-heart.saved svg {
  fill: currentColor;
}

/* Give the card breathing room, enlarge its primary title, and emphasize playback. */
.song-card:not(.grid-mode) .current-card .card-title-block h2 {
  font-size: clamp(34px, calc(2.58vw + 4px), 49.6px);
}

.song-card:not(.grid-mode) .current-card .card-thumbnail-play {
  width: 72px;
  height: 72px;
  padding-left: 4px;
  font-size: 29px;
}

@media (max-width: 1350px) {
  .current-card-stack {
    grid-template-rows: minmax(0, 1fr) 52px;
    height: 92%;
    gap: 10px;
  }

  .current-card-action { width: 42px; height: 42px; }
  .current-card-heart { width: 50px; height: 50px; }
  .song-card:not(.grid-mode) .current-card .card-title-block h2 {
    font-size: clamp(29.2px, calc(2.46vw + 4px), 40px);
  }
  .song-card:not(.grid-mode) .current-card .card-thumbnail-play {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}

.preview-artwork,
.song-card:not(.grid-mode) .current-card .song-card-artwork {
  position: relative;
}

.card-thumbnail-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0 0 0 3px;
  color: #fff;
  background: rgba(3, 10, 16, .72);
  border: 1px solid rgba(235, 247, 255, .78);
  border-radius: 50%;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .42);
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 22px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.side-card .card-thumbnail-play {
  pointer-events: none;
}

button.card-thumbnail-play {
  cursor: pointer;
}

.song-preview-card:hover .card-thumbnail-play,
button.card-thumbnail-play:hover,
button.card-thumbnail-play:focus-visible {
  background: rgba(12, 41, 61, .9);
  border-color: #fff;
  outline: 0;
}

.header-song-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 58px;
  padding: 0 8px 0 16px;
  gap: 5px;
  border-left: 1px solid #253746;
}

.header-song-actions[hidden] {
  display: none;
}

.header-song-actions .header-icon-control {
  color: #f4f7f9;
}

.header-song-actions .header-like-control {
  color: #91a9bb;
}

.header-song-actions .header-like-control.liked {
  color: #e75a79;
}

@media (max-width: 1350px) {
  .header-song-actions {
    height: 54px;
    padding-left: 11px;
    gap: 3px;
  }
}

/* Card readability: shorter artwork, larger one-line titles, and open metadata spacing. */
.preview-card-copy {
  min-height: 161px;
}

.song-card:not(.grid-mode) .current-card .song-card-details {
  min-height: 197px;
}

.side-card-position,
.current-card-topline .card-position {
  font-size: 18px;
}

.song-card-strip .card-position b,
.song-card-strip .card-position i,
.song-card-strip .card-position em {
  color: #fff;
}

.preview-card-copy > strong {
  display: block;
  overflow: hidden;
  font-size: clamp(24px, 1.98vw, 36px);
  line-height: 1.03;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: initial;
}

.song-card:not(.grid-mode) .current-card .card-title-block h2 {
  display: block;
  overflow: hidden;
  font-size: clamp(30px, 2.58vw, 45.6px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: initial;
}

.preview-card-copy > small {
  margin-top: 10px;
  font-size: 14.4px;
}

.song-card:not(.grid-mode) .current-card #currentArtist {
  margin-top: 12px;
  font-size: 15.6px;
  line-height: 1.25;
}

.song-card:not(.grid-mode) .current-card .card-views-line {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.2;
}

@media (max-width: 1350px) {
  .preview-card-copy { min-height: 134px; }
  .song-card:not(.grid-mode) .current-card .song-card-details { min-height: 163px; }
  .side-card-position,
  .current-card-topline .card-position { font-size: 17px; }
  .preview-card-copy > strong { font-size: clamp(20px, 1.92vw, 27.6px); }
  .song-card:not(.grid-mode) .current-card .card-title-block h2 { font-size: clamp(25.2px, 2.46vw, 36px); }
  .preview-card-copy > small { font-size: 13px; }
  .song-card:not(.grid-mode) .current-card #currentArtist { font-size: 14px; }
  .song-card:not(.grid-mode) .current-card .card-views-line { font-size: 11px; }
}

/* Top-bar song controls: white hardware keys, blue inverse hover, pink-red liked state. */
.header-song-actions .header-icon-control,
.header-song-actions .header-like-control {
  width: 34px;
  height: 34px;
  padding: 0;
  color: #0b2c46;
  background: #f7fafc;
  border: 1px solid #fff;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25), 0 2px 8px rgba(0, 0, 0, .22);
}

.header-song-actions .header-play-control {
  padding-left: 2px;
}

.header-song-actions .header-icon-control:hover,
.header-song-actions .header-icon-control:focus-visible {
  color: #fff;
  background: #123b5a;
  border-color: #77add4;
  box-shadow: inset 0 0 12px rgba(96, 174, 230, .12);
  outline: 0;
}

.header-song-actions .header-like-control.liked,
.header-song-actions .header-like-control.liked:hover,
.header-song-actions .header-like-control.liked:focus-visible {
  color: #ec5f7d;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Final current-card title scale: four points above the previous responsive size. */
.song-card:not(.grid-mode) .current-card .card-title-block h2 {
  font-size: clamp(34px, calc(2.58vw + 4px), 49.6px);
}

@media (max-width: 1350px) {
  .song-card:not(.grid-mode) .current-card .card-title-block h2 {
    font-size: clamp(29.2px, calc(2.46vw + 4px), 40px);
  }
}

/* Completion stays left; the three discovery settings are pinned as a group to the right edge. */
.site-footer > .quest-completion + .footer-toggle {
  margin-left: auto;
}

@media (max-width: 1350px) {
  .site-footer {
    padding-right: 16px;
    padding-bottom: 4px;
  }
}

/* Every interactive top-bar item uses the same illuminated hover field as the footer controls. */
.machine-header .machine-brand,
.machine-header .context-tag {
  border-top: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-left: 1px solid transparent;
  border-radius: 3px;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.machine-header .machine-brand:hover,
.machine-header .machine-brand:focus-visible,
.machine-header .context-tag:hover,
.machine-header .context-tag:focus-visible,
.machine-header #headerSongTag:hover,
.machine-header #headerSongTag:focus-visible {
  color: inherit;
  background: #0d2031;
  border-color: #3e78af;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, .12), inset 0 0 18px rgba(77, 163, 255, .07);
  filter: none;
  opacity: 1;
  transform: none;
  outline: 0;
}

.machine-header .context-tag:hover .context-icon,
.machine-header .context-tag:focus-visible .context-icon,
.machine-header .context-tag:hover small,
.machine-header .context-tag:focus-visible small {
  color: #78aee1;
}

.header-song-actions .header-icon-control:hover,
.header-song-actions .header-icon-control:focus-visible {
  color: #fff;
  background: #0d2031;
  border-color: #3e78af;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, .12), inset 0 0 18px rgba(77, 163, 255, .07);
}

.header-song-actions .header-like-control.liked,
.header-song-actions .header-like-control.liked:hover,
.header-song-actions .header-like-control.liked:focus-visible {
  color: #ec5f7d;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Open song stacks: artwork and metadata float without card shells. */
.song-preview-card,
.current-card,
.side-card {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.side-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 54px;
  height: 78%;
  gap: 12px;
  opacity: 1;
  cursor: default;
}

.side-card:hover,
.side-card:focus-within {
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: none;
}

.side-card-select {
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  color: #eef3f6;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.preview-artwork,
.song-card:not(.grid-mode) .current-card .song-card-artwork {
  border: 1px solid #29485e;
  border-radius: 4px;
  box-shadow: 0 18px 44px rgba(0, 4, 9, .38);
}

.side-card-select:hover .preview-artwork,
.side-card-select:focus-visible .preview-artwork {
  border-color: #6397bd;
  box-shadow: 0 18px 44px rgba(0, 4, 9, .38), 0 0 0 1px rgba(77, 163, 255, .1);
}

.side-card-select:focus-visible {
  outline: 0;
}

.preview-card-copy {
  min-height: 138px;
  padding: 17px 2px 0;
}

.preview-card-views {
  display: block;
  margin-top: 7px;
  color: #738796;
  font: 500 12px/1.2 "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.side-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-card-heart {
  width: 50px;
  height: 50px;
}

.current-card-stack > .current-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.song-card:not(.grid-mode) .current-card .song-card-details {
  min-height: 158px;
  padding: 18px 2px 0;
}

@media (max-width: 1350px) {
  .side-card {
    grid-template-rows: minmax(0, 1fr) 50px;
    height: 76%;
    gap: 9px;
  }

  .side-card-select { grid-template-rows: 40px minmax(0, 1fr) auto; }
  .preview-card-copy { min-height: 118px; padding: 13px 2px 0; }
  .side-card-heart { width: 46px; height: 46px; }
  .song-card:not(.grid-mode) .current-card .song-card-details {
    min-height: 142px;
    padding: 14px 2px 0;
  }
}

/* Saved-song signal in the left list: pink light plus a heart beside views. */
.single-song-list .song-row {
  grid-template-columns: 10px 42px minmax(0, 1fr) 20px 72px;
}

.single-song-list .song-save-heart {
  display: grid;
  place-items: center;
  color: #f06480;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 9px rgba(240, 93, 114, .38);
}

.single-song-list .song-row.saved .song-save-heart {
  opacity: 1;
}

.single-song-list .song-row.saved .song-led,
.single-song-list .song-row.saved.active .song-led,
.single-song-list .song-row.saved:hover .song-led {
  background: #f05d72;
  box-shadow: 0 0 9px rgba(240, 93, 114, .72);
}

/* Preserve the Country hover outline inside the horizontally clipped header rail. */
.header-context > #headerWorldTag {
  margin-left: 2px;
}

/* Song lists inherit the playlist identity system: light, artwork, name, heart, views. */
.single-song-list .song-row {
  grid-template-columns: 10px 40px minmax(0, 1fr) 20px 72px;
  gap: 10px;
}

.single-song-list .song-row-thumbnail {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background: #06101a;
  border: 1px solid #29465a;
  border-radius: 2px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .32);
}

.single-song-list .song-row-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

[data-browser-level="playlists"] .playlist-row-with-cover > strong,
.single-song-list .song-row > .song-title {
  margin-left: 2px;
}

/* Three-song carousel: consistent media, tight metadata, and controls owned by the artwork. */
.song-card:not(.grid-mode) {
  padding: clamp(18px, 2vw, 34px);
}

.song-card-strip {
  align-items: center;
  gap: clamp(20px, 2vw, 34px);
}

.side-card {
  display: block;
  align-self: center;
  height: auto;
  opacity: .74;
  transition: opacity 140ms ease;
}

.side-card:hover,
.side-card:focus-within {
  opacity: 1;
}

.side-card-select {
  display: grid;
  grid-template-rows: 34px auto auto;
  height: auto;
}

.side-card-position,
.current-card-topline .card-position {
  align-self: center;
  margin-left: 2px;
  font-size: 18px;
}

.current-card-stack {
  grid-template-rows: auto 58px;
  align-self: center;
  height: auto;
  gap: 14px;
}

.current-card-stack > .current-card,
.current-card {
  align-self: center;
  height: auto;
}

.current-card {
  grid-template-rows: 34px auto auto;
}

.current-card-topline {
  height: 34px;
  padding: 0;
}

.preview-artwork,
.song-card:not(.grid-mode) .current-card .song-card-artwork {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #03080d;
}

.preview-artwork img,
.song-card:not(.grid-mode) .current-card .song-card-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.song-card:not(.grid-mode) .current-card .song-card-artwork {
  border-color: #6d9fc2;
  box-shadow: 0 22px 54px rgba(0, 4, 9, .52), 0 0 0 1px rgba(101, 174, 226, .13);
}

.preview-card-copy {
  min-height: 132px;
  padding: 13px 2px 0;
}

.preview-card-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(21px, 1.75vw, 31px);
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-card-copy > small {
  margin-top: 8px;
}

.preview-card-views {
  margin-top: 5px;
}

.song-card:not(.grid-mode) .current-card .song-card-details {
  min-height: 150px;
  padding: 15px 2px 0;
}

.song-card:not(.grid-mode) .current-card .card-title-block h2 {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(30px, 2.25vw, 42px);
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.song-card:not(.grid-mode) .current-card #currentArtist {
  margin-top: 9px;
}

.song-card:not(.grid-mode) .current-card .card-views-line {
  margin-top: 5px;
}

.card-thumbnail-play {
  display: none !important;
}

.current-thumbnail-actions {
  position: absolute;
  left: 50%;
  bottom: 13px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  background: rgba(3, 12, 19, .7);
  border: 1px solid rgba(161, 204, 235, .24);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  backdrop-filter: blur(9px);
  transform: translateX(-50%);
}

.current-thumbnail-actions .current-card-action {
  width: 42px;
  height: 42px;
}

.current-thumbnail-actions .current-card-heart {
  width: 48px;
  height: 48px;
}

.preview-artwork .side-card-actions {
  position: absolute;
  right: 11px;
  bottom: 11px;
  z-index: 6;
  display: block;
}

.preview-artwork .side-card-heart {
  width: 43px;
  height: 43px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.current-card-actions {
  height: 58px;
  gap: 0;
}

.current-card-playback {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 0 0 0 3px;
  color: #0b2c46;
  background: #f7fafc;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 3, 7, .35);
  font-size: 21px;
  line-height: 1;
}

.current-card-playback:hover,
.current-card-playback:focus-visible {
  color: #fff;
  background: #0d2031;
  border-color: #5f9bcc;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, .14), inset 0 0 18px rgba(77, 163, 255, .09), 0 8px 20px rgba(0, 3, 7, .35);
  outline: 0;
}

@media (max-width: 1350px) {
  .song-card:not(.grid-mode) { padding: 14px; }
  .song-card-strip { gap: 14px; }
  .side-card { height: auto; }
  .side-card-select { grid-template-rows: 30px auto auto; }
  .current-card-stack { grid-template-rows: auto 52px; height: auto; gap: 9px; }
  .current-card { grid-template-rows: 30px auto auto; }
  .current-card-topline { height: 30px; }
  .side-card-position,
  .current-card-topline .card-position { font-size: 16px; }
  .preview-card-copy { min-height: 112px; padding-top: 10px; }
  .song-card:not(.grid-mode) .current-card .song-card-details { min-height: 128px; padding-top: 11px; }
  .current-thumbnail-actions { bottom: 9px; gap: 6px; padding: 4px; }
  .current-thumbnail-actions .current-card-action { width: 36px; height: 36px; }
  .current-thumbnail-actions .current-card-heart { width: 42px; height: 42px; }
  .preview-artwork .side-card-actions { right: 8px; bottom: 8px; }
  .preview-artwork .side-card-heart { width: 38px; height: 38px; }
  .current-card-actions { height: 52px; }
  .current-card-playback { width: 48px; height: 48px; }
}

/* Saved songs replace their status light with the heart instead of adding a second marker. */
.single-song-list .song-row {
  grid-template-columns: 16px 40px minmax(0, 1fr) 72px;
}

.single-song-list .song-save-heart {
  display: none !important;
}

.single-song-list .song-row.saved .song-led,
.single-song-list .song-row.saved.active .song-led,
.single-song-list .song-row.saved:hover .song-led {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #f05d72;
  background: transparent !important;
  border-radius: 0;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 0 9px rgba(240, 93, 114, .55);
}

/* Four-column playlist and song feed with continuous vertical scroll. */
.song-card:not(.grid-mode) .legacy-song-carousel {
  display: none !important;
}

.song-card-stage.has-playlist-selection {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #29485e transparent;
  scrollbar-width: thin;
}

.song-card-stage.has-playlist-selection .card-carousel,
.song-card-stage.has-playlist-selection .song-card:not(.grid-mode) {
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.six-song-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 100%;
  gap: 6px 20px;
}

.song-card.grid-mode .six-song-grid {
  display: none;
}

.six-song-tile {
  display: grid;
  grid-template-rows: auto 62px;
  min-width: 0;
  opacity: .76;
  transition: opacity 140ms ease, transform 140ms ease;
}

.six-song-tile:hover,
.six-song-tile:focus-within,
.six-song-tile.current {
  opacity: 1;
}

.six-song-tile.current {
  transform: translateY(-2px);
}

.six-song-position {
  position: absolute;
  top: 9px;
  left: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  background: transparent;
  font: 500 14px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
}

.six-song-position b,
.six-song-position i,
.six-song-position em {
  color: inherit;
  font-style: normal;
  font-weight: 400;
}

.six-song-media {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #03080d;
  border: 1px solid #29485e;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(0, 4, 9, .34);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.six-song-tile.current .six-song-media {
  border-color: #74add3;
  box-shadow: 0 18px 42px rgba(0, 4, 9, .48), 0 0 0 1px rgba(101, 174, 226, .18);
}

.six-song-tile:hover .six-song-media,
.six-song-tile:focus-within .six-song-media {
  border-color: #6397bd;
}

.six-song-select {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.six-song-select:focus-visible {
  outline: 2px solid #79b8e6;
  outline-offset: -3px;
}

.six-song-select img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.six-song-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transform: translate(-50%, -50%);
}

.six-song-control {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: #0b2c46;
  background: rgba(247, 250, 252, .96);
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.six-song-heart,
.six-song-play {
  width: 55px;
  height: 55px;
}

.six-song-heart svg {
  width: 27px;
  height: 27px;
}

.six-song-control:hover,
.six-song-control:focus-visible {
  color: #fff;
  background: #0d2031;
  border-color: #79b8e6;
  outline: 0;
  transform: translateY(-1px);
}

.six-song-control svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.six-song-heart.saved,
.six-song-heart.saved:hover,
.six-song-heart.saved:focus-visible {
  color: #ec5f7d;
  background: rgba(5, 12, 19, .82);
  border-color: rgba(236, 95, 125, .66);
}

.six-song-heart.saved svg {
  fill: currentColor;
}

.six-song-play {
  font: 500 26px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.six-song-play > span {
  display: block;
  transform: translate(1px, 2px);
}

.six-song-copy {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 14px 2px 0;
}

.six-song-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #f1f4f6;
  font: 500 clamp(16px, 1.12vw, 19px)/1.06 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.six-song-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: #8ca0af;
  font: 500 10px/1.15 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.six-song-copy span {
  margin-top: 2px;
  color: #6f8494;
  font: 500 9px/1.15 "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.song-card:not(.grid-mode) {
  padding: 6px 16px 8px;
}

@media (max-width: 1350px) {
  .song-card:not(.grid-mode) { padding: 6px 12px 8px; }
  .six-song-grid { gap: 6px 16px; }
  .six-song-tile { grid-template-rows: auto 56px; }
  .six-song-position { top: 7px; left: 8px; font-size: 12px; }
  .six-song-control { width: 40px; height: 40px; }
  .six-song-heart,
  .six-song-play { width: 52px; height: 52px; }
  .six-song-control svg { width: 20px; height: 20px; }
  .six-song-heart svg { width: 26px; height: 26px; }
  .six-song-copy { padding-top: 8px; }
  .six-song-copy strong { font-size: clamp(15px, 1.25vw, 19px); }
  .six-song-copy small { margin-top: 4px; font-size: 11px; }
  .six-song-copy span { font-size: 9px; }
}

/* Liked Songs collection entry and collection-page controls. */
.liked-songs-entry {
  display: flex;
  align-items: center;
  height: 52px;
  flex: 0 0 auto;
  padding: 0 16px;
  gap: 8px;
  color: #f2f5f7;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.liked-songs-entry .liked-songs-heart {
  color: #ec5f7d;
  font-size: 19px;
  line-height: 1;
}

.liked-songs-entry strong,
.liked-songs-entry em {
  color: inherit;
  font: 500 14px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .08em;
}

.liked-songs-entry em {
  min-width: 18px;
  color: #9aa9b5;
  font-style: normal;
  text-align: right;
}

.liked-songs-entry:hover,
.liked-songs-entry:focus-visible,
.liked-songs-entry.active {
  color: #fff;
  background: #0d2031;
  border-color: #3e78af;
  box-shadow: inset 0 0 18px rgba(77, 163, 255, .07);
  outline: 0;
}

.six-song-link {
  text-decoration: none;
}

.six-song-link svg {
  fill: none;
}

.liked-songs-empty {
  display: grid;
  grid-column: 1 / -1;
  place-content: center;
  min-height: 55vh;
  gap: 9px;
  color: #f2f5f7;
  text-align: center;
}

.liked-songs-empty strong {
  font: 500 30px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .04em;
}

.liked-songs-empty span,
.liked-list-empty {
  color: #8295a4;
  font: 500 12px/1.2 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .1em;
}

.liked-list-empty {
  margin: 28px 20px;
  text-align: center;
}

@media (max-width: 1350px) {
  .liked-songs-entry { height: 48px; padding-inline: 11px; gap: 6px; }
  .liked-songs-entry strong { font-size: 12px; }
}

/* Homepage catalog is always visible; the title has no toggle action. */
.home-country-picker > .home-catalog-title {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 12px;
}

.home-country-picker > .home-catalog-title > h2 { min-width: 0; }

/* Dedicated home surface. Discovery and Liked Songs reuse the full workspace. */
.machine-header { grid-row: 1; }
.home-page,
.three-column-workspace { grid-row: 2; }
.site-footer { grid-row: 3; }

.site-footer[data-awaiting-first-playback] {
  opacity: 0;
  pointer-events: none;
}

.home-page[hidden],
.three-column-workspace[hidden],
.site-footer[hidden],
.home-content-panel[hidden] {
  display: none !important;
}

.discovery-machine.home-mode {
  grid-template-rows: 68px minmax(0, 1fr) 0;
}

.discovery-machine.liked-mode {
  grid-template-rows: 68px minmax(0, 1fr) 68px;
}

.home-page {
  display: grid;
  grid-template-columns: minmax(330px, 28%) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.home-navigation {
  display: grid;
  grid-template-rows: 104px repeat(4, minmax(76px, 1fr));
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #263a4b;
  border-radius: 7px;
}

.home-navigation-heading {
  display: grid;
  align-content: center;
  padding: 0 28px;
  gap: 8px;
  border-bottom: 1px solid #263a4b;
}

.home-navigation-heading span,
.home-eyebrow {
  color: #6f9dcc;
  font: 500 12px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .14em;
}

.home-navigation-heading strong {
  color: #fff;
  font: 400 28px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .03em;
}

.home-navigation-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 0 28px;
  gap: 16px;
  color: #fff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #263a4b;
  text-align: left;
  cursor: pointer;
}

.home-navigation-item:last-child { border-bottom: 0; }
.home-navigation-item span,
.home-navigation-item em {
  color: #6f9dcc;
  font: 500 13px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-style: normal;
  letter-spacing: .08em;
}

.home-navigation-item strong {
  overflow: hidden;
  font: 400 clamp(24px, 2vw, 34px)/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-content {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #263a4b;
  border-radius: 7px;
}

.home-content-panel {
  display: grid;
  align-content: center;
  width: min(900px, calc(100% - 96px));
  min-height: 100%;
  margin: 0 auto;
  padding: 54px 0;
}

.home-content-panel h1 {
  max-width: 900px;
  margin: 24px 0 26px;
  color: #fff;
  font: 400 clamp(58px, 6.4vw, 106px)/.88 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.025em;
}

.home-intro {
  max-width: 780px;
  margin: 0;
  color: #a7b3bc;
  font: 400 clamp(18px, 1.45vw, 25px)/1.35 "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 850px;
  margin-top: 48px;
  border-top: 1px solid #263a4b;
  border-bottom: 1px solid #263a4b;
}

.home-metrics div {
  display: grid;
  min-height: 102px;
  align-content: center;
  padding: 0 20px;
  gap: 7px;
  border-right: 1px solid #263a4b;
}

.home-metrics div:first-child { padding-left: 0; }
.home-metrics div:last-child { border-right: 0; }
.home-metrics strong { color: #fff; font: 400 34px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif; }
.home-metrics span { color: #6f9dcc; font: 500 10px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif; letter-spacing: .12em; }

.home-primary-action,
.home-contact-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(390px, 100%);
  min-height: 62px;
  margin-top: 34px;
  padding: 0 20px;
  color: #fff;
  background: transparent;
  border: 1px solid #3e78af;
  border-radius: 4px;
  font: 500 14px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .1em;
  text-decoration: none;
  cursor: pointer;
}

.home-contact-notes {
  display: flex;
  flex-wrap: wrap;
  max-width: 760px;
  margin-top: 42px;
  gap: 10px;
}

.home-contact-notes span {
  padding: 10px 13px;
  color: #8ea0ad;
  border: 1px solid #263a4b;
  border-radius: 999px;
  font: 500 10px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .1em;
}

@media (max-width: 1100px) {
  .home-page { grid-template-columns: 290px minmax(0, 1fr); }
  .home-content-panel { width: calc(100% - 54px); }
  .home-navigation-item { padding-inline: 20px; gap: 10px; }
  .home-content-panel h1 { font-size: clamp(48px, 7vw, 76px); }
}

.liked-songs-icon-entry {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  padding: 0;
  color: #ec5f7d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.liked-songs-icon-entry svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.liked-songs-icon-entry:hover,
.liked-songs-icon-entry:focus-visible,
.liked-songs-icon-entry.active {
  color: #fff;
  background: #ec5f7d;
  border-color: #ec5f7d;
  outline: 0;
}

.liked-songs-icon-entry.active svg { fill: currentColor; }

.liked-songs-icon-count {
  position: absolute;
  top: 1px;
  right: 0;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  color: #fff;
  background: #9c2740;
  border: 1px solid #0a0a0a;
  border-radius: 999px;
  font: 600 9px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.account-control {
  position: relative;
  z-index: 40;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-self: center;
  place-items: center;
  margin-left: 2px;
  transform: translateY(5px);
}

.account-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  color: #d1d1d1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.account-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-button:hover,
.account-button:focus-visible,
.account-control.pinned .account-button {
  color: #fff;
  background: #971b36;
  border-color: #cf294b;
  outline: 0;
}

.account-button.signed-in::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: #58d48a;
  border: 2px solid #08090a;
  border-radius: 50%;
}

.account-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 80;
  width: 320px;
  padding: 20px;
  color: #f4f4f4;
  background: #070708;
  border: 1px solid #352227;
  border-radius: 7px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .72), 0 0 0 1px rgba(161, 28, 58, .08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(7px);
  transition: opacity 120ms ease, visibility 120ms ease, transform 120ms ease;
}

.account-popover::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -14px;
  width: 58px;
  height: 14px;
}

.account-control:hover .account-popover,
.account-control:focus-within .account-popover,
.account-control.pinned .account-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.account-popover-view { display: grid; }
.account-popover-view[hidden] { display: none; }

.account-popover-header {
  display: grid;
  padding-bottom: 15px;
  border-bottom: 1px solid #25171b;
}

.account-popover-header > span,
.account-signed-in > span:not(.account-state-light) {
  color: #e43e61;
  font: 700 9px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .17em;
}

.account-popover-header > strong,
.account-signed-in > strong {
  margin-top: 7px;
  overflow: hidden;
  color: #fff;
  font: 500 22px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover-header > small,
.account-signed-in > small {
  margin-top: 7px;
  color: #81787a;
  font: 600 9px/1.25 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .09em;
}

.account-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 8px;
  margin-top: 15px;
}

.account-form label {
  align-self: end;
  color: #8f8587;
  font: 700 8px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .12em;
}

.account-form label[for="accountEmail"] { grid-column: 1; grid-row: 1; }
.account-form #accountEmail { grid-column: 1 / -1; grid-row: 2; }
.account-form label[for="accountPassword"] { grid-column: 1; grid-row: 3; margin-top: 3px; }
.account-password-field { position: relative; grid-column: 1 / -1; grid-row: 4; }
.account-password-field #accountPassword { padding-right: 62px; }

.account-form input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  color: #fff;
  background: #101011;
  border: 1px solid #30282a;
  border-radius: 3px;
  font: 500 12px/1 Arial, sans-serif;
}

.account-form input:focus { border-color: #a42340; outline: 0; box-shadow: 0 0 0 2px rgba(164, 35, 64, .14); }

.account-password-field .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 5px;
  color: #9b9092;
  background: transparent;
  border: 0;
  font: 700 9px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .08em;
  transform: translateY(-50%);
  cursor: pointer;
}

.account-password-field .password-toggle:hover,
.account-password-field .password-toggle:focus-visible { color: #fff; outline: 0; }

.account-form-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 5px;
}

.account-form-actions button,
.account-logout {
  min-height: 38px;
  padding: 0 10px;
  color: #fff;
  background: #a11d3a;
  border: 1px solid #c82c4d;
  border-radius: 3px;
  font: 700 9px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .09em;
  cursor: pointer;
}

.account-form-actions button + button { color: #d2c8ca; background: #151113; border-color: #3b292e; }
.account-form-actions button:hover,
.account-form-actions button:focus-visible,
.account-logout:hover,
.account-logout:focus-visible { color: #fff; background: #d0254d; border-color: #eb4164; outline: 0; }
.account-form-actions button:disabled,
.account-logout:disabled { cursor: wait; opacity: .55; }

.account-status {
  min-height: 12px;
  margin: 10px 0 0;
  color: #82797b;
  font: 600 9px/1.25 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .06em;
}

.account-status.error { color: #ff6b84; }
.account-status.success { color: #65d991; }

.account-signed-in {
  position: relative;
  justify-items: start;
  min-height: 170px;
  align-content: center;
  padding: 10px 6px 4px 30px;
}

.account-state-light {
  position: absolute;
  top: 13px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #58d48a;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(88, 212, 138, .55);
}

.account-logout {
  width: 100%;
  margin-top: 24px;
  background: #161113;
  border-color: #432a30;
}

@media (max-width: 760px) {
  .account-popover { right: -4px; width: min(320px, calc(100vw - 24px)); }
}

.header-heard {
  display: flex;
  height: 100%;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  padding: 0 26px 0 22px;
  gap: 13px;
  background: #080808;
  border-left: 1px solid #35141b;
  white-space: nowrap;
}

.header-heard > span {
  color: #e73b5d;
  font: 700 10px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .16em;
}

.header-heard > strong {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #fff;
  font: 400 25px/.95 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .025em;
}

.header-heard b,
.header-heard i,
.header-heard em {
  color: inherit;
  font-style: normal;
  font-weight: inherit;
}

.header-heard i { color: #76676a; }

@media (max-width: 900px) {
  .header-heard { padding-inline: 14px; gap: 8px; }
  .header-heard > strong { font-size: 20px; gap: 5px; }
}

/* Discovery timing lives at the left edge; personal controls stay at the right. */
.site-footer > .footer-toggle:first-of-type {
  margin-left: 0 !important;
}

.site-footer > .liked-songs-icon-entry {
  margin-left: auto;
}

.six-song-login-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 7px;
  color: #fff;
  background: rgba(128, 12, 35, .9);
  border: 1px solid rgba(255, 91, 121, .55);
  border-radius: 3px;
  font: 700 9px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .08em;
}

.song-row.playback-locked .song-row-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 0, 3, .28);
  pointer-events: none;
}

.login-gate-dialog {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  width: min(440px, calc(100% - 36px));
  padding: 0;
  color: #f7f3f4;
  background: transparent;
  border: 0;
}

.login-gate-dialog[hidden] { display: none; }

.login-gate-sheet {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 30px 32px 28px;
  text-align: center;
  background: #000;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 22px 62px rgba(0, 0, 0, .72);
}

.login-gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #96757c;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font: 300 25px/1 Arial, sans-serif;
  cursor: pointer;
}

.login-gate-close:hover,
.login-gate-close:focus-visible { color: #d21843; background: transparent; outline: 0; }

.login-gate-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 17px;
  padding-left: 4px;
  color: #fff;
  background: transparent;
}

.login-gate-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.login-gate-sheet > p:first-of-type {
  margin: 0 0 10px;
  color: #e34b6b;
  font: 700 11px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .18em;
}

.login-gate-sheet h2 {
  margin: 0;
  max-width: 410px;
  font: 500 clamp(27px, 4vw, 34px)/.98 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.025em;
}

.login-gate-message {
  max-width: 395px;
  margin: 15px 0 22px;
  color: #b7a9ac;
  font: 500 15px/1.5 "Avenir Next", Arial, sans-serif;
}

.login-gate-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.login-gate-actions a,
.login-gate-actions button {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 0 18px;
  border-radius: 4px;
  font: 700 11px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
}

.login-gate-actions a { color: #fff; background: rgba(126, 24, 48, .32); border: 1px solid #7e1830; font-size: 12px; letter-spacing: .04em; }
.login-gate-actions a:hover,
.login-gate-actions a:focus-visible { border-color: rgba(255, 255, 255, .8); outline: 0; }
.login-gate-actions button { color: #bbaeb1; background: transparent; border: 1px solid #4a3439; }
.login-gate-actions button:hover,
.login-gate-actions button:focus-visible { color: #fff; border-color: #8c4352; outline: 0; }

@media (max-width: 560px) {
  .login-gate-dialog { top: 10px; right: 10px; width: calc(100% - 20px); }
  .login-gate-sheet { padding: 30px 22px 24px; }
  .login-gate-actions { align-items: stretch; flex-direction: column; }
  .login-gate-actions a,
  .login-gate-actions button { width: 100%; }
}

/* Launch-ready footer account controls. */
.site-footer > #likedSongsEntry {
  border-radius: 4px;
  transform: translateY(7px);
}

.account-control {
  transform: translateY(7px);
}

.account-button {
  border-radius: 4px;
}

.account-popover {
  right: -2px;
  bottom: calc(100% + 16px);
  width: 360px;
  padding: 0;
  background: #080708;
  border-color: #4a252e;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .78), 0 0 0 1px rgba(199, 38, 74, .07);
}

.account-popover::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  background: #080708;
  border-right: 1px solid #4a252e;
  border-bottom: 1px solid #4a252e;
  transform: rotate(45deg);
}

.account-popover::after {
  right: -2px;
  bottom: -18px;
  width: 54px;
  height: 18px;
}

.account-popover-header {
  padding: 23px 24px 20px;
  border-bottom-color: #2c171c;
}

.account-popover-header > span,
.account-session-label,
.account-detail-row > span,
.account-access-row > span {
  color: #e43e61;
  font: 700 9px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .17em;
}

.account-popover-header > strong {
  margin-top: 9px;
  font-size: 23px;
  line-height: 1.05;
}

.account-popover-header > p {
  margin: 10px 0 0;
  color: #aaa0a2;
  font: 500 11px/1.5 "Avenir Next", Arial, sans-serif;
  letter-spacing: 0;
}

.account-popover-header > small {
  margin-top: 13px;
  color: #756b6d;
  font-size: 8px;
  letter-spacing: .1em;
}

.account-form {
  margin: 0;
  padding: 18px 24px 0;
}

.account-status {
  margin: 10px 24px 18px;
}

.account-signed-in {
  min-height: 0;
  align-content: start;
  justify-items: stretch;
  padding: 0;
}

.account-popover-header-signed-in {
  display: grid;
}

.account-session-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-state-light {
  position: static;
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #58d48a;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(88, 212, 138, .5);
}

.account-detail-row,
.account-access-row {
  display: grid;
  padding: 17px 24px;
  border-bottom: 1px solid #241518;
}

.account-detail-row > strong {
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: #f4f2f2;
  font: 500 15px/1.3 "Avenir Next", Arial, sans-serif;
}

.account-access-row {
  background: #0d090a;
}

.account-access-row > strong {
  margin-top: 7px;
  color: #fff;
  font: 600 13px/1.15 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .04em;
}

.account-access-row > small {
  margin-top: 5px;
  color: #82787a;
  font: 500 10px/1.35 "Avenir Next", Arial, sans-serif;
}

.account-logout {
  width: calc(100% - 48px);
  margin: 18px 24px 22px;
}

@media (max-width: 760px) {
  .account-popover {
    right: -2px;
    width: min(360px, calc(100vw - 24px));
  }
}

/* Saved Gold and account now live at the far-right edge of the top bar. */
.machine-header {
  position: relative;
  z-index: 70;
  overflow: visible;
}

.header-personal-controls {
  display: flex;
  height: 100%;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  padding: 0 14px 0 10px;
  gap: 4px;
  background: #080808;
  border-left: 1px solid #35141b;
}

.header-personal-controls > #likedSongsEntry,
.header-personal-controls > .account-control {
  transform: none;
}

.header-personal-controls > #likedSongsEntry,
.header-personal-controls .account-button {
  border-radius: 4px;
}

.header-personal-controls .account-popover {
  top: calc(100% + 12px);
  right: -2px;
  bottom: auto;
  transform: translateY(-7px);
}

.header-personal-controls .account-popover::before {
  top: -6px;
  bottom: auto;
  border-top: 1px solid #4a252e;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid #4a252e;
}

.header-personal-controls .account-popover::after {
  top: -18px;
  bottom: auto;
}

@media (max-width: 760px) {
  .header-personal-controls {
    padding-right: 6px;
    padding-left: 4px;
    gap: 0;
  }

  .header-personal-controls .account-popover {
    right: -2px;
    width: min(360px, calc(100vw - 18px));
  }
}

/* Keep every discovery level equally breathable between metadata and the next row. */
.six-song-grid {
  row-gap: clamp(18px, 1.5vw, 26px);
}

/* Country view: playlists use the same visual rhythm as song thumbnails. */
.song-card.playlist-gallery-mode .six-song-grid {
  display: grid;
}

.playlist-gallery-tile {
  opacity: .88;
}

.playlist-gallery-tile .six-song-media {
  background: #060405;
}

.playlist-gallery-tile .six-song-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, .24));
  pointer-events: none;
}

.playlist-gallery-open,
.country-gallery-open {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  color: #171013;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #fff;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
  font: 600 13px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.country-gallery-open,
.playlist-gallery-open {
  font-size: 14px;
}

.playlist-gallery-tile:hover .playlist-gallery-open,
.playlist-gallery-tile:focus-within .playlist-gallery-open,
.country-gallery-tile:hover .country-gallery-open,
.country-gallery-tile:focus-within .country-gallery-open {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.playlist-gallery-copy small {
  color: #d44a68;
  font-size: 13px;
  letter-spacing: .08em;
}

.playlist-gallery-copy span {
  font-size: 12px;
}

.right-panel-heading {
  display: grid;
  min-height: 82px;
  align-content: end;
  gap: 8px;
  padding: 14px 2px 26px;
  background: transparent;
}

.right-panel-heading.has-description {
  min-height: 112px;
}

.right-panel-heading[hidden] {
  display: none !important;
}

.right-panel-heading > strong {
  color: #fff;
  font: 600 clamp(29px, calc(1.85vw + 4px), 38px)/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .01em;
  transform: translateX(-6px);
}

.right-panel-heading > p {
  margin: 0;
  color: #fff;
  font: 500 clamp(17px, 1.2vw, 21px)/1.15 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .01em;
  transform: translateX(-6px);
}

.right-panel-heading > p[hidden] {
  display: none;
}

.song-card.grid-mode .right-panel-heading {
  display: none;
}

/* One readable metadata scale across playlist and song galleries. */
.six-song-tile:not(.country-gallery-tile) {
  grid-template-rows: auto minmax(88px, auto);
}

.six-song-copy strong {
  font-size: clamp(18px, 1.305vw, 21.6px);
  line-height: 1.05;
}

.six-song-copy small,
.six-song-copy span {
  font-size: 14px;
  line-height: 1.22;
}

.playlist-gallery-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #76404c;
  background: linear-gradient(145deg, #18070b, #050304);
  font: 500 44px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .08em;
}

/* The left rail is now a persistent live collection, not duplicate navigation. */
.browser-panel > .browser-level {
  display: none !important;
}

.liked-sidebar {
  display: grid;
  grid-template-rows: 74px 30px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, #12070a 0%, #090506 52%, #060404 100%);
}

.liked-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #32151c;
}

.liked-sidebar-header > strong {
  color: #f0eef0;
  font: 500 19px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .085em;
}

.liked-sidebar-header > button {
  height: 32px;
  padding: 0 10px;
  margin-right: -10px;
  color: #fff;
  background: #76152a;
  border: 1px solid #9f213d;
  border-radius: 3px;
  font: 700 11px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .13em;
  cursor: pointer;
}

.liked-sidebar-header > button:hover,
.liked-sidebar-header > button:focus-visible {
  color: #fff;
  background: #8f1932;
  border-color: #bd2949;
  outline: 0;
}

.liked-sidebar-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  padding: 0 12px 0 72px;
  color: #725f63;
  border-bottom: 1px solid #241216;
  font: 700 8px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .12em;
}

.liked-sidebar-columns span:last-child {
  text-align: right;
}

.liked-sidebar-list {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(15, 7, 9, .92), rgba(6, 4, 4, .98));
  scrollbar-color: #59303a #090506;
  scrollbar-width: thin;
}

.liked-sidebar-list.single-song-list .song-row {
  background: rgba(12, 7, 8, .44);
  border-bottom-color: #241419;
}

.liked-sidebar-list.single-song-list .song-row:hover,
.liked-sidebar-list.single-song-list .song-row.active {
  background: linear-gradient(90deg, rgba(91, 18, 35, .92), rgba(29, 8, 13, .92));
  box-shadow: inset 3px 0 0 #e13a5d;
}

.liked-sidebar-list .liked-list-empty {
  margin: 0;
  padding: 28px 24px;
  color: #826d72;
  text-align: left;
  line-height: 1.45;
}

/* Country artwork uses its flag; the gallery then drills into playlist covers. */
.song-card.country-gallery-mode .six-song-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Keep gallery and song counters in the upper-right. */
.song-card .six-song-position {
  top: 11px;
  right: 10px;
  bottom: auto;
  left: auto;
  font-size: 21px;
}

.song-card:not(.country-gallery-mode):not(.playlist-gallery-mode) .six-song-position {
  top: 11px;
  right: 10px;
  bottom: auto;
  left: auto;
  font-size: 19px;
}

.song-thumbnail-position {
  position: absolute;
  right: 10px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 500 21px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
}

.song-thumbnail-position {
  top: 11px;
  gap: 4px;
  font-size: 19px;
}

.song-thumbnail-position b,
.song-thumbnail-position i,
.song-thumbnail-position em {
  color: inherit;
  font-style: normal;
  font-weight: 400;
}

.six-song-heart.countdown-active {
  position: relative;
  transform: scale(1.1);
}

.heart-countdown {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff;
  font: 600 18px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .95);
  transform: translateY(-1px);
}

.six-song-heart.countdown-active:not(.saved) svg,
.global-song-heart.countdown-active:not(.saved) svg {
  position: relative;
  z-index: 0;
  fill: rgba(0, 0, 0, .7);
  stroke: rgba(0, 0, 0, .7);
}

.global-song-tagline {
  margin: 30px 0 0;
  color: #8f888a;
  font: 500 19px/1.3 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-align: center;
}

.catalog-speed-section {
  padding: clamp(92px, 8vw, 150px) clamp(22px, 4vw, 68px) 120px;
  color: #fff;
  background: radial-gradient(circle at 50% 0%, rgba(94, 14, 31, .16), transparent 38%), #030303;
  border-top: 1px solid #351018;
}

.catalog-speed-section > header {
  width: min(1120px, 100%);
  margin: 0 auto 52px;
  text-align: center;
}

.catalog-speed-section h2 {
  margin: 0;
  color: #fff;
  font: 650 clamp(48px, 5vw, 84px)/.98 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.015em;
}

.catalog-speed-section > header p {
  width: min(900px, 100%);
  margin: 24px auto 0;
  color: #92878a;
  font: 500 clamp(18px, 1.45vw, 24px)/1.35 "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.catalog-speed-table-wrap {
  width: min(1500px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid #3c171f;
  border-radius: 7px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

.catalog-speed-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: #fff;
  background: rgba(7, 4, 5, .94);
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-align: center;
}

.catalog-speed-table th,
.catalog-speed-table td {
  padding: 22px 18px;
  border-right: 1px solid #2d151a;
  border-bottom: 1px solid #2d151a;
  font-size: clamp(18px, 1.45vw, 24px);
  font-weight: 500;
}

.catalog-speed-table tr > :last-child { border-right: 0; }
.catalog-speed-table tbody tr:last-child > * { border-bottom: 0; }

.catalog-speed-table thead th {
  padding-block: 18px;
  color: #e73b5d;
  background: #13070a;
  font-size: clamp(15px, 1.1vw, 19px);
  font-weight: 650;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.catalog-speed-table tbody th {
  color: #fff;
  background: rgba(91, 17, 34, .16);
  font-weight: 650;
}

.catalog-speed-table tbody tr:hover > * {
  background-color: rgba(151, 27, 54, .12);
}

.catalog-speed-table tbody td:nth-child(2) { color: #a99fa1; }

.mac-download-section,
.home-brand-footer {
  min-height: calc(100svh - 68px);
  color: #fff;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
}

.mac-download-section {
  display: grid;
  place-items: center;
  padding: clamp(90px, 11vw, 180px) clamp(22px, 5vw, 84px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(168, 25, 54, .3), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(74, 8, 21, .28), transparent 52%),
    linear-gradient(180deg, #050203 0%, #0d0305 51%, #020202 100%);
  border-top: 1px solid #351018;
  text-align: center;
}

.mac-download-content {
  display: grid;
  width: min(1040px, 100%);
  justify-items: center;
}

.mac-download-content > span {
  margin-bottom: 22px;
  color: #e73b5d;
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 700;
  letter-spacing: .15em;
}

.mac-download-content h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(66px, 9vw, 152px);
  font-weight: 650;
  line-height: .88;
  letter-spacing: -.025em;
}

.mac-download-content p {
  width: min(720px, 100%);
  margin: 34px auto 0;
  color: #9a9092;
  font-size: clamp(19px, 1.6vw, 27px);
  font-weight: 500;
  line-height: 1.35;
}

.mac-download-button {
  display: inline-grid;
  min-width: min(320px, 100%);
  min-height: 64px;
  margin-top: 46px;
  padding: 0 34px;
  place-items: center;
  color: #fff;
  background: #a71936;
  border: 1px solid #e12c50;
  border-radius: 6px;
  box-shadow: 0 18px 54px rgba(151, 27, 54, .26);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .07em;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mac-download-button:hover,
.mac-download-button:focus-visible {
  color: #fff;
  background: #c02040;
  border-color: #ff4568;
  outline: 0;
  transform: translateY(-2px);
}

.home-brand-footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  height: calc(100svh - 136px);
  min-height: 600px;
  max-height: calc(100svh - 136px);
  padding: clamp(26px, 3vw, 46px) clamp(28px, 4.5vw, 76px) calc(78px + clamp(30px, 4.5vh, 54px));
  gap: clamp(24px, 3.5vh, 46px);
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(193, 68, 92, .2) 1px, transparent 1.2px) 0 0 / 13px 13px,
    radial-gradient(circle at 18% 82%, rgba(132, 21, 43, .24), transparent 34%),
    linear-gradient(135deg, #160708 0%, #0b0506 58%, #050303 100%);
  border-top: 1px solid rgba(231, 59, 93, .23);
}

.home-footer-mark {
  grid-column: 1 / -1;
  align-self: start;
  justify-self: start;
  color: #f4ead7;
  font-size: clamp(54px, 6vw, 98px);
  font-weight: 650;
  line-height: .9;
  letter-spacing: -.035em;
  text-decoration: none;
  transition: color 160ms ease;
}

.home-footer-mark:hover,
.home-footer-mark:focus-visible {
  color: #e73b5d;
  outline: 0;
}

.home-footer-stage {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  width: min(920px, 100%);
}

.home-footer-stage h2 {
  margin: 0;
  color: #f4ead7;
  font-size: clamp(38px, 4.7vw, 80px);
  font-weight: 620;
  line-height: .93;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.home-footer-stage p {
  width: min(700px, 100%);
  margin: clamp(18px, 2.4vh, 28px) 0 0;
  color: rgba(244, 234, 215, .7);
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 500;
  line-height: 1.3;
}

.home-footer-action {
  display: inline-grid;
  min-height: 52px;
  margin-top: clamp(24px, 3vh, 36px);
  padding: 0 26px;
  place-items: center;
  color: #120607;
  background: #f4ead7;
  border: 1px solid #f4ead7;
  border-radius: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .035em;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.home-footer-action:hover,
.home-footer-action:focus-visible {
  color: #f4ead7;
  background: #a71936;
  border-color: #e73b5d;
  outline: 0;
}

.home-footer-navigation {
  display: grid;
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  min-width: clamp(210px, 20vw, 340px);
  gap: 14px;
}

.home-footer-navigation a,
.home-footer-navigation span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 0 0 13px;
  color: #f4ead7;
  border-bottom: 1px solid rgba(231, 59, 93, .2);
  font-size: clamp(15px, 1.15vw, 20px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: .03em;
  text-decoration: none;
  text-transform: uppercase;
}

.home-footer-navigation a::before,
.home-footer-navigation span::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #521323;
  transition: background-color 150ms ease;
}

.home-footer-navigation a {
  transition: color 150ms ease, border-color 150ms ease;
}

.home-footer-navigation a:hover,
.home-footer-navigation a:focus-visible {
  color: #e73b5d;
  border-color: #8f1e36;
  outline: 0;
}

.home-footer-navigation a:hover::before,
.home-footer-navigation a:focus-visible::before,
.home-footer-navigation a.active::before {
  background: #e73b5d;
}

@media (max-width: 760px) {
  .catalog-speed-section { padding: 72px 12px 96px; }
  .catalog-speed-section > header { margin-bottom: 34px; }
  .catalog-speed-section h2 { font-size: 46px; }
  .catalog-speed-section > header p { margin-top: 18px; font-size: 18px; }
  .catalog-speed-table th,
  .catalog-speed-table td { padding: 17px 13px; font-size: 17px; }

  .mac-download-section {
    min-height: calc(100svh - 68px);
    padding: 92px 20px 112px;
  }

  .mac-download-content h2 { font-size: clamp(58px, 19vw, 82px); }
  .mac-download-content p { margin-top: 28px; font-size: 19px; }
  .mac-download-button { width: 100%; min-width: 0; margin-top: 38px; }

  .home-brand-footer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto auto;
    height: auto;
    max-height: none;
    min-height: calc(100svh - 68px);
    padding: 32px 20px calc(92px + env(safe-area-inset-bottom));
    gap: 32px;
  }

  .home-footer-mark { font-size: clamp(52px, 17vw, 76px); }
  .home-footer-stage { grid-column: 1; grid-row: 3; }
  .home-footer-stage h2 { font-size: clamp(38px, 11.7vw, 56px); }
  .home-footer-action { width: 100%; }
  .home-footer-navigation {
    grid-column: 1;
    grid-row: 4;
    min-width: 0;
    margin-top: 12px;
  }
}

@media (max-width: 1350px) {
  .song-card .six-song-position {
    top: 9px;
    right: 8px;
    bottom: auto;
    left: auto;
    font-size: 18px;
  }

  .song-card:not(.country-gallery-mode):not(.playlist-gallery-mode) .six-song-position {
    top: 9px;
    right: 8px;
    bottom: auto;
    font-size: 16px;
  }

  .song-thumbnail-position {
    right: 8px;
    font-size: 18px;
  }

  .song-thumbnail-position {
    top: 9px;
    font-size: 16px;
  }

  .heart-countdown { font-size: 16px; }
}

/* Full-viewport celebration copied from the app's deterministic heart flood. */
.like-heart-flood {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.like-heart-flood-item {
  position: absolute;
  top: var(--heart-y);
  left: var(--heart-x);
  display: grid;
  width: var(--heart-size);
  height: var(--heart-size);
  place-items: center;
  font-size: var(--heart-size);
  opacity: 0;
  animation: like-heart-flood-rise 1s linear var(--heart-delay) both;
  will-change: transform, opacity;
}

.like-heart-flood-glyph {
  display: block;
  width: 88%;
  height: 88%;
  animation: like-heart-flood-wobble 1s linear var(--heart-delay) both;
  will-change: transform;
}

.like-heart-flood-glyph svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: #e73b5d;
  stroke: #e73b5d;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .44)) drop-shadow(0 0 3px rgba(231, 59, 93, .28));
}

@keyframes like-heart-flood-rise {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) rotate(var(--heart-rotation-start));
  }
  2%, 97% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--heart-drift)), calc(-50% + var(--heart-rise)), 0) rotate(var(--heart-rotation-end));
  }
}

@keyframes like-heart-flood-wobble {
  0% { transform: translateX(var(--heart-wobble-0)); }
  25% { transform: translateX(var(--heart-wobble-1)); }
  50% { transform: translateX(var(--heart-wobble-2)); }
  75% { transform: translateX(var(--heart-wobble-3)); }
  100% { transform: translateX(var(--heart-wobble-4)); }
}

.country-gallery-tile .six-song-position {
  display: none;
}

.country-gallery-tile {
  grid-template-rows: auto minmax(64px, auto);
  opacity: .9;
}

.country-gallery-tile .six-song-media {
  background: linear-gradient(145deg, #18080c 0%, #090506 58%, #050404 100%);
}

.country-gallery-tile .six-song-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .72) 100%),
    radial-gradient(circle at 50% 42%, rgba(210, 48, 83, .12), transparent 58%);
  pointer-events: none;
}

.country-gallery-flag {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: clamp(64px, calc(6.56vw - 1.6px), 96px);
  line-height: 1;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .42));
  transform: translate(-4px, 4px) scale(1.15);
  transition: transform 160ms ease;
}

.country-gallery-tile:hover .country-gallery-flag,
.country-gallery-tile:focus-within .country-gallery-flag {
  transform: translate(-4px, 4px) scale(1.15);
}

.country-gallery-hits-emoji {
  display: inline-block;
  transform: scale(.85);
}

.country-gallery-100m {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Bakbak One", sans-serif;
  font-size: clamp(52px, 7vw, 104px);
  font-weight: 400;
  line-height: 1;
}

.country-gallery-billion {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Bakbak One", sans-serif;
  font-size: clamp(52px, 7vw, 104px);
  font-weight: 400;
  line-height: 1;
}

.country-gallery-info {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 14px 2px 0;
  color: #fff;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  text-align: left;
  pointer-events: none;
}

.country-gallery-info strong {
  overflow: hidden;
  font-size: clamp(23px, calc(1.45vw + 3px), 27px);
  font-weight: 500;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-gallery-info small {
  color: #8d8184;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .025em;
}

/* Heard is an open, high-visibility counter rather than a boxed utility. */
.header-heard {
  padding: 0 30px 0 24px;
  gap: 15px;
  background: transparent;
  border-left: 0;
  box-shadow: none;
}

.header-heard > span {
  font-size: 11px;
  letter-spacing: .17em;
}

.header-heard > strong {
  gap: 8px;
  font-size: 39px;
  line-height: .9;
  letter-spacing: .015em;
}

.header-heard i {
  color: #8a797d;
}

.six-song-title-overlay {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  z-index: 4;
  overflow: hidden;
  color: #fff;
  font: 600 clamp(24px, 2vw, 34px)/.95 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .95), 0 0 18px rgba(0, 0, 0, .8);
  white-space: nowrap;
  pointer-events: none;
}

.six-song-tile.current .six-song-title-overlay {
  font-weight: 700;
}

@media (max-width: 900px) {
  .header-heard {
    padding-inline: 14px;
    gap: 9px;
  }

  .header-heard > strong {
    gap: 5px;
    font-size: 30px;
  }
}

/* Theme switching UI and splash safety. Theme-specific visuals live elsewhere. */

/* Splashes are disabled site-wide until the owner requests a new design. */
.theme-splash,
.site-splash {
  display: none !important;
  animation: none !important;
  pointer-events: none !important;
}

.site-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #000;
  pointer-events: all;
  animation: site-splash-dismiss 2.35s ease forwards;
}

.site-splash > strong {
  display: grid;
  justify-items: center;
  font: 400 clamp(80px, 10vw, 170px)/.86 "Bakbak One", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.04em;
  opacity: 0;
  transform: translateY(8px);
  animation: site-splash-word 1.75s ease .12s both;
}

.site-splash > strong > span {
  display: block;
}

@keyframes site-splash-word {
  0% { opacity: 0; transform: translateY(8px); }
  34%, 72% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-3px); }
}

@keyframes site-splash-dismiss {
  0%, 76% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-splash { animation-duration: .8s; }
  .site-splash > strong { animation: none; opacity: 1; transform: none; }
}

.theme-switcher {
  position: relative;
  z-index: 5;
  display: none !important;
  align-items: center;
  flex: 0 0 auto;
  height: 46px;
  margin-left: auto;
  padding: 0 13px;
  gap: 9px;
  border-left: 1px solid #263a4b;
}

.theme-switcher > span {
  margin-right: 2px;
  color: #5f87af;
  font: 400 11px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .13em;
}

.theme-choice {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .22);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.theme-choice::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid transparent;
  border-radius: 50%;
}

.theme-choice:hover::after,
.theme-choice:focus-visible::after,
.theme-choice.active::after {
  border-color: currentColor;
}

.theme-choice.active {
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .28), 0 0 0 1px currentColor;
}

.theme-choice:focus-visible {
  outline: 0;
}

.theme-choice-blue {
  color: #78aee1;
  background: #123b5a;
}

.theme-choice-sage {
  color: #aebaa1;
  background: #68765f;
}

.theme-choice-burgundy {
  color: #e7ceb1;
  background: #40152f;
}

.site-footer > .theme-switcher + .footer-toggle,
.site-footer > .footer-toggle:first-of-type {
  margin-left: auto !important;
}

/* The product name is a quiet home target, not a hoverable control. */
.machine-header .machine-brand {
  cursor: default;
}

.machine-header .machine-brand:hover {
  color: inherit !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 1350px) {
  .theme-switcher {
    height: 42px;
    padding-inline: 9px;
    gap: 7px;
  }

  .theme-switcher > span { display: none; }
  .theme-choice { width: 28px; height: 28px; flex-basis: 28px; }
}
