:root {
  --artwork-opacity: 1;
  --hero-text: #ffffff;
  --hero-muted: rgba(255, 255, 255, 0.78);
  --hero-dim: rgba(255, 255, 255, 0.58);
  --hero-shadow: rgba(0, 0, 0, 0.62);
  --overlay-bottom: rgba(0, 0, 0, 0.76);
  --overlay-mid: rgba(0, 0, 0, 0.22);
  --overlay-side: rgba(0, 0, 0, 0.32);
  --progress-track: rgba(255, 255, 255, 0.24);
  --progress-fill: rgba(255, 255, 255, 0.92);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090b0d;
  color: #ffffff;
}

[data-artwork-tone="bright"] {
  --hero-shadow: rgba(0, 0, 0, 0.72);
  --overlay-bottom: rgba(0, 0, 0, 0.84);
  --overlay-mid: rgba(0, 0, 0, 0.34);
  --overlay-side: rgba(0, 0, 0, 0.42);
  --progress-track: rgba(255, 255, 255, 0.34);
}

[data-artwork-tone="dark"] {
  --overlay-bottom: rgba(0, 0, 0, 0.58);
  --overlay-mid: rgba(0, 0, 0, 0.12);
  --overlay-side: rgba(0, 0, 0, 0.22);
  --progress-track: rgba(255, 255, 255, 0.2);
}

[data-artwork-tone="busy"] {
  --hero-shadow: rgba(0, 0, 0, 0.78);
  --overlay-bottom: rgba(0, 0, 0, 0.82);
  --overlay-mid: rgba(0, 0, 0, 0.3);
  --overlay-side: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #090b0d;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.portal,
.content {
  min-height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.detail {
  display: none;
}

.now-hero {
  min-height: 100svh;
  height: 100svh;
  width: 100%;
  position: relative;
  display: grid;
  overflow: hidden;
  isolation: isolate;
  background: #111518;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.now-hero:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.58);
  outline-offset: -8px;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-artwork);
  background-position: center;
  background-size: cover;
  opacity: var(--artwork-opacity);
  transform: scale(1.035);
  transition: opacity 360ms ease, filter 700ms ease, transform 900ms ease;
}

.now-hero:active .hero-art,
.now-hero.is-touching .hero-art {
  opacity: 0.9;
  transform: scale(1.015);
  transition-duration: 120ms;
}

.now-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03) 0%, var(--overlay-mid) 44%, var(--overlay-bottom) 100%),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(90deg, var(--overlay-side), transparent 32%, transparent 68%, var(--overlay-side));
  transition: background 700ms ease;
}

.now-hero.is-waiting .hero-art {
  filter: saturate(0.85) brightness(0.72);
}

.hero-overlay {
  min-height: 100svh;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
}

.hero-copy {
  display: grid;
  gap: 9px;
  max-width: min(100%, 860px);
  color: var(--hero-text);
  text-shadow: 0 2px 22px var(--hero-shadow);
}

.hero-copy h1 {
  max-width: min(11.5ch, 100%);
  margin: 0;
  font-size: clamp(42px, 13.5vw, 86px);
  line-height: 0.94;
  font-weight: 790;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-artist {
  margin: 0;
  font-size: clamp(19px, 5.4vw, 31px);
  line-height: 1.08;
  font-weight: 650;
}

.hero-album {
  margin: 0;
  color: var(--hero-muted);
  font-size: 15px;
  line-height: 1.3;
}

.progress-block {
  display: grid;
  gap: 12px;
  width: 100%;
  padding-top: 12px;
}

.progress-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--progress-track);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.22);
}

.progress-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--progress-fill);
  transition: width 900ms linear;
}

.progress-time {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  color: var(--hero-muted);
  font-variant-numeric: tabular-nums;
}

.progress-time span {
  display: grid;
  gap: 5px;
}

.progress-time span:last-child {
  text-align: right;
}

.progress-time em {
  font-style: normal;
  font-size: 17px;
  line-height: 1;
}

.progress-time small {
  color: var(--hero-dim);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.hero-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--hero-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-shadow: 0 1px 14px var(--hero-shadow);
  text-transform: uppercase;
}

.hero-message {
  min-height: 15px;
  margin: -6px 0 0;
  color: var(--hero-dim);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  text-align: center;
  text-shadow: 0 1px 14px var(--hero-shadow);
  transition: opacity 220ms ease;
}

.hero-message.is-visible {
  opacity: 1;
}

.hero-status span:first-child::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: #1ed760;
  box-shadow: 0 0 14px rgba(30, 215, 96, 0.45);
}

.now-hero.is-waiting .hero-status span:first-child::before {
  background: #a54b45;
  box-shadow: none;
}

.primary {
  width: max-content;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 12px 17px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.primary:focus-visible,
.hero-status:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.empty-now {
  min-height: 100svh;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  color: #ffffff;
}

.device-chooser {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.28);
}

.device-chooser-panel {
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  border-radius: 18px;
  padding: 18px;
  background: rgba(9, 11, 13, 0.88);
  color: #ffffff;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.device-chooser h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.device-list {
  display: grid;
  gap: 2px;
}

.device-option,
.device-cancel {
  min-height: 50px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.device-option {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  background: transparent;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.device-option span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  text-transform: uppercase;
}

.device-option strong {
  overflow-wrap: anywhere;
}

.device-cancel {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.device-option:focus-visible,
.device-cancel:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .hero-overlay {
    gap: 22px;
    padding: max(28px, env(safe-area-inset-top)) 36px max(32px, env(safe-area-inset-bottom));
  }

  .hero-copy h1 {
    max-width: 13ch;
  }

  .progress-block {
    max-width: 760px;
  }
}

@media (min-width: 1120px) {
  .hero-overlay {
    padding-left: 56px;
    padding-right: 56px;
  }
}

@media (min-width: 1600px) {
  .hero-overlay {
    padding-left: 7vw;
    padding-right: 7vw;
  }

  .hero-copy h1 {
    font-size: clamp(76px, 6vw, 112px);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-overlay {
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero-copy {
    gap: 6px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 9vw, 58px);
    line-height: 0.96;
  }

  .hero-artist {
    font-size: clamp(17px, 3.6vw, 24px);
  }

  .progress-block {
    gap: 8px;
    padding-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art,
  .progress-bar span,
  .hero-message,
  .device-chooser-panel {
    transition: none;
  }

  .now-hero:active .hero-art,
  .now-hero.is-touching .hero-art {
    opacity: var(--artwork-opacity);
    transform: scale(1.035);
  }
}
