/* Fonts: Inter and Geist Mono, variable, latin subset (SIL Open Font License 1.1; fonts/*-OFL.txt). Self-hosted. */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: dark;
  --accent: #8fd3e0;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
html { overflow-x: hidden; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: radial-gradient(ellipse at 50% 43%,
    #0c192a 0%, #091523 43%, #060e1b 79%, #050b16 100%);
  color: #eef3fa;
  font: 300 14px/1.45 "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input[type="range"]:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

#scene {
  position: fixed; inset: 0; z-index: 0;
  display: block; width: 100%; height: 100%;
  pointer-events: none;
}
.masthead {
  position: fixed; z-index: 3; top: 38px; left: 46px;
  pointer-events: none;
}
.wordmark {
  margin: 0;
  font-size: 17px; font-weight: 200; letter-spacing: .55em;
  white-space: nowrap; color: #f5f7fb;
}
.byline {
  margin: 9px 0 0;
  font: 400 8px/1.5 "Geist Mono", ui-monospace, Menlo, monospace;
  letter-spacing: .38em; color: #bdc9d7;
}

#words {
  position: fixed; inset: 0; z-index: 2;
  overflow: hidden; pointer-events: none;
}
#lines, #styles { position: absolute; inset: 0; pointer-events: none; }
.word {
  position: absolute; top: 0; left: 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 34px; max-width: min(42vw, 420px);
  padding: 5px 9px;
  border: 0; border-radius: 24px;
  background: transparent;
  color: rgba(238,243,250, calc(.74 + var(--depth, 1) * .24));
  cursor: pointer; pointer-events: auto;
  white-space: nowrap;
  text-shadow: 0 0 5px #050a13, 0 0 12px #050a13,
               0 0 22px #050a13, 0 0 31px #050a13;
  filter: blur(calc((1 - var(--depth, 1)) * .36px));
  opacity: calc(.86 + var(--depth, 1) * .14);
  transition: color .2s, opacity .2s, filter .2s, text-shadow .2s;
}
.word:hover, .word:focus-visible { color: #fff; opacity: 1; filter: none; }
.word.is-behind { visibility: hidden; pointer-events: none; }
.word--style {
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 300; letter-spacing: .32em; text-transform: uppercase;
}
.word--line {
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 300; letter-spacing: .06em;
}
.word--line[data-singer="her"] { color: rgba(255,241,223, calc(.74 + var(--depth, 1) * .24)); }
.word--line[data-singer="him"] { color: rgba(227,239,255, calc(.74 + var(--depth, 1) * .24)); }
.word--line[data-singer="both"] { color: rgba(255,255,255, calc(.74 + var(--depth, 1) * .24)); }
.word.is-playing, .word.is-sung {
  color: #fff !important; opacity: 1; filter: none;
  text-shadow: 0 0 5px #050a13, 0 0 16px #050a13,
               0 0 9px var(--accent), 0 0 25px var(--accent);
}
.word.is-near:not(.is-sung) { opacity: 1; filter: none; }

#phone-lines, #phone-styles { display: none; }

#card {
  position: fixed; z-index: 4; left: 50%; bottom: 48px;
  width: min(460px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 18px 20px 15px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(8,12,20,.28);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 42px rgba(0,0,0,.19);
}
.card-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; min-width: 0;
}
.track-copy { min-width: 0; }
.label, .timeline, .bottom, #sub, #film {
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
}
.label {
  margin: 0; font-size: 9px; letter-spacing: .29em;
  color: #bdcbd9;
}
#title {
  overflow: hidden; margin: 7px 0 0;
  font-size: 17px; line-height: 1.25; font-weight: 300;
  letter-spacing: .09em; text-overflow: ellipsis; white-space: nowrap;
  color: #f5f8fd;
}
#sub {
  overflow: hidden; margin: 5px 0 0;
  font-size: 10px; letter-spacing: .1em;
  color: #b6c6d5; text-overflow: ellipsis; white-space: nowrap;
}
#sub:empty { display: none; }
#film {
  flex: none; margin-top: 2px;
  color: #d9e5ed; text-decoration: none;
  font-size: 10px; white-space: nowrap;
}
#film:hover, .bottom a:hover { color: var(--accent); }

.controls {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 15px;
}
.controls button {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: #e9f0f7; cursor: pointer;
}
.controls button:hover { color: var(--accent); }
.controls button svg { width: 18px; height: 18px; }
#prev svg, #next svg, #play svg {
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}
#play {
  width: 43px; height: 43px;
  border-color: rgba(238,243,250,.7);
}
#play:hover { border-color: var(--accent); }
#play .icon-pause, #play.is-playing .icon-play { display: none; }
#play.is-playing .icon-pause { display: block; }
#orbit { margin-left: 12px; }
#orbit svg { width: 34px; height: 34px; }

.timeline {
  display: flex; align-items: center; gap: 11px;
  margin-top: 13px; font-size: 10px; color: #c7d4df;
}
.timeline span { min-width: 33px; font-variant-numeric: tabular-nums; }
#total { text-align: right; }
#seek {
  --p: 0;
  flex: 1; min-width: 0; width: 100%; height: 24px; margin: 0;
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent; cursor: pointer;
}
#seek::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(to right, var(--accent) calc(var(--p) * 100%),
    rgba(232,241,250,.43) calc(var(--p) * 100%));
}
#seek::-moz-range-track {
  height: 1px;
  background: linear-gradient(to right, var(--accent) calc(var(--p) * 100%),
    rgba(232,241,250,.43) calc(var(--p) * 100%));
}
#seek::-webkit-slider-thumb {
  width: 8px; height: 8px; margin-top: -3.5px;
  appearance: none; -webkit-appearance: none;
  border: 1px solid #f5f9fd; border-radius: 50%;
  background: var(--accent);
}
#seek::-moz-range-thumb {
  width: 7px; height: 7px; border: 1px solid #f5f9fd;
  border-radius: 50%; background: var(--accent);
}

.bottom {
  position: fixed; z-index: 4; right: 12px; bottom: 12px; left: 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 9px; letter-spacing: .12em;
  color: #aebfce;
}
.bottom a { color: inherit; text-decoration: none; }
.bottom footer { margin-left: auto; text-align: right; }
.plain { max-width: min(290px, 52vw); }
.plain summary { cursor: pointer; white-space: nowrap; }
.plain audio {
  display: block; width: min(280px, 48vw); height: 35px;
  margin-top: 5px;
}

@media (max-width: 759px) {
  .masthead { top: 21px; left: 20px; }
  .wordmark { font-size: 14px; letter-spacing: .43em; }
  .byline { font-size: 7px; }
  #words { display: none; }

  #phone-lines {
    position: fixed; z-index: 2;
    display: block; top: 46%; left: 8px; right: 8px;
    height: 150px; margin: 0; padding: 0;
    overflow: hidden; list-style: none;
    pointer-events: none;
  }
  #phone-lines li {
    display: flex; justify-content: center;
    height: 30px; margin: 0; padding: 0;
  }
  .pline {
    max-width: 100%; min-height: 30px;
    padding: 3px 9px;
    border: 0; border-radius: 20px;
    background: transparent;
    color: rgba(238,243,250,.9);
    font-size: 15px; font-weight: 300; letter-spacing: .05em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 0 7px #050a13, 0 0 19px #050a13;
    cursor: pointer; pointer-events: auto;
  }
  .pline[data-singer="her"] { color: rgba(255,241,223,.92); }
  .pline[data-singer="him"] { color: rgba(227,239,255,.92); }
  .pline[data-singer="both"] { color: rgba(255,255,255,.95); }
  .pline.is-sung {
    color: #fff; text-shadow: 0 0 8px #050a13,
      0 0 12px var(--accent), 0 0 24px var(--accent);
  }

  #phone-styles {
    position: fixed; z-index: 3; right: 8px; bottom: 251px; left: 8px;
    display: flex; justify-content: flex-start; gap: 6px;
    overflow-x: auto; padding: 3px 1px 6px;
    scrollbar-width: none;
  }
  #phone-styles::-webkit-scrollbar { display: none; }
  .chip {
    flex: none; min-height: 34px; padding: 7px 12px;
    border: 1px solid rgba(238,243,250,.27);
    border-radius: 20px; background: rgba(6,12,23,.36);
    color: #eaf1f8;
    font-size: 14px; font-weight: 400; letter-spacing: .1em;
    cursor: pointer;
  }
  .chip.is-playing {
    border-color: var(--accent); color: #fff;
    text-shadow: 0 0 10px var(--accent);
  }
  #card {
    bottom: 39px; width: calc(100% - 16px);
    padding: 14px 16px 11px;
  }
  #title { font-size: 16px; }
  .controls { margin-top: 10px; }
  .timeline { margin-top: 7px; }
  .bottom { bottom: 9px; font-size: 8px; letter-spacing: .04em; }
}
@media (max-width: 759px) and (max-height: 720px) {
  #phone-lines { top: 42%; height: 90px; } /* three lines on short phones (radio.js) */
  #phone-styles { bottom: 226px; }
  #card { padding-top: 10px; padding-bottom: 8px; }
  .controls { margin-top: 5px; }
  .timeline { margin-top: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

.noscript { position: fixed; left: 50%; bottom: 50%; transform: translate(-50%, 50%); width: min(420px, calc(100% - 32px));
  color: #e9eef5; font: 300 15px/1.6 "Inter", system-ui, sans-serif; text-align: center; }
.noscript a { color: inherit; }

/* Integration fixes: long lyric lines wrap instead of running off the screen; the chip row centres only when it
   fits (centring an overflowing flex row makes its first chips unreachable). */
.word--line { white-space: normal; max-width: min(340px, 28vw); text-wrap: balance; text-align: center; }
#phone-styles .chip:first-child { margin-left: auto; }
#phone-styles .chip:last-child { margin-right: auto; }
.word--style.is-overlapped { opacity: .18; transition: opacity .3s; }
