:root { color-scheme: dark; --ink: #fff5fa; --accent: #ff79aa; }
* { box-sizing: border-box; }
body {
  min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 20% 10%, #52304f, transparent 36rem),
              radial-gradient(circle at 90% 80%, #164b46, transparent 34rem), #17121d;
  color: var(--ink); font: 600 16px/1.35 -apple-system, BlinkMacSystemFont, "Avenir Next", sans-serif;
}

/* The spectrogram fills the window behind the card. It stays hidden until
   there is audio to draw, so the page keeps its own backdrop until then. */
#spectrogram { position: fixed; inset: 0; display: block; width: 100vw; height: 100vh; z-index: 0; background: #000; }
#spectrogram[hidden] { display: none; }

.player {
  position: relative; z-index: 1;
  width: min(720px, 100%); padding: 32px; border: 1px solid #ffffff32; border-radius: 28px;
  background: #241a2cdd; box-shadow: 0 24px 80px #0009; backdrop-filter: blur(12px);
}
h1 { margin: 0 0 28px; font-size: clamp(36px, 8vw, 68px); line-height: .95; overflow-wrap: anywhere; }
audio { width: 100%; accent-color: var(--accent); }
.transport { display: flex; align-items: center; gap: 14px; }
.transport button {
  font: inherit; font-weight: 700; cursor: pointer; padding: 11px 22px;
  border: 0; border-radius: 999px; background: var(--accent); color: #2a0d19;
}
.transport button:hover { filter: brightness(1.08); }
.transport input[type=range] { flex: 1; accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.note { margin: 14px 0 0; font-size: 14px; font-weight: 500; color: #ffd7a8; }
.note[hidden] { display: none; }
.health { margin: 10px 0 0; font-size: 12px; font-weight: 500; color: #ffffff66; }
.health[hidden] { display: none; }
