:root {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  font-synthesis: none;
  color-scheme: light;
  --ink: #293840;
  --paper: #f5f3ed;
  --glow: #fffdf7;
  --surface: #fffdf8;
  --surface-soft: #ebeae3;
  --muted: #5f6a5d;
  --rule: #dedfd6;
  --accent: #394f63;
  --record: #394f63;
  --label: #c5d3d5;
  --label-ink: #394f63;
  --play-paper: #fcfaf4;
  --play-ink: #394f63;
  --slider-track: #d6d9cf;
  --notice: #8c604a;
  --shadow: #1e303019;
  color: var(--ink);
  background: var(--paper);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9eeec;
  --paper: #151b20;
  --glow: #26343d;
  --surface: #2b3942;
  --surface-soft: #1f292f;
  --muted: #adb9bd;
  --rule: #35444d;
  --accent: #bbd0df;
  --record: #405d73;
  --label: #b8cbd1;
  --label-ink: #294255;
  --play-paper: #edf0ea;
  --play-ink: #294255;
  --slider-track: #4b5e68;
  --notice: #e5b798;
  --shadow: #00000040;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 46%, var(--glow) 0, transparent 52%);
}
button, input, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.masthead { display: flex; align-items: center; justify-content: space-between; padding: 28px 4.8%; }
.wordmark { display: flex; align-items: center; font-size: 22px; font-weight: 650; letter-spacing: -1px; gap: 10px; }
.wordmark-dot { margin-left: -10px; color: #a78263; }
.brand-mark { height: 20px; display: flex; align-items: center; gap: 3px; margin-right: 3px; }
.brand-mark i { background: var(--accent); width: 3px; border-radius: 2px; height: 9px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 13px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--surface-soft); border-color: var(--muted); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-icon-sun, :root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
.header-note { font-family: Georgia, serif; font-size: 14px; font-style: italic; color: var(--muted); }
.eyebrow { font-size: 9px; letter-spacing: 2.6px; color: var(--muted); font-weight: 600; }
h1 { font-size: 25px; letter-spacing: -1.1px; font-weight: 400; margin: 14px 0 0; }
.player { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.genre-switch { display: flex; background: var(--surface-soft); border: 1px solid var(--rule); border-radius: 30px; padding: 4px; gap: 3px; }
.genre-button { min-width: 130px; padding: 10px 18px; border-radius: 24px; background: transparent; color: var(--muted); font-size: 12px; transition: background .25s, color .25s, box-shadow .25s; }
.genre-button span { font-family: Georgia, serif; font-style: italic; margin-left: 7px; font-size: 12px; }
.genre-button.selected { background: var(--surface); color: var(--accent); box-shadow: 0 2px 4px var(--shadow); }
.record-wrap { position: relative; width: 238px; height: 238px; margin: 28px 0 18px; display: grid; place-items: center; }
.record { position: absolute; inset: 0; background: var(--record); border-radius: 50%; box-shadow: 0 13px 26px var(--shadow), inset 0 0 0 1px #ffffff17; transition: background .5s; animation: rotate 36s linear infinite; animation-play-state: paused; overflow: hidden; }
.record:after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 20deg, transparent 0deg, #ffffff16 38deg, transparent 75deg, transparent 165deg, #00000013 195deg, transparent 225deg); }
.record-grooves { position: absolute; inset: 12px; border-radius: 50%; background: repeating-radial-gradient(circle at center, transparent 0, transparent 3px, #ffffff0a 3.5px, #ffffff0a 4px); }
.record-label { position: absolute; inset: 30%; border-radius: 50%; background: var(--label); color: var(--label-ink); display: flex; flex-direction: column; align-items: center; padding-top: 11px; transition: background .5s; }
.record-label:after { content: ""; position: absolute; top: 54%; left: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%); background: var(--record); border-radius: 50%; }
.record-label span { font-family: Georgia, serif; font-size: 16px; font-style: italic; }
.record-label small { position: absolute; bottom: 15px; font-size: 5px; letter-spacing: 1.2px; }
.play-button { position: relative; z-index: 1; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--play-paper); color: var(--play-ink); box-shadow: 0 3px 9px #0001; transition: transform .2s, opacity .2s; }
.play-button:hover:not(:disabled) { transform: scale(1.08); }
.play-button:active:not(:disabled) { transform: scale(.96); }
.play-button:focus-visible { outline-color: var(--play-ink); outline-offset: 5px; }
.play-button:disabled { opacity: .5; }
.play-button svg { width: 22px; height: 22px; }
.transport-controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-bottom: 20px; }
.skip-button { width: 44px; height: 44px; padding: 10px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: transparent; transition: background .2s, transform .2s, opacity .2s; }
.skip-button svg { width: 22px; height: 22px; }
.skip-button:hover:not(:disabled) { background: var(--surface-soft); }
.skip-button:active:not(:disabled) { transform: scale(.93); }
.skip-button:disabled { opacity: .3; }
.track-position { padding-left: 9px; margin-left: 3px; border-left: 1px solid var(--rule); font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.track-position:empty { display: none; }
.play-icon { margin-left: 1px; }
.pause-icon { display: none; }
.is-playing .play-icon, .is-loading .play-icon { display: none; }
.is-playing .pause-icon, .is-loading .pause-icon { display: block; }
.is-playing .record { animation-play-state: running; }
.state-label { height: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 8px; font-weight: 600; letter-spacing: 1.5px; color: var(--muted); margin: 0; }
.live-dot { width: 4px; height: 4px; background: var(--muted); border-radius: 50%; }
.is-playing .live-dot { background: #779470; box-shadow: 0 0 0 3px #77947014; }
h2 { font-size: 18px; letter-spacing: -.5px; font-weight: 500; margin: 13px 0 8px; }
.track-info { width: min(270px, 100%); }
.track-timeline { margin-top: 20px; }
#track-progress { display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 3px; overflow: hidden; border: 0; border-radius: 3px; background: var(--slider-track); color: var(--accent); }
#track-progress::-webkit-progress-bar { background: var(--slider-track); border-radius: 3px; }
#track-progress::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
#track-progress::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
.track-time { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.time-divider { opacity: .6; }
.volume-row { display: flex; align-items: center; gap: 13px; margin-top: 20px; color: var(--muted); }
.volume-row svg { width: 15px; height: 15px; }
.volume-row output { font-size: 10px; font-variant-numeric: tabular-nums; min-width: 20px; }
.volume-row input { appearance: none; -webkit-appearance: none; width: 134px; height: 26px; border-radius: 3px; background: none !important; cursor: pointer; --level: 65%; }
.volume-row input::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--level), var(--slider-track) var(--level)); }
.volume-row input::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: var(--accent); }
.volume-row input::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--level), var(--slider-track) var(--level)); }
.volume-row input::-moz-range-thumb { border: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.message { font-size: 11px; color: var(--notice); max-width: 340px; line-height: 1.8; min-height: 20px; margin: 12px 0 0; }
footer { display: flex; align-items: center; justify-content: space-between; margin: 15px 4.8% 0; border-top: 1px solid var(--rule); padding: 22px 0 26px; color: var(--muted); font-size: 10px; letter-spacing: .3px; }
footer > span:first-child:not(.footer-right) { font-family: Georgia, serif; font-style: italic; font-size: 12px; }
footer a { color: var(--muted); font-size: 11px; }
.footer-right { margin-left: auto; font-size: 8px; letter-spacing: 1.6px; }
body[data-genre="chillhouse"] { --accent: #866556; --record: #866556; --label: #e2c6a8; --label-ink: #654735; --play-ink: #654735; }
:root[data-theme="dark"] body[data-genre="chillhouse"] { --accent: #e1bb9c; --record: #785648; --label: #dec3aa; --label-ink: #4b3228; --play-ink: #4b3228; }
.is-loading .play-button { animation: breathe 1s ease-in-out infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .45; } }
[hidden] { display: none !important; }
@media (min-height: 900px) {
  .record-wrap { width: 280px; height: 280px; margin-top: 34px; margin-bottom: 20px; }
  .play-button { width: 58px; height: 58px; }
  .record-label span { margin-top: 3px; }
  .record-label small { bottom: 18px; }
  .volume-row { margin-top: 35px; }
}
@media (max-width: 550px) {
  .masthead { padding: 20px 24px; }
  .wordmark { font-size: 20px; }
  .header-note { display: none; }
  .player { padding: 22px 20px 20px; }
  h1 { font-size: 23px; }
  .record-wrap { width: 210px; height: 210px; margin-top: 26px; }
  .genre-button { min-width: 126px; }
  footer { margin-left: 24px; margin-right: 24px; padding: 20px 0; }
  .footer-right { font-size: 7px; letter-spacing: 1.2px; }
}
@media (max-height: 700px) {
  .masthead { padding-top: 16px; padding-bottom: 12px; }
  .player { padding-top: 12px; padding-bottom: 12px; }
  .record-wrap { width: 180px; height: 180px; margin: 20px 0 14px; }
  .transport-controls { margin-bottom: 16px; }
  .volume-row { margin-top: 22px; }
  footer { padding: 17px 0; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
