/* Printed sleeves, rose vinyl and paper stock. The listening bar is an ink strip. */
:root {
  color-scheme: light;
  --black: #ece5d8;
  --base: #f5f0e6;
  --base-soft: #ede5d9;
  --elevated: #f9f5ed;
  --elevated-hover: #eee3dc;
  --line: #3a1a2825;
  --line-strong: #3a1a284b;
  --row-hover: #8c274b12;
  --text: #271822;
  --subdued: #675461;
  --quiet: #705e66;
  --green: #982349;
  --green-press: #7b1537;
  --green-bright: #7f153b;
  --green-glow: #98234936;
  --on-green: #fff8ed;
  --ink-dark: #24131f;
  --rose: #f4b9c7;
  --rose-bright: #ffabc6;
  --shadow-cover: 0 15px 31px #3f1b413d;
  --shadow-fab: 0 7px 15px #3f1b413b;
  --shadow-focus: 0 0 0 4px #98234925;
  --gap: 0px;
  --sidebar-w: 233px;
  --player-h: 72px;
  --pad-panel: clamp(24px, 3.25vw, 56px);
  --font: "Figtree", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Figtree", sans-serif;
}

.app { background: var(--base); padding: 0; }
.scroller { scrollbar-color: #8e667966 transparent; }
.scroller::-webkit-scrollbar-thumb { background-color: #8e667966; }
.scroller::-webkit-scrollbar-thumb:hover { background-color: #8e6679a8; }
:focus-visible { outline-color: var(--green); }

.sidebar {
  min-width: 0;
  gap: 0;
  border-right: 1px solid var(--line-strong);
  background: var(--base-soft);
}

.sidebar-panel, .library { padding-inline: 16px; border-radius: 0; background: transparent; }
.sidebar-panel { padding-block: 15px 16px; }
.brand { min-height: 59px; gap: 10px; margin-bottom: 18px; padding: 7px 5px; }
.brand-text { display: grid; }
.brand-name { font-size: 1.03rem; line-height: 1.2; font-weight: 800; }
.brand-tag { margin-top: 4px; font-size: .75rem; }
.record-mark {
  width: 37px; height: 37px; border-radius: 50%; box-shadow: none;
  background: radial-gradient(circle, var(--ink-dark) 0 4%, var(--rose) 5% 19%, transparent 20%),
    repeating-radial-gradient(circle, #7a4b61 0 1px, #321728 1px 2px, var(--ink-dark) 2px 4px);
}
.nav { gap: 4px; }
.nav-item { padding-inline: 12px; gap: 11px; border-radius: 3px; }
.nav-item svg, .library-title svg { width: 18px; height: 18px; }
.nav-item[aria-current="page"] { background: #ead5da; color: #771638; }
.nav-item:hover { background: #eadfda; }
.library { padding-top: 13px; border-top: 1px solid var(--line); }
.library-head { padding: 2px 0 8px; }
.library-title { gap: 8px; min-height: 44px; font-size: .72rem; letter-spacing: .105em; text-transform: uppercase; }
.library-list { padding: 0 0 8px; }
.library-row { grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 6px 4px; }
.library-row .cover, .library-row .cover-fallback { width: 36px; height: 36px; border-radius: 2px; }
.library-row-title { font-size: .81rem; font-weight: 750; }
.library-row-meta { font-size: .72rem; }

.content {
  border-radius: 0;
  background: var(--base);
}
.content::before { display: none; }
.topbar, .topbar.is-stuck {
  min-height: 62px;
  padding: 7px var(--pad-panel);
  background: var(--base);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}
.topbar-left { gap: 13px; }
.history-buttons { gap: 0; }
.round-button { width: 44px; height: 44px; background: transparent; }
.round-button:hover { background: var(--elevated-hover); transform: none; }
.round-button svg { width: 16px; height: 16px; }
.topbar-title {
  font-size: .74rem; font-weight: 750; text-transform: uppercase;
  letter-spacing: .13em; opacity: 1; transform: none;
}
.topbar-brand { display: none; }
.live-pill {
  background: #ead8db; color: #6e1d3d; font-weight: 750; padding: 0 12px;
  font-size: .73rem; border: 1px solid #5e24331f;
}
.live-pill[data-live="true"] { background: var(--green); color: var(--on-green); }
.live-pill[data-live="true"] .eq-bars span { background: var(--on-green); }
.live-pill[data-live="false"] .eq-bars span { background: #82495c; }
.view { max-width: 1720px; margin-inline: auto; padding-top: 18px; }

.journal-masthead {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 235px); gap: 18px 40px;
  align-items: end; padding: 10px 0 clamp(20px, 2vw, 30px);
}
.journal-kicker {
  color: var(--green); font-size: .7rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
}
.journal-masthead h1 {
  margin-top: 4px; color: var(--ink-dark); font: 800 clamp(4.25rem, 7.6vw, 9.1rem)/.84 var(--font-display);
  letter-spacing: -.027em; text-transform: uppercase;
}
.journal-masthead h1 span { color: var(--green); }
.journal-intro { color: var(--subdued); font-size: .97rem; line-height: 1.48; padding-bottom: 1px; }
.journal-sync { margin-top: 6px; font-size: .78rem; font-weight: 750; color: var(--green); }

.journal-cover {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.09fr);
  min-height: clamp(310px, 28vw, 460px); isolation: isolate;
  background: var(--rose); border: 1px solid #74264347;
  box-shadow: 0 15px 35px #55253f17;
}
.journal-cover-copy {
  display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0;
  padding: clamp(22px, 4vw, 58px);
  background: linear-gradient(140deg, #f4c2ca, var(--rose) 72%, #eeaabd);
}
.journal-cover-kicker { display: flex; align-items: center; gap: 9px; }
.record-dot {
  width: 10px; height: 10px; border: 1px solid currentcolor; border-radius: 50%;
  background: radial-gradient(circle, currentcolor 0 31%, transparent 38%);
  flex: 0 0 auto;
}
.journal-track-title {
  color: #311528; font: 700 clamp(2.65rem, 4.8vw, 6.1rem)/.91 var(--font-display);
  letter-spacing: -.018em; overflow-wrap: anywhere; text-wrap: balance;
}
.journal-track-title a:hover { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .09em; }
.journal-track-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 9px; color: #59344a; font-size: .94rem; }
.journal-track-meta a { color: #35172a; font-weight: 800; }
.journal-track-meta a:hover { text-decoration: underline; }
.journal-track-meta a + span::before { content: "·"; margin-inline-end: 9px; }
.journal-cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 8px; }
.journal-cover-actions .btn { min-height: 44px; padding-inline: 16px; font-size: .85rem; }
.journal-plays { color: #56253e; font-size: .78rem; font-weight: 750; }
.journal-cover-art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: clip;
  perspective: 860px;
  background:
    radial-gradient(ellipse at 35% 7%, #ccbfa72d, transparent 58%),
    radial-gradient(ellipse at 60% 76%, #81664e3b, transparent 70%),
    linear-gradient(163deg, #38312a, #191715 74%);
}

.journal-cover-art::before {
  position: absolute;
  inset: 12px;
  z-index: 1;
  border: 1px solid #f2dcc72b;
  pointer-events: none;
  content: "";
}

.journal-cover-art::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 45%, #e6bb8d2b, transparent 58%),
    repeating-linear-gradient(115deg, #f3e6d104 0 1px, transparent 1px 4px);
  content: "";
  opacity: .48;
}
.journal-cover-art.is-previewing-record::after { opacity: 1; }

.journal-scene-canvas {
  position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%;
  display: block; opacity: 0; pointer-events: none;
}
.journal-cover-art[data-record-scene="ready"] .journal-scene-canvas { opacity: 1; }
.journal-scene-link {
  position: absolute; z-index: 3; inset: 12px;
  border-radius: 1px; cursor: pointer;
}
.journal-scene-link:focus-visible { outline: 2px solid #fff1db; outline-offset: -4px; }

.journal-scene-chrome {
  position: absolute; z-index: 2; inset: 22px;
  display: none; grid-template: auto 1fr auto / 1fr auto;
  pointer-events: none;
  font: 700 .65rem/1.12 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .12em; text-transform: uppercase;
}
.journal-cover-art[data-record-scene="ready"] .journal-scene-chrome { display: grid; }
.journal-scene-mark { color: #ead9c1; }
.journal-scene-index { justify-self: end; color: #ebceb1; text-shadow: 0 1px 2px #1c1510; }
.journal-scene-cue {
  grid-area: 3 / 1 / auto / -1;
  justify-self: end;
  padding: 7px 8px;
  color: #faf1e4; background: #211d19f0; border: 1px solid #e1c5aa56;
}
.journal-scene-cue span { display: inline-block; margin-right: 2px; }
.journal-scene-cue--pointer { display: none; }
.journal-cover-art.is-previewing-record .journal-scene-cue { border-color: #edc7a29e; }

@media (hover: hover) and (pointer: fine) {
  .journal-scene-cue--pointer { display: block; }
  .journal-scene-cue--touch { display: none; }
}

.journal-deck {
  --sleeve-size: clamp(132px, 17vw, 252px);
  display: grid;
  place-items: center;
  width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(calc(7deg + var(--depth-phase, 0) * -10deg)) rotateZ(-7deg);
}

.journal-vinyl {
  grid-area: 1 / 1;
  width: min(55%, calc(var(--sleeve-size) * 1.19));
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #e3afc357;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, #f6b2dc2b 0 .55px, transparent .95px 3px, #0004 3.1px 3.9px),
    conic-gradient(from 25deg, #210f1e, #190b17 11%, #64384e 24%, #1b0b17 35%, #301322 57%, #7d4355 70%, #1f101b 85%, #210f1e);
  box-shadow: 3px 3px 0 #3a152c, 14px 20px 34px #2b102c88, inset 0 0 0 4px #2b1227;
  transform:
    translate3d(calc(26% + var(--depth-phase, 0) * -37px), calc(var(--depth-phase, 0) * -15px), 8px)
    rotateZ(calc(var(--depth-phase, 0) * -93deg));
}

.journal-vinyl-label {
  display: block;
  width: 34%;
  aspect-ratio: 1;
  border: 1px solid #e8abbe70;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #1f0b17 0 5%, #f6b6bf 6% 7.5%, transparent 9%),
    repeating-radial-gradient(circle at center, #fbc3ce24 0 .6px, transparent 1.15px 4.1px),
    conic-gradient(from 74deg, #e297ad, #984360, #d17f99, #e297ad);
}

.journal-sleeve {
  --sleeve-tilt: 0deg;
  --sleeve-lift: 0px;
  position: relative;
  display: block;
  grid-area: 1 / 1;
  width: var(--sleeve-size);
  max-width: 62%;
  aspect-ratio: 1;
  outline-offset: 8px;
  transform-style: preserve-3d;
  transform:
    translate3d(calc(-29% + var(--depth-phase, 0) * 12px), calc(var(--depth-phase, 0) * -21px), calc(45px + var(--sleeve-lift)))
    rotateY(calc(-22deg + var(--depth-phase, 0) * 27deg + var(--sleeve-tilt)));
}

.journal-sleeve::before {
  position: absolute;
  inset: 0 0 0 auto;
  width: 10px;
  background: linear-gradient(90deg, #2e1428, #bd879c);
  transform-origin: right center;
  transform: translateZ(4px) rotateY(-90deg);
  content: "";
}

.journal-sleeve .cover,
.journal-sleeve .cover-fallback {
  border: 1px solid #ffdfeb87;
  border-radius: 0;
  box-shadow: 13px 20px 24px #290b245c;
  transform: translateZ(4px);
}

.journal-sleeve:focus-visible { outline-color: #fff5df; }

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .journal-sleeve:hover, .journal-sleeve:focus-visible {
    --sleeve-tilt: 12deg;
    --sleeve-lift: 9px;
  }
}

.journal-totals {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--line-strong); padding: 16px 0;
}
.journal-totals dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.journal-totals dl > div { display: grid; grid-template-areas: "num" "label"; padding-inline: 16px; border-left: 1px solid var(--line); }
.journal-totals dl > div:first-child { padding-inline-start: 0; border-left: 0; }
.journal-totals dt { grid-area: label; color: var(--subdued); font-size: .78rem; font-weight: 700; }
.journal-totals dd {
  grid-area: num; margin: 0; color: var(--ink-dark); font: 700 clamp(2rem, 3vw, 3.35rem)/1 var(--font-display);
  font-variant-numeric: tabular-nums; letter-spacing: -.025em;
}
.journal-text-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--green); font-size: .85rem; font-weight: 800; }
.journal-text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.journal-text-link span { font-size: 1.13rem; }
.journal-recent { margin-top: 26px; }
.journal-recent .heading { font: 700 clamp(1.9rem, 3.6vw, 3.15rem)/1 var(--font-display); text-transform: uppercase; }
.journal-recent .shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.35vw, 20px); }
.journal-recent .card { gap: 4px; padding: 0 0 8px; border-radius: 0; background: transparent; }
.journal-recent .card-art { margin-bottom: 4px; }
.journal-recent .card-sleeve {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  transform:
    perspective(690px)
    translateY(calc(var(--depth-phase, 0) * 7px))
    rotateX(calc(var(--depth-phase, 0) * -18deg))
    rotateY(calc(var(--depth-phase, 0) * -12deg));
}
.journal-recent .card-sleeve::before {
  position: absolute;
  inset: 1px 0 0 0;
  border-radius: 2px;
  background: #58364c;
  box-shadow: 1px 6px 12px #33152d40;
  transform: translateZ(-5px) translateY(2px);
  content: "";
}
.journal-recent .card-art .cover, .journal-recent .card-art .cover-fallback { border-radius: 2px; box-shadow: 0 5px 9px #3f1b4120; }
.journal-recent .card:hover .card-title { color: var(--green); }

@media (prefers-reduced-motion: no-preference) {
  .journal-masthead h1 { animation: journal-print-in 780ms cubic-bezier(.19, 1, .22, 1) both; }
  .journal-intro { animation: journal-print-in 750ms 95ms cubic-bezier(.19, 1, .22, 1) both; }
  .journal-cover-copy > * { animation: journal-type-in 660ms cubic-bezier(.19, 1, .22, 1) both; }
  .journal-cover-copy > :nth-child(2) { animation-delay: 85ms; }
  .journal-cover-copy > :nth-child(3) { animation-delay: 160ms; }
  .journal-cover-copy > :nth-child(n + 4) { animation-delay: 225ms; }
  .journal-scene-canvas { transition: opacity 220ms ease-out; }
  .journal-cover-art::after, .journal-scene-cue { transition: opacity 450ms ease, border-color 450ms ease; }
  .journal-scene-chrome { animation: journal-type-in 450ms 170ms both; }
  .journal-scene-cue span { animation: journal-cue 680ms 1100ms ease-in-out 3; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .journal-recent .card-art {
      animation: journal-type-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 54%;
    }
    .journal-recent .card:nth-child(even) .card-art { animation-range-end: entry 77%; }
  }
}

@keyframes journal-print-in {
  from { opacity: .25; transform: translateY(.28em) skewY(3deg); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: translateY(0) skewY(0); clip-path: inset(-15% -5% -22% -5%); }
}
@keyframes journal-type-in {
  from { opacity: .35; translate: 0 15px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes journal-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .journal [data-depth] { --depth-phase: 0 !important; }
}

/* The other chapters keep their existing features and adopt the same paper palette. */
.display, .display-sm, .stats-page-head h1 { font-family: var(--font-display); }
.hero-compact, .stats-page-head { padding-top: 18px; }
.hero .hero-title { font-weight: 700; }
.cover-fallback { background: #e9d7dd; color: #7b3f59; }
.feature, .feature:hover { background: var(--base-soft); }
.panel, .stat-tile, .stat-tile:hover, .heatmap-card {
  background: var(--elevated);
  border: 1px solid var(--line);
}
.heatmap-cell { background: #76526318; }
.heatmap-level-1 { background: #98234940; }
.heatmap-level-2 { background: #98234972; }
.heatmap-level-3 { background: #982349b7; }
.heatmap-level-4 { background: var(--green); }
.search-field, .segmented { background: var(--elevated); }
.meter { background: #8c274b21; }
.meter span { background: linear-gradient(90deg, var(--green), #cc7994); }
.artist-hero-bg { opacity: .16; }
.artist-hero::after { background: linear-gradient(180deg, transparent, var(--base)); }
.stats-library .stat-tile { border-block: 0; border-right: 0; }
.listening-card {
  --text: #fff8ef; --subdued: #d9c4d0; --quiet: #cdb5c4;
  --line: #f7d2e625; --line-strong: #f7d2e647; --row-hover: #f7d2e617;
  --green: var(--rose-bright); color: var(--text); background: var(--ink-dark);
}
.listening-card :focus-visible { outline-color: var(--rose-bright); }
.listening-bar-fill { background: #9b4669; }
.listening-bar[aria-pressed="true"] .listening-bar-fill { background: var(--rose); }
.listening-bar[aria-pressed="true"] .listening-bar-label, .listening-ranking-minutes strong { color: #ffd1df; }
.listening-switch button[aria-pressed="true"] { background: #f3dce5; color: #35182a; }
.listening-detail { border-color: #f3dce547; background: #f3dce50c; }

.player {
  --text: #fff8ef; --subdued: #dac8d2; --quiet: #c8adbe; --green: var(--rose-bright);
  padding-inline: clamp(14px, 3vw, 36px); border-top: 1px solid #55253f; color: var(--text); background: var(--ink-dark);
}
.player :focus-visible { outline-color: var(--rose-bright); }
.player .transport-ghost, .player .volume-ghost { display: none; }
.player .transport-main { width: 44px; height: 44px; color: var(--ink-dark); background: var(--rose); }
.player .transport-main:hover { background: var(--rose-bright); }
.player-badge { background: #ffabc624; }
.player-badge[data-live="false"] { color: var(--subdued); background: #fff1f620; }
.tabbar { background: var(--base-soft); border-top: 1px solid var(--line-strong); }
.tab { min-height: 47px; }
.tab[aria-current="page"] { color: #771638; }
.tab[aria-current="page"] > span { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1180px) {
  :root { --sidebar-w: 205px; }
  .sidebar-panel, .library { padding-inline: 12px; }
  .brand { gap: 8px; }
  .brand-name { font-size: .95rem; }
  .journal-masthead { grid-template-columns: minmax(0, 1fr) minmax(145px, 190px); gap: 20px; }
  .journal-masthead h1 { font-size: clamp(4.1rem, 7vw, 6.5rem); }
  .journal-recent .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --pad-panel: clamp(15px, 3.4vw, 27px); }
  .topbar, .topbar.is-stuck { min-height: 59px; }
  .topbar-brand { display: block; color: var(--ink-dark); font-size: .96rem; font-weight: 800; white-space: nowrap; }
  .topbar-title { display: none; }
  .topbar-left { gap: 7px; }
  .history-buttons #nav-forward { display: none; }
  .journal-masthead h1 { font-size: clamp(4.1rem, 9.5vw, 7rem); }
  .journal-cover-copy { padding: clamp(19px, 4vw, 38px); }
  .player {
    margin: 0; border-radius: 0; background: var(--ink-dark); box-shadow: none; padding: 8px var(--pad-panel);
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .player-track { grid-column: 1; }
  .player-extras { display: flex; grid-column: 2; grid-row: 1; }
  .player-center { grid-column: 1 / -1; margin-top: 4px; }
  .player .player-spotify { width: 44px; height: 44px; }
  .player-badge[data-live="false"] { padding: 0; background: none; }
}

@media (max-width: 580px) {
  .topbar, .topbar.is-stuck { min-height: 54px; padding-block: 5px; }
  .topbar-left { gap: 4px; }
  .round-button { margin-inline-start: -9px; }
  .live-pill { padding-inline: 9px; }
  .view { padding-top: 12px; }
  .journal-masthead { grid-template-columns: 1fr; align-items: start; padding-top: 6px; gap: 10px; }
  .journal-masthead h1 { font-size: clamp(3.4rem, 13.8vw, 5.1rem); }
  .journal-intro { font-size: .87rem; }
  .journal-sync { margin-top: 3px; font-size: .73rem; }
  .journal-cover { grid-template-columns: 1fr; }
  .journal-cover-art { grid-row: 1; min-height: clamp(234px, 65vw, 325px); perspective: 660px; }
  .journal-scene-chrome { inset: 20px; font-size: .59rem; }
  .journal-cover-copy { justify-content: start; gap: 8px; padding: 17px 18px 20px; }
  .journal-track-title { max-width: 18ch; font-size: clamp(2.25rem, 9vw, 3.65rem); }
  .journal-track-meta { font-size: .82rem; }
  .journal-cover-actions { margin-top: 4px; }
  .journal-deck { --sleeve-size: clamp(140px, 41vw, 202px); }
  .journal-totals { grid-template-columns: 1fr; gap: 0; padding: 13px 0 2px; }
  .journal-totals dl > div { padding-inline: 9px; }
  .journal-totals dt { font-size: .72rem; }
  .journal-totals dd { font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .journal-recent { margin-top: 19px; }
  .journal-recent .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-track { grid-template-columns: 39px minmax(0, 1fr) auto; gap: 8px; }
  .player-art, .player-art .cover, .player-art .cover-fallback { width: 39px; height: 39px; }
  .player-badge { font-size: .58rem; }
}

