/* Keys2Guitar game: full-screen visualiser like the videos, everything else floats over it */
:root{--ink:#fff4dc;--muted:rgba(255,244,220,.68);--gold:#f5b942;--red:#ff6f61;--green:#3ee6a8;--teal:#2ec4b6;--bg:#0d0907}
*{box-sizing:border-box;margin:0}
html,body{height:100%;background:#060404;color:var(--ink);font:500 16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%;overflow:hidden}
button{font:inherit;color:inherit;cursor:pointer;background:none;border:0;padding:0}
a{color:inherit}
.screen{position:relative;height:100vh;height:100dvh;max-width:480px;margin:0 auto;overflow:hidden;background:var(--bg)}
@media (min-width:520px){.screen{box-shadow:0 0 0 1px rgba(255,244,220,.06),0 0 80px rgba(0,0,0,.8)}}
#cv{position:absolute;inset:0;width:100%;height:100%;display:block}
.sh{text-shadow:0 1px 3px rgba(0,0,0,.8)}

/* top bar: icons straight on the video, like TikTok */
.bar{position:absolute;top:0;left:0;right:0;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:calc(10px + env(safe-area-inset-top)) 10px 8px 12px;background:linear-gradient(rgba(0,0,0,.55),rgba(0,0,0,0))}
.ib{display:flex;align-items:center;gap:7px;min-width:38px;height:38px;justify-content:center;color:var(--ink);filter:drop-shadow(0 1px 2px rgba(0,0,0,.7))}
.ib svg{width:22px;height:22px;fill:currentColor}
.ib[hidden]{display:none}
#homeBtn{justify-content:flex-start}
#homeBtn img{width:30px;height:30px}
.wm{font-weight:800;font-size:19px;letter-spacing:-.02em}
.wm i,.cname i{font-style:normal;color:var(--gold)}
#dayNo{display:none}
.tools{display:flex;gap:2px}
.volpop{position:absolute;right:12px;top:calc(54px + env(safe-area-inset-top));background:rgba(10,7,5,.85);backdrop-filter:blur(8px);padding:12px 14px;border-radius:999px}
.volpop[hidden]{display:none}
#volume{width:150px;accent-color:var(--gold);display:block}

/* play button: like a paused video */
.bigplay{position:absolute;left:50%;top:34%;transform:translate(-50%,-50%);z-index:3;width:76px;height:76px;border-radius:50%;background:rgba(0,0,0,.38);backdrop-filter:blur(2px);display:grid;place-items:center;transition:opacity .2s}
.bigplay svg{width:40px;height:40px;fill:#fff;margin-left:5px;filter:drop-shadow(0 2px 6px rgba(0,0,0,.6))}
.bigplay.playing{opacity:0;pointer-events:none}

/* bottom dock over the video */
.dock{position:absolute;left:0;right:0;bottom:0;z-index:4;padding:40px 12px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.72) 38%,rgba(0,0,0,.88))}
.hint{color:var(--gold);font-weight:700;margin:0 4px 6px;text-shadow:0 1px 3px rgba(0,0,0,.8)}
.tags{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px;margin:0 2px 8px}
.tags:empty,.tags[hidden]{display:none}
.tags li{font-size:14px;font-weight:600;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.12);backdrop-filter:blur(6px);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tags li.wrong{background:rgba(255,111,97,.26)}
.tags li.wrong::before{content:"✕ ";color:#ffb0a8}
.tags li.right{background:rgba(62,230,168,.28)}
.tags li.right::before{content:"✓ ";color:#bfffe6}
.tags li.skip{color:var(--muted)}
.clue{font-size:14.5px;color:var(--muted);margin:0 4px 8px;text-shadow:0 1px 3px rgba(0,0,0,.8)}
.clue b{color:var(--ink);font-weight:700}
.clue:empty{display:none}
.pips{display:inline-flex;gap:3px;margin-right:8px;vertical-align:1px}
.pip{width:14px;height:4px;border-radius:2px;background:rgba(255,255,255,.22);display:block}
.pip.cur{background:var(--gold)}
.pip.wrong{background:var(--red)}.pip.skip{background:rgba(255,255,255,.5)}.pip.right{background:var(--green)}

/* comment-style guess bar */
#playArea{position:relative}
#playArea[hidden]{display:none}
.cbar{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.12);backdrop-filter:blur(10px);border-radius:999px;padding:4px 4px 4px 6px}
.cbar:focus-within{background:rgba(255,255,255,.17)}
.skip{flex:none;font-size:14px;font-weight:700;color:var(--muted);padding:8px 10px;border-radius:999px}
.skip:hover{color:var(--ink)}
#skipMore{display:none}
#guess{flex:1;min-width:0;height:40px;background:transparent;border:0;color:var(--ink);font:inherit;font-size:16px;outline:0}
#guess::placeholder{color:rgba(255,244,220,.5)}
.send{flex:none;width:40px;height:40px;border-radius:50%;background:var(--gold);display:grid;place-items:center}
.send svg{width:19px;height:19px;fill:#1a1208;margin-left:2px}
.sugg{position:absolute;left:0;right:0;bottom:calc(100% + 8px);list-style:none;padding:6px;margin:0;background:rgba(18,13,10,.96);backdrop-filter:blur(12px);border-radius:14px;max-height:42vh;overflow:auto;box-shadow:0 -10px 30px rgba(0,0,0,.5)}
.sugg[hidden]{display:none}
.sugg li{padding:10px;border-radius:9px;cursor:pointer;font-size:15px}
.sugg li small{color:var(--muted)}
.sugg li[aria-selected=true],.sugg li:hover{background:rgba(245,185,66,.16)}
.dup{color:#ffb0a8;font-size:14px;margin:0 6px 6px}
.dup:empty{display:none}

/* result, sitting over the video */
.result{text-align:left;padding:0 4px}
.result[hidden]{display:none}
.rlabel{font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.rlabel.win{color:var(--green)}.rlabel.lose{color:var(--red)}
.result h2{font-size:26px;line-height:1.15;margin:2px 0;text-shadow:0 2px 6px rgba(0,0,0,.8)}
.rmeta{color:var(--muted);font-size:14.5px}
#rChords{color:var(--gold);font-weight:600}
.ract{display:flex;gap:8px;margin:12px 0 4px}
.ract .pill{flex:1}
.small{color:var(--muted);font-size:13px;min-height:0}
.small:empty{display:none}
.next{color:var(--muted);font-size:13.5px;margin-top:8px}
.next b{color:var(--ink);font-variant-numeric:tabular-nums}
.next a{color:var(--muted)}

/* buttons */
.pill{height:46px;padding:0 20px;border-radius:999px;font-weight:700;font-size:16px;display:inline-flex;align-items:center;justify-content:center}
.pill.gold{background:var(--gold);color:#1a1208}
.pill.ghost{background:rgba(255,255,255,.13);backdrop-filter:blur(8px);color:var(--ink)}
.pill.wide{width:100%}
.pill:active,.send:active{transform:scale(.97)}
:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

/* start cover: like a video thumbnail before you tap */
.cover{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 20px calc(24px + env(safe-area-inset-bottom));background:radial-gradient(90% 60% at 50% 40%,rgba(22,15,11,.9),rgba(6,4,4,.97))}
.cover[hidden]{display:none}
.clogo{width:120px;height:120px;filter:drop-shadow(0 8px 20px rgba(0,0,0,.6))}
.cname{font-size:30px;font-weight:800;letter-spacing:-.02em;margin-top:14px}
.csub{color:var(--muted);margin-top:2px}
.cplay{width:min(240px,100%);margin-top:24px;height:52px;font-size:18px}
.cmeta{color:rgba(255,244,220,.55);font-size:14px;margin-top:16px}
.cmeta b{color:var(--ink)}
.clinks{margin-top:10px;color:var(--muted);font-size:14.5px}
.clinks a,.lk{color:var(--ink);font-weight:600;text-decoration:none}
.cfoot{position:absolute;bottom:calc(16px + env(safe-area-inset-bottom));display:flex;gap:16px;font-size:13px}
.cfoot a{color:rgba(255,244,220,.5);text-decoration:none}

/* sheets */
dialog.sheet{position:fixed;margin:auto auto 0;width:100%;max-width:480px;border:0;border-radius:18px 18px 0 0;background:rgba(18,13,10,.97);color:var(--ink);padding:10px 20px calc(20px + env(safe-area-inset-bottom));max-height:85dvh;overflow:auto}
dialog.sheet::before{content:"";display:block;width:38px;height:4px;border-radius:2px;background:rgba(255,255,255,.25);margin:0 auto 14px}
dialog.sheet::backdrop{background:rgba(0,0,0,.55)}
dialog.sheet[open]{animation:up .22s ease-out}
@keyframes up{from{transform:translateY(30px);opacity:.4}to{transform:none;opacity:1}}
.sheet h3{font-size:20px;margin-bottom:8px}
.sheet h4{font-size:13px;margin:16px 0 8px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.sheet p{color:rgba(255,244,220,.82);margin-bottom:10px}
.sheet .fine{font-size:13.5px;color:var(--muted)}
.sheet form{margin-top:14px}
.eg{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0 12px}
.eg .t{font-size:14px;font-weight:600;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.12)}
.eg .t.r{background:rgba(255,111,97,.26)}.eg .t.g{background:rgba(62,230,168,.28)}.eg .t.s{color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(4,1fr);text-align:center}
.stats b{display:block;font-size:26px}
.stats span{font-size:12px;color:var(--muted)}
.dist{display:flex;align-items:center;gap:8px;margin:5px 0;font-size:13px}
.dist i{font-style:normal;width:14px;color:var(--muted)}
.dist div{background:rgba(255,255,255,.14);border-radius:999px;padding:2px 9px;min-width:26px;text-align:right;font-weight:700}
.dist div.hl{background:var(--gold);color:#1a1208}
@media (prefers-reduced-motion:reduce){dialog.sheet[open]{animation:none}.bigplay{transition:none}}
