:root {
  --bg: #03060a;
  --panel: rgba(5, 9, 14, .80);
  --panel-strong: rgba(5, 9, 14, .93);
  --ivory: #f4eadc;
  --ivory-2: #d7cabb;
  --muted: #938b82;
  --muted-2: #66635f;
  --gold: #e7bd7a;
  --gold-bright: #f0cf98;
  --gold-dim: #9f7546;
  --blue: #68a9d7;
  --line: rgba(231, 189, 122, .18);
  --hairline: rgba(255, 255, 255, .07);
  --shadow: 0 35px 90px rgba(0, 0, 0, .42);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ivory);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(180deg, rgba(2, 5, 9, .22), rgba(2, 5, 9, .84)),
    url("images/background.jpg") center / cover no-repeat;
  transform: scale(1.02);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 58% 22%, rgba(218, 158, 84, .13), transparent 36%),
    radial-gradient(circle at 20% 72%, rgba(58, 118, 160, .10), transparent 34%),
    linear-gradient(90deg, rgba(3, 7, 12, .78), rgba(3, 7, 12, .22) 50%, rgba(3, 7, 12, .69));
}
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0 65%, rgba(1, 3, 6, .48));
}

.site-shell {
  width: min(1480px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 48px);
}
.site-header {
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.identity { color: inherit; text-decoration: none; display: inline-flex; flex-direction: column; min-width: 0; }
.identity-kicker, .panel-kicker {
  color: #aa8d68;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .28em;
}
.identity-title {
  margin-top: 4px;
  color: #f1cd97;
  font-size: clamp(27px, 2.6vw, 41px);
  font-weight: 260;
  letter-spacing: .13em;
  line-height: 1;
}
.identity-sub {
  margin-top: 8px;
  color: #a29b93;
  font-size: 9px;
  letter-spacing: .18em;
}
.movement-counter {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: rgba(231, 189, 122, .72);
  font-variant-numeric: tabular-nums;
}
.movement-counter > span { font-size: clamp(36px, 4vw, 62px); font-weight: 180; letter-spacing: .02em; }
.movement-counter small { color: rgba(231, 189, 122, .34); font-size: 12px; letter-spacing: .12em; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, .72fr);
  gap: clamp(18px, 2.2vw, 34px);
  align-items: stretch;
  min-height: calc(100svh - 190px);
}
.player-card, .movements-panel {
  border: 1px solid rgba(231, 189, 122, .12);
  background: linear-gradient(180deg, rgba(7, 12, 19, .82), rgba(4, 8, 13, .73));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(116%);
  -webkit-backdrop-filter: blur(22px) saturate(116%);
}
.player-card {
  border-radius: var(--radius);
  overflow: hidden;
  padding: clamp(24px, 3vw, 48px);
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.35fr);
  grid-template-rows: auto auto auto 1fr auto;
  column-gap: clamp(28px, 4vw, 68px);
  align-content: center;
  position: relative;
}
.player-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 26% 36%, rgba(223, 168, 93, .10), transparent 25%),
    linear-gradient(135deg, rgba(255,255,255,.018), transparent 36%);
}
.art-area { grid-row: 1 / 6; display: flex; align-items: center; justify-content: center; min-width: 0; }
.cover-frame {
  width: min(100%, 470px);
  aspect-ratio: 1;
  position: relative;
}
.cover {
  width: 100%; height: 100%; object-fit: cover; display: block;
  position: relative; z-index: 2;
  border-radius: 4px;
  box-shadow: 0 30px 85px rgba(0,0,0,.50), 0 0 0 1px rgba(255,255,255,.05);
}
.cover-aura {
  position: absolute;
  inset: 9%;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 155, 80, .62), rgba(77, 126, 164, .16) 48%, transparent 72%);
  filter: blur(55px);
  opacity: .30;
}
.player-copy { min-width: 0; align-self: end; padding-top: 8px; }
.now-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.now-label, .movement-text {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .24em;
}
.now-label { color: #b18c60; }
.movement-text { color: #6f6b66; white-space: nowrap; }
.track-title {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 50px);
  font-weight: 300;
  letter-spacing: -.018em;
  line-height: 1.06;
  color: #f5eadb;
  text-wrap: balance;
}
.track-meta {
  margin-top: 12px;
  color: #a69d93;
  font-size: clamp(10px, .92vw, 13px);
  letter-spacing: .035em;
  line-height: 1.45;
}
.visualizer-wrap { min-width: 0; margin-top: clamp(20px, 3.2vh, 36px); }
#spectrum { display: block; width: 100%; height: clamp(126px, 17vh, 190px); }
.timeline {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  margin-top: 5px;
}
.time { color: #968c80; font-size: 10px; font-variant-numeric: tabular-nums; }
.time:last-child { text-align: right; }
.seek, .volume {
  --p: 0%;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
}
.seek { height: 26px; }
.seek::-webkit-slider-runnable-track, .volume::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--p), rgba(255,255,255,.15) var(--p));
}
.seek::-moz-range-track, .volume::-moz-range-track { height: 2px; border: 0; border-radius: 999px; background: rgba(255,255,255,.15); }
.seek::-moz-range-progress, .volume::-moz-range-progress { height: 2px; border-radius: 999px; background: var(--gold); }
.seek::-webkit-slider-thumb, .volume::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px; height: 13px;
  margin-top: -5.5px;
  border: 0; border-radius: 50%;
  background: #e8c58f;
  box-shadow: 0 0 14px rgba(231, 189, 122, .34);
}
.seek::-moz-range-thumb, .volume::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #e8c58f; }
.seek:focus-visible, .volume:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; }

.transport-row {
  display: grid;
  grid-template-columns: minmax(130px,1fr) auto minmax(130px,1fr);
  align-items: center;
  gap: 22px;
  margin-top: 12px;
}
.controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.icon-button, .play-button, .install-button, .sequence-reset, .begin-primary {
  border: 0;
  color: var(--ivory-2);
  background: transparent;
  cursor: pointer;
}
.icon-button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; }
.icon-button:hover { background: rgba(231, 189, 122, .07); color: var(--gold-bright); }
.icon-button svg { width: 24px; height: 24px; fill: currentColor; }
.play-button {
  width: 68px; height: 68px;
  border: 1px solid rgba(231, 189, 122, .54);
  border-radius: 50%;
  display: grid; place-items: center;
  color: #f2d3a2;
  background: radial-gradient(circle at 50% 40%, rgba(139, 91, 43, .34), rgba(79, 51, 25, .18));
  box-shadow: 0 0 35px rgba(231, 189, 122, .08), inset 0 0 18px rgba(255,255,255,.02);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.play-button:hover { transform: scale(1.035); border-color: rgba(240, 207, 152, .86); }
.play-button:active { transform: scale(.96); }
.play-button svg { width: 24px; height: 24px; fill: currentColor; }
.play-button .pause-icon { display: none; }
.play-button.playing .play-icon { display: none; }
.play-button.playing .pause-icon { display: block; }
.desktop-volume { display: grid; grid-template-columns: 34px minmax(70px, 110px); gap: 8px; align-items: center; justify-self: start; }
.icon-button.small { width: 34px; height: 34px; font-size: 8px; letter-spacing: .08em; color: #8e867d; }
.volume { height: 18px; --p: 85%; }
.install-button { justify-self: end; color: #a88762; font-size: 8px; letter-spacing: .19em; padding: 12px 0; }
.install-button:hover { color: var(--gold-bright); }
.player-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--hairline);
}
.sequence-reset, .quality { color: #716b65; font-size: 8px; letter-spacing: .16em; }
.sequence-reset { padding: 8px 0; text-align: left; }
.sequence-reset:hover { color: #b9986f; }
.quality { white-space: nowrap; }

.movements-panel {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 152px);
}
.movements-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 26px 18px;
  border-bottom: 1px solid var(--hairline);
}
.movements-head h3 { margin: 6px 0 0; color: #d9bd95; font-size: 17px; font-weight: 430; letter-spacing: .14em; }
.movements-head > span { color: #886f54; font-size: 9px; letter-spacing: .18em; }
.track-list { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(231,189,122,.26) transparent; }
.track-list::-webkit-scrollbar { width: 8px; }
.track-list::-webkit-scrollbar-thumb { background: rgba(231,189,122,.18); border: 3px solid transparent; background-clip: padding-box; }
.track {
  appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  background: transparent;
  color: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 12px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background .14s ease;
}
.track:hover { background: rgba(231,189,122,.045); }
.track .n { color: #66635f; font-size: 9px; font-variant-numeric: tabular-nums; }
.track .tt { color: #d4c9bc; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .mm { margin-top: 4px; color: #77716b; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; justify-self: end; }
.track.active { background: linear-gradient(90deg, rgba(205,151,79,.14), rgba(205,151,79,.025)); }
.track.active .n, .track.active .tt { color: #efc785; }
.track.active .dot { background: #e3b66f; box-shadow: 0 0 12px #dca65e; }
.track:focus-visible { outline: 1px solid rgba(231,189,122,.65); outline-offset: -1px; }
.panel-end { padding: 14px 22px; margin-top: auto; border-top: 1px solid var(--hairline); color: #5f5b56; font-size: 8px; letter-spacing: .20em; text-align: right; }
.site-footer {
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: rgba(196,185,173,.38); font-size: 8px; letter-spacing: .18em;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.start-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(217,159,84,.12), transparent 32%),
    linear-gradient(180deg, rgba(2,5,9,.77), rgba(2,5,9,.94)),
    url("images/background.jpg") center / cover no-repeat;
  transition: opacity .55s ease, visibility .55s ease;
}
.start-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.start-inner { text-align: center; transform: translateY(-2vh); }
.start-kicker { color: #a78d6d; font-size: 9px; letter-spacing: .30em; margin-bottom: 16px; }
.start-inner h1 { margin: 0; color: #f2d19f; font-size: clamp(42px, 9vw, 92px); font-weight: 190; letter-spacing: .16em; line-height: .94; padding-left: .16em; }
.start-sub { margin-top: 13px; color: #c4a77e; font-size: clamp(12px, 2vw, 18px); letter-spacing: .28em; padding-left: .28em; }
.start-artist { margin-top: 25px; color: #8f8880; font-size: 10px; letter-spacing: .20em; }
.begin-primary {
  margin-top: 44px;
  min-width: 210px;
  height: 52px;
  padding: 0 26px;
  border: 1px solid rgba(231,189,122,.48);
  border-radius: 999px;
  color: #edca94;
  background: rgba(97,64,30,.16);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .26em;
  box-shadow: 0 0 44px rgba(231,189,122,.06);
}
.begin-primary:hover { border-color: rgba(240,207,152,.85); background: rgba(120,78,37,.22); }
.start-note { margin-top: 18px; color: #615e5a; font-size: 8px; letter-spacing: .09em; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: minmax(0, 1.25fr) minmax(350px, .75fr); }
  .player-card { grid-template-columns: minmax(190px,.72fr) minmax(0,1.28fr); column-gap: 34px; padding: 30px; }
  .desktop-volume { grid-template-columns: 30px 75px; }
  .transport-row { grid-template-columns: 110px auto 110px; }
}

@media (max-width: 880px) {
  body::after { background: radial-gradient(circle at 50% 18%, rgba(210,157,81,.14), transparent 36%), linear-gradient(180deg, rgba(4,8,13,.30), rgba(4,8,13,.74)); }
  .site-shell { padding: 0 14px; }
  .site-header { height: 104px; padding-left: 6px; padding-right: 6px; }
  .identity-title { font-size: 28px; }
  .identity-sub { font-size: 7.5px; }
  .movement-counter > span { font-size: 38px; }
  .layout { display: block; min-height: auto; }
  .player-card {
    border-radius: 20px;
    display: block;
    padding: 22px clamp(18px, 5vw, 30px) 20px;
  }
  .art-area { display: block; }
  .cover-frame { width: min(66vw, 330px); margin: 0 auto; }
  .player-copy { margin-top: 23px; text-align: center; }
  .now-row { justify-content: center; margin-bottom: 10px; }
  .movement-text { display: none; }
  .track-title { font-size: clamp(25px, 7vw, 34px); }
  .track-meta { font-size: 9.5px; min-height: 14px; }
  .visualizer-wrap { margin-top: 14px; }
  #spectrum { height: 118px; }
  .timeline { grid-template-columns: 36px 1fr 36px; gap: 8px; }
  .transport-row { display: flex; justify-content: center; margin-top: 8px; }
  .desktop-volume, .install-button { display: none !important; }
  .controls { gap: 26px; }
  .icon-button { width: 44px; height: 44px; }
  .play-button { width: 62px; height: 62px; }
  .player-footer { margin-top: 9px; }
  .movements-panel { margin-top: 14px; max-height: none; border-radius: 20px; }
  .track-list { overflow: visible; }
  .site-footer { padding: 18px 7px max(22px, env(safe-area-inset-bottom)); min-height: auto; flex-direction: column; align-items: flex-start; gap: 7px; }
}

@media (max-width: 520px) {
  .site-shell { padding: 0 10px; }
  .site-header { height: 92px; }
  .identity-kicker { font-size: 7px; }
  .identity-title { font-size: 24px; }
  .identity-sub { font-size: 6.7px; letter-spacing: .12em; }
  .movement-counter > span { font-size: 31px; }
  .movement-counter small { display: none; }
  .player-card { padding: 17px 16px 16px; }
  .cover-frame { width: min(71vw, 285px); }
  .player-copy { margin-top: 19px; }
  .now-label { font-size: 7.5px; }
  .track-title { font-size: clamp(24px, 7.6vw, 31px); }
  .track-meta { max-width: 94%; margin-left: auto; margin-right: auto; font-size: 8.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #spectrum { height: 103px; }
  .timeline { margin-top: 0; }
  .controls { gap: 19px; }
  .play-button { width: 60px; height: 60px; }
  .player-footer { padding-top: 10px; }
  .sequence-reset, .quality { font-size: 7px; }
  .movements-head { padding: 20px 18px 14px; }
  .movements-head h3 { font-size: 14px; }
  .track { min-height: 60px; padding: 9px 16px; grid-template-columns: 30px minmax(0,1fr) 10px; }
  .track .tt { font-size: 10.5px; }
  .track .mm { font-size: 7.5px; }
  .panel-end { padding: 13px 17px; }
  .start-screen { padding-left: 18px; padding-right: 18px; }
  .start-inner h1 { font-size: clamp(40px, 15vw, 66px); }
  .start-sub { font-size: 10px; }
  .begin-primary { margin-top: 38px; min-width: 198px; height: 50px; }
}

@media (max-height: 760px) and (min-width: 881px) {
  .site-header { height: 104px; }
  .layout { min-height: calc(100svh - 156px); }
  .movements-panel { max-height: calc(100svh - 124px); }
  .player-card { padding-top: 24px; padding-bottom: 24px; }
  #spectrum { height: 120px; }
  .site-footer { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
