* { box-sizing: border-box; }

:root {
  background: #dadfe9;
  color-scheme: light;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh; /* taste-skill-ignore: legacy viewport fallback */
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #dadfe9;
  color: #13294c;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: -36px;
  background: url("original-artwork.png") center / cover no-repeat;
  content: "";
  filter: blur(26px) brightness(.78);
  transform: scale(1.04);
  pointer-events: none;
}

.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100vh; /* taste-skill-ignore: legacy viewport fallback */
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.poster {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 941 / 1672;
  flex: none;
  overflow: hidden;
}

.art {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.interaction {
  position: absolute;
  z-index: 2;
  top: 77.4%;
  left: 12.5%;
  width: 75%;
  height: 8.15%;
}

.track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: transparent;
}

.knob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: transparent;
  color: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-appearance: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.knob:active { cursor: grabbing; }

.knob:focus-visible {
  outline: clamp(2px, .7vw, 3px) solid #fff;
  outline-offset: clamp(2px, 1vw, 5px);
}

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

.music-toggle {
  position: absolute;
  z-index: 5;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  max-width: calc(100% - 16px);
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: clamp(7px, 1.6vw, 9px) clamp(9px, 2.2vw, 12px);
  border: 1px solid rgba(247, 215, 150, .53); /* taste-skill-ignore: floating control boundary */
  border-radius: 24px;
  background: rgba(12, 33, 72, .72);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .2); /* taste-skill-ignore: floating control */
  color: #fff0c4;
  font: 700 clamp(8px, 1.8vw, 10px)/1 Arial, Helvetica, sans-serif;
  letter-spacing: clamp(.4px, .15vw, .8px);
  white-space: nowrap;
  cursor: pointer;
  gap: clamp(4px, 1vw, 6px);
  backdrop-filter: blur(8px); /* taste-skill-ignore: one floating control */
  -webkit-backdrop-filter: blur(8px); /* taste-skill-ignore: one floating control */
  -webkit-tap-highlight-color: transparent;
}

.music-toggle > svg {
  width: clamp(15px, 4vw, 18px);
  height: clamp(15px, 4vw, 18px);
}

.music-toggle[aria-pressed="true"] {
  border-color: #ffdf83;
  background: rgba(117, 87, 27, .72);
}

.music-toggle:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.music-toggle:disabled { cursor: wait; opacity: .72; }

.dialog {
  width: min(90vw, 420px);
  max-height: 90dvh;
  overflow: auto;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid #e7be6d; /* taste-skill-ignore: dialog boundary */
  border-radius: clamp(16px, 5vw, 24px);
  background: #152541;
  color: #fff0c8;
  text-align: center;
}

.dialog::backdrop { background: rgba(8, 16, 42, .79); }

.dialog button {
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 20px;
  background: #f2d38b;
}

.noscript-fallback {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px 16px;
  background: #fff3b7;
  color: #361800;
  font: 700 14px/1.45 Arial, Helvetica, sans-serif;
  text-align: center;
}

.noscript-fallback a { color: #361800; }

@media (orientation: landscape), (min-width: 600px) and (min-aspect-ratio: 941 / 1672) {
  .poster {
    width: auto;
    height: 100%;
    max-height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
