:root {
  --ink: #1b242c;
  --ink-soft: #2a353c;
  --paper: #f4efe6;
  --paper-2: #e7e0d2;
  --sage: #6e8b76;
  --sage-deep: #3f5c49;
  --brass: #a88462;
  --muted: #5e6b66;
  --line: rgba(27, 36, 44, 0.12);
  --cream: #f6f1e7;
  --danger: #8c4a3a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  color: var(--cream);
  background: var(--ink);
  line-height: 1.5;
}

.glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(8px);
}

.glow-a {
  width: 52vw;
  height: 52vw;
  max-width: 640px;
  max-height: 640px;
  left: -12vw;
  top: -18vw;
  background: radial-gradient(circle, rgba(140, 168, 146, 0.28), transparent 68%);
}

.glow-b {
  width: 46vw;
  height: 46vw;
  max-width: 520px;
  max-height: 520px;
  right: -14vw;
  bottom: -16vw;
  background: radial-gradient(circle, rgba(168, 132, 98, 0.2), transparent 70%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 5px rgba(110, 139, 118, 0.22);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid rgba(246, 241, 231, 0.16);
  border-radius: 999px;
  background: rgba(246, 241, 231, 0.04);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(246, 241, 231, 0.72);
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--paper);
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 8px;
  color: #c8b59a;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lede {
  margin: 0 0 22px;
  max-width: 40rem;
  color: rgba(246, 241, 231, 0.78);
  font-size: 1.05rem;
}

.player {
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}

.visualizer {
  display: block;
  width: 100%;
  height: 56px;
  margin-bottom: 6px;
}

.status {
  margin: 0;
  color: var(--sage-deep);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.now-title {
  margin: 6px 0 2px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.now-credit {
  margin: 0 0 16px;
  color: var(--muted);
  min-height: 1.4em;
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--muted);
}

.seek, .volume-slider {
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--paper-2);
  outline: none;
}

.seek::-webkit-slider-thumb,
.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sage-deep);
  border: 0;
  cursor: pointer;
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 18px 0 8px;
}

.icon-btn, .play-btn, .chip, .text-btn, .track-btn {
  font: inherit;
  cursor: pointer;
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}

.icon-btn svg, .play-btn svg { width: 22px; height: 22px; }

.icon-btn-small { width: 36px; height: 36px; }
.icon-btn-small svg { width: 18px; height: 18px; }

.play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(27, 36, 44, 0.2);
}

.play-btn .icon-pause { display: none; }
.play-btn.is-playing .icon-play { display: none; }
.play-btn.is-playing .icon-pause { display: block; }

.toggles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.86rem;
}

.chip.is-on {
  background: rgba(110, 139, 118, 0.16);
  color: var(--sage-deep);
  border-color: transparent;
}

.count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.volume-slider { max-width: 180px; }

.inline-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.92rem;
}

.panel, .about, .prose {
  margin-top: 28px;
}

.panel-head, .page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel h2, .about h2, .prose h1 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #c8b59a;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.panel-state { color: rgba(246, 241, 231, 0.7); }

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(52vh, 440px);
  overflow: auto;
  border-top: 1px solid rgba(246, 241, 231, 0.1);
}

.track-btn {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(246, 241, 231, 0.08);
  background: transparent;
  color: inherit;
  padding: 12px 2px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.track-btn small {
  color: rgba(246, 241, 231, 0.55);
  display: block;
  margin-top: 2px;
}

.track-btn.is-current {
  color: #d7e4d8;
}

.track-btn .license-tag {
  flex: none;
  align-self: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #c8b59a;
}

.about p, .prose p, .foot p {
  color: rgba(246, 241, 231, 0.76);
  max-width: 42rem;
}

.foot {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(246, 241, 231, 0.1);
}

.foot nav {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.foot a, .prose a { color: #d7c4ae; }

.prose { padding-bottom: 48px; }

.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

.credit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.credit-list li {
  padding: 14px 0;
  border-bottom: 1px solid rgba(246, 241, 231, 0.1);
}

.credit-list h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 560;
}

.page-error .player { outline: 1px solid rgba(140, 74, 58, 0.35); }

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 760px); padding-top: 18px; }
  .player { padding: 18px 16px 16px; border-radius: 22px; }
  .count { margin-left: 0; width: 100%; }
  .play-btn { width: 68px; height: 68px; }
  h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .glow { display: none; }
}
