:root {
  color-scheme: dark;
  --ink: #05070d;
  --ink-2: #0b0f1a;
  --smoke: rgba(170, 190, 230, 0.09);
  --neon: #7fb6ff;
  --neon-core: #eaf3ff;
  --neon-glow: #2f7bff;
  --lamp: #ffb862;
  --text: #e9e4da;
  --muted: #9a958c;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Yellowtail", "Brush Script MT", cursive;
  --sans: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-intro { overflow: hidden; }

/* film grain over everything */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 50;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.5'/></svg>");
  opacity: .07;
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
}

/* ───────── neon ───────── */
.neon {
  font-family: var(--script);
  font-weight: 400;
  color: var(--neon-core);
  text-shadow:
    0 0 4px var(--neon-core),
    0 0 12px var(--neon),
    0 0 28px var(--neon-glow),
    0 0 60px var(--neon-glow),
    0 0 110px rgba(47, 123, 255, .6);
  margin: 0;
  line-height: 1;
}
.neon--small { font-size: clamp(2.5rem, 7vw, 4.5rem); }

/* ───────── intro ───────── */
.intro {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--ink) url("assets/jazz-bar.jpg") center / cover no-repeat;
  transition: opacity 1.4s var(--ease), transform 1.6s var(--ease), filter 1.4s var(--ease);
}
.intro.is-leaving {
  opacity: 0;
  transform: scale(1.12);
  filter: blur(8px) brightness(.6);
  pointer-events: none;
}
.intro__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.9) brightness(.8);
}
.intro__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 0 30%, rgba(5,7,13,.55) 70%, rgba(5,7,13,.95) 100%),
    linear-gradient(to bottom, rgba(5,7,13,.2), rgba(5,7,13,.1) 50%, rgba(5,7,13,.85));
}
.intro__content {
  position: relative;
  align-self: end;
  text-align: center;
  padding: 0 16px 11vh;
}
.intro__kicker, .programme__kicker {
  font-size: .72rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--lamp);
  margin: 0 0 1.4rem;
  opacity: 0;
  animation: rise 1.4s var(--ease) 1s forwards;
}
.bar__logo { opacity: .05; }
body:not(.is-intro) .bar__logo {
  animation: flicker-on 2.4s linear .9s forwards, hum 6s ease-in-out 4s infinite;
}
.intro__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--text);
  margin: 1.2rem 0 2rem;
  opacity: 0;
  animation: rise 1.4s var(--ease) 1.3s forwards;
}
.menu {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px clamp(8px, 2vw, 18px);
  opacity: 0;
  animation: rise 1.4s var(--ease) 1.7s forwards;
}
.menu__item {
  display: grid; justify-items: center; gap: .35rem;
  min-width: 132px;
  padding: 1rem 1.4rem .9rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(5, 7, 13, .38);
  border: 1px solid rgba(233, 228, 218, .22);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: border-color .4s, box-shadow .4s, color .4s, transform .4s var(--ease);
}
.menu__name {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1;
}
.menu__count {
  font-size: .6rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted);
}
.menu__item:hover, .menu__item:focus-visible {
  border-color: var(--neon);
  color: var(--neon-core);
  box-shadow: 0 0 24px rgba(47, 123, 255, .45), inset 0 0 18px rgba(47, 123, 255, .2);
  transform: translateY(-2px);
  outline: none;
}
.menu__item:hover .menu__count, .menu__item:focus-visible .menu__count { color: var(--lamp); }
/* ───────── the logo: the Ed's neon sign ───────── */
.intro__logo {
  display: block;
  width: clamp(96px, 26vw, 128px); height: auto;
  margin: 0 auto 1.2rem;
  filter: drop-shadow(0 0 18px rgba(47, 123, 255, .7)) drop-shadow(0 0 40px rgba(47, 123, 255, .35));
  opacity: 0;
  animation: flicker-on 2.4s linear .3s forwards;
}
/* in the room the film's own sign is the logo, so the extra one steps aside */
.intro.is-room .intro__logo { display: none; }
.bar__logo {
  width: 56px; height: 56px;
  filter: drop-shadow(0 0 10px rgba(47, 123, 255, .6));
  transition: filter .3s;
}
.bar__home:hover .bar__logo, .bar__home:focus-visible .bar__logo { filter: drop-shadow(0 0 16px rgba(47, 123, 255, .9)); }

/* ───────── the room: the objects in the film are the menu (scene.js) ───────── */
.menu__label { display: contents; }
.intro__hint { display: none; }
.intro.is-room .intro__content {
  position: absolute;
  top: clamp(24px, 6vh, 64px); right: clamp(24px, 4vw, 64px);
  width: min(30rem, 36vw);
  padding: 0;
  text-align: right;
}
.intro.is-room .intro__tag { margin: .9rem 0 .5rem; }
.intro.is-room .intro__hint {
  display: block;
  margin: 0;
  font-size: .66rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 12px rgba(47, 123, 255, .6);
  opacity: 0;
  animation: rise 1.4s var(--ease) 2.2s forwards;
}
.intro.is-room .menu {
  position: fixed; inset: 0;
  display: block;
  pointer-events: none;
}
/* each link covers its object in the film (position and size set by scene.js) */
.intro.is-room .menu__item {
  position: absolute;
  display: block;
  min-width: 0;
  padding: 0;
  pointer-events: auto;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
  transition: border-color .35s, box-shadow .35s, backdrop-filter .35s, background .35s;
}
.intro.is-room .menu__item:hover,
.intro.is-room .menu__item:focus-visible {
  transform: none;
  border-color: rgba(127, 182, 255, .55);
  background: rgba(127, 182, 255, .05);
  box-shadow: 0 0 28px rgba(47, 123, 255, .45), inset 0 0 26px rgba(47, 123, 255, .22);
  backdrop-filter: brightness(1.4) saturate(1.15);
  outline: none;
}
.intro.is-room .menu__label {
  position: absolute; left: 50%;
  display: inline-flex; align-items: baseline; gap: .6rem;
  padding: .45rem .85rem;
  white-space: nowrap;
  color: var(--text);
  background: rgba(5, 7, 13, .62);
  border: 1px solid rgba(233, 228, 218, .2);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transform: translateX(-50%);
  opacity: .85;
  transition: border-color .3s, box-shadow .3s, color .3s, opacity .3s;
}
.intro.is-room .menu__item[data-label="below"] .menu__label { top: calc(100% + 10px); }
.intro.is-room .menu__item[data-label="above"] .menu__label { bottom: calc(100% + 10px); }
.intro.is-room .menu__item[data-label="inside-top"] .menu__label { top: 12px; left: 12px; transform: none; }
.intro.is-room .menu__name { font-size: 1.1rem; }
.intro.is-room .menu__count { font-size: .54rem; }
.intro.is-room .menu__item:hover .menu__label,
.intro.is-room .menu__item:focus-visible .menu__label {
  opacity: 1;
  color: var(--neon-core);
  border-color: var(--neon);
  box-shadow: 0 0 20px rgba(47, 123, 255, .5);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
/* a neon tube struggling to catch, then holding */
@keyframes flicker-on {
  0% { opacity: .05; } 8% { opacity: .9; } 10% { opacity: .1; }
  22% { opacity: .1; } 24% { opacity: 1; } 27% { opacity: .2; }
  40% { opacity: .2; } 42% { opacity: 1; } 44% { opacity: .6; }
  46% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes hum {
  0%, 100% { opacity: 1; }
  48% { opacity: 1; } 49% { opacity: .82; } 50% { opacity: 1; }
  73% { opacity: .93; }
}

/* drifting haze */
.haze { position: absolute; inset: -20%; pointer-events: none; }
.haze span {
  position: absolute;
  width: 70%; height: 70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--smoke), transparent);
  filter: blur(30px);
  animation: drift 38s ease-in-out infinite alternate;
}
.haze span:nth-child(1) { top: 10%; left: -10%; }
.haze span:nth-child(2) { top: 40%; left: 40%; animation-duration: 46s; animation-delay: -12s; }
.haze span:nth-child(3) { top: -5%; left: 50%; animation-duration: 54s; animation-delay: -24s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(18%, -10%) scale(1.3); }
}

/* ───────── the bar: fanned wheel of scenes ───────── */
.bar {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  background: radial-gradient(ellipse at 50% 110%, #101a33 0%, var(--ink) 60%);
}
.bar__ambient {
  position: absolute; inset: -10%;
  background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.2) brightness(.35);
  opacity: .9;
  transition: background-image 1s var(--ease);
}
.bar__ambient::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 20%, var(--ink) 80%);
}
.bar__head {
  position: relative; z-index: 3;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px 16px;
  padding: 18px clamp(16px, 4vw, 48px) 0;
}
.bar__home {
  justify-self: start;
  display: flex; align-items: center; gap: .7rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}
.bar__head .neon { font-size: clamp(2rem, 4.4vw, 2.9rem); }
.bar__back {
  font-size: .62rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted);
  transition: color .3s;
}
.bar__home:hover .bar__back, .bar__home:focus-visible .bar__back { color: var(--lamp); }
.bar__home:focus-visible { outline: 2px solid var(--neon); outline-offset: 6px; }
.tabs {
  display: flex; gap: 4px;
  padding: 4px;
  background: rgba(5, 7, 13, .45);
  border: 1px solid rgba(233, 228, 218, .14);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.tabs a {
  padding: .6rem 1rem;
  border-radius: 999px;
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .3s, background .3s, box-shadow .3s;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] {
  color: var(--neon-core);
  background: rgba(47, 123, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(127, 182, 255, .45), 0 0 16px rgba(47, 123, 255, .25);
}
.tabs a:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.curate-btn { justify-self: end; }

/* The wheel: every card hangs from one pivot far below the screen and is rotated
 * around it, so the row of cards bends into an arc. --d is each card's distance
 * from the centre card (fractional while the wheel is turning).              */
.wheel {
  /* each shelf has its own card shape: stills, album covers, book covers */
  --ratio: 1.5;
  --card-h: min(calc(clamp(260px, 38vw, 480px) / 1.5), 41vh);
  --card-w: calc(var(--card-h) * var(--ratio));
  --radius: calc(var(--card-w) * 2.2);
  --step: 15deg;
  position: relative; z-index: 2;
  width: 100%;
  min-height: calc(var(--card-h) * 1.45);
  align-self: center;
  margin: 8px 0 12px;
  touch-action: pan-y;
  cursor: grab;
  outline: none;
  user-select: none;
}
.wheel.is-dragging { cursor: grabbing; }
.wheel[data-kind="songs"] { --ratio: 1; --card-h: min(clamp(200px, 24vw, 300px), 36vh); }
.wheel[data-kind="books"] { --ratio: .667; --card-h: min(clamp(260px, 32vw, 420px), 48vh); }
.card {
  --d: 0;
  --ad: 0; /* |d| */
  position: absolute;
  left: 50%; top: 50%;
  width: var(--card-w); height: var(--card-h);
  margin: calc(var(--card-h) / -2) 0 0 calc(var(--card-w) / -2);
  border-radius: 16px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(233, 228, 218, .28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .5);
  transform-origin: 50% calc(50% + var(--radius));
  transform:
    rotate(calc(var(--d) * var(--step)))
    translateY(calc((1 - min(var(--ad), 1)) * -5%));
  opacity: clamp(0, calc(4.6 - var(--ad)), 1);
  padding: 0;
  cursor: grab;
  will-change: transform;
}
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  filter: brightness(calc(1 - min(var(--ad), 3) * .12));
}
/* ───────── movies: a strip of film unspooling from a reel ─────────
 * Same wheel physics, different shape: the frames sit edge to edge in a row,
 * the strip bends gently away like a curved cinema screen, and the frame in the
 * middle is "in the gate", lit by the projector lamp.                          */
.wheel[data-kind="movies"] {
  --img-w: min(31vw, 440px, 50vh);
  --card-w: calc(var(--img-w) + 18px);
  --card-h: calc(var(--img-w) / 1.5 / .7);
  overflow: hidden;
  min-height: calc(var(--card-h) * 1.25);
}
.wheel[data-kind="movies"] .card {
  border: 0;
  border-radius: 0;
  background-color: #0c0c0e;
  /* sprocket holes along the top and bottom of the film */
  background-image:
    repeating-linear-gradient(90deg, transparent 0 7px, #e9e4da 7px 17px, transparent 17px 26px),
    repeating-linear-gradient(90deg, transparent 0 7px, #e9e4da 7px 17px, transparent 17px 26px);
  background-size: 100% 7%, 100% 7%;
  background-position: 0 3.5%, 0 96.5%;
  background-repeat: no-repeat;
  padding: calc(var(--card-h) * .15) 9px;
  box-shadow: none;
  transform-origin: 50% 50%;
  /* frames sit edge to edge, so the strip reads as one continuous piece of film */
  transform: translateX(calc(var(--d) * var(--card-w)));
  opacity: 1;
  /* frames dim away from the gate, sprocket holes and all */
  filter: brightness(calc(1 - min(var(--ad), 3) * .22));
}
.wheel[data-kind="movies"] .card img {
  border-radius: 3px;
  filter: saturate(calc(1 - min(var(--ad), 2) * .3)) sepia(calc(min(var(--ad), 2) * .15));
}
.wheel[data-kind="movies"] .card.is-centre {
  box-shadow: 0 0 60px rgba(255, 196, 120, .22), 0 30px 60px rgba(0, 0, 0, .6);
}
.wheel[data-kind="movies"] .card.is-centre img { box-shadow: 0 0 0 1px rgba(255, 220, 170, .25); }
.frame__edge {
  position: absolute; left: 12px; bottom: calc(var(--card-h) * .005);
  font: 600 9px/1 var(--sans); letter-spacing: .25em;
  color: #e0a85c; opacity: .7;
  pointer-events: none;
}
.wheel[data-kind="movies"] .card--text { padding: calc(var(--card-h) * .17) 9%; }
.frame--leader { pointer-events: none; z-index: 1; }
.frame__blank {
  display: block; width: 100%; height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(233, 228, 218, .07), rgba(233, 228, 218, .03));
  box-shadow: inset 0 0 0 1px rgba(233, 228, 218, .06);
}
/* the reel, half off the left edge; frames pass under it as they wind back on */
.reel {
  position: absolute; z-index: 2000;
  left: calc(var(--card-h) * -.42); top: 50%;
  width: calc(var(--card-h) * 1.05); height: calc(var(--card-h) * 1.05);
  margin-top: calc(var(--card-h) * -.525);
  transform: rotate(var(--reel, 0deg));
  filter: drop-shadow(8px 10px 24px rgba(0, 0, 0, .7));
  pointer-events: none;
}

/* a quote with no picture is written on a card instead */
.card--text {
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: .8rem;
  padding: calc(var(--card-h) * .1) calc(var(--card-w) * .09);
  text-align: left;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 184, 98, .16), transparent 60%),
    #efe9dc;
  color: #2a2620;
  filter: brightness(calc(1 - min(var(--ad), 3) * .12));
}
.card--text > span { width: 100%; }
.card__quote {
  font-family: var(--serif); font-style: italic;
  font-size: calc(var(--card-h) * .075);
  line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__by {
  font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
  color: #8a5a22;
}
.card:focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; }
.card.is-centre { box-shadow: 0 26px 60px rgba(0, 0, 0, .65), 0 0 40px rgba(47, 123, 255, .18); }

.caption {
  position: relative; z-index: 3;
  width: min(760px, 100%);
  padding: 0 16px;
  text-align: center;
  min-height: 9.5rem;
}
.caption__quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  margin: 0 0 .8rem;
  text-wrap: balance;
}
/* a song with no cover is a record sleeve, the disc sliding out of it */
.card--sleeve {
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: calc(var(--card-w) * .09);
  text-align: left;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255, 184, 98, .14), transparent 55%),
    linear-gradient(160deg, #1d2336, #10131d 70%);
  filter: brightness(calc(1 - min(var(--ad), 3) * .12));
}
.sleeve__disc {
  position: absolute;
  width: 78%; aspect-ratio: 1;
  top: 8%; right: -30%;
  border-radius: 50%;
  background:
    radial-gradient(circle, #b8452e 0 17%, #0b0b0c 17.5% 19%, transparent 19.5%),
    repeating-radial-gradient(circle, #111 0 1px, #1b1b1d 1.5px 3px);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .05);
  display: grid; place-items: center;
  transition: right .6s var(--ease);
}
.card--sleeve.is-centre .sleeve__disc { right: -18%; }
.sleeve__label {
  font-family: var(--script); font-size: calc(var(--card-h) * .045);
  color: #f3e6cf;
  transform: rotate(-12deg);
}
.sleeve__text { position: relative; display: grid; gap: .35rem; max-width: 70%; }
.sleeve__no { font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--lamp); }
.sleeve__title { font-family: var(--serif); font-size: calc(var(--card-h) * .08); line-height: 1.1; color: var(--text); }
.sleeve__by { font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* album art on the front of the sleeve; the disc still slides out over it */
.sleeve__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card--sleeve.has-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, .08), transparent 35%, rgba(0, 0, 0, .25));
}
.card--sleeve.has-art .sleeve__disc { z-index: 1; right: -56%; }
.card--sleeve.has-art.is-centre .sleeve__disc { right: -44%; }

/* on the songs shelf: put the centre song on the record player */
.caption__player { display: grid; justify-items: center; gap: .55rem; margin-top: .6rem; }
.caption__play {
  font: 500 .7rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink); background: var(--neon-core);
  border: 0; border-radius: 999px;
  padding: .95rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(47, 123, 255, .45);
}
.caption__play:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
.caption__spotify {
  font-size: .6rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.caption__spotify:hover, .caption__spotify:focus-visible { color: #1ed760; }

/* ───────── the record player's now-playing box (jukebox.js) ───────── */
.jukebox {
  position: fixed; z-index: 25;
  right: 16px; bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  display: grid; gap: 8px;
  padding: 10px;
  color: var(--text);
  background: rgba(8, 10, 18, .84);
  border: 1px solid rgba(233, 228, 218, .14);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55), 0 0 30px rgba(255, 168, 80, .08);
  backdrop-filter: blur(10px);
  transition: right .6s var(--ease), bottom .6s var(--ease), width .4s var(--ease), padding .4s var(--ease), border-radius .4s var(--ease);
}
.jukebox[data-mode="room"] { right: var(--jb-right, 16px); bottom: var(--jb-bottom, 16px); }
.jukebox[data-mode="home"] { right: 50%; transform: translateX(50%); bottom: 14px; }
.jukebox__top { display: flex; align-items: center; gap: 12px; }
.jukebox__disc {
  position: relative; flex: none;
  width: 56px; height: 56px;
  padding: 0;
  border: 0; border-radius: 50%;
  background:
    radial-gradient(circle, #0b0b0c 0 6%, transparent 6.5%),
    repeating-radial-gradient(circle, #111 0 1px, #1c1c1f 1.5px 3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .06);
  cursor: default;
  animation: spin 3.2s linear infinite;
  animation-play-state: paused;
}
.jukebox.is-playing .jukebox__disc { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.jukebox__disc img {
  position: absolute; inset: 22%;
  width: 56%; height: 56%;
  border-radius: 50%;
  object-fit: cover;
}
.jukebox__spindle {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: #0b0b0c;
}
.jukebox__info { flex: 1; min-width: 0; }
.jukebox__status {
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--lamp);
}
.jukebox__count { margin: .3rem 0 0; font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted); }
/* the equalizer only moves while the song is actually playing */
.jukebox__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.jukebox__eq i { width: 3px; height: 3px; background: currentColor; border-radius: 1px; }
.jukebox.is-playing .jukebox__eq i { animation: eq .9s ease-in-out infinite alternate; }
.jukebox.is-playing .jukebox__eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.jukebox.is-playing .jukebox__eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
.jukebox.is-playing .jukebox__eq i:nth-child(4) { animation-duration: .8s; animation-delay: -.2s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
.jukebox__controls { display: flex; gap: 4px; }
.jukebox__controls button {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(233, 228, 218, .16);
  color: var(--text); font-size: .7rem;
  cursor: pointer;
}
.jukebox__controls button:hover { border-color: var(--neon); box-shadow: 0 0 12px rgba(47, 123, 255, .4); }
.jukebox__controls button:focus-visible, .jukebox__disc:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.jukebox.no-api #jbToggle { display: none; }
.jukebox__embed { min-height: 80px; border-radius: 12px; overflow: hidden; }
.jukebox__embed iframe { display: block; border: 0; border-radius: 12px; }

/* on the shelves it's a small spinning disc in the corner; click it to open the player */
.jukebox.is-mini { width: auto; padding: 6px; border-radius: 999px; }
.jukebox.is-mini .jukebox__disc { cursor: pointer; width: 48px; height: 48px; }
.jukebox.is-mini:not(.is-open) .jukebox__info,
.jukebox.is-mini:not(.is-open) .jukebox__controls { display: none; }
/* the player stays loaded (so the music keeps going), just out of sight */
.jukebox.is-mini:not(.is-open) .jukebox__embed {
  position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; clip-path: inset(50%);
}
.jukebox.is-mini.is-open { width: min(360px, calc(100vw - 32px)); padding: 10px; border-radius: 16px; }

/* on the home page it's a slim pill: disc, song, play and next. Click the disc for the full player */
.jukebox__title { display: none; }
.jukebox.is-compact:not(.is-open) {
  width: auto; max-width: min(300px, calc(100vw - 32px));
  padding: 4px 6px 4px 4px; gap: 0; border-radius: 999px;
  grid-template-columns: minmax(0, 1fr);
  background: rgba(8, 10, 18, .55);
  border-color: rgba(233, 228, 218, .1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.jukebox.is-compact .jukebox__disc { cursor: pointer; }
.jukebox.is-compact:not(.is-open) .jukebox__top { gap: 9px; }
.jukebox.is-compact:not(.is-open) .jukebox__disc { width: 32px; height: 32px; }
.jukebox.is-compact:not(.is-open) .jukebox__status { font-size: .5rem; letter-spacing: .2em; gap: 6px; }
.jukebox.is-compact:not(.is-open) .jukebox__eq { height: 9px; }
.jukebox.is-compact:not(.is-open) .jukebox__title {
  display: block; margin: .15rem 0 0;
  font-family: var(--serif); font-style: italic; font-size: .82rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jukebox.is-compact:not(.is-open) .jukebox__count,
.jukebox.is-compact:not(.is-open) #jbPrev { display: none; }
.jukebox.is-compact:not(.is-open) .jukebox__controls button { width: 26px; height: 26px; font-size: .6rem; }
.jukebox.is-compact:not(.is-open) .jukebox__embed {
  position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; clip-path: inset(50%);
}
.jukebox.is-compact.is-open { width: min(360px, calc(100vw - 32px)); }

/* leave room for the box on the home page when it sits at the bottom */
body:has(.jukebox[data-mode="home"]:not([hidden])) .intro__content { padding-bottom: calc(11vh + 60px); }

/* long quotes step down a size/* long quotes step down a size so the arrows stay on screen */
.caption.is-long .caption__quote { font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.35; }
.caption.is-xlong { width: min(920px, 100%); }
.caption.is-xlong .caption__quote { font-size: clamp(.98rem, 1.6vw, 1.12rem); line-height: 1.4; }
.caption.is-xlong ~ .bar__nav { padding-bottom: 14px; }
.card--text.is-long .card__quote { font-size: calc(var(--card-h) * .058); -webkit-line-clamp: 8; }
.caption__speaker {
  margin: -.3rem 0 .9rem;
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; color: var(--lamp);
}
.caption__speaker:empty { display: none; }
.caption__meta {
  margin: 0;
  display: inline-flex; gap: .9rem; align-items: baseline;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 500;
}
.caption__year { font-family: var(--sans); font-size: .74rem; letter-spacing: .3em; color: var(--muted); }
.caption__remove {
  display: block;
  margin: .9rem auto 0;
  font: 500 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); background: none;
  border: 1px solid rgba(233, 228, 218, .2); border-radius: 999px;
  padding: .5rem .8rem; cursor: pointer;
}
.caption__remove.is-armed { color: #ff8f8f; border-color: #ff8f8f; }
.caption > * { transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s var(--ease); }
.caption.is-changing > * { opacity: 0; transform: translateY(8px); filter: blur(4px); }

.bar__nav {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 0 28px;
  font-size: .72rem; letter-spacing: .3em; color: var(--muted);
}
.bar__nav button {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(5, 7, 13, .4);
  border: 1px solid rgba(233, 228, 218, .25);
  color: var(--text); font-size: 1rem;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.bar__nav button:hover { border-color: var(--neon); box-shadow: 0 0 16px rgba(47, 123, 255, .4); }
.bar__empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 0 16px; text-align: center;
  font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.3rem;
}

/* ───────── the books shelf (books.js) ───────── */
.books {
  position: relative; z-index: 2;
  grid-row: 2 / 5;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}
.books__stage {
  position: relative;
  min-height: 420px;
  touch-action: pan-y;
  outline: none;
}
.books__stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.books__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--neon); }
.books__empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  margin: 0; padding: 0 16px;
  text-align: center;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--muted);
  pointer-events: none;
}
.books__empty:not([hidden]) ~ .books__hint { visibility: hidden; }
.books__hint {
  margin: 0; padding: 6px 16px 26px;
  text-align: center;
  font-size: .64rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted);
}
.books__tip {
  position: absolute; left: 0; top: 0;
  display: grid; gap: .2rem;
  padding: .55rem .8rem;
  pointer-events: none;
  white-space: nowrap;
  background: rgba(5, 7, 13, .78);
  border: 1px solid rgba(233, 228, 218, .18);
  border-radius: 8px;
  backdrop-filter: blur(6px);
}
.books__tip strong { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; }
.books__tip span { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--lamp); }

.books__card {
  position: absolute;
  right: clamp(16px, 7vw, 120px); top: 50%;
  width: min(340px, calc(100% - 32px));
  padding: 26px 26px 22px;
  background: rgba(10, 13, 22, .86);
  border: 1px solid rgba(127, 182, 255, .22);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  transform: translateY(-40%);
  opacity: 0;
  transition: opacity .45s var(--ease) .25s, transform .6s var(--ease) .2s;
}
.books__card.is-open { opacity: 1; transform: translateY(-50%); }
.books__year { margin: 0 0 .6rem; font-size: .66rem; letter-spacing: .3em; color: var(--lamp); }
.books__year:empty { display: none; }
.books__title {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.1;
  text-wrap: balance;
}
.books__author { margin: .5rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }
.books__line {
  margin: 1.1rem 0 0; padding-top: 1.1rem;
  border-top: 1px solid rgba(233, 228, 218, .12);
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.35;
}
.books__close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; color: var(--muted);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.books__close:focus-visible, .books__remove:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
.books__remove {
  margin-top: 1.1rem;
  font: 500 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); background: none;
  border: 1px solid rgba(233, 228, 218, .2); border-radius: 999px;
  padding: .5rem .8rem; cursor: pointer;
}
.books__remove.is-armed { color: #ff8f8f; border-color: #ff8f8f; }

/* ───────── the songs shelf: a crate of records (crate.js) ───────── */
.crate {
  position: relative; z-index: 2;
  grid-row: 2 / 5;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-height: 0;
}
.crate__stage { position: relative; min-height: 420px; touch-action: none; outline: none; }
.crate__stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.crate__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--neon); }
.crate__empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  margin: 0; padding: 0 16px; text-align: center;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--muted);
  pointer-events: none;
}
.crate__tip {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
  padding: .5rem .85rem;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--lamp);
  background: rgba(5, 7, 13, .72);
  border: 1px solid rgba(233, 228, 218, .16);
  border-radius: 999px;
  pointer-events: none; white-space: nowrap;
}
.crate__now {
  margin: 0; padding: 4px 16px 0;
  display: grid; justify-items: center; gap: .35rem;
  text-align: center;
  min-height: 3.2rem;
}
.crate__count { font-size: .62rem; letter-spacing: .3em; color: var(--muted); }
.crate__song { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--text); }
.crate__hint {
  margin: 0; padding: 8px 16px 24px; text-align: center;
  font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.crate__empty:not([hidden]) ~ .crate__now, .crate__empty:not([hidden]) ~ .crate__hint { visibility: hidden; }
.crate__card {
  position: absolute;
  right: clamp(16px, 7vw, 120px); top: 42%;
  width: min(330px, calc(100% - 32px));
  padding: 24px 24px 20px;
  display: grid; gap: .5rem; justify-items: start;
  background: rgba(10, 13, 22, .86);
  border: 1px solid rgba(127, 182, 255, .22);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  transform: translateY(-40%);
  opacity: 0;
  transition: opacity .45s var(--ease) .35s, transform .6s var(--ease) .3s;
}
.crate__card.is-open { opacity: 1; transform: translateY(-50%); }
.crate__playing {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--lamp);
}
.crate__playing .jukebox__eq i { animation: eq .9s ease-in-out infinite alternate; }
.crate__playing .jukebox__eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.crate__playing .jukebox__eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
.crate__playing .jukebox__eq i:nth-child(4) { animation-duration: .8s; animation-delay: -.2s; }
.crate__title { margin: .2rem 0 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; text-wrap: balance; }
.crate__artist { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }
.crate__line { margin: .6rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; line-height: 1.35; }
.crate__spotify {
  margin-top: .5rem;
  font-size: .6rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.crate__spotify:hover, .crate__spotify:focus-visible { color: #1ed760; }
.crate__close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; color: var(--muted);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.crate__remove {
  margin-top: .6rem;
  font: 500 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); background: none;
  border: 1px solid rgba(233, 228, 218, .2); border-radius: 999px;
  padding: .5rem .8rem; cursor: pointer;
}
.crate__remove.is-armed { color: #ff8f8f; border-color: #ff8f8f; }
.crate__close:focus-visible, .crate__remove:focus-visible, .crate__spotify:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }

/* ───────── curator ───────── */
.curate-btn, .btn {
  font: 500 .74rem/1 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--neon-core);
  border: 1px solid var(--neon-core);
  border-radius: 999px;
  padding: .95rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(47, 123, 255, .45);
}
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: rgba(233, 228, 218, .3);
  box-shadow: none;
}
.btn--small { padding: .55rem .9rem; font-size: .64rem; margin-left: .5rem; vertical-align: middle; }

.curate {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid rgba(127, 182, 255, .25);
  border-radius: 18px;
  background: var(--ink-2);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 60px rgba(47, 123, 255, .15);
}
.curate::backdrop { background: rgba(5, 7, 13, .75); backdrop-filter: blur(6px); }
.curate__form, .curate__publish { padding: 24px; display: grid; gap: 16px; }
.curate__head { display: flex; align-items: center; justify-content: space-between; }
.curate__head h2 { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; margin: 0; }
.curate__x {
  background: none; border: 0; color: var(--muted);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.curate__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.drop {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(233, 228, 218, .3);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: border-color .3s, background .3s;
}
.drop.is-over { border-color: var(--neon); background: rgba(47, 123, 255, .08); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop__label { padding: 16px; color: var(--muted); font-size: .9rem; pointer-events: none; }
.drop img:not([hidden]) + .drop__label { display: none; }

.field { display: grid; gap: 6px; flex: 1; }
.field span {
  font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea {
  font: 400 1rem/1.4 var(--sans);
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(233, 228, 218, .18);
  border-radius: 10px;
  padding: .75rem .9rem;
  resize: vertical;
}
.field textarea { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
.field span em { font-style: normal; text-transform: none; letter-spacing: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--neon); }
.field-row { display: flex; gap: 12px; }
.field-error { margin: 0; color: #ffb0a0; font-size: .9rem; }
.field--year { flex: 0 0 110px; }

.curate__publish p, .curate__publish li { line-height: 1.6; color: var(--text); }
.curate__publish ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 14px; }
.curate__publish code { color: var(--neon); }
.curate__publish pre {
  margin: 10px 0 0;
  padding: 12px;
  font-size: .78rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, .4);
  border-radius: 8px;
  color: #cfd8e8;
}

/* ───────── motion preferences ───────── */
@media (prefers-reduced-motion: reduce) {
  .jukebox__disc, .jukebox__eq i, .crate__playing .jukebox__eq i { animation: none !important; }
  body::after, .haze span, .bar__logo, .intro__logo { animation: none !important; }
  .intro__logo { opacity: 1; }
  .bar__logo { opacity: 1; }
  .intro__kicker, .intro__tag, .menu { opacity: 1; animation: none; }
}

@media (max-width: 600px) {
  .bar__head { grid-template-columns: 1fr auto; }
  .bar__logo { width: 44px; height: 44px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .tabs a { padding: .6rem .7rem; font-size: .6rem; letter-spacing: .16em; }
  .tab__more { display: none; }
  .wheel { --card-h: 46vw; --step: 17deg; }
  .wheel[data-kind="movies"] { --img-w: 66vw; }
  .wheel[data-kind="movies"] { --img-w: 62vw; }
  .reel { left: calc(var(--card-h) * -.78); }
  .wheel[data-kind="songs"] { --card-h: 58vw; }
  .wheel[data-kind="books"] { --card-h: 74vw; }
  .menu { display: grid; grid-template-columns: 1fr 1fr; }
  .books__stage { min-height: 360px; }
  .books__card { top: auto; bottom: 64px; right: 16px; transform: translateY(10%); }
  .books__card.is-open { transform: none; }
  .crate__stage { min-height: 380px; }
  .crate__card { top: auto; bottom: 110px; right: 16px; transform: translateY(10%); }
  .crate__card.is-open { transform: none; }
  .crate__now, .crate__hint { padding-left: 72px; padding-right: 72px; }
  .crate__song { font-size: 1.05rem; }
  .menu__item { min-width: 0; }
  .field-row { flex-direction: column; }
  .field--year { flex: 1; }
}
