/* ============================================================
   The Record Shelf — a dark gallery for a vinyl collection
   ============================================================ */

:root {
  --bg:        #0a0908;
  --bg-2:      #100e0d;
  --panel:     #14120f;
  --ink:       #f5f1ea;
  --ink-dim:   #b6ada0;
  --muted:     #857c70;
  --line:      rgba(245, 241, 234, 0.10);
  --line-soft: rgba(245, 241, 234, 0.055);
  --accent:    #d9744a;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(1.15rem, 4vw, 4.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 2px 4px rgba(0,0,0,.5), 0 12px 28px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* film grain over everything ------------------------------------------- */
.grain {
  position: fixed; inset: -50%; z-index: 9999; pointer-events: none;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* =========================== MASTHEAD ================================= */
.masthead {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex; align-items: flex-end;
  padding: var(--pad);
  padding-bottom: clamp(3rem, 8vh, 6rem);
  overflow: hidden;
  isolation: isolate;
}
.masthead-wall {
  position: absolute; inset: -8% -4%;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; z-index: -2;
  filter: saturate(1.02) contrast(1.03) brightness(.92);
}
@media (min-width: 700px)  { .masthead-wall { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1100px) { .masthead-wall { grid-template-columns: repeat(8, 1fr); } }
.wall-col { display: grid; gap: 10px; will-change: transform; animation: drift 90s linear infinite; }
.wall-col:nth-child(even) { animation-direction: reverse; animation-duration: 116s; }
.wall-col:nth-child(3n)   { animation-duration: 138s; }
.wall-col img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }

.masthead-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(10,9,8,.97) 0%, rgba(10,9,8,.94) 26%, rgba(10,9,8,.66) 52%, rgba(10,9,8,.44) 78%, rgba(10,9,8,.5) 100%),
    linear-gradient(to bottom, rgba(10,9,8,.55) 0%, rgba(10,9,8,.18) 24%, rgba(10,9,8,.35) 62%, rgba(10,9,8,.92) 88%, var(--bg) 100%);
  backdrop-filter: blur(2.5px) saturate(1.05);
  -webkit-backdrop-filter: blur(2.5px) saturate(1.05);
}
.masthead-inner { position: relative; max-width: 1500px; width: 100%; margin: 0 auto; }
.kicker {
  margin: 0 0 1.4rem; font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-dim); display: flex; align-items: center; gap: .7rem;
}
.kicker::before { content: ""; width: clamp(24px, 6vw, 64px); height: 1px; background: currentColor; opacity: .6; }
.wordmark {
  margin: 0; font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.4rem, 14vw, 11rem); line-height: .84;
  letter-spacing: -.035em; text-wrap: balance;
  font-variation-settings: "opsz" 144, "SOFT" 0;
}
.wordmark em { font-style: italic; font-weight: 400; color: #fff; }
.lede {
  margin: clamp(1.5rem, 3vh, 2.4rem) 0 0; max-width: 34ch;
  font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--ink-dim); line-height: 1.5;
}
.topstats {
  display: flex; flex-wrap: wrap; gap: clamp(1.6rem, 5vw, 4rem);
  margin: clamp(2rem, 5vh, 3.4rem) 0 0; padding: 1.6rem 0 0; border-top: 1px solid var(--line);
}
.topstats div { min-width: 0; }
.topstats dt { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.topstats dd {
  margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 400; line-height: 1; letter-spacing: -.02em;
}
.topstats dd small { font-size: .48em; color: var(--ink-dim); letter-spacing: 0; margin-left: .35em; font-family: var(--sans); }
.scroll-cue {
  position: absolute; right: 0; bottom: .4rem; width: 26px; height: 44px;
  border: 1px solid var(--line); border-radius: 14px; display: none;
}
@media (min-width: 900px) { .scroll-cue { display: block; } }
.scroll-cue span {
  position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--ink-dim); animation: cue 2.1s var(--ease) infinite;
}
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(16px); opacity: 0; } }

/* =========================== CONTROLS ================================= */
.controls {
  position: sticky; top: 0; z-index: 60;
  padding: .85rem var(--pad) .7rem;
  background: rgba(10, 9, 8, .82);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
.controls-row { display: flex; gap: .6rem; align-items: center; max-width: 1900px; margin: 0 auto; }
.search { position: relative; flex: 1; min-width: 0; }
.search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round;
}
.search input {
  width: 100%; padding: .62rem 2.2rem .62rem 2.45rem;
  background: rgba(255,255,255,.045); border: 1px solid var(--line);
  border-radius: 999px; font-size: 14px; transition: border-color .2s, background .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: rgba(245,241,234,.3); background: rgba(255,255,255,.075); }
.search .clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; color: var(--muted); font-size: 17px; line-height: 1;
}
.search .clear:hover { color: var(--ink); background: rgba(255,255,255,.08); }

.views { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.views button { width: 34px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .18s; }
.views svg { width: 14px; height: 14px; fill: var(--muted); stroke: var(--muted); stroke-width: 0; }
.views button:nth-child(3) svg rect { fill: none; stroke: currentColor; stroke-width: 1.4; }
.views button:nth-child(3) svg { fill: none; stroke: var(--muted); }
.views button:nth-child(3).on svg { stroke: var(--ink); }
.views button:nth-child(4) svg { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.views button:hover svg { fill: var(--ink-dim); stroke: var(--ink-dim); }
.views button.on { background: rgba(245,241,234,.13); }
.views button.on svg { fill: var(--ink); stroke: var(--ink); }
@media (max-width: 620px) { .views button:nth-child(2), .views button:nth-child(3) { display: none; } }

.sort select {
  appearance: none; -webkit-appearance: none;
  padding: .58rem 2rem .58rem .9rem; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.045) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23857c70' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right .85rem center;
  font-size: 13px; cursor: pointer;
}
.sort select option { background: #14120f; }
@media (max-width: 760px) { .sort { display: none; } }

.facets { display: flex; gap: .5rem; align-items: center; max-width: 1900px; margin: .6rem auto 0; }
.facet-scroll {
  display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding-bottom: 2px; mask-image: linear-gradient(to right, #000 92%, transparent);
}
.facet-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 1180px) {
  /* wide enough to show every shelf at once — no need to hide any behind a scroll */
  .facet-scroll { flex-wrap: wrap; overflow: visible; mask-image: none; row-gap: .4rem; }
}

.chip {
  flex: none; padding: .34rem .78rem; border-radius: 999px;
  border: 1px solid var(--line-soft); background: rgba(255,255,255,.03);
  font-size: 12.5px; color: var(--ink-dim); white-space: nowrap;
  transition: color .18s, border-color .18s, background .18s;
}
.chip:hover { color: var(--ink); border-color: var(--line); }
.chip .n { color: var(--muted); font-size: 11px; margin-left: .4em; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #0a0908; font-weight: 500; }
.chip.on .n { color: rgba(10,9,8,.55); }

.more-filters {
  flex: none; padding: .34rem .8rem; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-dim); display: flex; align-items: center; gap: .45rem;
}
.more-filters:hover { color: var(--ink); }
.more-filters[aria-expanded="true"] { background: rgba(255,255,255,.08); color: var(--ink); }
.surprise { flex: none; }
.surprise svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.surprise svg circle { fill: currentColor; stroke: none; }
@media (max-width: 700px) { .surprise span { display: none; } .surprise { padding: .34rem .55rem; } }

.badge { background: var(--accent); color: #0a0908; font-size: 10px; font-weight: 600; border-radius: 999px; padding: .05rem .35rem; }

.drawer { max-width: 1900px; margin: .75rem auto 0; padding: 1.1rem 0 .3rem; border-top: 1px solid var(--line-soft); }
.drawer-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.fgroup h3 { margin: 0 0 .6rem; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips.scroller { max-height: 128px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; padding-right: 4px; }
.chips.scroller::-webkit-scrollbar { width: 4px; }
.chips.scroller::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
.reset { margin-top: 1.1rem; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.reset:hover { color: var(--ink); }

/* =========================== SHELF =================================== */
main, .stats { scroll-margin-top: 108px; }
main { padding: clamp(1.4rem, 4vh, 2.6rem) var(--pad) clamp(4rem, 10vh, 7rem); max-width: 1900px; margin: 0 auto; }
.resultline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  margin: 0 0 clamp(1rem, 2.6vh, 1.8rem); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.crumbs { text-transform: none; letter-spacing: .02em; color: var(--ink-dim); font-size: 12.5px; }

.grid { display: grid; }
.view-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 21vw, 220px), 1fr));
  gap: clamp(1.1rem, 2.2vw, 2.1rem) clamp(.85rem, 1.6vw, 1.6rem);
}
.view-wall { grid-template-columns: repeat(auto-fill, minmax(clamp(84px, 11vw, 150px), 1fr)); gap: 3px; }
.view-list { grid-template-columns: 1fr; gap: 0; }
.view-floor { display: block; position: relative; }

/* --- card --------------------------------------------------------- */
/* Cards are treated as physical objects: the sleeve sits in 3D space and
   tilts toward the cursor (--rx/--ry, set from JS), the artwork lifts off
   the page on the Z axis, and a highlight tracks the pointer (--mx/--my). */
.card {
  position: relative; text-align: left; width: 100%; padding: 0; margin: 0;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  opacity: 0; transform: translateY(14px);
}
.card.in { opacity: 1; transform: none; transition: opacity .34s var(--ease), transform .34s var(--ease); }

.sleeve {
  position: relative; aspect-ratio: 1; width: 100%; flex: none;
  transform-style: preserve-3d;
}
.view-grid .sleeve, .view-wall .sleeve {
  transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .55s var(--ease);
}
/* while the pointer is actually over a card, follow it near-instantly */
.card.tilting .sleeve { transition: transform .09s linear; }

.sleeve::after { /* the record itself, sliding out of the sleeve */
  content: ""; position: absolute; inset: 6% -2% 6% auto; width: 88%; border-radius: 50%; z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, var(--c, #d9744a) 0 13%, #12100e 13.5% 15%, transparent 15.5%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.045) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 32% 28%, #2b2724, #0d0b0a 72%);
  box-shadow: 0 8px 22px rgba(0,0,0,.7);
  transform: translate3d(0, 0, -14px) scale(.94); opacity: 0;
  transition: transform .5s var(--ease), opacity .35s var(--ease);
}

.art {
  position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  background: #16130f center/cover no-repeat; border-radius: 2px;
  transform: translateZ(0);
  /* contact shadow, ambient shadow, and the card's own edge */
  box-shadow:
    0 1px 1px rgba(0,0,0,.6),
    0 3px 6px rgba(0,0,0,.45),
    0 14px 30px rgba(0,0,0,.5);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), filter .28s linear;
}
.art.blur { filter: blur(9px); }

.sleeve::before { /* card stock: spine, opening, pointer-tracked sheen */
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 2px; pointer-events: none;
  transform: translateZ(1px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(0,0,0,.45);
  background:
    radial-gradient(58% 58% at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.17), transparent 62%),
    linear-gradient(to right,
      rgba(0,0,0,.38) 0, rgba(0,0,0,.16) 1.5px,
      rgba(255,255,255,.13) 1.5px, rgba(255,255,255,.03) 4px,
      transparent 7px),
    linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 34%, rgba(0,0,0,.12) 100%);
  transition: background-position .2s linear;
}

.meta { padding-top: .72rem; flex: none; }
.m-title {
  font-family: var(--serif); font-size: 15px; font-weight: 400; line-height: 1.25;
  margin: 0 0 .2rem; letter-spacing: -.008em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.m-artist {
  margin: 0; font-size: 12.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .3s;
}
.m-sub {
  margin: .3rem 0 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(-2px); transition: opacity .3s, transform .3s;
}
@media (hover: hover) {
  .view-grid .card:hover .art {
    transform: translate3d(0, -10px, 34px);
    box-shadow:
      0 2px 3px rgba(0,0,0,.6),
      0 8px 16px rgba(0,0,0,.5),
      0 30px 55px rgba(0,0,0,.66),
      0 0 70px -10px var(--c, #d9744a);
  }
  .view-grid .card:hover .sleeve::after { transform: translate3d(26%, 0, -18px) scale(1); opacity: 1; }
  .view-grid .card:hover .m-artist { color: var(--c, var(--ink)); }
  .view-grid .card:hover .m-sub { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view-grid .sleeve, .view-wall .sleeve { transform: none; }
}
.card:focus-visible { outline: none; }
.card:focus-visible .art { outline: 2px solid var(--accent); outline-offset: 4px; }

/* sleeves with no scan on Discogs */
.art.blank {
  display: grid; place-items: center; padding: 11%; text-align: center;
  background: linear-gradient(155deg, #211d19 0%, #14110f 48%, #0d0b0a 100%);
}
.blank-inner {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  width: 100%; padding: 12% 8%; border: 1px solid rgba(245,241,234,.12); border-radius: 1px;
}
.blank-artist {
  font-size: clamp(7px, 1vw, 9.5px); letter-spacing: .22em; text-transform: uppercase;
  color: rgba(245,241,234,.5); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blank-rule { width: 18px; height: 1px; background: rgba(245,241,234,.22); }
.blank-title {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(11px, 1.5vw, 15px); line-height: 1.25; color: rgba(245,241,234,.72);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.view-wall .blank-inner { padding: 8% 6%; }
.view-list .blank-inner, .view-list .blank-rule { display: none; }
.view-list .art.blank { padding: 0; }

/* wall mode */
.view-wall .meta, .view-wall .sleeve::after { display: none; }
.view-wall .art { border-radius: 0; box-shadow: none; }
.view-wall .sleeve::before { box-shadow: inset 0 0 0 .5px rgba(0,0,0,.5); background: none; }
.view-wall .card { transition: transform .35s var(--ease), z-index 0s; }
@media (hover: hover) {
  .view-wall .card:hover { z-index: 5; transform: scale(1.14); }
  .view-wall .card:hover .art { box-shadow: 0 12px 34px rgba(0,0,0,.75), 0 0 40px -10px var(--c); }
}

/* floor mode — sleeves tipped out of their crate and left where they landed */
.view-floor .card {
  position: absolute; top: 0; left: 0;
  width: var(--size, 170px);
  transform: translate3d(var(--x, 0), var(--y, 0), 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  transition: transform .42s var(--ease), filter .42s var(--ease);
  will-change: transform;
}
.view-floor .card.in { transition: opacity .34s var(--ease), transform .42s var(--ease); }
.view-floor .meta, .view-floor .sleeve::after { display: none; }
.view-floor .sleeve { transform: none; }
.view-floor .art {
  border-radius: 1px;
  box-shadow:
    0 1px 2px rgba(0,0,0,.75),
    0 6px 14px rgba(0,0,0,.6),
    0 18px 40px rgba(0,0,0,.55);
}
.view-floor .sleeve::before { border-radius: 1px; }
@media (hover: hover) {
  /* picking one up off the floor */
  .view-floor .card:hover {
    z-index: 9999 !important;
    transform: translate3d(var(--x, 0), calc(var(--y, 0) - 14px), 0)
               rotate(calc(var(--rot, 0deg) * .18)) scale(calc(var(--scale, 1) * 1.16));
  }
  .view-floor .card:hover .art {
    box-shadow:
      0 2px 4px rgba(0,0,0,.75),
      0 18px 34px rgba(0,0,0,.7),
      0 46px 80px rgba(0,0,0,.6),
      0 0 70px -8px var(--c, #d9744a);
  }
}
.view-floor .card:focus-visible { z-index: 9999; }

/* list mode */
.view-list .card {
  display: grid; align-items: center; gap: 0 1.1rem; padding: .42rem .4rem;
  grid-template-columns: 46px minmax(0, 2fr) minmax(0, 1.45fr) minmax(0, 1.35fr) 54px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .18s;
}
.view-list .sleeve { width: 46px; aspect-ratio: 1; }
.view-list .sleeve::after { display: none; }
.view-list .art { height: auto; box-shadow: 0 2px 6px rgba(0,0,0,.5); font-size: 0; }
.view-list .l-title,
.view-list .l-artist,
.view-list .l-label,
.view-list .l-year {
  margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.view-list .l-title { font-family: var(--serif); font-weight: 400; font-size: 15px; letter-spacing: -.005em; }
.view-list .l-artist { font-size: 13px; color: var(--ink-dim); transition: color .2s; }
.view-list .l-label { font-size: 11.5px; letter-spacing: .05em; color: var(--muted); }
.view-list .l-year { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.view-list .card:hover { background: rgba(255,255,255,.04); }
.view-list .card:hover .l-artist { color: var(--c); }
@media (max-width: 860px) {
  .view-list .card { grid-template-columns: 42px minmax(0, 1fr) 50px; gap: 0 .85rem; padding: .5rem .3rem; }
  .view-list .sleeve { width: 42px; grid-row: span 2; }
  .view-list .l-title { grid-column: 2; grid-row: 1; }
  .view-list .l-artist { grid-column: 2; grid-row: 2; font-size: 12px; }
  .view-list .l-label { display: none; }
  .view-list .l-year { grid-column: 3; grid-row: span 2; }
}

.empty { text-align: center; padding: 5rem 0; color: var(--muted); font-family: var(--serif); font-size: 1.3rem; line-height: 1.8; }
.empty button { display: block; margin: 1.2rem auto 0; font-size: 12.5px; font-family: var(--sans); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1.1rem; }
.empty button:hover { background: rgba(255,255,255,.07); }
.loadmore {
  display: block; margin: clamp(2.4rem, 6vh, 4rem) auto 0; padding: .8rem 2.2rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-dim); transition: background .2s, color .2s;
}
.loadmore:hover { background: rgba(255,255,255,.07); color: var(--ink); }

/* =========================== STATS =================================== */
.stats { padding: clamp(3.5rem, 9vh, 7rem) var(--pad); border-top: 1px solid var(--line-soft); background: linear-gradient(to bottom, var(--bg), var(--bg-2)); }
.stats-head { max-width: 1900px; margin: 0 auto clamp(2rem, 5vh, 3.4rem); }
.stats-head h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 4.6vw, 3.4rem); letter-spacing: -.028em; line-height: 1; }
.stats-head p { margin: .7rem 0 0; color: var(--muted); font-size: 14px; }
.stats-grid { display: grid; gap: clamp(.9rem, 1.6vw, 1.4rem); grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); max-width: 1900px; margin: 0 auto; }
.panel { background: rgba(255,255,255,.026); border: 1px solid var(--line-soft); border-radius: 12px; padding: clamp(1.1rem, 2vw, 1.6rem); }
.panel.wide { grid-column: 1 / -1; }
.panel h3 { margin: 0 0 1.2rem; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

.decades { display: flex; align-items: flex-end; gap: clamp(4px, 1vw, 12px); height: 190px; }
.dec { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .5rem; height: 100%; min-width: 0; }
.dec .bar {
  width: 100%; max-width: 116px; border-radius: 3px 3px 1px 1px;
  background: linear-gradient(to top, rgba(217,116,74,.25), var(--accent));
  transition: height 1s var(--ease), filter .2s; height: 0;
}
.dec:hover .bar { filter: brightness(1.25); }
.dec .v { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.dec .k { font-size: 10.5px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }

.ranked { list-style: none; margin: 0; padding: 0; display: grid; gap: .62rem; }
.ranked li { position: relative; display: flex; align-items: baseline; gap: .7rem; min-width: 0; font-size: 13.5px; padding: .12rem .55rem .28rem 0; }
.ranked li::before {
  content: ""; position: absolute; left: -.55rem; right: auto; bottom: 0; height: 100%;
  width: calc(var(--w) * 1%); background: rgba(245,241,234,.055); border-radius: 4px; z-index: 0;
}
.ranked .nm { position: relative; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); }
.ranked li:hover .nm { color: var(--ink); }
.ranked .ct { position: relative; flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.ranked li button { display: contents; text-align: left; }

/* =========================== FOOTER ================================== */
.foot { padding: clamp(2.5rem, 6vh, 4rem) var(--pad) clamp(3rem, 7vh, 5rem); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12.5px; max-width: 1900px; margin: 0 auto; }
.foot p { margin: 0 0 .55rem; }
.foot a { color: var(--ink-dim); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.25); }
.foot a:hover { color: var(--ink); }
.foot .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: .5rem; vertical-align: middle; }
.foot .tiny { font-size: 11.5px; opacity: .8; }
.foot kbd { font-family: var(--sans); font-size: 10.5px; border: 1px solid var(--line); border-radius: 4px; padding: .1rem .32rem; color: var(--ink-dim); }
.totop { display: inline-block; margin-top: 1.4rem; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink-dim); }
.totop:hover { color: var(--ink); }

/* =========================== DETAIL ================================== */
.detail { position: fixed; inset: 0; z-index: 100; }
.detail[hidden] { display: none; }
.detail-bg {
  position: absolute; inset: 0;
  /* the sleeve's own colour floods the room it is shown in */
  background:
    radial-gradient(58% 52% at 24% 40%, color-mix(in srgb, var(--c, #d9744a) 72%, transparent) 0%,
                    color-mix(in srgb, var(--c, #d9744a) 22%, transparent) 42%, transparent 72%),
    radial-gradient(80% 60% at 76% 4%, color-mix(in srgb, var(--c, #d9744a) 30%, transparent) 0%, transparent 66%),
    radial-gradient(120% 90% at 50% 110%, color-mix(in srgb, var(--c, #d9744a) 20%, transparent) 0%, transparent 60%),
    rgba(6, 5, 5, .9);
  backdrop-filter: blur(26px) saturate(1.15); -webkit-backdrop-filter: blur(26px) saturate(1.15);
  animation: fade .35s var(--ease);
}
/* keep the words legible against all that colour */
.detail-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(6,5,5,.30) 0%, rgba(6,5,5,.46) 55%, rgba(6,5,5,.62) 100%);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.detail-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.detail-panel {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: clamp(3.2rem, 8vh, 6rem) var(--pad) clamp(3rem, 8vh, 5rem);
  display: grid; gap: clamp(1.8rem, 4vw, 3.6rem);
  animation: rise .45s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) { .detail-panel { grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; } }

.d-left { position: relative; }
@media (min-width: 900px) { .d-left { position: sticky; top: clamp(3rem, 8vh, 5rem); } }
.d-cover { position: relative; isolation: isolate; }
.d-cover::before { /* bloom thrown by the sleeve onto the backdrop */
  content: ""; position: absolute; inset: -18% -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--c, #d9744a) 78%, transparent) 0%,
    color-mix(in srgb, var(--c, #d9744a) 30%, transparent) 45%, transparent 72%);
  filter: blur(46px); opacity: .85;
  animation: bloom 7s var(--ease) infinite;
}
@keyframes bloom {
  0%, 100% { transform: scale(1); opacity: .78; }
  50%      { transform: scale(1.07); opacity: .95; }
}
.d-cover img.main {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px;
  box-shadow:
    0 2px 3px rgba(0,0,0,.6),
    0 10px 20px rgba(0,0,0,.55),
    0 40px 80px rgba(0,0,0,.7),
    0 0 90px -14px var(--c);
  outline: 1px solid rgba(255,255,255,.12); outline-offset: -1px;
}
.d-cover::after { /* the same card-stock edge the grid sleeves have */
  content: ""; position: absolute; inset: 0; border-radius: 3px; pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(0,0,0,.5);
  background: linear-gradient(to right,
    rgba(0,0,0,.4) 0, rgba(0,0,0,.18) 2px,
    rgba(255,255,255,.14) 2px, rgba(255,255,255,.03) 6px, transparent 10px);
}
.d-gallery { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.d-gallery img { width: 52px; height: 52px; object-fit: cover; border-radius: 2px; opacity: .55; cursor: pointer; transition: opacity .2s, transform .2s; outline: 1px solid rgba(255,255,255,.1); outline-offset: -1px; }
.d-gallery img:hover, .d-gallery img.on { opacity: 1; transform: translateY(-2px); }
.d-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.d-btn {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; letter-spacing: .06em; text-decoration: none; color: var(--ink-dim);
  transition: background .2s, color .2s, border-color .2s;
}
.d-btn:hover { background: rgba(255,255,255,.08); color: var(--ink); border-color: rgba(255,255,255,.22); }
.d-btn.primary { border-color: color-mix(in srgb, var(--c) 55%, transparent); color: var(--c); }
.d-btn.primary:hover { background: color-mix(in srgb, var(--c) 16%, transparent); color: #fff; }

.d-right { min-width: 0; }
.d-eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--c); margin: 0 0 1rem; }
.d-artist { margin: 0; font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 500; letter-spacing: .01em; color: var(--ink-dim); }
.d-title {
  margin: .35rem 0 0; font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance;
}
.d-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.2rem 1.6rem; margin: clamp(1.8rem, 4vh, 2.6rem) 0; padding: 1.4rem 0; border-block: 1px solid var(--line-soft); }
.d-facts dt { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.d-facts dd { margin: 0; font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.d-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.8rem; }
.d-tag { padding: .28rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; color: var(--ink-dim); }
.d-tag:hover { color: var(--ink); border-color: rgba(255,255,255,.28); }

.d-sec-h { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; font-weight: 500; }
.tracks { list-style: none; margin: 0 0 2rem; padding: 0; columns: 1; }
@media (min-width: 620px) { .tracks { columns: 2; column-gap: 2.4rem; } }
.tracks li { break-inside: avoid; display: flex; gap: .75rem; align-items: baseline; padding: .34rem 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.tracks li.side { border: 0; padding-top: 1rem; font-family: var(--serif); font-style: italic; color: var(--c); font-size: 14px; }
.tracks .pos { flex: none; width: 2.2em; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.tracks .tt { flex: 1; min-width: 0; color: var(--ink-dim); }
.tracks .dur { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-notes { font-size: 13.5px; color: var(--ink-dim); line-height: 1.65; white-space: pre-line; margin: 0 0 2rem; max-width: 62ch; }
.d-videos { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.d-videos a { display: flex; gap: .6rem; align-items: center; font-size: 13px; color: var(--ink-dim); text-decoration: none; padding: .4rem 0; border-bottom: 1px solid var(--line-soft); }
.d-videos a:hover { color: var(--ink); }
.d-videos .play { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 7px; color: var(--c); }

.detail-close, .detail-nav {
  position: fixed; z-index: 3; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; color: var(--ink-dim);
  background: rgba(20,18,15,.7); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: color .2s, background .2s, transform .2s;
}
.detail-close:hover, .detail-nav:hover { color: var(--ink); background: rgba(40,36,32,.9); }
.detail-close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; font-size: 24px; line-height: 1; }
.detail-nav { top: 50%; margin-top: -22px; font-size: 26px; line-height: 1; padding-bottom: 4px; }
.detail-nav.prev { left: max(.6rem, calc(50vw - 700px)); }
.detail-nav.next { right: max(.6rem, calc(50vw - 700px)); }
.detail-nav:hover.prev { transform: translateX(-2px); }
.detail-nav:hover.next { transform: translateX(2px); }
@media (max-width: 760px) { .detail-nav { top: auto; bottom: 1rem; margin: 0; } }

/* ============================================================
   The app around the shelf — landing page, account, settings
   ============================================================ */

/* the small account strip that floats over every page ------------------- */
.account {
  position: absolute; top: 0; right: 0; z-index: 70;
  display: flex; align-items: center; gap: .3rem;
  padding: clamp(.9rem, 2.4vw, 1.6rem) clamp(1rem, 4vw, 2.4rem);
}
.account form { margin: 0; }
.account-link {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .8rem; border-radius: 999px;
  font-size: 12.5px; color: var(--ink-dim); text-decoration: none;
  border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s;
}
.account-link:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.account-link.strong { border-color: var(--line); color: var(--ink); }
.account-link.strong:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); }
.account-link img { border-radius: 50%; width: 22px; height: 22px; object-fit: cover; }

/* flash messages -------------------------------------------------------- */
.flash {
  position: fixed; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 200;
  display: flex; align-items: center; gap: .9rem; max-width: min(92vw, 640px);
  padding: .7rem .8rem .7rem 1.1rem; border-radius: 999px;
  background: rgba(24, 21, 18, .95); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.55); font-size: 13.5px; color: var(--ink);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rise .35s var(--ease) both;
}
.flash-bad { border-color: color-mix(in srgb, #e4674a 45%, transparent); }
.flash-close { color: var(--muted); font-size: 18px; line-height: 1; padding: 0 .3rem; }
.flash-close:hover { color: var(--ink); }

/* the banner shown while a collection is being read --------------------- */
.syncbar {
  position: sticky; top: 0; z-index: 65;
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  padding: .7rem var(--pad); font-size: 13px; color: var(--ink-dim);
  background: rgba(20, 17, 14, .92); border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.syncbar form { margin: 0; }
.syncbar-spinner {
  width: 13px; height: 13px; flex: none; border-radius: 50%;
  border: 1.5px solid rgba(245,241,234,.22); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.syncbar-retry {
  font-size: 12px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}

/* calls to action ------------------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: clamp(1.6rem, 3.5vh, 2.4rem); }
.cta {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.6rem; border-radius: 999px;
  background: var(--ink); color: #0a0908; border: 1px solid var(--ink);
  font-size: 13.5px; font-weight: 500; letter-spacing: .01em; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.5); }
.cta.ghost { background: transparent; color: var(--ink-dim); border-color: var(--line); }
.cta.ghost:hover { color: var(--ink); border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.05); }
.cta.small { padding: .6rem 1.2rem; font-size: 12.5px; }
.cta.destructive { background: transparent; border-color: color-mix(in srgb, #e4674a 55%, transparent); color: #e89078; }
.cta.destructive:hover { background: color-mix(in srgb, #e4674a 18%, transparent); color: #fff; }
.cta[disabled] { opacity: .5; pointer-events: none; }
.cta-mark {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 50%, #0a0908 0 22%, transparent 23%), currentColor;
}
.cta-note { margin: 1rem 0 0; font-size: 12px; color: var(--muted); }

.kicker-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.kicker-link:hover { color: var(--ink); }
.pill-private {
  margin-left: .6rem; padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: 9.5px; letter-spacing: .14em; color: var(--muted);
}

/* landing page ---------------------------------------------------------- */
.pitch { padding: clamp(3.5rem, 9vh, 7rem) var(--pad); max-width: 1500px; margin: 0 auto; }
.pitch-grid { display: grid; gap: clamp(1.8rem, 4vw, 3.2rem); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.pitch h2 {
  margin: 0 0 .7rem; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -.02em;
}
.pitch p { margin: 0; color: var(--ink-dim); font-size: 14px; line-height: 1.65; max-width: 42ch; }

.shelves { padding: clamp(2.5rem, 7vh, 5rem) var(--pad) clamp(3.5rem, 9vh, 6rem); border-top: 1px solid var(--line-soft); }
.shelf-cards {
  display: grid; gap: .8rem; max-width: 1500px; margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.shelf-card {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1.1rem 1.2rem; border-radius: 12px; text-decoration: none;
  background: rgba(255,255,255,.026); border: 1px solid var(--line-soft);
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.shelf-card:hover { background: rgba(255,255,255,.06); border-color: var(--line); transform: translateY(-2px); }
.shelf-card-name { font-family: var(--serif); font-size: 17px; letter-spacing: -.01em; }
.shelf-card-count { font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.shelf-card-meta { font-size: 12px; color: var(--ink-dim); }

/* plain pages (settings) ------------------------------------------------ */
body.plain { background: linear-gradient(to bottom, #0d0b0a, var(--bg) 40%); }
.page { max-width: 720px; margin: 0 auto; padding: clamp(3.5rem, 10vh, 6rem) var(--pad) clamp(4rem, 10vh, 7rem); }
.page-title {
  margin: .6rem 0 clamp(2rem, 5vh, 3rem); font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -.03em; line-height: 1;
}
/* NB: .card belongs to the record grid, where it starts invisible until the
   reveal observer fires — panels on plain pages use .sheet instead. */
.sheet {
  padding: clamp(1.3rem, 3vw, 2rem); margin-bottom: 1rem; border-radius: 14px;
  background: rgba(255,255,255,.026); border: 1px solid var(--line-soft);
}
.sheet h2 {
  margin: 0 0 1.3rem; font-size: 10.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}
.sheet p { margin: 0 0 1.2rem; color: var(--ink-dim); font-size: 13.5px; line-height: 1.6; max-width: 52ch; }
.sheet.danger { border-color: color-mix(in srgb, #e4674a 22%, transparent); }
.form { display: grid; gap: 1.5rem; }

.field { display: grid; gap: .45rem; }
.field-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.input-group {
  display: flex; align-items: stretch; overflow: hidden;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, background .2s;
}
.input-group:focus-within { border-color: rgba(245,241,234,.32); background: rgba(255,255,255,.075); }
.input-prefix {
  display: flex; align-items: center; padding: .65rem .1rem .65rem .9rem;
  font-size: 13.5px; color: var(--muted); white-space: nowrap; user-select: none;
}
.input-group input {
  flex: 1; min-width: 0; padding: .65rem .9rem .65rem .1rem;
  background: none; border: 0; font-size: 13.5px;
}
.input-group input:focus { outline: none; }
.field-error { font-size: 12px; color: #e89078; }
.form .cta { justify-self: start; }

.check { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; }
.check input { margin-top: .2rem; accent-color: var(--accent); width: 15px; height: 15px; }
.check strong { display: block; font-size: 13.5px; font-weight: 500; }
.check small { display: block; margin-top: .2rem; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.kv { display: grid; gap: 1rem 1.6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 1.4rem; }
.kv dt { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.kv dd { margin: 0; font-size: 13.5px; }
.kv a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.foot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.foot-actions form { margin: 0; }
.totop.as-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim);
}
.totop.as-button:hover { color: var(--ink); }

/* waiting for a record's detail to arrive -------------------------------- */
.d-loading { display: flex; align-items: center; gap: .55rem; margin: 0 0 2rem; font-size: 13px; color: var(--muted); }
.d-loading-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent));
  animation: pulse 1.1s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
