:root{
  --bg:#0C0C0D; --surface:#151517; --surface2:#1C1C1F;
  --border:#26262A; --border-soft:#1F1F23;
  --text:#EAE6DE; --muted:#6A655D;
  --amber:#C8860A; --amber-soft:rgba(200,134,10,.16);
  --deep:#78301F;
  --green:#3E9E72; --red:#C0503E; --cream:#F2EDE3;
  --r:10px; --pad:22px;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);
  font-family:"DM Sans",-apple-system,system-ui,sans-serif;
  font-weight:300;font-size:15px;line-height:1.65;
  -webkit-font-smoothing:antialiased}
.wrap{max-width:900px;margin:0 auto;padding:0 var(--pad)}
.header{padding:30px 22px 18px;border-bottom:1px solid var(--border-soft);
  display:flex;align-items:flex-end;justify-content:space-between;
  flex-wrap:wrap;gap:14px;max-width:900px;margin:0 auto}
.logo{font-family:"DM Mono",ui-monospace,monospace;font-size:9px;
  letter-spacing:.3em;text-transform:uppercase;color:var(--amber);margin-bottom:7px}
.header h1{font-family:"Playfair Display",Georgia,serif;font-size:31px;
  font-weight:900;letter-spacing:-.015em;line-height:1.05;margin:0}
.mono{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.btn{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.18em;text-transform:uppercase;padding:9px 15px;
  border:1px solid var(--border);border-radius:var(--r);
  background:var(--surface);color:var(--text);cursor:pointer}
.btn:hover{border-color:var(--amber);color:var(--amber)}
.btn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.btn[disabled]{opacity:.45;cursor:default}
.np{margin:26px auto 0;max-width:900px;padding:0 var(--pad)}
.np-card{display:flex;gap:18px;align-items:center;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--r);padding:18px}
.np-art{width:84px;height:84px;border-radius:6px;object-fit:cover;
  background:var(--surface2);flex:none}
.np-meta{min-width:0;flex:1}
.np-title{font-family:"Playfair Display",Georgia,serif;font-size:22px;
  font-weight:900;line-height:1.15;margin:3px 0}
.np-artist{color:var(--muted);font-size:14px}
.live{color:var(--amber)}
.dot{display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--amber);margin-right:7px;vertical-align:middle;
  animation:pulse 2s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.dot{animation:none}}
.daygroup{margin-top:34px}
.dayhead{display:flex;align-items:baseline;gap:12px;
  padding-bottom:9px;border-bottom:1px solid var(--border-soft)}
.dayhead h2{font-family:"Playfair Display",Georgia,serif;font-size:17px;
  font-weight:900;margin:0}
.play{display:flex;gap:14px;align-items:center;padding:11px 0;
  border-bottom:1px solid var(--border-soft)}
.art{width:46px;height:46px;border-radius:5px;object-fit:cover;
  background:var(--surface2);flex:none}
.side{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  color:var(--amber);background:var(--amber-soft);border-radius:4px;
  padding:3px 7px;flex:none;min-width:34px;text-align:center}
.side.none{color:var(--muted);background:transparent}
.pmeta{min-width:0;flex:1}
.ptitle{font-size:15px;line-height:1.35;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.partist{color:var(--muted);font-size:13px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.ptime{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  color:var(--muted);flex:none;text-align:right}
.unid .ptitle{color:var(--muted);font-style:italic}
.controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;
  margin-top:22px}
.toggle{display:flex;align-items:center;gap:8px;cursor:pointer}
.foot{margin:44px auto 30px;max-width:900px;padding:16px var(--pad) 0;
  border-top:1px solid var(--border-soft);
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.1em;color:var(--muted);line-height:2}
.foot a{color:var(--muted)}
.empty{padding:40px 0;color:var(--muted)}
.play{cursor:pointer}
.play.open{border-bottom-color:transparent}
.detail{padding:4px 0 16px 60px;border-bottom:1px solid var(--border-soft)}
.detail .row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.detail .row + .row{margin-top:10px}
.btn.danger:hover{border-color:var(--red);color:var(--red)}
.libtools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:22px 0 4px}
.libtools input[type=search]{flex:1;min-width:160px;padding:9px 12px;font-size:15px;
  border:1px solid var(--border);border-radius:var(--r);
  background:var(--surface);color:var(--text);font-family:inherit}
.libtools select{padding:9px 10px;border:1px solid var(--border);
  border-radius:var(--r);background:var(--surface);color:var(--text);
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.14em;text-transform:uppercase}
.grid{display:grid;gap:18px;margin-top:22px;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.card .sleeve{width:100%;aspect-ratio:1;border-radius:6px;object-fit:cover;
  background:var(--surface2);display:block}
.card .ct{font-size:13px;line-height:1.35;margin-top:9px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card .ca{font-size:12px;color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card .cs{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.14em;color:var(--amber);margin-top:3px}
.card .cs.never{color:var(--muted)}
.lrow{display:flex;gap:14px;align-items:center;padding:11px 0;
  border-bottom:1px solid var(--border-soft)}
.lrow .sleeve{width:46px;height:46px;border-radius:5px;object-fit:cover;
  background:var(--surface2);flex:none}
.libcount{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-top:16px}
.card{position:relative}
.selecting .card{cursor:pointer}
.selecting .card .sleeve{transition:opacity .12s}
.card.sel .sleeve{outline:2px solid var(--amber);outline-offset:2px}
.card.sel .ct{color:var(--amber)}
.card .pick{position:absolute;top:7px;left:7px;width:22px;height:22px;
  border-radius:50%;background:rgba(12,12,13,.72);border:1px solid var(--border);
  display:none;align-items:center;justify-content:center;
  font-family:"DM Mono",ui-monospace,monospace;font-size:11px;color:var(--text)}
.selecting .card .pick{display:flex}
.card.sel .pick{background:var(--amber);color:#0C0C0D;border-color:var(--amber)}
.mergebar{position:sticky;bottom:0;margin-top:22px;padding:14px 16px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r);
  display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.mergebar .mb{flex:1;min-width:180px;font-size:14px}
.mergebar .mb small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.btn.go{border-color:var(--amber);color:var(--amber)}
.btn.go:hover{background:var(--amber);color:#0C0C0D}
.card .pick.keep{background:var(--amber);color:#0C0C0D;border-color:var(--amber)}
.periods{display:flex;gap:8px;margin:24px 0 6px;flex-wrap:wrap;justify-content:flex-end}
.periods .btn.on{border-color:var(--amber);color:var(--amber)}
.hero{display:grid;gap:20px;margin-top:26px;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.stat{background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r);padding:20px}
.stat .n{font-family:"Playfair Display",Georgia,serif;font-size:40px;
  font-weight:900;line-height:1;letter-spacing:-.02em}
.stat .n small{font-size:18px;color:var(--muted);font-weight:900}
.stat .l{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.18em;text-transform:uppercase;color:var(--muted);margin-top:9px}
.stat .sub{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.45}
.sec{margin-top:42px}
.sec h2{font-family:"Playfair Display",Georgia,serif;font-size:20px;
  font-weight:900;margin:0 0 4px}
.sec .note{color:var(--muted);font-size:13px;margin-bottom:16px}
.sidebar-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;
  align-items:center;gap:8px;height:100%}
.sidebar-col .bar{width:100%;background:var(--amber-soft);
  border:1px solid var(--amber);border-radius:5px 5px 0 0;min-height:3px}
.sidebar-col .lab{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  color:var(--muted)}
.sidebar-col .val{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  color:var(--amber)}
.toplist{display:flex;flex-direction:column;gap:2px}
.top{display:flex;gap:14px;align-items:center;padding:10px 0;
  border-bottom:1px solid var(--border-soft)}
.top .rank{font-family:"DM Mono",ui-monospace,monospace;font-size:12px;
  color:var(--muted);width:20px;flex:none;text-align:right}
.top .sleeve{width:52px;height:52px;border-radius:5px;object-fit:cover;
  background:var(--surface2);flex:none}
.top .meta{min-width:0;flex:1}
.top .t{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top .a{color:var(--muted);font-size:13px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.top .sp{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  color:var(--amber);flex:none;text-align:right}
.top .sp small{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.periods{justify-content:space-between;align-items:flex-start}
.pgroup{display:flex;gap:8px;flex-wrap:wrap}
.pgroup.right{justify-content:flex-end}
.sides.two .bar{border-radius:7px 7px 0 0}
.sides.two .lab{font-size:12px;letter-spacing:.06em}
.sides.two .val{font-size:14px}
.band{width:100%;padding:78px 22px}
.band .inner{max-width:900px;margin:0 auto}
.band.cream{background:var(--cream);color:#14100C}
.band.deep{background:var(--deep);color:var(--cream)}
.band.dark{background:var(--bg);color:var(--text)}
.band .kicker{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.3em;text-transform:uppercase;opacity:.62;margin-bottom:14px}
.band h2{font-family:"Playfair Display",Georgia,serif;font-size:44px;
  font-weight:900;letter-spacing:-.02em;line-height:1.02;margin:0 0 10px}
.band .big{font-family:"Playfair Display",Georgia,serif;font-size:120px;
  font-weight:900;line-height:.9;letter-spacing:-.03em;margin:6px 0 10px}
.band .say{font-size:16px;line-height:1.55;opacity:.78;max-width:34em}
.band .aside{font-style:italic;font-size:17px;margin-top:12px;opacity:.72}
.quad{display:grid;grid-template-columns:1fr 1fr;gap:34px 26px;margin-top:44px}
.quad .n{font-family:"Playfair Display",Georgia,serif;font-size:46px;
  font-weight:900;line-height:1}
.quad .l{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.2em;text-transform:uppercase;opacity:.6;margin-top:6px}
.split{display:flex;height:46px;border-radius:7px;overflow:hidden;margin:26px 0 14px}
.split div{display:flex;align-items:center;justify-content:center;
  font-family:"DM Mono",ui-monospace,monospace;font-size:12px}
.split .one{background:var(--amber);color:#14100C}
.split .two{background:rgba(242,237,227,.22);color:var(--cream)}
.hourlabels{display:flex;font-family:"DM Mono",ui-monospace,monospace;
  font-size:10px;opacity:.5;justify-content:space-between;max-width:100%}
.rank{display:flex;gap:16px;align-items:center;padding:14px 0;
  border-bottom:1px solid rgba(128,128,128,.18)}
.rank .no{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  opacity:.5;width:22px;flex:none}
.rank img{width:56px;height:56px;border-radius:5px;object-fit:cover;flex:none}
.rank .rm{flex:1;min-width:0}
.rank .rt{font-family:"Playfair Display",Georgia,serif;font-size:19px;
  font-weight:900;line-height:1.2}
.rank .ra{font-size:13px;opacity:.6;margin-top:2px}
.rank .rv{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  opacity:.6;flex:none;text-align:right}
.shelf{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.chip{display:flex;align-items:center;gap:10px;padding:7px 14px 7px 7px;
  background:rgba(128,128,128,.16);border-radius:30px;font-size:13px}
.chip img{width:30px;height:30px;border-radius:50%;object-fit:cover}
.ends{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:26px}
.ends .lab{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.2em;text-transform:uppercase;opacity:.55;margin-bottom:7px}
.ends .who{font-size:17px;line-height:1.35}
.ends .when{font-size:13px;opacity:.6;margin-top:4px}
@media (max-width:640px){
  .band{padding:52px 20px}
  .band .big{font-size:80px}
  .band h2{font-size:32px}
  .quad{grid-template-columns:1fr 1fr;gap:26px 18px}
  .ends{grid-template-columns:1fr}
}
.gv{width:34px;flex:none;text-align:right;
  font-family:"DM Mono",ui-monospace,monospace;font-size:11px;opacity:.55}
.band .inner{text-align:center}
.band .say,.band .aside{margin-left:auto;margin-right:auto}
.quad{text-align:center}
.quad .n{text-align:center}
.hourlabels{text-align:center}
.shelf{justify-content:center}
.ends{text-align:center}
.split{max-width:640px;margin-left:auto;margin-right:auto}
.rank{text-align:left}
.rank .rt,.rank .ra{text-align:left}
.gv{opacity:.8;font-weight:400}
.band.cream .gv{color:#14100C}
.hl{font-family:"DM Mono",ui-monospace,monospace;font-size:9px;opacity:.45;
  margin-top:6px;height:12px}
/* Bars need a flexible track above a fixed label row, or a percentage
   height has nothing stable to resolve against. */
.hl{flex:none}
/* Genre rows: constrain the whole block, not each row, so nothing escapes
   the band. */
.genre-row{max-width:none;width:100%}
.genrewrap{max-width:620px;margin:26px auto 0}
.setgroup{margin-top:36px}
.setgroup h3{font-family:"Playfair Display",Georgia,serif;font-size:19px;
  font-weight:900;margin:0 0 4px}
.setgroup .hint{color:var(--muted);font-size:13px;margin-bottom:16px;max-width:44em}
.setrow{display:flex;gap:16px;align-items:center;padding:13px 0;
  border-bottom:1px solid var(--border-soft);flex-wrap:wrap}
.setrow .sl{flex:1;min-width:180px}
.setrow .sn{font-size:15px}
.setrow .sd{color:var(--muted);font-size:12.5px;margin-top:2px;line-height:1.45}
.setrow select,.setrow input[type=text],.setrow input[type=number]{
  padding:9px 11px;font-size:15px;font-family:inherit;
  border:1px solid var(--border);border-radius:var(--r);
  background:var(--surface);color:var(--text);min-width:180px}
.setrow input[type=checkbox]{width:20px;height:20px;accent-color:var(--amber)}
.savebar{position:sticky;bottom:0;margin-top:30px;padding:14px 0;
  background:var(--bg);border-top:1px solid var(--border-soft);
  display:flex;gap:12px;align-items:center}
.savebar .msg{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.savebar .msg.ok{color:var(--green)}
.setgroup{margin-top:36px}
.setgroup h3{font-family:"Playfair Display",Georgia,serif;font-size:19px;
  font-weight:900;margin:0 0 4px}
.setgroup .hint{color:var(--muted);font-size:13px;margin-bottom:16px;max-width:44em}
.setrow{display:flex;gap:16px;align-items:center;padding:13px 0;
  border-bottom:1px solid var(--border-soft);flex-wrap:wrap}
.setrow .sl{flex:1;min-width:180px}
.setrow .sn{font-size:15px}
.setrow .sd{color:var(--muted);font-size:12.5px;margin-top:2px;line-height:1.45}
.setrow select,.setrow input[type=text],.setrow input[type=number]{
  padding:9px 11px;font-size:15px;font-family:inherit;
  border:1px solid var(--border);border-radius:var(--r);
  background:var(--surface);color:var(--text);min-width:180px}
.setrow input[type=checkbox]{width:20px;height:20px;accent-color:var(--amber)}
.savebar{position:sticky;bottom:0;margin-top:30px;padding:14px 0;
  background:var(--bg);border-top:1px solid var(--border-soft);
  display:flex;gap:12px;align-items:center}
.savebar .msg{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.savebar .msg.ok{color:var(--green)}

/* ---------- action hierarchy ----------
   Three weights, so a page reads at a glance: primary is the one thing
   this screen is for, quiet is everything else, destructive warns before
   it is pressed rather than after. */
.btn{transition:border-color .12s,color .12s,background .12s}
.btn.primary{border-color:var(--amber);color:#14100C;background:var(--amber)}
.btn.primary:hover{background:#E09A17;border-color:#E09A17;color:#14100C}
.btn.quiet{background:transparent;color:var(--muted)}
.btn.quiet:hover{color:var(--text);border-color:var(--border)}
.btn.danger{color:var(--red);border-color:rgba(192,80,62,.42)}
.btn.danger:hover{background:var(--red);border-color:var(--red);color:var(--cream)}
.btn:disabled,.btn[disabled]{opacity:.4;cursor:default}
.btn:disabled:hover{border-color:var(--border);color:var(--text);background:var(--surface)}

/* Keyboard users should always know where they are. */
.btn:focus-visible,a:focus-visible,select:focus-visible,
input:focus-visible,button:focus-visible{
  outline:2px solid var(--amber);outline-offset:2px}
input:focus,select:focus{border-color:var(--amber);outline:none}

/* Navigation is not a row of actions. Quiet links, with the current page
   marked, so the eye goes to the content rather than the chrome. */
.header .btn{background:transparent;border-color:transparent;color:var(--muted)}
.header .btn:hover{color:var(--text);border-color:var(--border)}
.header .btn.here{color:var(--amber);border-color:var(--border)}
.header .btn.primary{background:var(--amber);border-color:var(--amber);color:#14100C}
.header .btn.primary:hover{background:#E09A17;color:#14100C}

/* ---------- scale ----------
   Fluid type and a spacing ladder, so the same page reads at 390px and at
   1400px without a pile of one-off overrides. clamp() means the breakpoint
   below handles structure, not size. */
:root{
  --s1:8px; --s2:14px; --s3:22px; --s4:34px; --s5:52px; --s6:78px;
  --pad:clamp(16px,4vw,22px);
}
.band{padding:clamp(44px,9vw,78px) var(--pad)}
.band h2{font-size:clamp(26px,5.2vw,44px)}
.band .big{font-size:clamp(64px,15vw,120px)}
.band .say{font-size:clamp(15px,1.6vw,16px)}
.header h1{font-size:clamp(24px,5vw,31px)}
.quad .n{font-size:clamp(32px,7vw,46px)}
.stat .n{font-size:clamp(30px,8vw,40px)}
.rank .rt{font-size:clamp(16px,2.4vw,19px)}

/* ---------- structure at narrow widths ---------- */
@media (max-width:720px){
  /* The header is a title and a nav, not one wrapping row. */
  .header{flex-direction:column;align-items:stretch;gap:var(--s2);
    padding:22px var(--pad) 14px}
  .header > div:last-child{display:flex;gap:6px;flex-wrap:nowrap;
    overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;padding-bottom:2px}
  .header > div:last-child::-webkit-scrollbar{display:none}
  .header .btn{flex:none;padding:8px 12px}

  /* Settings read as label-above-control, which is what a narrow screen
     wants and what a keyboard expects. */
  .setrow{flex-direction:column;align-items:stretch;gap:var(--s1)}
  .setrow .sl{min-width:0}
  .setrow select,.setrow input[type=text],.setrow input[type=number],
  .setrow input[type=password]{width:100%;min-width:0}
  .setrow input[type=checkbox]{align-self:flex-start}

  /* Ranked rows keep the cover and the value; the meta takes what is left. */
  .rank{gap:10px;padding:11px 0}
  .rank img{width:44px;height:44px}
  .rank .no{width:16px;font-size:10px}
  .rank .rv{font-size:10px}

  .quad{gap:var(--s3) var(--s2)}
  .grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}
  .np-card{gap:12px;padding:14px}
  .np-art{width:64px;height:64px}
  .np-title{font-size:19px}
  .periods{gap:6px}
  .libtools{gap:8px}
  .libtools input[type=search]{width:100%;flex:1 1 100%}
  .sides.two{gap:32px;height:140px}
  .hours{height:110px}
  .ends{grid-template-columns:1fr;gap:var(--s3)}
  .foot{line-height:1.9}
}

/* Touch targets: a cursor can hit 20px, a thumb cannot. */
@media (hover:none){
  .btn{padding:11px 15px}
  .setrow input[type=checkbox]{width:24px;height:24px}
  .play,.lrow{padding:14px 0}
}

/* Navigation as one line that scrolls rather than a block that reflows:
   a bar that changes height as you move between pages is disorienting. */
.nav{display:flex;gap:6px;align-items:center}
@media (max-width:720px){
  .nav{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;margin:0 calc(var(--pad) * -1);
    padding:2px var(--pad) 4px}
  .nav::-webkit-scrollbar{display:none}
  .nav .btn{flex:0 0 auto;white-space:nowrap}
  .periods{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
    margin:0 calc(var(--pad) * -1);padding:0 var(--pad) 4px}
  .periods::-webkit-scrollbar{display:none}
  .pgroup{flex-wrap:nowrap}
  .pgroup .btn{flex:0 0 auto;white-space:nowrap}
}

/* The header is a flex row with two children; without min-width:0 the nav
   refuses to shrink below its content and pushes the page wider instead of
   scrolling inside itself. */
/* overflow-x on body clips full-bleed bands, so contain the nav instead:
   the scroll belongs to the strip, not the document. */
body{overflow-x:clip}
.header{max-width:900px;margin:0 auto;width:100%}
.header > div:first-child{min-width:0}
.nav{min-width:0;max-width:100%}
@media (max-width:720px){
  .header{flex-direction:column;align-items:stretch}
  .nav{width:100%;max-width:100%}
}

/* On a phone the scan button leaves the header entirely: it is the one
   thing you press while standing at the turntable, so it belongs where a
   thumb already is rather than at the top of a scrolling strip. */
@media (max-width:720px){
  .nav #scan{display:none}
  #scanfab{position:fixed;right:16px;bottom:16px;z-index:20;
    padding:14px 20px;border-radius:30px;
    background:var(--amber);color:#14100C;border:0;
    font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
    letter-spacing:.18em;text-transform:uppercase;
    box-shadow:0 6px 24px rgba(0,0,0,.45);cursor:pointer}
  #scanfab:disabled{opacity:.5}
  .foot{padding-bottom:80px}
}
@media (min-width:721px){ #scanfab{display:none} }

/* ---------- charts, consolidated ----------
   These were declared across five separate appends and were overriding each
   other. One block, so the cascade is legible. */
.sides{display:flex;align-items:flex-end;justify-content:center}
.sides.two{max-width:460px;margin:14px auto 0;gap:56px;height:170px}
.sides.two .bar{border-radius:7px 7px 0 0}
.sides.two .lab{font-size:12px;letter-spacing:.06em}
.sides.two .val{font-size:14px}

.hours{display:flex;align-items:flex-end;gap:3px;height:140px;
  max-width:720px;margin:22px auto 10px}
.hcol{flex:1;display:flex;flex-direction:column;justify-content:flex-end;
  height:100%;min-width:0}
.hcol .h{flex:0 0 auto;width:100%;
  background:rgba(234,230,222,.82);border-radius:2px 2px 0 0;min-height:2px}

@media (max-width:720px){
  .sides.two{gap:32px;height:140px}
  .hours{height:110px;gap:2px}
}
.fixbox{margin-top:12px;padding:14px;background:var(--surface2);
  border:1px solid var(--border);border-radius:var(--r)}
.fixbox input[type=search]{width:100%;padding:9px 11px;font-size:15px;
  font-family:inherit;border:1px solid var(--border);border-radius:var(--r);
  background:var(--surface);color:var(--text)}
.fixres{margin-top:10px;max-height:260px;overflow-y:auto}
.fixrow{display:flex;gap:10px;align-items:center;padding:8px;cursor:pointer;
  border-radius:6px}
.fixrow:hover{background:var(--surface)}
.fixrow img{width:38px;height:38px;border-radius:4px;object-fit:cover;
  background:var(--surface);flex:none}
.fixrow .ft{flex:1;min-width:0;font-size:13px;line-height:1.35}
.fixrow .fy{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  color:var(--muted);flex:none}
.fixnote{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  margin-top:10px}
.sidepick{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.secthead{font-family:"Playfair Display",Georgia,serif;font-size:22px;
  font-weight:900;margin:34px 0 4px}
.ptrack{color:var(--muted);opacity:.72}
.ptrack::before{content:"· "}
.splitlab{display:flex;justify-content:space-between;max-width:640px;
  margin:26px auto 6px;font-family:"DM Mono",ui-monospace,monospace;
  font-size:10px;letter-spacing:.18em;text-transform:uppercase;opacity:.6}
.split{margin-top:0}
.detrow{padding:10px 0;border-bottom:1px solid var(--border-soft)}
.detrow:last-child{border-bottom:0}

/* ---------- now playing bar ----------
   Appears only when a record is on, so its presence is itself the signal.
   Sits under the header rather than above it: sliding in above would shove
   the whole page down mid-scroll. */
#npbar{display:none;position:sticky;top:0;z-index:30;
  background:rgba(12,12,13,.92);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  animation:npin .32s cubic-bezier(.2,.7,.3,1)}
#npbar.on{display:block}
@keyframes npin{from{opacity:0;transform:translateY(-8px)}
                to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#npbar{animation:none}}
.npbar-in{max-width:900px;margin:0 auto;padding:9px var(--pad);
  display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit}
.npbar-art{width:38px;height:38px;border-radius:5px;object-fit:cover;
  background:var(--surface2);flex:none}
.npbar-meta{min-width:0;flex:1}
.npbar-t{font-size:14px;line-height:1.25;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.npbar-a{font-size:12px;color:var(--muted);overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.npbar-side{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  color:var(--amber);background:var(--amber-soft);border-radius:4px;
  padding:3px 7px;flex:none}
.npbar-live{display:flex;align-items:center;gap:6px;flex:none;
  font-family:"DM Mono",ui-monospace,monospace;font-size:9px;
  letter-spacing:.18em;text-transform:uppercase;color:var(--amber)}
@media (max-width:720px){
  .npbar-live span:last-child{display:none}
}
#npbar{background:var(--surface);border-bottom:1px solid var(--amber-soft);
  box-shadow:0 2px 18px rgba(0,0,0,.5)}
.fmeta{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  color:var(--muted);margin-top:2px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.frid{display:block;font-size:9px;opacity:.55;margin-top:2px}
.fixrow .ft{line-height:1.3}
#loose{margin-top:34px}
.loose-row{display:flex;gap:12px;align-items:center;padding:12px 0;
  border-bottom:1px solid var(--border-soft);flex-wrap:wrap}
.loose-meta{flex:1;min-width:200px}
.loose-was{font-size:14px}
.loose-sugg{font-size:13px;color:var(--amber);margin-top:3px}
.loose-none{font-size:13px;color:var(--muted);margin-top:3px}
.loose-acts{display:flex;gap:8px;flex:none}
.loosetoggle{display:flex;align-items:center;gap:10px;width:100%;
  background:none;border:0;padding:0;cursor:pointer;color:inherit;
  text-align:left;font-family:"Playfair Display",Georgia,serif;
  font-size:22px;font-weight:900;margin:34px 0 4px}
.loosetoggle .chev{display:inline-block;transition:transform .15s;
  color:var(--muted);font-size:18px}
.loosetoggle[aria-expanded="true"] .chev{transform:rotate(90deg)}
.loosecount{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.18em;color:var(--amber);background:var(--amber-soft);
  border-radius:20px;padding:3px 9px;font-weight:400}
.ownedtag{font-family:"DM Mono",ui-monospace,monospace;font-size:9px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--amber);
  background:var(--amber-soft);border-radius:20px;padding:2px 7px;
  margin-left:6px;white-space:nowrap}
.loose-maybe{color:var(--muted)}
.scanmsg{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);
  z-index:40;background:var(--surface);border:1px solid var(--border);
  border-radius:20px;padding:9px 16px;font-size:13px;color:var(--text);
  box-shadow:0 6px 24px rgba(0,0,0,.5);opacity:0;pointer-events:none;
  transition:opacity .18s}
.scanmsg.on{opacity:1}
@media (max-width:720px){.scanmsg{bottom:80px}}
/* Opacity on a floating button lets the page show through it. Dim the
   colours instead so it stays solid while it is working. */
#scanfab:disabled{opacity:1;background:#8A5E0A;color:rgba(20,16,12,.7)}
.btn.primary:disabled,.btn.primary[disabled]{opacity:1;
  background:#8A5E0A;border-color:#8A5E0A;color:rgba(20,16,12,.7)}

/* ---------- album panel ----------
   An overlay rather than a page: you often open several records in a row,
   and losing your place in the grid each time would make browsing tedious. */
#albumveil{position:fixed;inset:0;z-index:60;background:rgba(6,6,7,.72);
  backdrop-filter:blur(3px);display:none;overflow-y:auto;
  padding:40px 16px;-webkit-overflow-scrolling:touch}
#albumveil.on{display:block}
.albumcard{max-width:720px;margin:0 auto;background:var(--bg);
  border:1px solid var(--border);border-radius:14px;overflow:hidden;
  box-shadow:0 24px 70px rgba(0,0,0,.6)}
.albumhead{display:flex;gap:18px;padding:22px;align-items:flex-start;
  border-bottom:1px solid var(--border-soft)}
.albumhead img{width:132px;height:132px;border-radius:8px;object-fit:cover;
  background:var(--surface2);flex:none}
.albumhead .ah{flex:1;min-width:0}
.albumhead h2{font-family:"Playfair Display",Georgia,serif;font-size:26px;
  font-weight:900;line-height:1.12;margin:0 0 4px}
.albumhead .aa{font-size:16px;color:var(--muted)}
.albumhead .am{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.13em;text-transform:uppercase;color:var(--muted);
  margin-top:10px;line-height:1.7}
.albumclose{position:absolute;top:14px;right:16px;background:var(--surface);
  border:1px solid var(--border);color:var(--text);border-radius:50%;
  width:34px;height:34px;font-size:17px;cursor:pointer;line-height:1}
.albumwrap{position:relative;max-width:720px;margin:0 auto}
.albumstats{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;
  background:var(--border-soft)}
.albumstats div{background:var(--bg);padding:15px 12px;text-align:center}
.albumstats .n{font-family:"Playfair Display",Georgia,serif;font-size:24px;
  font-weight:900;line-height:1}
.albumstats .l{font-family:"DM Mono",ui-monospace,monospace;font-size:9px;
  letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin-top:5px}
.albumsec{padding:20px 22px;border-top:1px solid var(--border-soft)}
.albumsec h3{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.2em;text-transform:uppercase;color:var(--muted);margin:0 0 12px}
.tk{display:flex;gap:12px;padding:6px 0;font-size:14px;align-items:baseline}
.tk .tp{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;
  color:var(--muted);width:34px;flex:none}
.sidehead{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.2em;color:var(--muted);margin:14px 0 4px}
.sidehead:first-child{margin-top:0}
.cred{display:flex;gap:12px;padding:5px 0;font-size:13.5px}
.cred .cr{color:var(--muted);width:150px;flex:none;font-size:12px}
.albumnotes{font-size:13px;color:var(--muted);line-height:1.65;
  white-space:pre-wrap}
@media (max-width:640px){
  #albumveil{padding:16px 10px}
  .albumhead{flex-direction:column;gap:14px}
  .albumhead img{width:100%;height:auto;max-width:200px}
  .cred{flex-direction:column;gap:1px}
  .cred .cr{width:auto}
}
.card,.lrow{cursor:pointer}
.albumacts{display:flex;gap:10px;flex-wrap:wrap}
#unowned.on{border-color:var(--amber);color:var(--amber)}
.card.notowned .sleeve,.lrow.notowned .sleeve{opacity:.75}
.stylewrap{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;
  margin-top:26px;max-width:620px;margin-left:auto;margin-right:auto}
.stylechip{font-family:"DM Mono",ui-monospace,monospace;font-size:12px;
  letter-spacing:.06em;padding:7px 14px;border-radius:20px;
  border:1px solid var(--border);background:var(--surface)}

/* The search is the point of this panel, so it should look like it rather
   than a form field squeezed into a corner. */
.albumsec input[type=search]{width:100%;padding:14px 16px;font-size:16px;
  font-family:inherit;border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text);margin-top:4px}
.albumsec input[type=search]::placeholder{color:var(--muted)}
.albumsec .fixnote{font-family:inherit;font-size:13px;letter-spacing:0;
  text-transform:none;color:var(--muted);margin-top:10px;line-height:1.5}
.albumsec .fixres{margin-top:16px;max-height:52vh}
.albumsec .fixrow{padding:10px 8px;border-radius:8px}
.albumsec .fixrow img{width:46px;height:46px}
.albumsec .ft{font-size:14px}

/* ---------- confirm ----------
   The native dialog is the last thing that looks like the browser rather
   than the product, and on a phone it reads as an interruption. */
#askveil{position:fixed;inset:0;z-index:80;background:rgba(6,6,7,.7);
  backdrop-filter:blur(3px);display:none;align-items:center;
  justify-content:center;padding:20px}
#askveil.on{display:flex}
.askbox{max-width:420px;width:100%;background:var(--bg);
  border:1px solid var(--border);border-radius:14px;padding:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.6)}
.askbox h3{font-family:"Playfair Display",Georgia,serif;font-size:21px;
  font-weight:900;margin:0 0 10px;line-height:1.2}
.askbox p{font-size:14px;color:var(--muted);line-height:1.6;margin:0 0 20px}
.askacts{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}

/* ---------- confirm ----------
   The native dialog is the last thing that looks like the browser rather
   than the product, and on a phone it reads as an interruption. */
#askveil{position:fixed;inset:0;z-index:80;background:rgba(6,6,7,.7);
  backdrop-filter:blur(3px);display:none;align-items:center;
  justify-content:center;padding:20px}
#askveil.on{display:flex}
.askbox{max-width:420px;width:100%;background:var(--bg);
  border:1px solid var(--border);border-radius:14px;padding:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.6)}
.askbox h3{font-family:"Playfair Display",Georgia,serif;font-size:21px;
  font-weight:900;margin:0 0 10px;line-height:1.2}
.askbox p{font-size:14px;color:var(--muted);line-height:1.6;margin:0 0 20px}
.askacts{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}

/* ---------- device status ----------
   Six states, each with an obvious colour and an obvious behaviour. Worth
   settling here rather than in firmware: the physical device will need the
   same vocabulary, and getting it wrong in CSS is cheap. */
.devstat{display:inline-flex;align-items:center;gap:7px;
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  text-decoration:none}
.devstat .lamp{width:8px;height:8px;border-radius:50%;background:var(--muted);
  flex:none}
.devstat.playing .lamp{background:var(--amber);
  animation:lamppulse 2.4s ease-in-out infinite}
.devstat.playing{color:var(--amber)}
.devstat.idle .lamp{background:var(--green,#5B8C5A)}
.devstat.deaf .lamp{background:var(--red)}
.devstat.deaf{color:var(--red)}
.devstat.silent .lamp{background:transparent;
  box-shadow:inset 0 0 0 1px var(--border)}
.devstat.unclaimed .lamp{background:var(--amber);opacity:.45}
@keyframes lamppulse{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){
  .devstat.playing .lamp{animation:none}
}
.footbar{max-width:900px;margin:0 auto;padding:22px var(--pad) 40px;
  display:flex;gap:16px;align-items:center;justify-content:space-between;
  flex-wrap:wrap;border-top:1px solid var(--border-soft);margin-top:40px}
.footbar .foot{padding:0;margin:0;border:0;text-align:right;flex:1}
.grouphead{display:flex;align-items:center;gap:10px;width:100%;
  background:none;border:0;padding:14px 0;cursor:pointer;color:inherit;
  text-align:left;font-family:"Playfair Display",Georgia,serif;
  font-size:19px;font-weight:900;border-bottom:1px solid var(--border-soft)}
.grouphead .chev{display:inline-block;transition:transform .15s;
  color:var(--muted);font-size:16px}
.grouphead[aria-expanded="true"] .chev{transform:rotate(90deg)}
.groupbody{padding-top:6px}
.setgroup{margin-top:8px}
.sform{max-width:460px;margin:30px auto 60px}
.sform label{display:block;font-size:14px;margin:18px 0 6px}
.sform input[type=email],.sform input[type=password],.sform input[type=text]{
  width:100%;padding:13px 15px;font-size:16px;font-family:inherit;
  border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text)}
.sform .note{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.5}
.terms{background:var(--surface2);border:1px solid var(--border);
  border-radius:10px;padding:16px;margin-top:24px;font-size:13.5px;
  line-height:1.6;color:var(--muted);max-height:240px;overflow-y:auto}
.terms h4{color:var(--text);font-size:13px;margin:0 0 8px;
  font-family:"DM Mono",ui-monospace,monospace;letter-spacing:.14em;
  text-transform:uppercase}
.terms p{margin:0 0 10px}
.agreerow{display:flex;gap:10px;align-items:flex-start;margin-top:16px;
  font-size:14px;line-height:1.5}
.agreerow input{width:20px;height:20px;flex:none;margin-top:2px;
  accent-color:var(--amber)}
.sform{max-width:460px;margin:30px auto 60px}
.sform label{display:block;font-size:14px;margin:18px 0 6px}
.sform input[type=email],.sform input[type=password],.sform input[type=text]{
  width:100%;padding:13px 15px;font-size:16px;font-family:inherit;
  border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text)}
.sform .note{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.5}
.terms{background:var(--surface2);border:1px solid var(--border);
  border-radius:10px;padding:16px;margin-top:24px;font-size:13.5px;
  line-height:1.6;color:var(--muted);max-height:240px;overflow-y:auto}
.terms h4{color:var(--text);font-size:13px;margin:0 0 8px;
  font-family:"DM Mono",ui-monospace,monospace;letter-spacing:.14em;
  text-transform:uppercase}
.terms p{margin:0 0 10px}
.agreerow{display:flex;gap:10px;align-items:flex-start;margin-top:16px;
  font-size:14px;line-height:1.5}
.agreerow input{width:20px;height:20px;flex:none;margin-top:2px;
  accent-color:var(--amber)}
.grouphead{align-items:flex-start;gap:12px;padding:18px 0}
.ghead{display:flex;flex-direction:column;gap:3px;min-width:0}
.gname{font-family:"Playfair Display",Georgia,serif;font-size:19px;
  font-weight:900;line-height:1.2}
.gsub{font-family:"DM Sans",system-ui,sans-serif;font-size:13px;
  font-weight:400;color:var(--muted);line-height:1.5}
.grouphead .chev{margin-top:4px}
.setrow{padding:15px 0}
.setrow .sn{font-size:15px;font-weight:400}
.shelflink{color:var(--amber);text-decoration:none;border-bottom:1px solid
  rgba(200,134,10,.35)}
.shelflink:hover{border-bottom-color:var(--amber)}
.steps{display:flex;gap:8px;margin:26px 0 6px}
.steps span{flex:1;height:3px;border-radius:2px;background:var(--border)}
.steps span.on{background:var(--amber)}
.wstep{max-width:460px;margin:26px auto 60px}
.wstep h2{font-family:"Playfair Display",Georgia,serif;font-size:28px;
  font-weight:900;line-height:1.15;margin:0 0 12px}
.wstep p{font-size:15px;color:var(--muted);line-height:1.6;margin:0 0 22px}
.wstep input[type=text],.wstep select{width:100%;padding:13px 15px;
  font-size:16px;font-family:inherit;border:1px solid var(--border);
  border-radius:10px;background:var(--surface);color:var(--text)}
.wacts{display:flex;gap:12px;align-items:center;margin-top:26px;flex-wrap:wrap}
/* Played but not owned — a borrowed record, or one heard elsewhere. It has
   artwork and a tracklist like any other; it is just not on your shelf. */
.card.notowned .sleeve,.lrow.notowned .sleeve{opacity:.55}
.card.notowned::after,.lrow.notowned::after{content:"Not yours";
  position:absolute;top:8px;right:8px;
  font-family:"DM Mono",ui-monospace,monospace;font-size:8px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  background:rgba(12,12,13,.82);border-radius:20px;padding:3px 7px}
.lrow{position:relative}
.sitefoot{font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  letter-spacing:.12em;text-transform:uppercase;color:var(--muted);
  text-align:right;margin-top:8px;flex:1 1 100%}
.sitefoot a{color:var(--muted);text-decoration:none;
  border-bottom:1px solid var(--border)}
.sitefoot a:hover{color:var(--text)}
