:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
* { box-sizing: border-box; }
h1, h2, p { margin: 0; }
body { min-height: 100dvh; margin: 0; display: grid; place-items: center; color: #f4efe6; background: #17131d; }
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: #17131d; }
.ambient-layer { position: absolute; inset: 0; background: radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--ambient-primary) 40%, #17131d) 0%, transparent 52%), radial-gradient(circle at 82% 78%, color-mix(in srgb, var(--ambient-secondary) 40%, #17131d) 0%, transparent 56%), radial-gradient(circle at 50% -12%, #4a2d45 0%, #211722 44%, transparent 72%); opacity: 0; transition: opacity 1.3s ease; }
.ambient-layer.is-active { opacity: 1; }
main { --artwork-size: min(17rem, 64vw, 31dvh); position: relative; z-index: 1; width: min(92vw, 32rem); display: flex; flex-direction: column; align-items: center; gap: clamp(.8rem, 2dvh, 1.2rem); text-align: center; padding: clamp(1rem, 3dvh, 2rem) 2rem; }
.station-header { position: relative; }
.station-copy { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.eyebrow { letter-spacing: .28em; font-size: .7rem; color: #c9adbd; text-transform: uppercase; }
h1 { font-family: "Iowan Old Style", Baskerville, "Times New Roman", Georgia, serif; font-size: clamp(2.5rem, 8vw, 3.5rem); line-height: .96; font-weight: 400; text-wrap: balance; }
.brand-select { color: #c9adbd; }
.tagline { color: #d8c6cf; font-family: "Iowan Old Style", Baskerville, "Times New Roman", Georgia, serif; font-style: italic; }
#player:not([data-state="idle"]) .station-header { width: var(--artwork-size); display: flex; align-items: center; justify-content: space-between; }
#player:not([data-state="idle"]) .station-copy { align-items: flex-start; gap: .2rem; }
#player:not([data-state="idle"]) .tagline, #player:not([data-state="idle"]) .tempo-detail { display: none; }
#player:not([data-state="idle"]) .eyebrow { font-size: .6rem; line-height: 1; font-weight: 400; letter-spacing: .06em; color: #b8aab4; text-transform: none; }
#player:not([data-state="idle"]) h1 { order: -1; font-size: 1rem; line-height: 1; white-space: nowrap; }
.player-layout { width: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(.8rem, 2dvh, 1.2rem); }
.player-panel { width: min(100%, 24rem); display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.artwork { width: var(--artwork-size); aspect-ratio: 1; position: relative; margin: 0; overflow: hidden; border: 1px solid #d8c6cf26; border-radius: 1rem; background: linear-gradient(155deg, #4a2d45, #211722 62%); box-shadow: 0 1.5rem 4rem #0008; }
.artwork-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #d3a8c1; opacity: 1; transition: opacity 1.2s ease; }
.artwork-placeholder svg { width: 72%; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }
.artwork-placeholder circle { fill: #d57372; stroke: none; opacity: .82; }
.artwork[data-has-art="true"] .artwork-placeholder { opacity: 0; }
#art { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.artwork[data-has-art="true"] #art { opacity: 1; }
.track-info { min-height: 4.4rem; margin: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.track-info[hidden] { display: none; }
h2 { min-height: 0; margin: 0; display: -webkit-box; overflow: hidden; font-size: 1.2rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#channel { margin: 0; color: #b8aab4; min-height: 1.4em; }
#status { margin: 0; color: #b8aab4; min-height: 1.4em; }
#status:empty { display: none; }
#player:not([data-state="idle"]) #status:empty { display: block; }
.actions { display: flex; justify-content: center; gap: .75rem; margin: 0; }
button { min-width: 6.5rem; min-height: 2.75rem; border: 1px solid #b897aa; border-radius: 999px; padding: .75rem 1.4rem; color: inherit; cursor: pointer; }
.primary-action { border-color: #f4efe6; background: #f4efe6; color: #211722; font-weight: 650; }
.primary-action:hover { background: #fffaf2; }
.secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: #ffffff0a; }
.secondary-action:hover { background: #ffffff18; }
.secondary-action svg { width: 1rem; fill: currentColor; }
button:disabled { opacity: .45; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid #f4cfe4; outline-offset: 3px; }
.volume { width: min(12rem, 70%); margin: 0; display: flex; align-items: center; gap: .7rem; color: #c9adbd; }
.volume-icon { width: 1.2rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.volume input { width: 100%; accent-color: #d3a8c1; }
.playback-indicator { position: absolute; display: flex; justify-content: center; align-items: center; gap: .5rem; min-width: 4.75rem; min-height: 1em; margin: 0; font-size: .7rem; letter-spacing: .2em; color: #b8aab4; opacity: 0; visibility: hidden; }
#player:not([data-state="idle"]) .playback-indicator { position: static; }
.indicator-dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.playback-indicator[data-state="playing"] { color: #ff7892; opacity: 1; visibility: visible; }
.playback-indicator[data-state="paused"] { color: #c9adbd; opacity: 1; visibility: visible; }
.playback-indicator[data-state="playing"] .indicator-dot { animation: pulse 1.4s ease-in-out infinite; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) { .playback-indicator[data-state="playing"] .indicator-dot { animation: none; } }
@media (prefers-reduced-motion: reduce) { .ambient-layer { transition: none; } }
@media (prefers-reduced-motion: reduce) { #art, .artwork-placeholder { transition: none; } }
@media (min-width: 700px) and (max-height: 760px) {
  #player:not([data-state="idle"]) { --artwork-size: min(36vw, 52dvh, 18rem); width: min(94vw, 56rem); }
  #player:not([data-state="idle"]) .station-header { width: 100%; }
  #player:not([data-state="idle"]) .player-layout { flex-direction: row; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); text-align: left; }
  #player:not([data-state="idle"]) .artwork { flex: 0 0 auto; }
  #player:not([data-state="idle"]) .player-panel { flex: 1 1 20rem; width: auto; align-items: flex-start; }
  #player:not([data-state="idle"]) .track-info { align-items: flex-start; }
}
@media (min-width: 1200px) and (min-height: 900px) {
  main { --artwork-size: min(26rem, 34vw, 40dvh); width: min(92vw, 42rem); }
  h1 { font-size: clamp(3rem, 5vw, 4rem); }
  .track-info { min-height: 5.5rem; }
  h2 { font-size: 1.5rem; }
  button { min-height: 3.25rem; min-width: 7.5rem; font-size: 1rem; }
  .volume { width: min(14rem, 70%); }
}
@media (max-width: 480px) {
  main { --artwork-size: min(13rem, 60vw, 25dvh); padding: .75rem 1rem 1rem; }
  .eyebrow { font-size: .65rem; letter-spacing: .2em; }
  h1 { font-size: clamp(1.85rem, 9.5vw, 2.5rem); letter-spacing: -.025em; white-space: nowrap; }
}
