:root{
  --void:#0A141E; --field:#0F1D28;
  --ink:#E2EAF0; --blue:#7FA6C2; --blue-dim:#5E7E96; --wire:#9CC3DA; --gold:#E3C06A;
}
@font-face{font-family:"Caveat";src:url("../assets/caveat-v23-latin-regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
*{box-sizing:border-box}
button:focus-visible, a:focus-visible{outline:2px solid var(--gold);outline-offset:3px}   /* clear keyboard focus ring */
html,body{height:100%;margin:0}
body{background:radial-gradient(120% 80% at 60% 26%, #123047 0%, var(--field) 46%, var(--void) 100%);
  color:var(--ink);font-family:"Helvetica Neue",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;overflow:hidden}
#app{position:fixed;inset:0;overflow:hidden}
.loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;color:var(--blue);font-size:14px}
svg.wires{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;
  filter:drop-shadow(0 0 3px rgba(156,195,218,.5))}
svg.grain{position:fixed;inset:0;width:100%;height:100%;opacity:.05;mix-blend-mode:overlay;pointer-events:none;z-index:7}

.prompt{position:fixed;top:9%;left:0;right:0;text-align:center;z-index:4}
.ptitle{font-family:"Caveat",cursive;font-weight:400;color:var(--ink);
  font-size:clamp(40px,11vw,64px);line-height:1;letter-spacing:.5px}
.psub{font-family:"Caveat",cursive;font-weight:400;color:var(--blue);
  font-size:clamp(20px,5.5vw,30px);line-height:1.15;margin-top:2px}

.helpbtn{position:fixed;top:14px;right:16px;z-index:8;width:30px;height:30px;border-radius:3px;
  border:1px solid rgba(156,195,218,.35);background:rgba(15,29,40,.5);color:var(--blue);
  font-size:15px;line-height:1;cursor:pointer;opacity:.5;transition:opacity .4s ease,border-color .2s}
.helpbtn:hover{opacity:1;border-color:rgba(156,195,218,.7)}
.helpbtn.dim{opacity:0!important;pointer-events:none}   /* fades out with the backlight on a choice, back in with the gold ball */

.genrepicker{position:fixed;top:14px;left:16px;z-index:8}   /* mirrors .helpbtn's placement, opposite corner */
.gpbtn{display:flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:3px;
  border:1px solid rgba(156,195,218,.35);background:rgba(15,29,40,.5);color:var(--blue);
  font-family:inherit;font-size:12.5px;letter-spacing:.3px;line-height:1;cursor:pointer;
  opacity:.5;transition:opacity .4s ease,border-color .2s}
.gpbtn:hover{opacity:1;border-color:rgba(156,195,218,.7)}
.genrepicker.open .gpbtn{opacity:1;border-color:rgba(156,195,218,.7)}
.gptri{font-size:12.5px;transition:transform .2s ease}
.genrepicker.open .gptri{transform:rotate(180deg)}
.gpmenu{position:absolute;top:calc(100% + 6px);left:0;width:max-content;min-width:100%;overflow:hidden;
  max-height:0;opacity:0;pointer-events:none;border-radius:3px;
  background:rgba(18,28,37,.985);border:1px solid rgba(150,180,200,.16);box-shadow:0 8px 24px rgba(0,0,0,.3);
  transition:max-height .3s ease,opacity .2s ease}
.genrepicker.open .gpmenu{max-height:240px;overflow-y:auto;opacity:1;pointer-events:auto}   /* scrolls instead of clipping once more genres are added */
.gpitem{display:block;width:100%;white-space:nowrap;text-align:left;background:transparent;border:none;
  font-family:inherit;color:var(--blue);font-size:12.5px;letter-spacing:.3px;padding:9px 14px;cursor:pointer}
.gpitem:hover{background:rgba(127,166,194,.14);color:var(--ink)}
.helpovl{position:fixed;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;
  padding:24px;background:rgba(5,8,12,.72);opacity:0;pointer-events:none;transition:opacity .25s ease}
.helpovl.open{opacity:1;pointer-events:auto}
.helpcard{position:relative;max-width:440px;width:100%;max-height:86vh;overflow:auto;
  background:rgba(18,28,37,.985);border:1px solid rgba(150,180,200,.16);border-radius:3px;
  padding:28px 26px 24px;box-shadow:0 0 46px rgba(233,190,88,.10)}
.helpx{position:absolute;top:8px;right:12px;background:transparent;border:none;color:var(--blue-dim);
  font-size:24px;line-height:1;cursor:pointer}
.helpx:hover{color:var(--ink)}
.helptitle{font-family:"Caveat",cursive;font-size:38px;line-height:1;color:var(--ink);margin-bottom:12px}
.helpcard p{color:#AEC3D0;font-size:14px;line-height:1.62;margin:0 0 14px}
.helpcard h3{color:var(--gold);font-size:12px;letter-spacing:2px;text-transform:uppercase;font-weight:600;margin:18px 0 6px}
.helpcard a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.helpcard a:hover{color:var(--ink)}

.node{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  width:clamp(248px,72vw,338px);z-index:3}   /* 72vw shrinks the node on mobile only (desktop is capped at 338px): more edge margin + the right stub shows */
  /* NOTE: no `will-change:transform` — the entrance is now JS-driven (transform set inline per frame),
     so the incoming line, read from the same value each frame, stays locked to the node. A compositor
     layer + CSS transition previously desynced them on mobile (line lagged a frame → grew/receded). */
.stack{position:relative}                        /* the two cards; ticks + ball bracket this, and it's what gets vertically centered */

.backlayer{position:absolute;inset:0;z-index:0;pointer-events:none}
.cardglow{position:absolute;border-radius:4px;background:rgba(233,190,88,.72);filter:blur(30px);transition:opacity .4s ease}
.cardglow.fade{opacity:0}                        /* unchosen card's glow fades out on selection */

.card{position:relative;z-index:1}
.card + .card{margin-top:24px}
.panel{position:relative;z-index:1;min-height:162px;padding:20px 20px 18px;border-radius:3px;
  background:rgba(18,28,37,.985);display:flex;flex-direction:column}
.title{color:var(--ink);font-weight:400;font-size:22px;line-height:1.15;letter-spacing:.2px}
.artist{color:var(--blue);font-size:14.5px;margin-top:10px}
.year{color:var(--blue-dim);font-size:12.5px;margin-top:3px;letter-spacing:.4px}
.meta{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;justify-content:center}
.controls{padding-top:18px;display:flex;align-items:center;justify-content:space-between}
.play{width:34px;height:34px;padding:0;border:1.5px solid rgba(227,192,106,.75);border-radius:3px;
  color:var(--gold);background:transparent;font-size:12px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center}
.play.playing{background:rgba(227,192,106,.16)}
.choose{font-size:11px;letter-spacing:2.5px;color:var(--blue);text-transform:uppercase;cursor:pointer;
  border:1.5px solid rgba(127,166,194,.7);background:rgba(127,166,194,.10);padding:10px 16px;border-radius:3px}
.choose:hover{background:rgba(127,166,194,.2)}

.tick{position:absolute;width:20px;height:20px;z-index:2;pointer-events:none;opacity:0;transition:opacity .4s ease}
.node.settled .tick{opacity:1}                   /* ticks bloom in on settle, fade out on selection (like the ball) */
.tick.tl{top:-14px;left:-14px;border-top:1.6px solid var(--gold);border-left:1.6px solid var(--gold)}
.tick.tr{top:-14px;right:-14px;border-top:1.6px solid var(--gold);border-right:1.6px solid var(--gold)}
.tick.bl{bottom:-14px;left:-14px;border-bottom:1.6px solid var(--gold);border-left:1.6px solid var(--gold)}
.tick.br{bottom:-14px;right:-14px;border-bottom:1.6px solid var(--gold);border-right:1.6px solid var(--gold)}

.ball{position:absolute;left:-30px;top:50%;transform:translateY(-50%);width:24px;height:24px;border-radius:50%;z-index:4;
  background:radial-gradient(circle at 50% 50%, #FCE9B8 0%, #E3C06A 55%, #B8933F 100%);
  box-shadow:0 0 12px 3px rgba(233,196,110,.6);opacity:0;transition:opacity .4s ease}
.node.settled .ball{opacity:1}   /* ball fades in on settle, fades out when the node leaves */

.under{position:absolute;left:0;right:0;top:calc(100% + 26px);display:flex;gap:16px;justify-content:center}  /* hangs just below the stack + bottom ticks; still inside the node so it travels/fades with it */
.minor{font-size:11px;letter-spacing:3px;text-transform:uppercase;color:var(--blue);cursor:pointer;
  border:1.5px solid rgba(127,166,194,.55);background:transparent;padding:9px 22px;border-radius:3px}
.minor:hover{background:rgba(127,166,194,.12)}

.end{position:fixed;inset:0;z-index:5;overflow:auto}   /* transparent: only the content glides; the darker bg is the crossfaded .bgend behind */
.bgend{position:fixed;inset:0;z-index:0;opacity:0;pointer-events:none;transition:opacity .5s ease;
  background:radial-gradient(110% 65% at 55% 24%, #113049 0%, #0C1926 44%, #05090f 100%)}  /* darker end look w/ a soft top spotlight; crossfaded in as the lines fade */
.end .inner{max-width:460px;margin:0 auto;position:relative;min-height:100%;padding-bottom:24px}
.pathwrap{position:relative;padding-top:22px}
svg.journey{display:block;width:100%;height:auto}   /* sizes by its (cropped) viewBox aspect -> no dead vertical space */
.copy{padding:0 34px}
.copy .lbl{font-size:12px;letter-spacing:2px;text-transform:uppercase;font-weight:600;color:var(--blue-dim);margin-bottom:4px}
.copy .big{font-size:23px;font-weight:500;line-height:1.32;color:var(--ink)}
.copy .group + .group{margin-top:22px}
.explorepanel{position:relative;margin:30px 24px 22px;border-radius:3px;padding:28px 40px 26px;text-align:center;
  background:rgba(18,28,37,.985);                /* same dark, squared, borderless card as the choices */
  box-shadow:0 0 30px rgba(233,190,88,.5), 0 0 66px rgba(233,190,88,.26)}  /* gold backlight */
.exblurb{color:#AEC3D0;font-size:14px;line-height:1.6;text-align:justify;-webkit-hyphens:auto;hyphens:auto}
.cta{display:inline-block;margin-top:18px;background:var(--gold);color:#10202b;font-weight:600;
  font-size:11px;letter-spacing:2px;text-transform:uppercase;padding:12px 18px;border-radius:3px;
  text-decoration:none;cursor:pointer}
.restart{display:block;margin:0 auto 34px;background:transparent;border:1px solid rgba(127,166,194,.5);
  color:var(--blue);border-radius:3px;padding:10px 20px;font-size:11px;letter-spacing:2px;
  text-transform:uppercase;cursor:pointer}
