/* ==========================================================================
   映像作品音楽DB ─ style.css
   Design tokens
   - BG        : #080B14 (base) / #0F1526 (elevated) / #121A30 (surface solid)
   - Accent    : #22D3EE (cyan) → #3B82F6 (blue) gradient
   - Text      : #EAF0FA (primary) / #8B93AB (muted) / #5B6480 (dim)
   - Display   : "Zen Kaku Gothic New"
   - Body      : "Noto Sans JP"
   - Utility   : "JetBrains Mono" (timecode / episode numbers / data)
   ========================================================================== */

:root {
  --bg: #080b14;
  --bg-elevated: #0c1220;
  --surface: rgba(18, 26, 48, 0.6);
  --surface-solid: #121a30;
  --surface-hover: #17213c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gradient: linear-gradient(135deg, var(--cyan), var(--blue));

  --text-primary: #eaf0fa;
  --text-muted: #8b93ab;
  --text-dim: #5b6480;

  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.15), 0 20px 60px -20px rgba(34, 211, 238, 0.25);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* hidden属性は、他のどのdisplay指定よりも必ず優先させる。
   （.not-found 等、class側で display:flex 等を指定している要素があると、
   同じ詳細度のCSSが後勝ちして hidden 属性が無視されてしまうバグの防止） */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #041018;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn--accent {
  background: var(--gradient);
  color: #041018;
  box-shadow: 0 8px 24px -8px rgba(34, 211, 238, 0.55);
}
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(34, 211, 238, 0.7); }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-hover); }
.btn--sm { padding: 9px 18px; font-size: 0.82rem; }
.btn--lg { padding: 15px 30px; font-size: 1rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 20, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark {
  display: flex;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}
.logo__text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.logo__text em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a { color: var(--text-muted); transition: color 0.2s; position: relative; }
.site-nav a:hover { color: var(--text-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }

/* ==========================================================================
   Hero — "エンドロール" motif: staff credits scroll slowly behind the title,
   echoing the OP/ED credit rolls that are this site's actual subject matter.
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(ellipse 80% 50% at 85% 100%, rgba(59, 130, 246, 0.12), transparent 60%),
    var(--bg);
}

.hero__credits {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}
.hero__credits .credit-col {
  display: flex;
  flex-direction: column;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 20px;
  animation: creditScroll linear infinite;
}
.hero__credits .credit-col span b { color: var(--text-muted); font-weight: 500; }
.hero__credits .credit-col:nth-child(odd) { animation-duration: 42s; }
.hero__credits .credit-col:nth-child(even) { animation-duration: 58s; animation-direction: reverse; }

@keyframes creditScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(8, 11, 20, 0.55) 0%, rgba(8, 11, 20, 0.92) 68%, var(--bg) 100%);
}

.hero__eq {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(900px, 90vw);
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  opacity: 0.35;
}
.hero__eq span {
  width: 3px;
  background: var(--gradient);
  border-radius: 2px;
  animation: eqBar 1.4s ease-in-out infinite;
}

@keyframes eqBar {
  0%, 100% { height: 8%; }
  50% { height: var(--h, 60%); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-block: 120px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  max-width: 900px;
}
.hero__title-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__desc {
  margin-top: 22px;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1rem;
}

.search-bar {
  margin-top: 40px;
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow-glow);
}
.search-bar__icon { color: var(--text-dim); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 10px 0;
}
.search-bar input::placeholder { color: var(--text-dim); }
.search-bar input:focus { outline: none; }
.search-bar:focus-within { border-color: var(--cyan); }

.hero__tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.hero__tags a { color: var(--text-muted); border-bottom: 1px dotted var(--border-strong); }
.hero__tags a:hover { color: var(--cyan); }

.hero__stats {
  margin-top: 56px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero__stats div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero__stats dt {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}
.hero__stats dd { font-size: 0.76rem; color: var(--text-dim); letter-spacing: 0.05em; }

.hero__scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  z-index: 2;
}
.hero__scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 6px; }
}

.br-pc { display: inline; }

/* ==========================================================================
   Sections (generic)
   ========================================================================== */
.section { padding-block: 84px; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 10%, rgba(255,255,255,0.015) 90%, transparent); }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 10px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
}
.section__more {
  font-size: 0.86rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.section__more:hover { color: var(--cyan); border-color: var(--cyan); }

/* ==========================================================================
   Category grid
   ========================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  position: relative;
  padding: 26px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
  overflow: hidden;
}
.category-card::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  background: var(--surface-hover);
}
.category-card:hover::before { opacity: 0.06; }
.category-card__icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  margin-bottom: 16px;
}
.category-card__name { font-weight: 700; font-size: 1rem; position: relative; z-index: 1; }
.category-card__count { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-dim); margin-top: 6px; position: relative; z-index: 1; }

/* ==========================================================================
   Work rail (cards)
   ========================================================================== */
.work-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 216px;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}
.work-rail::-webkit-scrollbar { height: 6px; }
.work-rail::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.work-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: var(--border-strong); }
.work-card__thumb { position: relative; aspect-ratio: 2 / 2.8; overflow: hidden; }
.work-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.work-card:hover .work-card__thumb img { transform: scale(1.06); }
.work-card__badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(8, 11, 20, 0.75);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  backdrop-filter: blur(6px);
}
.work-card__body { padding: 14px; }
.work-card__cat { font-size: 0.72rem; color: var(--text-dim); font-family: var(--font-mono); }
.work-card__title { font-weight: 700; font-size: 0.94rem; margin-top: 4px; line-height: 1.4; }
.work-card__meta { margin-top: 8px; font-size: 0.76rem; color: var(--text-muted); }

/* ==========================================================================
   Song list
   ========================================================================== */
.song-list { display: flex; flex-direction: column; gap: 10px; }
.song-row {
  display: grid;
  grid-template-columns: 44px 56px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s;
}
.song-row:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.song-row__rank { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.9rem; text-align: center; }
.song-row__jacket { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; }
.song-row__jacket img { width: 100%; height: 100%; object-fit: cover; }
.song-row__info { min-width: 0; }
.song-row__title { font-weight: 700; font-size: 0.94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row__sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row__type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.song-row__plays { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }

/* ==========================================================================
   Artist rail
   ========================================================================== */
.artist-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.artist-card { text-align: center; scroll-snap-align: start; }
.artist-card__avatar {
  position: relative;
  width: 120px; height: 120px;
  margin-inline: auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.artist-card:hover .artist-card__avatar { border-color: var(--cyan); transform: translateY(-4px); }
.artist-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-card__new {
  position: absolute; top: 2px; right: 2px;
  background: var(--gradient);
  color: #041018;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.artist-card__name { margin-top: 12px; font-weight: 700; font-size: 0.88rem; }
.artist-card__affil { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }

/* ==========================================================================
   Decade grid
   ========================================================================== */
.decade-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.decade-card {
  padding: 22px 16px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.decade-card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,0.4); }
.decade-card__label { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.decade-card__count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); margin-top: 6px; }

/* ==========================================================================
   Feature articles
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 20px;
}
.feature-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature-card__img { aspect-ratio: 16/10; overflow: hidden; }
.feature-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.feature-card:hover .feature-card__img img { transform: scale(1.05); }
.feature-card__body { padding: 18px; }
.feature-card__tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--cyan); }
.feature-card__title { font-weight: 700; font-size: 1.02rem; margin-top: 8px; line-height: 1.5; }
.feature-card__excerpt { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }
.feature-card__date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); margin-top: 14px; }

/* ==========================================================================
   Ranking
   ========================================================================== */
.ranking-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
}
.ranking-tabs button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-dim);
  transition: background 0.25s, color 0.25s;
}
.ranking-tabs button.is-active { background: var(--gradient); color: #041018; }

.ranking-list { display: flex; flex-direction: column; gap: 10px; }
.ranking-row {
  display: grid;
  grid-template-columns: 56px 64px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.ranking-row:hover { background: var(--surface-hover); transform: translateX(4px); }
.ranking-row__rank {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
}
.ranking-row--top .ranking-row__rank {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ranking-row__jacket { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.ranking-row__jacket img { width: 100%; height: 100%; object-fit: cover; }
.ranking-row__title { font-weight: 700; font-size: 0.98rem; }
.ranking-row__sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.ranking-row__plays { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); text-align: right; white-space: nowrap; }

/* ==========================================================================
   Random work
   ========================================================================== */
.random-section { padding-top: 0; }
.random-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(59,130,246,0.06));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 56px;
}
.random-card__text p { color: var(--text-muted); margin-top: 14px; max-width: 440px; }
.random-card__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 26px; }
.random-card__link { font-size: 0.84rem; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); padding-bottom: 2px; }
.random-card__link:hover { color: var(--cyan); border-color: var(--cyan); }
.random-card__preview {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: var(--surface-solid);
}
.random-card__preview img { width: 100%; height: 100%; object-fit: cover; }
.random-card__preview .rc-label {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(8,11,20,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 64px 28px;
  background: var(--bg-elevated);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer__desc { color: var(--text-muted); font-size: 0.86rem; margin-top: 16px; max-width: 320px; }
.footer__stats { display: flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; }
.footer__stats div { display: flex; flex-direction: column; }
.footer__stats dt { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }
.footer__stats dd { font-size: 0.68rem; color: var(--text-dim); }
.footer__col h3 { font-size: 0.86rem; margin-bottom: 16px; color: var(--text-primary); }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 0.84rem; color: var(--text-muted); transition: color 0.2s; }
.footer__col a:hover { color: var(--cyan); }

.footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.footer__social { display: flex; gap: 16px; }
.footer__social a { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); }
.footer__social a:hover { color: var(--cyan); }

/* ==========================================================================
   Credit table — 作品詳細・アーティスト詳細ページ共通（収録楽曲/ディスコグラフィ）
   ========================================================================== */
.credit-table { display: flex; flex-direction: column; gap: 12px; }

.credit-row {
  display: grid;
  grid-template-columns: 64px 1.6fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s;
}
.credit-row:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.credit-row__jacket { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.credit-row__jacket img { width: 100%; height: 100%; object-fit: cover; }

.credit-row__main { min-width: 0; }
.credit-row__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.credit-row__type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.credit-row__title { font-weight: 700; font-size: 1rem; }
.credit-row__sub { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
.credit-row__artist { color: var(--text-primary); font-weight: 500; }
.credit-row__work { color: var(--text-primary); font-weight: 500; }
.credit-row__tieup { margin-top: 6px; font-size: 0.72rem; color: var(--text-dim); }

.credit-row__credits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 16px;
}
.credit-row__credits div { display: flex; flex-direction: column; gap: 2px; }
.credit-row__credits dt { font-size: 0.66rem; color: var(--text-dim); font-family: var(--font-mono); }
.credit-row__credits dd { font-size: 0.82rem; color: var(--text-primary); }

@media (max-width: 900px) {
  .credit-row { grid-template-columns: 1fr; }
  .credit-row__credits { grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
}
@media (max-width: 560px) {
  .credit-row__credits { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Listing chrome — 一覧系ページ共通（作品一覧・楽曲一覧等）
   パンくず／ページヘッダー／フィルターサイドバー／トグル／
   アクティブフィルターチップ／ページネーション／404
   ========================================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current] { color: var(--text-primary); }

.not-found { min-height: 60vh; display: flex; align-items: center; text-align: center; }
.not-found__eyebrow { font-family: var(--font-mono); color: var(--cyan); font-size: 0.9rem; margin-bottom: 12px; }
.not-found h1 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 12px; }
.not-found p { color: var(--text-muted); margin-bottom: 26px; }

.listing-hero {
  padding-block: 48px 36px;
  background:
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.listing-hero .breadcrumb { margin-bottom: 18px; }
.listing-hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}
.listing-hero__desc { margin-top: 10px; color: var(--text-muted); font-size: 0.92rem; }

.listing { padding-block: 40px 100px; }
.listing__grid { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }

.filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  margin-bottom: 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
}
.filter-toggle__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--gradient);
  color: #041018;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.filter-sidebar {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.filter-sidebar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.filter-sidebar__head h2 { font-size: 1rem; font-weight: 700; }
.filter-clear { font-size: 0.76rem; color: var(--text-dim); border-bottom: 1px dotted var(--border-strong); }
.filter-clear:hover { color: var(--cyan); }

.filter-group { border: none; padding: 0; margin: 0 0 26px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
}
.filter-search svg { color: var(--text-dim); flex-shrink: 0; }
.filter-search input { flex: 1; background: none; border: none; color: var(--text-primary); font-size: 0.86rem; }
.filter-search input::placeholder { color: var(--text-dim); }
.filter-search input:focus { outline: none; }
.filter-search:focus-within { border-color: var(--cyan); }

.filter-checklist { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.filter-checklist::-webkit-scrollbar { width: 5px; }
.filter-checklist::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.filter-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filter-check:hover { background: var(--surface-hover); color: var(--text-primary); }
.filter-check input {
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
}
.filter-check input::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--gradient);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
}
.filter-check input:checked::before { transform: scale(1); }
.filter-check input:checked { border-color: var(--cyan); }
.filter-check__label { flex: 1; }
.filter-check__count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }

.listing__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.listing__count { font-size: 0.88rem; color: var(--text-muted); }
.listing__count b { color: var(--text-primary); font-family: var(--font-mono); }
.listing__sort { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--text-muted); }
.listing__sort select {
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}
.listing__sort select:focus { outline: none; border-color: var(--cyan); }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.active-filters:empty { display: none; margin: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
  font-size: 0.78rem;
}
.chip button { display: flex; color: inherit; opacity: 0.8; }
.chip button:hover { opacity: 1; }

.listing__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 44px; }
.pagination button {
  min-width: 38px;
  height: 38px;
  padding-inline: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pagination button:hover:not(:disabled) { background: var(--surface-hover); color: var(--text-primary); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination button.is-active { background: var(--gradient); border-color: transparent; color: #041018; font-weight: 700; }
.pagination .pagination__ellipsis { color: var(--text-dim); padding-inline: 4px; }

@media (max-width: 900px) {
  .listing__grid { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }

  .filter-sidebar {
    position: fixed;
    inset: 0 12% 0 0;
    top: 0;
    z-index: 200;
    max-height: none;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
    padding-top: 88px;
  }
  .filter-sidebar.is-open { transform: translateX(0); box-shadow: 40px 0 80px rgba(0,0,0,0.5); }
}

@media (max-width: 640px) {
  .filter-sidebar { inset: 0; }
  .listing__toolbar { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Data loading overlay — Supabaseからのデータ取得中に表示する全画面オーバーレイ
   ========================================================================== */
.data-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg);
  animation: dataLoadingFadeIn 0.15s ease-in;
}
.data-loading-overlay p {
  font-size: 0.86rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.data-loading-overlay__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--cyan);
  animation: dataLoadingSpin 0.8s linear infinite;
}
@keyframes dataLoadingSpin { to { transform: rotate(360deg); } }
@keyframes dataLoadingFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Artwork — iTunes Search APIで取得するジャケット画像の共通表示枠
   画像が見つかるまでは音符アイコンのプレースホルダーを表示する
   ========================================================================== */
.artwork {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.artwork::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6480' stroke-width='1.5'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40%;
  opacity: 0.5;
}
.artwork img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.artwork img.is-loaded { opacity: 1; }
.artwork[data-artwork-tone] {
  background: linear-gradient(145deg, var(--artwork-a, #204a61), var(--artwork-b, #0c203e));
}
.artwork[data-artwork-tone="1"] { --artwork-a: #654564; --artwork-b: #282445; }
.artwork[data-artwork-tone="2"] { --artwork-a: #31675c; --artwork-b: #152e40; }
.artwork[data-artwork-tone="3"] { --artwork-a: #8c5943; --artwork-b: #382b46; }
.artwork[data-artwork-tone="4"] { --artwork-a: #536f99; --artwork-b: #202b55; }
.artwork[data-artwork-tone="5"] { --artwork-a: #735777; --artwork-b: #33264d; }
.artwork[data-artwork-tone="6"] { --artwork-a: #827046; --artwork-b: #283b40; }
.artwork[data-artwork-tone="7"] { --artwork-a: #455c82; --artwork-b: #242840; }
.artwork[data-artwork-tone]::before {
  background-image: repeating-radial-gradient(circle at 85% 20%, transparent 0 8px, #ffffff12 9px 10px, transparent 11px 20px);
  background-size: cover;
  opacity: 1;
}
.artwork[data-artwork-tone]::after {
  content: attr(data-artwork-initial);
  position: absolute;
  z-index: 0;
  left: 12%;
  bottom: 14%;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px #0005;
}
.artwork--lg[data-artwork-tone]::after { font-size: 38px; }
.artwork.has-artwork::before, .artwork.has-artwork::after { opacity: 0; }

.artwork--sm { width: 56px; height: 56px; border-radius: 10px; }
.artwork--lg { width: 140px; height: 140px; border-radius: var(--radius-md); }
.new-data-card__lead { display: flex; align-items: flex-start; gap: 14px; }
.new-data-card__artwork { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 12px; }
.new-data-card__copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .new-data-card__lead { gap: 12px; }
  .new-data-card__artwork { width: 64px; height: 64px; flex-basis: 64px; }
}

/* ---------- 試聴ボタン（30秒プレビュー再生） ---------- */
.preview-btn {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(8, 11, 20, 0);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.artwork:hover .preview-btn,
.preview-btn.is-playing {
  opacity: 1;
  background: rgba(8, 11, 20, 0.45);
}
.preview-btn .icon-pause { display: none; }
.preview-btn.is-playing .icon-play { display: none; }
.preview-btn.is-playing .icon-pause { display: block; }
.preview-btn:hover { background: rgba(8, 11, 20, 0.6); }
.preview-btn--lg svg { width: 28px; height: 28px; }

/* タッチデバイス（ホバー非対応）では常にボタンを表示する。
   :hover に依存すると、タップだけでは表示・押下できない機種があるため。 */
@media (hover: none) {
  .preview-btn {
    opacity: 1;
    background: rgba(8, 11, 20, 0.35);
  }
}

/* カード類にホバーした際、内部のジャケット画像をわずかに拡大する */
.song-item:hover .artwork img,
.sd-work-card:hover .artwork img,
.new-data-card:hover .artwork img,
.tl-card:hover .artwork img,
.work-row:hover .artwork img {
  transform: scale(1.08);
}
.artwork img { transition: opacity 0.3s ease, transform 0.35s var(--ease); }

/* ==========================================================================
   Honeypot — ボット対策用のダミー入力欄（人間には見えない位置に配置）
   ========================================================================== */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* ==========================================================================
   Badge — 詳細ページ共通（カテゴリ/役割バッジ）
   ========================================================================== */
.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}
.badge--solid { background: var(--gradient); color: #041018; border-color: transparent; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .decade-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid .feature-card:first-child { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .random-card { grid-template-columns: 1fr; }
  .random-card__preview { order: -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8,11,20,0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 14px; width: 100%; }

  .hero__inner { padding-block: 96px 60px; }
  .hero__stats { gap: 26px; }
  .hero__credits { grid-template-columns: repeat(2, 1fr); }

  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .decade-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid .feature-card:first-child { grid-column: auto; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 14px; text-align: center; }

  .song-row { grid-template-columns: 30px 44px 1fr; }
  .song-row__type, .song-row__plays { display: none; }

  .ranking-row { grid-template-columns: 40px 52px 1fr; }
  .ranking-row__plays { display: none; }

  .random-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr 1fr; }
  .decade-grid { grid-template-columns: 1fr 1fr; }
  .hero__title { font-size: 1.7rem; }
}
/* Catalog hierarchy: labels retain their text so color is never the only cue. */
[data-category="anime"] { --genre-color: #c4b5fd; --genre-rgb: 196,181,253; }
[data-category="drama"] { --genre-color: #fda4af; --genre-rgb: 253,164,175; }
[data-category="movie"] { --genre-color: #fcd34d; --genre-rgb: 252,211,77; }
[data-category="cm"] { --genre-color: #67e8c1; --genre-rgb: 103,232,193; }
[data-category].category-card { border-top: 2px solid var(--genre-color, var(--cyan)); }
[data-category].category-card .category-card__name { color: var(--genre-color); }
[data-category].new-data-card__cat, [data-category].mini-timeline__cat,
[data-category].work-row__cat, [data-category].tl-card__cat, [data-category].badge {
  color: var(--genre-color, var(--cyan));
  border-color: rgba(var(--genre-rgb, 34,211,238), .35);
  background: rgba(var(--genre-rgb, 34,211,238), .07);
  font-size: .72rem;
  font-weight: 600;
}
.tl-genre-tabs button[data-category]:not([data-category="all"]).is-active {
  background: var(--genre-color); color: #080b14;
}
html .new-data-card__song, html .mini-timeline__song, html .song-item__title {
  font-size: 1.06rem; font-weight: 700; line-height: 1.65; letter-spacing: .015em;
}
html .new-data-card__work, html .mini-timeline__work { font-size: .85rem; line-height: 1.7; color: #aab4ca; }
html .new-data-card__artist, html .mini-timeline__artist, html .song-item__artist {
  font-size: .82rem; line-height: 1.7; color: #aab4ca;
}
html .tl-card__song { font-size: 1.04rem; line-height: 1.65; font-weight: 700; margin-top: 8px; }
html .tl-card__work { font-size: .82rem; font-weight: 400; line-height: 1.7; color: #aab4ca; }
html .tl-card__artist { font-size: .82rem; line-height: 1.7; color: #aab4ca; margin-top: 7px; }
html .tl-card__song .type { display: block; margin-bottom: 3px; font-size: .7rem; font-weight: 400; }
html .tl-card__note { font-size: .76rem; line-height: 1.75; color: #939eb8; }
html .work-row__title { font-size: 1.05rem; line-height: 1.65; }
html .work-row__songs { font-size: .85rem; line-height: 1.7; color: #aab4ca; margin-top: 7px; }
.tl-decade-heading {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 20px;
  margin: 64px 0 30px; padding: 20px 0;
  background: var(--bg); color: var(--text-primary); font-family: var(--font-mono);
  font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.04em;
}
.tl-decade-heading:first-child { margin-top: 0; }
.tl-decade-heading::before, .tl-decade-heading::after {
  content: ""; flex: 1; height: 1px; background: var(--border-strong);
}
.tl-decade-heading small { margin-left: 8px; font-family: var(--font-body); font-size: .8rem; letter-spacing: .08em; color: var(--text-muted); }
html .tl-year-heading { margin-top: 28px; }

