:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e2dc;
  background: #242321;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --muted: #aaa69d;
  --line: #41403c;
  --accent: #c4a477;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #242321;
}

a { color: inherit; }
button, input { font: inherit; }

.page { width: min(940px, calc(100% - 48px)); margin: 0 auto; }
.topbar { display: flex; min-height: 68px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: #e5e2dc; font-size: 13px; font-weight: 650; letter-spacing: .025em; text-decoration: none; }
.brand-dot, .footer-brand span { color: var(--accent); }
.site-nav, .site-footer nav { display: flex; align-items: center; gap: 22px; }
.site-nav a, .site-footer nav a { color: var(--muted); font-size: 12px; text-decoration: none; }
.site-nav a:hover, .site-footer nav a:hover { color: #fff; }

.hero { padding: 48px 0 32px; }
.hero-copy { max-width: 680px; }
.music-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 38px; padding: 0 0 54px; }
.player-panel, .playlist-panel { min-width: 0; }
.video-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(196, 164, 119, .12), transparent 43%),
    linear-gradient(135deg, #1d1d1c, #292825 52%, #1b1b1a);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}
.video-stage::after {
  position: absolute;
  z-index: 1;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(17, 17, 16, .86));
  content: "";
  pointer-events: none;
}
.hero-record {
  position: absolute;
  z-index: 0;
  top: 43%;
  left: 50%;
  width: min(280px, 44vw, 33vh);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(229, 226, 220, .12);
  border-radius: 50%;
  background:
    radial-gradient(circle, #242321 0 7%, transparent 7.5% 13%, rgba(229, 226, 220, .15) 13.5% 14%, transparent 14.5% 28%, rgba(229, 226, 220, .13) 28.5% 29%, transparent 29.5% 44%, rgba(229, 226, 220, .12) 44.5% 45%, transparent 45.5% 60%, rgba(229, 226, 220, .1) 60.5% 61%, transparent 61.5% 100%),
    radial-gradient(circle at 38% 30%, #46413a, #2d2b28 62%, #201f1d);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
  opacity: .92;
}
.audio-visualizer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.visualizer-band { fill: none; stroke-width: 1.1; stroke-linecap: round; opacity: .42; }
.visualizer-bar { fill: none; stroke-width: 1.15; stroke-linecap: round; opacity: .9; }
.visualizer-bass { color: #d7bd99; stroke: #d7bd99; }
.visualizer-vocals { color: #e5e2dc; stroke: #e5e2dc; }
.visualizer-treble { color: #a9bac8; stroke: #a9bac8; }
.hero-record-center { position: absolute; z-index: 2; inset: 43%; border-radius: 50%; background: radial-gradient(circle, #d7bd99 0 16%, #76634b 18% 100%); }
.video-stage-label { position: absolute; z-index: 2; top: 18px; left: 20px; padding: 6px 9px; border: 1px solid rgba(229, 226, 220, .15); border-radius: 4px; color: #d3d0c8; background: rgba(25, 24, 22, .58); font-size: 9px; font-weight: 600; letter-spacing: .09em; }
.eyebrow, .panel-kicker { margin: 0; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
h1 { max-width: 520px; margin: 12px 0 0; font-size: clamp(32px, 5vw, 46px); font-weight: 550; letter-spacing: -.045em; line-height: 1.1; }
.intro { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.featured-track { padding: 22px 0 30px; border-bottom: 1px solid var(--line); }
.track-copy { min-width: 0; }
.track-copy h2 { overflow-wrap: anywhere; margin: 0; font-size: clamp(21px, 3vw, 27px); font-weight: 550; letter-spacing: -.035em; }
.track-artist { margin: 6px 0 16px; color: var(--muted); font-size: 12px; }
.track-details { display: grid; gap: 10px; margin: 0; }
.track-details div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; font-size: 11px; }
.track-details dt { color: var(--muted); }
.track-details dd { overflow-wrap: anywhere; margin: 0; color: #d3d0c8; }
.youtube-link { display: inline-flex; gap: 6px; margin-top: 18px; color: var(--accent); font-size: 11px; text-underline-offset: 3px; }
.youtube-link[hidden] { display: none; }
.youtube-link:hover { color: #e8d3b1; }

.player-controls { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 22px 22px 14px; transition: opacity .2s ease, transform .2s ease; }
.video-stage.controls-hidden .player-controls { transform: translateY(10px); opacity: 0; pointer-events: none; }
.video-stage.controls-hidden .player-controls:focus-within { transform: none; opacity: 1; pointer-events: auto; }
.center-play-button { position: absolute; z-index: 4; top: 50%; left: 50%; display: grid; width: 68px; height: 68px; transform: translate(-50%, -50%) scale(.94); place-items: center; padding: 0 0 0 4px; border: 1px solid rgba(229, 226, 220, .5); border-radius: 50%; color: #f1eee8; background: rgba(36, 35, 33, .78); box-shadow: 0 8px 26px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); font-size: 21px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease, background .16s ease; visibility: hidden; }
.video-stage.is-paused .center-play-button { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; visibility: visible; }
.center-play-button:hover:not(:disabled) { background: rgba(68, 64, 57, .92); transform: translate(-50%, -50%) scale(1.06); }
.center-play-button:disabled { cursor: not-allowed; }
.seek-row { display: grid; gap: 8px; }
#seek-slider { width: 100%; height: 4px; margin: 0; border-radius: 0; accent-color: var(--accent); cursor: pointer; }
#seek-slider:disabled { cursor: not-allowed; opacity: .35; }
.time-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0 8px; }
.transport-controls, .volume-control { display: flex; align-items: center; }
.transport-controls { gap: 10px; }
.volume-control { gap: 8px; }
.control-button { display: grid; flex: 0 0 auto; place-items: center; padding: 0; border: 0; color: #d3d0c8; background: transparent; cursor: pointer; }
.control-button:hover:not(:disabled) { color: #fff; }
.control-button:disabled { cursor: not-allowed; opacity: .35; }
.control-button.primary { width: 38px; height: 38px; border: 1px solid #77736a; border-radius: 50%; color: #f1eee8; font-size: 13px; }
.control-button.secondary { width: 30px; height: 34px; color: #b8b7b2; font-size: 25px; line-height: 1; }
.control-button.seek-button { width: 30px; height: 34px; color: #b8b7b2; font-size: 9px; font-variant-numeric: tabular-nums; }
.control-button.secondary:hover:not(:disabled), .control-button.seek-button:hover:not(:disabled) { color: var(--accent); }
.volume-button { width: 24px; height: 30px; }
.volume-button svg { width: 19px; height: 19px; }
.volume-button svg [hidden] { display: none; }
#volume-slider { width: 82px; height: 4px; margin: 0; accent-color: var(--accent); cursor: pointer; }
#volume-slider:disabled { cursor: not-allowed; opacity: .35; }
.player-status { min-height: 16px; margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.player-status[data-state="error"] { color: #9c5148; }

.playlist-heading { display: flex; min-height: 24px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.playlist-heading h2 { margin: 8px 0 0; font-size: 20px; font-weight: 550; letter-spacing: -.02em; }
.track-count { color: var(--muted); font-size: 10px; }
.track-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin: 22px 0 0; padding: 0; list-style: none; }
.track-item { min-width: 0; }
.track-select { display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.track-select:hover .track-label strong, .track-select[aria-current="true"] .track-label strong { color: var(--accent); }
.track-thumbnail { position: relative; display: grid; overflow: hidden; aspect-ratio: 16 / 9; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: radial-gradient(circle at 50% 50%, rgba(196, 164, 119, .2), transparent 37%), linear-gradient(135deg, #39362f, #1d1d1b 68%); transition: border-color .16s ease, filter .16s ease; }
.track-thumbnail::before { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(229, 226, 220, .025) 19px 20px); content: ""; }
.track-thumbnail-disc { position: relative; width: 54px; aspect-ratio: 1; border: 1px solid rgba(229, 226, 220, .28); border-radius: 50%; background: repeating-radial-gradient(circle, #242321 0 4px, #34312c 4.5px 5px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .2s ease; }
.track-thumbnail-disc::after { position: absolute; inset: 43%; border-radius: 50%; background: #d7bd99; content: ""; }
.track-index { position: absolute; z-index: 1; top: 9px; left: 9px; padding: 4px 6px; border-radius: 4px; color: #e5e2dc; background: rgba(0, 0, 0, .62); font-size: 9px; font-variant-numeric: tabular-nums; }
.track-select:hover .track-thumbnail { border-color: var(--accent); filter: brightness(1.08); }
.track-select:hover .track-thumbnail-disc { transform: scale(1.06); }
.track-select[aria-current="true"] .track-thumbnail { border-color: var(--accent); }
.track-label { min-width: 0; }
.track-label { display: block; padding: 11px 1px 5px; }
.track-label strong, .track-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-label strong { font-size: 13px; font-weight: 550; }
.track-credit { display: inline-flex; max-width: 100%; overflow: hidden; margin-top: 5px; padding: 3px 7px; border: 1px solid rgba(196, 164, 119, .28); border-radius: 999px; color: #d3c3a9; font-size: 8px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.track-label small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.empty-playlist { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.empty-playlist code { color: #d3d0c8; font-family: ui-monospace, Consolas, monospace; font-size: .95em; }

.site-footer { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-brand { color: #d3d0c8; font-size: 11px; font-weight: 600; text-decoration: none; }
.site-footer nav { gap: 18px; }
.site-footer nav a { font-size: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (max-width: 680px) {
  .page { width: min(100% - 36px, 940px); }
  .hero { padding: 28px 0 20px; }
  h1 { font-size: clamp(24px, 6vw, 32px); }
  .intro { font-size: 12px; }
  .video-stage { width: calc(100% + 36px); margin-left: -18px; border-right: 0; border-left: 0; border-radius: 0; }
  .hero-record { width: min(280px, 58vw, 33vh); }
  .player-controls { padding: 16px 18px 10px; }
  .video-stage-label { top: 12px; left: 12px; }
  .music-layout { grid-template-columns: 1fr; gap: 35px; padding-bottom: 38px; }
  .featured-track { padding: 20px 0 28px; }
  .track-list { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 17px; }
  .playlist-heading h2 { font-size: 16px; }
}

@media (max-width: 440px) {
  .topbar { min-height: 62px; }
  .player-controls { padding: 15px 11px 9px; }
  .video-stage-label { top: 9px; left: 9px; padding: 5px 7px; font-size: 8px; }
  .site-nav { gap: 13px; }
  .site-nav a { font-size: 10px; }
  .control-row { gap: 7px; }
  .transport-controls { gap: 5px; }
  .control-button.secondary { width: 24px; }
  .control-button.seek-button { width: 27px; }
  .track-thumbnail-disc { width: 46px; }
  #volume-slider { width: 58px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 15px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .player-controls, .center-play-button { transition: none; }
}
