: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;
}

.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: 47px;
  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: 40px; }
}

/* 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: " / 200"; }

.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: 47px;
  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: 40px; }
}

/* 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 40px 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: auto minmax(28px, 1fr) 88px;
  align-items: center;
  padding-right: 18px !important;
  gap: 14px;
}

.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;
}

.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;
  letter-spacing: 0 !important;
}

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

.header-country-progress {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: #1b2d3d;
}

.header-country-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #426f9d;
}

.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-song-icon,
.header-icon-control svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-song-icon {
  flex: 0 0 24px;
  color: #5f87af;
}

.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 0 10px;
  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-song-icon,
  .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: 8px; }
}

/* 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);
  }
}
