/* text-align:center alone stopped working once the title picked up .shiny-text — that class sets
   display:inline-block (needed so the shine gradient's background-size:200% maps against the
   text's own width, not the full row), which shrinks the h1 to its content width and takes it out
   of the "full-width block centering its own text" case text-align was relying on. display:table
   keeps that same shrink-to-fit sizing (so the gradient math is unaffected) while still being a
   block-level box that margin:auto can actually centre. text-align:center is kept too — it's what
   centres a shorter second line against a longer first one if the title ever wraps. */
body[data-page="music"] main > h1 {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.timeline-wrap {
  --fade-left: 0px;
  --fade-right: 60px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: auto;
  overflow-y: hidden;
  /* Was var(--space-6) (64px) — far more than the hover tilt/scale effect (js/tilted-card.js:
     max 10deg rotation + 1.06 scale, well under 20px of overflow at these cover sizes) actually
     needs clearance for; that excess was most of what pushed this page's content below the fold
     on shorter viewports (13" MacBook-class laptops). var(--space-4) still leaves comfortable
     headroom for the hover effect without clipping (confirmed by hovering every category). */
  padding: var(--space-4) 0;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent, black var(--fade-left), black calc(100% - var(--fade-right)), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black var(--fade-left), black calc(100% - var(--fade-right)), transparent);
  scrollbar-width: none;
}

.timeline-wrap::-webkit-scrollbar {
  display: none;
}

.timeline-scrollbar {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: var(--space-3);
}

.timeline-scrollbar__track {
  position: relative;
  height: 4px;
  margin: 0 var(--space-4);
  background: var(--color-border);
  border-radius: 2px;
  cursor: pointer;
}

.timeline-scrollbar__thumb {
  position: absolute;
  top: 0;
  height: 4px;
  min-width: 24px;
  background: var(--color-text-muted);
  border-radius: 2px;
  cursor: grab;
  transition: background 0.2s ease;
}

.timeline-scrollbar__thumb:hover,
.timeline-scrollbar__thumb:active {
  background: var(--color-accent);
  cursor: grabbing;
}

.timeline {
  position: relative;
  /* Was 380 — more than the releases actually need (album covers extend ~184px above the
     baseline, EP/single covers ~134px below it, ~318px total; the hover tilt/scale effect adds a
     bit more on top of that). 350 keeps clear headroom for that hover effect (confirmed by
     hovering an album, an EP, and a single — none clip against this box) while dropping the
     unused slack that was pushing the description panel further down than necessary. */
  height: 350px;
  margin: 0 var(--space-4);
}

.timeline__baseline {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
}

.timeline__year {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-body-light);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 0 var(--space-2);
  white-space: nowrap;
}

.release {
  position: absolute;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.release img {
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  /* No CSS transition on transform — js/tilted-card.js's own requestAnimationFrame loop already
     eases every frame toward its target; a CSS transition on top of that would just be a second,
     independent smoothing system fighting the first one's constant re-targeting. box-shadow has
     no JS equivalent, so it keeps its own transition. */
  transition: box-shadow 0.2s ease;
}

.release[aria-pressed="true"] img,
.release[aria-pressed="true"] .release__no-art,
.release[aria-pressed="true"] .release-placeholder {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

/* Tooltip follows the cursor's exact position inside the tile (see js/tilted-card.js) rather
   than sitting in one fixed spot — translate() is set inline per-move, this just handles the
   static look and the fade in/out. */
.tilted-card__tooltip {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  margin: 0.75rem 0 0 0.75rem;
  padding: 0.3rem 0.6rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.release[aria-pressed="true"] img,
.release[aria-pressed="true"] .release__no-art,
.release[aria-pressed="true"] .release-placeholder {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.release--album {
  bottom: calc(50% + 24px);
  width: 160px;
}

.release--album img {
  width: 160px;
}

.release--ep {
  top: calc(50% + 24px);
  width: 110px;
}

.release--ep img {
  width: 110px;
}

.release--single {
  top: calc(50% + 24px);
  width: 80px;
}

.release--single img {
  width: 80px;
}

.release-line {
  position: absolute;
  width: 1px;
  background: var(--color-border);
  transform: translateX(-50%);
  z-index: 0;
}

.release-line--album {
  bottom: 50%;
  height: 24px;
}

.release-line--ep,
.release-line--single {
  top: 50%;
  height: 24px;
}

.release-month {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: var(--font-body-light);
  font-size: 0.65rem;
  padding: 1px 4px;
  white-space: nowrap;
  z-index: 1;
}

.release__no-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 100%;
  border: 1px dashed var(--color-border);
  border-radius: 2px;
  padding: var(--space-1);
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.2;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

.release-placeholder {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.release-placeholder__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-1);
  font-family: var(--font-heading);
  color: #2a2a2a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.release--single .release-placeholder__label {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.release-detail__no-art {
  width: 240px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--color-border);
  border-radius: 2px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.release-detail__placeholder {
  position: relative;
  width: 240px;
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.release-detail__placeholder .release-placeholder__label {
  font-size: 1.4rem;
}

/* overflow isn't set here (stays visible) deliberately — .release-detail__cover-glow's own glow
   layer bleeds 20px past its own box on purpose (see css/base.css's .border-glow-card > .edge-light),
   and clipping this container would cut that bleed off right at the panel's edge. */
.release-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
  min-height: 260px;
}

/* Slides the whole panel (artwork + info as one unit) into place as if it were tucked behind the
   timeline strip directly above it, rather than just appearing instantly when a new release is
   picked — restarted on every selection from js/music-timeline.js (remove class, force reflow,
   re-add), not just applied once on page load. */
@keyframes release-detail-reveal {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.release-detail.release-detail--enter {
  animation: release-detail-reveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.release-detail img {
  width: 240px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* Tilted Card needs the perspective on the *direct* parent of whatever actually rotates —
   confirmed the hard way on the Bio grid (see css/bio.css), where perspective sat two levels up
   instead of one and the tilt silently rendered flat. This wrapper exists purely to be that
   direct parent for the detail-panel's own (much larger) cover art, same as the small timeline
   tiles already got for free by having the img as .release's own direct child.
   Deliberately bare otherwise — no radius/overflow/shadow of its own. cover (the img inside)
   already carries its own border-radius + box-shadow and is what actually rotates; giving this
   *static* wrapper any visible framing too is exactly what made the effect look like a fixed
   viewport with the photo sliding around inside it instead of the whole card tilting. */
.release-detail__cover-wrap {
  flex-shrink: 0;
}

/* js/border-glow.js wraps .release-detail__cover-wrap in a .border-glow-card — that's now the
   direct flex child of .release-detail instead of the cover-wrap itself, so flex-shrink:0 (won't
   squeeze narrower than the 240px art on a tight viewport) has to move here with it. */
.release-detail__cover-glow {
  flex-shrink: 0;
}

.release-detail__category {
  color: var(--color-accent);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.release-detail__description {
  /* Darker than the shared --color-text-muted (#999997, used for lighter-weight labels/dates
     elsewhere) — this is a full paragraph of body copy, not a small label, so the usual muted
     tone read as too low-contrast to read comfortably. A one-off shade rather than changing the
     shared token itself, which is used sitewide for things that should stay that light. */
  color: #6e6e6c;
  font-family: var(--font-body-light);
}

/* Reuses the same YouTube logo asset as the Lyrics page's "Play from" button purely as a visual
   cue ("this streams from YouTube"), but this one is a plain outbound link, not an inline player
   — this timeline has no player of its own to embed a video into, unlike the Lyrics page. */
.release-detail__yt-watch-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.release-detail__yt-watch {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  gap: 0.5em;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text);
  transition: border-color 0.4s ease, color 0.4s ease 0.1s;
}

.release-detail__yt-watch:hover,
.release-detail__yt-watch:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transition-duration: 0.2s;
  transition-delay: 0s;
}

/* Qualified with the parent class (not just the logo's own single class) specifically to
   out-specificity .release-detail img above — that rule is sized for the 240px cover-art
   thumbnail, and this logo img lives inside .release-detail too, so without the extra
   specificity here it was inheriting that same fixed 240px width regardless of its own
   width:auto. Same reasoning for box-shadow: none here — that same .release-detail img rule
   also gives every img inside this panel a drop shadow sized for the cover art, which was
   bleeding onto this small inline logo too. */
.release-detail__yt-watch .release-detail__yt-watch-logo {
  height: 1.3em;
  width: auto;
  margin-left: auto;
  box-shadow: none;
}

.tracklist-detail {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.tracklist-detail__label {
  color: var(--color-text-muted);
  font-family: var(--font-body-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-3) 0 var(--space-2);
}

.tracklist-detail__label:first-child {
  margin-top: 0;
}

.tracklist-detail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
  column-gap: var(--space-4);
  font-size: 0.9rem;
}

.tracklist-detail__list li {
  break-inside: avoid;
  padding: 2px 0;
}

.tracklist-detail__num {
  display: inline-block;
  width: 1.5em;
  color: var(--color-text-muted);
  font-family: var(--font-body-light);
}

/* One block per physical format (CD single, 7" vinyl, DVD...) — stacked rather than tabbed, per
   the user's own choice, since most singles only have 2-4 and a reader browsing a fan-info page
   is more likely to want to compare them at a glance than switch between them one at a time. */
.release-format + .release-format {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* Catalog numbers and release notes are fine-print, same tone as other small secondary labels
   sitewide (e.g. the Videos list's director credit) — unlike .release-detail__description just
   above, this isn't a paragraph of body copy, so the lighter muted tone still reads fine here. */
.release-format__meta {
  color: var(--color-text-muted);
  font-family: var(--font-body-light);
  font-size: 0.8rem;
  margin: var(--space-1) 0 0;
}

@media (max-width: 600px) {
  .release-detail {
    flex-direction: column;
  }

  .release-detail img,
  .release-detail__placeholder,
  .release-detail__no-art {
    width: 160px;
  }
}
