/* LED To Celebrate - site styles (mobile first) */

@font-face {
  font-family: "Peralta";
  src: url(/assets/fonts/peralta-latin.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url(/assets/fonts/inter-latin-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* palette */
  --night: #0b1330;
  --night-2: #16214a;
  --glass: rgb(11 19 48 / .82);
  --ink: #f2f4fa;
  --ink-dim: #b9c1d9;
  --led: #ffd27a;           /* warm-white LED: links, focus */
  --holly: #067c63;         /* brand green: buttons */
  --holly-hi: #0a9676;

  /* status lamp tones */
  --tone-on: #41e391;
  --tone-off: #8e9cc4;
  --tone-down: #ff5d5d;
  --tone-setting-up: #ffb347;
  --tone-closed: #9aa0b3;
  --tone-unknown: #b9c1d9;
  --tone-on-demand: #c38bff;

  /* type */
  --display: "Peralta", Georgia, serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* layout */
  --dock-h: 4.25rem;
  --rail-w: 12.5rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --gap: clamp(.75rem, 3vw, 1.5rem);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  padding-bottom: calc(var(--dock-h) + var(--safe-b));
}

img, video, iframe { max-width: 100%; display: block; }
[hidden] { display: none !important; }

a { color: var(--led); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; border-radius: 4px; }

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

.skip {
  position: absolute; left: .5rem; top: -3rem; z-index: 50;
  background: var(--led); color: var(--night); padding: .5rem .75rem; border-radius: 6px;
}
.skip:focus { top: calc(.5rem + var(--safe-t)); }

/* ---------- backdrop photo ---------- */

.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgb(11 19 48 / .75), rgb(11 19 48 / .15) 35%, rgb(11 19 48 / .15) 65%, rgb(11 19 48 / .85)),
    url(/assets/img/house-2023-640.webp) center 60% / cover no-repeat,
    var(--night);
}
@media (min-width: 640px) {
  .backdrop {
    background:
      linear-gradient(to bottom, rgb(11 19 48 / .7), rgb(11 19 48 / .1) 40%, rgb(11 19 48 / .1) 70%, rgb(11 19 48 / .85)),
      url(/assets/img/house-2023.webp) center 60% / cover no-repeat,
      var(--night);
  }
}

/* ---------- masthead ---------- */

.masthead {
  padding: calc(.75rem + var(--safe-t)) var(--gap) .5rem;
}
.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 0 .6em rgb(255 210 122 / .45);
}

/* the site title lights up letter by letter, like bulbs on a string
   (the menu bar's and the home page's big one) */
.brand .ch, .hero .title .ch {
  animation: brand-light 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * .12s);
}
@keyframes brand-light {
  0%, 70%, 100% { color: rgb(205 210 230 / .55); text-shadow: none; }
  6%, 62%       { color: #fff6dc; text-shadow: 0 0 .3em rgb(255 210 122 / .95), 0 0 .9em rgb(255 170 60 / .6); }
}
@media (prefers-reduced-motion: reduce) {
  .brand .ch, .hero .title .ch { animation: none; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main {
  flex: 1;
  padding: .5rem var(--gap) 2rem;
}

/* ---------- home ---------- */

.layout-home .masthead { display: none; }

.hero {
  padding-top: calc(clamp(1.5rem, 8vh, 4rem) + var(--safe-t));
  text-align: center;
}
.title {
  margin: 0;
  font: 400 clamp(2.5rem, 11.5vw, 5.5rem)/1.05 var(--display);
  letter-spacing: .01em;
  text-shadow:
    0 0 .15em rgb(255 235 190 / .9),
    0 0 .6em rgb(255 190 90 / .55),
    0 .08em .1em rgb(0 0 0 / .6);
}
.lede {
  margin: .5rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 4.2vw, 1.6rem);
  color: var(--ink);
  text-shadow: 0 .05em .2em rgb(0 0 0 / .8);
}

/* featured video: fills the page area behind the title
   (above the bottom menu on phones, right of the side menu on desktop) */
.stage {
  position: fixed;
  inset: 0 0 calc(var(--dock-h) + var(--safe-b)) 0;
  z-index: 0;
  display: grid;
  place-items: center;
}
.stage-thumb, .stage-thumb img, .stage-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.stage-video { opacity: 0; transition: opacity 1s; }
.stage-video.ready { opacity: 1; }
.stage::after {               /* darken top and bottom so text stays readable */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgb(11 19 48 / .8), rgb(11 19 48 / .1) 40%, rgb(11 19 48 / .1) 70%, rgb(11 19 48 / .75));
}
.stage-cta {                 /* caption reads as a continuation of the button */
  position: relative; z-index: 1;
  display: grid; justify-items: start; gap: .5rem;
  margin-top: 18vh;
  padding: 0 var(--gap);
  text-align: left;
}
.watch {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  background: rgb(6 124 99 / .6);   /* translucent so the show moves behind it */
  border: 1px solid rgb(255 255 255 / .25);
  color: #fff;
  text-shadow: 0 .05em .2em rgb(0 0 0 / .6);
  font-family: var(--display);
  font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  text-decoration: none;
  box-shadow: 0 .25rem 1.25rem rgb(0 0 0 / .55);
}
.watch:hover { background: rgb(10 150 118 / .8); text-decoration: none; }
.watch .icon { width: .95em; height: .95em; }
.stage-caption {
  margin: 0 0 0 .4rem;
  max-width: 30rem;
  font-family: var(--display);
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  text-shadow: 0 .05em .3em rgb(0 0 0 / .95);
}

/* every page sits above the video; the Watch button is on the home page only */
.masthead, main, .footer { position: relative; z-index: 1; }
/* on the home page, let clicks pass through the (empty) content area to the Watch button */
.layout-home main, .layout-home .hero { pointer-events: none; }
.layout-home .footer { background: transparent; }
body:not(.layout-home) .stage-cta { display: none; }

/* flashing-lights notice: a tooltip on the Watch button (mouse and keyboard) */
.watch-note {
  position: absolute; left: var(--gap); bottom: calc(100% + .5rem);
  display: flex; align-items: center; gap: .45rem;
  padding: .55rem .9rem;
  border-radius: .5rem;
  background: rgb(11 19 48 / .95);
  border: 1px solid rgb(255 210 122 / .5);
  color: var(--ink);
  font-size: 1.1rem;
  white-space: nowrap;
  box-shadow: 0 .25rem 1rem rgb(0 0 0 / .5);
  opacity: 0; visibility: hidden;
  transform: translateY(.25rem);
  transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
.watch-note::after {          /* little arrow pointing at the button */
  content: ""; position: absolute; left: 1.4rem; top: 100%;
  border: .4rem solid transparent; border-top-color: rgb(255 210 122 / .5);
}
.watch-note .icon, .player-note .icon { width: 1.2rem; height: 1.2rem; color: var(--led); flex: none; }
.watch:hover + .watch-note, .watch:focus-visible + .watch-note {
  opacity: 1; visibility: visible; transform: none;
}

/* touch screens have no hover: the same notice shows briefly when the video starts */
.player-note {
  position: absolute; left: 50%; top: max(.75rem, var(--safe-t, 0px));
  z-index: 2;
  display: flex; align-items: center; gap: .45rem;
  margin: 0; padding: .45rem .8rem;
  border-radius: .5rem;
  background: rgb(11 19 48 / .9);
  color: var(--ink);
  font-size: 1.1rem;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.player-note.show { opacity: 1; }
.mini .player-note { display: none; }

/* ---------- YouTube player ----------
   Full size: fills the page area (same place as .stage); only the menu stays.
   Small ("keep playing" mode): a corner player above the phone menu while
   another page is open. */
.player {
  position: fixed;
  inset: 0 0 calc(var(--dock-h) + var(--safe-b)) 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.player-frame { width: 100%; height: 100%; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-tools { display: none; }

.mini .player {
  inset: auto var(--gap) calc(var(--dock-h) + var(--safe-b) + var(--gap)) auto;
  z-index: 25;
  width: min(58vw, 22rem);
  aspect-ratio: 16 / 9;
  opacity: 1;
  pointer-events: auto;
}
.mini .player-frame {
  border-radius: .6rem;
  overflow: hidden;
  box-shadow: 0 .4rem 1.5rem rgb(0 0 0 / .6);
  outline: 1px solid rgb(255 255 255 / .15);
}
.mini .player-tools {           /* above the player, so YouTube's own controls stay reachable */
  display: flex; justify-content: flex-end; gap: .4rem;
  position: absolute; right: 0; bottom: 100%;
  padding-bottom: .4rem;
}
.player-btn {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 50%;
  background: rgb(11 19 48 / .9);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 .15rem .5rem rgb(0 0 0 / .5);
}
.player-btn:hover { background: var(--night-2); }
.player-btn .icon { width: 1rem; height: 1rem; }
/* room at the bottom of the page so the small player doesn't hide the end of it */
.mini .footer { padding-bottom: calc(min(58vw, 22rem) * .5625 + 4.5rem); }

/* while the video plays full size, only the menu stays */
.masthead, main, .footer, .stage-cta, .stage::after { transition: opacity .3s; }
.playing .player { opacity: 1; pointer-events: auto; }
.playing .masthead, .playing main, .playing .footer, .playing .stage-cta, .playing .stage::after {
  opacity: 0;
  pointer-events: none;
}

/* ---------- moving between pages ---------- */

/* thin LED bar at the top while a page is loading (only if it takes a moment) */
body.loading::after {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--led), transparent) 0 0 / 40% 100% no-repeat;
  animation: loading 1s linear infinite;
}
@keyframes loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* the new page fades in */
main.enter > * { animation: enter .2s ease-out; }
@keyframes enter { from { opacity: 0; } }

/* the heading gets focus after a page change (for screen readers); no ring for that */
h1[tabindex="-1"]:focus { outline: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 2.9rem;
  padding: .55rem 1.1rem;
  border: 0; border-radius: .5rem;
  background: var(--holly);
  color: #fff;
  font: inherit; font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 .15rem .5rem rgb(0 0 0 / .35);
}
.btn:hover { background: var(--holly-hi); text-decoration: none; }
.btn .icon { width: 1.1em; height: 1.1em; }

/* ---------- panel (content pages) ---------- */

.panel {
  max-width: 40rem;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid rgb(255 255 255 / .08);
  border-radius: .75rem;
  overflow: hidden;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.panel.has-photo {
  background:
    linear-gradient(rgb(11 19 48 / .68), rgb(11 19 48 / .88)),
    var(--panel-photo) center / cover no-repeat,
    var(--night);
}

.panel-head {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1rem 0 1.1rem;
}
.panel-head > .icon {
  width: 2.25rem; height: 2.25rem;
  padding: .5rem;
  border-radius: 50%;
  background: var(--holly);
  color: #fff;
  overflow: visible;   /* square icons (e.g. the box) aren't clipped to the circle */
}
.panel-head h1 {
  flex: 1;
  margin: 0;
  font: 400 clamp(1.4rem, 6vw, 2rem)/1.2 var(--display);
}
.close {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  flex: none;
  margin: -.25rem -.25rem 0 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .08);
  color: var(--ink-dim);
  transition: background-color .15s, color .15s;
}
.close:hover { background: rgb(255 255 255 / .18); color: var(--ink); }
.close .icon { width: 1.1rem; height: 1.1rem; }

.panel-body { padding: .25rem 1.1rem 1.25rem; }

/* ---------- prose ---------- */

.prose > * { max-width: 36em; }
.prose p, .prose ul { margin: .9rem 0 0; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .5rem; }
.prose h2 {
  margin: 1.6rem 0 0;
  font: 400 1.2rem/1.3 var(--display);
}
.prose .lede { text-align: left; }
.note {
  font-size: .9rem;
  color: var(--ink-dim);
  border-left: 3px solid var(--tone-setting-up);
  padding-left: .75rem;
}

/* listen: ways to listen */
.ways { list-style: none; padding: 0 !important; }
.ways li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: .9rem;
  margin-top: 1.25rem !important;
}
.ways .icon {
  grid-row: span 2;
  width: 2.25rem; height: 2.25rem;
  color: var(--led);
  margin-top: .15rem;
}
.ways h2 { margin: 0; }
.ways p { margin: .25rem 0 0; }

/* media */
.intro { display: flex; align-items: center; gap: 1rem; margin-top: .9rem; }
.intro .lede { flex: 1; margin: 0; font-size: 1.3rem; }
.intro img { width: 7.5rem; height: auto; border-radius: .5rem; }
.clip { margin: 1.25rem 0 0; }
.clip video {
  width: 100%; height: auto;
  border-radius: .5rem;
  background: #000;
}
.clip figcaption { margin-top: .5rem; color: var(--ink-dim); font-size: .95rem; }

.snapshot { margin: 1rem 0 0; }
.snapshot img { width: 100%; height: auto; border-radius: .5rem; }

.address {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem;
  margin-top: .9rem;
}
.address p { margin: 0 !important; font-size: 1rem; }
.address .btn { padding-inline: .8rem; gap: .4rem; }
@media (max-width: 380px) { .address .btn .icon { display: none; } }
.map {
  display: block;
  margin-top: 1rem;
  border-radius: .5rem;
  overflow: hidden;
  background: #101a3d;
}
.map img { width: 100%; height: auto; }

/* weather */
.weather { margin-top: 1rem; }
.weather-wait { color: var(--ink-dim); }
.weather-place { margin: 0; color: var(--ink-dim); }
.weather-now {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;
}
.weather-icon { grid-row: span 2; width: 4rem; height: 4rem; fill: var(--led); }
.weather-temp { margin: 0 !important; font: 400 3rem/1 var(--display); }
.weather-desc { margin: .25rem 0 0 !important; }
.weather-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: .5rem;
  margin: 1.25rem 0 0;
}
.weather-facts div {
  padding: .6rem .75rem;
  border-radius: .5rem;
  background: rgb(255 255 255 / .06);
}
.weather-facts dt { font-size: .85rem; color: var(--ink-dim); }
.weather-facts dd { margin: 0; font-size: 1.1rem; }
.weather-days { margin-top: 1.5rem; }
.weather-days h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.weather-days ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.weather-days li {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  column-gap: .75rem;
  align-items: center;
  padding: .6rem .75rem;
  border-radius: .5rem;
  background: rgb(255 255 255 / .06);
}
.weather-days li p { margin: 0 !important; }
.wd-icon { grid-row: span 2; width: 2.25rem; height: 2.25rem; fill: var(--led); }
.wd-name { font-weight: 600; }
.wd-name span { font-weight: 400; color: var(--ink-dim); font-size: .85rem; }
.wd-desc { grid-column: 2; font-size: .9rem; color: var(--ink-dim); }
.wd-temps { grid-column: 3; grid-row: 1 / span 2; white-space: nowrap; font-size: 1.1rem; }
.wd-temps span { color: var(--ink-dim); }
.weather-meta { font-size: .85rem; color: var(--ink-dim); }
.weather-meta.is-old { color: var(--tone-setting-up); }   /* over 3 hours old */

/* form */
.form { margin-top: 1rem; }
.field { display: grid; gap: .3rem; margin: .9rem 0 0; }
.field label { font-size: .95rem; }
.hint { color: var(--ink-dim); font-size: .85rem; }
.field input, .field textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: .5rem;
  background: rgb(0 0 0 / .3);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px+ keeps iOS from zooming */
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { border-color: var(--led); outline: none; box-shadow: 0 0 0 2px rgb(255 210 122 / .35); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { margin-top: .9rem; }
.form-status.is-ok, .form-status.is-error {
  padding: .75rem 1rem;
  border-radius: .5rem;
  border-left: 3px solid;
}
.form-status.is-ok { border-color: var(--tone-on); background: rgb(65 227 145 / .1); font-size: 1.1rem; }
.form-status.is-error { border-color: var(--tone-down); background: rgb(255 93 93 / .1); }
/* after a successful send only the thank-you stays */
.form.sent .field, .form.sent .form-send { display: none; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- jukebox (/jukebox/) ---------- */

.jb-intro, .jb-intro-off { color: var(--ink-dim); font-size: .95rem; }
.prose .jb-intro, .prose .jb-intro-off { margin-top: .5rem; }
.jb-wait { color: var(--ink-dim); }
.jb-closed, .jb-paused, .jb-standby {
  padding: .75rem 1rem;
  border-radius: .5rem;
  border-left: 3px solid var(--tone-off);
  background: rgb(142 156 196 / .12);
}
.jb-card {
  display: grid; gap: .35rem;
  margin: .9rem 0 0;
  padding: .6rem .9rem;
  border-radius: .6rem;
  background: rgb(255 255 255 / .06);
  border-left: 3px solid var(--tone-on);
}
.jb-card > div { display: grid; grid-template-columns: 3.4rem 1fr; align-items: baseline; gap: .5rem; }
.jb-card > div[hidden] { display: none; }
.jb-card dt { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); }
.jb-card dd { margin: 0; min-width: 0; }
.jb-now-name { font: 400 1.1rem/1.3 var(--display); }
.jb-now-left { margin-left: .35rem; font-size: .85rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.prose .jb-queue-list { margin: 0; padding-left: 1.2rem; font-size: .95rem; }
.prose .jb-queue-list li + li { margin-top: .1rem; }
.jb-queue-list .is-mine { color: var(--led); }
.jb-song[data-state="queued"] .jb-state { color: var(--led); }
.jb-votes { color: var(--ink-dim); font-size: .85rem; }
.jb-badge {
  display: inline-block;
  margin-left: .5rem;
  padding: .05rem .45rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / .12);
  color: var(--ink);
  font: 600 .7rem/1.5 var(--text);
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.jb-mine { background: var(--led); color: var(--night); }
.jb-new { background: var(--holly-hi); color: #fff; }
.jb-msg:empty { display: none; }
.jb-msg { margin-top: .7rem; }
.jb-msg.is-ok, .jb-msg.is-error { padding: .75rem 1rem; border-radius: .5rem; border-left: 3px solid; }
.jb-msg.is-ok { border-color: var(--tone-on); background: rgb(65 227 145 / .1); }
.jb-msg.is-error { border-color: var(--tone-setting-up); background: rgb(255 179 71 / .1); }

.jb-cat { margin-top: .45rem; border-radius: .6rem; background: rgb(255 255 255 / .04); }
.jb-cat summary {
  display: flex; align-items: center; gap: .5rem;
  min-height: 2.75rem;
  padding: .4rem .9rem;
  cursor: pointer;
  font: 400 1.05rem/1.3 var(--display);
  list-style: none;
}
.jb-cat summary::-webkit-details-marker { display: none; }
.jb-cat summary::before {
  content: "";
  width: .5rem; height: .5rem;
  border-right: 2px solid var(--led); border-bottom: 2px solid var(--led);
  transform: rotate(-45deg);
  transition: transform .15s;
}
.jb-cat[open] summary::before { transform: rotate(45deg); }
.jb-count { margin-left: auto; font: .85rem var(--text); color: var(--ink-dim); }
.prose .jb-list { list-style: none; margin: 0; padding: 0 .4rem .4rem; }
.prose .jb-list li + li { margin-top: .2rem; }
.jb-song {
  display: flex; align-items: center; gap: .25rem;
  width: 100%;
  min-height: 2.75rem;
  padding: .4rem .7rem;
  border: 0; border-radius: .5rem;
  background: rgb(255 255 255 / .05);
  color: var(--ink);
  font: inherit; text-align: left;
  cursor: pointer;
}
.jb-song:hover:not(:disabled) { background: rgb(255 255 255 / .12); }
.jb-name { flex: 1; min-width: 0; }
.jb-state { flex: none; margin-left: .5rem; font-size: .85rem; color: var(--ink-dim); }
.is-open .jb-song:not(:disabled) .jb-state { color: var(--led); }
.jb-song:disabled { cursor: default; }
.jb-song[data-state="playing"] { box-shadow: inset 3px 0 var(--tone-on); }
.jb-song[data-state="playing"] .jb-state { color: var(--tone-on); }
.jb-song[data-state="next"] { box-shadow: inset 3px 0 var(--led); }
.jb-song[data-state="queued"] .jb-name, .jb-song[data-state="recent"] .jb-name { color: var(--ink-dim); }

/* the menu's Jukebox button lights up while the show is on (or on demand) */
.dock[data-show="on"] .dock-request .icon { color: var(--tone-on); filter: drop-shadow(0 0 .35rem rgb(65 227 145 / .7)); }
.dock[data-show="on-demand"] .dock-request .icon { color: var(--tone-on-demand); filter: drop-shadow(0 0 .35rem rgb(195 139 255 / .7)); }
.jb-standby { border-left-color: var(--tone-on-demand) !important; }
.dock[data-show="on"] .dock-request[aria-current="page"] .icon { color: var(--tone-on); }

/* ---------- status lamp ---------- */

.lamp {
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--lamp-bg, var(--tone, var(--tone-unknown)));
  color: var(--lamp-fg, var(--night));
}
.lamp .icon { width: 1rem; height: 1rem; }

/* each status's lamp colors come from its file in content/status (tone:, lamp:) */
/* a status page's heading icon matches the menu lamp */
.panel[class*="tone-"] .panel-head > .icon {
  background: var(--lamp-bg, var(--tone));
  color: var(--lamp-fg, var(--night));
}

.tone-on .lamp {
  box-shadow: 0 0 .5rem .1rem rgb(65 227 145 / .7), 0 0 1.4rem .3rem rgb(65 227 145 / .35);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow {
  50% { box-shadow: 0 0 .3rem 0 rgb(65 227 145 / .5), 0 0 .8rem .1rem rgb(65 227 145 / .2); }
}

/* ---------- dock (mobile/tablet: bottom bar) ---------- */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: calc(var(--dock-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgb(11 19 48 / .94);
  border-top: 1px solid rgb(255 255 255 / .1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.dock-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem;
  min-width: 0;
  padding: .35rem .15rem;
  border: 0;
  background: none;
  color: var(--ink-dim);
  font: inherit;
  font-size: .72rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}
.dock-item .icon { width: 1.35rem; height: 1.35rem; }
.dock-item:hover, .dock-item[aria-current="page"] { color: var(--ink); }
.dock-item[aria-current="page"] .icon { color: var(--led); }
.dock-item[aria-current="page"] .lamp .icon { color: inherit; }   /* the lamp keeps its own colors */
.dock-status .lamp { width: 1.9rem; height: 1.9rem; }
.dock-status .dock-label {
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* "More" sheet */
.dock-more {
  position: fixed;
  inset: auto .5rem calc(var(--dock-h) + var(--safe-b) + .5rem) .5rem;
  width: auto; margin: 0;
  padding: .5rem;
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: .9rem;
  background: rgb(18 27 62 / .98);
  color: var(--ink);
  box-shadow: 0 -.5rem 2rem rgb(0 0 0 / .5);
}
.dock-more:popover-open {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .25rem;
}
.dock-more .dock-item {
  padding: .8rem .25rem;
  border-radius: .6rem;
  font-size: .8rem;
}
.dock-more .dock-item:hover { background: rgb(255 255 255 / .06); }
.dock-more::backdrop { background: rgb(0 0 0 / .35); }

/* ---------- footer ---------- */

.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .25rem 1.25rem;
  padding: 1rem var(--gap) 1.25rem;
  background: rgb(11 19 48 / .9);
  color: var(--ink-dim);
  font-size: .9rem;
}
.footer p { margin: 0; }
.footer a { color: var(--ink-dim); }
.footer-social { display: flex; gap: .25rem; }
.footer-social a {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
}
.footer-social a:hover { color: var(--ink); }

/* ---------- tablet ---------- */

@media (min-width: 640px) {
  .panel-head { padding: 1.5rem 1.5rem 0 1.75rem; }
  .panel-body { padding: .25rem 1.75rem 1.75rem; }
  .intro img { width: 10rem; }
}

/* ---------- desktop: dock becomes a left rail ---------- */

@media (min-width: 960px) {
  body {
    padding-bottom: 0;
    padding-left: var(--rail-w);
  }
  .dock {
    top: 0; bottom: 0; right: auto;
    width: var(--rail-w);
    height: auto;
    display: flex; flex-direction: column;
    gap: .15rem;
    padding: 1.25rem .75rem;
    border-top: 0;
    border-right: 1px solid rgb(255 255 255 / .1);
    overflow-y: auto;
  }
  .dock-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    padding: .55rem .7rem;
    border-radius: .5rem;
    font-size: .95rem;
  }
  .dock-item:hover { background: rgb(255 255 255 / .06); }
  .dock-item[aria-current="page"] { background: rgb(255 255 255 / .08); }
  .dock-status { margin-bottom: .75rem; padding-block: .7rem; background: rgb(255 255 255 / .05); }
  .dock-status .dock-label { white-space: normal; }
  .dock-more-btn { display: none; }

  /* the "More" items are always shown in the rail */
  .dock-more,
  .dock-more:popover-open {
    all: unset;
    display: flex; flex-direction: column; gap: .15rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgb(255 255 255 / .1);
  }
  .dock-more .dock-item { padding: .55rem .7rem; font-size: .95rem; }

  .masthead { padding-top: 1.25rem; }
  main { padding-top: 1rem; }
  .hero { padding-top: 8vh; }
  .stage, .player { inset: 0 0 0 var(--rail-w); }
  .mini .player { inset: auto var(--gap) var(--gap) auto; width: 24rem; }
  .mini .footer { padding-bottom: 1.25rem; padding-right: 26rem; }
  .footer { justify-content: space-between; }
}

/* ---------- motion preferences ---------- */

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

/* ---------- gallery ---------- */

.panel-wide { max-width: 64rem; }
.prose > .gal-section, .prose > .gal-pair, .prose > .doc-pics { max-width: none; }
.gal-intro { color: var(--ink-dim); }
.gal-section h2 { margin-top: 1.6rem; }
.gal-section > p { max-width: 36em; }
.gal-grid, .gal-cards {
  list-style: none;
  padding: 0 !important;
  margin: .9rem 0 0;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 45%), 1fr));
}
.gal-cards { grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 45%), 1fr)); gap: .75rem; }
@media (min-width: 40rem) { .gal-cards { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; } }
.prose .gal-grid li, .prose .gal-cards li { margin: 0; }
.gal-grid .gal-wide { grid-column: 1 / -1; }
.gal-grid img, .gal-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .5rem;
  background: rgb(255 255 255 / .06);
}
.gal-grid video { display: block; width: 100%; max-width: 40rem; height: auto; border-radius: .5rem; background: #000; }
.gal-photo, .gal-link { display: block; border-radius: .5rem; }
.gal-photo img, .gal-card img { transition: transform .2s, filter .2s; }
.gal-photo:hover img, .gal-card:hover img { filter: brightness(1.12); }
.gal-cap {
  margin: .35rem 0 0 !important;
  font-size: .85rem;
  line-height: 1.35;
  color: var(--ink-dim);
}
.gal-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  border-radius: .6rem;
  padding: .5rem;
  background: rgb(255 255 255 / .06);
}
.gal-card:hover { background: rgb(255 255 255 / .1); }
.gal-card-title { display: block; margin-top: .5rem; font-weight: 600; }
.gal-card-count { display: block; font-size: .85rem; color: var(--ink-dim); }
.gal-back { margin-top: 1.75rem !important; }

/* story pages */
.doc-pics { display: flex; flex-wrap: wrap; gap: .6rem; }
.doc-pics .gal-photo { flex: 1 1 10rem; max-width: 22rem; }
.doc-pics .gal-photo img { width: 100%; height: auto; border-radius: .5rem; }
.doc-pics .gal-banner { flex-basis: 100%; max-width: 100%; }
.gal-bio h2 { margin-top: 1.8rem; }
.gal-bio .doc-pics .gal-photo { flex: 0 1 11rem; max-width: 11rem; }
.gal-pair { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: .9rem; }
.gal-pair figure { margin: 0; }
.gal-pair img { width: 100%; height: auto; border-radius: .5rem; display: block; }
.gal-pair figcaption, .gal-flow { color: var(--ink-dim); font-size: .95rem; margin-top: .4rem; }
.gal-songs li strong { color: var(--ink); }
.prose h3 { margin: 1.3rem 0 0; font-size: 1rem; }
.doc-table { border-collapse: collapse; margin-top: .9rem; }
.doc-table td, .doc-table th { padding: .3rem; vertical-align: top; font-size: .9rem; color: var(--ink-dim); text-align: center; }
.doc-table img { width: 100%; max-width: 12rem; height: auto; border-radius: .4rem; }
.footnotes { margin-top: 2rem; font-size: .85rem; color: var(--ink-dim); }
.footnotes hr { border: 0; border-top: 1px solid rgb(255 255 255 / .15); }

/* photo viewer */
.viewer {
  position: fixed; inset: 0;
  z-index: 100;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgb(4 8 20 / .96);
  color: var(--ink);
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer::backdrop { background: rgb(4 8 20 / .9); }
.viewer-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(.5rem + var(--safe-t)) .75rem .5rem;
  font-size: .9rem; color: var(--ink-dim);
}
.viewer-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.viewer-stage img {
  position: absolute; inset: 0;
  margin: auto;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.viewer-cap {
  margin: 0;
  padding: .6rem 1rem calc(.9rem + var(--safe-b));
  text-align: center;
  min-height: 3rem;
}
.viewer button {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .1);
  color: var(--ink);
  cursor: pointer;
}
.viewer button:hover { background: rgb(255 255 255 / .2); }
.viewer button .icon { width: 1.1rem; height: 1.1rem; }
.viewer-prev, .viewer-next { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer-prev { left: .5rem; }
.viewer-next { right: .5rem; }
.viewer-prev .icon { transform: scaleX(-1); }
@media (hover: none) { .viewer-prev, .viewer-next { display: none !important; } }
