:root {
  --bg: #f4ead8;
  --paper: rgba(255, 250, 240, 0.86);
  --paper-strong: rgba(255, 248, 234, 0.96);
  --ink: #4c2d1c;
  --muted: #7b5b49;
  --line: rgba(108, 73, 47, 0.14);
  --accent: #9f5b38;
  --accent-strong: #7d351c;
  --accent-soft: rgba(159, 91, 56, 0.12);
  --shadow: 0 22px 60px rgba(88, 50, 29, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max-width: 1180px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 245, 227, 0.7), transparent 30%),
    radial-gradient(circle at left 10% bottom 12%, rgba(235, 196, 151, 0.45), transparent 30%),
    linear-gradient(180deg, #f6efe0 0%, #eadcc6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(145, 101, 65, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145, 101, 65, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.28));
}

.page-shell {
  width: min(calc(100% - 28px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.album-hero,
.playlist-section,
.player-card,
.lyrics-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.album-hero {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
  border-radius: var(--radius-xl);
  align-items: center;
}

.album-cover-frame,
.player-cover-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #eee3cf;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.album-cover-frame::after,
.player-cover-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

.album-cover-frame {
  aspect-ratio: 3 / 4;
}

.album-cover,
.player-cover,
.track-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.album-copy h1,
.section-head h2,
.player-copy h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.album-copy h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
}

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

.album-subtitle {
  margin: 12px 0 0;
  font-size: 1.08rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.album-description,
.section-tip,
.player-subtitle,
.player-meta,
.player-note,
.status-text,
.track-meta,
.track-note {
  color: var(--muted);
}

.album-description {
  margin: 18px 0 0;
  max-width: 44rem;
  line-height: 1.7;
}

.album-credits {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 248, 236, 0.72);
  border: 1px solid rgba(125, 53, 28, 0.12);
}

.album-credits p {
  margin: 0;
  line-height: 1.7;
}

.album-credits p + p {
  margin-top: 2px;
}

.playlist-section,
.player-card,
.lyrics-card {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-tip {
  margin: 0;
  max-width: 26rem;
  line-height: 1.6;
  text-align: right;
}

.track-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.track-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 251, 244, 0.68);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.track-card:hover,
.play-button:hover,
.ghost-button:hover,
.lyric-line:hover {
  transform: translateY(-1px);
}

.track-card.is-active {
  background: linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(252, 239, 224, 0.94));
  border-color: rgba(159, 91, 56, 0.2);
  box-shadow: 0 16px 28px rgba(111, 67, 38, 0.12);
}

.track-cover-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #e8dac1;
}

.track-cover-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.04) 100%);
}

.track-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.track-number {
  font-size: 0.86rem;
  color: var(--accent);
  font-weight: 700;
}

.track-duration {
  font-size: 0.84rem;
  color: rgba(76, 45, 28, 0.54);
}

.track-title {
  margin: 0;
  font-size: 1.06rem;
}

.track-meta,
.track-note {
  margin: 0;
  line-height: 1.5;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.player-card {
  position: sticky;
  top: 16px;
}

.now-playing-head,
.control-row,
.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.now-playing-head,
.control-row {
  justify-content: space-between;
}

.track-index {
  margin: 0;
  color: rgba(76, 45, 28, 0.46);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.player-cover-frame {
  margin-top: 10px;
  aspect-ratio: 3 / 4;
}

.player-copy {
  margin-top: 18px;
}

.player-copy h3 {
  font-size: 1.9rem;
  line-height: 1.08;
}

.player-subtitle,
.player-meta,
.player-note {
  margin: 10px 0 0;
  line-height: 1.6;
}

.play-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.play-button {
  min-width: 112px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf2;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(125, 53, 28, 0.22);
}

.time-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.time-divider {
  color: rgba(76, 45, 28, 0.4);
}

.progress-wrap {
  margin-top: 18px;
}

.progress-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.control-row {
  margin-top: 18px;
  justify-content: flex-end;
}

.action-row {
  margin-top: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.ghost-button {
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--paper-strong);
  border: 1px solid rgba(125, 53, 28, 0.14);
  color: var(--accent-strong);
  font-weight: 700;
}

.ghost-button.is-active {
  background: linear-gradient(135deg, rgba(159, 91, 56, 0.12), rgba(125, 53, 28, 0.18));
}

.action-row .play-button {
  min-width: 132px;
}

.status-text {
  margin: 14px 0 0;
  line-height: 1.65;
}

.lyrics-head {
  align-items: start;
}

.lyrics-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.lyrics-list::-webkit-scrollbar {
  width: 8px;
}

.lyrics-list::-webkit-scrollbar-thumb {
  background: rgba(108, 73, 47, 0.22);
  border-radius: 999px;
}

.lyric-line {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(255, 252, 247, 0.62);
  color: inherit;
  text-align: left;
}

.lyric-line.is-active {
  background: linear-gradient(135deg, rgba(255, 240, 220, 0.96), rgba(255, 228, 206, 0.94));
  border-color: rgba(159, 91, 56, 0.2);
  box-shadow: 0 14px 24px rgba(104, 57, 28, 0.1);
}

.lyric-line.is-editor {
  cursor: pointer;
}

.line-time {
  align-self: center;
  color: rgba(76, 45, 28, 0.48);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.lyric-line.is-editor .line-time {
  color: var(--accent);
  font-weight: 700;
}

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

.line-main,
.line-sub {
  display: block;
}

.line-main {
  line-height: 1.6;
}

.line-sub {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.lyric-line.is-active .line-main {
  color: var(--accent-strong);
  font-weight: 700;
}

@media (max-width: 980px) {
  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-layout {
    grid-template-columns: 1fr;
  }

  .player-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 18px), var(--max-width));
    padding-top: 18px;
  }

  .album-hero {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }

  .playlist-section,
  .player-card,
  .lyrics-card {
    padding: 18px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-tip {
    max-width: none;
    text-align: left;
  }

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

  .lyric-line {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .action-row {
    justify-content: space-between;
  }

  .action-row .play-button,
  .action-row .ghost-button {
    flex: 1 1 0;
    min-width: 0;
  }
}
