/* ============================================================
   Compilator — shared stylesheet
   Visual language: dark warm canvas, large covers as the hero.
   Headings in Staatliches (matches the legacy nicolas.peltier1.free.fr site),
   body in DM Sans (humanist sans that pairs well with the tall display face).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Staatliches&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --bg: #0f0d0b;
  --bg-elev: #1a1714;
  --bg-elev-2: #251f1a;
  --ink: #f4ede2;
  --ink-dim: #b9ab98;
  --ink-faint: #6a5e4f;
  --line: #2c2620;
  --accent: #e6562e;
  --accent-soft: #f5a37e;
  --winter: #6fb0d6;
  --summer: #f0b656;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  --display: 'Staatliches', 'Oswald', 'Impact', sans-serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { color: var(--accent-soft); border-color: var(--accent); }

button, .btn {
  font: inherit;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 80ms ease, background 120ms ease;
}
button:hover, .btn:hover { background: var(--accent-soft); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-dim); background: transparent; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-soft); color: var(--bg); }
/* Liked-compilation toggle in the detail hero: tinted while active. */
.btn-ghost.active { color: var(--accent); border-color: var(--accent); background: rgba(255, 90, 75, 0.08); }
.btn-ghost.active:hover { color: var(--accent); border-color: var(--accent); }

input, select, textarea {
  font: inherit;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

/* -------- layout primitives -------- */
.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 48px 80px;
}
.shell-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* -------- top nav -------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}
.brand {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0.04em;
  border: none;
  text-transform: uppercase;
}
.brand:hover { color: var(--accent); }
/* -------- top-bar search -------- */
.topbar-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 460px;
  margin: 0 24px;
}
.topbar-search input {
  width: 100%;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 14px;
}
.topbar-search input::placeholder { color: var(--ink-faint); }
.topbar-search input:focus { outline: none; border-color: var(--ink-dim); background: var(--bg-elev-2); }
.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  padding: 6px;
}
.search-group + .search-group { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.search-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  padding: 8px 10px 4px;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.search-item:hover { background: var(--bg-elev); }
.search-item .si-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev-2);
  color: var(--ink-faint);
  font-family: var(--display);
  font-size: 14px;
}
.search-item .si-icon:has(.avatar) { background: transparent; }
.search-item .si-icon .avatar { width: 28px; height: 28px; line-height: 28px; }
.search-item .si-text { min-width: 0; display: flex; flex-direction: column; }
.search-item .si-title { font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item .si-sub { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 14px 12px; color: var(--ink-faint); font-size: 13px; }

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  border: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.nav-links a:hover { color: var(--ink); }
.nav-links .who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}
.nav-links a:hover .who { color: var(--ink); }

/* -------- notifications (nav badge + dropdown + toast) -------- */
.who-wrap { position: relative; display: inline-flex; align-items: center; }
.nav-links .who {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.nav-links .who:hover { background: transparent; color: var(--ink); }

.notif-badge {
  position: absolute;
  top: -6px;
  left: 14px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(92vw, 380px);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  padding: 6px;
}
.notif-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  padding: 8px 10px 4px;
}
.notif-empty { color: var(--ink-dim); font-style: italic; padding: 8px 10px 12px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
}
.notif-row + .notif-row { border-top: 1px solid var(--line); }
.notif-row.unread { border-left-color: var(--accent); background: rgba(230, 86, 46, 0.08); }
.notif-who { display: inline-flex; align-items: center; gap: 6px; border: none; }
.notif-emoji { font-size: 14px; }
.notif-txt { flex-basis: 100%; font-size: 12px; color: var(--ink-dim); }
.notif-track { color: var(--ink); font-style: italic; }
.notif-foot {
  display: block;
  border: none;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding: 10px;
  font-size: 12px;
  color: var(--ink-dim);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  z-index: 1500;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  background: var(--bg-elev-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast--in { opacity: 1; transform: translate(-50%, 0); }
.toast--clickable { cursor: pointer; }
.toast--clickable:hover { border-left-color: var(--accent-soft); }

/* -------- headings -------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
  text-transform: none;
}
h1 { font-size: 68px; line-height: 1.0; letter-spacing: 0.01em; }
h2 { font-size: 36px; }
h3 { font-size: 24px; letter-spacing: 0.04em; }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

/* -------- next-slot banner (home) -------- */
.next-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}
.next-banner .text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.next-banner .eyebrow { margin: 0; }
.next-banner .head {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.next-banner .sub { color: var(--ink-dim); font-size: 14px; }
.next-banner a.cta {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--display);
  letter-spacing: 0.05em;
  font-size: 15px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 100ms ease, background 120ms ease;
}
.next-banner a.cta:hover { background: var(--accent-soft); transform: translateY(-1px); }

/* Not started — urgent, accent border + subtle pulse on the CTA */
.next-banner.todo {
  background: linear-gradient(135deg, rgba(230, 86, 46, 0.18), rgba(230, 86, 46, 0.06));
  border-color: var(--accent);
}
.next-banner.todo .head { color: var(--ink); }
.next-banner.todo a.cta {
  background: var(--accent);
  color: var(--ink);
  animation: pulse-cta 2.4s ease-in-out infinite;
}
.next-banner.todo a.cta:hover { background: var(--accent-soft); color: var(--bg); }
@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 86, 46, 0.55); }
  50%      { box-shadow: 0 0 0 12px rgba(230, 86, 46, 0); }
}

/* Catch-up — deadline passed but still open; warm nudge, no urgent pulse */
.next-banner.late .eyebrow { color: var(--accent); }
.next-banner.todo.late {
  background: linear-gradient(135deg, rgba(230, 86, 46, 0.12), rgba(230, 86, 46, 0.04));
}
.next-banner.todo.late a.cta { animation: none; }

/* Work in progress — softer, info-only */
.next-banner.wip {
  background: var(--bg-elev);
  border-color: var(--summer);
}
.next-banner.wip .head { color: var(--summer); }
.next-banner.wip a.cta { background: var(--summer); color: var(--bg); }
.next-banner.wip a.cta:hover { background: var(--accent-soft); color: var(--bg); }

/* Published — calm confirmation */
.next-banner.done {
  background: var(--bg-elev);
  border-color: var(--line);
  padding: 16px 22px;
}
.next-banner.done .head { font-size: 20px; color: var(--ink-dim); }
.next-banner.done .head::before { content: '✓ '; color: var(--summer); }
.next-banner.done .sub { font-size: 13px; }
.next-banner.done a.cta {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 10px 18px;
  animation: none;
}
.next-banner.done a.cta:hover { color: var(--ink); border-color: var(--ink-dim); background: transparent; transform: none; }

@media (max-width: 720px) {
  .next-banner { flex-direction: column; align-items: flex-start; padding: 20px; }
  .next-banner .head { font-size: 24px; }
  .next-banner a.cta { width: 100%; text-align: center; }
}

/* -------- compilation grid -------- */
/* Inline season label — grid cell same width as a cover card, used on author pages */
.season-inline-label {
  display: flex;
  align-items: flex-end;
  padding-bottom: 14px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  align-self: end;
}
.season-inline-label.winter { color: var(--winter); }
.season-inline-label.winter::before { content: '❄ '; }
.season-inline-label.summer { color: var(--summer); }
.season-inline-label.summer::before { content: '☀ '; }

.season-block { margin-bottom: 64px; }
.season-block header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.season-block h2 { margin: 0; }
.season-block .count { color: var(--ink-faint); font-size: 13px; }
.season-block.winter h2::before { content: '❄ '; color: var(--winter); }
.season-block.summer h2::before { content: '☀ '; color: var(--summer); }

.cover-grid {
  display: grid;
  /* Track size scales by viewport via clamp; auto-fill keeps cards consistent
     and a sparsely-filled row reads as "this section has few items"
     rather than "the layout is broken". */
  grid-template-columns: repeat(auto-fill, clamp(200px, 22vw, 280px));
  justify-content: start;
  gap: clamp(20px, 2vw, 32px);
}
.cover-card {
  display: flex;
  flex-direction: column;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  color: var(--ink);
}
.cover-card a {
  border: none;
  color: inherit;
}
.cover-card .cover-card-art {
  display: block;
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cover-card .cover-card-art:hover { transform: translateY(-4px); }
.cover-card .cover-card-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-dim);
  font-style: italic;
  margin-top: 4px;
  border: none;
  width: max-content;
  max-width: 100%;
  padding: 2px 0;
}
.cover-card .cover-card-author:hover { color: var(--accent-soft); }
.cover-card .art {
  aspect-ratio: 1;
  background: var(--bg-elev);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.cover-card .art.placeholder {
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 56px;
  color: var(--ink-faint);
}
.cover-card .title {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin: 0 0 2px;
}
.cover-card .author {
  font-size: 13px;
  color: var(--ink-dim);
  font-style: italic;
}
/* "Unlike" heart on a liked-compilation card (profile view). */
.cover-card .lk-unlike {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 6px;
  background: transparent;
  border: none;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.cover-card .lk-unlike:hover { background: transparent; transform: scale(1.15); }

/* -------- compilation detail -------- */
.detail-hero {
  display: grid;
  /* Cover scales from ~200 to 320px depending on viewport, then collapses below. */
  grid-template-columns: minmax(0, clamp(220px, 28vw, 320px)) 1fr;
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: 48px;
}
.detail-hero .art {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--bg-elev) center/contain no-repeat;
  box-shadow: var(--shadow);
}
.detail-hero .meta { display: flex; flex-direction: column; justify-content: flex-end; }
.detail-hero h1 { margin-bottom: 8px; }
.detail-hero .by { font-size: 18px; color: var(--ink-dim); font-style: italic; }
.detail-hero .stats {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tracklist {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.tracklist li {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 100ms ease;
}
.tracklist li:hover { background: var(--bg-elev); }
.tracklist li.playing { background: var(--bg-elev-2); }
.tracklist li.playing .num { color: var(--accent); }
.tracklist .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  font-size: 13px;
}
.tracklist .title { font-family: var(--display); font-size: 19px; letter-spacing: 0.03em; }
.tracklist .artist { color: var(--ink-dim); font-size: 13px; font-style: italic; }
.tracklist .dur { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: 13px; }
.tracklist .tk-meta { min-width: 0; display: flex; align-items: flex-start; gap: 16px; }
.tracklist .tk-text { min-width: 0; flex: 0 1 48%; }
.tracklist .tk-doublons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  padding: 3px 0;                   /* room for the hover scale, since overflow-y is now clipped */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;            /* Firefox: hide track, still scrollable */
  -webkit-overflow-scrolling: touch;
  /* Fade the trailing edge so a clipped row reads as "scroll for more". */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
.tracklist .tk-doublons::-webkit-scrollbar { display: none; }  /* WebKit: hide track */
.doublon-chip { flex: 0 0 auto; text-decoration: none; border-radius: 5px; opacity: 0.85; transition: opacity 100ms ease, transform 100ms ease; }
.doublon-chip:hover { opacity: 1; transform: scale(1.05); }
.doublon-cover { width: 44px; height: 44px; border-radius: 5px; background-size: cover; background-position: center; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.doublon-cover.placeholder { font-weight: 600; }
.doublon-chip.same-track .doublon-cover { border: 2px solid var(--accent); color: var(--accent); }
.doublon-chip.same-artist .doublon-cover { border: 2px solid var(--ink-dim); color: var(--ink-dim); }

/* Discogs enrichment line under the artist (year · label · town, country + bio). */
.tracklist .tk-info { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 5px; font-size: 12px; color: var(--ink-faint); }
.tracklist .tk-facts { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tracklist .tk-discogs { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid transparent; }
.tracklist .tk-discogs:hover { color: var(--accent); border-bottom-color: var(--accent); }
.tracklist .tk-bio-toggle { background: none; border: none; padding: 0; font: inherit; color: var(--ink-faint); cursor: pointer; text-decoration: underline dotted; }
.tracklist .tk-bio-toggle:hover, .tracklist .tk-bio-toggle[aria-expanded="true"] { color: var(--accent); }
.tracklist .tk-bio { margin-top: 6px; max-width: 64ch; font-size: 12px; line-height: 1.55; color: var(--ink-dim); white-space: pre-line; }

/* -------- player bar -------- */
/* Minimal collapsed bar: [ cover + title/author ] ....... [ reactions · ▶ ].
   It floats over the page — detached from the edges with a small gap all round
   so content peeks past it — and the whole bar is the opener: click it (except
   the play button) to expand. Everything else lives in the expanded view. */
.player-bar {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  padding: 10px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  z-index: 100;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  max-width: 850px;
  margin: auto;
}
.player-bar[hidden],
.player-full[hidden] { display: none; }
.player-bar:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6); }
.player-bar:hover .now .t { color: var(--accent); }
.player-bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Reserve space so the floating player never covers content (bar height + gap). */
body.has-player { padding-bottom: 108px; }
.player-bar .pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-bar .pb-cover {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--bg) center/cover no-repeat;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 24px;
  color: var(--ink-faint);
}
.player-bar .pb-cover.placeholder {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-elev) 100%);
}
.player-bar .now { display: flex; flex-direction: column; min-width: 0; }
.player-bar .now .t { font-family: var(--display); font-size: 18px; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 120ms ease; }
.player-bar .now .a { color: var(--ink-dim); font-size: 12px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar input[type=range] { accent-color: var(--accent); }
.player-bar .pb-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.player-bar button.icon {
  background: transparent;
  color: var(--ink);
  padding: 6px 10px;
  font-size: 18px;
}
.player-bar button.icon:hover { color: var(--accent); background: transparent; }
/* Big, prominent play/pause — the bar's primary action. */
.player-bar .pb-bigplay { font-size: 30px; padding: 4px 10px; line-height: 1; }
.player-bar .pb-next { font-size: 22px; padding: 6px 8px; line-height: 1; }
/* Interactive reactions on the floating bar (chips + "+" picker). The control
   stops its own click propagation, so tapping a reaction doesn't expand the bar. */
.player-bar #pb-react .rx-strip { flex-wrap: nowrap; max-width: 220px; overflow: hidden; }
.player-bar .react { font-size: 20px; padding: 4px 6px; transition: transform 80ms ease, filter 120ms ease; filter: grayscale(0.4) opacity(0.6); }
.player-bar .react:hover { filter: none; transform: scale(1.1); }
.player-bar .react.active { filter: none; }

/* -------- compilation hero edit mode -------- */
.detail-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.detail-hero.edit-mode .meta input#edTitle {
  font-family: var(--display);
  font-size: 48px;
  letter-spacing: 0.01em;
  background: var(--bg-elev);
  border-color: var(--line);
  padding: 8px 12px;
  width: 100%;
}
.detail-hero.edit-mode .meta label { margin-bottom: 4px; }

/* -------- edit-mode track rows -------- */
.tracklist.edit li {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  cursor: default;
  position: relative;
}
.tracklist.edit li.deleted { opacity: 0.45; }
.tracklist.edit li.deleted .ed-fields input { text-decoration: line-through; }
.tracklist.edit li.dragging { opacity: 0.4; }
.tracklist.edit li.uploading { opacity: 0.7; }
.tracklist.edit li.uploading .grip { visibility: hidden; }
.tracklist.edit .grip { color: var(--ink-faint); cursor: grab; font-size: 14px; }
.tracklist.edit .ed-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; min-width: 0; }
.tracklist.edit .ed-fields input {
  font: inherit;
  padding: 6px 10px;
  font-size: 14px;
  background: var(--bg-elev);
}
/* Year · country · region editor, spanning under title/artist. */
.tracklist.edit .ed-meta { grid-column: 1 / -1; display: grid; grid-template-columns: 84px 1.6fr 1fr; gap: 8px; }
.tracklist.edit .ed-meta input, .tracklist.edit .ed-meta select {
  font: inherit; font-size: 13px; padding: 6px 8px; min-width: 0;
  background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
}
.tracklist.edit .ed-actions { display: flex; gap: 4px; align-items: center; }
.tracklist.edit .ed-actions button {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 14px;
  padding: 4px 8px;
  color: var(--ink-dim);
}
.tracklist.edit .ed-actions button:hover { color: var(--ink); border-color: var(--ink-dim); background: transparent; }
.tracklist.edit .ed-actions .ed-delete:hover { color: var(--accent); border-color: var(--accent); }
.tracklist.edit .ed-actions .ed-undo { font-size: 11px; margin-left: 6px; color: var(--ink-dim); border: none; }
.tracklist.edit .ed-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
}
.tracklist.edit .ed-progress > span {
  display: block; height: 100%; background: var(--accent);
  width: 0%; transition: width 200ms ease;
}

/* -------- inline track reactions (compilation page, view mode) -------- */

/* -------- emoji reaction control (track rows + player bar) -------- */
.rx { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.rx-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 8px; font-size: 13px; line-height: 1.4; cursor: help;
}
.rx-chip.mine { border-color: var(--accent); }
.rx-chip .rx-count { font-size: 11px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.rx-add {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  width: 24px; height: 24px; padding: 0; line-height: 1; font-size: 16px;
  color: var(--ink-dim); cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.rx-add:hover { color: var(--accent); border-color: var(--accent); background: transparent; }
.rx-add[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.rx-palette {
  position: absolute; top: 100%; left: 0; z-index: 30; margin-top: 6px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.rx-opt {
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  font-size: 20px; padding: 4px; line-height: 1; cursor: pointer;
  transition: transform 80ms ease, background 100ms ease;
}
.rx-opt:hover { background: var(--bg-elev-2); transform: scale(1.1); }
.rx-opt.applied { border-color: var(--accent); background: var(--bg-elev-2); }
.rx-tooltip {
  position: absolute; top: 100%; left: 0; z-index: 30; margin-top: 6px;
  max-width: 240px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px 10px; font-size: 12px; color: var(--ink-dim);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* compact variant for the player bar — palette opens upward */
.player-bar .rx { margin-top: 0; }
.player-bar .rx-strip { max-width: 200px; overflow: hidden; flex-wrap: nowrap; }
.player-bar .rx-palette,
.player-bar .rx-tooltip { top: auto; bottom: 100%; left: auto; right: 0; margin: 0 0 6px 0; }

/* -------- full-screen player -------- */
.player-full {
  position: fixed;
  inset: 0;
  z-index: 300; /* above bar (100) and search results (200) */
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
/* Setting display above overrides the `hidden` attribute's display:none, so
   restore it explicitly — otherwise the overlay shows by default. */
.player-full[hidden] { display: none; }
body.pf-open { overflow: hidden; }

.player-full .pf-min {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 28px;
  line-height: 1;
  background: transparent;
  color: var(--ink-dim);
  padding: 6px 12px;
  z-index: 2;
}
.player-full .pf-min:hover { color: var(--accent); background: transparent; }

.player-full .pf-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  line-height: 1;
  background: transparent;
  color: var(--ink-faint);
  padding: 8px 14px;
  z-index: 2;
}
.player-full .pf-arrow:hover { color: var(--accent); background: transparent; }
.player-full .pf-arrow-prev { left: 8px; }
.player-full .pf-arrow-next { right: 8px; }

.player-full .pf-viewport {
  flex: 1;
  width: 100%;
  max-width: 860px;
  overflow: hidden;
  display: flex;
}
.player-full .pf-track {
  display: flex;
  width: 200%;
  flex-shrink: 0; /* don't let the viewport squeeze the 200% track to fit — that
                     would pull the second screen into view beside the first */
  transition: transform 260ms ease;
}
.player-full .pf-screen {
  width: 50%;
  flex: 0 0 50%;
  box-sizing: border-box;
  padding: 44px 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.player-full .pf-cover {
  width: min(78vw, 46vh, 520px);
  height: min(78vw, 46vh, 520px);
  border-radius: var(--radius-lg);
  background: var(--bg-elev-2) center/cover no-repeat;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 128px;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.player-full .pf-cover.placeholder {
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
}
.player-full .pf-now { text-align: center; margin-top: 18px; max-width: 100%; }
.player-full .pf-title {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.03em;
  line-height: 1.1;
}
.player-full .pf-artist { color: var(--ink-dim); font-size: 15px; font-style: italic; margin-top: 6px; }
.player-full .pf-source { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; margin-top: 10px; }

.player-full .pf-react { margin-top: 14px; justify-content: center; }

.player-full .pf-controls {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
}
.player-full .pf-controls button.icon {
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  padding: 8px;
}
.player-full .pf-controls #pf-play { font-size: 40px; }
.player-full .pf-controls button.icon:hover { color: var(--accent); background: transparent; }

.player-full .pf-scrubrow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
}
.player-full .pf-scrubrow .scrub { flex: 1; }
.player-full .pf-scrubrow .scrub input[type=range] { width: 100%; padding: 0; height: 4px; }
.player-full .pf-scrubrow .time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-faint); }
.player-full .pf-volrow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  margin-top: 16px;
}
.player-full .pf-volrow input[type=range] { flex: 1; height: 4px; padding: 0; cursor: pointer; }
.player-full .pf-volrow #pf-mute { font-size: 20px; padding: 4px 6px; }
.player-full input[type=range] { accent-color: var(--accent); }
/* Utility actions (cast + stop) below the volume row in the expanded view. */
.player-full .pf-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-bottom: 8px; }
.player-full .pf-actions .icon { background: transparent; color: var(--ink); font-size: 20px; padding: 4px 8px; }
.player-full .pf-actions .icon:hover { color: var(--accent); background: transparent; }
.player-full .pf-actions #pf-cast.active { color: var(--accent); }

/* screen 2 — metadata */
/* auto block margins (not justify-content) so a short panel sits centred in the
   tall desktop screen, while a long one still scrolls from its top instead of
   having the overflow clipped. */
.player-full .pf-meta { width: 100%; max-width: 520px; margin: auto 0; }
.player-full .pf-meta-empty { color: var(--ink-faint); font-style: italic; text-align: center; margin-top: 40px; }
/* The detail screen renders .pfd (see "player: detail screen" below); the .tk-*
   enrichment line is the compilation page's inline variant. */

.player-full .pf-dots {
  display: flex;
  gap: 10px;
  padding: 16px 0 24px;
}
.player-full .pf-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--ink-faint);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 120ms ease, background 120ms ease;
}
.player-full .pf-dot.active { opacity: 1; background: var(--accent); }

/* -------- player: detail screen (artist + track) -------- */
.pfd { width: 100%; display: flex; flex-direction: column; gap: 26px; }
.pfd-block { display: flex; flex-direction: column; gap: 8px; }
.pfd-h {
  margin: 0; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-faint);
}
.pfd-name { font-size: 20px; font-weight: 600; color: var(--ink); }
/* Label column sized to the longest label ("Compilation") so the values line up. */
.pfd-rows {
  margin: 0; display: grid; grid-template-columns: minmax(0, 104px) 1fr;
  gap: 6px 14px; font-size: 14px;
}
.pfd-rows dt { color: var(--ink-faint); }
.pfd-rows dd { margin: 0; color: var(--ink-dim); min-width: 0; overflow-wrap: anywhere; }
.pfd-rows a { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid transparent; }
.pfd-rows a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pfd-bio {
  margin: 6px 0 0; font-size: 14px; line-height: 1.6;
  color: var(--ink-dim); white-space: pre-line;
}
.pfd .tk-doublons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }

/* -------- shuffle row (home) -------- */
.shuffle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.shuffle-btn {
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 80ms ease;
}
.shuffle-btn:hover { border-color: var(--accent); background: var(--bg-elev-2); }
.shuffle-btn:active { transform: translateY(1px); }

/* Per-season shuffle button in section headers */
.season-block header .season-shuffle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
  transition: border-color 120ms ease, color 120ms ease;
}
.season-block header .season-shuffle:hover { color: var(--accent); border-color: var(--accent); background: transparent; }

/* -------- saved filter presets (home shuffle row) -------- */
/* display:contents so each preset wrapper is itself a flex item of .shuffle-row. */
.saved-filters { display: contents; }
.saved-filter { position: relative; display: inline-flex; }
.save-btn { font-size: 16px; }
.saved-filter .sf-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease, border-color 120ms ease;
}
.saved-filter:hover .sf-del,
.saved-filter:focus-within .sf-del { opacity: 1; }
.saved-filter .sf-del:hover { color: var(--accent); border-color: var(--accent); }

/* -------- profile likes list -------- */
.likes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.likes-list li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.likes-list .lk-meta .title { font-family: var(--display); font-size: 17px; letter-spacing: 0.03em; }
.likes-list .lk-meta .artist { font-size: 12px; color: var(--ink-dim); font-style: italic; }
.likes-list .lk-play, .likes-list .lk-unlike {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  font-size: 16px;
}
.likes-list .lk-play:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.likes-list .lk-unlike:hover { background: transparent; }
/* Scrollable pane sized to show ~10 rows; the rest scroll. */
.likes-list.scroll { max-height: 600px; overflow-y: auto; }
.likes-list .lk-emojis { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.likes-list .lk-emo {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 80ms ease, border-color 100ms ease;
}
.likes-list .lk-emo:hover { border-color: var(--accent); background: transparent; transform: scale(1.1); }

/* -------- users admin list -------- */
.user-admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.user-admin-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.user-admin-row .ua-name { font-family: var(--display); font-size: 16px; letter-spacing: 0.03em; }
.user-admin-row .ua-email { font-size: 12px; color: var(--ink-dim); font-style: italic; }
.user-admin-row .ua-tag {
  display: inline-block;
  font-size: 10px;
  font-style: italic;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.user-admin-row .ua-actions { display: flex; gap: 8px; }
.user-admin-row .ua-actions .btn-ghost { padding: 6px 10px; font-size: 13px; }
.btn-ghost.danger { color: var(--accent); border-color: var(--accent); }
.btn-ghost.danger:hover { color: var(--accent); border-color: var(--accent); background: rgba(255, 90, 75, 0.08); }

/* -------- migrate page (formerly inline in migrate.html) -------- */
.zip-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bg-elev);
}
.zip-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.zip-card h4 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: 0.03em; }
.zip-card .filename { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.zip-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }

/* -------- upload page -------- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-dim);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: var(--bg-elev);
  color: var(--ink);
}
.dropzone .big { font-family: var(--display); font-size: 26px; letter-spacing: 0.03em; color: var(--ink); margin-bottom: 8px; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.section { margin-bottom: 40px; }
.section > h3 { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; }

.queue {
  list-style: none;
  padding: 0;
  margin: 0;
}
.queue li {
  display: grid;
  grid-template-columns: 24px 1fr 100px 80px;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.queue .grip { color: var(--ink-faint); cursor: grab; }
.queue li.dragging { opacity: 0.4; }
.queue .progress {
  height: 4px; background: var(--bg-elev); border-radius: 2px; overflow: hidden;
}
.queue .progress > span {
  display: block; height: 100%; background: var(--accent);
  width: 0%; transition: width 200ms ease;
}
.queue .status { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); text-align: right; }
.queue .status.ok { color: var(--summer); }
.queue .status.err { color: var(--accent); }
.queue .status.dup { color: var(--winter); }

/* -------- forms / login -------- */
.login-card {
  max-width: 380px;
  margin: 12vh auto 0;
  padding: 40px 32px;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: 56px; margin-bottom: 4px; letter-spacing: 0.04em; }
.login-card .tagline { color: var(--ink-dim); margin-bottom: 32px; font-style: italic; font-size: 14px; }
.login-card label { margin-top: 16px; }
.login-card button { width: 100%; margin-top: 24px; padding: 14px; }
.login-card .alt {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
}
.error {
  background: rgba(230, 86, 46, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent-soft);
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 13px;
}
.notice {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 12px;
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 13px;
}

/* -------- sticky collapsible filter bar -------- */
.filter-bar {
  position: sticky;
  /* Park just below the sticky top nav (height tracked in --topbar-h by app.js). */
  top: calc(var(--topbar-h, 72px) + 8px);
  z-index: 50;
  margin-bottom: 32px;
}
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-dim);
  cursor: pointer;
}
.filter-toggle:hover { color: var(--ink); border-color: var(--ink); }
.filter-caret { transition: transform 160ms ease; font-size: 10px; }
.filter-bar:not(.collapsed) .filter-caret { transform: rotate(180deg); }
.filter-body {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  /* Never exceed the viewport — scroll internally instead of overflowing
     the page (critical on phones with many authors/years). */
  max-height: calc(100vh - var(--topbar-h, 72px) - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.filter-bar.collapsed .filter-body { display: none; }
.filter-body .chip-row { margin-bottom: 0; }
.filter-body .chip-row:empty { display: none; }
/* Space between successive filter blocks (groups + inline rows). A hidden/empty
   block stays in source order, so the next visible block still picks up its
   top margin — robust whether or not a season/year block is present. */
.filter-body > * + *:not(:empty) { margin-top: 10px; }

/* Collapsible per-dimension groups (auteurs, années). Header shows the count,
   or the active selection count, and expands to the chip-row beneath it. */
.filter-group { border: 0; margin: 0; }
.filter-group[hidden] { display: none; }
/* Styled like a pressable pill (matching the outer .filter-toggle) so it reads
   as clickable, with a leading caret that rotates open. */
.filter-group-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  cursor: pointer;
  list-style: none;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.filter-group-head::-webkit-details-marker { display: none; }
.filter-group-head::before {
  content: '▾';
  font-size: 10px;
  transition: transform 160ms ease;
}
.filter-group[open] .filter-group-head::before { transform: rotate(180deg); }
.filter-group-head:hover { color: var(--ink); border-color: var(--ink); }
/* Active = a filter is applied on this dimension: fill it in like a chip. */
.filter-group.active .filter-group-head {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}
.filter-group[open] .chip-row { margin-top: 10px; }

/* -------- author / filter chips -------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip-row:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
}
.chip .avatar { margin-left: -4px; }
.chip:hover, .chip.active { color: var(--bg); background: var(--ink); border-color: var(--ink); }
/* Excluded (tri-state) chip: dashed outline with a 🚫 prefix. */
.chip.exc { color: var(--ink-faint); border-style: dashed; }
.chip.exc:hover { color: var(--bg); background: var(--ink-faint); border-color: var(--ink-faint); }

/* -------- emoji tag filter (home) -------- */
.emoji-filter-row { position: relative; display: flex; align-items: center; gap: 10px; }
.emoji-filter-label { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.emoji-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.emoji-chip { font-size: 15px; line-height: 1; padding: 4px 10px; }
.emoji-chip.dont { color: var(--ink-faint); border-style: dashed; }
.emoji-chip.dont:hover { color: var(--bg); }
.emoji-filter-sep { color: var(--ink-faint); font-size: 16px; padding: 0 2px; }
.rx-filter-add { font-size: 12px; color: var(--ink-dim); }

/* -------- responsive -------- */

/* Tablet / medium screens — slightly tighter padding. */
@media (max-width: 1024px) {
  .shell { padding: 24px 24px 80px; }
  h1 { font-size: 56px; }
}

/* Phone */
@media (max-width: 720px) {
  .shell { padding: 16px 16px 120px; }
  .shell-narrow { padding: 24px 16px 120px; }

  /* Top nav: brand on one row, links wrap below, drop the email. */
  .topbar {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 12px 16px;
  }
  .brand { font-size: 24px; }
  .nav-links {
    width: 100%;
    gap: 14px;
    flex-wrap: wrap;
    order: 2;
  }
  .nav-links a { font-size: 11px; letter-spacing: 0.1em; }
  /* Keep the avatar (and thus the profile link) on phones; drop the name only. */
  .nav-links .who-name { display: none; }
  /* Search drops to its own full-width row under the brand. */
  .topbar-search { order: 1; flex-basis: 100%; max-width: none; margin: 4px 0 0; }

  /* Headings */
  h1 { font-size: 40px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }

  /* Tighter cover grid — 2 fluid columns on phones */
  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .cover-card .title { font-size: 18px; }
  .cover-card .art.placeholder { font-size: 44px; }

  .season-block { margin-bottom: 40px; }

  /* Compilation detail: collapse to single column on phones, cap cover size. */
  .detail-hero { grid-template-columns: 1fr; gap: 20px; }
  .detail-hero .art { max-width: 260px; }
  .detail-hero .by { font-size: 16px; }
  .tracklist li { grid-template-columns: 28px 1fr auto auto; padding: 12px 4px; gap: 10px; }
  .tracklist .tk-yc { flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
  .tracklist .title { font-size: 17px; }

  /* Banner */
  .next-banner { padding: 18px; }
  .next-banner .head { font-size: 22px; }

  /* Form pages */
  .field-row { grid-template-columns: 1fr; gap: 12px; }
  .dropzone { padding: 28px 16px; }
  .dropzone .big { font-size: 20px; }

  /* Migration cards */
  .zip-meta { grid-template-columns: 1fr 1fr !important; }

  /* Minimal bar stays a single row on phones: cover + title on the left, a big
     play + expand on the right. Read-only reactions are dropped here to keep the
     tiny bar uncluttered — they're in the expanded view. */
  .player-bar {
    left: 8px; right: 8px; bottom: 8px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 14px;
  }
  .player-bar .pb-cover { width: 44px; height: 44px; font-size: 18px; }
  .player-bar .pb-left { gap: 8px; }
  .player-bar .now .t { font-size: 15px; }
  .player-bar .now .a { font-size: 11px; }
  .player-bar .pb-right { gap: 6px; }
  .player-bar #pb-react .rx-strip { max-width: 96px; }
  .player-bar .pb-bigplay { font-size: 28px; }
  body.has-player { padding-bottom: 88px; }

  /* full-screen player: swipe + dots drive navigation; hide edge arrows. */
  .player-full .pf-arrow { display: none; }
  .player-full .pf-screen { padding: 56px 20px 16px; }
  .player-full .pf-title { font-size: 24px; }
}

/* -------- avatars -------- */
.avatar {
  display: inline-block;
  background: var(--bg-elev) center/cover no-repeat;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
  text-align: center;
  font-family: var(--display);
  color: var(--ink-faint);
  line-height: 1;
}
.avatar.placeholder {
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
}
.avatar-xs { width: 18px; height: 18px; font-size: 10px; line-height: 18px; }
.avatar-sm { width: 24px; height: 24px; font-size: 12px; line-height: 24px; }
.avatar-md { width: 48px; height: 48px; font-size: 22px; line-height: 48px; }
.avatar-lg { width: 120px; height: 120px; font-size: 56px; line-height: 120px; }
.avatar-xl {
  width: 160px; height: 160px;
  font-size: 72px; line-height: 160px;
  box-shadow: var(--shadow);
}

/* -------- compilation hero "par X" link -------- */
.detail-hero .by .by-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}
.detail-hero .by .by-link:hover { color: var(--accent-soft); }

/* -------- profile-hero (author / profile pages) -------- */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.profile-hero h1 { margin: 4px 0; font-size: 56px; line-height: 1.05; }
.profile-hero .profile-stats {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.country-chip { gap: 7px; }
.country-shape {
  width: 30px;
  height: 20px;
  flex: 0 0 auto;
  overflow: visible;
}
.country-shape path {
  fill: var(--accent);
  stroke: var(--accent-soft);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 720px) {
  .profile-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .avatar-xl { width: 100px; height: 100px; font-size: 44px; line-height: 100px; }
  .profile-hero h1 { font-size: 40px; }
}

/* ---- world map (/map) ---- */
/* Wider than the default .shell so the choropleth gets real estate on desktop. */
.map-shell { max-width: 1440px; }
@media (min-width: 1024px) {
  .map-shell { max-width: 1800px; }
}
.map-sub { color: var(--ink-dim); font-size: 13px; margin: 4px 0 0; }
.map-wrap { position: relative; margin-top: 12px; }
.map-svg { width: 100%; height: auto; display: block; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.map-countries path { stroke: var(--bg); stroke-width: 0.4; cursor: pointer; transition: filter 100ms ease; }
.map-countries path:hover { filter: brightness(1.3); }
.map-countries path.sel { stroke: var(--ink); stroke-width: 1.3; }
.map-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ink-dim); }
.map-legend-label { text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-size: 10px; }
.map-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.map-legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
/* Decade slider under the map — one stop per decade (0 = all), each tick
   labelled with the decade's start year. Sliding filters the map by year. */
.map-decades { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.map-decade-caption { text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-size: 10px; white-space: nowrap; }
.decade-slider { flex: 1; max-width: 560px; display: flex; flex-direction: column; gap: 3px; }
.decade-slider input[type=range] { width: 100%; height: 4px; padding: 0; cursor: pointer; accent-color: var(--accent); }
.decade-ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.map-decade-label { font-family: var(--display); font-size: 18px; letter-spacing: 0.03em; min-width: 64px; text-align: right; color: var(--accent); }
.map-tip { position: fixed; z-index: 1200; pointer-events: none; background: var(--bg-elev-2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
.map-panel { margin-top: 24px; }
.map-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.map-panel-head h2 { font-family: var(--display); margin: 0; letter-spacing: 0.02em; }
.map-count { color: var(--accent); }
.map-panel-cols { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; margin-top: 12px; }
.map-authors h3, .map-songs h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin: 0 0 4px; }
.map-authors ol, .map-songs ol { list-style: none; margin: 0; padding: 0; }
.map-authors li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.map-authors .n { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.map-songs li { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.map-songs li:hover { background: var(--bg-elev); }
.map-songs .t { font-size: 14px; }
.map-songs .a { font-size: 12px; color: var(--ink-dim); font-style: italic; }
@media (max-width: 720px) {
  .map-panel-cols { grid-template-columns: 1fr; gap: 16px; }
}

/* ---- boot overlay ---- */
/* Covers the viewport while the shell loads; on failure it swaps to a
   retryable error with a copy-pasteable report string. */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.boot-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; max-width: 420px; }
.boot-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
.boot-msg { color: var(--ink-dim); font-size: 14px; letter-spacing: 0.04em; }
.boot-msg--error { color: var(--ink); font-family: var(--display); font-size: 22px; }
.boot-sub { color: var(--ink-dim); font-size: 14px; margin: 0; }
.boot-report {
  margin: 0;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-faint);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
  user-select: all;
}

/* ---- /validate (admin data validation) ---- */
.vld-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.vld-row {
  display: grid;
  grid-template-columns: 160px 1.4fr 1.2fr 70px 1fr 1fr auto auto;
  gap: 8px; align-items: center;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.vld-row.vld-done { opacity: 0.5; }
.vld-src { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vld-row input, .vld-row select {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; min-width: 0;
}
.vld-row .vld-miss { border-color: var(--accent); }
/* Uncertain country: the field looks filled in, so flag the row and its select
   with the softer accent — a doubt, not a hole like .vld-miss. */
.vld-row.vld-doubt { border-color: var(--accent-soft); }
.vld-row.vld-doubt select { border-color: var(--accent-soft); }
.vld-alts { grid-column: 1 / -1; font-size: 12px; color: var(--ink-dim); }
.vld-row .vld-save { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
.vld-status { font-size: 14px; min-width: 20px; color: var(--ink-dim); }
.vld-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; color: var(--ink-dim); font-size: 13px; }
@media (max-width: 900px) {
  .vld-row { grid-template-columns: 1fr 1fr; }
  .vld-src { grid-column: 1 / -1; }
}

/* -------- track year + artist country -------- */
.tracklist .tk-yc {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  min-width: 96px; font-size: 13px; color: var(--ink-dim); font-variant-numeric: tabular-nums;
}
.tracklist .tk-country { display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0.04em; white-space: nowrap; }
.tracklist .tk-flag { font-size: 15px; line-height: 1; }
@media (max-width: 640px) { .tracklist .tk-yc { min-width: 0; font-size: 12px; } }

/* Automatic proposals (year / country) the author hasn't confirmed yet. */
input.auto, select.auto,
.tracklist.edit .ed-meta .auto { font-style: italic; color: var(--accent-soft); border-style: dashed; }

.queue .q-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.queue .q-meta input, .queue .q-meta select { font-size: 12px; padding: 4px 8px; }
.queue .q-meta input { width: 72px; flex: none; }
.queue .q-meta select { width: auto; max-width: 220px; min-width: 0; }
.queue .q-auto-hint {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-soft);
  border: 1px dashed var(--accent-soft); border-radius: var(--radius); padding: 1px 5px; cursor: help;
}

/* -------- compilation description (rich text) -------- */
.rich { line-height: 1.65; overflow-wrap: anywhere; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 0.9em; }
.rich h3 { font-family: var(--display); font-size: 20px; letter-spacing: 0.04em; margin: 1.2em 0 0.4em; }
.rich ul, .rich ol { margin: 0 0 0.9em; padding-left: 1.4em; }
.rich blockquote { margin: 0 0 0.9em; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--ink-dim); font-style: italic; }
.rich a { color: var(--accent-soft); }
.comp-description { max-width: 72ch; margin: 8px 0 32px; color: var(--ink); }
.comp-description-edit { margin: 16px 0 24px; }

.rte { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.rte:focus-within { border-color: var(--accent); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); }
.rte-toolbar button {
  background: transparent; border: none; color: var(--ink-dim); font-size: 14px;
  min-width: 30px; padding: 4px 8px; border-radius: var(--radius); cursor: pointer;
}
.rte-toolbar button:hover { background: var(--bg-elev-2); color: var(--ink); }
.rte-body { min-height: 120px; max-height: 50vh; overflow-y: auto; padding: 12px; outline: none; }
.rte-body:empty::before { content: attr(data-placeholder); color: var(--ink-faint); pointer-events: none; }
