:root {
  --room: #130a15;
  --felt: #1e1222;
  --lamp: #2b1a30;
  --neon: #e20c90;
  --hot: #ff4fb8;
  --bone: #f6ecf1;
  --dust: #a08e9b;
  --line: rgba(246, 236, 241, 0.12);
  --glow: 0.16;            /* grows as answers accumulate */
  --max: 36rem;
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sleeve: 156px;
  color-scheme: dark;
}
@media (min-width: 700px) {
  :root { --gutter: 32px; --sleeve: 208px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--room);
  color: var(--bone);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* the lamp: pink as light, not paint */
.lamp {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 40% at 50% -8%, rgba(226, 12, 144, var(--glow)), transparent 70%),
    radial-gradient(40% 30% at 85% 110%, rgba(226, 12, 144, calc(var(--glow) * .45)), transparent 70%);
  transition: opacity .8s var(--ease);
}
.lamp, .bar, main, .foot { transition: --glow .8s; }

/* bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--gutter) 10px;
  background: linear-gradient(var(--room) 70%, transparent);
}
.wordmark { justify-self: start; text-decoration: none; font-weight: 600; font-size: .92rem; letter-spacing: -.01em; color: var(--dust); }
.wordmark span { color: var(--bone); }
.bar-title { text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.03em; }
.bar-back { justify-self: end; color: var(--dust); font-size: .95rem; padding: 4px 2px; }
.bar-back:hover { color: var(--bone); }
.thread { grid-column: 1 / -1; height: 2px; margin-top: 12px; background: var(--line); border-radius: 2px; overflow: hidden; }
.thread i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--neon), var(--hot));
  box-shadow: 0 0 12px var(--hot);
  transform-origin: left; transform: scaleX(var(--p, 0));
  transition: transform .5s var(--ease);
}

/* layout */
main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 48px; }
main.wide { max-width: none; padding-inline: 0; }
.screen { animation: arrive .45s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }

h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); }
h2 { font-size: clamp(2rem, 7.4vw, 2.9rem); }
.lede { color: var(--dust); font-size: 1.08rem; max-width: 30rem; margin: 20px 0 0; }
.lede strong { color: var(--bone); font-weight: 500; }

/* primary action: a pill lit from inside */
.go {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 32px; padding: 14px 22px 14px 18px;
  border-radius: 999px; background: var(--bone); color: var(--room);
  font-weight: 600; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 0 0 0 rgba(255, 79, 184, 0);
  transition: transform .25s var(--ease), box-shadow .4s var(--ease);
}
.go:hover { transform: translateY(-1px); box-shadow: 0 8px 36px -8px rgba(255, 79, 184, .65); }
.go svg { width: 18px; height: 18px; }
.go.quiet { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--line); }
.go.quiet:hover { box-shadow: inset 0 0 0 1px var(--dust); }

/* intro */
.intro h1 { margin-top: 10vh; }
.intro .counts { margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, auto); gap: 18px 28px; justify-content: start; }
.intro .counts b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.intro .counts span { color: var(--dust); font-size: .9rem; }

/* questions as a setlist */
.q-step { color: var(--dust); font-size: .95rem; margin: 0 0 14px; }
.setlist { list-style: none; margin: 30px 0 0; padding: 0; }
.opt {
  width: 100%; display: grid; grid-template-columns: 26px 1fr; column-gap: 16px; align-items: baseline;
  text-align: left; padding: 15px 0; border-top: 1px solid var(--line);
  font-size: 1.32rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.2;
  transition: color .2s;
}
.setlist li:last-child .opt { border-bottom: 1px solid var(--line); }
.opt small { display: block; color: var(--dust); font-size: .9rem; font-weight: 400; letter-spacing: 0; margin-top: 3px; }
.opt .dot {
  position: relative; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--dust); justify-self: center;
  transition: border-color .2s, background .25s var(--ease), box-shadow .35s var(--ease), transform .25s var(--ease);
}
.opt:hover .dot { border-color: var(--bone); }
.opt[aria-checked="true"] { color: var(--bone); }
.opt[aria-checked="true"] .dot {
  background: var(--neon); border-color: var(--hot);
  box-shadow: 0 0 0 4px rgba(226, 12, 144, .18), 0 0 18px rgba(255, 79, 184, .7);
  transform: scale(1.05);
}
.opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.q-actions { display: flex; align-items: center; gap: 22px; margin-top: 28px; min-height: 52px; }
.q-actions .skip { color: var(--dust); font-size: .95rem; }
.q-actions .skip:hover { color: var(--bone); }
.q-actions .go { margin-top: 0; }

/* blind test */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.disc-wrap { display: grid; gap: 14px; justify-items: center; }
.disc {
  width: min(38vw, 180px); aspect-ratio: 1; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle, var(--felt) 0 13%, transparent 13.5%),
    repeating-radial-gradient(circle, #0a0608 0 2px, #171017 2px 4px);
  box-shadow: 0 20px 40px -20px #000, inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
  transition: box-shadow .4s var(--ease), transform .3s var(--ease);
}
.disc::after { content: ""; position: absolute; inset: 42%; border-radius: 50%; background: var(--neon); opacity: .9; }
.disc-label { color: var(--dust); font-size: .9rem; margin-top: -4px; }
.disc.playing { animation: spin 2.4s linear infinite; box-shadow: 0 20px 40px -20px #000, 0 0 0 1px var(--neon), 0 0 32px rgba(255, 79, 184, .5); }
.disc.played { box-shadow: 0 20px 40px -20px #000, inset 0 0 0 1px var(--dust); }
@keyframes spin { to { transform: rotate(360deg); } }
.disc-wrap .pick { margin-top: 10px; padding: 11px 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; transition: all .25s var(--ease); }
.disc-wrap .pick:hover { box-shadow: inset 0 0 0 1px var(--hot); color: var(--hot); }
.disc-wrap .pick[disabled] { opacity: .35; cursor: default; }
.test-note { color: var(--dust); margin-top: 26px; font-size: .95rem; }
.pair-progress { display: flex; gap: 6px; margin-top: 10px; }
.pair-progress i { width: 22px; height: 3px; border-radius: 2px; background: var(--line); }
.pair-progress i.on { background: var(--neon); box-shadow: 0 0 8px var(--hot); }

/* the crate */
.crate-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.crate-head p { color: var(--dust); margin: 12px 0 0; font-size: 1.05rem; max-width: 30rem; }
.crate {
  display: flex; gap: 10px; align-items: flex-end;
  margin: 26px 0 0; padding: 36px calc(50% - var(--sleeve) / 2) 30px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  perspective: 1100px;
  background: linear-gradient(transparent, rgba(30, 18, 34, .9) 60%, var(--felt));
}
.crate::-webkit-scrollbar { display: none; }
.sleeve {
  flex: 0 0 var(--sleeve); width: var(--sleeve); aspect-ratio: 1; scroll-snap-align: center;
  position: relative; border-radius: 3px; overflow: hidden;
  transform: rotateY(-34deg) translateZ(-40px) scale(.9); transform-origin: 50% 100%;
  box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), filter .5s;
  filter: brightness(.65) saturate(.85);
  background: var(--lamp);
}
.sleeve img { width: 100%; height: 100%; object-fit: cover; }
.sleeve::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255, 79, 184, .28), transparent 35%, transparent 80%, rgba(0,0,0,.35));
  mix-blend-mode: screen; opacity: .8; transition: opacity .5s;
}
.sleeve.is-active {
  transform: rotateY(0) translateZ(0) translateY(-14px) scale(1.06);
  filter: none;
  box-shadow: 0 40px 70px -28px #000, 0 0 0 1px rgba(255,255,255,.1), 0 0 48px -10px rgba(255, 79, 184, .55);
  z-index: 2;
}
.sleeve.is-active::after { opacity: .35; }
.sleeve .n { position: absolute; left: 8px; bottom: 6px; font-size: .8rem; font-weight: 600; color: var(--bone); text-shadow: 0 1px 6px #000; opacity: 0; transition: opacity .3s; }
.sleeve:not(.is-active) .n { opacity: .9; }

/* the active record */
.now { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; row-gap: 6px; align-items: start; }
.play {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--neon); color: var(--bone);
  transition: box-shadow .3s var(--ease), transform .2s var(--ease);
  position: relative;
}
.play:hover { transform: scale(1.04); }
.play svg { width: 24px; height: 24px; fill: currentColor; }
.play.playing { animation: breathe 1.7s ease-in-out infinite; }
.play .ring { position: absolute; inset: -2px; border-radius: 50%; }
.play.playing .ring { background: conic-gradient(var(--hot) calc(var(--t, 0) * 1turn), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); }
.play[aria-disabled="true"] { opacity: .4; cursor: default; }
@keyframes breathe { 0%, 100% { box-shadow: inset 0 0 0 2px var(--neon), 0 0 0 0 rgba(255,79,184,.0); } 50% { box-shadow: inset 0 0 0 2px var(--hot), 0 0 0 10px rgba(255,79,184,.14), 0 0 30px rgba(255,79,184,.35); } }
.now .who { font-weight: 700; font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.1; }
.now .what { font-size: 1.1rem; color: var(--bone); margin-top: 2px; }
.now .meta { color: var(--dust); font-size: .92rem; margin-top: 6px; }
.now .why { grid-column: 2; margin: 12px 0 0; color: var(--bone); font-size: 1rem; line-height: 1.45; max-width: 28rem; }
.now .why.quote { font-style: italic; color: #e9d9e2; }
.now .why.quote::before { content: "“"; } .now .why.quote::after { content: "”"; }
.now .why a { color: var(--dust); font-style: normal; text-decoration-color: var(--line); }
.now .why a:hover { color: var(--bone); }
.stores { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.store {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .93rem;
  box-shadow: inset 0 0 0 1px var(--line); background: rgba(30, 18, 34, .6);
  transition: box-shadow .2s, color .2s, transform .2s var(--ease);
}
.store:hover { box-shadow: inset 0 0 0 1px var(--hot); transform: translateY(-1px); }
.store svg { width: 16px; height: 16px; fill: currentColor; }
.store.quiet { font-weight: 500; color: var(--dust); box-shadow: none; background: none; padding-inline: 6px; }
.store.quiet:hover { color: var(--bone); transform: none; }

.crate-list { max-width: var(--max); margin: 36px auto 0; padding: 0 var(--gutter); list-style: none; }
.crate-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.crate-list li:last-child { border-bottom: 1px solid var(--line); }
.crate-list img { width: 44px; height: 44px; border-radius: 3px; object-fit: cover; }
.crate-list button { text-align: left; min-width: 0; }
.crate-list .t { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crate-list .a { color: var(--dust); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crate-list li.is-active .t { color: var(--hot); }
.crate-list .y { color: var(--dust); font-size: .9rem; }

.crate-actions { max-width: var(--max); margin: 32px auto 0; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.crate-actions .go { margin-top: 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px); background: var(--bone); color: var(--room); padding: 10px 16px; border-radius: 999px; font-weight: 600; opacity: 0; transition: all .3s var(--ease); z-index: 9; pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); }

.empty { color: var(--dust); margin-top: 24px; }

/* footer */
.foot { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; color: var(--dust); font-size: .85rem; line-height: 1.5; }
.foot p { margin: 0 0 8px; }
.foot a { text-decoration-color: var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .disc.playing { box-shadow: 0 0 0 2px var(--hot); }
}
