:root {
  --panel: rgba(18, 24, 33, 0.88);
  --panel-strong: rgba(23, 29, 39, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1ea;
  --muted: #b9c0cb;
  --accent-soft: #ffb15c;
  --cyan: #91d8f7;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.2), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(145, 216, 247, 0.14), transparent 25%),
    linear-gradient(135deg, #090c12 0%, #101723 48%, #151012 100%);
  font-family: "Segoe UI Variable Text", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 85%);
}

.detail-shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 196px;
}

.topbar,
.detail-hero,
.track-wrap,
.player-sheet,
.nav-card,
.track-row {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 22px;
}

.back-link {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 600;
}

.topbar-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-hero,
.track-wrap {
  margin-top: 22px;
  border-radius: 28px;
  padding: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.hero-thumb {
  position: relative;
  min-height: 240px;
  padding: 20px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--thumb-a), var(--thumb-b));
}

.hero-thumb::before {
  content: "";
  position: absolute;
  inset: -20% auto auto 58%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero-thumb::after {
  content: attr(data-mark);
  position: absolute;
  right: 16px;
  bottom: 8px;
  font-family: "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.12);
}

.hero-thumb .thumb-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-self: start;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-thumb-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
}

.hero-thumb-copy strong {
  display: block;
  font-family: "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.hero-thumb-copy small {
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent-soft);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Bahnschrift", "Segoe UI Variable Display", "Malgun Gothic", sans-serif;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  letter-spacing: -0.04em;
}

.hero-summary,
.meta-box span,
.empty-note,
.player-kicker {
  color: var(--muted);
}

.hero-summary {
  margin: 16px 0 22px;
  max-width: 720px;
  line-height: 1.75;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.meta-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-box span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.meta-box strong {
  font-size: 1rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.track-list {
  display: grid;
  gap: 12px;
}

.track-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 20px;
  color: inherit;
  text-align: left;
  appearance: none;
  font: inherit;
}

button.track-row {
  cursor: pointer;
}

button.track-row:hover,
button.track-row:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 177, 92, 0.45);
}

.track-row.is-disabled {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.03);
}

.track-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #263546, #584a21);
}

.track-thumb img,
.player-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-fallback,
.player-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.84);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, #2a3b50, #6c541c);
}

.track-copy {
  min-width: 0;
}

.track-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.track-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.played-mark {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(145, 216, 247, 0.12);
  border: 1px solid rgba(145, 216, 247, 0.22);
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.track-number {
  font-family: "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  color: var(--cyan);
}

.track-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
}

.track-badge.ready {
  color: var(--accent-soft);
}

.track-badge.waiting {
  color: var(--muted);
}

.player-sheet {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 122, 24, 0.12), transparent 50%),
    rgba(15, 20, 28, 0.94);
  transition: transform 180ms ease, opacity 180ms ease;
}

.player-sheet.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
}

.player-thumb {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 18px;
  overflow: hidden;
}

.player-copy {
  min-width: 0;
}

.player-kicker {
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.player-copy h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.close-btn {
  color: var(--accent-soft);
}

.audio-wrap {
  width: 100%;
}

.audio-wrap audio {
  width: 100%;
}

.empty-note {
  margin-top: 8px;
}

.thumb-conan {
  --thumb-a: #14304b;
  --thumb-b: #8e2238;
}

.thumb-gintama {
  --thumb-a: #335075;
  --thumb-b: #151d2a;
}

.thumb-onepiece {
  --thumb-a: #13415a;
  --thumb-b: #c46b18;
}

.thumb-naruto {
  --thumb-a: #7a2a10;
  --thumb-b: #d07b22;
}

.thumb-bleach {
  --thumb-a: #26282e;
  --thumb-b: #c06719;
}

.thumb-aot {
  --thumb-a: #2f3947;
  --thumb-b: #56610f;
}

.thumb-fma {
  --thumb-a: #5e1f22;
  --thumb-b: #986124;
}

.thumb-demonslayer {
  --thumb-a: #0f3c34;
  --thumb-b: #8f1d2f;
}

.thumb-jujutsu {
  --thumb-a: #203048;
  --thumb-b: #36534e;
}

.thumb-mha {
  --thumb-a: #0c2a3e;
  --thumb-b: #9f7b17;
}

.thumb-inuyasha {
  --thumb-a: #5c1320;
  --thumb-b: #2b263a;
}

.thumb-slamdunk {
  --thumb-a: #731a1f;
  --thumb-b: #ca5424;
}

.thumb-eva {
  --thumb-a: #2d1850;
  --thumb-b: #496e19;
}

.thumb-deathnote {
  --thumb-a: #161a21;
  --thumb-b: #5a6674;
}

.thumb-hxh {
  --thumb-a: #0f5741;
  --thumb-b: #6f7c16;
}

@media (max-width: 1080px) {
  .detail-hero,
  .player-sheet {
    grid-template-columns: 1fr;
  }

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

  .section-heading,
  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .topbar-copy {
    text-align: left;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .detail-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 20px;
  }

  .detail-hero,
  .track-wrap,
  .topbar,
  .player-sheet,
  .track-row {
    border-radius: 20px;
  }

  .detail-hero,
  .track-wrap {
    padding: 20px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .track-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .track-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .player-sheet {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}
