:root {
  color-scheme: light;
  --paper: #faf9f7;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #5f5a54;
  --faint: #8c8780;
  --line: #dcd8d1;
  --line-strong: #bdb7ae;
  --cobalt: #1f40ed;
  --cobalt-dark: #1732b8;
  --cobalt-soft: #e8ecff;
  --healthy: #0f7657;
  --healthy-soft: #e1f3ec;
  --warning: #b5473c;
  --warning-soft: #f8e8e5;
  --display: "Songti SC", "STSong", "Noto Serif SC", serif;
  --body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --shadow-float: 0 18px 50px rgba(40, 36, 30, 0.1), 0 2px 10px rgba(40, 36, 30, 0.06);
  --page: min(1280px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 15% 8%, rgba(31, 64, 237, 0.035), transparent 26%),
    repeating-linear-gradient(91deg, rgba(17, 24, 39, 0.012) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(3deg, rgba(17, 24, 39, 0.008) 0 1px, transparent 1px 7px);
}

button,
select {
  color: inherit;
  font: inherit;
}

button,
a,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  border: 0;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cobalt) 34%, transparent);
  outline-offset: 3px;
}

::selection {
  color: var(--surface);
  background: var(--cobalt);
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  width: var(--page);
  margin: 18px auto 0;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.topbar.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-100% - 36px));
}

.topbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(189, 183, 174, 0.6);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(18px) saturate(135%);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  text-decoration: none;
}

.brand__mark-frame {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 64, 237, 0.1);
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand__mark {
  position: absolute;
  top: -4px;
  left: -14px;
  display: block;
  width: 67px;
  height: 67px;
  max-width: none;
}

.brand:hover .brand__mark-frame,
.brand:focus-visible .brand__mark-frame {
  transform: rotate(12deg) scale(1.04);
}

.brand__type {
  display: grid;
  gap: 1px;
}

.brand__type strong,
.brand__type small {
  line-height: 1.15;
}

.brand__type strong {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

.brand__type small {
  color: var(--muted);
  font-size: 0.68rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--paper);
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  font-size: 0.76rem;
}

.service-status svg {
  width: 15px;
  height: 15px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 4px rgba(140, 135, 128, 0.12);
}

.service-status[data-state="healthy"] {
  color: var(--healthy);
}

.service-status[data-state="healthy"] .status-dot {
  background: var(--healthy);
  box-shadow: 0 0 0 4px rgba(15, 118, 87, 0.12);
}

.service-status[data-state="warning"],
.service-status[data-state="error"] {
  color: var(--warning);
}

.service-status[data-state="warning"] .status-dot,
.service-status[data-state="error"] .status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(181, 71, 60, 0.12);
}

.icon-button {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--surface);
  background: var(--cobalt);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button:hover {
  transform: translateY(-2px);
  background: var(--cobalt-dark);
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.icon-button.is-spinning svg {
  animation: refresh-spin 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(540deg); }
}

.page-shell {
  width: var(--page);
  margin: 24px auto 0;
}

.hero-ledger {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(560px, 1.18fr);
  gap: clamp(36px, 6vw, 96px);
  min-height: 620px;
  padding: clamp(76px, 9vw, 120px) 0 clamp(64px, 8vw, 104px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
}

.hero-watermark {
  position: absolute;
  z-index: -1;
  user-select: none;
  color: rgba(17, 24, 39, 0.035);
  font-family: var(--mono);
  font-weight: 700;
  white-space: nowrap;
}

.hero-watermark--date {
  top: 8px;
  left: -0.04em;
  font-size: clamp(5rem, 12vw, 10.5rem);
  letter-spacing: -0.075em;
}

.hero-watermark--chapter {
  right: 0;
  bottom: 8px;
  writing-mode: vertical-rl;
  font-size: clamp(2.2rem, 5vw, 5.4rem);
  letter-spacing: 0.08em;
}

.hero-copy {
  align-self: center;
  min-width: 0;
}

.eyebrow,
.metric-label,
.control-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow > span {
  display: inline-grid;
  width: 23px;
  height: 23px;
  margin-right: 8px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--cobalt);
  font-size: 0.58rem;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 7.2em;
  margin: 26px 0 20px;
  font-family: var(--display);
  font-size: clamp(3.6rem, 6.6vw, 7.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.hero-copy h1 span {
  display: block;
  margin-top: 0.14em;
  color: var(--cobalt);
  font-size: 0.72em;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  max-width: 37rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

.window-control {
  display: grid;
  gap: 10px;
  margin-top: 38px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.seg-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.seg-button svg {
  width: 13px;
  height: 13px;
}

.seg-button:hover {
  color: var(--ink);
}

.seg-button:active {
  transform: translateY(1px);
}

.seg-button.is-active {
  color: var(--surface);
  background: var(--cobalt);
}

.cover-ledger {
  align-self: center;
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(189, 183, 174, 0.72);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 30px 80px rgba(52, 45, 37, 0.08);
  backdrop-filter: blur(12px);
}

.ledger-head,
.block-head,
.column-head,
.heatmap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.section-rail h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.7vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.ledger-coordinate {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.ledger-coordinate strong {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.mosaic {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.mosaic-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mosaic-row__meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mosaic-row__meta strong,
.mosaic-row__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mosaic-row__meta strong {
  font-family: var(--mono);
  font-size: 0.7rem;
}

.mosaic-row__meta span {
  color: var(--muted);
  font-size: 0.6rem;
}

.mosaic-groove {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  padding: 4px 7px 4px 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(220, 216, 209, 0.5);
}

.mosaic-groove::after {
  position: absolute;
  right: 0;
  top: -1px;
  width: 4px;
  height: calc(100% + 2px);
  content: "";
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 1px, transparent 1px 4px);
}

.mosaic-row.is-gap .mosaic-groove {
  border-color: var(--warning);
  background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(181, 71, 60, 0.07) 7px 9px);
}

.mosaic-row.is-insufficient .mosaic-groove {
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(95, 90, 84, 0.06) 10px 11px);
}

.mosaic-cover,
.mosaic-slot {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
}

.mosaic-cover {
  padding: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  perspective: 1200px;
  isolation: isolate;
}

.mosaic-cover::before {
  position: absolute;
  inset: 13% -10% 10% 14%;
  z-index: -2;
  border-radius: 50%;
  content: "";
  opacity: 0.34;
  background: var(--cover-glow, rgba(31, 64, 237, 0.18));
  filter: blur(10px);
  transition: opacity 240ms ease;
}

.vinyl-disc {
  position: absolute;
  z-index: -1;
  top: 8%;
  right: 4%;
  width: 84%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--cobalt) 0 8%, #d7d4ce 9% 13%, #171717 14% 20%, transparent 21%),
    repeating-radial-gradient(circle, #151515 0 2px, #2b2b2b 2px 3px);
  box-shadow: 0 5px 12px rgba(17, 24, 39, 0.28);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cover-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 2px;
  background: linear-gradient(110deg, #ebe8e2 8%, #f9f8f5 18%, #ebe8e2 33%);
  background-size: 220% 100%;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.12);
  transform: translateZ(0);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 300ms ease;
  animation: cover-shimmer 1.35s linear infinite;
}

.cover-media.is-loaded {
  background: #eeeae4;
  animation: none;
}

.cover-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(7px);
  transform: scale(1.04);
  transition: opacity 360ms ease, filter 420ms ease, transform 420ms ease;
}

.cover-media.is-loaded img {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.cover-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.38), transparent 38% 66%, rgba(255, 255, 255, 0.16));
  opacity: 0.55;
  transform: translateX(-70%);
  transition: transform 520ms ease;
}

@keyframes cover-shimmer {
  to { background-position-x: -220%; }
}

.mosaic-slot {
  border: 1px dashed rgba(189, 183, 174, 0.52);
  background: rgba(250, 249, 247, 0.7);
}

.ledger-caption {
  margin: 16px 0 0 86px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

@media (hover: hover) and (pointer: fine) {
  .mosaic-cover:hover,
  .mosaic-cover:focus-visible {
    z-index: 4;
  }

  .mosaic-cover:hover .cover-media,
  .mosaic-cover:focus-visible .cover-media {
    transform: rotateY(-12deg) rotateX(4deg) translate3d(-3px, -2px, 18px);
    box-shadow: 9px 12px 22px rgba(17, 24, 39, 0.22);
  }

  .mosaic-cover:hover .vinyl-disc,
  .mosaic-cover:focus-visible .vinyl-disc {
    transform: translateX(47%) rotate(55deg);
  }

  .mosaic-cover:hover .cover-media::after,
  .mosaic-cover:focus-visible .cover-media::after {
    transform: translateX(45%);
  }

  .mosaic-cover:hover::before,
  .mosaic-cover:focus-visible::before {
    opacity: 0.7;
  }
}

.metrics-section,
.ledger-section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border-bottom: 1px solid var(--line-strong);
}

.section-rail {
  padding: 34px 28px 34px 0;
  border-right: 1px solid var(--line);
}

.section-rail > span,
.block-index {
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.section-rail h2 {
  margin-top: 8px;
  font-size: 1.55rem;
}

.section-rail p {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  line-height: 1.6;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.metric-item {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 176px;
  padding: 28px clamp(18px, 2.6vw, 38px);
  border-right: 1px solid var(--line);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-label svg {
  width: 13px;
  height: 13px;
  color: var(--cobalt);
}

.metric-value {
  display: inline-flex;
  align-items: baseline;
  margin-top: 12px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: clamp(2rem, 3.4vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-prefix {
  flex: 0 0 auto;
  margin-right: 0.03em;
  font-size: 0.5em;
  letter-spacing: 0;
}

.metric-digits {
  display: inline-block;
}

.metric-item small {
  margin-top: 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
  text-overflow: ellipsis;
}

.ledger-section {
  grid-template-columns: 280px minmax(0, 1fr);
}

.section-heading {
  padding: 72px 34px 72px 0;
  border-right: 1px solid var(--line);
}

.section-heading h2 {
  margin-top: 18px;
  line-height: 1.1;
}

.section-heading > p:last-child,
.section-heading--inline > p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.8;
}

.split-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.stream-column {
  min-width: 0;
  padding: 58px clamp(26px, 4vw, 58px) 64px;
}

.stream-column + .stream-column {
  border-left: 1px solid var(--line);
}

.column-head {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.column-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.column-head svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--cobalt);
}

.column-head h3,
.block-head h3,
.heatmap-head h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

.column-head > span,
.block-head p,
.heatmap-head > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.compact-list,
.ranking-list,
.playlist-list,
.track-list {
  min-width: 0;
}

.song-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 64px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 180ms ease, background-color 180ms ease;
}

.song-row::before {
  position: absolute;
  left: -8px;
  top: 50%;
  width: 22px;
  height: 1px;
  content: "";
  opacity: 0;
  background: var(--cobalt);
  transform: rotate(-28deg) translateY(-50%);
  transform-origin: left center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.song-row:hover {
  padding-right: 8px;
  padding-left: 8px;
  background: var(--surface);
}

.song-row:hover::before {
  opacity: 1;
  transform: rotate(-12deg) translateY(-50%);
}

.song-row__art,
.playlist-row__cover,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #1c1c1c 0 2px, #303030 2px 3px);
}

.rank-cover > svg {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  color: var(--cobalt);
  transform: translate(-50%, -50%);
}

.song-row__art {
  width: 42px;
  aspect-ratio: 1;
}

.song-row__art .cover-media,
.playlist-row__cover .cover-media,
.rank-cover .cover-media {
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}

.song-row__art::after {
  position: absolute;
  inset: 41%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  background: var(--cobalt);
}

.song-row__main,
.playlist-row__main,
.rank-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-title,
.rank-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-title {
  font-size: 0.82rem;
  font-weight: 600;
}

.rank-subtitle {
  color: var(--muted);
  font-size: 0.68rem;
}

.song-row__value,
.rank-value {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  text-align: center;
  background-image:
    radial-gradient(circle, transparent 0 26px, rgba(31, 64, 237, 0.08) 27px 28px, transparent 29px 50px, rgba(31, 64, 237, 0.05) 51px 52px, transparent 53px),
    linear-gradient(rgba(31, 64, 237, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 64, 237, 0.035) 1px, transparent 1px);
  background-position: center;
  background-size: auto, 18px 18px, 18px 18px;
}

.empty-state__inner {
  display: grid;
  justify-items: center;
  max-width: 300px;
}

.empty-state__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cobalt);
  background: rgba(255, 255, 255, 0.82);
}

.empty-state__icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.25;
}

.empty-state strong {
  font-family: var(--display);
  font-size: 1.08rem;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.empty-state.is-error .empty-state__icon,
.empty-state.is-gap .empty-state__icon {
  color: var(--warning);
}

.analytics-section,
.playlist-section {
  display: block;
}

.section-heading--inline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  padding: 72px 0 34px;
  border-right: 0;
}

.section-heading--inline > p {
  max-width: 360px;
  margin: 0 0 4px;
  text-align: right;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(540px, 1.18fr);
  border-top: 1px solid var(--line-strong);
}

.analysis-block {
  min-width: 0;
  padding: 44px clamp(28px, 4vw, 56px) 64px 0;
}

.analysis-block + .analysis-block {
  padding-right: 0;
  padding-left: clamp(28px, 4vw, 56px);
  border-left: 1px solid var(--line);
}

.block-head {
  min-height: 66px;
  align-items: start;
}

.block-head h3 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.block-head p {
  margin-top: 7px;
}

.ranking-list {
  margin-top: 26px;
}

.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 73px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row.is-podium {
  min-height: 82px;
}

.rank-index {
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rank-row.is-podium .rank-index {
  color: var(--cobalt);
  font-size: 1.45rem;
}

.rank-cover {
  width: 40px;
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--cobalt-soft);
}

.rank-energy {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 94px;
  height: 3px;
  overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 7px);
}

.rank-energy > span {
  display: block;
  width: var(--bar-width, 0%);
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 4px, transparent 4px 7px);
}

.trend-chart {
  min-height: 330px;
  margin-top: 26px;
}

.trend-figure {
  margin: 0;
}

.trend-figure svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.trend-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.trend-area {
  fill: url(#trend-area-gradient);
  stroke: none;
}

.trend-line {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 2.4;
  stroke-linejoin: miter;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}

.trend-gap {
  fill: url(#trend-gap-pattern);
  stroke: var(--warning);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.trend-point {
  fill: var(--surface);
  stroke: var(--cobalt);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.trend-point.is-current {
  fill: var(--cobalt);
  stroke: var(--surface);
  stroke-width: 2.2;
}

.trend-axis-label {
  fill: var(--muted);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.trend-current-line {
  stroke: var(--cobalt);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
}

.trend-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.65rem;
}

.trend-caption span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line,
.legend-gap,
.legend-current {
  width: 18px;
  height: 3px;
}

.legend-line { background: var(--cobalt); }
.legend-gap { background: repeating-linear-gradient(135deg, var(--warning) 0 2px, transparent 2px 4px); }
.legend-current { border-top: 2px dashed var(--cobalt); }

.trend-text-data {
  display: flex;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0 0 8px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.trend-text-data li {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-left: 2px solid var(--cobalt-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
}

.trend-text-data li.is-gap {
  border-color: var(--warning);
}

.heatmap-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.heatmap-head {
  align-items: end;
}

.heatmap-head h4 {
  margin-top: 7px;
  font-size: 1.08rem;
}

.heatmap-head > p {
  max-width: 270px;
  text-align: right;
  line-height: 1.5;
}

.hourly-heatmap {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  margin-top: 20px;
}

.hour-cell {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: end;
  gap: 8px;
  padding: 7px 3px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #eeece8;
  cursor: default;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hour-cell[data-level="1"] { border-color: #cdd4ff; background: #dfe4ff; }
.hour-cell[data-level="2"] { border-color: #9caaff; background: #bfc9ff; }
.hour-cell[data-level="3"] { border-color: #6f84f7; color: #0e1b67; background: #91a0f8; }
.hour-cell[data-level="4"] { border-color: #3e5aef; color: var(--surface); background: #5069ef; }
.hour-cell[data-level="5"] { border-color: var(--cobalt-dark); color: var(--surface); background: var(--cobalt); }

.hour-cell:hover,
.hour-cell:focus-visible {
  z-index: 2;
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(31, 64, 237, 0.16);
}

.hour-cell__bar {
  width: 3px;
  height: max(4px, calc(var(--intensity, 0) * 42px));
  margin: 0 auto;
  background: currentColor;
  opacity: 0.72;
}

.hour-cell strong,
.hour-cell span {
  overflow: hidden;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
}

.hour-cell strong { font-size: 0.66rem; }
.hour-cell span { font-size: 0.52rem; opacity: 0.78; }

.playlist-section {
  padding-bottom: 72px;
}

.playlist-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 2fr);
  border-top: 1px solid var(--line-strong);
}

.playlist-index,
.track-ledger {
  min-width: 0;
  padding: 38px 40px 20px 0;
}

.track-ledger {
  padding-right: 0;
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.playlist-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: padding 160ms ease, background-color 160ms ease;
}

.playlist-row:hover,
.playlist-row.is-active {
  padding-left: 13px;
  background: var(--surface);
}

.playlist-row.is-active {
  box-shadow: inset 3px 0 var(--cobalt);
}

.playlist-row__cover {
  width: 42px;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--cobalt-soft);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
}

.pager[hidden] {
  display: none;
}

.pager-btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.68rem;
}

.pager-btn svg {
  width: 13px;
  height: 13px;
}

.pager-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.pager-info {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  text-align: center;
}

.mobile-playlist-select {
  display: none;
}

.page-footer {
  display: flex;
  width: var(--page);
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.08em;
}

@container (max-width: 720px) {
  .segmented--icons .seg-button svg { display: none; }
}

@media (max-width: 1080px) {
  :root { --page: min(100% - 36px, 960px); }

  .hero-ledger {
    grid-template-columns: 1fr;
    gap: 44px;
    min-height: auto;
  }

  .hero-copy h1 { max-width: 9em; }

  .metrics-section,
  .ledger-section {
    grid-template-columns: 1fr;
  }

  .section-rail,
  .section-heading {
    padding: 54px 0 28px;
    border-right: 0;
  }

  .metric-strip,
  .split-ledger {
    border-top: 1px solid var(--line);
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analysis-block,
  .analysis-block + .analysis-block {
    padding: 42px 0 54px;
    border-left: 0;
  }

  .analysis-block + .analysis-block {
    border-top: 1px solid var(--line);
  }

}

@media (max-width: 760px) {
  :root { --page: calc(100% - 28px); }

  html { scroll-padding-top: 88px; }

  .topbar { top: 10px; margin-top: 10px; }

  .topbar__inner {
    grid-template-columns: 1fr auto;
    min-height: 56px;
    padding-left: 10px;
    border-radius: 10px;
  }

  .nav-links { display: none; }
  .brand__type small { display: none; }
  .service-status { padding: 0 9px; }
  .service-status svg { display: none; }
  .icon-button { width: 38px; }

  .page-shell { margin-top: 10px; }

  .hero-ledger {
    gap: 38px;
    padding: 76px 0 54px;
  }

  .hero-copy h1 {
    margin-top: 22px;
    font-size: clamp(3rem, 16vw, 5rem);
    letter-spacing: -0.045em;
  }

  .hero-subtitle { font-size: 0.84rem; }

  .window-control { margin-top: 28px; }

  .seg-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .cover-ledger { padding: 20px 14px; }
  .ledger-coordinate { display: none; }
  .mosaic { gap: 7px; margin-top: 20px; }
  .mosaic-row { grid-template-columns: 63px minmax(0, 1fr); gap: 6px; }
  .mosaic-groove { gap: 2px; padding: 3px 5px 3px 2px; }
  .mosaic-row__meta strong { font-size: 0.61rem; }
  .mosaic-row__meta span { font-size: 0.52rem; }
  .ledger-caption { margin-left: 69px; }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-item {
    min-height: 140px;
    padding: 22px 18px;
  }

  .metric-item:nth-child(2) { border-right: 0; }
  .metric-item:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .section-heading--inline {
    display: block;
    padding-top: 54px;
  }

  .section-heading--inline > p {
    margin-top: 16px;
    text-align: left;
  }

  .split-ledger { grid-template-columns: 1fr; }
  .stream-column { padding: 34px 0 44px; }
  .stream-column + .stream-column { border-top: 1px solid var(--line); border-left: 0; }

  .block-head {
    display: grid;
    gap: 18px;
  }

  .block-head .segmented { justify-self: start; }

  .rank-row {
    grid-template-columns: 34px 38px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .rank-energy { left: 80px; }
  .rank-cover { width: 36px; }

  .trend-chart { min-height: 250px; }

  .heatmap-head {
    display: block;
  }

  .heatmap-head > p {
    margin-top: 10px;
    text-align: left;
  }

  .hourly-heatmap {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3px;
  }

  .hour-cell {
    min-height: 84px;
  }

  .playlist-grid { grid-template-columns: 1fr; }
  .playlist-index { display: none; }
  .track-ledger { padding: 30px 0 20px; border-left: 0; }

  .mobile-playlist-select {
    display: grid;
    gap: 8px;
    padding: 18px 0;
    border-top: 1px solid var(--line-strong);
  }

  .mobile-playlist-select span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.64rem;
  }

  .mobile-playlist-select select {
    width: 100%;
    min-height: 46px;
    padding: 0 40px 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--surface);
  }

}

@media (max-width: 460px) {
  :root { --page: calc(100% - 22px); }

  .brand__type strong { font-size: 0.64rem; }
  .service-status > span:last-child { display: none; }
  .service-status { min-height: 34px; padding: 0 8px; }

  .hero-copy h1 { font-size: clamp(2.75rem, 15vw, 4.2rem); }
  .window-control .segmented { width: 100%; }
  .window-control .seg-button { flex: 1; padding-inline: 5px; }

  .metric-value { font-size: 1.85rem; }
  .metric-label { font-size: 0.59rem; letter-spacing: 0.06em; }

  .song-row { grid-template-columns: 38px minmax(0, 1fr); }
  .song-row__art { width: 36px; }
  .song-row__value { grid-column: 2; }

  .segmented--icons { width: 100%; }
  .segmented--icons .seg-button { flex: 1; padding-inline: 5px; }

  .rank-row { grid-template-columns: 30px 34px minmax(0, 1fr); }
  .rank-cover { width: 32px; }
  .rank-value { grid-column: 3; }
  .rank-energy { left: 72px; }

  .pager { align-items: stretch; flex-wrap: wrap; }
  .pager-info { order: -1; width: 100%; }

  .page-footer { display: grid; justify-content: start; gap: 7px; padding: 20px 0; }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .mosaic-cover .cover-media,
  .mosaic-cover .vinyl-disc,
  .hour-cell,
  .brand__mark-frame {
    transform: none !important;
  }
}
