/* Palette: "Ocean Glass" */
:root {
  --navy: #0a2a6b;
  --royal: #1559c9;
  --sky: #3ba0ff;
  --aqua: #8fe0ff;
  --ice: #e6fbff;

  --bg: #020617;           /* slate-950 page background */
  --panel: #0f172a;
  --raised: #1e293b;
  --raised-2: #334155;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --on-light: #0f172a;     /* text on light fills */

  --stamped: var(--sky);   /* collected */
  --searching: var(--royal);
  --heard: var(--aqua);
  --danger: #ff8a8a;
  --bar: #cbd5e1;          /* solid slate fill for progress bars */

  --radius: 12px;
  --bar-r: 20px;                      /* corner radius of the search bar */
  --btn-r: calc(var(--bar-r) / 2);    /* every button: half of that, so a button sits flush inside the bar */
  --pad: clamp(16px, 4vw, 56px);
  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: true; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
section[id] { scroll-margin-top: 16px; }

/* ── Hero ──────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #030a1f 0%, #05143a 55%, var(--navy) 100%);
  border-bottom: 1px solid var(--line);
}
/* Ocean glow rising from the bottom, behind the globe */
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 70%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(70% 85% at 58% 100%, rgba(59, 160, 255, 0.8) 0%, rgba(21, 89, 201, 0.5) 42%, rgba(21, 89, 201, 0) 78%),
    radial-gradient(130% 95% at 50% 104%, rgba(143, 224, 255, 0.3) 0%, rgba(143, 224, 255, 0) 70%);
}
/* Stars: small music notes. A few twinkle now and then. */
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.star {
  position: absolute; translate: -50% -50%; opacity: var(--o, 0.3); background: #fff;
  -webkit-mask: var(--shape) center / contain no-repeat; mask: var(--shape) center / contain no-repeat;
}
.star.n1 { --shape: url("/notes/eighth.svg"); }
.star.n2 { --shape: url("/notes/beamed.svg"); }
.star.n3 { --shape: url("/notes/quarter.svg"); }
.star.tint { background: var(--aqua); }
.star.tw { animation: twinkle var(--dur, 10s) ease-in-out var(--delay, 0s) infinite; }
@keyframes twinkle { 0%, 84%, 100% { opacity: var(--o, 0.3); scale: 1; } 92% { opacity: 1; scale: 1.6; } }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; touch-action: pan-y; cursor: grab; }
#globe.dragging { cursor: grabbing; }
#globe.pointing { cursor: pointer; }
.tip {
  position: absolute; left: 0; top: 0; pointer-events: none; display: none; white-space: nowrap; z-index: 4;
  background: var(--ice); color: var(--on-light); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 6px;
  transform: translate(-50%, -150%);
}
.tip span { font-weight: 400; color: var(--royal); margin-left: 8px; }

/* The card that opens on the globe and points at the country you clicked */
.callout {
  position: absolute; left: 0; top: 0; z-index: 5; width: min(300px, calc(100vw - 24px)); padding: 16px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; outline: 0;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85); font-size: 14px; animation: co-in 0.16s ease both;
}
.callout::after {
  content: ""; position: absolute; left: var(--ax, 50%); bottom: -8px; width: 14px; height: 14px;
  background: var(--panel); border: solid var(--line-strong); border-width: 0 1px 1px 0; translate: -50% 0; rotate: 45deg;
}
.callout.below::after { bottom: auto; top: -8px; border-width: 1px 0 0 1px; }
@keyframes co-in { from { opacity: 0; } }
.co-head { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.co-head strong { display: block; font-size: 17px; line-height: 1.2; letter-spacing: -0.02em; }
.co-reg { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.co-reg .dot { margin: 0; }
.co-mine { margin: 12px 0 0; font-size: 13px; color: #cbd5e1; }
.co-picks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.co-picks li { font-weight: 600; line-height: 1.3; }
.co-picks span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.co-picks em { font-style: normal; font-weight: 400; color: var(--muted); }
.callout .btn { width: 100%; margin-top: 16px; }
.co-close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: var(--btn-r);
  background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.co-close:hover { background: var(--raised); color: var(--text); }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--pad); pointer-events: none; }
.nav > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: -0.01em; }
.brand-logo { --logo: 44px; flex: none; width: var(--logo); height: var(--logo); background: url("/logo.svg") center / contain no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  /* The globe turns once when you point at the logo (brand.js adds .spinning). logo-spin.png holds the
     72 frames of that turn in one row, rendered with Remotion (see logo/). Its last frame looks the
     same as its first, so the globe lands where it started. brand.js adds .sprite once the strip has
     loaded (after the page), so until then the still logo.svg shows. */
  .brand-logo.sprite { background: url("/logo-spin.png?v=2") 0 0 / auto 100% no-repeat; }
  .brand-logo.sprite.spinning { animation: logo-spin 2.4s steps(71) 1; }
}
@keyframes logo-spin { to { background-position: calc(var(--logo) * -71) 0; } }
.nav-right { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nav-link { text-decoration: none; color: var(--muted); padding: 8px 12px; font-weight: 500; }
.nav-link:hover { color: var(--ice); }
.nav-auth { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
.who { color: var(--muted); font-weight: 500; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hero-top { padding: clamp(8px, 3svh, 36px) var(--pad) 0; pointer-events: none; }
.hero-top h1 {
  font-size: clamp(42px, min(7vw, 11.5svh), 104px); line-height: 0.98; font-weight: 800;
  letter-spacing: -0.045em; max-width: 18ch;
}
.hero-copy {
  margin-top: auto; width: min(620px, 100%); padding: 90px 190px clamp(28px, 6svh, 64px) var(--pad);
  background: radial-gradient(100% 100% at 0% 100%, rgba(3, 10, 31, 0.88) 0%, rgba(3, 10, 31, 0.7) 40%, rgba(3, 10, 31, 0) 74%);
  pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.lead { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.field-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; margin: 0 0 8px; }
.hero-copy select { width: 100%; }
.progress { font-size: 13px; color: #cfe0f8; margin: 12px 0 0; min-height: 1.5em; }
.progress:empty { display: none; }
.progress progress { width: 140px; vertical-align: middle; margin-left: 8px; accent-color: #cbd5e1; }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #fff; }
.dot.stamped { background: var(--stamped); }
.dot.searching { background: var(--searching); box-shadow: 0 0 0 1px var(--aqua); }
.dot.heard { background: var(--heard); }

/* ── Controls ──────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--btn-r); cursor: pointer;
  border: 1px solid var(--line); background: var(--raised-2); color: var(--ice);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #475569; border-color: #64748b; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary { background: var(--ice); color: var(--on-light); border-color: var(--ice); }
.btn.primary:hover { background: var(--aqua); border-color: var(--aqua); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--danger); }
select, input[type="search"] {
  min-height: 40px; padding: 0 12px; border-radius: var(--btn-r);
  border: 1px solid var(--line-strong); background: #020617; color: var(--text); font-size: 14px; max-width: 100%;
}

/* ── Content ───────────────────────────── */
main { max-width: 1240px; margin: 0 auto; padding: 32px var(--pad) 120px; display: grid; gap: 56px; grid-template-columns: minmax(0, 1fr); }
/* No cards: a section is separated from the one before it by space and a hairline. */
main > section + section, main > .foot { border-top: 1px solid var(--line); padding-top: 56px; }
.panel h2 { font-size: 22px; }
.hint { color: var(--muted); margin: 6px 0 12px; font-size: 14px; max-width: 72ch; }
.hint.tight { margin-top: -2px; }
.hint.flush { margin: 12px 0 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #94a3b8; }

/* Counter + leaderboard */
.stats { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.3fr); gap: 16px; align-items: stretch; }
.big { font-size: clamp(88px, 11vw, 148px); line-height: 0.95; font-weight: 800; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; margin-top: 14px; }
.big .of { font-size: 0.26em; font-weight: 500; color: var(--muted); margin-left: 10px; letter-spacing: -0.01em; }
.big-label { font-weight: 600; margin-top: 6px; }
.meter { height: 6px; border-radius: 3px; background: rgba(148, 163, 184, 0.16); margin: 18px 0 16px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--bar); border-radius: 3px; transition: width 0.5s ease; }
.breakdown { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 14px; color: #cbd5e1; }
.breakdown li, .breakdown span { display: flex; align-items: center; }
.breakdown b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ice); }
.regions { display: grid; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.region {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; width: 100%;
  text-align: left; cursor: pointer; padding: 8px 10px; border-radius: var(--btn-r); border: 1px solid transparent; background: transparent;
}
.region:hover { background: rgba(148, 163, 184, 0.1); }
.region[aria-pressed="true"] { background: var(--ice); color: var(--on-light); }
.region .name { font-size: 13px; font-weight: 600; }
.region .num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.region .num small { font-weight: 500; color: var(--muted); margin-left: 3px; }
.region[aria-pressed="true"] .num small { color: #475569; }
.region .bar { height: 4px; border-radius: 2px; background: rgba(148, 163, 184, 0.16); overflow: hidden; }
.region .bar i { display: block; height: 100%; width: 0; background: var(--bar); border-radius: 2px; transition: width 0.4s ease; }

.board { display: flex; flex-direction: column; }
.board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.board h2 { font-size: 26px; }
.board .hint { margin-bottom: 4px; }
.lb { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.lb-row {
  display: grid; grid-template-columns: 30px 28px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; text-align: left; cursor: pointer; padding: 10px 12px; border-radius: var(--btn-r); border: 1px solid transparent; background: transparent;
}
.lb-row:hover { background: rgba(148, 163, 184, 0.1); border-color: var(--line); }
.lb-rank { font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.lb-row.top .lb-rank { color: var(--on-light); background: #cbd5e1; border-radius: 50%; width: 26px; height: 26px; line-height: 26px; }
.lb-row.top1 .lb-rank { background: #f1f5f9; }
.lb-row.top3 .lb-rank { background: #94a3b8; }
.lb-main { min-width: 0; display: block; }
.lb-artists, .lb-bar, .lb-bar i { display: block; }
.lb-name { font-weight: 600; display: flex; align-items: center; gap: 2px; }
.lb-artists { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar { height: 4px; border-radius: 2px; background: rgba(148, 163, 184, 0.16); margin-top: 6px; overflow: hidden; }
.lb-bar i { display: block; height: 100%; width: 0; background: var(--bar); border-radius: 2px; }
.lb-n { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-align: right; }
.lb-n small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.lb-empty { margin: 20px 0 0; color: var(--muted); max-width: 52ch; }
.lb-empty p { margin: 0 0 14px; }
.lb-more { margin-top: 12px; align-self: center; color: var(--aqua); }

/* Discover: the question and the search bar with a moving glow */
.discover { text-align: center; padding: clamp(24px, 5vw, 64px) 0 clamp(16px, 3vw, 40px); }
.discover h2 { font-size: clamp(30px, 5vw, 56px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; max-width: 18ch; margin: 0 auto 28px; }
.search-box { position: relative; max-width: 680px; margin: 0 auto; text-align: left; }
.search-glow {
  --angle: 0deg; position: relative; isolation: isolate; border-radius: calc(var(--bar-r) + 2px); padding: 2px;
  background: conic-gradient(from var(--angle), var(--navy), var(--royal), var(--sky), var(--aqua), var(--ice), var(--aqua), var(--sky), var(--royal), var(--navy));
  animation: sweep 7s linear infinite;
}
.search-glow::before { /* a soft, faint halo of the same moving gradient */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: conic-gradient(from var(--angle), var(--navy), var(--royal), var(--sky), var(--aqua), var(--ice), var(--aqua), var(--sky), var(--royal), var(--navy));
  filter: blur(14px); opacity: 0.4;
}
@keyframes sweep { to { --angle: 360deg; } }
/* The space around the button equals the button's radius, and both are half the bar's radius:
   that is what makes the two corners run parallel. */
.search-inner { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: var(--bar-r); padding: var(--btn-r) var(--btn-r) var(--btn-r) 22px; }
.search-inner .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.search-ico { flex: none; color: var(--aqua); }
.search-inner input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; font-size: 18px; outline: 0; color: var(--text); }
.search-inner input::placeholder { color: var(--muted); }
.search-glow:focus-within::before { opacity: 0.6; }
.suggest {
  position: absolute; left: 12px; right: 12px; top: calc(100% + 10px); z-index: 6; list-style: none; margin: 0; padding: 6px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 24px 60px -10px #000;
  max-height: min(380px, 60svh); overflow: auto;
}
.suggest-title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 4px; }
.suggest li[role="option"] { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li[role="option"]:hover, .suggest li[aria-selected="true"] { background: var(--raised-2); }
.suggest .s-name { font-weight: 600; }
.suggest .s-meta { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; }
.suggest .s-empty { padding: 16px 12px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.toolbar h2 { margin-right: auto; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: var(--btn-r); padding: 7px 13px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted); }
.chip:hover { color: var(--ice); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--ice); color: var(--on-light); border-color: var(--ice); }
.chip .n { opacity: 0.65; margin-left: 6px; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 8px; }
.ctry { text-align: left; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; border-radius: 4px; }
.ctry .st { display: flex; align-items: center; }
.ctry .dot.none { background: rgba(148, 163, 184, 0.4); }
.ctry.pop { animation: pop 0.7s ease both; }
@keyframes pop { 0% { box-shadow: 0 0 0 0 rgba(59, 160, 255, 0.8); } 100% { box-shadow: 0 0 0 16px rgba(59, 160, 255, 0); } }

.fl { width: 28px; height: 21px; border-radius: 3px; object-fit: cover; display: block; box-shadow: 0 0 0 1px rgba(230, 251, 255, 0.2); }
.fl.big { width: 52px; height: 39px; border-radius: 4px; }
.fl.inline { display: inline-block; width: 18px; height: 13.5px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }

.extra { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.extra:empty { display: none; }
.empty { color: var(--muted); padding: 24px 0; grid-column: 1 / -1; text-align: center; }

.data { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.data > div:first-child { flex: 1 1 380px; }
.data .hint { margin-bottom: 0; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ice); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding-bottom: 8px; }
.foot p { margin: 4px 0; }

/* ── Songs ─────────────────────────────── */
.songs { list-style: none; margin: 0; padding: 0; display: grid; }
.song { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.song:last-child { border-bottom: 0; }
.cover { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--raised-2); display: block; flex: none; }
.song .meta { flex: 1 1 170px; min-width: 0; }
.song .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .a { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song select { min-height: 34px; font-size: 13px; max-width: 180px; }
.verdict { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--btn-r); overflow: hidden; }
.verdict button { border: 0; background: transparent; padding: 7px 11px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted); }
.verdict button[aria-pressed="true"].love { background: #f1f5f9; color: var(--on-light); font-weight: 700; }
.verdict button[aria-pressed="true"].meh { background: #475569; color: #fff; }

/* ── Country sheet ─────────────────────── */
dialog {
  width: min(700px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  border: 1px solid var(--line-strong); border-radius: 16px; padding: 0;
  background: var(--panel); color: var(--text); box-shadow: 0 30px 90px -20px #000;
}
dialog::backdrop { background: rgba(2, 6, 20, 0.8); }
dialog[open] { animation: sheet 0.22s ease both; }
@keyframes sheet { from { opacity: 0; transform: translateY(10px); } }
.page-head { position: relative; padding: 26px 26px 20px; border-bottom: 1px solid var(--line); background: transparent; }
.page-head h3 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; margin-top: 14px; }
.page-head .reg { font-size: 13.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 2px; }
.page-head .close { position: absolute; top: 18px; right: 18px; }
.page-sec { padding: 20px 26px; border-bottom: 1px solid var(--line); }
.page-sec:last-child { border-bottom: 0; }
.page-sec h4 { margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.recs { display: grid; grid-template-columns: 1fr 1fr; }
.rec { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 24px; }
.rec + .rec { border-left: 1px solid var(--line); padding: 0 0 0 24px; }
.rec .kind { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; }
.rec.legend .kind { color: #cbd5e1; }
.rec .note { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.picks { list-style: none; margin: 6px 0 0; padding: 0; }
.pick { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pick:last-child { border-bottom: 0; }
.pk-n { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.pk-meta { min-width: 0; }
.pick .title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.pick .artist { color: var(--muted); font-size: 13.5px; }
.pick .note { margin: 2px 0 0; }
.pk-act { display: flex; gap: 4px; }
.pk-act .btn.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.pick .found { grid-column: 1 / -1; }
.pick .found:empty { display: none; }
.cands { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.cand { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cand .cover { width: 32px; height: 32px; border-radius: 4px; }
.cand .meta { flex: 1; min-width: 0; }
.cand .meta div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand .meta .a { color: var(--muted); font-size: 12px; }
.player { width: 100%; height: 80px; border: 0; border-radius: 12px; margin-top: 10px; display: block; }
.consent { margin-top: 12px; padding: 2px 0 2px 14px; border-left: 2px solid var(--line-strong); font-size: 13px; color: var(--muted); }
.consent p { margin: 0 0 10px; }
.heardline { font-size: 14px; margin: 0; }
.heardline span { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ice); color: var(--on-light); padding: 11px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 10; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Privacy page ──────────────────────── */
.prose { max-width: 800px; margin: 0 auto; padding: 16px var(--pad) 80px; display: block; }
.prose h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 6px; }
.prose h2 { font-size: 20px; margin: 32px 0 8px; }
.prose h3 { font-size: 15px; margin: 20px 0 4px; letter-spacing: -0.01em; }
.prose p { margin: 6px 0 10px; }
.prose p, .prose li { color: #cbd5e1; font-size: 15px; }
.prose ul { padding-left: 20px; }
.prose address { font-style: normal; color: #cbd5e1; white-space: pre-line; }
.prose .warn { border: 1px solid #94a3b8; color: #cbd5e1; border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.prose .updated { color: var(--muted); font-size: 14px; }
.prose-page { background: var(--bg); min-height: 100svh; }

/* ── Login page ────────────────────────── */
.login { max-width: 640px; display: block; padding-top: clamp(24px, 8vh, 96px); }
.login h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }
.login-lead { font-size: 18px; color: #cbd5e1; margin: 16px 0 0; max-width: 46ch; }
.login-facts { margin: 40px 0 0; }
.login-facts div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.login-facts div:last-child { border-bottom: 1px solid var(--line); }
.login-facts dt { font-weight: 600; }
.login-facts dd { margin: 0; color: #cbd5e1; }
.login-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.login-note { min-height: 1.5em; margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.login-fine { margin: 8px 0 0; font-size: 13px; color: var(--muted); max-width: 60ch; }
@media (max-width: 560px) { .login-facts div { grid-template-columns: minmax(0, 1fr); } }

/* ── Logged out: the passport is locked ────
   Everything under "Your passport" is replaced by a lock and a way in. */
.passport > .eyebrow { margin-bottom: 28px; }
.lock { display: none; max-width: 520px; padding: 8px 0 24px; }
.lock svg { display: block; margin-bottom: 24px; color: var(--muted); }
.lock h3 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.lock p { margin: 12px 0 28px; color: #cbd5e1; max-width: 44ch; }
[data-auth="out"] .lock { display: block; }
[data-auth="out"] .gated, [data-auth="out"] a[href="#countries"] { display: none !important; }

/* ── Passport: counter, regions, ranking, flag wall ──
   Visual: one strip for the regions, bars for the ranking, and a wall of flags that light up. */
.stats { grid-template-columns: minmax(0, 1fr); gap: 56px; }
.counter { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(32px, 7vw, 112px); align-items: end; }
.counter .regions { grid-column: 1 / -1; }
.big, .big-label { grid-column: 1; }
.big { margin-top: 0; }
.breakdown { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 28px; margin: 0; }
.breakdown b { margin-left: 8px; }
.regions { display: flex; gap: 4px; margin: 28px 0 0; padding: 0; border: 0; }
.region { display: flex; flex-direction: column; align-items: flex-start; flex: 1 1 0; min-width: 0; gap: 2px; padding: 0 0 6px; border-radius: 4px; overflow: hidden; }
.region .bar { order: -1; align-self: stretch; height: 16px; border-radius: 3px; margin-bottom: 8px; }
.region .bar i { border-radius: 0; background: var(--stamped); }
.region .name, .region .num { padding: 0 4px; white-space: nowrap; }
.lb { gap: 0; }
.lb-row { border: 0; border-radius: 4px; padding: 8px 0; }
.lb-main { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr); align-items: center; gap: 16px; }
.lb-artists { display: none; }
.lb-bar { height: 14px; margin: 0; border-radius: 3px; background: none; }
.lb-bar i { border-radius: 3px; min-width: 3px; }
.lb-n { font-size: 16px; min-width: 3ch; }
.lb-n small { display: none; }
.grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.ctry { position: relative; display: block; aspect-ratio: 4 / 3; }
.ctry .fl { width: 100%; height: 100%; border-radius: 4px; opacity: 0.28; filter: grayscale(0.9); transition: opacity 0.15s ease, filter 0.15s ease; }
.ctry.heard .fl, .ctry.searching .fl { opacity: 0.6; filter: grayscale(0.4); }
.ctry.stamped .fl { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--stamped); }
.ctry:hover .fl, .ctry:focus-visible .fl { opacity: 1; filter: none; }
.ctry .nm, .ctry .st { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ctry:hover::after, .ctry:focus-visible::after {
  content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; z-index: 3; pointer-events: none;
  background: var(--ice); color: var(--on-light); font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 6px; white-space: nowrap;
}
#countries { overflow-x: clip; }

@media (max-width: 860px) {
  .counter { grid-template-columns: minmax(0, 1fr); }
  .breakdown { grid-column: 1; grid-row: auto; margin-top: 24px; justify-content: flex-start; }
  .regions { flex-wrap: wrap; gap: 12px 6px; }
  .region { flex: 1 1 30% !important; }
  .lb-main { grid-template-columns: minmax(90px, 120px) minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
}

/* ── Small screens ─────────────────────── */
@media (max-width: 980px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero-copy { margin-top: 20px; width: 100%; padding: 0 var(--pad); background: none; }
  .hero { padding-bottom: min(84vw, 44svh); }
}
@media (max-width: 640px) {
  .brand-name, .nav-link { display: none; }
  .nav { padding-top: 16px; padding-bottom: 12px; }
  .recs { grid-template-columns: 1fr; gap: 24px; }
  .rec, .rec + .rec { border-left: 0; padding: 0; }
  .rec + .rec { border-top: 1px solid var(--line); padding-top: 24px; }
  .toolbar h2 { width: 100%; }
  .cta .btn { flex: 1 1 140px; }
  .lb-row { grid-template-columns: 26px 26px minmax(0, 1fr) auto; gap: 10px; padding: 10px 6px; }
  .search-inner { padding-left: 16px; }
  .search-inner input { font-size: 16px; }
  .search-inner #randomBtn { display: none; }
  .page-head, .page-sec { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
