@font-face { font-family: Montserrat; src: url('./assets/Montserrat-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Montserrat; src: url('./assets/Montserrat-SemiBold.ttf') format('truetype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Montserrat; src: url('./assets/Montserrat-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  color-scheme: light;
  --surface: #FFFFFF;
  --ink: #222428;
  --muted: #666A70;
  --accent: #FF5A3D;
  --shadow: #e3e4e6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--surface); }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: Montserrat, system-ui, sans-serif; letter-spacing: 0; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.shell { width: min(1120px, 100%); min-height: 100svh; margin: auto; padding: 42px 48px 28px; display: flex; flex-direction: column; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
h1 { display: flex; align-items: center; gap: 18px; margin: 0; line-height: 1.2; }
.brand-logo { width: 200px; height: auto; display: block; }
h1 span { font-size: 14px; font-weight: 400; color: var(--muted); }
.status-row { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.player { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: center; align-items: center; gap: 88px; padding: 56px 0; }
.art-column { min-width: 0; }
/* Explicit insets avoid WebKit's percentage-height/aspect-ratio sizing cycle. */
.art-wrap { --rim: 15px; --groove: 6px; width: min(100%, 392px); aspect-ratio: 1; margin: auto; border-radius: 50%; background: var(--surface); box-shadow: 0 0 24px #22242812, inset 0 0 0 1px #e7e8ea; }
.art-inset { position: absolute; inset: var(--rim); border-radius: 50%; box-shadow: inset 0 0 6px #d9dce0; }
.record-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.album-art, .art-fallback { display: block; width: 78%; min-width: 0; max-width: 78%; height: auto; flex: 0 0 auto; }
.art-fallback img { width: 100%; height: auto; display: block; }
.art-wrap { position: relative; }
.record { position: absolute; inset: var(--groove); border-radius: 50%; overflow: hidden; background: radial-gradient(circle, #fff 0 61%, transparent 61%), repeating-radial-gradient(circle, #f9f9f9 0 2px, #e9eaec 2px 3px, #fff 3px 5px); animation: record-spin 24s linear infinite; animation-play-state: paused; }
.record-mark { position: absolute; top: 4%; left: 49.5%; width: 1%; height: 3%; background: var(--accent); border-radius: 2px; }
.turntable-arm { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.arm-base { filter: drop-shadow(3px 5px 4px #a6adb566); }
.tonearm { transform-origin: 350px 45px; transform: rotate(-19deg); transition: transform 900ms cubic-bezier(.4, 0, .2, 1), filter 900ms; filter: drop-shadow(5px 7px 4px #69737e50); }
body.is-playing .record { animation-play-state: running; }
body.is-playing .tonearm { transform: rotate(-2deg); filter: drop-shadow(2px 3px 2px #69737e50); }
@keyframes record-spin { to { transform: rotate(360deg); } }
.station-caption { text-align: center; margin-top: 32px; color: var(--muted); font-size: 13px; }
.player-main { min-width: 0; }
.genre { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 14px; font-weight: 600; }
.genre-line { width: 24px; height: 2px; background: var(--accent); }
.track-info { margin-top: 32px; min-height: 132px; }
.label { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
h2 { font-size: 36px; font-weight: 700; line-height: 1.18; margin: 0; overflow-wrap: anywhere; }
.artist { color: var(--muted); font-size: 16px; line-height: 1.4; margin: 12px 0 0; overflow-wrap: anywhere; }
.visualizer { height: 46px; display: flex; gap: 5px; align-items: center; margin: 18px 0 28px; }
.visualizer i { width: 3px; height: 12px; border-radius: 3px; background: var(--accent); transform: scaleY(.4); animation: equalize 1.5s ease-in-out infinite paused; }
.visualizer i:nth-child(3n) { height: 30px; animation-delay: -.7s; }
.visualizer i:nth-child(3n + 1) { height: 20px; animation-delay: -.4s; }
.visualizer i:nth-child(5n) { height: 40px; animation-delay: -1.1s; }
body.is-playing .visualizer i { animation-play-state: running; }
.controls { display: flex; align-items: center; gap: 26px; }
.button-well { width: 104px; height: 104px; flex-shrink: 0; padding: 8px; border-radius: 50%; box-shadow: inset 4px 4px 9px #d2d6dc, inset -4px -4px 9px #ffffff; }
#playButton { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 0; color: var(--ink); cursor: pointer; background: var(--accent); box-shadow: 4px 4px 10px #dedfe1, -4px -4px 10px #ffffff; transition: transform 160ms, box-shadow 160ms; }
#playButton:hover { transform: scale(1.04); }
#playButton:active { transform: scale(.96); box-shadow: inset 3px 3px 8px #22242833; }
#playButton:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.play-icon { width: 0; height: 0; border-top: 11px solid transparent; border-bottom: 11px solid transparent; border-left: 17px solid currentColor; margin-left: 5px; }
body.is-playing .play-icon { border: 0; margin: 0; width: 17px; height: 22px; background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%); }
body.is-buffering #playButton { opacity: .7; }
.listen-copy { display: grid; gap: 6px; }
.listen-copy strong { font-size: 15px; font-weight: 600; }
.listen-copy span { font-size: 12px; color: var(--muted); line-height: 1.4; }
footer { border-top: 1px solid #d8dce0; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; font-size: 10px; font-weight: 500; color: var(--muted); }
.separator { color: var(--accent); margin: 0 10px; }
@keyframes equalize { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (min-width: 1500px) and (min-height: 800px) {
  .shell { width: min(1440px, 100%); padding: 56px 72px 38px; }
  .player { gap: 120px; }
  .art-wrap { width: 460px; }
  .brand-logo { width: 240px; }
  h2 { font-size: 44px; }
  .artist { font-size: 22px; }
  .status-row, .genre, .station-caption, .listen-copy strong { font-size: 18px; }
  footer, .listen-copy span { font-size: 14px; }
}
@media (max-width: 700px) {
  .shell { padding: max(24px, env(safe-area-inset-top)) 28px max(20px, env(safe-area-inset-bottom)); }
  .header { gap: 12px; }
  h1 { gap: 10px; }
  .brand-logo { width: 160px; }
  h1 span { font-size: 11px; }
  .status-row { font-size: 10px; gap: 7px; }
  .player { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 36px 0 28px; text-align: center; }
  .art-wrap { --rim: 11px; --groove: 5px; width: min(250px, 68vw, 33svh); min-width: 208px; box-shadow: 0 0 18px #22242812, inset 0 0 0 1px #e7e8ea; }
  .station-caption { display: none; }
  .genre { justify-content: center; font-size: 12px; gap: 8px; }
  .genre-line { width: 16px; }
  .track-info { margin-top: 18px; min-height: 82px; }
  .label { margin-bottom: 8px; font-size: 11px; }
  h2 { font-size: 26px; }
  .artist { margin-top: 8px; font-size: 14px; }
  .visualizer { justify-content: center; height: 28px; margin: 16px 0; }
  .visualizer i { max-height: 28px; }
  .controls { flex-direction: column; gap: 14px; }
  .button-well { width: 94px; height: 94px; }
  .listen-copy { gap: 4px; }
  .listen-copy span { display: none; }
  footer { font-size: 9px; padding-top: 16px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .shell { padding-top: 18px; padding-bottom: 14px; }
  .player { padding: 20px 0 14px; gap: 16px; }
  .art-wrap { width: min(190px, 30svh); }
  .track-info { min-height: 70px; margin-top: 12px; }
  h2 { font-size: 23px; }
  .visualizer { margin: 10px 0; height: 22px; }
  .button-well { width: 82px; height: 82px; }
  .controls { gap: 10px; }
}
@media (min-width: 701px) and (max-height: 650px) {
  .shell { padding: 24px 40px 20px; }
  .player { gap: 50px; padding: 28px 0; }
  .art-wrap { width: min(300px, 54svh); }
  .track-info { margin-top: 22px; min-height: 100px; }
  h2 { font-size: 28px; }
  .visualizer { margin: 12px 0; }
  .button-well { width: 86px; height: 86px; }
}
@media (max-width: 700px) and (max-height: 600px) {
  .art-wrap { --rim: 8px; width: 208px; }
  .label { display: none; }
  .track-info { min-height: 66px; }
  h2 { font-size: 21px; }
  .player { gap: 12px; }
  .button-well { width: 76px; height: 76px; }
  .shell { padding-inline: 20px; }
  .player { padding-block: 14px 10px; }
  .visualizer { height: 16px; margin: 6px 0; }
  .track-info { min-height: 54px; margin-top: 8px; }
  .controls { gap: 6px; }
  footer { padding-top: 10px; }
}
@media (min-width: 701px) and (max-height: 450px) {
  .shell { padding: 16px 32px 12px; }
  .player { padding: 18px 0; gap: 36px; }
  .station-caption { margin-top: 16px; }
  .track-info { margin-top: 12px; min-height: 0; }
  .label { display: none; }
  h2 { font-size: 24px; }
  .visualizer { margin: 8px 0; height: 22px; }
  .button-well { width: 68px; height: 68px; }
  footer { padding-top: 12px; }
}
@media (min-width: 701px) and (max-height: 360px) {
  .player { padding-block: 10px; }
  .station-caption { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
