@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./chakra-petch-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./chakra-petch-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./chakra-petch-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Azeret Mono';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('./azeret-mono-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Glow Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./glow-sans-sc-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Glow Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./glow-sans-sc-500.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --ink: #0f3d66;
  --muted: #476b86;
  --blue: #1e73cc;
  --sky: #6cb8ea;
  --paper: #f2f8fc;
  --ice: #eaf4fb;
  --line: rgba(15, 61, 102, .18);
  --line-soft: rgba(15, 61, 102, .10);
  --warn-bg: rgba(30, 115, 204, .10);
  --ink-inv: #edf7ff;
  --f-display: 'Chakra Petch', 'Glow Sans SC', sans-serif;
  --f-sans: 'Glow Sans SC', sans-serif;
  --f-mono: 'Azeret Mono', 'Glow Sans SC', monospace;
  --ease-damp: cubic-bezier(0.16, 1, 0.3, 1);
  --anchor-offset: 96px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 0; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background: var(--paper);
  font: 400 14.5px/1.65 var(--f-sans);
  isolation: isolate;
  font-synthesis: none;
  overflow-x: clip;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); text-decoration: none; transition: color .14s ease; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Pre-rasterized static LUM wallpaper on its own GPU composited layer (zero per-frame SVG repaint) */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper) url('./wallpaper-lum.webp') center / cover no-repeat;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  contain: strict;
  pointer-events: none;
}

/* Main shell */
.shell {
  width: min(1080px, calc(100% - clamp(24px, 5vw, 80px)));
  margin: 0 auto;
  padding-bottom: 56px;
}
.site-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 13px/1.3 var(--f-display);
  letter-spacing: 2px;
  white-space: nowrap;
}
.wordmark img {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
}
.wordmark span {
  color: var(--muted);
  font: 400 11px/1.3 var(--f-mono);
  letter-spacing: 1.2px;
}
.head-right {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.head-switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font: 400 12px/1.2 var(--f-sans);
}
.head-switch a,
.head-switch span {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.head-switch a { color: var(--muted); }
.head-switch a:hover { color: var(--blue); border-bottom-color: rgba(30, 115, 204, .35); }
.head-switch .is-current {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--blue);
}
.head-stat {
  font: 400 11px/1.3 var(--f-mono);
  letter-spacing: .8px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Archive Hero */
.archive-hero {
  padding: 26px 0 20px;
  border-bottom: 1px solid var(--line);
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero-cover {
  flex: 0 0 96px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color .16s ease, transform .22s var(--ease-damp);
}
.hero-cover:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}
.hero-cover img {
  width: 96px;
  height: 96px;
  display: block;
  object-fit: cover;
}
.hero-copy { min-width: 0; }
.hero-copy h1 {
  margin: 0 0 6px;
  font: 600 clamp(24px, 3vw, 34px)/1.18 var(--f-display);
  letter-spacing: .6px;
  color: var(--ink);
}
.hero-copy .muted {
  margin: 0 0 8px;
  font: 400 12.5px/1.5 var(--f-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hero-links {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.hero-links a {
  color: var(--blue);
  border-bottom: 1px solid rgba(30, 115, 204, .30);
  padding-bottom: 1px;
}
.hero-links a:hover { border-bottom-color: var(--blue); }
.intro {
  margin: 14px 0 6px;
  max-width: 78ch;
  font-size: 13.5px;
  color: var(--ink);
}
.source {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ===== Sticky Month Navigation Bar (zero backdrop-filter, composited layer) ===== */
.month-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(242, 248, 252, .96);
  border-bottom: 1px solid var(--line);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}
.month-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 61, 102, .22) transparent;
  padding-bottom: 2px;
  min-width: 0;
  flex: 1;
}
.month-pill {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 500 11.5px/1.2 var(--f-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
.month-pill small {
  font-size: 10px;
  opacity: .72;
}
.month-pill:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, .65);
}
.month-pill.is-active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}
.month-pill.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--blue);
}
.month-pill.is-active small { opacity: .88; color: #b9dcf7; }

.bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-dir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ink-inv);
  font: 500 12px/1.2 var(--f-sans);
  white-space: nowrap;
  transition: background-color .14s ease, border-color .14s ease;
}
.btn-dir:hover { background: var(--blue); border-color: var(--blue); }
.btn-dir kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid rgba(237, 247, 255, .42);
  font: 500 10px/1.2 var(--f-mono);
  color: #cfe7fb;
}
.btn-top {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(248, 252, 255, .75);
  color: var(--muted);
  font: 400 11.5px/1.2 var(--f-sans);
  white-space: nowrap;
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
}
.btn-top:hover { border-color: var(--blue); color: var(--blue); background: #fff; }

/* ===== Month Sections ===== */
section.month-sec {
  position: relative;
  margin-top: 32px;
  scroll-margin-top: var(--anchor-offset);
}
.legacy-anchor {
  position: absolute;
  top: 0;
  left: 0;
  scroll-margin-top: var(--anchor-offset);
}
.month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0 10px 14px;
  margin: 0 0 8px;
  border-left: 2px solid var(--blue);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(30, 115, 204, .06), transparent 68%);
}
.month-head h2 {
  margin: 0;
  font: 600 22px/1.2 var(--f-display);
  letter-spacing: 1px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.month-count {
  font: 400 11px/1.3 var(--f-mono);
  letter-spacing: 1.4px;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== Open Hairline Album Entries (isolated layout/paint containment) ===== */
article.album-entry {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 8px 18px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
  scroll-margin-top: var(--anchor-offset);
  contain: layout style paint;
  transition: background-color .24s ease, border-left-color .24s ease;
}
article.album-entry:last-child { border-bottom-color: var(--line); }
article.album-entry:hover { background: rgba(30, 115, 204, .03); }
article.album-entry.is-target {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, rgba(30, 115, 204, .13), rgba(30, 115, 204, .03) 72%, transparent);
}

.cover-link {
  display: block;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(15, 61, 102, .05);
  transition: border-color .16s ease, transform .22s var(--ease-damp);
}
.cover-link:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}
.cover-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
}

.album-body { min-width: 0; }
.album-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.album-meta-top {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.album-seq {
  font: 500 10.5px/1.2 var(--f-mono);
  color: var(--blue);
  letter-spacing: .6px;
  font-variant-numeric: tabular-nums;
}
article.album-entry time {
  font: 400 11.5px/1.2 var(--f-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.album-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.alb-btn {
  border: 1px solid var(--line-soft);
  background: rgba(248, 252, 255, .65);
  color: var(--muted);
  padding: 2px 7px;
  font: 400 11px/1.3 var(--f-mono);
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
}
.alb-btn:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.alb-btn:disabled { opacity: .35; cursor: default; }

article.album-entry h3 {
  margin: 2px 0 4px;
  font: 600 18px/1.32 var(--f-display);
  letter-spacing: .2px;
  overflow-wrap: anywhere;
}
article.album-entry h3 a { color: var(--ink); }
article.album-entry h3 a:hover { color: var(--blue); }
.album-artist {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.meta {
  margin: 0 0 6px;
  font: 400 11.5px/1.5 var(--f-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.meta a { color: var(--blue); }
.warning {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-left: 2px solid var(--blue);
  background: var(--warn-bg);
  color: var(--ink);
  font-size: 11px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 6px;
}
.tag {
  padding: 2px 7px;
  border: 1px solid rgba(30, 115, 204, .24);
  border-radius: 2px;
  background: rgba(30, 115, 204, .06);
  color: var(--muted);
  font: 400 11px/1.35 var(--f-mono);
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* Tracklist details */
article.album-entry details { margin-top: 8px; }
article.album-entry summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font: 500 12.5px/1.4 var(--f-sans);
  color: var(--blue);
  list-style: none;
}
article.album-entry summary::-webkit-details-marker { display: none; }
article.album-entry summary::before {
  content: '▸';
  font-family: var(--f-mono);
  font-size: 11px;
  transition: transform .16s var(--ease-damp);
}
article.album-entry details[open] summary::before { transform: rotate(90deg); }
article.album-entry ol {
  margin: 8px 0 2px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}
article.album-entry li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  overflow-wrap: anywhere;
}
article.album-entry li:hover { background: rgba(30, 115, 204, .04); }
article.album-entry li::before {
  content: attr(value);
  font: 400 11px/1.3 var(--f-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 4px;
}
article.album-entry li .trk-cell { min-width: 0; }
article.album-entry li a { color: var(--ink); font-weight: 500; }
article.album-entry li a:hover { color: var(--blue); }
article.album-entry li small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* Footer */
footer.archive-foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 12.5px;
  color: var(--muted);
}
footer.archive-foot a { color: var(--blue); }

/* ===== Full-Year Directory & Search Dialog ===== */
dialog.dir-dialog {
  width: min(780px, calc(100% - 28px));
  max-height: min(82svh, 760px);
  padding: 0;
  border: 1px solid rgba(30, 115, 204, .34);
  border-top: 2px solid var(--blue);
  background: rgba(246, 251, 255, .98);
  color: var(--ink);
  box-shadow: 0 14px 36px rgba(15, 61, 102, .16);
  overflow: hidden;
}
dialog.dir-dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog.dir-dialog::backdrop { background: rgba(9, 36, 62, .36); }
.dir-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 248, 252, .98);
}
.dir-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dir-title {
  font: 600 13px/1.3 var(--f-display);
  letter-spacing: 1.4px;
  color: var(--ink);
}
.dir-title span {
  margin-left: 8px;
  font: 400 11px/1.2 var(--f-mono);
  color: var(--muted);
  letter-spacing: .6px;
}
.dir-close {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 4px 9px;
  font: 400 11px/1.2 var(--f-mono);
}
.dir-close:hover { border-color: var(--blue); color: var(--blue); }
.dir-search-row {
  display: flex;
  gap: 8px;
}
.dir-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(15, 61, 102, .24);
  background: #ffffff;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--ink);
  border-radius: 0;
}
.dir-input:focus { outline: none; border-color: var(--blue); }
.dir-clear {
  border: 1px solid var(--line);
  background: rgba(248, 252, 255, .9);
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}
.dir-clear:hover { border-color: var(--blue); color: var(--blue); }
.dir-hints {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font: 400 11px/1.3 var(--f-mono);
  color: var(--muted);
}

.dir-body {
  overflow-y: auto;
  padding: 8px 16px 18px;
  flex: 1;
  contain: content;
}
.dir-group-hd {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 8px 6px;
  margin-top: 8px;
  background: rgba(246, 251, 255, .98);
  border-bottom: 1px solid var(--line);
  font: 600 12px/1.2 var(--f-display);
  letter-spacing: 1px;
  color: var(--blue);
}
.dir-group-hd small {
  font: 400 10.5px/1.2 var(--f-mono);
  color: var(--muted);
}
.dir-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  padding: 8px 8px 8px 10px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1.3fr) minmax(0, .9fr) 82px;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 12.5px;
}
.dir-item:hover,
.dir-item.is-selected {
  background: rgba(30, 115, 204, .09);
  border-left-color: var(--blue);
}
.dir-seq { font: 400 11px/1.2 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.dir-name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-art { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-date { font: 400 11px/1.2 var(--f-mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dir-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(248, 252, 255, .9);
  color: var(--blue);
  font: 500 12px/1.2 var(--f-sans);
  text-align: center;
}
.dir-more:hover { border-color: var(--blue); background: #fff; }
.dir-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* Subtle Toast */
.lum-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  padding: 9px 14px;
  border: 1px solid rgba(30, 115, 204, .42);
  border-left: 3px solid var(--blue);
  background: rgba(246, 251, 255, .98);
  color: var(--ink);
  font: 400 12px/1.3 var(--f-mono);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .24s var(--ease-damp);
}
.lum-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  :root { --anchor-offset: 88px; }
  .shell { width: calc(100% - 24px); }
  .site-head { min-height: 54px; flex-wrap: wrap; padding: 8px 0; gap: 8px; }
  .head-stat { display: none; }
  .hero-top { gap: 14px; align-items: flex-start; }
  .hero-cover { flex: 0 0 72px; }
  .hero-cover img { width: 72px; height: 72px; }
  .month-bar { gap: 8px; padding: 8px 0; }
  .month-pill { padding: 5px 8px; font-size: 11px; }
  .btn-dir { padding: 6px 9px; font-size: 11.5px; }
  .btn-dir kbd { display: none; }
  .btn-top { padding: 6px 8px; font-size: 11px; }
  article.album-entry {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 4px 14px 8px;
  }
  article.album-entry h3 { font-size: 15.5px; }
  article.album-entry li { grid-template-columns: 32px minmax(0, 1fr); gap: 6px; font-size: 12.5px; }
  dialog.dir-dialog { width: calc(100% - 16px); max-height: 86svh; }
  .dir-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 2px 8px;
  }
  .dir-art { grid-column: 2; font-size: 11.5px; }
  .dir-date { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
