:root{--brand:#f0a24a;--ink:#eef1f7;--muted:#a7b0c2;--bg:#0b1020;--down:#7dffa8;--up:#ffb36b;--glass:rgba(16,20,34,.52);--line:rgba(255,255,255,.12)}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit}
button{font:inherit;color:inherit}

/* header */
header.top{position:fixed;inset:0 0 auto 0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:16px 28px;background:linear-gradient(to bottom,rgba(8,10,20,.55),rgba(8,10,20,0));}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:.2px;text-decoration:none}
.brand-dot{width:10px;height:10px;border-radius:50%;background:var(--brand);box-shadow:0 0 12px var(--brand)}
header nav{display:flex;gap:6px}
header nav a{text-decoration:none;font-size:14px;color:var(--muted);padding:8px 12px;border-radius:8px;transition:color .2s,background .2s}
header nav a:hover{color:var(--ink);background:rgba(255,255,255,.06)}

/* hero */
.hero{position:relative;height:100vh;min-height:560px;overflow:hidden;background:#0b1020}
.room{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rain{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

/* player bar (bottom, slim, collapsible) — sits over the desk edge, clear of the cat lamp, mug and screen */
.bar{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:16px;width:max-content;max-width:calc(100% - 28px);padding:10px 12px 10px 10px;border-radius:16px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);box-shadow:0 18px 44px rgba(0,0,0,.35)}
.now{min-width:0}
.title{font-weight:700;font-size:15px;display:flex;align-items:center;gap:8px;white-space:nowrap}
.live{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.8px;color:#ff8a8a;border:1px solid rgba(255,120,120,.4);padding:1px 7px;border-radius:999px}
.live i{width:6px;height:6px;border-radius:50%;background:#ff6b6b;animation:blink 1.6s ease-in-out infinite}
@keyframes blink{50%{opacity:.25}}
.mood{font-size:12.5px;color:var(--muted);margin-top:1px;white-space:nowrap;font-variant-numeric:tabular-nums}
.extra{display:flex;align-items:center;gap:16px;padding-left:16px;border-left:1px solid var(--line)}
.btn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:rgba(255,255,255,.08);border-radius:10px;padding:9px 14px;cursor:pointer;font-weight:600;font-size:14px;text-decoration:none;transition:background .2s,border-color .2s}
.btn:hover{background:rgba(255,255,255,.14)}
.btn svg{width:16px;height:16px;fill:currentColor}
.play{background:var(--ink);color:#111;border-color:transparent;min-width:92px;justify-content:center}
.play:hover{background:#fff}
.play .i-pause{display:none}
.play[aria-pressed="true"] .i-pause{display:block}
.play[aria-pressed="true"] .i-play{display:none}
.nums .row{font-size:13px;display:flex;align-items:center;gap:7px;white-space:nowrap;font-variant-numeric:tabular-nums}
.row b{font-weight:700;min-width:3.4ch;text-align:right}
.dot{width:8px;height:8px;border-radius:50%}
.dot.down{background:var(--down);box-shadow:0 0 8px var(--down)}
.dot.up{background:var(--up);box-shadow:0 0 8px var(--up)}
.spark{display:block;width:180px;height:44px}
.spike svg{fill:var(--up)}
.vol{display:flex;align-items:center;gap:6px;color:var(--muted)}
.vol svg{width:16px;height:16px;fill:currentColor}
.vol input{width:90px;min-width:0;accent-color:var(--brand)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.fold{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:transparent;cursor:pointer;color:var(--muted);transition:transform .3s,color .2s}
.fold:hover{color:var(--ink)}
.fold svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.songs{display:flex;gap:4px}
.sbtn{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--ink);cursor:pointer;transition:background .2s,transform .2s}
.sbtn:hover{background:rgba(255,255,255,.16)}
.sbtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.sbtn.dice svg circle{fill:currentColor;stroke:none}
.sbtn.dice.roll{animation:roll .5s ease}
@keyframes roll{50%{transform:rotate(180deg) scale(1.1)}}
#songName{max-width:200px;overflow:hidden;text-overflow:ellipsis}
.bar[data-open="false"] .extra{display:none}
.bar[data-open="false"] .fold{transform:rotate(180deg)}

/* content sections */
.how{padding:110px 28px;background:linear-gradient(180deg,#0b1020,#111733)}
.how.alt{background:#0d1328}
.wrap{max-width:1040px;margin:0 auto}
.how h2{font-size:clamp(28px,4vw,42px);line-height:1.15;margin:0 0 14px;letter-spacing:-.5px}
.lede{font-size:18px;color:var(--muted);max-width:680px;margin:0 0 36px}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.card{padding:22px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.035);transition:transform .25s,box-shadow .25s}
.card h3{margin:0 0 8px;font-size:17px}
.card .ic{display:grid;place-items:center;width:64px;height:64px;margin-bottom:16px;border-radius:16px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16)}
.card .ic svg{width:36px;height:36px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.card p{margin:0;color:var(--muted);font-size:15px}
.note{margin-top:32px;color:var(--muted);font-size:15px}
.btn.ghost{margin-top:4px}
.foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:26px 28px;font-size:13px;color:var(--muted);border-top:1px solid var(--line);background:#0b1020}

@media (max-width:640px){
  header.top{padding:12px 16px}
  header nav a{padding:6px 8px;font-size:13px}
  header nav a:nth-child(3){display:none}
  .hero{height:100svh}
  .bar{bottom:12px;gap:10px;padding:8px}
  .bar[data-open="true"]{flex-wrap:wrap;width:calc(100% - 24px)}
  .bar[data-open="true"] .extra{order:3;width:100%;flex-wrap:wrap;gap:10px;padding:10px 0 0;border-left:0;border-top:1px solid var(--line)}
  .bar[data-open="true"] .now{flex:1}
  .spark{width:100%;height:40px}
  .vol{flex:1}.vol input{flex:1;width:auto}
  .bar[data-open="false"] .songs{display:none}
  #songName{max-width:140px}
}
@media (max-height:520px) and (orientation:landscape){
  .hero{min-height:0}
  .bar{bottom:8px;padding:6px 8px;gap:10px}
  .spark{width:120px;height:32px}
  .mood{display:none}
}
/* tall phones: frame the rack (the star) with the rainy window above him */
@media (max-aspect-ratio:3/4){.room{object-position:80% 50%}}
/* site-baseline v1 — set --brand to the site's primary colour */
section[id],main{scroll-margin-top:84px}
[tabindex="-1"]:focus{outline:none}
.totop{visibility:hidden;position:fixed;right:32px;bottom:32px;width:48px;height:48px;border-radius:50%;border:1.5px solid var(--brand,#111);background:rgba(14,18,32,.85);display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity .8s ease;z-index:30;cursor:pointer}
.totop.show{opacity:1;pointer-events:auto;visibility:visible}
.totop svg{width:20px;height:20px;fill:none;stroke:var(--brand,#111);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.totop:focus-visible{outline:2px solid var(--brand,#111);outline-offset:3px}
@media (max-width:560px){.totop{right:18px;bottom:18px}}
header{transition:transform .35s cubic-bezier(.22,1,.36,1)}
header.nav-hide{transform:translateY(-100%)}
.dots{position:fixed;right:22px;top:50%;transform:translateY(-50%);z-index:25;display:flex;flex-direction:column;gap:14px;transition:opacity .3s;color:#fff}
.dots.in-hero{opacity:0;pointer-events:none}
.dots a{position:relative;display:block;width:12px;height:12px;border-radius:50%;background:color-mix(in srgb,currentColor 22%,transparent);transition:transform .25s,background .25s}
.dots a.on{background:var(--brand,#111);transform:scale(1.35)}
.dots a::after{content:attr(data-label);position:absolute;right:22px;top:50%;transform:translateY(-50%) translateX(6px);white-space:nowrap;font-size:13px;font-weight:700;color:#fff;background:#111;padding:5px 10px;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
.dots a:hover::after,.dots a:focus-visible::after{opacity:1;transform:translateY(-50%)}
@media (max-width:760px){.dots{display:none}}

/* header button + modals (How it works, first-visit welcome) */
.navbtn{font:inherit;font-size:14px;color:var(--muted);background:rgba(255,255,255,.06);border:1px solid var(--line);padding:8px 14px;border-radius:999px;cursor:pointer;transition:color .2s,background .2s}
.navbtn:hover{color:var(--ink);background:rgba(255,255,255,.12)}
.modal{width:min(960px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:36px 32px 28px;border-radius:20px;border:1px solid var(--line);background:rgba(14,18,34,.92);color:var(--ink);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 30px 80px rgba(0,0,0,.5)}
.modal::backdrop{background:rgba(5,8,18,.55);backdrop-filter:blur(3px)}
.modal[open]{animation:mIn .45s cubic-bezier(.22,1,.36,1)}
@keyframes mIn{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
.modal h2{font-size:clamp(26px,3.4vw,38px);line-height:1.15;margin:0 0 12px;letter-spacing:-.5px;padding-right:44px}
.welcome h2{padding-right:0}
.modal .lede{font-size:17px;color:var(--muted);max-width:680px;margin:0 0 26px}
.modal .note{margin:24px 0 0;color:var(--muted);font-size:14px}
.mclose{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--ink);display:grid;place-items:center;cursor:pointer}
.mclose svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.welcome{width:min(520px,calc(100% - 32px));text-align:center;padding:40px 32px 30px}
.welcome .lede{margin:0 auto 26px}
.wicon{width:76px;height:76px;margin:0 auto 18px;border-radius:22px;display:grid;place-items:center;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16)}
.wicon svg{width:40px;height:40px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wbtns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.wplay{background:var(--ink);color:#111;border-color:transparent;padding:12px 20px;font-size:15px}
.wplay:hover{background:#fff}
.linkbtn{margin-top:18px;background:none;border:0;color:var(--muted);font:inherit;font-size:14px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
@media (max-width:640px){.modal{padding:28px 18px 20px}.modal .cards{grid-template-columns:1fr}}
/* glassmorphic modals with glare (Adam TG 18656) */
.modal{background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.05) 45%,rgba(255,255,255,.08));border:1px solid rgba(255,255,255,.3);backdrop-filter:blur(26px) saturate(1.7);-webkit-backdrop-filter:blur(26px) saturate(1.7);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -1px 0 rgba(255,255,255,.08),0 30px 80px rgba(0,0,0,.45);overflow:hidden auto}
.modal::backdrop{background:rgba(5,8,18,.28);backdrop-filter:blur(2px)}
.modal::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(115deg,rgba(255,255,255,.26) 0%,rgba(255,255,255,.08) 16%,transparent 34%),radial-gradient(120% 60% at 0% 0%,rgba(255,255,255,.18),transparent 60%)}
.modal::after{content:"";position:absolute;top:-60%;left:-40%;width:35%;height:220%;pointer-events:none;transform:rotate(22deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);animation:glare 6s ease-in-out 1s infinite}
@keyframes glare{0%{left:-40%}35%,100%{left:130%}}
.modal > *{position:relative;z-index:1}
.modal .mclose{position:absolute}
.modal .card{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}
.wicon{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.35);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
.welcome .btn:not(.wplay){background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.3)}
/* How-it-works modal: balanced 2x2, icon beside text, close button tucked inside */
#howModal{width:min(880px,calc(100% - 32px));padding:40px 36px 30px}
#howModal .cards{grid-template-columns:repeat(2,1fr);gap:14px}
#howModal .card{display:grid;grid-template-columns:56px 1fr;column-gap:16px;align-items:start;padding:20px}
#howModal .card .ic{width:56px;height:56px;margin:0;grid-row:span 2;border-radius:14px}
#howModal .card .ic svg{width:30px;height:30px}
#howModal .card h3{margin:4px 0 6px}
#howModal .mclose{top:18px;right:18px;background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.3)}
@media (max-width:640px){#howModal{padding:30px 18px 20px}#howModal .cards{grid-template-columns:1fr}}
.modal h2,.modal .lede,.modal .card p,.modal .note{text-shadow:0 1px 8px rgba(0,0,0,.45)}
/* Adam TG 18675/18676: white text in the glass modals, no scrollbars */
.modal .lede,.modal .card p,.modal .note,.welcome .lede{color:rgba(255,255,255,.92)}
.modal,html{scrollbar-width:none}
.modal::-webkit-scrollbar,html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}
/* phone player fixes (Adam TG 13648/13649): text never runs under the buttons or the stats */
.now{overflow:hidden}
.title{min-width:0}
#songName{min-width:0;overflow:hidden;text-overflow:ellipsis}
.live{flex:none}
.mood{overflow:hidden;text-overflow:ellipsis}
@media (max-width:640px){
  #songName{max-width:none}
  .bar[data-open="true"] .now{order:2;flex:1 1 100%}
  .bar[data-open="true"] .mood{white-space:normal}
  .bar .fold{margin-left:auto}
  .bar[data-open="false"] .now{flex:1}
}
@media (max-height:520px) and (orientation:landscape){
  .now{flex:0 1 220px;min-width:130px}
  .spark,.vol{display:none}
}
