:root {
  color-scheme: dark;
  --bg: #05070d; --panel: #0e1626e6; --panel2: #121d33f2; --line: #3d5480; --line2: #24324d;
  --text: #b9c6d8; --dim: #7d8ca3; --hi: #fff; --link: #6cb6ff; --accent: #5fa8ff; --go: #3fcf5a;
  --chrome: linear-gradient(#fff, #dfe6ee 45%, #b9c5d2 55%, #e8eef4);
  --fs: clamp(12px, 2.3cqh, 22px);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Verdana, Tahoma, sans-serif; overflow: hidden; }
a { color: var(--link); }
code, kbd { font-family: Consolas, monospace; color: #dbe6f5; }
kbd { border: 1px solid var(--line); background: #0c1220; padding: 0 .35em; border-radius: 3px; }
button, select, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* The game screen: 16:9, as large as the window allows. Menus size their text from its height. */
.app { height: 100dvh; display: grid; place-items: center; }
.screen { position: relative; width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden;
  container-type: size; font-size: var(--fs);
  background:
    radial-gradient(ellipse 38% 26% at 50% 30%, rgb(70 120 220 / .18), transparent 70%),
    radial-gradient(ellipse 22% 60% at 12% 0%, rgb(95 168 255 / .05), transparent 70%),
    radial-gradient(ellipse 22% 60% at 88% 0%, rgb(255 120 200 / .04), transparent 70%),
    radial-gradient(1px 1px at 18% 22%, #fff, transparent), radial-gradient(1px 1px at 33% 12%, #cfe, transparent),
    radial-gradient(1px 1px at 64% 18%, #fff, transparent), radial-gradient(1px 1px at 81% 26%, #cfe, transparent),
    radial-gradient(1px 1px at 9% 40%, #fff, transparent), radial-gradient(1px 1px at 93% 44%, #fff, transparent),
    linear-gradient(#070b16, #04060b 60%); }
/* Phones held upright and other tall windows: use the whole window. */
@media (max-aspect-ratio: 4 / 3) { .screen { width: 100vw; height: 100dvh; aspect-ratio: auto; } }
.screen.sp { background-color: #04101c; box-shadow: inset 0 0 120px rgb(63 200 255 / .18); }
.screen:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }
/* Beat pulse: only this layer's opacity changes, which the browser composites without repainting. */
.glow { position: absolute; inset: 0; opacity: 0; pointer-events: none; will-change: opacity;
  background: radial-gradient(ellipse 38% 26% at 50% 30%, rgb(70 120 220 / .22), transparent 70%),
    radial-gradient(ellipse 22% 60% at 12% 0%, rgb(95 168 255 / .12), transparent 70%),
    radial-gradient(ellipse 22% 60% at 88% 0%, rgb(255 120 200 / .10), transparent 70%); }
.screen.menus .glow { display: none; }
canvas#highway { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* The song's own background (Settings → Video backgrounds), dimmed so the highway stays readable. */
.songbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000 center / cover no-repeat; filter: brightness(var(--bg-bright, .5)) saturate(.9); pointer-events: none; }
.screen.menus .songbg { visibility: hidden; }
.screen:has(.songbg:not([hidden])) .glow { display: none; }
.screen.menus canvas#highway { visibility: hidden; }

/* ---------------------------------------------------------------- HUD */
.hud { position: absolute; inset: 0; pointer-events: none; font-family: "Arial Black", Verdana, sans-serif; color: #fff; text-shadow: 0 2px 4px #000; }
.hud .lbl { position: absolute; font: 700 9px Verdana, sans-serif; letter-spacing: .18em; color: #9fb2cc; }
.rock { position: absolute; right: 5.5%; bottom: 25%; width: 13%; aspect-ratio: 220 / 130; }
.rock canvas { width: 100%; height: 100%; }
.rock .lbl { left: 0; right: 0; bottom: -12px; text-align: center; }
.scorebox { position: absolute; right: 2.5%; bottom: 6%; width: 19%; padding: 6px 12px 8px; border: 2px solid #9aa9b9; border-radius: 10px; background: linear-gradient(#1a2436ee, #0c1220ee); box-shadow: 0 0 0 1px #000, 0 6px 18px #000a; text-align: right; }
/* Full-combo mark and personal-best tracker (Settings → Customize) */
.scorebox .fcmark { display: none; position: absolute; left: 10px; top: 6px; padding: 0 .45em; border-radius: 6px; background: linear-gradient(#ffe9a0, #e0a820); color: #3a2a00; font: 900 clamp(10px, 2cqh, 14px) "Arial Black", sans-serif; text-shadow: none; }
.scorebox.fc { border-color: #ffd66b; box-shadow: 0 0 0 1px #000, 0 0 16px #ffd66b66, 0 6px 18px #000a; }
.scorebox.fc .fcmark { display: block; }
.scorebox .pb { display: block; min-height: 1.1em; font: 700 clamp(9px, 1.9cqh, 13px) Verdana, sans-serif; color: #9fb2cc; }
.scorebox .pb.ahead { color: #7dff9a; } .scorebox .pb.behind { color: #ff8a93; }
.scorebox b { display: block; font-size: clamp(16px, 4.6cqh, 30px); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.scorebox .streak { display: block; min-height: 1.2em; font: 700 clamp(10px, 2.1cqh, 14px) Verdana, sans-serif; color: #cfe0f5; }
.stars { display: flex; justify-content: flex-end; gap: 3px; height: clamp(12px, 2.8cqh, 20px); }
.stars span { position: relative; aspect-ratio: 1; height: 100%; background: url("assets/tex/star-empty.webp") center/contain no-repeat; }
.stars span i { position: absolute; inset: 0; background: url("assets/tex/star-fill.webp") center/contain no-repeat; clip-path: inset(calc(100% - var(--f, 0%)) 0 0 0); }
/* The ring fills while a star is being earned; an earned star is a solid silver star (gold for a gold run). */
.stars span.full { background-image: url("assets/tex/star-gold.webp"); filter: grayscale(1) brightness(1.7) drop-shadow(0 0 3px #fff8); }
.stars span.full i { display: none; }
.stars.gold span.full { filter: drop-shadow(0 0 4px #ffd66b); }
.callout { position: absolute; left: 0; right: 0; top: 12.5%; text-align: center; font-size: clamp(16px, 5.4cqh, 36px); letter-spacing: .04em; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; color: #fff; -webkit-text-stroke: 1px #000; }
.callout.show { opacity: 1; transform: scale(1); }
/* Solo box (sections marked as solos): hit percentage and count, then the rating and the bonus. */
.solo { position: absolute; left: 50%; top: 21.5%; transform: translateX(-50%); min-width: 15cqw; padding: .5cqh 1.6cqw .9cqh; display: grid; justify-items: center;
  border-radius: 14px; border: 2px solid #8cc7ff; background: linear-gradient(#10264acc, #081428e6); box-shadow: 0 0 2cqh #2f6fd877, 0 .6cqh 2cqh #000a;
  font-family: "Arial Black", Verdana, sans-serif; color: #fff; text-shadow: 0 2px 4px #000; transition: opacity .25s, transform .25s; }
.solo small { font: 900 1.5cqh Verdana, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #8cc7ff; }
.solo b { font-size: 5.4cqh; line-height: 1.05; font-variant-numeric: tabular-nums; }
.solo span { font: 700 2cqh Verdana, sans-serif; color: #cfe0f5; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.solo.fade { opacity: 0; transform: translateX(-50%) scale(.9); }
.solo.result b { font-size: 4.6cqh; }
.solo.perfect { border-color: #ffd66b; box-shadow: 0 0 2.4cqh #ffd66b88, 0 .6cqh 2cqh #000a; }
.solo.perfect b, .solo.perfect small { color: #ffe08a; }
.solo.messy { border-color: #ff7a85; box-shadow: 0 0 2cqh #ff404866, 0 .6cqh 2cqh #000a; }
.solo.messy b, .solo.messy small { color: #ffb3b9; }
.solo.bre:not(.result) { border-color: #ff9a3c; box-shadow: 0 0 2.4cqh #ff7a1a77, 0 .6cqh 2cqh #000a; }
.solo.bre:not(.result) small { color: #ffb36b; }
.callout.sp { color: #7fe8ff; text-shadow: 0 0 18px #3fc8ff, 0 2px 4px #000; }
/* Lyrics bar (YARG / Clone Hero style): the current line, sung syllables lit. */
.lyrics { position: absolute; left: 50%; top: 3.5%; transform: translateX(-50%); max-width: 70%; min-width: 30%; padding: .35em 1.2em;
  border-radius: 8px; background: #05080fcc; border: 1px solid #ffffff1f; text-align: center; font: 700 clamp(13px, 3.6cqh, 26px)/1.25 Verdana, sans-serif;
  color: #8a97ab; text-shadow: 0 2px 3px #000; transition: opacity .2s; }
.lyrics p { margin: 0; white-space: pre-wrap; }
.lyrics .sung { color: #fff; }
.lyrics .now { color: #7fe8ff; }
.lyrics.next p { opacity: .55; }
.lyrics.off { opacity: 0; }
.practicetag { position: absolute; left: 2.5%; top: 3%; padding: .3em .9em; border-radius: 99px; background: #0a1120d9; border: 1px solid #ffd23b;
  color: #ffe08a; font: 700 clamp(11px, 2.1cqh, 15px) Verdana, sans-serif; text-shadow: none; }
.fps { position: absolute; left: 1%; top: 1.2%; font: 600 12px Consolas, monospace; color: #9fe0a8; text-shadow: 0 1px 2px #000; }
.help.warn { color: #ffd66b; }
.progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #0c1220; }
.progress i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; will-change: transform; background: linear-gradient(90deg, #5fa8ff, #b6e0ff); }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font: 900 22cqh "Arial Black", Verdana, sans-serif; color: #fff; text-shadow: 0 0 30px #5fa8ff, 0 6px 12px #000; pointer-events: none; }

/* ---------------------------------------------------------------- shared menu parts (Studio look) */
.menu { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 3cqh 3cqw 2.2cqh; gap: 1.6cqh; isolation: isolate; overflow: hidden;
  background: linear-gradient(90deg, #04070ef5, #04070ee6 55%, #04070ebf); }
/* The selected song's art, huge and blurred, tints the screen behind the menu. */
.menu > .tint { position: absolute; inset: -10%; z-index: -1; pointer-events: none; opacity: .5; transition: opacity .4s;
  background: radial-gradient(circle at 72% 30%, #2f6fd8, #12306e 35%, transparent 72%); }
.menu > .tint.art { background: var(--art) center / cover no-repeat; filter: blur(70px) saturate(.9); opacity: .4; }
.menu > .tint::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #04070ef0, #04070ed0 55%, #04070e80); }
.logo { margin: 0; font: 900 11cqh/1 "Arial Black", Verdana, sans-serif; letter-spacing: -.03em; color: #fff; text-shadow: 0 .06em 0 #000a; }
.logo span { color: #5fa8ff; }
.minilogo { margin: 0; font: 900 3.3cqh/1 "Arial Black", Verdana, sans-serif; color: #fff; white-space: nowrap; letter-spacing: -.01em; }
.minilogo span { color: #5fa8ff; }
.sbar { display: flex; align-items: center; gap: 1.2cqw; padding-bottom: 1.2cqh; border-bottom: 1px solid #ffffff1a; flex-wrap: nowrap; min-height: 6cqh; }
.sbar h2 { margin: 0 0 0 1em; font: 900 .9em "Arial Black", Verdana, sans-serif; color: #fff; text-transform: uppercase; letter-spacing: .08em; }
.back { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 0 .3em; border-radius: 6px; font: 900 1.5em/1 Verdana, sans-serif; }
.back:hover, .back:focus-visible { color: var(--hi); background: #ffffff14; outline: none; }
.srctabs { display: flex; gap: .2em; margin-left: .8em; }
.srctab { border: 0; border-bottom: 3px solid transparent; background: none; color: #7d8ca3; cursor: pointer; padding: .45em .8em; font: 900 .78em "Arial Black", Verdana, sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.srctab:hover { color: #cfe0f5; }
.srctab[aria-selected=true] { color: #fff; border-bottom-color: #5fa8ff; }
.sbar .count { color: var(--dim); font-size: .72em; white-space: nowrap; }
.adds { display: flex; gap: .4em; margin-left: auto; }
.searchbox { display: flex; align-items: center; gap: .5em; width: 21cqw; height: 2.1em; padding: 0 .6em; border-radius: 8px; background: #0a1120; border: 1px solid var(--line2); }
.searchbox:focus-within { border-color: #8cc3ff; }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--hi); font-size: .82em; outline: none; }
.fb { flex: none; display: inline-block; width: 1.05em; height: 1.05em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 45%, color-mix(in srgb, var(--c), #000 45%)); box-shadow: 0 0 .4em color-mix(in srgb, var(--c), transparent 55%); }
.screen { --green: #3fcf5a; --red: #ff4048; --yellow: #ffd23b; --blue: #3b8bff; --orange: #ff9a2b; }
.fb.green { --c: var(--green); } .fb.red { --c: var(--red); } .fb.yellow { --c: var(--yellow); } .fb.blue { --c: var(--blue); } .fb.orange { --c: var(--orange); }
.chip { display: inline-flex; align-items: center; height: 2em; padding: 0 .9em; cursor: pointer; font-weight: 700; font-size: .74em; color: #cfe0f5; border: 1px solid var(--line2); border-radius: 99px; background: #ffffff0d; white-space: nowrap; }
.chip:hover { background: #ffffff1f; color: #fff; }
.go, .ghost { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; height: 2.4em; padding: 0 1.6em; cursor: pointer; font: 900 .9em "Arial Black", Verdana, sans-serif; text-transform: uppercase; border-radius: 10px; letter-spacing: .02em; }
.go { color: #fff; border: 0; background: linear-gradient(#4fdc68, #26a23d); box-shadow: 0 .25em 1em #3fcf5a44; }
.ghost { color: var(--hi); border: 1px solid var(--line); background: #0a1120cc; }
.go:disabled { filter: grayscale(1) brightness(.6); cursor: default; }
:focus-visible { outline: 2px solid #8cc3ff; outline-offset: 2px; }
.chip:focus-visible, .go:focus-visible, .ghost:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
select { height: 2.1em; background: #0a1120; color: var(--hi); border: 1px solid var(--line); border-radius: 8px; padding: 0 .6em; font-size: .85em; }
.note { margin: 0; color: var(--dim); font-size: .8em; }
.row { display: flex; gap: 1cqw; flex-wrap: wrap; align-items: center; }

/* The button legend along the bottom of every menu: fret colours, what they do, and the key they're on. */
.legend { display: flex; flex-wrap: wrap; gap: .4em 2em; align-items: center; margin-top: auto; padding-top: 1.2cqh; border-top: 1px solid #ffffff1a; font-size: .7em; }
.lg { display: grid; grid-template-columns: auto auto; column-gap: .55em; align-items: center; }
.lg .fb, .lg .strumk { grid-row: 1 / 3; width: 1.6em; height: 1.6em; }
.lg b { color: #e8eef6; } .lg small { grid-column: 2; color: var(--dim); font-size: .82em; }
.lg kbd { font-size: .78em; margin-left: .4em; padding: 0 .3em; color: #9fb2cc; }
.strumk { display: grid; place-items: center; border-radius: 6px; background: linear-gradient(#fff, #c9d3df); color: #0f1d33; font: 900 .9em Verdana, sans-serif; }
.lg.sp .strumk { background: linear-gradient(#c8f4ff, #3fc8ff); }

/* Big menu items: main menu, pause */
.item { display: flex; align-items: center; justify-content: space-between; gap: 1em; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 0 .7em; height: 1.75em; border-radius: 10px; font: 900 4cqh/1 "Arial Black", Verdana, sans-serif; color: #9fb2cc; text-decoration: none; }
.item small { font: 700 1.9cqh Verdana, sans-serif; color: var(--dim); }
.item:hover, .item:focus { color: #0b1428; background: #fff; outline: none; }
.item:hover small, .item:focus small { color: #3d4a62; }

/* ---------------------------------------------------------------- loading + main */
.loading { justify-content: center; align-items: center; text-align: center; }
.loadtext { font-family: Consolas, monospace; color: #53f28a; }
.loadtext.err { color: #ff7a85; }
.main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: 1fr auto; column-gap: 6cqw; padding: 9cqh 6cqw 2.2cqh; }
.mainleft { display: grid; align-content: center; gap: 1.6cqh; }
.tagline { margin: -.6cqh 0 2cqh .3em; color: var(--dim); font-size: .9em; }
.main .items { display: grid; gap: .5cqh; max-width: 36cqw; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqh; align-content: center; }
.tile { display: grid; align-content: end; gap: .2em; min-height: 20cqh; padding: 1.1em 1.3em; border-radius: 16px; background: #0a1120cc; border: 1px solid var(--line2); text-align: left; color: var(--text); font: inherit; }
.tile small { color: #5fa8ff; font: 900 .6em "Arial Black", Verdana, sans-serif; text-transform: uppercase; letter-spacing: .14em; }
.tile b { color: #fff; font: 900 1.25em/1.15 "Arial Black", Verdana, sans-serif; }
.tile > span { color: #9fb2cc; font-size: .8em; }
.tile.big { grid-column: 1 / 3; min-height: 30cqh; grid-template-columns: 22cqh minmax(0, 1fr); align-items: end; column-gap: 1.2em; cursor: pointer; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 15%, #2f6fd855, transparent 60%), #0a1120cc; }
.tile.big:hover, .tile.big:focus { border-color: #8cc7ff; outline: none; box-shadow: 0 0 0 2px #8cc7ff; }
.tile .tart { width: 22cqh; aspect-ratio: 1; border-radius: 10px; background: radial-gradient(circle at 30% 25%, #2f6fd8, #10203f 70%) center / cover; box-shadow: 0 8px 20px #000c; }
.tile .tt { display: grid; gap: .2em; }
.tile.account { align-content: end; }
.tile.account .chip { justify-self: start; margin-top: .6em; }
.main .legend { grid-column: 1 / 3; }

/* ---------------------------------------------------------------- song select */
.sortrow { display: flex; flex-wrap: wrap; align-items: center; gap: .35em; font-size: .74em; }
.sortrow .lbl { display: flex; align-items: center; gap: .5em; color: #fff; font-weight: 700; margin-right: .5em; }
.sortrow .lbl .fb { width: 1.3em; height: 1.3em; }
.sortpill { border: 1px solid var(--line2); background: none; color: #9fb2cc; border-radius: 99px; padding: .3em .9em; cursor: pointer; font: inherit; }
.sortpill:hover { color: #fff; border-color: var(--line); }
.sortpill[aria-checked=true] { background: #fff; color: #0b1428; border-color: #fff; font-weight: 900; }
.cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 1.6cqw 33cqw; gap: 1.2cqw; }
.table { min-height: 0; display: flex; flex-direction: column; }
.th, .song-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 5.4em 3.6em 4.4em; gap: 1em; align-items: center; padding: 0 .9em; }
.th { height: 2.2em; flex: none; font-size: .6em; color: var(--dim); text-transform: uppercase; letter-spacing: .14em; }
.th span:nth-child(n+4) { text-align: right; }
.th .sorted { color: #ffd23b; }
.list { flex: 1; min-height: 0; overflow-y: auto; outline: none; scrollbar-color: #3d5480 transparent; padding: 2px; }
.song-row { height: 2.5em; border-radius: 8px; cursor: pointer; font-size: .86em; border: 1px solid transparent; }
.song-row.alt { background: #ffffff06; }
.song-row .t { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-row .t.fav::before { content: "★ "; color: #ffd23b; }
#dFav[aria-pressed=true] { color: #ffe08a; border-color: #ffd23b; }
.song-row .a { color: #9fb2cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-row .len { color: var(--dim); font-family: Consolas, monospace; text-align: right; white-space: nowrap; }
.song-row .len.cloud { color: #8cc7ff; } .song-row .len.busy { color: #ffd66b; }
.song-row .pc { text-align: right; font-weight: 900; color: #e8eef6; white-space: nowrap; }
.song-row .pc.none { color: #3d4a62; font-weight: 400; }
.song-row .pc.fc { color: #7fe8ff; }
.song-row:hover { background: #ffffff10; }
.list:focus-visible .song-row.sel, .song-row.sel { background: linear-gradient(90deg, #2f6fd8, #1d4fa8); border-color: #8cc7ff; box-shadow: 0 .3em 1em #2f6fd855; }
.song-row.sel .a, .song-row.sel .len { color: #dbeaff; }
.song-row.more { display: block; text-align: center; color: #8cc7ff; font-weight: 700; line-height: 2.5em; }
.list .msg { padding: 1em; color: var(--dim); text-align: center; }
.sec { display: flex; align-items: baseline; gap: .6em; padding: .8em .9em .2em; font: 900 1.05em "Arial Black", Verdana, sans-serif; color: #5fa8ff; cursor: default; }
.sec b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.sec small { flex: none; font: 700 .6em Verdana, sans-serif; color: var(--dim); }
.mini { display: inline-flex; gap: 2px; }
.mini i { width: .42em; height: .75em; border-radius: 2px; background: #1a2236; }
.mini i.on { background: #5fa8ff; } .mini.hot i.on { background: #ff5a5a; }
.mini.none { opacity: .35; }
.rail { min-height: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 2.2em 0 .4em; font: 900 .6em "Arial Black", Verdana, sans-serif; color: #2c374d; user-select: none; }
.rail span { width: 1.7em; text-align: center; border-radius: 4px; line-height: 1.5; }
.rail .has { color: #7d8ca3; cursor: pointer; }
.rail .has:hover { color: #fff; }
.rail .on { color: #0b1428; background: #ffd23b; }
.detail { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .6em; scrollbar-width: thin; }
.art { flex: none; position: relative; width: 100%; height: 27cqh; border-radius: 16px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #2f6fd8, #10203f 70%) center / cover; box-shadow: 0 1em 2.4em #000c; }
.art.has { background-color: #05070d; background-size: contain; background-repeat: no-repeat; }
.art span { font: 900 12cqh "Arial Black", Verdana, sans-serif; color: #ffffff26; }
.art.has span { display: none; }
.art .year { position: absolute; right: .6em; top: .5em; padding: .15em .7em; border-radius: 99px; background: #000b; color: #fff; font: 700 .7em Verdana, sans-serif; }
.detail h3 { margin: .2em 0 0; font: 900 1.55em/1.1 "Arial Black", Verdana, sans-serif; color: var(--hi); overflow-wrap: anywhere; }
.detail .artist { margin: -.2em 0 0; color: #cfe0f5; font-size: 1.02em; }
.chips2 { display: flex; flex-wrap: wrap; gap: .35em; margin: 0; }
.chips2 span { padding: .2em .7em; border-radius: 99px; background: #ffffff12; color: #cfe0f5; font-size: .7em; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4em; }
.parts li { display: grid; gap: .3em; padding: .5em .6em; border-radius: 10px; background: #0a1120cc; border: 1px solid var(--line2); }
.parts li.on { border-color: #5fa8ff; }
.parts li span { font-size: .55em; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.parts li .mini i { width: .55em; height: .9em; }
.best { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3em .8em; margin: 0; padding: .55em .9em; border-radius: 12px; background: #0a1120cc; border: 1px solid var(--line2); min-height: 2.6em; }
.best b { font: 900 1.35em "Arial Black", Verdana, sans-serif; color: #fff; }
.best .gold { color: #ffd66b; letter-spacing: .1em; }
.best .fcb { color: #7fe8ff; font-weight: 700; font-size: .75em; }
.best span:last-child { margin-left: auto; color: var(--dim); font-size: .75em; }
.best.none { color: var(--dim); font-size: .8em; align-items: center; }
.setup .lbl { margin: .3em 0 .2em; font-size: .62em; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.seg { display: flex; flex-wrap: wrap; gap: .3em; }
.seg button { border: 1px solid var(--line2); background: #0a1120cc; color: var(--text); border-radius: 8px; padding: .3em .8em; cursor: pointer; font-weight: 700; font-size: .78em; }
.seg button[aria-pressed=true] { background: #fff; border-color: #fff; color: #0b1428; }
/* Play across the top, the smaller buttons share the row under it (they wrap instead of running off the side) */
.actions { display: flex; flex-wrap: wrap; gap: .5em; margin-top: auto; padding-top: .4em; }
.actions .go { flex: 1 1 100%; }
.actions .ghost { flex: 1 1 auto; min-width: 0; padding: 0 .9em; height: 2.2em; font-size: .76em; }
.empty, .scanning { position: absolute; inset: 16cqh 18cqw auto; padding: 1.6em 2em; border: 1px solid var(--line); border-radius: 16px; background: #0b1324f5; box-shadow: 0 20px 50px #000c; z-index: 2; }
.empty h3 { margin: 0 0 .4em; color: var(--hi); font: 900 1.5em "Arial Black", Verdana, sans-serif; }
.empty p { margin: 0 0 1em; }
.scanning { inset: 40cqh 30cqw auto; text-align: center; font-family: Consolas, monospace; color: #53f28a; }

/* Picker: the sort list (hold yellow) and the section list (hold orange), like Clone Hero's */
.picker { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: #02040ab3; backdrop-filter: blur(3px); }
.pbox { width: min(46cqw, 720px); max-height: 74cqh; display: flex; flex-direction: column; gap: .6em; padding: 1.2em 1.4em; border-radius: 16px; background: #0b1324f8; border: 1px solid var(--line); box-shadow: 0 30px 70px #000; }
.pbox h3 { margin: 0; font: 900 .75em "Arial Black", Verdana, sans-serif; color: #5fa8ff; text-transform: uppercase; letter-spacing: .14em; }
.plist { min-height: 0; overflow-y: auto; display: grid; gap: 2px; scrollbar-color: #3d5480 transparent; }
.pi { display: flex; justify-content: space-between; gap: 1em; align-items: center; padding: .35em .8em; border: 0; border-radius: 8px; background: none; color: #cfe0f5; cursor: pointer; font: 700 .95em Verdana, sans-serif; text-align: left; }
.pi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi small { color: var(--dim); font-weight: 400; flex: none; }
.pi:hover { background: #ffffff10; }
.pi.sel { background: #fff; color: #0b1428; } .pi.sel small { color: #3d4a62; }
.pi.cur span::after { content: " •"; color: #ffd23b; }
.pi.act span { color: #8cc7ff; } .pi.act.sel span { color: #0b1428; }
.askbox { width: min(40cqw, 600px); gap: .8em; }
.asktext { margin: 0; color: #cfe0f5; font-size: .85em; line-height: 1.45; }
.asktext:empty { display: none; }
.askin { height: 2.4em; padding: 0 .8em; border-radius: 10px; border: 1px solid var(--line); background: #05070d; color: #fff; font: 700 .95em Verdana, sans-serif; }
.askin:focus { outline: 2px solid #8cc3ff; outline-offset: 1px; }
.askrow { display: flex; justify-content: flex-end; gap: .6em; }

/* Song setup (after picking a song): instrument, difficulty, modifiers, Ready */
.setupm { align-items: center; padding-top: 6cqh; }
.stitle { text-align: center; max-width: 80cqw; }
.stitle h2 { margin: 0; font: 900 5.4cqh/1.1 "Arial Black", Verdana, sans-serif; color: #fff; text-shadow: 0 .08em .3em #000a; }
.stitle p { margin: .4em 0 0; font-size: 1.1em; color: #cfe0f5; }
.scard { width: min(40cqw, 620px); max-height: 74cqh; overflow-y: auto; scrollbar-width: thin; margin-top: 3cqh; display: flex; flex-direction: column; gap: .8em; padding: 1.4em 1.5em; border-radius: 18px;
  background: #0b1324f2; border: 1px solid var(--line); box-shadow: 0 30px 70px #000c; }
.srow { display: flex; align-items: flex-start; justify-content: center; gap: 1.4em; margin-top: 3cqh; max-width: 96cqw; }
.srow .scard { margin-top: 0; }
.sboard { width: min(27cqw, 400px); max-height: 74cqh; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: .55em; padding: 1.3em 1.2em; border-radius: 18px;
  background: #0b1324e6; border: 1px solid var(--line); box-shadow: 0 30px 70px #000c; }
.sboard .slabel { margin: 0; }
.bsub { margin: 0; font-size: .72em; color: var(--dim); }
.bnote { margin: 0; font-size: .78em; color: var(--dim); }
.bnote:empty { display: none; }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.blist li { display: grid; grid-template-columns: 1.8em minmax(0, 1fr) auto; gap: 0 .6em; align-items: center; padding: .22em .6em; border-radius: 8px; font-size: .8em; line-height: 1.25; color: #cfe0f5; }
.blist li:nth-child(odd) { background: #ffffff08; }
.blist li.me { background: #2f6fd855; color: #fff; box-shadow: inset 3px 0 #5fa8ff; }
.blist li.gap { padding: 0; background: none; color: var(--dim); text-align: center; display: block; font-size: .7em; letter-spacing: .3em; }
.blist .r { grid-row: 1 / 3; font: 900 1em "Arial Black", Verdana, sans-serif; color: var(--dim); text-align: right; }
.blist li[data-rank="1"] .r { color: #ffd23b; } .blist li[data-rank="2"] .r { color: #d8dee9; } .blist li[data-rank="3"] .r { color: #e0995e; }
.blist .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.blist .s { font-family: "Arial Black", Verdana, sans-serif; color: #fff; text-align: right; }
.blist .x { grid-column: 2 / 4; font-size: .78em; color: var(--dim); }
.blist .x .gold { color: #ffd66b; letter-spacing: .08em; }
.blist .x .fc { color: #7ff09a; font-weight: 700; }
@container (max-width: 820px) { .sboard { display: none; } }
.shead { display: flex; align-items: center; gap: 1em; }
.sart { flex: none; width: 13cqh; aspect-ratio: 1; border-radius: 10px; background: radial-gradient(circle at 30% 25%, #2f6fd8, #10203f 70%) center / cover; box-shadow: 0 8px 20px #000c; }
.sinfo { display: grid; gap: .2em; min-width: 0; }
.sinfo b { font: 900 1.25em "Arial Black", Verdana, sans-serif; color: #fff; }
.sinfo span { color: #cfe0f5; font-weight: 700; display: flex; align-items: center; gap: .5em; }
.sinfo small { color: var(--dim); font-size: .78em; }
.sbest { margin: 0; padding: .5em .8em; border-radius: 10px; background: #05070d99; color: var(--dim); font-size: .82em; }
.sbest b { color: #fff; font-family: "Arial Black", Verdana, sans-serif; } .sbest .gold { color: #ffd66b; letter-spacing: .1em; }
.slabel { margin: .2em 0 -.3em; font: 900 .62em "Arial Black", Verdana, sans-serif; color: #5fa8ff; text-transform: uppercase; letter-spacing: .14em; min-height: 1em; }
.slist { display: grid; gap: 3px; }
.sitem { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .5em .9em; border: 0; border-radius: 10px; background: none; color: #cfe0f5; cursor: pointer;
  font: 900 1.05em "Arial Black", Verdana, sans-serif; text-align: left; }
.sitem small { font: 700 .72em Verdana, sans-serif; color: var(--dim); }
.sitem:hover { background: #ffffff10; }
.sitem:focus { outline: none; background: #fff; color: #0b1428; } .sitem:focus small { color: #3d4a62; }
.sitem.ready { color: #fff; background: linear-gradient(#4fdc68, #26a23d); justify-content: center; }
.sitem.ready:focus { outline: 3px solid #fff; outline-offset: 2px; color: #fff; background: linear-gradient(#5ff07a, #2fb648); }
.sitem .chk { flex: none; width: 1.1em; height: 1.1em; border-radius: 5px; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8em; }
.sitem .chk.on { background: #3fcf5a; border-color: #3fcf5a; color: #062010; }
.sitem .chk.on::before { content: "✓"; }
.sitem.cur::after { content: "●"; color: #ffd23b; font-size: .7em; }
.sitem.left { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 .8em; align-items: center; padding: .35em .9em; font-size: .95em; }
.sitem.left .chk { grid-row: 1 / 3; }
.sitem.left small { grid-column: 2; font-size: .7em; }

/* Advanced search (Find songs) */
.adv { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: #02040ab3; backdrop-filter: blur(3px); }
.abox { width: 90cqw; max-height: 92cqh; display: flex; flex-direction: column; gap: 1.4cqh; padding: 2.4cqh 2.2cqw 1.6cqh; border-radius: 16px; background: #0b1324f8; border: 1px solid var(--line); box-shadow: 0 30px 70px #000; font-size: .9em; }
.ahead { display: flex; align-items: baseline; gap: 1em; }
.ahead h3 { margin: 0; font: 900 1.2em "Arial Black", Verdana, sans-serif; color: #fff; }
.ahead small { color: var(--dim); }
.agrid { min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, .8fr); gap: 2.4cqw; }
.acol { display: flex; flex-direction: column; gap: .45em; }
.alabel { display: flex; align-items: center; margin: .5em 0 .1em; font: 900 .62em "Arial Black", Verdana, sans-serif; color: #5fa8ff; text-transform: uppercase; letter-spacing: .12em; }
.alabel:first-child { margin-top: 0; }
.alabel span { width: 4.6em; text-align: center; color: var(--dim); letter-spacing: .06em; }
.alabel span:first-of-type { margin-left: auto; }
.alabel .hint { width: auto; margin-left: .8em !important; font: 400 1.1em Verdana, sans-serif; text-transform: none; letter-spacing: 0; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) 3em 3em; gap: .6em; align-items: center; }
.abox input[type=text], .abox input[type=number] { width: 100%; height: 2.1em; padding: 0 .7em; border-radius: 8px; border: 1px solid var(--line2); background: #05070d; color: var(--hi); font: inherit; font-size: .9em; outline: none; }
.abox input:focus { border-color: #8cc3ff; box-shadow: 0 0 0 2px #8cc3ff55; }
.abox input::placeholder { color: #55637d; }
.tog { justify-self: center; width: 1.6em; height: 1.6em; border-radius: 50%; border: 1px solid var(--line2); background: #1a2236; cursor: pointer; }
.tog[aria-pressed=true] { background: radial-gradient(circle at 35% 30%, #fff, #5fa8ff 45%, #1d4fa8); border-color: #8cc7ff; }
.tog[data-f=exclude][aria-pressed=true] { background: radial-gradient(circle at 35% 30%, #fff, #ff5a5a 45%, #8a1d1d); border-color: #ff9b9b; }
.tog:focus-visible, .tog:focus { outline: 2px solid #fff; outline-offset: 2px; }
.nrow { display: grid; grid-template-columns: minmax(0, 1fr) 5.2em 5.2em; gap: .5em; align-items: center; color: #cfe0f5; }
.nrow small { color: var(--dim); font-size: .8em; }
.abox .seg button:focus { outline: 2px solid #fff; outline-offset: 2px; }
.tris { display: grid; gap: .35em; }
.tri { display: flex; align-items: center; gap: .7em; padding: .35em .7em; border: 1px solid var(--line2); border-radius: 8px; background: #0a1120cc; color: #cfe0f5; cursor: pointer; font: inherit; font-size: .9em; text-align: left; }
.tri i { flex: none; width: 1.3em; height: 1.3em; border-radius: 5px; border: 1px solid var(--line); display: grid; place-items: center; font: 900 .8em Verdana, sans-serif; font-style: normal; }
.tri[data-v=yes] { border-color: #3fcf5a; color: #fff; } .tri[data-v=yes] i { background: #3fcf5a; border-color: #3fcf5a; color: #062010; }
.tri[data-v=yes] i::before { content: "✓"; }
.tri[data-v=no] { border-color: #ff5a5a; color: #fff; } .tri[data-v=no] i { background: #ff5a5a; border-color: #ff5a5a; color: #2a0505; }
.tri[data-v=no] i::before { content: "✕"; }
.tri:focus { outline: 2px solid #fff; outline-offset: 2px; }
.afoot { display: flex; justify-content: flex-end; gap: .6em; }
.abox .legend { margin-top: 0; }
#advBtn.on { background: #5fa8ff; border-color: #5fa8ff; color: #04101f; }

/* ---------------------------------------------------------------- settings */
.setcols { flex: 1; min-height: 0; display: grid; grid-template-columns: 22cqw minmax(0, 1fr); gap: 2cqw; }
.tabs { display: grid; align-content: start; gap: .3em; }
.tab { text-align: left; border: 0; background: none; color: #9fb2cc; cursor: pointer; padding: .55em .9em; border-radius: 10px; font: 900 1.05em "Arial Black", Verdana, sans-serif; }
.tab[aria-selected=true] { background: #fff; color: #0b1428; }
.tab:focus { outline: 2px solid #8cc3ff; outline-offset: 2px; }
.tab:hover { color: #fff; } .tab[aria-selected=true]:hover { color: #0b1428; }
.panes { min-height: 0; overflow-y: auto; padding: 1.2em 1.4em; border: 1px solid var(--line2); border-radius: 16px; background: #0a1120cc; }
.pane { display: grid; gap: 1.1em; justify-items: stretch; }
.pane > .chip { justify-self: start; }
.set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 1em; padding: .2em .4em; border-radius: 8px; }
.set:focus-within { background: #ffffff0a; }
.set > span { color: var(--hi); font-weight: 700; }
.set small { display: block; font-weight: 400; color: var(--dim); font-size: .8em; }
.set output { color: var(--accent); font-family: Consolas, monospace; margin-left: .5em; }
.set.check { grid-template-columns: minmax(0, 1fr) auto; }
input[type=range] { width: 100%; accent-color: #5fa8ff; }
input[type=checkbox] { width: 1.4em; height: 1.4em; accent-color: #3fcf5a; }
.help { margin: 0; color: var(--dim); font-size: .85em; }
.stepper { display: flex; align-items: center; gap: .8em; }
.stepper output { min-width: 4.5em; text-align: center; font-size: 1.2em; color: var(--hi); margin: 0; }
.calib { display: grid; gap: .8em; justify-items: start; }
.beats { display: flex; gap: .35em; min-height: 1.2em; }
.beats i { width: 1em; height: 1em; border-radius: 50%; background: #26334d; border: 1px solid #3d5480; }
.beats i.now { background: #fff; box-shadow: 0 0 10px #8cc7ff; }
.beats i.tap { background: #3fcf5a; border-color: #8ff09f; }
.binds { border-collapse: collapse; width: 100%; font-size: .9em; }
.binds th { text-align: left; color: var(--dim); font-weight: 400; font-size: .8em; padding: 0 .4em .3em; }
.binds td { padding: .2em .4em; border-top: 1px solid var(--line2); }
.binds td:first-child { color: var(--hi); font-weight: 700; }
.bind { width: 100%; min-width: 5.5em; border: 1px solid var(--line2); background: #05070d; color: var(--hi); border-radius: 8px; padding: .3em .5em; cursor: pointer; font-family: Consolas, monospace; }
.bind.wait { border-color: #ffd66b; color: #ffd66b; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .5; } }

.swatches { display: flex; gap: .5em; }
.swatches input[type=color] { width: 2.2em; height: 2.2em; padding: 0; border: 2px solid var(--line2); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.swatches input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatches input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.swatches input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.swatches input[type=color]:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------------------------------------------------------------- pause, results, credits */
.pause { justify-content: center; align-items: center; background: #02040acc; backdrop-filter: blur(3px); }
.pause .legend, .results .legend { position: absolute; left: 3cqw; right: 3cqw; bottom: 2.2cqh; }
.box { width: min(46cqw, 640px); padding: 1.6em 1.8em; border: 1px solid var(--line2); border-radius: 16px; background: #0b1324f2; box-shadow: 0 30px 70px #000; display: grid; gap: .3em; }
.box h2 { margin: 0 0 .1em .25em; font: 900 6cqh "Arial Black", Verdana, sans-serif; color: var(--hi); }
.box .sub { margin: 0 0 .5em .5em; color: var(--dim); font-size: .8em; }
.box .sub.section { margin-top: -.4em; color: #8cc7ff; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .7em; }
.pause .item { font-size: 3.4cqh; }
.results { justify-content: center; align-items: center; }
.results .box { width: min(58cqw, 820px); text-align: center; justify-items: center; }
.results h2 { font-size: 5cqh; margin: 0; }
.results .artist { margin: 0; color: #cfe0f5; font-weight: 700; }
.stars.big { justify-content: center; height: 8cqh; gap: 1cqw; margin: 1.5cqh 0 .5cqh; }
.rscore { margin: 0; font: 900 8cqh "Arial Black", Verdana, sans-serif; color: #fff; text-shadow: 0 4px 0 #000a; font-variant-numeric: tabular-nums; }
.badges { margin: 0; min-height: 1.4em; display: flex; gap: .6em; justify-content: center; }
.badge { padding: .1em .7em; border-radius: 99px; font: 900 .8em "Arial Black", Verdana, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.badge.best { background: #ffd66b; color: #3a2a00; }
.badge.fc { background: linear-gradient(#bff6ff, #3fc8ff); color: #032536; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8em 2em; margin: 1em 0; width: 100%; }
.stats div { display: grid; }
.stats dt { color: var(--dim); font-size: .75em; text-transform: uppercase; letter-spacing: .1em; }
.stats dd { margin: 0; color: var(--hi); font: 900 1.4em "Arial Black", Verdana, sans-serif; }
.results .actions { justify-content: center; }
.credits .text { max-width: 70cqw; overflow-y: auto; }
.credits p { margin: 0 0 1em; }

/* ---------------------------------------------------------------- touch controls */
/* Five columns lined up with the frets (play.js places them); a column glows in its fret's colour while held. */
.touchpad { position: absolute; left: 0; right: 0; bottom: 0; top: 60%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.touchpad i { position: absolute; top: 0; bottom: 0; border-radius: 18px 18px 0 0; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--c, #fff) 7%, transparent)); transition: background .08s; }
.touchpad i.on { background: linear-gradient(transparent, color-mix(in srgb, var(--c, #fff) 30%, transparent)); }
.touchbtns { position: absolute; inset: 0; pointer-events: none; }
.tbtn { position: absolute; pointer-events: auto; touch-action: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 2px solid #ffffff55; background: #0b1324cc; color: #fff; box-shadow: 0 4px 14px #000a; font: 900 clamp(14px, 3cqh, 22px) Verdana, sans-serif; }
.tbtn.pause { left: 1.5%; top: 2%; width: clamp(38px, 7cqh, 56px); height: clamp(38px, 7cqh, 56px); font-size: clamp(11px, 2cqh, 16px); }
.tbtn.sp { left: 3.5%; bottom: 38%; width: clamp(56px, 12cqh, 92px); height: clamp(56px, 12cqh, 92px); font-size: clamp(22px, 5cqh, 40px);
  color: #7fe8ff; border-color: #3fc8ff; box-shadow: 0 0 16px #3fc8ff66, 0 4px 14px #000a; }
.tbtn:active { transform: scale(.94); background: #1a2a48; }

/* ---------------------------------------------------------------- multiplayer */
/* A player's picture (their Discord avatar through our server), or their initials */
.av { position: relative; flex: none; width: 2.6em; height: 2.6em; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(#2f6fd8, #10203f); color: #fff; font: 900 .85em "Arial Black", Verdana, sans-serif; box-shadow: 0 0 0 2px #0b1324, 0 0 0 3px #3d5480; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 1.9em; height: 1.9em; font-size: .7em; }
.pill, .rinfo em, .rstate em, .crow em { font: 700 .62rem Verdana, sans-serif; font-style: normal; padding: .2em .65em; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.rinfo em.host { background: #ffd23b; color: #3a2a00; }
.rinfo em.plat.discord { background: #5865f2; color: #fff; } .rinfo em.plat.web { background: #ffffff1c; color: #cfe0f5; }
em.tick { background: #ffffff14; color: var(--dim); } em.tick.on { background: #3fcf5a; color: #062010; }
em.tick:empty { display: none; }
.rstate em.dl { background: #2f6fd833; color: #8cc7ff; } .rstate em.away { background: #ff7a8533; color: #ffc2c7; }

/* the lobby list */
.lobbies { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .4em; }
.lhead, .lrow { display: grid; grid-template-columns: 3em minmax(0, 1fr) 5em minmax(9em, 16em); gap: 1em; align-items: center; padding: .55em 1em; }
.lhead { font-size: .66em; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; padding-block: 0; }
.llist { min-height: 0; overflow-y: auto; display: grid; gap: .4em; align-content: start; scrollbar-width: thin; }
.lrow { border: 1px solid var(--line2); border-radius: 12px; background: #0a1120cc; color: var(--hi); cursor: pointer; text-align: left; font: inherit; }
.lrow:hover { background: #ffffff10; }
.lrow:focus { outline: none; background: #fff; color: #0b1428; } .lrow:focus small, .lrow:focus .lstate { color: #3d4a62; }
.lrow:disabled { opacity: .5; cursor: default; }
.lname { display: grid; min-width: 0; }
.lname b { font: 900 1.05em "Arial Black", Verdana, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lname small { color: var(--dim); font-size: .75em; }
.lcount { font: 900 1.1em "Arial Black", Verdana, sans-serif; } .lcount.full { color: #ff8a93; }
.lstate { color: #8cc7ff; font-size: .8em; font-weight: 700; }
.lempty { margin: 3em auto; color: var(--dim); text-align: center; max-width: 34em; }

/* a lobby */
.roomcols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.4em; }
.rpanel { min-height: 0; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: .7em; padding: 1.2em 1.3em; border: 1px solid var(--line2); border-radius: 16px; background: #0a1120cc; }
.rpanel .slabel { margin: 0; }
.rplayers { display: grid; gap: .5em; }
.rplayer { display: flex; align-items: center; gap: .9em; padding: .7em .9em; border-radius: 12px; background: #ffffff08; border: 1px solid transparent; }
.rplayer.me { border-color: #2f6fd8; }
.rplayer.ready { background: #3fcf5a14; }
.rplayer.away { opacity: .55; }
.rplayer.open { justify-content: center; color: var(--dim); border: 1px dashed var(--line2); background: none; min-height: 3.6em; font-size: .85em; }
.rplayer .av { width: 3em; height: 3em; }
.rinfo { flex: 1; min-width: 0; display: grid; gap: .2em; }
.rinfo b { display: flex; align-items: center; gap: .5em; min-width: 0; color: #fff; font: 900 1.05em "Arial Black", Verdana, sans-serif; white-space: nowrap; overflow: hidden; }
.rinfo small { color: var(--dim); font-size: .78em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rstate { display: flex; gap: .4em; align-items: center; }
.chip.kick { font-size: .62em; height: 1.9em; }
.rqueue { list-style: none; margin: 0; padding: 0; display: grid; gap: .35em; }
.rqueue li { display: flex; align-items: center; gap: .7em; padding: .45em .7em; border-radius: 10px; background: #ffffff08; }
.rqueue li.now { background: #2f6fd855; }
.rqueue .qn { width: 1.4em; text-align: right; font: 900 1em "Arial Black", Verdana, sans-serif; color: var(--dim); }
.rqueue .qt { display: grid; min-width: 0; }
.rqueue .qt b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rqueue .qt small { color: var(--dim); font-size: .75em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rqueue .qempty { color: var(--dim); font-size: .85em; justify-content: center; }
.rnote { margin: 0; color: #8cc7ff; font-size: .85em; } .rnote:empty { display: none; }
.rmine { display: grid; gap: 3px; } .rmine:empty { display: none; }
.rpanel .actions, .cside .actions { margin-top: auto; }
#roomReady.on, #cReady.on { background: linear-gradient(#bff6ff, #3fc8ff); color: #032536; box-shadow: 0 .25em 1em #3fc8ff44; }

/* between songs */
.mp.card { align-items: center; }
.ctitle { text-align: center; max-width: 90cqw; }
.ctitle .sub { margin: 0; color: #8cc7ff; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .72em; }
.ctitle h2 { margin: .1em 0 0; font: 900 4.6cqh/1.1 "Arial Black", Verdana, sans-serif; color: #fff; text-shadow: 0 .08em .3em #000a; }
.ctitle p { margin: .2em 0 0; color: #cfe0f5; } .ctitle p:empty { display: none; }
.cbody { flex: 1; min-height: 0; width: min(94cqw, 1500px); display: grid; grid-template-columns: minmax(0, 1fr) min(30cqw, 440px); gap: 1.4em; }
.ctable { min-height: 0; overflow-y: auto; display: grid; gap: .4em; align-content: start; padding: 1em; border: 1px solid var(--line2); border-radius: 16px; background: #0a1120cc; }
.crow { display: grid; grid-template-columns: 2.6em 3em minmax(8em, 1fr) 8.5em 5.5em 6.5em 6.5em 4.5em; gap: .8em; align-items: center; padding: .55em .8em; border-radius: 12px; background: #ffffff08; }
.ctable.final .crow { grid-template-columns: 2.6em 3em minmax(8em, 1fr) minmax(0, 1.6fr) 7.5em 4.5em; }
.ctable.final .cstars, .ctable.final .cacc { display: none; }
.ctable.final .cscore { text-align: left; font-size: .95em; overflow: hidden; text-overflow: ellipsis; }
.crow.head .cscore, .crow.head .ctotal, .crow.head .cstars, .crow.head .cacc { font: inherit; color: inherit; letter-spacing: inherit; }
/* narrower screens (Discord's small Activity window): no accuracy column, tighter columns */
@container (max-width: 1100px) {
  .crow { grid-template-columns: 2.2em 2.6em minmax(6em, 1fr) 7em 4.8em 6em 3.6em; gap: .5em; }
  .crow .cacc { display: none; }
  .ctable.final .crow { grid-template-columns: 2.2em 2.6em minmax(6em, 1fr) minmax(0, 1.4fr) 6em 3.6em; }
}
.crow.head { background: none; font-size: .62em; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; padding-block: 0; }
.crow.me { box-shadow: inset 3px 0 #5fa8ff; background: #2f6fd833; }
.crow .av { width: 2.6em; height: 2.6em; }
.cplace { font: 900 1.2em "Arial Black", Verdana, sans-serif; color: var(--dim); text-align: right; }
.crow:nth-child(2) .cplace { color: #ffd23b; } .crow:nth-child(3) .cplace { color: #d8dee9; } .crow:nth-child(4) .cplace { color: #e0995e; }
.cwho { display: grid; min-width: 0; }
.cwho b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cwho small { color: var(--dim); font-size: .72em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cscore { font: 900 1.1em "Arial Black", Verdana, sans-serif; color: #fff; text-align: right; white-space: nowrap; }
.cstars { color: #ffd66b; letter-spacing: .08em; font-size: .85em; }
.cacc { color: #cfe0f5; font-size: .85em; }
.ctotal { color: #8cc7ff; font-weight: 700; text-align: right; }
.cside { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .7em; padding: 1.2em 1.3em; border: 1px solid var(--line2); border-radius: 16px; background: #0b1324f2; }
.cside .slabel { margin: 0; }
.cnext { margin: 0; color: #fff; font-weight: 700; }

/* in game: the other players, Fortnite Festival style (picture, score, combo, place) */
.mpboxes { position: absolute; right: 2.5%; top: 9%; width: 19%; display: grid; gap: 1cqh; }
.mpbox { position: relative; display: flex; align-items: center; gap: .7em; padding: .45em .8em; border-radius: 10px; background: linear-gradient(90deg, #0c1220ee, #1a2436cc);
  border: 2px solid #9aa9b955; box-shadow: 0 4px 14px #000a; text-shadow: none; transition: border-color .2s, box-shadow .2s, opacity .3s; font-size: clamp(10px, 2cqh, 16px); }
.mpbox .av { width: 2.7em; height: 2.7em; font-size: .8em; }
.mpinfo { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.mpname { font: 700 .72em Verdana, sans-serif; color: #cfe0f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 2.6em; }
.mpscore { font: 900 1.25em "Arial Black", Verdana, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.mpcombo { font: 700 .7em Verdana, sans-serif; color: #ffd66b; min-height: 1.15em; }
.mpplace { position: absolute; right: .6em; top: .35em; font: 900 .8em "Arial Black", Verdana, sans-serif; color: #9fb2cc; font-style: normal; }
.mpfc { display: none; position: absolute; right: .6em; bottom: .45em; padding: 0 .4em; border-radius: 5px; background: linear-gradient(#ffe9a0, #e0a820); color: #3a2a00; font: 900 .62em "Arial Black", Verdana, sans-serif; font-style: normal; }
.mpbox.fc .mpfc { display: block; }
.mpbox.sp { border-color: #3fc8ff; box-shadow: 0 0 14px #3fc8ff99, 0 4px 14px #000a; }
.mpbox.gone { opacity: .45; }

.toast { position: absolute; left: 50%; bottom: 4cqh; transform: translate(-50%, 20px); max-width: 80%; padding: .6em 1.2em; border-radius: 8px; background: #0e1626f2; border: 1px solid var(--line); color: var(--hi); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: #ff7a85; color: #ffc2c7; }

/* Tall screens (phones held upright): one column, the essentials only. */
@media (max-aspect-ratio: 4 / 3) {
  .sbar { flex-wrap: wrap; row-gap: .6em; }
  .sbar .adds, .sbar .count { display: none; }
  .searchbox { width: 100%; order: 9; }
  .cols { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .rail, .detail .art, .detail .chips2, .parts, .th span:nth-child(3), .song-row .mini { display: none; }
  .th, .song-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 3.6em 3.6em; }
  .detail { max-height: 38cqh; }
  .main { grid-template-columns: minmax(0, 1fr); padding: 6cqh 6cqw 2cqh; }
  .main .items { max-width: none; }
  .tiles { display: none; }
  .legend { font-size: .6em; gap: .3em 1.2em; }
  .abox { width: 96cqw; max-height: 96cqh; }
  .agrid { grid-template-columns: minmax(0, 1fr); }
  /* song setup, pickers, small questions, pause and results: the full width */
  .srow { max-width: 100%; }
  .scard { width: 94cqw; max-height: 72cqh; }
  .pbox, .askbox { width: 92cqw; }
  .askbox { white-space: normal; }
  .box, .results .box { width: 94cqw; padding: 1.2em 1.1em; }
  .stars.big { height: 6cqh; }
  .rscore { font-size: 6.5cqh; }
  .stats { gap: .6em .8em; }
  .stats dd { font-size: 1.1em; }
  /* settings: the tabs in a row above, each setting on its own lines */
  .setcols { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 1cqh; }
  .tabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: .2em; }
  .tab { white-space: nowrap; font-size: .85em; padding: .45em .8em; }
  .panes { padding: .9em .8em; }
  .set { grid-template-columns: minmax(0, 1fr); gap: .4em; }
  .set.check { grid-template-columns: minmax(0, 1fr) auto; }
  .binds { font-size: .75em; }
  .bind { min-width: 3.2em; }
  /* playing: score and rock meter up in the corners, off the frets */
  .scorebox { width: 38%; bottom: auto; top: 1.5%; right: 3%; }
  .rock { width: 26%; bottom: auto; top: 2%; left: 3%; right: auto; }
  .callout { top: 17%; font-size: clamp(14px, 3.4cqh, 30px); }
  .solo { top: 23%; }
  /* touch: pause under the rock meter, star power on the right above the fret columns */
  .tbtn.pause { left: 50%; top: 2%; transform: translateX(-50%); }
  .tbtn.sp { left: auto; right: 4%; bottom: auto; top: 40%; }
  /* multiplayer (its header buttons stay: create, join with code, share, leave) */
  .mp .sbar .adds { display: flex; width: 100%; order: 8; gap: .5em; }
  .mp .sbar .count { display: inline; }
  .lhead { display: none; }
  .lrow { grid-template-columns: 2.6em minmax(0, 1fr) auto; }
  .lrow .lstate { grid-column: 2 / 4; }
  .roomcols, .cbody { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .rpanel, .cside, .ctable { overflow: visible; min-height: auto; }   /* stacked: each as tall as it needs, the column scrolls */
  .rplayer { flex-wrap: wrap; }
  .rplayer .rinfo { flex-basis: 50%; }
  .rinfo b { flex-wrap: wrap; white-space: normal; row-gap: .2em; }   /* the Host / Discord tags under a long name */
  .crow { grid-template-columns: 2em 2.4em minmax(0, 1fr) auto auto; }
  .crow .cstars, .crow .cacc, .crow.head { display: none; }
  .mpboxes { left: 3%; right: 3%; top: 12.5%; width: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mpbox { padding: .3em .5em; gap: .4em; font-size: clamp(9px, 1.5cqh, 13px); }
  .mpname { padding-right: 0; }
  .mpplace { display: none; }
  .callout { top: 21%; }
  .solo { top: 27%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
