/* Sporting Grotesque by Lucas Le Bihan (Font Library: SIL Open Font License; the font's own notes say public domain).
   Latin only: Cyrillic text falls back to the system font, glyph by glyph. */
@font-face {
  font-family: "Sporting Grotesque";
  src: url("/fonts/sporting-grotesque-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sporting Grotesque";
  src: url("/fonts/sporting-grotesque-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Cyrillic companion: Unbounded (OFL, Google Fonts), self-hosted, Cyrillic subset only.
   Sporting Grotesque has no Cyrillic, so the browser takes these letters from here. */
@font-face {
  font-family: "YS Cyrillic";
  src: url("/fonts/unbounded-cyrillic.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  size-adjust: 90%;
}

/* ---------- tokens ---------- */

:root {
  --bg: #f7f6f3;
  --fg: #121211;
  --soft: #4a4a46;
  --muted: #6e6d67; /* 4.8:1 on --bg (was #8c8b85, 3.2:1) */
  --line: #e6e4de;
  --card: #ffffff;
  --accent: #121211;
  --accent-fg: #f7f6f3;
  --shadow: 0 1px 2px rgb(20 20 18 / .05), 0 8px 24px -12px rgb(20 20 18 / .18);
  --score-l: 44%;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Sporting Grotesque", "YS Cyrillic", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --c1: #8c8b85;
  --c2: #8c8b85;
  --c3: #8c8b85;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0d;
    --fg: #efeeea;
    --soft: #b9b8b2;
    --muted: #878680; /* 5.3:1 on --bg (was #7b7a74, 4.5:1) */
    --line: #262624;
    --card: #171716;
    --accent: #efeeea;
    --accent-fg: #0e0e0d;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7);
    --score-l: 64%;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e0d;
  --fg: #efeeea;
  --soft: #b9b8b2;
  --muted: #878680;
  --line: #262624;
  --card: #171716;
  --accent: #efeeea;
  --accent-fg: #0e0e0d;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7);
  --score-l: 64%;
}
/* the cover colors animate between pages */
@property --c1 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }
@property --c2 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }
@property --c3 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }
/* vivid colors taken from the cover for the rating bars (--bar*) and for frisson (--fr*); set in applyPalette */
@property --bar1 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }
@property --bar2 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }
@property --fr1 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }
@property --fr2 { syntax: "<color>"; inherits: true; initial-value: #8c8b85; }

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0 auto;
  max-width: 2200px;
  padding: 0 clamp(14px, 1.6vw, 32px);
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--c1) 35%, transparent); }
a { color: inherit; text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--c1) 70%, var(--fg)); outline-offset: 3px; border-radius: 6px; }
main { flex: 1; padding-bottom: 56px; }
#view {
  --bar1: var(--c1); --bar2: var(--c2); --fr1: var(--c1); --fr2: var(--c2);
  transition: --c1 .9s ease, --c2 .9s ease, --c3 .9s ease, --bar1 .9s ease, --bar2 .9s ease, --fr1 .9s ease, --fr2 .9s ease;
}

h1 { font-size: clamp(30px, 3.4vw, 52px); letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 6px; font-weight: 700; }
h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 12px;
}
h2 .muted { font-weight: 400; letter-spacing: .04em; }
.sub { color: var(--muted); margin: 0; font-size: clamp(15px, 1.2vw, 18px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.credit { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.credit a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }

/* ---------- header / footer ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.top::after {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(14px, 1.6vw, 32px));
  right: calc(-1 * clamp(14px, 1.6vw, 32px));
  bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: .7;
}
.logo { font-weight: 700; letter-spacing: -0.04em; font-size: 20px; display: inline-flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
nav { display: flex; gap: 18px; align-items: center; font-size: 14px; white-space: nowrap; }
nav a, nav button.link { color: var(--muted); }
nav a:hover, nav button.link:hover { color: var(--fg); text-decoration: none; }

/* header search, centered */
.top-search { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(560px, 50vw); }
.top-search input { width: 100%; height: 36px; padding: 6px 16px; border-radius: 999px; font-size: 14px; }
/* live results: the panel drops out of the search bar into the page, and the page makes room for it (pushAround in app.js) */
.top-drop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  opacity: 0;
  transform: translateY(-8px);
  /* unrolls downward from the search bar; the side and bottom margins leave room for the shadow */
  clip-path: inset(-60px -60px 100% -60px);
  transition: clip-path .5s var(--ease), opacity .2s ease, transform .5s var(--ease);
}
.top-drop.open { opacity: 1; transform: none; clip-path: inset(-60px -60px -60px -60px); }
@media (max-width: 600px) {
  /* on a phone the search sits in the row between logo and nav instead of floating over them (they overlapped at 375px) */
  .top-search { position: relative; top: auto; left: auto; transform: none; flex: 1; width: auto; min-width: 0; margin: 0 10px; }
  nav a { max-width: 26vw; overflow: hidden; text-overflow: ellipsis; }
  .top-search input { padding: 6px 12px; font-size: 13px; text-overflow: ellipsis; }
  .top-drop { left: 50%; right: auto; width: 88vw; translate: -50% 0; }
}
.top-results {
  overflow: hidden; /* app.js eases its height when the results change */
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.top-results ul { max-height: 60vh; overflow: auto; margin: 0; padding: 6px; list-style: none; }
.top-results a, .top-add, .top-ext { display: block; padding: 10px 14px; border-radius: 10px; color: inherit; font-size: 15px; }
.top-results a:hover, .top-add:hover, .top-ext:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); text-decoration: none; }
.top-add, .top-ext { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.top-none { padding: 10px 14px; font-size: 15px; }
/* result rows: cover on the left, title over artist · year */
.top-results a, .top-ext { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.top-results .cover { width: 44px; height: 44px; border-radius: 6px; }
.top-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.top-main strong, .top-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-main .muted { font-size: 13px; }
/* what the panel can push aside; translate (not transform) so it doesn't fight card entrances or the hover lift.
   The ease overshoots a touch, so a pushed element settles like it was bumped; --push-delay (set in app.js)
   makes each one move when the panel's edge reaches it. */
.hero h1 .w1 { display: inline-block; }
.hero .sub, .shelf h2 { width: fit-content; } /* their boxes hug the text, so empty box space doesn't get pushed */:root { --push-ease: cubic-bezier(.25, 1.15, .4, 1); }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .w1, .hero .sub, .hero-steps, .shelf h2, .card { transition: translate .6s var(--push-ease) var(--push-delay, 0s); }
  .top-results li.fresh { animation: step-in .32s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
}
.top-label { padding: 10px 14px 2px; font-size: 12px; color: var(--muted); }

.foot {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.foot a:hover { color: var(--fg); }

/* ---------- controls ---------- */

button, .btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 999px;
  padding: 9px 18px;
  transition: background .2s, color .2s, border-color .2s, transform .15s var(--spring), box-shadow .2s, opacity .2s;
}
button:not(:disabled):hover { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); transform: translateY(-1px); }
button:not(:disabled):active { transform: scale(.96); box-shadow: none; }
button:disabled { opacity: 0.4; cursor: default; }
button.big { font-size: 16px; padding: 13px 24px; }
button.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
button.ghost:hover { border-color: var(--fg); box-shadow: none; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); border-radius: 0; font-weight: 400; }
button.link:hover { color: var(--fg); box-shadow: none; transform: none; }
button.chip {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
}
button.chip:hover { color: var(--fg); border-color: color-mix(in srgb, var(--c1) 60%, var(--line)); box-shadow: none; transform: none; }
button.chip[aria-expanded="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

input, select, textarea {
  font: inherit;
  font-size: 15px;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--fg) 25%, var(--line)); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--c1) 60%, var(--fg));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 16%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: none; min-height: 72px; line-height: 1.45; }
/* iPhones zoom the whole page into any field with text under 16px when you tap it, so touch screens get 16px in fields */
@media (pointer: coarse) {
  input, select, textarea, .top-search input { font-size: 16px; }
  .top-search input::placeholder { font-size: 13px; }
  /* small targets get an invisible, finger-sized hit area around them (the look doesn't change) */
  nav a { padding-block: 10px; margin-block: -10px; }
}
label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; letter-spacing: .02em; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.error { color: #d9411e; font-size: 13px; min-height: 1.5em; margin: 8px 0 0; }

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: 2px;
}

/* ---------- covers ---------- */

.cover { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
div.cover-empty {
  --hue: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, hsl(var(--hue) 70% 62% / .9), transparent 60%),
    radial-gradient(110% 100% at 100% 100%, hsl(calc(var(--hue) + 50) 65% 48% / .85), transparent 65%),
    hsl(calc(var(--hue) + 20) 35% 80%);
  color: rgb(255 255 255 / .92);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
div.cover-empty span { font-size: 18px; text-shadow: 0 2px 12px rgb(0 0 0 / .18); }
.cover-lg { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }

/* ---------- empty states ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--muted);
  text-align: center;
}
.empty p { margin: 0; }
/* titles like "неуравновешеннолетниепесни" are one long word: let them break instead of pushing past the screen edge */
.results .main strong, .card-title, .diary-title, .profile h1, .artist-card h1 { overflow-wrap: anywhere; }
.empty .dead-end { font-size: 14px; color: var(--muted); }
.empty .dead-end button.link { font: inherit; }
.add-more { margin: 18px 0 0; }
.first-hint { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.first-hint button.link { font: inherit; }
.add-more button.link { font: inherit; font-size: 14px; }
.empty-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c1) 16%, var(--card));
  color: var(--fg);
  font-size: 18px;
  animation: float 3.5s ease-in-out infinite;
}

/* ---------- home ---------- */

.hero { padding: clamp(20px, 4vw, 56px) 0 clamp(12px, 2vw, 24px); }
.hero h1 { font-size: clamp(56px, 12.5vw, 176px); line-height: .9; letter-spacing: -0.06em; margin: 0 0 18px; text-wrap: balance; }
.hero .sub { max-width: 40ch; margin-bottom: 26px; }
/* first visit (guests only): how it works in three numbered steps */
.hero-steps { counter-reset: step; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: fit-content; max-width: 100%; margin: -12px 0 26px; font-size: 13px; color: var(--muted); }
.hero-steps span::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; border: 1px solid var(--line); color: var(--soft); font-size: 11px; font-weight: 600; }
.hero-steps a { color: var(--fg); } /* narrow enough to stay clear of the search panel on wide screens */
/* the word that opens search: a plain button that lifts and takes the accent on hover */
.hero-word {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-block;
  transition: color .25s, transform .35s var(--ease), translate .6s var(--push-ease) var(--push-delay, 0s);
}
.hero-word:hover, .hero-word:focus-visible { color: var(--c1, var(--fg)); transform: translateY(-.03em); text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .08em; }
.hero-word:focus-visible { outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) { .hero-word { transition: color .25s; } .hero-word:hover, .hero-word:focus-visible { transform: none; } }

/* covers drifting across the whole screen: decorative, never clickable, under all content */
.drift { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.drift-cover {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  opacity: .12;
  will-change: transform;
}
@media (max-width: 600px) { .drift-cover { opacity: .08; } }
.shelf { margin-top: clamp(28px, 4vw, 48px); }

/* ---------- release cards (home, artist, profile) ---------- */

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(168px, 42vw), 1fr));
  gap: clamp(16px, 2vw, 28px) clamp(12px, 1.6vw, 22px);
}
.card { display: flex; flex-direction: column; min-width: 0; animation: rise .5s var(--ease) both; }
.card:nth-child(2) { animation-delay: .03s; } .card:nth-child(3) { animation-delay: .06s; }
.card:nth-child(4) { animation-delay: .09s; } .card:nth-child(5) { animation-delay: .12s; }
.card:nth-child(6) { animation-delay: .15s; } .card:nth-child(n+7) { animation-delay: .18s; }
.card-link { display: flex; flex-direction: column; gap: 10px; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-art { position: relative; display: block; border-radius: 14px; }
.card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: var(--line);
  box-shadow: 0 1px 2px rgb(0 0 0 / .06);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
div.card-cover.cover-empty span { font-size: clamp(40px, 5vw, 64px); }
.card-link:hover .card-cover { transform: translateY(-4px) scale(1.01); box-shadow: 0 22px 40px -22px rgb(0 0 0 / .45); }
.card-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-link:hover .card-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta a:hover { color: var(--fg); }
.badge {
  --hue: 60;
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 38px;
  padding: 5px 9px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: hsl(var(--hue) 62% 42% / .92);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px -4px rgb(0 0 0 / .35);
}

/* ---------- release page ---------- */

.release {
  display: grid;
  grid-template-columns: minmax(260px, 3.6fr) minmax(0, 4fr) minmax(0, 4fr);
  gap: clamp(24px, 3vw, 52px);
  align-items: start;
  padding: clamp(20px, 2.2vw, 34px);
  border-radius: var(--r-lg);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(70% 70% at 0% 0%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%),
    radial-gradient(60% 60% at 100% 0%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%),
    radial-gradient(60% 60% at 50% 110%, color-mix(in srgb, var(--c3) 16%, transparent), transparent 75%),
    color-mix(in srgb, var(--card) 40%, transparent);
  border: 1px solid color-mix(in srgb, var(--c1) 14%, var(--line));
}
.release.no-tracks { grid-template-columns: minmax(260px, 3.6fr) minmax(0, 6fr); }
/* the album title fills the whole screen in diagonal rows, plain text in the site font and the cover's colors; rows drift in opposite directions */
.release-ribbon { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.rb-field {
  position: absolute; left: 50%; top: 50%; width: 240vmax;
  translate: -50% -50%; rotate: -14deg;
  font-size: clamp(32px, 4.5vw, 72px); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  color: color-mix(in srgb, color-mix(in srgb, var(--c1) 60%, var(--fg)) 5%, transparent);
}
/* two stacked layers, odd rows and even rows, interleaved by a one-row gap; each layer moves as one piece */
.rb-field { display: grid; }
.rb-layer { grid-area: 1 / 1; display: flex; flex-direction: column; row-gap: 1em; width: max-content; animation: rb-scroll 200s steps(6000) infinite; } /* steps: the text moves ~30 times a second instead of every vsync; at this crawl it looks the same */
.rb-layer.rb-b { padding-top: 1em; animation-direction: reverse; animation-delay: -80s; }
.rb-run { display: flex; white-space: nowrap; width: max-content; }
.rb-run:nth-child(3n+2) { translate: 2.5em 0; } /* static offsets so the rows don't line up; translate keeps the layer width, so the loop stays seamless */
.rb-run:nth-child(3n) { translate: 5em 0; }
.rb-run span { padding-right: 1.2em; }
@keyframes rb-scroll { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .rb-layer { animation: none; } }
/* wider air between the album block and the ratings */
.release-side { padding-right: clamp(0px, 1.2vw, 24px); display: flex; flex-direction: column; align-self: stretch; }
.release-side h1 { font-size: clamp(30px, 3vw, 52px); margin-top: 20px; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.release-side h1.long { font-size: clamp(26px, 2.3vw, 40px); line-height: 1.04; }
.release-side .artist { font-size: clamp(19px, 1.75vw, 27px); margin: 10px 0 0; line-height: 1.15; overflow-wrap: break-word; }
.release-side .rel-meta { font-size: 14px; margin: 6px 0 0; }
.release-side .artist a {
  font-weight: 700;
  background: linear-gradient(currentColor, currentColor) 0 84% / 0 1px no-repeat;
  transition: background-size .35s var(--ease);
}
.release-side .artist a:hover { text-decoration: none; background-size: 100% 1px; }
.release-side .links { margin-top: auto; padding-top: 22px; flex-wrap: nowrap; }
/* one row, always: platforms with a brand mark show just the mark (name is the tooltip) */
.release-side .links li { flex: none; }
.release-side .links .has-icon { padding: 9px; }
.release-side .links .has-icon .lk-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.release-side .links .has-icon .lk-icon { width: 22px; height: 22px; }

.cover-xl {
  display: block;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 30px 60px -26px color-mix(in srgb, var(--c1) 85%, transparent), 0 2px 6px rgb(0 0 0 / .08);
  transition: box-shadow .9s ease, transform .6s var(--ease);
  animation: cover-in .7s var(--ease) both;
}
.cover-xl:hover { transform: rotate(-1deg) scale(1.015); }
div.cover-xl.cover-empty span { font-size: 96px; }

.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c1) 55%, var(--line));
  background: color-mix(in srgb, var(--card) 55%, transparent);
  font-size: 15px;
  transition: background .25s, border-color .25s, transform .2s var(--spring);
}
.links a:hover { background: color-mix(in srgb, var(--c1) 22%, var(--card)); text-decoration: none; transform: translateY(-1px); }
.links .lk-icon { width: 18px; height: 18px; flex: none; }

/* score widget */
.score-widget {
  --score-hue: 0;
  position: relative;
  overflow: hidden;
  padding: 14px 18px 16px;
  margin-bottom: 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  box-shadow: var(--shadow);
  transition: border-color .4s;
}
.score-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 120% at 100% 0%, hsl(var(--score-hue) 70% 55% / .16), transparent 60%);
  opacity: 0;
  transition: opacity .5s, background .5s;
  pointer-events: none;
}
.score-widget.has-score::before { opacity: 1; }
.score-widget.has-score { border-color: hsl(var(--score-hue) 50% 55% / .35); }
.sw-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; position: relative; }
.sw-hint { font-size: 12px; position: absolute; top: 0; right: 0; white-space: nowrap; } /* out of the flow: hint text coming and going doesn't nudge the score */
.sw-num { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; position: relative; }
.sw-value {
  font-size: clamp(42px, 3.6vw, 58px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  transition: color .4s;
}
.has-score .sw-value { color: hsl(var(--score-hue) 60% var(--score-l)); }
.sw-of { font-size: 14px; color: var(--muted); }
.sw-avg { margin-left: auto; font-size: 12px; animation: step-in .3s var(--ease) both; }
.sw-bar { position: relative; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); overflow: hidden; margin-top: 12px; }
.sw-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(var(--score-hue) 65% 58%), hsl(var(--score-hue) 60% 45%));
  transition: width .45s var(--spring), background .4s;
}

/* parameters: one aligned row each (name · slider · weight · value) */
.params {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content minmax(80px, 1fr) 2.2ch;
  column-gap: 14px;
}
.params .param {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition: background .25s;
}
.params .param:last-child { border-bottom: 0; }
.params .param:hover { background: color-mix(in srgb, var(--c1) 10%, transparent); }
.params .p-head { display: contents; }
.params .p-name { order: 1; font-size: clamp(14px, 1.1vw, 16px); white-space: nowrap; }
.params .p-val { order: 3; font-weight: 700; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.p-val.bump { animation: bump .3s var(--spring); }

/* rating sliders: a plucked string. Faint fret dots mark the 10 values; the played part of the
   string glows in the cover's colors; the orb grows and glows brighter as the score goes up. */
.string {
  --level: .5;
  order: 2;
  position: relative;
  height: 30px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--fg) 22%, transparent) 1.2px, transparent 1.6px) 0 50% / 10% 100% repeat-x;
}
.string.dragging { cursor: grabbing; }
.string.locked { cursor: default; }
.s-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.s-back, .s-fill { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.s-back { stroke: color-mix(in srgb, var(--fg) 14%, transparent); stroke-width: 1.5; }
.s-fill { stroke-width: 3; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c1) calc(var(--level) * 90%), transparent)); transition: opacity .3s; }
.s-stop1 { stop-color: var(--bar1); }
.s-stop2 { stop-color: var(--bar2); }
.param.bonus .s-stop1 { stop-color: var(--fr1); }
.param.bonus .s-stop2 { stop-color: var(--fr2); }
.string.ringing .s-back { stroke: color-mix(in srgb, var(--c2) 45%, transparent); }
.s-orb {
  /* a guitar pick plucking the string, tip down, centred on the string */
  --x: 45%;
  --d: 0px;
  --size: calc(17px + var(--level) * 8px);
  position: absolute;
  left: var(--x);
  top: 50%;
  width: var(--size);
  height: calc(var(--size) * 26 / 24);
  margin: calc(var(--size) * -13 / 24) 0 0 calc(var(--size) / -2);
  transform: translateY(var(--d));
  transform-origin: 50% 0%;
  transition: width .3s var(--spring), height .3s var(--spring), margin .3s var(--spring);
  pointer-events: none;
}
.s-note { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 1.5px color-mix(in srgb, var(--bg) 90%, transparent)) drop-shadow(0 3px calc(3px + var(--level) * 8px) color-mix(in srgb, var(--c1) calc(30% + var(--level) * 60%), transparent)); transition: filter .3s; }
.s-note-body { transition: fill .3s; }
.s-note-shine { fill: #fff; opacity: .55; }
.s-pick-ring { fill: none; stroke: #fff; stroke-opacity: .22; stroke-width: .8; }
.string.unset .s-pick-ring { stroke: color-mix(in srgb, var(--fg) 18%, transparent); stroke-opacity: 1; }
.string.ringing .s-orb { animation: note-sway .5s ease-in-out infinite alternate; }
@keyframes note-sway { from { rotate: -9deg; } to { rotate: 9deg; } }
.string:not(.locked):hover .s-orb { --size: calc(21px + var(--level) * 8px); }
.string.dragging .s-orb { --size: calc(25px + var(--level) * 8px); }
.string.unset .s-fill { opacity: 0; }
.string.unset .s-note-body { fill: var(--card); stroke: color-mix(in srgb, var(--fg) 35%, transparent); stroke-width: 1.2; }
.string.unset .s-note-shine { opacity: 0; }
.string.unset .s-orb { animation: orb-hint 2.6s steps(20) infinite; } /* ~30 updates a second, the sine shape is in the keyframes */
.string.unset:hover .s-orb { animation: none; }
@keyframes orb-hint { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-1.5px); } 50% { transform: translateY(-3px); } 75% { transform: translateY(-1.5px); } }
/* the real range input: invisible, but still there for keyboard and screen readers */
.string input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
/* keyboard focus: a ring that follows the orb's shape (the old square outline looked like a plastic frame) */
.string:has(input:focus-visible) .s-note { outline: none; }
.string:has(input:focus-visible) .s-note-body { stroke: var(--fg); stroke-width: 1.6; stroke-linejoin: round; }

/* tracklist */
.tracks { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.track { border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); animation: rise .4s var(--ease) both; }
.track:last-child { border-bottom: 0; }
/* TRACK_TOPS_V1 */
/* track row: the clickable line (opens lyrics) plus the top button */
.track-row { position: relative; isolation: isolate; display: flex; align-items: center; gap: 4px; margin: 0 -8px; border-radius: 10px; }
/* soft highlight: an even, faint cover-colored wash over the whole row; fades in, and out a little slower */
.track-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, color-mix(in srgb, var(--c1) 55%, var(--fg)) 10%, transparent);
  opacity: 0;
  transition: opacity .6s ease;
}
.track-row:hover::before { opacity: 1; transition-duration: .3s; }
.track-row:has(.track-line[aria-expanded="true"])::before { opacity: 1; background: color-mix(in srgb, color-mix(in srgb, var(--c1) 55%, var(--fg)) 14%, transparent); }
button.track-line {
  all: unset;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 4px 7px 8px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.tracks button.track-line:not(:disabled):hover { transform: none; box-shadow: none; }
.tracks button.track-line:focus-visible { outline: 2px solid color-mix(in srgb, var(--c1) 70%, var(--fg)); outline-offset: -2px; }
.track-line[aria-expanded="true"] .t-title { font-weight: 700; }
/* the lyrics slide open by animating the row height from 0fr to 1fr */
.lyrics-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.lyrics-wrap.open { grid-template-rows: 1fr; }
.lyrics-clip { overflow: hidden; min-height: 0; }
.lyrics-wrap .lyrics { opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .45s var(--ease); }
.lyrics-wrap.open .lyrics { opacity: 1; transform: none; transition-delay: .08s; }
/* top button: star outline → filled star (top) → crown (best on the album) */
.tracks button.t-top {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: 46px;
  justify-content: center;
  height: 26px;
  padding: 0 7px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s var(--spring);
}
.tracks button.t-top:disabled { cursor: default; }
.tracks button.t-top:not(:disabled):hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.tracks button.t-top:focus-visible { outline: 2px solid color-mix(in srgb, var(--c1) 70%, var(--fg)); outline-offset: 1px; }
.t-top-icon::before { content: "+"; font-size: 20px; font-weight: 600; line-height: 1; }
.tracks button.t-top.fav { color: #e8364f; }
.tracks button.t-top.fav:not(:disabled):hover { color: #e8364f; }
.t-top.fav .t-top-icon::before { content: "+"; }
.t-top-n { font-variant-numeric: tabular-nums; font-weight: 700; }
.t-top.pressed { transform: scale(.88); }
.t-top.pop { animation: bump .35s var(--spring); }
/* both row buttons show up only on hover (a marked star stays, so you can see your pick) */
.tracks button.t-top { opacity: 0; transition: opacity .2s, color .2s, background .2s, transform .2s var(--spring); }
.track-row:hover button.t-top, .tracks button.t-top:focus-visible, .tracks button.t-top.fav { opacity: 1; }
@media (hover: none) { .tracks button.t-top { opacity: 1; } }
@media (pointer: coarse) { /* the star keeps its size but takes taps from the whole row height around it */
  .tracks button.t-top { position: relative; }
  .tracks button.t-top::after { content: ""; position: absolute; inset: -9px -4px; }
}
.track.has-best .t-no { color: #e8364f; }
/* most-liked tracks glow stronger: --heat is 0..1 relative to the album's top track */
.track.has-best .track-row { background: color-mix(in srgb, #e8364f calc(var(--heat, 0) * 16%), transparent); transition: background .4s ease; }
.track.has-best .track-row:has(.track-line[aria-expanded="true"]) { background: color-mix(in srgb, #e8364f calc(var(--heat, 0) * 16%), transparent); }
.track[data-heat="1.00"] .t-title { font-weight: 700; }
.t-no { font-family: var(--mono); color: var(--muted); width: 1.6em; font-size: 11px; text-align: right; flex: none; }
.t-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-len { font-variant-numeric: tabular-nums; font-size: 12px; }
.lyrics { margin: 4px 0 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--card) 85%, transparent); }
.lrc { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; font-size: 14px; scrollbar-width: thin; }
.lrc li { padding: 3px 0; }
.lrc .ts { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-right: 12px; }
.plain { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 0; max-height: 240px; overflow: auto; }

/* comments */
.comments { margin-top: clamp(28px, 3vw, 44px); max-width: 760px; }
.c-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  transition: border-color .2s, box-shadow .2s;
}
.c-form:focus-within { border-color: color-mix(in srgb, var(--c1) 60%, var(--fg)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 14%, transparent); }
.c-form textarea { border: 0; background: transparent; padding: 6px 8px; min-height: 44px; max-height: 240px; overflow-y: auto; box-shadow: none; }
.c-form textarea:focus { box-shadow: none; }
.c-list { list-style: none; margin: 0; padding: 0; }
.comment {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.comment.is-review { border-left: 3px solid var(--c1); }
.c-tag { color: var(--c1); font-weight: 600; }
.comment.fresh { animation: rise .45s var(--spring); }
.comment .avatar { grid-row: span 2; }
.c-head { display: flex; gap: 10px; align-items: baseline; }
.c-user { font-weight: 700; }
.c-del { margin-left: auto; opacity: 0; transition: opacity .2s; }
.comment:hover .c-del, .c-del:focus-visible { opacity: 1; }
@media (hover: none) { .c-del { opacity: 1; } }
.c-body { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; color: var(--soft); }

.avatar {
  --hue: 200;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--hue) 65% 60%), hsl(calc(var(--hue) + 45) 60% 45%));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.avatar-xl { width: 72px; height: 72px; font-size: 30px; }

/* ---------- artist page ---------- */

.artist-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: clamp(24px, 3vw, 44px);
  margin-bottom: clamp(28px, 3vw, 44px);
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--c1) 14%, var(--line));
  background:
    radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, color-mix(in srgb, var(--c2) 24%, transparent), transparent 70%),
    color-mix(in srgb, var(--card) 50%, transparent);
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
.artist-card h1 { font-size: clamp(44px, 7vw, 108px); line-height: .92; letter-spacing: -0.05em; margin: 0; }
.ac-facts { font-size: clamp(15px, 1.2vw, 18px); margin: 14px 0 0; color: var(--soft); }
.ac-genres { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.ac-genres .tag { margin: 0; font-size: 11px; padding: 4px 10px; background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--soft); }
.artist-card .links { margin-top: 18px; }
.ac-stats { display: flex; gap: clamp(18px, 2.4vw, 36px); margin: 0; }
.ac-stats div { text-align: right; }
.ac-stats dt { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.ac-stats dd { margin: 4px 0 0; font-size: clamp(30px, 3vw, 48px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.artist-page .credit { margin-top: 28px; }

/* ---------- profile ---------- */

.profile { display: flex; align-items: center; gap: 20px; padding: clamp(16px, 3vw, 40px) 0 8px; }
.profile h1 { margin: 0; }
.profile .sub button.link { font: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* taste radar */
.taste {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(16px, 2vw, 28px);
  padding: clamp(20px, 3vw, 44px);
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--c1) 14%, var(--line));
  background:
    radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--c1) 28%, transparent), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%),
    color-mix(in srgb, var(--card) 50%, transparent);
}
.taste .eyebrow { margin-top: 0; }
.taste-side .eyebrow { margin-top: 26px; }
.taste-side .eyebrow:first-child, .taste-stats + .eyebrow { margin-top: 28px; }
.radar { display: block; width: 100%; height: auto; overflow: visible; }
.r-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.r-ring:last-of-type { stroke: color-mix(in srgb, var(--fg) 22%, var(--line)); }
.r-axis { stroke: var(--line); stroke-width: 1; }
.r-shape { transform-origin: 230px 175px; transform: scale(.001); opacity: 0; transition: transform 1s var(--spring), opacity .5s ease; }
.taste.in .r-shape { transform: none; opacity: 1; }
.r-area { fill: color-mix(in srgb, var(--c1) 38%, transparent); stroke: var(--c1); stroke-width: 2.5; stroke-linejoin: round; }
.r-dot { fill: var(--card); stroke: var(--c1); stroke-width: 2.5; cursor: default; transition: r .2s var(--ease); }
.r-dot:hover { r: 7; }
.r-label { font-size: 13px; font-weight: 600; fill: var(--soft); }
.r-val { font-size: 17px; font-weight: 700; fill: var(--fg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.taste-note { margin: 6px 0 0; color: var(--soft); font-size: 14px; }
.taste-note b { color: var(--fg); }
.taste-stats { justify-content: flex-start; }
.taste-stats div { text-align: left; }
.dist { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.dist-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px; min-width: 0; }
.dist-bar {
  display: block;
  min-height: 3px;
  height: calc(var(--h, 0) * .8%);
  border-radius: 6px 6px 3px 3px;
  background: color-mix(in srgb, var(--c1) 70%, var(--fg));
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform .8s var(--ease);
}
.taste.in .dist-bar { transform: none; }
.dist-col:nth-child(2) .dist-bar { transition-delay: .04s; } .dist-col:nth-child(3) .dist-bar { transition-delay: .08s; }
.dist-col:nth-child(4) .dist-bar { transition-delay: .12s; } .dist-col:nth-child(5) .dist-bar { transition-delay: .16s; }
.dist-col:nth-child(6) .dist-bar { transition-delay: .2s; } .dist-col:nth-child(7) .dist-bar { transition-delay: .24s; }
.dist-col:nth-child(8) .dist-bar { transition-delay: .28s; } .dist-col:nth-child(9) .dist-bar { transition-delay: .32s; }
.dist-col:nth-child(10) .dist-bar { transition-delay: .36s; }
.dist-x { font-size: 10px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.fav-artists { list-style: none; margin: 0; padding: 0; }
.fav-artists li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.fav-artists li:last-child { border-bottom: 0; }
.fav-artists a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fav-artists span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
/* lists: profile cards, the list page, the "В список" menu on a release */
.list-card { display: flex; flex-direction: column; min-width: 0; }
.list-card-link { display: flex; flex-direction: column; gap: 10px; color: inherit; }
.list-card-link:hover { text-decoration: none; }
.list-card-link:hover .list-stack { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgb(0 0 0 / .45); }
.list-card-link:hover .card-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.list-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--line);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.list-stack > :only-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.list-thumb { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--line); }
.list-head { padding: clamp(16px, 3vw, 36px) 0 4px; }
.list-head h1 { margin: 4px 0 0; }
.list-tools { display: flex; gap: 18px; margin: 10px 0 0; }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--fg); }
.list-items { list-style: none; margin: 18px 0 0; padding: 0; }
.list-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-pos { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.list-item-link { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; }
.list-item-link:hover { text-decoration: none; }
.list-item-link:hover .diary-title { text-decoration: underline; text-underline-offset: 3px; }
.list-item-text { display: block; min-width: 0; }
.list-move { display: flex; gap: 4px; }
.list-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.list-btn:hover:not(:disabled) { color: var(--fg); border-color: var(--muted); }
.list-btn:disabled { opacity: .35; cursor: default; }
.list-slot { margin-top: 18px; }
.list-slot:empty { display: none; }
.list-menu summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--soft); list-style: none; }
.list-menu summary:hover { color: var(--fg); }
.list-menu-items { list-style: none; margin: 12px 0 0; padding: 0; }
.list-menu-items li { padding: 6px 0; }
.list-menu-items label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.list-menu-items small { color: var(--muted); font-variant-numeric: tabular-nums; }
.list-new { display: flex; gap: 8px; margin-top: 10px; }
.list-new input { min-width: 0; flex: 1; }

/* rating diary: one row per scored release, grouped by month */
.diary-month { margin-top: 26px; }
.diary-month .eyebrow { margin-top: 0; }
.diary-list { list-style: none; margin: 0; padding: 0; }
.diary-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.diary-item:last-child { border-bottom: 0; }
.diary-body { min-width: 0; }
.diary-cover { display: block; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line); }
.diary-cover.cover-empty { display: flex; align-items: center; justify-content: center; }
.diary-title { display: block; font-weight: 700; letter-spacing: -0.01em; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.diary-artist { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-artist:hover { color: var(--fg); }
.diary-review { margin: 8px 0 0; color: var(--soft); font-size: 14px; line-height: 1.5; }
.diary-score {
  --hue: 60;
  min-width: 38px;
  padding: 5px 9px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: hsl(var(--hue) 62% 42% / .92);
}
.diary-day { min-width: 22px; padding-top: 6px; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .taste { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .r-shape, .dist-bar { transition: none; transform: none; opacity: 1; }
}

/* ---------- auth / about ---------- */

#auth { max-width: 380px; margin-top: 20px; }
.prose { max-width: 62ch; padding-top: clamp(16px, 3vw, 40px); }
.prose p { color: var(--soft); line-height: 1.65; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

/* ---------- add dialog ---------- */

dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  color: var(--fg);
  padding: 26px 22px 20px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  box-shadow: 0 40px 100px -30px rgb(0 0 0 / .45);
}
dialog::backdrop { background: rgb(10 10 9 / .38); backdrop-filter: blur(6px); }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.dialog-close button { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 6px 10px; font-weight: 400; }
.dialog-close button:hover { color: var(--fg); box-shadow: none; transform: rotate(90deg); }
dialog h3 { margin: 0 0 14px; font-size: 20px; letter-spacing: -0.03em; }
#q { font-size: 17px; padding: 13px 15px; }

.results { list-style: none; margin: 8px 0 0; padding: 0; }
.results li { animation: rise .3s var(--ease) both; }
.results li button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s;
}
.results li button:hover, .results li button:focus-visible { background: var(--card); box-shadow: var(--shadow); }
.results .main { flex: 1; min-width: 0; }
.results .main strong { font-weight: 700; }
.results .meta { color: var(--muted); font-size: 13px; }
.results .new { color: var(--muted); padding: 12px; }
.results .new strong { color: var(--fg); }
.results .label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); padding: 14px 10px 4px; }
.picked { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

/* ---------- motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cover-in { from { opacity: 0; transform: scale(.94) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
#view.enter { animation: rise .45s var(--ease) both; }
dialog[open] { animation: pop .3s var(--spring) both; }

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

/* medium screens: tracklist drops under, two columns */
@media (max-width: 1200px) {
  .release { grid-template-columns: minmax(240px, 2fr) minmax(0, 3fr); }
  .release-tracks { grid-column: 1 / -1; }
  .release-tracks .tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 40px; }
}
@media (max-width: 860px) {
  .release { grid-template-columns: 1fr; margin: 0 -8px; padding: 20px 16px; border-radius: 22px; }
  .release-side { display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; align-items: end; padding-right: 0; }
  .release-side .cover-xl { grid-row: span 3; }
  .release-side h1 { margin-top: 0; font-size: 28px; }
  .release-side h1.long { margin-top: 0; font-size: 23px; }
  .release-side .artist { font-size: 19px; }
  .release-side .links { grid-column: 1 / -1; }
  div.cover-xl.cover-empty span { font-size: 48px; }
  .release-tracks .tracks { grid-template-columns: 1fr; }
  .artist-card { grid-template-columns: 1fr; gap: 22px; }
  .ac-stats div { text-align: left; }
}
@media (max-width: 560px) {
  .params { grid-template-columns: minmax(0, 1fr) 2.2ch; row-gap: 0; }
  .params .p-name { order: 1; white-space: normal; }
  .params .p-val { order: 2; }
  .params .string { order: 4; grid-column: 1 / -1; height: 34px; }
  .c-form { grid-template-columns: 1fr; }
  .c-form button { justify-self: end; }
  nav { gap: 12px; font-size: 13px; }
  nav button { padding: 7px 13px; font-size: 13px; }
  .logo { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Cover up close */
img.cover-xl { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #000 80%, transparent);
  backdrop-filter: blur(14px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .35s ease;
}
.lightbox.open { opacity: 1; }
.lightbox img {
  width: min(92vw, 92vh, 1200px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 40px 100px -30px rgb(0 0 0 / .8);
  transform: scale(.9);
  transition: transform .5s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lb-card { position: relative; will-change: transform; transform-style: preserve-3d; }
.lb-card img { display: block; }
.lb-glare { position: absolute; inset: 0; border-radius: 14px; pointer-events: none; opacity: 0; transition: opacity .3s ease; mix-blend-mode: soft-light; }

/* ---------- spotify player in the tracklist column (replaces our list when there is a match) ---------- */
.player iframe { display: block; width: 100%; border: 0; border-radius: 12px; color-scheme: normal; }
.player .pl-ratio { aspect-ratio: 16 / 9; height: auto; }
/* the YouTube player sits above our tracklist, which stays (click a track for its card) */
.release-tracks.has-player .player { margin-bottom: 18px; }
.release-tracks.has-player .yt-add { margin-bottom: 18px; }
.pl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pl-tab {
  font: inherit; font-size: 13px; padding: 5px 14px; border-radius: 999px; cursor: pointer;
  color: inherit; background: transparent; border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.pl-tab:hover { border-color: color-mix(in srgb, var(--c1) 50%, var(--line)); }
.pl-tab[aria-pressed="true"] { background: color-mix(in srgb, var(--c1) 18%, transparent); border-color: color-mix(in srgb, var(--c1) 55%, var(--line)); font-weight: 700; }

/* ---------- track card: takes the ratings column's place, album stays on screen ---------- */
.track-pane[hidden], .rate-pane[hidden] { display: none; }
.track-pane {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 6px;
}
.track-pane.entering, .rate-pane.entering { animation: pane-in .38s var(--ease) both; }
.track-pane.leaving { animation: pane-out .22s ease both; }
@keyframes pane-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes pane-out { to { opacity: 0; transform: translateX(-10px); } }
.tp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.tp-back { font-size: 14px; color: var(--muted); }
.tp-back:hover { color: var(--fg); }
.tp-nav { display: flex; gap: 6px; flex: none; }
.tp-nav .chip { font-size: 14px; padding: 4px 12px; }
.track-pane .eyebrow { margin-bottom: 6px; }
.tp-title {
  all: unset;
  display: block;
  font-size: clamp(28px, 2.8vw, 44px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.tp-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.tp-actions button.t-top { opacity: 1; width: auto; min-width: 46px; height: 34px; padding: 0 12px; border: 1px solid var(--line); }
.tp-actions .t-top-icon::before { font-size: 18px; }
.tp-lyrics { margin-top: 18px; }
.tp-lyrics .lrc, .tp-lyrics .plain { max-height: none; overflow: visible; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; }
.tp-lyrics .lrc li { padding: 3px 0; }
.tp-lyrics .lrc .ts { font-size: 11px; vertical-align: 3px; opacity: .7; }
.tp-lyrics .credit { margin-top: 20px; }
/* the open track stays lit in the list */
.track.active .track-row::before { opacity: 1; background: color-mix(in srgb, color-mix(in srgb, var(--c1) 55%, var(--fg)) 16%, transparent); }
.track.active .t-title { font-weight: 700; }
@media (max-width: 860px) {
  .track-pane { position: static; max-height: none; overflow: visible; padding-right: 0; scroll-margin-top: 80px; }
}

/* ---------- compact spotify player on the artist page ---------- */
.artist-player { margin: 8px 0 28px; max-width: 640px; }
.artist-player[hidden] { display: none; }
.artist-player iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; color-scheme: normal; }

/* ---------- paste a YouTube link when none was found ---------- */
.yt-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.yt-add input { flex: 1 1 200px; min-width: 0; font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; }
.yt-add button { font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: inherit; }
.yt-add button:disabled { opacity: .5; cursor: default; }
.yt-add p { flex-basis: 100%; margin: 0; }

/* genius link instead of lyrics */
.tp-lyrics .genius { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

/* review under the ratings */
.review { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.review label { font-size: 13px; color: var(--muted); }
.review textarea { font: inherit; font-size: 15px; line-height: 1.5; resize: none; overflow: hidden; min-height: 84px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: inherit; }
.review-publish { align-self: flex-start; font: inherit; font-size: 16px; font-weight: 600; padding: 13px 26px; border-radius: 999px; border: 0; background: var(--c1); color: #fff; cursor: pointer; box-shadow: 0 6px 20px color-mix(in srgb, var(--c1) 40%, transparent); transition: opacity .14s, transform .2s, font-size .25s, padding .25s, background .25s, box-shadow .25s, filter .2s; }
.review-publish:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.review-publish:disabled { opacity: .75; cursor: default; box-shadow: none; }
.review-publish { display: inline-grid; position: relative; overflow: hidden; min-width: 260px; justify-items: center; }
.review-publish .lbl { grid-area: 1 / 1; transition: transform .3s ease, opacity .25s ease; }
.review-publish .lbl.out { transform: translateY(-30%); opacity: 0; }
.review-publish .lbl.in { transform: translateY(30%); opacity: 0; }
.review-publish.done { background: hsl(145 45% 42%); box-shadow: 0 6px 20px hsl(145 45% 42% / .35); }
@media (prefers-reduced-motion: reduce) { .review-publish, .review-publish .lbl { animation: none !important; transition: none; } }
.review-publish[hidden] { display: none; }

/* Pen signature: a paper-like pad with a baseline; it shakes when you try to publish unsigned. */
.sign { position: relative; max-width: 420px; }
.sign[hidden] { display: none; }
.sign-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.sign canvas { display: block; width: 100%; aspect-ratio: 400 / 120; border: 1px dashed var(--line); border-radius: 12px; background: var(--card); color: var(--fg); cursor: crosshair; touch-action: none; transition: border-color .2s, box-shadow .2s; }
.sign canvas:hover { border-color: color-mix(in srgb, var(--c1) 45%, var(--line)); }
.sign-line { position: absolute; left: 18px; right: 18px; bottom: 16px; padding-top: 2px; border-top: 1px solid var(--line); pointer-events: none; transition: opacity .25s; }
.sign.signed .sign-line { opacity: .35; }
.sign.want canvas { border-color: var(--c1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 18%, transparent); animation: sign-shake .4s; }
@keyframes sign-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .sign.want canvas { animation: none; } }
.c-sign { grid-column: 2; display: block; width: 160px; height: 48px; margin-top: 6px; color: var(--fg); }
.c-sign path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.review textarea:focus { outline: none; border-color: color-mix(in srgb, var(--c1) 55%, var(--line)); }

/* persistent player: laid over the player slot on a release page, bottom-right corner elsewhere */
.pl-holder { width: 100%; }
.pl-holder.pl-ratio { aspect-ratio: 16 / 9; }
#dock { position: fixed; z-index: 50; border-radius: 12px; overflow: hidden; }
#dock[hidden] { display: none; }
body { padding-bottom: var(--dock-room, 0px); } /* set from app.js while the corner player is up */
#dock .dock-bar { display: none; }
#dock .dock-body { width: 100%; height: 100%; }
#dock iframe { display: block; width: 100%; border: 0; border-radius: 12px; color-scheme: normal; }
#dock.mini { left: auto; top: auto; right: 16px; bottom: 16px; width: var(--mini-w, min(460px, calc(100vw - 32px))); height: var(--mini-uh, calc(var(--mini-h, 250px) + 26px)); background: var(--bg, #111); box-shadow: 0 18px 50px -12px rgb(0 0 0 / .55); border: 1px solid var(--line); }
#dock.mini .dock-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 26px; padding: 0 6px 0 12px; font-size: 12px; }
#dock.mini .dock-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dock.mini .dock-close { font: inherit; font-size: 18px; line-height: 1; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 6px; }
#dock.mini .dock-body { height: calc(100% - 26px); }
@media (max-width: 600px) { #dock.mini { width: calc(100vw - 20px); right: 10px; bottom: 10px; } }
.genius-embed { width: 100%; height: 440px; border: 1px solid var(--line); border-radius: 10px; background: transparent; }

/* ---------- long tracklists: the column scrolls inside the screen, rows tighten up ---------- */
@media (min-width: 1201px) {
  .release-tracks { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
  .release-tracks .tracks {
    flex: 1 1 auto; min-height: 160px; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 25%, transparent) transparent;
    padding-bottom: 28px; scroll-padding-block: 8px;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
  }
  .release-tracks .player, .release-tracks .credit { flex: none; }
}
.tracks.many button.track-line { padding-block: 4px; font-size: 13px; }
@media (max-width: 1200px) {
  .release-tracks .tracks.many { column-gap: 32px; }
}

/* ---------- motion & tactile pass ---------- */

/* page changes: browser view transitions (the clicked cover flies to the release cover) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: var(--ease); }
::view-transition-group(cover) { animation-duration: .5s; animation-timing-function: var(--ease); overflow: clip; border-radius: 14px; }
::view-transition-image-pair(cover) { isolation: auto; }
::view-transition-old(cover), ::view-transition-new(cover) { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
/* the header stays put instead of cross-fading with itself (it showed as a flicker, and a blurred ghost during the flight) */
.top { view-transition-name: top; }
::view-transition-group(top) { animation: none; z-index: 2; }
::view-transition-old(top) { display: none; }
::view-transition-new(top) { animation: none; }
.vt-active #view.enter { animation: none; }
.vt-active img.cover-xl { animation: none; }

/* press feedback everywhere */
.card-link { transition: transform .2s var(--spring); }
.card-link:active { transform: scale(.975); }
.logo { transition: transform .2s var(--spring), opacity .2s; }
.logo:active { transform: scale(.96); }
.links a:active { transform: scale(.94); }
.results li button:active { transform: scale(.985); }
.pl-tab:active, button.chip:active { transform: scale(.94); }
.tracks button.track-line:active { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.tracks button.track-line { transition: background .15s, padding .25s var(--ease); }
.tracks button.track-line:not(:disabled):hover { padding-left: 6px; }
.t-top:active .t-top-icon { transform: scale(.8); }
.t-top-icon { transition: transform .2s var(--spring); }
.dock-close:active { transform: scale(.85); }
select:active { transform: none; }

/* nav links draw an underline from the left */
nav a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .2s, background-size .3s var(--ease); padding-bottom: 2px; }
nav a:hover { background-size: 100% 1px; }

/* focus ring eases in instead of snapping */
:focus-visible { transition: outline-offset .15s var(--ease); }
:focus-visible { outline-offset: 3px; }

/* staggered entrance for the first rows of grids and tracklists */
.grid > .card:nth-child(2) { animation-delay: 0.070s; }
.grid > .card:nth-child(3) { animation-delay: 0.105s; }
.grid > .card:nth-child(4) { animation-delay: 0.140s; }
.grid > .card:nth-child(5) { animation-delay: 0.175s; }
.grid > .card:nth-child(6) { animation-delay: 0.210s; }
.grid > .card:nth-child(7) { animation-delay: 0.245s; }
.grid > .card:nth-child(8) { animation-delay: 0.280s; }
.grid > .card:nth-child(9) { animation-delay: 0.315s; }
.grid > .card:nth-child(10) { animation-delay: 0.350s; }
.grid > .card:nth-child(11) { animation-delay: 0.385s; }
.grid > .card:nth-child(12) { animation-delay: 0.420s; }
.tracks > .track:nth-child(2) { animation-delay: 0.040s; }
.tracks > .track:nth-child(3) { animation-delay: 0.060s; }
.tracks > .track:nth-child(4) { animation-delay: 0.080s; }
.tracks > .track:nth-child(5) { animation-delay: 0.100s; }
.tracks > .track:nth-child(6) { animation-delay: 0.120s; }
.tracks > .track:nth-child(7) { animation-delay: 0.140s; }
.tracks > .track:nth-child(8) { animation-delay: 0.160s; }
.tracks > .track:nth-child(9) { animation-delay: 0.180s; }
.tracks > .track:nth-child(10) { animation-delay: 0.200s; }
.tracks > .track:nth-child(11) { animation-delay: 0.220s; }
.tracks > .track:nth-child(12) { animation-delay: 0.240s; }

/* cover tilts toward the pointer */
.cover-xl { transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); will-change: transform; }
.cover-xl:hover { transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) scale(1.02); }

/* comments leave softly */
.comment.leaving { animation: c-out .25s ease both; }
@keyframes c-out { to { opacity: 0; transform: translateX(14px); height: 0; margin: 0; } }

/* mini player pops in when it docks to the corner */
#dock.mini { animation: pop .4s var(--spring) both; }
#dock.mini .dock-close:hover { transform: rotate(90deg); }

/* review field and score digits */
.review textarea { transition: border-color .2s, box-shadow .2s, background .2s; }
.review textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 14%, transparent); }
#review-state { transition: opacity .3s; }
.sw-value { font-variant-numeric: tabular-nums; }

/* scrollbars */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.cover-xl { animation-fill-mode: backwards; }
/* Spotify selected in the player: its own embed shows the tracks, so ours steps aside */
.release-tracks.hide-list > .tracks { display: none; }

/* landing: the cover doesn't grow under the pointer the moment the flight ends */
.cover-xl:hover { transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); }

/* embeds stay invisible until they have loaded, then fade in (no white flash) */
#dock iframe { opacity: 0; transition: opacity .6s ease; }
#dock iframe.loaded { opacity: 1; }
#dock .dock-body { background: color-mix(in srgb, var(--fg) 5%, transparent); border-radius: 12px; }

/* resize grips of the corner player: top, left and top-left edges */
#dock .dock-grip { display: none; position: absolute; z-index: 3; touch-action: none; }
#dock.mini .dock-grip { display: block; }
#dock .dock-grip-n { top: 0; left: 14px; right: 40px; height: 7px; cursor: ns-resize; }
#dock .dock-grip-w { left: 0; top: 14px; bottom: 0; width: 7px; cursor: ew-resize; }
#dock .dock-grip-nw { left: 0; top: 0; width: 16px; height: 16px; cursor: nwse-resize; }
#dock.resizing { transition: none; user-select: none; }
#dock.resizing iframe { pointer-events: none; }

/* ---------- search flow: typing, results, import ---------- */

/* covers fade in when they arrive */
img[data-label]:not(.cover-xl):not(.ready) { opacity: 0; }
img[data-label].ready { animation: img-in .45s ease both; }
@keyframes img-in { from { opacity: 0; } to { opacity: 1; } }

/* dialog: fades out as well, backdrop fades both ways, steps slide in */
dialog[open]::backdrop { animation: fade-in .3s ease both; }
dialog.closing { animation: pop-out .22s ease both; }
dialog.closing::backdrop { animation: fade-out .22s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
.step-in { animation: step-in .32s var(--ease) both; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* search field spinner */
.q-wrap { position: relative; }
.q-wrap #q { width: 100%; padding-right: 44px; }
.q-wrap .spin { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--fg); opacity: 0; transition: opacity .2s; animation: spin .7s linear infinite; pointer-events: none; }
.q-wrap.busy .spin { opacity: 1; }

/* results */
.results { transition: opacity .2s; }
.results.stale { opacity: .45; }
.results li.seen { animation: none; }
.results li button { transition: background .2s, transform .15s var(--spring), box-shadow .2s; }
.results li button:hover { transform: translateX(3px); }

/* skeleton rows while searching */
.results li.sk { display: flex; gap: 12px; align-items: center; padding: 8px 10px; animation: rise .3s var(--ease) both; }
.sk-cover { width: 48px; height: 48px; border-radius: 8px; flex: none; }
.sk-lines { flex: 1; display: grid; gap: 8px; }
.sk-lines i { display: block; height: 10px; border-radius: 6px; width: 70%; }
.sk-lines i + i { width: 40%; }
.sk-cover, .sk-lines i { background: linear-gradient(100deg, var(--line) 30%, color-mix(in srgb, var(--line) 40%, transparent) 50%, var(--line) 70%) 0 0 / 220% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* saving a release: the button and form show progress */
button.loading { position: relative; overflow: hidden; }
button.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .25) 50%, transparent 70%) 0 0 / 220% 100%; animation: shimmer 1s linear infinite; }
#add.busy { opacity: .7; pointer-events: none; transition: opacity .3s; }

/* corner player, Spotify: its real full layout at 460x352 or bigger, never scaled (the box keeps that ratio, plus the title bar) */
#dock.mini.sp-mini { width: min(var(--sp-w, 460px), calc(100vw - 20px)); height: calc(min(var(--sp-w, 460px), calc(100vw - 20px)) * 0.76522 + 30px); }
#dock.mini.sp-mini .dock-body { overflow: hidden; }
#dock.mini.sp-mini iframe.pl-spotify { width: 100%; height: 100% !important; }

/* release page: the blocks settle in one after another (the side column holds the flying cover, so it stays put) */
.release-main { animation: rise .55s var(--ease) .08s both; }
.release-tracks { animation: rise .55s var(--ease) .16s both; }
.comments { animation: rise .55s var(--ease) .26s both; }
.vt-active .release-main, .vt-active .release-tracks, .vt-active .comments { animation-delay: .25s; }

/* placeholder where the players will appear, so the tracklist doesn't jump */
.player-skel { height: 200px; margin-bottom: 18px; border-radius: 12px; overflow: hidden; transition: height .4s var(--ease), margin .4s var(--ease), opacity .3s; background: linear-gradient(100deg, var(--line) 30%, color-mix(in srgb, var(--line) 40%, transparent) 50%, var(--line) 70%) 0 0 / 220% 100%; animation: shimmer 1.4s linear infinite; }
.player-skel.out { height: 0; margin-bottom: 0; opacity: 0; }

/* switching to another release: the old player fades out before the new one comes in */
#dock { transition: opacity .45s ease; }
#dock.fading { opacity: 0; pointer-events: none; }

/* release page spacing switch */
#layout-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 40; font-size: 12px; padding: 7px 14px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); box-shadow: var(--shadow); }
#layout-toggle:hover { color: var(--fg); }
body:not(:has(.release)) #layout-toggle { display: none; }
@media (min-width: 1201px) {
  .release-side { transition: margin .4s var(--ease), padding .4s var(--ease); }
  html.tight .release-side { padding-right: 0; margin-right: calc(-1 * (clamp(24px, 3vw, 52px) - 14px)); }
}
@media (max-width: 1200px) { #layout-toggle { display: none; } }

/* frisson: a bonus parameter, set apart only by its tag and the extra life in the slider (its own, brighter color from the cover) */
.params-bonus { margin-top: 14px; }
.params-bonus .param { border-bottom: 0; }
.param.bonus .p-name { font-weight: 700; }
.p-bonus-tag { margin-left: 8px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); vertical-align: 2px; }

/* frisson feel: it breathes like a pulse (faster the higher the value), and answers touch with goosebumps */
.param.bonus .string { overflow: visible; }
.param.bonus .s-note-body { animation: frisson-pulse calc(2.4s - var(--level, .5) * 1.5s) ease-in-out infinite; }
@keyframes frisson-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px var(--fr1)); }
  18% { filter: drop-shadow(0 0 calc(5px + var(--level, .5) * 12px) var(--fr2)); }
  30% { filter: drop-shadow(0 0 3px var(--fr1)); }
  44% { filter: drop-shadow(0 0 calc(4px + var(--level, .5) * 9px) var(--fr2)); }
}
.param.bonus .p-val.bump { animation: frisson-shake .45s ease; }
@keyframes frisson-shake { 0%, 100% { transform: none; } 15% { transform: translate(-2px, 1px) scale(1.3); } 30% { transform: translate(2px, -1px) scale(1.25); } 45% { transform: translate(-1px, 0) scale(1.2); } 60% { transform: translate(1px, 1px) scale(1.15); } }
.chill-ring { position: absolute; left: var(--x); top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--fr1); pointer-events: none; animation: chill-ring .9s var(--ease) both; }
@keyframes chill-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(9); } }
.chill-spark { position: absolute; left: var(--x); top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: linear-gradient(135deg, var(--fr1), var(--fr2)); pointer-events: none; animation: chill-spark .8s var(--ease) both; }
@keyframes chill-spark { from { opacity: 1; transform: translate(0, 0) scale(1.2); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } }
@media (prefers-reduced-motion: reduce) { .param.bonus .s-note-body { animation: none; } }

/* frisson has a stop at 0, so its dots sit on the multiples of 10% */
.param.bonus .string { background-position: -5% 50%; }

/* coefficients (K) */
.p-weight { display: none; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.show-weights .p-weight { display: inline; animation: img-in .3s ease both; }
#weights-toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; transform: translate(-50%, 12px); opacity: 0; padding: 8px 16px; border-radius: 999px; font-size: 13px; background: var(--fg); color: var(--bg); pointer-events: none; transition: opacity .25s ease, transform .3s var(--ease); }
#weights-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* "?" shortcut sheet */
#keys-help { position: fixed; inset: 0; margin: auto; height: max-content; z-index: 70; width: min(420px, calc(100vw - 32px)); padding: 20px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 60px -16px rgb(0 0 0 / .6); animation: step-in .25s var(--ease) both; }
#keys-help[hidden] { display: none; }
#keys-help .eyebrow { margin: 0 0 12px; }
#keys-help dl { margin: 0; display: grid; gap: 10px; }
#keys-help dl > div { display: grid; grid-template-columns: 76px 1fr; align-items: baseline; gap: 12px; }
#keys-help dt { white-space: nowrap; }
#keys-help dd { margin: 0; color: var(--soft); font-size: 14px; }
#keys-help kbd, .foot kbd { font: 600 12px/1 var(--sans); padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg); color: var(--fg); }
.foot-keys { font: inherit; }
@media (hover: none) { .foot-keys { display: none; } }

/* during a flight the new page holds still, so the landing card is where it will be */
.vt-active .card, .vt-active .tracks > .track, .vt-active .results li { animation: none; }

/* lite mode: for slow machines. No ribbon or drifting covers, no animations or blur, covers just appear. */
.lite .release-ribbon, .lite .drift { display: none !important; }
.lite *, .lite *::before, .lite *::after { animation: none !important; transition: none !important; backdrop-filter: none !important; }
.lite .cover-xl { will-change: auto; }

/* frisson shiver: the whole string trembles (a transform, so it costs nothing per frame); harder the higher the value.
   The pulse glow is static for the same reason: animated filters and per-frame path redraws were what slowed the page. */
.param.bonus .s-svg { will-change: transform; animation: frisson-tremble .11s steps(3) infinite alternate; }
@keyframes frisson-tremble { from { transform: translateY(calc(var(--level, .3) * -1.2px)); } to { transform: translateY(calc(var(--level, .3) * 1.2px)); } }
.param.bonus .s-note-body { animation: none; filter: drop-shadow(0 0 calc(3px + var(--level, .5) * 9px) var(--fr2)); }
@media (prefers-reduced-motion: reduce) { .param.bonus .s-svg { animation: none; } }

/* background layers (drifting covers, title ribbon): each sits on its own fixed, contained layer, so their moving
   children don't force the page content above into fresh compositor layers every frame (that layer churn was the lag). */
.drift, .release-ribbon { contain: strict; will-change: transform; }
/* the background layers fade in instead of popping in with the page */
.drift-cover, .release-ribbon { animation: bg-in 1.2s ease both; }
@keyframes bg-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .drift-cover, .release-ribbon { animation: none; } }

/* Review: textarea, signature and publish button live in one card */
.review { gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color .2s, box-shadow .2s; }
.review:focus-within { border-color: color-mix(in srgb, var(--c1) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 14%, transparent); }
.review textarea, .review textarea:focus { border: 0; box-shadow: none; padding: 0; min-height: 72px; background: transparent; }
.review .sign { max-width: none; }
.review .sign canvas { background: transparent; }
.review-publish { align-self: stretch; min-width: 0; width: 100%; }

/* community block under the cover: average score + per-parameter radar */
.community { margin-top: 22px; }
/* blind rating: the hidden score and reviews slide in once you have rated */
.cm-hidden { color: var(--soft); opacity: .5; }
.blind-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.blind-toggle input { accent-color: var(--c1); margin: 0; }
.blind-note { margin: 0 0 12px; }
.review[hidden] { display: none; }
/* before you rate, the score widget shows the community average, faded */
.sw-value.is-avg { opacity: .5; transition: opacity .3s var(--ease); }
/* parameters stay grey until you touch them, then the string and orb take their colour */
.s-back { transition: stroke .5s var(--ease); }
.s-note { transition: filter .5s var(--ease); }
.string.unset .s-back { stroke: color-mix(in srgb, var(--fg) 20%, transparent); }
.string.unset .s-note { filter: grayscale(1) opacity(.7); }
.reveal-in { animation: reveal-in .7s var(--ease) both; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } } /* opacity + transform only: an animated blur repaints every frame */
@media (prefers-reduced-motion: reduce) { .reveal-in { animation: none; } }
.cm-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.cm-num { font-size: clamp(40px, 3.6vw, 60px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.cm-of { font-size: 16px; color: var(--soft); font-weight: 600; }
.cm-n { flex-basis: 100%; margin-top: 4px; }
.community .radar { margin-top: 6px; }
.community .r-shape { transform: none; opacity: 1; }
.community .r-label { font-size: 15px; }
.community .r-val { font-size: 18px; }
@media (max-width: 760px) { .community { grid-column: 1 / -1; } }



.release-side .cm-side { margin-top: 14px; padding-top: 0; }

/* Share card: a quiet button under the publish one, and the preview dialog (the canvas is the preview). */
.share-btn { align-self: stretch; width: 100%; font: inherit; font-size: 15px; padding: 11px 22px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; transition: border-color .2s, color .2s; }
.share-btn:hover { border-color: var(--c1); color: var(--c1); }
.share-btn[hidden] { display: none; }
.share-dialog { width: min(440px, calc(100vw - 32px)); padding: 16px 20px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--fg); box-shadow: var(--shadow); }
.share-dialog::backdrop { background: rgb(0 0 0 / .55); backdrop-filter: blur(4px); }
.share-close { display: flex; justify-content: flex-end; }
.share-close button { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.share-slot canvas { display: block; width: 100%; height: auto; border-radius: 12px; }
.share-slot:empty { aspect-ratio: 4 / 5; border-radius: 12px; background: var(--line); }
.share-note { min-height: 1.4em; margin: 10px 0 0; }
.share-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.share-actions .btn { flex: 1; }
.share-actions .btn[hidden] { display: none; }

/* RATE_BARS_V1: rating bars. One markup (ten segments, eleven for frisson from 0, and a fill line) and three looks,
   picked with ?bars=blocks|digits|steps on <html data-bars>. Changes only flip classes and --p; segments ease with
   transitions on transform, opacity and colour, nothing runs per frame and nothing casts a shadow. */
@media (min-width: 561px) { .params { grid-template-columns: max-content minmax(120px, 1fr) 3ch; } }
@media (max-width: 560px) {
  .params { grid-template-columns: minmax(0, 1fr) 3ch; }
  .params .rb { order: 4; grid-column: 1 / -1; height: 36px; }
}
.p-val.is-avg { opacity: .45; font-weight: 600; }
.rb {
  --p: 0;
  order: 2;
  position: relative;
  height: 30px;
  display: flex;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.rb.locked { cursor: default; }
.rb input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.rb-track { position: relative; flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; gap: 4px; }
.rb:has(input:focus-visible) .rb-track { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 6px; }
.rb-seg {
  --k: 0;
  --seg: color-mix(in srgb, var(--bar2) calc(var(--k) * 10%), var(--bar1));
  position: relative;
  display: block;
  height: 12px;
  border-radius: 4px;
  font-size: 0;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  transition: transform .35s var(--spring), opacity .3s var(--ease), color .3s var(--ease);
}
.rb-seg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--seg); opacity: 0; transition: opacity .25s var(--ease), background-color .4s var(--ease); }
.rb-seg.on::after { opacity: 1; }
.rb.unset .rb-seg { --seg: color-mix(in srgb, var(--fg) 22%, transparent); }
.rb-seg:nth-child(2) { --k: 1; } .rb-seg:nth-child(3) { --k: 2; } .rb-seg:nth-child(4) { --k: 3; } .rb-seg:nth-child(5) { --k: 4; }
.rb-seg:nth-child(6) { --k: 5; } .rb-seg:nth-child(7) { --k: 6; } .rb-seg:nth-child(8) { --k: 7; } .rb-seg:nth-child(9) { --k: 8; }
.rb-seg:nth-child(10) { --k: 9; } .rb-seg:nth-child(11) { --k: 10; }
.rb-fill { display: none; }

/* look 1, blocks: ten even blocks, the chosen one stands taller */
.rb-seg.cur { transform: scaleY(1.5); }
.rb.dragging .rb-seg.cur { transform: scaleY(1.9); }
.rb:not(.locked):hover .rb-seg { background: color-mix(in srgb, var(--fg) 12%, transparent); }
.param.bonus .rb-seg:first-child { height: 4px; border-radius: 2px; } /* frisson's 0: just a notch */

/* look 2, digits: the numbers themselves, the chosen one big, a thin line fills underneath */
[data-bars="digits"] .rb { height: 34px; }
[data-bars="digits"] .rb-track { gap: 0; align-items: center; }
[data-bars="digits"] .rb-seg, [data-bars="digits"] .param.bonus .rb-seg:first-child {
  height: auto; background: none; font-size: 14px; font-weight: 600; line-height: 1; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--muted); opacity: .5;
}
[data-bars="digits"] .rb-seg::after { display: none; }
[data-bars="digits"] .rb-seg.on { opacity: .9; color: var(--soft); }
[data-bars="digits"] .rb-seg.cur { opacity: 1; color: var(--fg); font-weight: 700; transform: scale(1.75); }
[data-bars="digits"] .rb.dragging .rb-seg.cur { transform: scale(2); }
[data-bars="digits"] .rb.unset .rb-seg.cur { color: var(--muted); }
[data-bars="digits"] .rb-track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--fg) 8%, transparent); }
[data-bars="digits"] .rb-fill {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--bar1), var(--bar2)); transform-origin: left; transform: scaleX(var(--p));
  transition: transform .4s var(--spring), opacity .3s;
}
[data-bars="digits"] .rb.unset .rb-fill { background: color-mix(in srgb, var(--fg) 25%, transparent); }

/* look 3, steps: a staircase like a volume meter, each step a bit taller */
[data-bars="steps"] .rb { height: 34px; }
[data-bars="steps"] .rb-track { align-items: end; gap: 3px; }
[data-bars="steps"] .rb-seg, [data-bars="steps"] .param.bonus .rb-seg:first-child { height: calc(5px + var(--k) * 2.7px); border-radius: 3px; transform-origin: 50% 100%; }
[data-bars="steps"] .rb-seg.cur { transform: scaleY(1.15); }
[data-bars="steps"] .rb.dragging .rb-seg.cur { transform: scaleY(1.3); }

/* frisson: its own tinted card, and a shiver that runs through the lit segments when you let go */
.params-bonus .param.bonus {
  margin: 0; padding: 12px 14px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--fr1) 45%, var(--line));
  background: linear-gradient(110deg, color-mix(in srgb, var(--fr1) 13%, transparent), color-mix(in srgb, var(--fr2) 9%, transparent));
}
.param.bonus .rb { --bar1: var(--fr1); --bar2: var(--fr2); }
.rb.wave .rb-seg.on, .rb.wave .rb-seg.cur { animation: rb-wave .55s var(--ease) calc(var(--k) * 35ms) both; }
@keyframes rb-wave { 0%, 100% { translate: 0 0; } 35% { translate: 0 -5px; } 65% { translate: 0 2px; } }
@media (prefers-reduced-motion: reduce) { .rb.wave .rb-seg { animation: none; } }

/* ---------- header, right side: language switch + profile ---------- */

nav { gap: 12px; }
.lang-switch { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lang-opt {
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1;
  padding: 6px 8px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-opt:not(:disabled):hover { box-shadow: none; transform: none; color: var(--fg); }
.lang-opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
/* the profile reads as a control: avatar + name in a bordered pill, at the far right */
nav a.me-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 220px;
  padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--fg); font-weight: 600; background: color-mix(in srgb, var(--fg) 4%, transparent);
  transition: border-color .2s, background .2s;
}
nav a.me-pill:hover { border-color: color-mix(in srgb, var(--fg) 40%, var(--line)); background: color-mix(in srgb, var(--fg) 8%, transparent); }
nav a.me-pill .avatar { width: 28px; height: 28px; font-size: 13px; flex: none; }
nav a.me-pill .me-name { overflow: hidden; text-overflow: ellipsis; }
nav a.nav-cta { color: var(--accent-fg); background: var(--accent); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
nav a.nav-cta:hover { color: var(--accent-fg); opacity: .88; }
@media (max-width: 600px) {
  nav { gap: 6px; }
  nav a.me-pill { padding: 3px; max-width: none; }
  nav a.me-pill .me-name { display: none; }
  nav a.nav-cta { padding: 6px 10px; }
  .lang-opt { padding: 6px 6px; font-size: 10px; }
  nav a { max-width: none; }
}
/* the header gained a language switch and a profile pill: below this width the search sits in the row between logo and nav
   instead of floating centered over them */
@media (max-width: 1100px) {
  .top-search { position: relative; top: auto; left: auto; transform: none; flex: 1; width: auto; min-width: 0; margin: 0 16px; }
}

/* phone header: logo and the right-hand controls on the first row, the search gets a row of its own so it stays usable */
@media (max-width: 600px) {
  .top { flex-wrap: wrap; row-gap: 10px; padding: 10px 0 12px; }
  .top-search { order: 3; flex: 1 0 100%; margin: 0; }
  .top-drop { left: 0; right: 0; width: auto; translate: none; }
  .top-search input { height: 40px; font-size: 16px; } /* 16px stops iOS zooming the page on focus */
  nav { margin-left: auto; }
}

/* phones: a bare 1fr column grows to its widest content (the title, the rating rows) and pushes the page wider than the screen; minmax(0, 1fr) lets it shrink */
@media (max-width: 860px) {
  .release { grid-template-columns: minmax(0, 1fr); }
  .release-side { grid-template-columns: 120px minmax(0, 1fr); }
  .release-side h1, .release-side .artist { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  nav { gap: 4px; font-size: 13px; }
  nav a { white-space: nowrap; }
  nav a.nav-cta { padding: 6px 10px; font-size: 13px; }
  .lang-opt { padding: 5px 5px; }
  .logo { font-size: 17px; }
}
@media (max-width: 560px) {
  .release-side h1, .release-side h1.long { font-size: 22px; overflow-wrap: break-word; }
  .release-side .artist { font-size: 17px; }
}
/* narrow phones: the header keeps one row; sign-up stays reachable from the login page and the home hero */
@media (max-width: 420px) {
  nav a.nav-cta { display: none; }
}

.sw-withdraw { margin-top: 8px; color: var(--muted); }
.sw-withdraw:hover { color: var(--fg); }
.sw-withdraw[hidden] { display: none; }

/* reviews: a card in the look of the rating panel (total + bar, one segmented row per parameter) */
.c-list { display: grid; gap: 14px; }
.comment.rv {
  --hue: 90;
  display: block;
  padding: 16px 18px 18px;
  border: 1px solid hsl(var(--hue) 50% 55% / .3);
  border-left-width: 1px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.comment.rv::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 120% at 100% 0%, hsl(var(--hue) 70% 55% / .14), transparent 60%); }
.rv-head { position: relative; display: flex; align-items: center; gap: 12px; }
.rv-head .avatar { flex: none; width: 36px; height: 36px; }
.rv-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rv-who .c-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-total { margin-left: auto; display: flex; align-items: baseline; gap: 6px; }
.rv-num { font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: hsl(var(--hue) 60% var(--score-l)); }
.rv-of { font-size: 12px; color: var(--muted); }
.rv-bar { position: relative; height: 5px; margin-top: 12px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); overflow: hidden; }
.rv-bar span { display: block; height: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(var(--heat, 0)); background: linear-gradient(90deg, hsl(var(--hue) 65% 58%), hsl(var(--hue) 60% 45%)); }
.rv-params { position: relative; list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.rv-p { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr) 2.6ch; align-items: center; column-gap: 12px; font-size: 13px; }
.rv-p.bonus { margin-top: 4px; padding-top: 9px; border-top: 1px dashed var(--line); --bar1: var(--fr1); --bar2: var(--fr2); }
.rv-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-p.bonus .rv-name { color: var(--fg); font-weight: 700; }
.rv-segs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.rv-segs i { --k: 0; display: block; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--fg) 9%, transparent); }
.rv-segs i:nth-child(2) { --k: 1; } .rv-segs i:nth-child(3) { --k: 2; } .rv-segs i:nth-child(4) { --k: 3; } .rv-segs i:nth-child(5) { --k: 4; }
.rv-segs i:nth-child(6) { --k: 5; } .rv-segs i:nth-child(7) { --k: 6; } .rv-segs i:nth-child(8) { --k: 7; } .rv-segs i:nth-child(9) { --k: 8; } .rv-segs i:nth-child(10) { --k: 9; }
.rv-segs i.on { background: color-mix(in srgb, var(--bar2) calc(var(--k) * 10%), var(--bar1)); }
.rv-val { text-align: right; font-variant-numeric: tabular-nums; }
.comment.rv .c-body { position: relative; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.comment.rv .c-sign { position: relative; margin-top: 8px; }
@media (max-width: 560px) { .rv-p { grid-template-columns: minmax(84px, 38%) minmax(0, 1fr) 2.6ch; column-gap: 8px; } }

.comment[hidden], .rv-tabs[hidden] { display: none; }
.rv-tabs { margin-bottom: 14px; }
.rv-tabs i { font-style: normal; opacity: .55; margin-left: 4px; font-variant-numeric: tabular-nums; }
.rv-tabs .pl-tab:disabled { opacity: .35; cursor: default; }
/* a rating with no text: just the header, the bar and the parameter rows */
.comment.rv[data-kind="none"] { padding-bottom: 16px; }

.review-edit[hidden] { display: none; }
.review textarea[readonly] { resize: none; opacity: .85; cursor: default; }

/* average / my rating switch in the score panel */
.sw-mode { position: relative; z-index: 1; }
.sw-mode[hidden] { display: none; }

/* reviews: centered under the album, two cards per row (one on narrow screens) */
.comments { max-width: 1120px; margin-left: auto; margin-right: auto; }
.comments > h2 { justify-content: center; }
.comments .rv-tabs { justify-content: center; }
.comments .blind-note, .comments #c-empty { text-align: center; }
.c-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.c-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 8px); justify-self: center; } /* a lone last card sits in the middle */
.c-list > li[hidden] { display: none; }
@media (max-width: 800px) {
  .c-list { grid-template-columns: minmax(0, 1fr); }
  .c-list > li:last-child:nth-child(odd) { width: auto; }
}

/* a cover already seen this session shows immediately, without the fade-in */
img[data-label].cached, .drift-cover.cached { animation: none; }
