/* Skins set the neutrals; the accent is the player's pick. Green, yellow and red are reserved for feedback in every skin. */
:root{
  --bg:#dfe3ea; --panel:#ffffff; --cell:#edf0f4; --tint:#d2d8e2; --tint2:#bec7d4; --ink:#131923; --mute:#5d6878; --gl:#d2d8e2; --tgt:#131923;
  --acc:#2f6fe0; --hit:#5fa85a; --near:#f0b400; --miss:#dc4b3f; --off:#9b9b96;
  --font:"Figtree",system-ui,sans-serif; color-scheme:light;
}
:root[data-skin="night"]{--bg:#091016; --panel:#15202b; --cell:#1e2b38; --tint:#263544; --tint2:#364859; --ink:#e8f0f6; --mute:#93a5b5; --gl:#243140; --tgt:#2c3b4b; color-scheme:dark}
body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}
.app{max-width:1440px;margin:0 auto;padding-block:14px 56px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));display:flex;flex-direction:column;gap:16px}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:none;padding:0}
button:disabled{cursor:default}
:focus-visible{outline:2px solid var(--acc);outline-offset:2px;border-radius:4px}
h1,h2,h3{margin:0;font-weight:600}
[hidden]{display:none!important}
.ic{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.app:not([data-mode="create"]) .oc,.app:not([data-mode="play"]) .op{display:none!important}

/* nav, theme and rules */
.nav{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.nav h1{font-size:18px;margin-right:auto}
.nav a{color:var(--mute);text-decoration:none;font-weight:700;padding-block:4px;border-bottom:3px solid transparent}
.nav a[aria-current="page"]{color:var(--ink);border-color:var(--ink)}
.nav .lnk2{color:var(--mute);font-weight:600}
.nav .lnk2:hover{color:var(--ink)}
.theme{display:flex;align-items:center;gap:10px}
.skins{display:flex;gap:2px;background:var(--tint);border-radius:4px;padding:2px}
.skins button{padding:3px 8px;border-radius:3px;font-size:12px;font-weight:600;color:var(--mute);display:inline-flex;align-items:center;gap:5px}
.skins button[aria-pressed="true"]{background:var(--panel);color:var(--ink)}
.accs{display:flex;gap:5px}
.accs button{width:16px;height:16px;border-radius:50%;background:var(--c)}
.accs button[aria-pressed="true"]{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--c)}
.modal{position:fixed;inset:0;z-index:66;background:rgba(0,0,0,.45);display:grid;place-items:center;padding:16px}
.mbox{background:var(--panel);border-radius:8px;padding:22px 24px;max-width:420px;width:100%;max-height:100%;overflow-y:auto;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;box-shadow:0 18px 50px rgba(0,0,0,.3)}
.mbox>*{flex-shrink:0} /* a box taller than the screen scrolls; its parts never squash into each other */
.mbox h2{font-size:20px}
/* the win screen is a small box over the dimmed board, everything centred */
.modal.winov{z-index:70}
.winov .mbox{align-items:center;text-align:center;gap:12px;max-width:340px;padding:24px 22px 18px}
/* the difficulty and the guesses, side by side on little screens of their own */
.wstats{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
.wst{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px 8px;background:var(--cell);border-radius:6px;min-width:0}
.wst b{font-size:26px;line-height:1;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums}
.wst>span{font-size:13px;font-weight:600;color:var(--mute)}
/* the tick sits on a green square, like a control graded right (nothing else here is a round badge) */
.winov .wck{width:40px;height:40px;border-radius:4px;background:var(--hit);color:#fff;display:grid;place-items:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),inset 0 -1.5px 0 rgba(0,0,0,.2),0 1px 2px rgba(0,0,0,.3)}.winov .wck .ic{width:24px;height:24px}
.winov .wpct{font-size:13px;font-weight:600;color:var(--mute)}
.winov h2{font-size:24px}.winov .wname{font-size:15px;font-weight:700;color:var(--ink)}
/* stretched, not width:100%: with the buttons' margins that overflowed, and a scrollbar covered the bottom screws */
.winov .subm{align-self:stretch}
/* "Enjoy this one?": two buttons after a finished patch, in the win card and under the sidebar's banner */
.rate{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;box-sizing:border-box}
.rate .rq{font-size:14px;font-weight:700;color:var(--ink)}
.rbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
.rb{display:flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 10px;border-radius:5px;background:var(--panel);color:var(--ink);font-weight:700;font-size:13.5px}
.rb .ic{width:17px;height:17px}
.rb[aria-pressed="true"]{background:var(--acc);color:var(--panel)}
.rate .rthx{font-size:12.5px;font-weight:600;color:var(--mute);line-height:1.4}.rate .rthx:empty{display:none}
.winov .wrate:empty{display:none}.winov .wrate{width:100%;padding-top:12px;border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent)}
#banner .rate{margin-top:12px;align-items:flex-start;padding:14px 16px;background:var(--panel);border-radius:6px}.winov .subm.alt{background:var(--panel);color:var(--ink)}
.mbox ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;line-height:1.45}
.mbox p{margin:0;color:var(--mute)}
.key{display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:var(--cell);border-radius:5px;font-size:13px}
.key i{display:inline-block;width:14px;height:14px;border-radius:3px;vertical-align:-2px;margin-right:8px}

/* layout */
.pg{display:grid;grid-template-columns:clamp(200px,26vw,272px) minmax(0,1fr);gap:clamp(12px,2vw,22px);align-items:start}
/* the sidebar (Submit, guesses) stays in view while the board scrolls; it scrolls itself when the screen is short */
.side{display:flex;flex-direction:column;gap:10px;position:sticky;top:max(10px,env(safe-area-inset-top,0px));max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain}
/* one column only on narrow portrait screens: in landscape (phones too) the board and Submit sit side by side */
@media (max-width:900px) and (orientation:portrait),(max-width:600px){.pg{grid-template-columns:minmax(0,1fr)}.side{position:static;max-height:none;overflow:visible}}
/* short screens (phones in landscape): less chrome around the board */
@media (max-height:500px){.app{padding-block:8px 24px;gap:10px}.phead h2{font-size:18px}}
.seg2{display:flex;gap:2px;background:var(--tint);border-radius:4px;padding:2px}
.seg2 button{flex:1;padding:4px 6px;border-radius:3px;font-weight:600;font-size:12.5px;color:var(--mute)}
.seg2 button[aria-pressed="true"]{background:var(--panel);color:var(--ink)}
.field{width:100%;box-sizing:border-box;height:32px;border-radius:4px;border:none;background:var(--panel);padding:0 9px;font-weight:600}
.target{background:var(--tgt);color:#fff;border-radius:5px;padding:9px 11px 11px;display:flex;flex-direction:column;gap:7px}
.target .th{display:flex;align-items:center;gap:8px}
.target .th b{font-size:11px;letter-spacing:.1em;text-transform:uppercase}
.target .th span{font-size:12px;opacity:.6;margin-left:auto}
.tbtn2{width:28px;height:28px;border-radius:50%;background:#fff;color:#171717;display:grid;place-items:center;flex:none}
.tbtn2 .ic{width:13px;height:13px;fill:currentColor;stroke:none}
.tw{position:relative;height:56px}
.tw canvas{position:absolute;inset:0;width:100%;height:56px;display:block}
/* your patch mirrors the target card, in the accent colour */
.yours{background:var(--acc)}
.yours .tbtn2{color:var(--acc)}
.yours kbd{font:inherit;font-size:10.5px;font-weight:600;background:rgba(255,255,255,.2);border-radius:3px;padding:0 5px}
.yours .yempty{display:none;position:absolute;inset:0;align-items:center;justify-content:center;font-size:12.5px;opacity:.85}
.yours.empty{background:var(--tint);color:var(--mute)}
.yours.empty .yempty{display:flex}
.yours.empty .tbtn2{background:var(--tint2);color:var(--mute);cursor:default}
.yours.empty kbd{background:var(--tint2)}
/* playing: the block's name lights up (an outline's round corners fought the square board) */
.target.playing .th b{color:var(--acc)}.yours.playing .th b{color:var(--tgt)}
.score{background:var(--panel);border-radius:5px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.score .k{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--mute)}
.score b{font-size:40px;line-height:1.05;font-weight:700;letter-spacing:-.02em}
.score .sub{font-size:11.5px;color:var(--mute)}
.mt{background:var(--panel);border-radius:5px;padding:9px 12px;display:flex;flex-direction:column;gap:6px}
.mtn{display:flex;align-items:baseline;gap:6px}
.mtn b{font-size:22px;font-weight:700}
.mtn span{font-size:12.5px;color:var(--mute)}
.mtb{display:flex;gap:3px;flex-wrap:wrap}
.mtb i{width:14px;height:10px;border-radius:2px;background:var(--tint)}
.mtb i.on{background:var(--ink)}
.mtb i.over{background:var(--miss)}
.mt.bad .mtn b{color:var(--miss)}
.bstat{background:var(--panel);border-radius:5px;padding:7px 12px;display:flex;align-items:baseline;gap:6px;font-size:12.5px;color:var(--mute)}
.bstat b{font-size:18px;color:var(--ink)}
.bstat span:first-child{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;margin-right:4px}
.subm{height:38px;border-radius:5px;background:var(--ink);color:var(--panel);font-weight:600;display:flex;align-items:center;justify-content:center;gap:7px}
.subm:disabled{opacity:.35}
.subm.rpv{padding:0 14px;flex:none}
#rpvs progress{display:block;width:100%;max-width:320px;height:8px;margin-top:6px;accent-color:var(--acc)}
.glist{display:flex;flex-direction:column;gap:3px;max-height:96px;overflow:auto}
.glist:empty{display:none}
.gr{display:flex;align-items:center;gap:4px;height:22px;padding:0 6px;border-radius:3px;background:var(--panel);font-size:11.5px;color:var(--mute);flex:none}
.gn{font-weight:600;width:16px}
.gc{min-width:17px;height:16px;border-radius:3px;background:var(--fc);color:#fff;font-weight:700;font-size:10.5px;display:inline-grid;place-items:center;padding:0 3px;box-sizing:border-box}
.banner{font-weight:600;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:13px}
.banner.win{color:var(--hit)}
.banner .ic{width:15px;height:15px}
.lnk{text-decoration:underline;font-weight:600}
.tog{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--mute);padding:2px 0}
.tog:hover{color:var(--ink)}
.tog[aria-pressed="true"]{color:var(--ink)}
.lnk.sub{font-weight:500;color:var(--mute)}
.aux{display:flex;flex-direction:column;gap:4px}
.auxh{display:flex;align-items:center;gap:8px;font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--mute)}
.auxh span{letter-spacing:0;text-transform:none;font-weight:500}
.roll2 svg{display:block;width:100%;height:auto}
.viz{display:block;width:100%;height:56px;border-radius:3px}
.lvl{background:var(--panel);border-radius:5px;padding:9px 12px}
.lvl span{font-size:12.5px;color:var(--miss);font-weight:600}
#clevel:empty{display:none}
.cwarn{margin:0;padding:0 0 0 16px;font-size:12px;color:var(--mute);display:flex;flex-direction:column;gap:3px}
.cwarn:empty{display:none}
.row2{display:flex;gap:6px;align-items:center}
.row2 label{font-size:12px;color:var(--mute);display:flex;align-items:center;gap:6px}.row2 label .field{color:var(--ink)} /* the label's grey made the BPM look disabled */
.row2 input{width:62px}
/* Swing: a continuous bar like the locked blocks' fine values, under BPM and meter */
.swr{display:flex;gap:8px;align-items:center}.swr .rl{font-size:12px;color:var(--mute);font-weight:500;padding:0;min-width:0}
.swr .sqs.bar{flex:1;position:relative;height:18px;cursor:ew-resize;touch-action:none}.swr .sqs.bar span{line-height:18px;font-size:11px}
.sbtn{height:32px;padding:0 11px;border-radius:4px;background:var(--panel);font-weight:600;font-size:12.5px;white-space:nowrap}
.sbtn:hover{background:var(--cell)}
.cjson{width:100%;box-sizing:border-box;min-height:56px;border:none;border-radius:4px;background:var(--panel);padding:6px;font-family:ui-monospace,monospace;font-size:11px}
.msg{font-size:12px;color:var(--mute)}
.sk{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--mute);margin-top:4px}

/* board */
.synth{display:flex;flex-direction:column;gap:10px;min-width:0}
.synth{max-width:1100px}
/* the toolbar row spans exactly the board (app.js sets --bw from the board's width); the panels below use the full column */
.synth>.sh{width:var(--bw,100%);max-width:100%}
.sh{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.sh h2{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--mute);margin-right:auto}
.tool{height:28px;min-width:28px;padding:0 8px;border-radius:4px;background:var(--tint);display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;font-size:12.5px}
.tool:hover:not(:disabled){background:var(--tint2)}
.tool:disabled{opacity:.35}
.tool[aria-pressed="true"],.tool[aria-pressed="true"]:hover{background:var(--ink);color:var(--panel)}
.board{display:grid;grid-template-columns:repeat(var(--cols,4),minmax(0,240px));gap:0;border-radius:6px;overflow:hidden;width:max-content;max-width:100%}
.board.over{outline:4px dashed var(--acc);outline-offset:4px}
.board>*{aspect-ratio:1;min-width:0}
/* wide blocks (LFOs from Hard, oscillators at Extreme) take two cells. dense: a smaller block fills a gap a wide one leaves
   at the end of a row; with one column there's no room, so they stay square */
.board{grid-auto-flow:row dense}
/* one block, just wider: the graph runs the full width on top and the controls sit in two columns under it */
.board:not(.one)>.blk.wide{grid-column:span 2;aspect-ratio:2/1}
/* a double-width block's controls sit two to a line, each exactly half (a pair of small ones shares a half, a quarter
   each), so every control keeps its own evenly sized cell and its own grading colour */
.board:not(.one)>.blk.wide .rows{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start}
.board:not(.one)>.blk.wide .r{grid-column:span 2}
.board:not(.one)>.blk.wide .r.half:has(+.r.half),.board:not(.one)>.blk.wide .r.half+.r.half{grid-column:span 1}
/* the mod envelope reads as two columns: where it goes on the left, its A/D/S/R down the right */
.board:not(.one)>.blk.wide [data-row="mdir"]{grid-column:1/3}.board:not(.one)>.blk.wide [data-row="mR"]{grid-column:3/5}
/* link tags: what's moving this block */
.lks{display:inline-flex;gap:3px}.lks:empty{display:none}
.lk{font-size:9px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--acc);background:color-mix(in srgb,var(--acc) 13%,transparent);border-radius:3px;padding:1px 4px;white-space:nowrap}
.blk.bhit .lk{color:#fff;background:rgba(255,255,255,.2)}
/* "→ Filter" on the modulator is filled, so the two ends of a link read differently */
.lk.to{color:var(--panel);background:var(--acc)}
/* pointing at a block lights up the other end of its links */

/* the values a graph can't show exactly, over its top-right corner */
.blk>.ro{position:absolute;top:32px;right:12px;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;
  font-size:10px;font-weight:700;color:var(--mute);background:color-mix(in srgb,var(--panel) 82%,transparent);border-radius:3px;padding:1px 5px;font-variant-numeric:tabular-nums}
.blk>.ro:empty{display:none}
.blk.bhit>.ro{color:var(--hit);background:rgba(255,255,255,.88)}
.board>*{container-type:inline-size}
@container (max-width:178px){.fk.tg{font-size:10px;letter-spacing:-.02em}.blk .r{height:18px}.blk .gw{padding:0}.blk{gap:3px}.blk .opts button{height:15px}.blk .stp{height:15px}}
.ec{background:var(--cell);outline:1.5px dashed var(--tint2);outline-offset:-10px}
.synth.adding .ec{background:color-mix(in srgb,var(--acc) 14%,var(--cell))}

/* every control in a block right: the block turns green (the graph keeps its own background) */
.blk.bhit{background:var(--hit)!important;color:#fff}
/* a solved block is green all over: its graph, grid and controls switch to white-on-green (the colour tokens are redefined
   inside it), so the green rows blend into the block instead of striping a white one */
.blk.bhit{--ink:#fff;--mute:rgba(255,255,255,.85);--gl:rgba(255,255,255,.25);--cell:rgba(255,255,255,.14);--tint:rgba(255,255,255,.3);--panel:var(--hit)}
.blk.bhit header{color:#fff}
.blk.bhit .hb{color:rgba(255,255,255,.85)}

.ec.off{cursor:default;background:color-mix(in srgb,var(--cell) 60%,var(--tint))}
.ec:not(.off):hover,.synth.adding .ec:not(.off){background:color-mix(in srgb,var(--acc) 12%,var(--cell))}
.blk{box-sizing:border-box;min-width:0}
.blk{background:var(--panel);padding:7px 8px;display:flex;flex-direction:column;gap:5px;overflow:hidden;position:relative}
.slot{border:1.5px dashed var(--tint2);cursor:pointer}
.slot:hover,.synth.adding .slot{border-color:var(--acc)}
.slot.free{border-style:dotted}
.blk header{display:flex;align-items:center;gap:5px;height:18px;flex:none}
.blk header[draggable]{cursor:grab}
.blk .bi{width:15px;height:15px}
/* a long name gives way to the header buttons on a narrow block, so mute and remove never fall off */
.blk h3{font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;margin-right:auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.blk header em{font-style:normal;font-size:10.5px;font-weight:700;white-space:nowrap}
.hb{width:20px;height:20px;border-radius:3px;display:grid;place-items:center;color:var(--mute);flex:none}
.hb.fxmv{font-size:17px;font-weight:700;line-height:1}.hb.fxmv:disabled{opacity:.25;cursor:default}
.hb:hover{background:var(--cell);color:var(--ink)}
.hb .ic{width:15px;height:15px}
/* a muted block is hard to miss: a red button and a faded block */
.hb.mu,.hb.mu:hover{background:var(--miss);color:#fff}
.blk.muted>:not(header){opacity:.35}
.blk.muted h3{text-decoration:line-through}
.board.live .blk:not(.quiet):not(.bhit):not(:has(.hb.mu)) h3{color:var(--acc)}
/* a whole block that isn't in the target: red band and a red wash, unlike a single red control */
.gw{background:var(--cell);border-radius:3px;position:relative;overflow:hidden;flex:none;padding:2px 0}
.gw svg{display:block;width:100%;height:auto;position:relative}
.gw svg *{vector-effect:non-scaling-stroke}
.fsc{position:absolute;inset:0;width:100%;height:100%}
.rows{display:flex;flex-wrap:wrap;gap:0;align-content:flex-start;flex:1;overflow:hidden;margin:3px -8px 0}
.r{display:flex;align-items:center;gap:6px;flex:1 1 100%;height:21px;padding:0 8px;border-radius:0;box-sizing:border-box;min-width:0}
.r.half{flex:1 1 40%}
.r.inl{flex:1 1 auto}
/* the filter's Input row: one key per source, each its own control (graded on its own); the first carries the label */
.r.fkr{flex:1 1 0;min-width:0}.r.fkr.fk1{flex:0 0 calc(20% + 46px)}.r[data-row=finn]{flex-grow:1.3}
.r.fkr:not(.fk1){padding-left:2px}.r.fkr:not([data-row=finn]){padding-right:2px} /* the row's outer edges keep the block's own padding */
.fk.tg{flex:1;width:auto;min-width:0;height:calc(100% - 4px);border-radius:3px;margin:0;padding:0;background:var(--panel);color:var(--mute);font-weight:700;font-size:11px;box-shadow:inset 0 1px 0 var(--hl),0 1px 0 rgba(0,0,0,.2),0 1px 2px var(--drop)}
.fk.tg[aria-pressed=true]{background:var(--ink);color:var(--panel);box-shadow:inset 0 1px 2px rgba(0,0,0,.4)}
.r.hit .fk.tg,.r.near .fk.tg,.r.miss .fk.tg{background:rgba(255,255,255,.35);color:inherit}.r.hit .fk.tg[aria-pressed=true],.r.near .fk.tg[aria-pressed=true],.r.miss .fk.tg[aria-pressed=true]{background:rgba(0,0,0,.55);color:#fff}
.rl{font-size:12px;font-weight:600;color:var(--mute);width:42px;flex:none;white-space:nowrap;overflow:hidden;text-align:left;border-radius:2px}
.rl:hover:not(:disabled){color:var(--ink);text-decoration:underline dotted}
.r.half .rl{width:auto}
.sqs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:2px;flex:1;height:12px;cursor:pointer;touch-action:none;min-width:0;position:relative}
.sqs i{flex:1;background:var(--tint);border-radius:2px}
.sqs i.on{background:var(--ink)}
.sqs[aria-disabled="true"]{cursor:default}
/* slider values you guessed that weren't right: yellow, solid while the slider covers them, pale when it doesn't */
.sqs i.tried{background:var(--tc,var(--near))}
.opts{display:flex;gap:2px;flex:1}
.opts button{flex:1;min-width:0;height:16px;border-radius:3px;display:grid;place-items:center;color:var(--ink);background:var(--cell)}
.opts button:hover:not(:disabled){background:var(--tint)}
.opts button .ic{width:18px;height:14px;stroke-width:2}
.opts button[aria-pressed="true"]{background:var(--ink);color:var(--panel)}
.stp{display:flex;flex:1;align-items:center;justify-content:space-between;background:var(--cell);border-radius:3px;height:16px}
.stp button{width:18px;height:18px;display:grid;place-items:center;color:var(--ink)}
/* gray once the end of the list is reached */
.stp button:disabled{color:var(--mute);opacity:.45;cursor:default}
.stp button .ic{width:11px;height:11px}
.stp span{font-size:11.5px;font-weight:600}
/* a control at a value already graded wrong: its name is written in yellow (white on a row that's yellow all over);
   a deeper yellow on the light themes, where the feedback yellow is too pale to read as text */
.r.again .rl{color:var(--near)}
:root[data-skin="paper"] .r.again:not(.near) .rl{color:#c98f00}
/* a refused guess: what has to change glows for half a second */
.nag{animation:nag .55s ease-out}.r.again.nag{animation:none}.r.again.nag .rl{animation:nagt .55s ease-out}
@keyframes nag{0%,100%{box-shadow:0 0 0 0 transparent}35%{box-shadow:0 0 0 3px var(--near),0 0 16px 4px var(--near)}}
@keyframes nagt{0%,100%{text-shadow:none;transform:none}35%{text-shadow:0 0 3px var(--near),0 0 12px var(--near);transform:scale(1.14)}}
/* icons are redrawn while a sound starts or stops; if one took the press and was replaced before the release, the click never fired */
button svg{pointer-events:none}
.r.hit,.r.near,.r.miss{color:#fff}
.r.hit{background:var(--hit)}.r.near{background:var(--fc,var(--near))}.r.miss{background:var(--off)}
.r.hit .rl,.r.near .rl,.r.miss .rl{color:#fff}
.r.hit .sqs i,.r.near .sqs i,.r.miss .sqs i{background:rgba(255,255,255,.3)}
.r.hit .sqs i.on,.r.near .sqs i.on,.r.miss .sqs i.on{background:#fff}
.r.hit .opts button,.r.near .opts button,.r.miss .opts button,.r.hit .stp,.r.near .stp,.r.miss .stp{background:rgba(255,255,255,.2);color:#fff}
.r.hit .opts button[aria-pressed="true"],.r.near .opts button[aria-pressed="true"],.r.miss .opts button[aria-pressed="true"]{background:#fff;color:#171717}
.r.hit .stp button,.r.near .stp button,.r.miss .stp button{color:#fff}
.drawer{display:flex;flex-wrap:wrap;gap:6px;padding:10px;background:var(--tint);border-radius:6px;min-height:50px;box-sizing:border-box;align-items:center}
.drawer.over{background:var(--tint2)}
.drawer.off{opacity:.4;pointer-events:none}
.chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px 0 9px;border-radius:4px;background:var(--panel);font-weight:600;font-size:12.5px;cursor:grab}
.chip .ic{width:16px;height:16px}
.chip:hover:not(:disabled){background:var(--cell)}
.chip:disabled{opacity:.4;cursor:default}
.dh{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:11.5px;color:var(--mute)}
.dh b{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;margin-right:auto}

/* on-screen keyboard: regular piano proportions */
.kbd{background:var(--panel);border-radius:6px;padding:10px;display:flex;flex-direction:column;gap:8px}
.kbh{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--mute)}
.kbh b{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--mute);margin-right:auto}
.kscroll{overflow-x:auto}
.keys{position:relative;height:118px;margin:0 auto}
.keys .kw{position:absolute;top:0;width:29px;height:118px;background:#fbfbf9;border:1px solid var(--tint2);border-radius:0 0 4px 4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding-bottom:5px;gap:2px;color:#8a8a84}
.keys .kb{position:absolute;top:0;width:20px;height:72px;background:#202022;border-radius:0 0 3px 3px;z-index:1;display:flex;align-items:flex-end;justify-content:center;padding-bottom:4px;box-sizing:border-box;color:#aaa}
.keys span{font-size:9.5px;font-weight:700}
.keys em{font-style:normal;font-size:8.5px}
.keys .on{background:var(--acc)!important;color:#fff}

/* FL-style piano roll */
.fl{background:var(--panel);border-radius:6px;padding:10px;display:flex;flex-direction:column;gap:8px}
.flh{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--mute)}
.flh b{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;margin-right:auto}
/* clip, not hidden: hidden would make the grid its own scroll container and the timeline bar couldn't stick to the top */
/* the piano roll: FL's layout (tools and snap, a scroll bar whose ends zoom, then keys, timeline and grid on one canvas) */
.fltools{display:flex;gap:4px}.fltools .tool{height:26px;min-width:28px;padding:0 6px}
.flsn{display:inline-flex;align-items:center;gap:5px;margin-right:6px}.flsn .field{height:26px;padding:0 6px;font-size:12px}
.flh #flhelp{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flsb{height:12px;margin-left:62px;margin-right:12px;border-radius:3px;background:var(--cell);position:relative;cursor:pointer;touch-action:none}
.flsb i{position:absolute;top:1px;bottom:1px;min-width:22px;border-radius:2px;background:var(--tint2);cursor:grab}
.flsb i:active{cursor:grabbing}.flsb i:hover,.flvs i:hover{background:var(--mute)}
.flsb u{position:absolute;top:0;bottom:0;width:9px;cursor:ew-resize}.flsb u[data-e="l"]{left:0}.flsb u[data-e="r"]{right:0}
.flsb u::after{content:"";position:absolute;top:2px;bottom:2px;left:4px;width:1.5px;background:var(--panel);opacity:.8}
.flw{height:360px;position:relative;border-radius:4px;overflow:hidden;background:var(--cell);display:flex}
.flg{flex:1;min-width:0;height:100%;display:block;touch-action:none}
.flvs{width:12px;flex:none;position:relative;background:var(--panel);cursor:pointer;touch-action:none}
.flvs i{position:absolute;left:2px;right:2px;min-height:18px;border-radius:2px;background:var(--tint2)}
.pph{position:absolute;top:0;bottom:0;left:0;width:2px;margin-left:-1px;background:var(--ink);opacity:.7;pointer-events:none}
.pph::before{content:"";position:absolute;left:-4px;top:0;border-style:solid;border-width:7px 5px 0;border-color:var(--ink) transparent transparent}
.fl:focus{outline:none}.fl:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.legend{display:flex;flex-wrap:wrap;gap:3px 12px;font-size:11.5px;color:var(--mute);align-items:center}
.legend i{display:inline-block;width:12px;height:9px;border-radius:2px;margin-right:4px;vertical-align:-1px}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ===== eski shell ===== */
.page,.pg{display:none}
.app[data-mode="home"] #home,.app[data-mode="learn"] #learn,.app[data-mode="levels"] #levels{display:flex}
.app[data-mode="play"] .pg,.app[data-mode="create"] .pg{display:grid}
.pg{gap:16px 22px;align-items:start} /* columns come from the layout rules at the top, so phones get one column */
.grow{flex:1}
.brand{display:inline-flex;align-items:center;gap:9px;font-weight:700;font-size:21px;letter-spacing:-.03em;color:var(--ink)!important;text-decoration:none;border:none!important;margin-right:10px;white-space:nowrap;padding:6px 10px 6px 6px!important;border-radius:8px}
.ehome{display:inline-flex;border:none!important;margin-right:6px;flex:none;padding:6px!important;border-radius:8px}
/* the logos light up on hover, as on 20 Questions */
.ehome,.brand{transition:background-color .12s}.ehome:hover,.brand:hover{background:var(--tint)}
.emark{width:28px;height:28px}.emark rect{fill:var(--ink)}.emark path{fill:var(--panel)} /* the nav bar's colour, so the e reads as cut out of it */
.mark{width:40px;height:20px;fill:none;stroke:var(--acc);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.nav{gap:18px}
.nav h1{display:none}
.ib{width:32px;height:32px;border-radius:6px;display:grid;place-items:center;color:var(--mute)}
.ib:hover{background:var(--panel);color:var(--ink)}
.ib .ic{width:18px;height:18px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 20px;border-radius:6px;background:var(--panel);color:var(--ink);font-weight:700;text-decoration:none;font-size:15px}
.btn:hover{background:var(--cell)}
.btn.pri{background:var(--ink);color:var(--panel)}
.btn.pri:hover{filter:brightness(1.2)}
.pill{font-size:11.5px;font-weight:700;padding:3px 8px;border-radius:4px;background:var(--panel);color:var(--mute)}
.pill.daily{background:var(--acc);color:#fff}

/* landing */
.home{flex-direction:column;gap:42px;max-width:1120px;width:100%;margin:28px auto 0}
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:48px;align-items:center}
@media (max-width:900px){.hero{grid-template-columns:minmax(0,1fr)}}
.htext h1{font-size:clamp(44px,6vw,76px);line-height:.98;letter-spacing:-.045em;font-weight:700;margin:0 0 18px}
.htext p{font-size:17px;line-height:1.55;color:var(--mute);max-width:46ch;margin:0 0 26px}
.cta{display:flex;flex-wrap:wrap;gap:10px}
.hdemo{display:flex;flex-direction:column;gap:12px}
.target.demo .th span{font-size:12px;opacity:.6;margin-left:auto}
.hwave{height:44px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.55) 0 2px,transparent 2px 5px);-webkit-mask:linear-gradient(90deg,transparent,#000 6%,#000 70%,transparent);mask:linear-gradient(90deg,transparent,#000 6%,#000 70%,transparent);opacity:.7}
.hboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-radius:6px;overflow:hidden}
.hb2{aspect-ratio:1;background:var(--panel);padding:10px;display:flex;flex-direction:column;gap:6px;box-sizing:border-box;min-width:0}
.hb2 .t{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}
.hb2 .t .ic{width:15px;height:15px}
.hb2 .g{height:32%;background:var(--cell);border-radius:3px}
.hb2 .g svg{width:100%;height:100%;display:block}
.hb2 i{display:block;height:18px;margin:0 -10px;background:var(--cell)}
.hb2 i.h{background:var(--hit)}.hb2 i.n{background:var(--near)}.hb2 i.m{background:var(--miss)}
.hb2.all{background:var(--hit);color:#fff}
.hb2.all i{background:rgba(255,255,255,.25)}
.how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:760px){.how{grid-template-columns:minmax(0,1fr)}}
.how>div{background:var(--panel);border-radius:6px;padding:18px 20px}
.how h3{font-size:17px;margin:8px 0 6px}
.how p{margin:0;color:var(--mute);line-height:1.5}
.hn{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--cell);font-weight:700;font-size:13px}
.tiers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:760px){.tiers{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tc{background:var(--panel);border-radius:6px;padding:16px 18px;display:flex;flex-direction:column;gap:8px;text-decoration:none;color:var(--ink)}
.tc:hover{background:var(--cell)}
.tc .k{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--mute)}
.tc h3{margin:0;font-size:20px}
.tc p{margin:0;color:var(--mute);font-size:13px;line-height:1.45}
.dots{display:flex;gap:3px}
.dots i{width:10px;height:10px;border-radius:2px;background:var(--tint)}
.dots i.on{background:var(--ink)}
.tc .done{font-size:12px;font-weight:700;color:var(--hit)}

/* learn */
.learn{flex-direction:column;max-width:1320px!important;width:100%;margin:0 auto;gap:18px}
.lwrap{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start}
@media (max-width:980px){.lwrap{grid-template-columns:minmax(0,1fr)}}
.lsteps{display:flex;flex-direction:column;gap:2px;position:sticky;top:max(10px,env(safe-area-inset-top,0px))}
@media (max-width:980px){.lsteps{position:static;flex-direction:row;overflow-x:auto;gap:4px;padding-bottom:2px}.lsteps button{flex:none}.lsteps button:not([aria-current="true"]) span+span{display:none}}
.lsteps button{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:5px;text-align:left;font-size:13px;color:var(--mute);font-weight:600}
.lsteps button:hover{background:var(--panel);color:var(--ink)}
.lsteps button[aria-current="true"]{background:var(--panel);color:var(--ink)}
.lsteps .ln{width:24px;height:24px;font-size:12px;flex:none}
.lsteps .ln .ic{width:13px;height:13px;stroke-width:2.6}
.lesson{display:flex;flex-direction:column;gap:12px;min-width:0}
.lesson>.k{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--mute)}
.lesson h2{font-size:26px;letter-spacing:-.02em}
.ltext p{margin:0 0 8px;line-height:1.55;max-width:70ch}
.ltask{margin:4px 0 0;padding:12px 14px;background:var(--panel);border-radius:6px;font-size:15px}
.stage{display:flex;flex-direction:column;gap:14px;margin-top:4px}
.scol{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.scol #lcheck{padding:0 22px}.scol .hintb{height:38px;padding:0 14px}
#lcards2:empty{display:none}
.scol #lhints,.scol #lres{flex-basis:100%;display:flex;flex-direction:column;gap:8px}
.scol #lhints:empty,.scol #lres:empty{display:none}
#lcards2{display:flex;flex-direction:column;gap:10px}
.app[data-mode="learn"] #lcards2 .op{display:flex!important}
.app[data-mode="learn"] #drawer:has(.msg){display:none}
.hint{margin:0;padding:9px 11px;background:color-mix(in srgb,var(--near) 18%,var(--panel));border-radius:5px;font-size:13.5px;line-height:1.45}
.hint b{margin-right:6px}
#lafter:empty{display:none}
.lprog{display:flex;align-items:center;gap:12px;margin-top:14px}
.lbar{flex:1;height:8px;border-radius:4px;background:var(--tint);overflow:hidden;max-width:420px}
.lbar i{display:block;height:100%;background:var(--hit);border-radius:4px;transition:width .4s ease}
#lcount{font-size:12.5px;color:var(--mute);font-weight:600}
.ln.done{background:var(--hit);color:#fff}
.ln{border-radius:50%;background:var(--cell);display:grid;place-items:center;font-weight:700}

/* levels */
.levels{flex-direction:column;gap:18px;max-width:1240px;width:100%;margin:6px auto 0}
.tabs{display:flex;gap:4px;border-bottom:2px solid var(--tint)}
.tabs button{padding:10px 16px;font-weight:700;font-size:15px;color:var(--mute);border-bottom:3px solid transparent;margin-bottom:-2px;display:flex;gap:8px;align-items:baseline}
.tabs button small{font-weight:500;font-size:12px}
.tabs button[aria-selected="true"]{color:var(--ink);border-color:var(--ink)}
.lgrid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
@media (max-width:980px){.lgrid{grid-template-columns:minmax(0,1fr)}}
.lmain{display:flex;flex-direction:column;gap:14px;min-width:0}
.dcard{background:var(--tgt);color:#fff;border-radius:8px;padding:20px 22px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 20px;align-items:center}
.dcard .k{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--acc)}
.dcard h3{font-size:26px;margin:4px 0 6px;letter-spacing:-.02em}
.dcard p{margin:0;opacity:.7}
.dcard .acts{display:flex;gap:8px;align-items:center}
.dcard .btn{background:#fff;color:#171717}
.dcard .tbtn2{width:44px;height:44px}
.dcard .solved{font-weight:700;color:#8fd18a}
.cw.dw{grid-column:1/-1;height:52px}
.cw.dw canvas{--c:rgba(255,255,255,.28)}
.cw.dw canvas.f{--c:var(--acc)}
.lsearch{display:flex;align-items:center;gap:8px;background:var(--panel);border-radius:6px;padding:0 12px;height:40px;margin-top:4px;color:var(--mute)}
.lsearch input{flex:1;border:none;background:transparent;height:100%;font-size:14px;color:var(--ink);outline:none}
.lsearch:focus-within{box-shadow:0 0 0 2px var(--acc)}
.dk{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--acc);color:#fff;vertical-align:-3px;margin-left:6px}
.dk .ic{width:11px;height:11px;stroke-width:2.6}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
.card{background:var(--panel);border-radius:6px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0;cursor:pointer}
.card:hover{background:var(--cell)}
.card.sel,.card.sel:hover{background:color-mix(in srgb,var(--acc) 17%,var(--panel))}
.card .top{display:flex;align-items:center;gap:10px}
.card h3{font-size:15px;margin:0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card .tbtn2{width:32px;height:32px;background:var(--ink);color:var(--panel)}
.card .tbtn2.playing{background:var(--acc);color:#fff}
.cw{position:relative;height:40px;--wv:var(--tint2)}
.cw canvas{position:absolute;inset:0;width:100%;height:100%;display:block;--c:var(--tint2)}
.cw canvas.f{--c:var(--acc)}
.lpi{display:flex;flex-direction:column;gap:2px;padding-bottom:8px;border-bottom:2px solid var(--tint)}
.lpi h3{margin:0;font-size:18px}
.card .meta{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--mute)}
.card .bl{display:flex;gap:3px;flex-wrap:wrap}
.card .bl span{width:22px;height:22px;border-radius:3px;background:var(--cell);display:grid;place-items:center;color:var(--ink)}
.card .bl .ic{width:13px;height:13px}
.card .res{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--acc);color:#fff;flex:none}
.card .res .ic{width:12px;height:12px;stroke-width:2.6}
.card .res.ok{color:var(--hit)}
.card .by{font-size:11.5px;color:var(--mute)}
.panel{background:var(--panel);border-radius:6px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.ph2{display:flex;align-items:baseline;gap:8px}
.ph2 b{font-size:14px}
.board2{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px}
.board2 li{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:4px;font-size:13px}
.board2 li:nth-child(odd){background:var(--cell)}
.board2 li .rk{width:18px;font-weight:700;color:var(--mute)}
.board2 li .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.board2 li .sc{font-weight:700}
.board2 li .nm>span{border-radius:3px;padding:1px 5px;margin-left:-5px}
.board2 li.you .nm>span{background:color-mix(in srgb,var(--acc) 22%,transparent)}
.lpatch h3{margin:0;font-size:17px}

/* play: quieter */
.phead{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.phead h2{font-size:22px;letter-spacing:-.02em}
.back{display:inline-flex;align-items:center;gap:4px;color:var(--mute);text-decoration:none;font-weight:600;font-size:13px;margin-right:6px}
.back:hover{color:var(--ink)}
.gnum{font-size:13px;color:var(--mute)}
.gnum b{font-size:20px;color:var(--ink);margin-right:2px}
.glist{flex-direction:row!important;flex-wrap:wrap;max-height:none!important}
.gr{height:auto!important;padding:3px 5px!important}
.gr .gn{display:none}


/* block arrival: the name and symbol fly in from the drawer, then the controls pop in */
.ghost{position:fixed;z-index:60;display:inline-flex;align-items:center;gap:6px;padding:0 10px 0 9px;height:32px;border-radius:4px;background:var(--panel);font-weight:700;font-size:12.5px;pointer-events:none;box-shadow:0 8px 24px rgba(0,0,0,.18);transition:transform .38s cubic-bezier(.2,.8,.2,1),opacity .38s,box-shadow .38s,font-size .38s;color:var(--ink)}
.ghost .ic{width:16px;height:16px}
.blk.arriving header{opacity:0}
.blk.arriving .gw,.blk.arriving .r{opacity:0;transform:scale(.92)}
.blk.pop .gw,.blk.pop .r{animation:pop .32s cubic-bezier(.2,.9,.3,1.25) both}
.blk.pop .gw{animation-delay:.02s}
.blk.pop .r:nth-child(1){animation-delay:.07s}.blk.pop .r:nth-child(2){animation-delay:.11s}.blk.pop .r:nth-child(3){animation-delay:.15s}.blk.pop .r:nth-child(4){animation-delay:.19s}.blk.pop .r:nth-child(5){animation-delay:.23s}.blk.pop .r:nth-child(6){animation-delay:.27s}
@keyframes pop{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:none}}
/* a level starting: each square of the board comes in after the one before it */
.board.entering>*{animation:enter .4s cubic-bezier(.2,.9,.3,1.15) both;animation-delay:calc(var(--i,0)*70ms)}
@keyframes enter{from{opacity:0;transform:translateY(12px) scale(.94)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.board.entering>*{animation:none}}
.blk.leaving{animation:leave .2s ease forwards}
@keyframes leave{to{opacity:0;transform:scale(.94)}}
.ec{transition:background .2s}
@media (prefers-reduced-motion:reduce){.ghost{display:none}.blk.pop .gw,.blk.pop .r,.blk.leaving{animation:none}.blk.arriving header,.blk.arriving .gw,.blk.arriving .r{opacity:1;transform:none}}
.gpop{position:fixed;z-index:65;background:var(--panel);border-radius:8px;padding:8px 10px 10px;box-shadow:0 14px 40px rgba(0,0,0,.22);pointer-events:none;box-sizing:border-box;animation:gp .14s ease-out}
.gpop svg{display:block;width:100%;height:auto;background:var(--cell);border-radius:4px}
.gpop svg *{vector-effect:non-scaling-stroke}
.gpop .pl{display:block;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mute);margin-bottom:6px}
@keyframes gp{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.gpop{animation:none}}
:root[data-expand] .gw{cursor:zoom-in}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--panel);padding:10px 16px;border-radius:6px;font-weight:600;z-index:70;pointer-events:none;box-shadow:0 8px 24px rgba(0,0,0,.2)}

.dd{flex:1;min-width:0;height:16px;border-radius:3px;display:flex;align-items:center;gap:5px;padding:0 4px 0 5px;background:var(--cell);color:var(--ink);font-size:12px;font-weight:700;line-height:1;font-family:inherit}
.dd:hover:not(:disabled){background:var(--tint)}
.dd .ic{width:16px;height:12px;stroke-width:2;flex:none}.dd span{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dd .cv{width:11px;height:11px}
.r.hit .dd,.r.near .dd,.r.miss .dd{background:rgba(255,255,255,.2);color:#fff}
.ddm{position:fixed;z-index:60;background:var(--panel);border-radius:6px;padding:4px;box-shadow:0 10px 30px rgba(0,0,0,.22);display:flex;flex-direction:column;gap:1px}
.ddm[hidden]{display:none}
.ddm button{display:flex;align-items:center;gap:8px;padding:5px 10px 5px 6px;border-radius:4px;color:var(--ink);font-size:13px;font-weight:600;line-height:1.2;font-family:inherit;text-align:left;white-space:nowrap}
.ddm button .ic{width:20px;height:15px;stroke-width:2}
.ddm button:hover,.ddm button:focus-visible{background:var(--tint);outline:none}
.ddm button[aria-selected="true"]{background:var(--ink);color:var(--panel)}
/* a choice already guessed wrong: yellow, like the tried squares on a slider */
.ddm button.tried{background:color-mix(in srgb,var(--near) 38%,transparent)}.ddm button.tried[aria-selected="true"]{background:var(--near);color:#fff}

/* thicker small text and lines */
.msg,.mtn span,.cwarn,.row2 label,.kbh,.flh,.target .th span,.board2 li,.card .by,.gnum,.tc p,.lh p,.how p{font-weight:500}
.rl,.stp span,.keys span,.gc,.pill,.sbtn,.chip,.tool,.seg2 button{font-weight:700}
.sk,.auxh,.sh h2,.flh b,.kbh b,.tc .k,.st .k,.dcard .k,.lesson>.k,.target .th b,.blk h3{font-weight:800}
.drawer.over{box-shadow:inset 0 0 0 4px var(--acc)}

/* on/off switch */
.tg{flex:none;width:30px;height:16px;border-radius:9px;background:var(--tint2);position:relative;transition:background .15s}
.tg i{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--panel);transition:transform .15s}
.tg[aria-pressed="true"]{background:var(--ink)}
.tg[aria-pressed="true"] i{transform:translateX(14px)}
.tg:disabled{opacity:.5}
.r .tg{margin-left:auto}
.r.hit .tg,.r.near .tg,.r.miss .tg{background:rgba(255,255,255,.3)}
.r.hit .tg[aria-pressed="true"] i,.r.near .tg[aria-pressed="true"] i,.r.miss .tg[aria-pressed="true"] i{background:#fff}
.r.hit .tg i,.r.near .tg i,.r.miss .tg i{background:rgba(255,255,255,.75)}

/* settings */
.app[data-mode="settings"] #settings{display:flex}
.settings{flex-direction:column;gap:22px;max-width:760px;width:100%;margin:8px auto 0}
.settings h1{font-size:30px;letter-spacing:-.01em}
.sset{display:flex;flex-direction:column;gap:10px}
.sset h2{font-size:12px;letter-spacing:.09em;text-transform:uppercase;font-weight:800;color:var(--mute)}
.themes{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.thm{background:var(--panel);border-radius:8px;padding:10px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left}
.thm:hover{background:var(--cell)}
.thm[aria-pressed="true"]{background:var(--ink);color:var(--panel)}
.thm small{font-size:12px;font-weight:600;opacity:.65}
.thm .sw{display:flex;width:100%;height:42px;border-radius:5px;overflow:hidden;background:var(--a);padding:6px;box-sizing:border-box;gap:4px;margin-bottom:6px}
.thm .sw i{flex:1;border-radius:3px;background:var(--b)}
.thm .sw i:nth-child(2){flex:.5;background:var(--c)}
.thm .sw i:nth-child(3){flex:.5;background:var(--d)}
.srows{display:flex;flex-direction:column;gap:2px;border-radius:8px;overflow:hidden}
.srow{display:flex;align-items:center;gap:16px;background:var(--panel);padding:14px 16px}
.srow>div{flex:1}
.srow p{margin:3px 0 0;color:var(--mute);font-size:13px;line-height:1.4}
.srow .tg{width:40px;height:22px;border-radius:12px}
.srow .tg i{width:18px;height:18px}
.srow .tg[aria-pressed="true"] i{transform:translateX(18px)}
.nav a.ib{border:none;padding:0}
.nav a.ib[aria-current="page"]{background:var(--panel);color:var(--ink)}

/* phrase editor while playing */
.fl[hidden]{display:none}

/* eski cursor (colours follow the theme) */
:root[data-cursor="eski"],:root[data-cursor="eski"] *{cursor:var(--cur)!important}
:root[data-cursor="eski"] :is(a,button:not(:disabled),[role="slider"]:not([aria-disabled="true"]),input[type="range"],select,summary,[data-pick],[draggable="true"]),
:root[data-cursor="eski"] :is(a,button:not(:disabled),[data-pick],[draggable="true"]) *{cursor:var(--curp)!important}
:root[data-cursor="eski"] :is(input:not([type="range"]),textarea){cursor:text!important}

/* songs */
.card.newsong{align-items:center;justify-content:center;flex-direction:row;gap:8px;font-weight:700;color:var(--mute);background:var(--tint);min-height:96px}
.card.newsong:hover{color:var(--ink);background:var(--panel)}
.card.newsong .ic{width:18px;height:18px}
.sgp{display:flex;gap:4px}
.sgp i{flex:1;height:8px;border-radius:2px;background:var(--tint)}
.sgp i.on{background:var(--hit)}
.sgb{display:flex;flex-direction:column;gap:6px}
.sgb>div{display:flex;align-items:center;gap:10px;font-weight:700}
.sgb>div.off{color:var(--mute)}
.sgb .tbtn2{width:34px;height:34px;background:var(--ink);color:var(--panel)}
.sgb .tbtn2.y{background:var(--acc);color:#fff}
.sgb .tbtn2:disabled{background:var(--tint);color:var(--mute)}
.sgb .tbtn2.playing{background:var(--acc);color:#fff}
.parts{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px}
.parts li{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;font-size:13px}
.parts li:nth-child(odd){background:var(--cell)}
.parts .rk{width:14px;font-weight:700;color:var(--mute)}
.parts .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.parts .res{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--hit);color:#fff}
.parts .res .ic{width:11px;height:11px;stroke-width:2.6}
.parts .pill,.sgpick .pill{background:var(--tint)}
.sgpick{display:flex;flex-direction:column;gap:2px;max-height:300px;overflow:auto;border-radius:5px;background:var(--cell);padding:3px}
.sgpick button{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;text-align:left;font-size:13px}
.sgpick button:hover{background:var(--tint)}
.sgpick button[aria-pressed="true"]{background:var(--panel)}
.sgpick .n{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:800;background:var(--tint);flex:none}
.sgpick button[aria-pressed="true"] .n{background:var(--acc);color:#fff}
.sgpick .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}

.xpx{background:var(--panel);border-radius:8px;padding:18px 20px;max-width:720px}
.xpx h3{font-size:16px;margin:0 0 6px}
.xpx p{margin:0 0 6px;color:var(--mute);line-height:1.5}
.r.full .dd{flex:1}

/* fine sliders: a bar with its value */
.sqs.bar{display:block;background:var(--tint);border-radius:3px;overflow:hidden;height:13px}
.sqs.bar b{position:absolute;left:0;top:0;bottom:0;background:var(--ink)}
.sqs.bar u{position:absolute;top:0;bottom:0;width:3px;margin-left:-1.5px;background:var(--near);pointer-events:none}
.sqs.bar span{position:absolute;right:5px;top:0;line-height:13px;font-size:10px;font-weight:700;color:#fff;mix-blend-mode:difference;pointer-events:none;white-space:nowrap}
.r.hit .sqs.bar,.r.near .sqs.bar,.r.miss .sqs.bar{background:rgba(255,255,255,.3)}
.r.hit .sqs.bar b,.r.near .sqs.bar b,.r.miss .sqs.bar b{background:#fff}
.dhead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 10px}
.dhead h2,.aday{font-size:11px;letter-spacing:.09em;text-transform:uppercase;font-weight:800;color:var(--mute);margin:0}
.aday{grid-column:1/-1;margin:14px 0 0}.aday:first-child{margin-top:0}
.dailies{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (max-width:860px){.dailies{grid-template-columns:minmax(0,1fr)}}
.dailies .dcard{padding:16px 18px;gap:10px 12px}
.dailies .dcard h3{font-size:19px;margin:2px 0 4px}
.dailies .dcard .tbtn2{width:36px;height:36px}
.dailies .dcard .btn{height:36px;padding:0 14px;font-size:14px}

/* segmented sliders: rounded ends, square inner edges */
.sqs:not(.bar) i{border-radius:0}
.sqs:not(.bar) i:first-child{border-radius:3px 0 0 3px}
.sqs:not(.bar) i:last-child{border-radius:0 3px 3px 0}
.sqs:not(.bar) i:only-child{border-radius:3px}
.slv{position:fixed;z-index:72;transform:translate(-50%,-100%);background:var(--ink);color:var(--panel);font-size:11.5px;font-weight:700;padding:3px 7px;border-radius:4px;pointer-events:none;white-space:nowrap}
/* guesses */
.gpanel{background:var(--panel);border-radius:6px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.gpanel #gcount{font-size:44px;line-height:1;font-weight:800}.gpanel #gcount.clock{font-variant-numeric:tabular-nums}
.levels.solo .lgrid{grid-template-columns:minmax(0,1fr)}
.levels.solo .lside{display:none}
.lside{position:sticky;top:max(12px,env(safe-area-inset-top,0px));align-self:start}

/* the header stays put: the scrollbar's space is always reserved */
html{scrollbar-gutter:stable}
/* home mockup: square mini blocks with the same rows */
.hb2{overflow:hidden;gap:5px}
.hb2 .g{height:30%;flex:none}
.hb2 i{height:13px;flex:none}
/* output: the last square on the board, your sound's graph with its play button */
.board>#yours{border-radius:0;padding:9px 10px;box-sizing:border-box;min-width:0;gap:8px}
.board>#yours .tw{flex:1;height:auto;min-height:0}
.board>#yours .tw canvas{height:100%}
.board>#yours .th b{font-size:11.5px}
/* phrase card in Play's left column */
.phr{background:var(--panel);border-radius:5px;padding:9px 11px 11px;display:flex;flex-direction:column;gap:7px;cursor:pointer}
.phr:hover{background:var(--cell)}
.phr[aria-expanded="true"]{box-shadow:inset 0 0 0 2px var(--acc)}
.phh{display:flex;align-items:baseline;justify-content:space-between}
.phh b{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:800}
.phh span{font-size:12px;color:var(--mute);font-weight:600}
.phr .pr{height:48px}
.phr .pr svg{display:block;width:100%;height:100%}
.phr .pr svg *{vector-effect:non-scaling-stroke}
/* square side panel (setting): the left column is one block wide and its cards are square */
.app[data-sq] .pg,.app[data-sq] .stage{grid-template-columns:200px minmax(0,1fr)}
.app[data-sq] #target,.app[data-sq] .phr{aspect-ratio:1;box-sizing:border-box}
.app[data-sq] #target .tw,.app[data-sq] .phr .pr{flex:1;height:auto;min-height:0}
.app[data-sq] #target .tw canvas{height:100%}

/* envelope icons are wider than the others */
.ic.env{width:26px;height:15px;overflow:hidden}
.dd .ic.env{width:20px;height:12px}
/* target as the first square on the board */
.board>#target{border-radius:0;padding:9px 10px;box-sizing:border-box;min-width:0;gap:8px}
.board>#target .tw{flex:1;height:auto;min-height:0}
.board>#target .tw canvas{height:100%}
.board>#target kbd,.board>#yours kbd{font:inherit;font-size:10.5px;font-weight:700;background:rgba(255,255,255,.2);border-radius:3px;padding:0 5px;white-space:nowrap}
.board>#target .th span{display:none}
.app[data-mode="learn"] #board>#target{display:flex!important}
/* quick play: target and output side by side above the board */
.sh{justify-content:space-between;flex-wrap:wrap}
.qp{display:flex;align-items:center;gap:6px;margin-right:auto}
.app[data-mode="create"] .qp #qt,.app[data-mode="create"] .qp .qh{display:none}
.qb{height:30px;padding:0 12px 0 9px;border-radius:15px;display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:13px;background:var(--tgt);color:#fff}
.qb.y{background:var(--acc)}
.qb .ic{width:12px;height:12px;fill:currentColor;stroke:none}
.qb:disabled{opacity:.4}
.qb[aria-pressed="true"]{box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 35%,transparent)}
.qh{font-size:12px;color:var(--mute);font-weight:600;margin-left:6px}
.qh kbd{font:inherit;font-weight:700;background:var(--tint);border-radius:3px;padding:0 5px;color:var(--ink)}
@media (max-width:900px){.qh{display:none}}

/* graphs fill the room the controls leave, so small blocks get big graphs */
.blk .gw{flex:1 1 0;min-height:54px;display:flex}
.blk .gw>svg,.blk .gw>.gs{flex:1;width:100%;height:auto;min-height:0}
.blk .gw>.gs>svg{width:100%;height:100%}
.blk .rows{flex:none}
/* long dropdowns: search and scroll */
.ddm .dds{border:none;background:var(--cell);border-radius:4px;height:30px;padding:0 9px;font:inherit;font-size:13px;font-weight:600;color:var(--ink);margin-bottom:4px;outline:none;min-width:190px}
.ddm .dds:focus{box-shadow:inset 0 0 0 2px var(--acc)}
.ddm .ddl{display:flex;flex-direction:column;gap:1px;max-height:300px;overflow:auto}
.ddm .ddl button[hidden]{display:none}

/* the visualizer sits in a window, like the block graphs but without grid lines */
.board>#target,.board>#yours{cursor:pointer}
.board>#target .tw,.board>#yours .tw{background:rgba(255,255,255,.09);border-radius:4px}
.board>#yours .tw{background:rgba(255,255,255,.16)}
.board>#target .tw canvas,.board>#yours .tw canvas{left:6px;top:6px;width:calc(100% - 12px);height:calc(100% - 12px)}
.th .vm{font-style:normal;font-size:10.5px;font-weight:700;opacity:.7;margin-left:auto;white-space:nowrap}
#tdur,#ydur{order:3;margin-left:8px!important;white-space:nowrap}
@container (max-width:250px){#ydur{display:none}}.th .vm{order:2}
.terr{display:none;position:absolute;inset:0;align-items:center;justify-content:center;text-align:center;padding:12px;font-size:12.5px;font-weight:600;opacity:.8}
.target.err .terr{display:flex}

/* level cards: solved ones turn green; each shows how many players solved it */
.card .cf{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cnt{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;color:var(--mute)}
.cnt .ic{width:13px;height:13px}
.dcard .cnt{color:rgba(255,255,255,.7);margin-left:10px}
.card.solved,.card.solved:hover{background:var(--hit);color:#fff}
.card.solved .cw canvas{--c:rgba(255,255,255,.45)}
.card.solved .cw canvas.f{--c:#fff}
.card.solved .tbtn2{background:#fff;color:var(--hit)}
.card.solved .res{background:#fff;color:var(--hit)}
.pager{display:flex;gap:4px;justify-content:center;flex-wrap:wrap}
.pager .sbtn{min-width:36px}
.pager .sbtn.on{background:var(--ink);color:var(--panel)}
.pager .sbtn .ic{width:14px;height:14px}
.pager:empty{display:none}

/* profile */
.app[data-mode="profile"] #profile,.app[data-mode="review"] #review{display:flex}
.profile,.review{flex-direction:column;gap:22px;max-width:860px;width:100%;margin:8px auto 0}
.review h1{font-size:30px;margin-bottom:-14px}
.pacct{display:flex;align-items:center;gap:16px;flex-wrap:wrap;background:var(--panel);border-radius:8px;padding:18px 20px}
.pav{width:56px;height:56px;border-radius:50%;background:var(--acc);color:#fff;display:grid;place-items:center;font-size:24px;font-weight:800;text-transform:uppercase;flex:none}
.pinfo{flex:1;min-width:220px}.pinfo h1{font-size:24px}.pinfo p{margin:4px 0 0;color:var(--mute)}
.psign{display:flex;flex-wrap:wrap;gap:8px;align-items:center;width:100%}
.psign .btn{height:38px;font-size:14px;background:var(--cell)}.psign .field{width:auto;flex:0 1 260px;height:38px;background:var(--cell)}
/* copy about dailies shows only while dailies are on (ESKI_CONFIG.dailies), and its stand-in only while they're off */
.psign .btn:disabled{opacity:.55;cursor:default}
.pstats{display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr));gap:8px}
@media (max-width:760px){.pstats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.pst{background:var(--panel);border-radius:8px;padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.pst b{font-size:26px;font-weight:800;line-height:1.1}.pst span{font-size:12.5px;color:var(--mute);font-weight:600}
.pby{grid-column:1/-1;background:var(--panel);border-radius:8px;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.pl{display:flex;align-items:center;gap:12px}.pl>span{width:150px;flex:none}.pl b{width:48px;text-align:right;font-size:13px}
.plb{flex:1;height:10px;border-radius:5px;background:var(--tint);overflow:hidden}.plb i{display:block;height:100%;background:var(--hit)}
.plist{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px;background:var(--panel);border-radius:8px;padding:6px}
.plist li{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:5px;font-size:13.5px;flex-wrap:wrap}
.plist li:nth-child(odd){background:var(--cell)}
.plist .nm{font-weight:700;flex:1;min-width:140px}.plist .g{font-weight:600}.plist .d{color:var(--mute);font-size:12.5px}
.plist .st{font-weight:700;font-size:12.5px;padding:2px 8px;border-radius:4px;background:var(--tint)}
.plist .st.approved{background:var(--hit);color:#fff}.plist .st.rejected{background:var(--miss);color:#fff}
.profile .pager{margin-top:8px}
/* review */
#rlist{display:flex;flex-direction:column;gap:6px}
.rv{display:flex;align-items:center;gap:12px;background:var(--panel);border-radius:8px;padding:12px 14px;flex-wrap:wrap}
.rv .tbtn2{background:var(--ink);color:var(--panel);width:34px;height:34px}
.rv .ri{flex:1;min-width:180px;display:flex;flex-direction:column;gap:2px}
.rv .subm{height:34px;padding:0 16px}
/* landing */
.grind{background:var(--panel);border-radius:8px;padding:20px 22px}.grind h2{font-size:20px;margin-bottom:6px}.grind p{margin:0;color:var(--mute);line-height:1.5;max-width:70ch}
.hboard{grid-template-columns:repeat(3,minmax(0,1fr))}
.hb2.ht{background:var(--tgt);color:#fff}.hb2.hy{background:var(--acc);color:#fff}
.hb2 .t em{font-style:normal;font-size:10px;font-weight:700;background:rgba(255,255,255,.2);border-radius:3px;padding:0 5px;margin-left:auto;text-transform:none;letter-spacing:0}
.hb2 .t .pl{width:16px;height:16px;padding:4px;border-radius:50%;background:#fff;color:#171717;fill:currentColor;stroke:none;box-sizing:content-box}
.hb2.hy .t .pl{color:var(--acc)}
.hb2 .g.w{flex:1;height:auto;background:rgba(255,255,255,.1) repeating-linear-gradient(90deg,rgba(255,255,255,.75) 0 2px,transparent 2px 5px);-webkit-mask:linear-gradient(transparent 22%,#000 22%,#000 78%,transparent 78%);mask:linear-gradient(transparent 22%,#000 22%,#000 78%,transparent 78%)}

/* output loudness meter; its height is fixed so the graph above holds still (−∞'s ∞ comes from a fallback font with its own line height) */
.lm{display:flex;align-items:center;gap:8px;height:13px;line-height:13px;font-size:10.5px;font-weight:700;flex:none;--r:0;--p:0}
.lm span{white-space:nowrap;text-transform:uppercase;letter-spacing:.08em;opacity:.8}
.lmb{flex:1;height:8px;border-radius:4px;background:rgba(255,255,255,.22);position:relative;overflow:hidden}
.lmb .r{position:absolute;left:0;top:0;bottom:0;width:calc(var(--r)*100%);background:#fff;border-radius:4px;transition:width .05s linear}
.lmb .p{position:absolute;top:0;bottom:0;width:2px;left:calc(var(--p)*100% - 2px);background:#fff;opacity:.9}
.lm.clip .lmb{box-shadow:inset 0 0 0 2px var(--miss)}
.lm b{width:46px;flex:none;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
.yours.empty .lm{opacity:.35}
/* the Output's listening volume: same row shape as the meter */
/* drawn like the meter's bar (the browser's own slider brought a grey track and outline); --v is the fill */
.ov input{flex:1;min-width:0;height:8px;margin:0;cursor:pointer;-webkit-appearance:none;appearance:none;border:none;border-radius:4px;background:linear-gradient(#fff,#fff) 0/calc(var(--v,.5)*100%) 100% no-repeat,rgba(255,255,255,.22)}
.ov input::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;border-radius:50%;background:#fff;border:none}
.ov input::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#fff;border:none}
.ov input::-moz-range-track{background:transparent;border:none}
.ov input:focus{outline:none}.ov input:focus-visible{outline:2px solid #fff;outline-offset:3px}
.xpw{font-weight:500;color:var(--mute)}

/* level cards wait behind the eski waveform until the whole page has rendered */
.lmain{position:relative}
.levels.loading #ldaily,.levels.loading #lcards,.levels.loading #lpager{opacity:0;pointer-events:none}
/* fade in only: hiding is instant so cards never visibly blink out */
.levels:not(.loading) #ldaily,.levels:not(.loading) #lcards{transition:opacity .25s}
.app[data-mode="loading"] #loading{display:flex;justify-content:center;padding-top:18vh}
/* fades in only after a short wait, so a quick load never flashes it */
.lload{display:flex;flex-direction:column;align-items:center;gap:12px;font-size:13px;font-weight:700;color:var(--mute);opacity:0;animation:lshow .25s .4s forwards}
@keyframes lshow{to{opacity:1}}
.lload .scope{width:132px;height:72px;border-radius:10px;background:var(--tgt);padding:10px 12px;box-sizing:border-box;overflow:hidden}
.lload .scope svg{display:block;width:100%;height:100%;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent);mask-image:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent)}
.lload .scope line{stroke:rgba(255,255,255,.14);stroke-width:1}
.lload .scope path{fill:none;stroke:var(--acc);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;animation:lwave 1.1s linear infinite}
@keyframes lwave{to{transform:translateX(-24px)}}
@media (prefers-reduced-motion:reduce){.lload .scope path{animation:none}}

/* the four difficulties, switched in the play header */
.dday:empty{display:none}.dday{font-size:11px;letter-spacing:.09em;text-transform:uppercase;font-weight:800;color:var(--mute);margin-right:2px}
.dtabs{display:flex;gap:3px;background:var(--tint);border-radius:7px;padding:3px}
.dtab{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:5px;color:var(--mute)}
.dtab .dn{font-size:13px;font-weight:700}
.dtab[aria-current="true"]{background:var(--panel);color:var(--ink)}
.dtab .ok{width:15px;height:15px;color:var(--hit)}
.phead h2{margin-left:8px}
/* library: a difficulty switcher over a grid of tiles, one per patch, newest first */
.levels h1{font-size:30px;margin:0}
.lhead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px}.lhead[hidden]{display:none}.lctl{display:flex;flex-wrap:wrap;gap:8px}.lctl[hidden]{display:none}
.ltn{font-size:12px;font-weight:700;color:var(--mute)}
.lib li{position:relative}
.lplay{position:absolute;top:50%;right:14px;transform:translateY(-50%);background:var(--ink);color:var(--panel)}.lplay.playing{background:var(--acc);color:#fff}
.lib{display:flex;flex-direction:column;gap:22px}
.lrow{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));grid-auto-rows:1fr;gap:12px} /* every tile the size of the tallest (a credit line adds one), not just its row */
/* home: a level's row, under its name, what it teaches and a link to all of it */
.lsec header{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin-bottom:10px}
.lsec h2{font-size:26px;font-weight:800;letter-spacing:-.02em;margin:0}.lsec header p{margin:0;font-size:14px;color:var(--mute)}
.lsec header a{margin-left:auto;font-size:14px;font-weight:700;color:var(--ink)}
/* four across at most on the home rows, so a row is one line on a desktop */
.lsec .lrow{grid-template-columns:repeat(4,minmax(0,1fr))}@media (max-width:900px){.lsec .lrow{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:480px){.lsec .lrow{grid-template-columns:minmax(0,1fr)}.lsec .lrow li:nth-child(n+3){display:none}} /* phones: two a level, so four levels fit a couple of screens */
.lback{display:inline-block;margin-bottom:4px;font-size:14px;font-weight:700;color:var(--mute);text-decoration:none}.lback:hover{color:var(--ink)}
.pback{flex-basis:100%;margin:0}.pback[hidden]{display:none} /* on its own line above the patch's name */
.sdir{font-style:normal;margin-left:4px}
.ldesc{margin:6px 0 0;font-size:15px;color:var(--mute)}
/* the first visit's hero: the pitch and two ways in beside a picture of graded blocks, then how a round goes */
.lhero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,620px);gap:20px 20px;align-items:center;margin:10px 0 14px}
.lhero h1{font-size:clamp(34px,4.6vw,64px);font-weight:900;letter-spacing:-.035em;line-height:1}
/* the game's name over the headline, in the heading itself so search engines read it as the page's title */
.lkick{display:block;margin-bottom:14px;font-size:clamp(13px,1.1vw,15px);font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--acc)}.lhero.ret .lkick{margin-bottom:10px}
.lht p{font-size:clamp(16px,1.5vw,20px);line-height:1.45;color:var(--mute);margin:18px 0 38px;max-width:34em}
.lcta{display:flex;flex-wrap:wrap;gap:12px}.lcta .ic{width:14px;height:14px;fill:var(--acc);stroke:none}
.lht small{display:block;margin-top:18px;font-size:13px;color:var(--mute)}
.lart{width:100%;height:auto;display:block}
/* returning players: the headline and picture, smaller, without the buttons and the how-to */
.lhero.ret{grid-template-columns:minmax(0,1fr) minmax(0,300px);margin:-14px 0 -18px}.lhero.ret h1{font-size:clamp(30px,3.6vw,48px)}
.lhero.ret .lht p{margin:14px 0 0;font-size:16px}
/* returning players: the newest player-made patches, from every level, beside the headline in the picture's place */
.lhero.ret.comm{grid-template-columns:minmax(0,1fr) minmax(0,560px);margin-block:-10px -14px}.lhero.ret.comm .lart{display:none}
.lcomm{background:var(--panel);border-radius:8px;padding:9px 14px 8px}.lcomm[hidden]{display:none}
.lcmh{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:3px}.lcmh h2{font-size:18px;font-weight:800;margin:0}.lcmh a{font-size:14px;font-weight:700;color:var(--ink)}
.lcomm ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}
.lcomm li{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:2px 6px;border-radius:5px}.lcomm li:nth-child(odd){background:var(--cell)}
.lcomm .lplay{position:static;transform:none}
.lcmn{display:flex;flex-direction:column;align-items:flex-start;min-width:0;text-align:left;color:var(--ink)}.lcmn b{font-size:14.5px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lcmn small{font-size:12px;color:var(--mute);font-weight:600;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lcmn:hover b{text-decoration:underline}
.lcml{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--panel);background:var(--ink);padding:1px 6px;border-radius:3px}.lcml.x{background:var(--acc)}
.lcmc{font-size:12px;color:var(--mute);white-space:nowrap}
@media (max-width:480px){.lcomm li{grid-template-columns:auto minmax(0,1fr) auto}.lcmc{display:none}} /* phones: name, credit and level only */
/* too narrow for the headline and the card side by side: the card goes under the headline (beside it, the card covered it),
   and the headline is one line across the page instead of two short ones hugging the left */
@media (max-width:780px){.lhero.ret.comm{grid-template-columns:minmax(0,1fr);gap:12px;margin:0}.lhero.ret.comm #lhh br{display:none}.lhero.ret.comm h1{font-size:clamp(22px,7.2vw,40px)}.lcmh{gap:8px}.lcmh h2{font-size:clamp(14px,4.1vw,18px);white-space:nowrap}.lcmh a{white-space:nowrap;font-size:13px}}
/* returning players' library fits a desktop window without scrolling: tighter rows and less room under them */
.app[data-mode="levels"]:has(.lhero.ret:not([hidden])){padding-bottom:20px}.app[data-mode="levels"]:has(.lhero.ret:not([hidden])) .lib{gap:14px}.app[data-mode="levels"]:has(.lhero.ret:not([hidden])) .lsec header{margin-bottom:9px}.lhero.ret{margin-block:-24px -26px}.lhero.ret .lcta,.lhero.ret .lht small,.lhero.ret .lhow{display:none}
.lhow{grid-column:1/-1;list-style:none;margin:8px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.lhow li{background:var(--panel);border-radius:6px;padding:16px 18px}
.lhow b{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--mute)}
.lhow p{margin:6px 0 0;font-size:15px;line-height:1.5}
.lhow .k{display:inline-block;width:13px;height:13px;border-radius:3px;margin-right:5px;vertical-align:-1px}.lhow .k.h{background:var(--hit)}.lhow .k.n{background:var(--near)}.lhow .k.o{background:var(--off)}
/* the closeness scale, in the game's own colours (closeCol in app.js mixes the same three) */
.kscale{display:inline-flex;gap:2px;margin-right:6px;vertical-align:-1px}.kscale i{width:13px;height:13px;border-radius:3px;background:var(--miss)}
.kscale i:nth-child(2){background:color-mix(in oklch,var(--near) 55%,var(--miss))}.kscale i:nth-child(3){background:var(--near)}.kscale i:nth-child(4){background:color-mix(in oklch,var(--hit) 60%,var(--near))}
@media (max-width:820px){#lfilt .tgl{width:100%}#lfilt .seg2{flex:1 1 auto}#lfilt div:first-child .seg2{display:grid;grid-template-columns:repeat(4,1fr)}#lfilt .seg2 button{flex:1;padding:8px 9px;font-size:14px}.lhero{grid-template-columns:minmax(0,1fr)}.lart{max-width:480px;margin:-10px 0 -10px -24px}.lhero.ret{grid-template-columns:minmax(0,1fr) 190px;gap:4px;margin:0}.lhero.ret .lart{margin:0}.lhero.ret h1{font-size:28px}.lhero.ret .lht p{display:none}.lhow{grid-template-columns:minmax(0,1fr)}}
/* a level's page: you can make patches too */
.lown{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 24px;background:var(--panel);border-radius:6px;padding:12px 18px}
.lown p{margin:0;font-size:14.5px;line-height:1.45;color:var(--mute)}.lown b{color:var(--ink)}
.lown[hidden]{display:none}
/* who made the patch, beside its name on the play page */
.pcredit{font-size:14px;font-weight:600;color:var(--mute);margin-left:10px}.pcredit:empty{display:none}
.ltile{width:100%;height:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px 18px;border-radius:8px;background:var(--panel);text-align:left;color:var(--ink)}
.ltile:hover{box-shadow:0 0 0 2px var(--acc)}
.ltile b{padding-right:36px;font-size:17px;letter-spacing:-.01em;display:flex;align-items:center;gap:6px;max-width:100%;box-sizing:border-box}
/* one line per name, so every tile stays the same size; the full name shows on hover (the tile's title) */
.ltile .lnm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ltile{justify-content:center;min-height:64px}
.lnew{position:absolute;top:-7px;left:14px;pointer-events:none;font-style:normal;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;background:var(--acc);color:var(--panel);border-radius:3px;padding:1px 6px}
.pstats{--n:4}.pby{display:grid;gap:10px}
/* the public Sandbox is Create without anything about publishing */
.app[data-sandbox] .ocx,.app:not([data-sandbox]) .ocs{display:none!important}
.paused{max-width:520px;margin:18vh auto 0;padding:0 16px;text-align:center}.paused h1{font-size:24px;margin:0 0 8px}.paused p{color:var(--mute);margin:0 0 20px}
/* phones: the logo and the icons on one row, the page links on the next; blocks grow to fit their controls */
@media (max-width:600px){.nav{gap:6px 10px;padding-inline:12px!important}.nav::after{content:'';order:1;flex-basis:100%}#nlevels,#nlearn,#nsandbox,#nleaderboard,#nadmin{order:2}.nav .grow{display:none}.nav .ib{margin:0}#nprofile{margin-left:auto!important}
  .board>*{aspect-ratio:auto!important;min-height:170px} /* !important: fitCols sets the Output's ratio inline */
  .th .vm,.th kbd{display:none}.brand{font-size:15px;gap:5px;margin-right:0}.ehome{margin-right:0}.ehome,.brand{padding:3px!important}.nav{gap:6px 8px}.lctl{width:100%}.lhead .dtabs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;flex:1 1 auto}.lhead .dtab{justify-content:center}
  .gpanel:has(#gcount:not(.clock)){flex-direction:row;align-items:center;justify-content:space-between;padding:8px 14px}.gpanel #gcount:not(.clock){font-size:28px}
  .gpanel:has(#gcount:not(.clock))::before{content:'Guesses';font-size:11px;font-weight:800;letter-spacing:1.1px;text-transform:uppercase} /* a slim labelled row, not a big box holding a bare number */
  .row2:has(#cex){flex-wrap:wrap}#cex{flex:1 1 100%}#cph{flex:1;min-width:0} /* the start menus: the example list on its own row, so neither is cut off */
 .lhead .dtabs.one{grid-template-columns:1fr;flex:none;width:100%;box-sizing:border-box}}

.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* player submissions: the Sandbox's Submit box, the credit on library cards, the admin's queue */
.subbox{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:8px;background:var(--tint)}
.subwho{margin:0;font-size:12.5px;line-height:1.4}.subwho a{color:inherit}
.subbox .msg{font-size:12px}
.rhl{display:grid;grid-template-columns:90px minmax(0,1fr) 220px;gap:12px;align-items:center;margin-bottom:10px}.rhl h3{margin:0;font-size:15px}
.rhrow{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.rhrow li{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border-radius:6px;background:var(--panel);font-size:13px;min-width:0}
.rhrow li b{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rhrow li span{font-size:11.5px;font-weight:700;color:var(--mute)}
.rhrow li.pin{box-shadow:inset 3px 0 0 var(--acc)}.rhrow li.pin span{color:var(--acc)}.rhrow li.off{opacity:.6}
@media (max-width:900px){.rhl{grid-template-columns:minmax(0,1fr)}.rhrow{grid-template-columns:repeat(2,minmax(0,1fr))}}
.fbtext{min-height:72px;resize:vertical;font:inherit;font-size:13px;padding:8px}
.fblist li{display:flex;gap:12px;align-items:baseline}.fblist p{margin:0;flex:1 1 14em;white-space:pre-wrap;overflow-wrap:anywhere} /* 14em: on a phone the note takes its own line instead of a column a letter wide */
.fblist li{flex-wrap:wrap}.fbwho{font-size:12px;font-weight:700;color:var(--mute);font-family:ui-monospace,monospace}.fbrep{flex-basis:100%;display:flex;gap:8px;align-items:center}.fbrep .field{flex:1;min-width:0}
/* the player's own notes, each with the admin's reply */
.fbmine{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:12.5px}.fbmine[hidden]{display:none}
.fbmine li{background:var(--panel);border-radius:4px;padding:6px 8px}.fbmine p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.fbmine .fbr{margin-top:4px;color:var(--ink)}.fbmine .fbw{margin-top:2px;color:var(--mute)}
/* tags: picked with the site's segmented switches (a group holds tags that exclude each other), in Create and behind
   Filter on a level's page; the type alone on a tile; all of them beside a patch's name */
.tgl{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--mute)}.tgl small{font-weight:600;letter-spacing:0;text-transform:none}
.ctags{display:flex;flex-direction:column;gap:6px}.ctags .seg2 button{padding:5px 2px}
.tty .seg2{display:grid;grid-template-columns:repeat(4,1fr)}.tch{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.lfilt{display:flex;flex-direction:column;gap:8px;margin:12px 0 2px;padding:12px 14px;border-radius:6px;background:var(--panel)}.lfilt[hidden]{display:none}
.lfilt div{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.lfilt .tgl{width:92px}
.lfilt .seg2{flex-wrap:wrap}.ctags .seg2 button{font-size:12px;letter-spacing:-.01em}.lfilt .seg2 button{flex:none;padding:5px 11px}
.ltile .ltag,.ptags i{font-size:11px;font-weight:700;font-style:normal;padding:1px 6px;border-radius:0;background:var(--tint);color:var(--mute);white-space:nowrap}
.ptags{display:inline-flex;gap:5px;margin-left:10px;vertical-align:2px}.ptags:empty{display:none}.ptags i{font-size:12px;padding:2px 9px}
.ltile .lby{font-size:12px;font-weight:600;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
/* the credit sits beside the type, so a credited tile is no taller than the rest */
/* how many controls a patch puts in play; Solved sits on the top edge like New, at the other end */
.ltile .lcount{font-size:12px;font-weight:600;color:var(--mute)}
.ltile .lmeta:empty{display:none}
/* Crowd favourites: its own tray, sunk like the rack the synth blocks sit in and lit by the accent; the level is named, since the row mixes them */
.lsec.loved{position:relative;padding:18px 20px 20px;border-radius:10px;overflow:hidden;
  background:radial-gradient(110% 160% at 0 0,color-mix(in srgb,var(--acc) 22%,transparent),transparent 65%),color-mix(in srgb,var(--acc) 9%,var(--bg));
  box-shadow:inset 0 1px 3px rgba(0,0,0,.18),inset 0 0 0 1px color-mix(in srgb,var(--acc) 35%,transparent)}
.lsec.loved header{align-items:center;margin-bottom:14px}
.lsec.loved header p{color:color-mix(in srgb,var(--ink) 72%,transparent)}
.lfav{width:34px;height:34px;flex:none;border-radius:6px;display:grid;place-items:center;background:var(--acc);color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),inset 0 -1.5px 0 rgba(0,0,0,.2),0 1px 2px rgba(0,0,0,.3)}
.lfav .ic{width:19px;height:19px;stroke-width:2;fill:color-mix(in srgb,#fff 25%,transparent)}
@media (max-width:480px){.lsec.loved{padding:14px 12px 14px;margin:0 -4px}.lsec.loved header p{flex-basis:100%}}
.ltile .ltag.lvl{background:var(--acc);color:var(--panel)}
.lsolved{position:absolute;top:-7px;right:14px;pointer-events:none;display:flex;align-items:center;gap:3px;font-style:normal;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;background:var(--hit);color:#fff;border-radius:3px;padding:1px 6px 1px 4px} /* the grading green: the owner's pick, though green is otherwise kept for grading */
.lsolved .ic{width:12px;height:12px;stroke-width:3}
.ltile .lmeta{display:flex;align-items:center;gap:8px;max-width:100%;padding-right:36px;box-sizing:border-box}
.subq li{align-items:center}.subq .lplay{position:static;transform:none}
.lnk.ok{color:var(--acc);font-weight:800}
.th .byr{font-size:11px;white-space:nowrap}

/* the server-bill appeal: a strip above the nav, as wide as it, and the nav's button (a heart alone where the nav is tight).
   White text on the light themes' accents; their dark background colour on the dark themes' brighter ones */
.dstrip{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 16px;padding:10px 48px 10px 16px;border-radius:6px;background:var(--acc);color:#fff;position:relative;text-align:center;font-size:14.5px;line-height:1.4}
.dstrip p{margin:0}
.dgo{background:#fff;color:#161616;font-weight:700;padding:6px 14px;border-radius:5px;text-decoration:none;white-space:nowrap}
#dhide{position:absolute;right:8px;top:50%;transform:translateY(-50%);color:inherit}
.dbtn{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 14px;border-radius:16px;background:var(--acc);color:#fff;font-weight:700;font-size:14px;white-space:nowrap}
.dbtn .ic{width:15px;height:15px;fill:currentColor;stroke:none}
[data-skin="night"] :is(.dstrip,.dbtn){color:var(--bg)}
.dbtn:hover{filter:brightness(1.1)}
.dbtn:focus-visible,.dgo:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
@media (max-width:900px){.dbtn{width:32px;padding:0;justify-content:center}.dbtn span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
#donate .dpay,#donate .dpay:hover{background:var(--acc);color:#fff} /* an id, to beat hw.css's tab-button colours */
[data-skin="night"] #donate .dpay{color:var(--bg)}
@media (max-width:600px){#dbtn{margin-left:auto}#dbtn~#nprofile{margin-left:0!important}} /* phones: the page links fill the second row, so the heart sits with the icons on the first */
#donate .lnk{align-self:center;color:var(--mute)}
/* the nav's link to 20 Questions: a raised button like the site's others, the question marks from its logo (the cut-outs
   between them take the panel's colour) and one of five wordings. Where the nav is tight the heart button drops its
   words; on phones the link is only the question marks, with a thinner ring and tighter gaps so the icons' row still fits */
.nav a.nq{display:inline-flex;align-items:center;gap:8px;padding:5px 11px 5px 8px;margin:4px;border:none;border-radius:3px;background:var(--panel);color:var(--ink);font-size:13px;font-weight:500;white-space:nowrap;
  box-shadow:inset 0 1px 0 var(--hl),0 1px 0 rgba(0,0,0,.2),0 1px 2px var(--drop),0 0 0 3px var(--tint),0 0 0 4px color-mix(in srgb,var(--tint) 70%,#000 6%)}
.nav a.nq:hover{filter:brightness(1.03)}
.nav a.nq:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
.nav a.nq[hidden]{display:none}
.nq .qm{display:block;flex:none}.nq .qcut{fill:none;stroke:var(--panel);stroke-width:90;stroke-linejoin:round}.nq .qdk{fill:var(--ink)}
.nq b{font-weight:800}.nq i{font-style:normal;font-weight:800;color:var(--acc)}
.nq em{font-style:normal;font-size:10.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--acc)}
@media (min-width:1101px) and (max-width:1300px){.nav:has(#nq:not([hidden])) .dbtn{width:32px;padding:0;justify-content:center}.nav:has(#nq:not([hidden])) .dbtn span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
@media (min-width:601px) and (max-width:1100px){.nav a.nq{margin-left:auto}#nq:not([hidden])~#dbtn{margin-left:0}} /* where the heart starts the icons' row, the link does instead */
@media (max-width:600px){.nav:has(#nq:not([hidden])){column-gap:6px}.nav a.nq{padding:3px 4px;margin:0 6px 0 auto;box-shadow:inset 0 1px 0 var(--hl),0 1px 0 rgba(0,0,0,.2),0 0 0 2px var(--tint),0 0 0 3px color-mix(in srgb,var(--tint) 70%,#000 6%)}.nq span{display:none}#nq:not([hidden])~#dbtn{margin-left:0}}
@media (max-width:380px){.nav:has(#nq:not([hidden])){column-gap:2px;padding-inline:8px!important}} /* the narrowest phones: room for the question marks on the icons' row */

/* the admin's Most liked chart: a fixed blue/orange pair per mode (checked for colour blindness on every theme's
   surface), not the theme's accent; the counts are printed, so colour is never the only cue */
#review{--up:#2a78d6;--dn:#eb6834}
[data-skin="night"] #review{--up:#3987e5;--dn:#d95926}
.rlegend{display:flex;gap:16px;font-size:13px;color:var(--mute);margin:0 0 10px}
.rlegend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:-1px}.rlegend .u{background:var(--up)}.rlegend .d{background:var(--dn)}
.rlike{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.rlike li{display:grid;grid-template-columns:minmax(120px,220px) 1fr 1fr;align-items:center;column-gap:2px;font-size:13.5px}
.rlike b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:10px}
.rlike span{display:flex;align-items:center;gap:6px;height:18px}
.rlike .rdn{flex-direction:row-reverse}
.rlike i{height:14px;width:calc((100% - 34px)*var(--w))}
.rlike .rup i{background:var(--up);border-radius:0 4px 4px 0}
.rlike .rdn i{background:var(--dn);border-radius:4px 0 0 4px}
.rlike em{font-style:normal;font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums}
@media (max-width:600px){.rlike li{grid-template-columns:1fr 1fr}.rlike b{grid-column:1/-1}}

/* admin charts (migration 0047): the filters in one row, one chart on a plain panel, and rows of bars on a shared scale.
   Flat: only the data has colour. Solved and gave up are the Most liked chart's checked blue and orange */
.afilt{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.afilt .seg2 button,.amet .seg2 button,.mtop .seg2 button{flex:none;padding:5px 10px}
.adates{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--mute)}.adates[hidden]{display:none}
.adates .field{height:30px;padding:0 8px}
.amet{display:flex;flex-wrap:wrap;gap:8px 18px}
.amg{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0}.amg>span{font-size:12px;font-weight:600;color:var(--mute)}
.afilt .seg2,.amet .seg2,.mtop .seg2{flex-wrap:wrap}
.achart{background:var(--panel);border-radius:8px;padding:16px 16px 6px;min-height:200px;transition:opacity .15s}
.achart.busy{opacity:.5}
.ahead{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin-bottom:12px}
.ahead b{font-size:28px;font-weight:700;line-height:1}
.ahead span{font-size:13px;color:var(--mute)}.ahead .apeak{margin-left:auto}
.aplot{display:block;width:100%;height:auto;outline:none}
.aplot:focus-visible{outline:2px solid var(--ink);outline-offset:4px;border-radius:2px}
.aplot text{font-size:11px;fill:var(--mute);font-variant-numeric:tabular-nums}
.agrid line{stroke:var(--tint);stroke-width:1}.abase{stroke:var(--tint2);stroke-width:1}
.abars path{fill:var(--acc)}.abars path.on{fill:color-mix(in srgb,var(--acc) 72%,var(--ink))}
.rtip{position:fixed;z-index:50;pointer-events:none;display:flex;flex-direction:column;gap:1px;padding:6px 9px;border-radius:6px;background:var(--ink);color:var(--panel);font-size:12.5px;white-space:nowrap}
.rtip[hidden]{display:none}.rtip b{font-size:15px;font-weight:700}.rtip span{opacity:.75}
.mtop{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.mleg{display:flex;flex-wrap:wrap;gap:14px;margin:0;font-size:12.5px;color:var(--mute)}
.mleg i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:-1px}
.mbars{list-style:none;margin:0;padding:10px 16px;background:var(--panel);border-radius:8px;display:grid;grid-template-columns:minmax(140px,240px) minmax(0,1fr) auto auto;column-gap:16px}
.mbars.mpub,.mbars.mlb{grid-template-columns:minmax(140px,260px) minmax(0,1fr) auto auto auto}
.mbars li{display:contents}.mbars li>*{padding:5px 0;align-self:center}
.mn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.mn b{font-weight:600}.mn small{margin-left:8px;font-size:12px;color:var(--mute)}
.mtrack{display:flex;gap:2px;height:12px}
.mtrack i{display:block;height:100%;min-width:2px}.mtrack i:last-child{border-radius:0 4px 4px 0}
.mtrack .s,.mleg .s{background:var(--up)}.mtrack .g,.mleg .g{background:var(--dn)}.mtrack .o,.mleg .o{background:var(--tint2)}
.mc{text-align:right;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.md{white-space:nowrap;font-size:13px;color:var(--mute)}
.ma{display:flex;gap:12px;white-space:nowrap}
.mbars li.z>.mc,.mbars li.z>.md{opacity:.5}.mbars li.off>:not(.ma){opacity:.45}
/* phones: each row a small block, name and count on top, the bar across, then the detail and the actions */
@media (max-width:600px){.ahead .apeak{margin-left:0;width:100%}
  .mbars,.mbars.mpub,.mbars.mlb{display:flex;flex-direction:column;gap:12px;padding:12px}
  .mbars li{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"n c" "b b" "d a";column-gap:12px;row-gap:4px}
  .mbars li>*{padding:0}.mn{grid-area:n}.mc{grid-area:c}.mtrack{grid-area:b}.md{grid-area:d;white-space:normal;font-size:12.5px}.ma{grid-area:a;align-self:end}}
/* leaderboard (migration 0043), and the library home's temporary question about joining it */
.app[data-mode="leaderboard"] #leaderboard{display:flex}
.ranks{flex-direction:column;gap:18px;max-width:860px;width:100%;margin:8px auto 0}
.rkh h1{font-size:30px}.rkh p{margin:6px 0 0;color:var(--mute)}
.rkme,.lbask{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 24px;background:var(--panel);border-radius:6px;padding:14px 18px}
.rkme:empty,.lbask[hidden]{display:none}
.rkme>div:first-child,.lbask>div:first-child{flex:1 1 320px;min-width:0}
.rkme p,.lbask p{margin:3px 0 0;font-size:14px;line-height:1.45;color:var(--mute)}
.lbask b a{color:inherit}
.rkme p a,.lbask p a{color:var(--ink)}
.rkname{font-weight:800;letter-spacing:.08em;white-space:nowrap}
.rkbtns{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}.rkbtns .btn{height:38px;font-size:14px}.rkbtns .lnk{color:var(--mute);font-size:14px}
.rkbtns .btn:disabled{opacity:.55;cursor:default}
.rklist{background:var(--panel);border-radius:6px;padding:6px 10px}
.rkmsg{font-size:13px;padding:10px 6px 6px}
.rktbl{width:100%;border-collapse:collapse;font-size:14.5px;font-variant-numeric:tabular-nums}
/* headings: one line each, on one baseline; the numbers' headings are buttons that rank by that column */
.rktbl th{font-size:11.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--mute);font-weight:800;text-align:right;padding:10px 10px 8px;vertical-align:bottom;white-space:nowrap;line-height:1.2}
/* every heading's text sits in the same box, so the plain ones (# and Player) line up with the buttons */
.rktbl th>*{display:inline-block;padding:2px 0;border-bottom:2px solid transparent}
.rktbl th button{all:unset;display:inline-block;cursor:pointer;padding:2px 0;border-bottom:2px solid transparent}
.rktbl th button:hover{color:var(--ink)}.rktbl th button:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.rktbl th.on{color:var(--acc)}.rktbl th.on button{border-color:var(--acc)}
.rktbl th.on button::after{content:'↓';margin-left:4px}.rktbl th.on[aria-sort="ascending"] button::after{content:'↑'}
.rktbl td{text-align:right;padding:9px 10px;border-top:1px solid var(--tint);white-space:nowrap}
/* the column it's ranked by */
.rktbl td.on{font-weight:800;background:color-mix(in srgb,var(--acc) 8%,transparent)}
.rktbl .rkn{text-align:left;width:2.6em;color:var(--mute);font-weight:700}
.rktbl .rkn.top{color:var(--acc);font-weight:900} /* places 1–3, ties included */
.rktbl .rkp{text-align:left;width:100%;max-width:0;font-weight:700}
.rkp div{display:flex;align-items:center;gap:4px 8px;min-width:0;flex-wrap:wrap}.rkp span{white-space:normal;overflow-wrap:anywhere;letter-spacing:.04em} /* long names wrap between words, never cut off */
.rkp em{flex:none;font-style:normal;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;background:var(--acc);color:#fff;border-radius:3px;padding:1px 6px}
[data-skin="night"] .rkp em{color:var(--bg)}
.rkmeta{display:none}
.rktbl tr.me td{background:color-mix(in srgb,var(--acc) 16%,transparent)}
/* your own row, under the top when you're further down */
.rkyou tr:first-child td{border-top:2px dashed var(--tint2)}
/* phones: only the ranked column; the other numbers go under the name, and its heading steps to the next */
@media (max-width:600px){.rkh h1{font-size:26px}.rkme,.lbask{padding:12px 14px}.rklist{padding:4px 6px}
  .rktbl{font-size:14px}.rktbl th,.rktbl td{padding:8px 6px}.rktbl .rkn{width:2em}
  .rktbl .rkv:not(.on){display:none}.rktbl td.on{font-size:16px}
  .rkmeta{display:block;font-size:12px;font-weight:500;color:var(--mute);white-space:normal;margin-top:2px}}
/* a level's pages (LPAGE in app.js): links, so Back and new tabs keep the page */
.pgw{margin-top:10px}
.pager a.sbtn{display:inline-flex;align-items:center;justify-content:center;height:36px;min-width:42px;padding:0 8px;text-decoration:none;font-weight:700;font-variant-numeric:tabular-nums}
.pager .sbtn.on,.pager .sbtn.on:hover{background:var(--ink);color:var(--panel)}
.pgof{margin:8px 0 0;text-align:center;font-size:13px;color:var(--mute);font-variant-numeric:tabular-nums}
@media (max-width:600px){.pager{flex-wrap:nowrap}.pager a.sbtn{min-width:38px;padding:0 6px;margin:4px 2px}} /* phones: the arrows stay on the numbers' row */
/* tablets and small laptops: one row can't hold the page links, the heart's words and the icons, so (as on phones) the
   heart and icons go up with the logo and the page links get the row below */
@media (min-width:601px) and (max-width:1100px){.nav{row-gap:6px}.nav::after{content:'';order:1;flex-basis:100%}#nlevels,#nlearn,#nsandbox,#nleaderboard,#nadmin{order:2}.nav .grow{display:none}#dbtn{margin-left:auto}.nav .ib{margin:0}}
/* the admin's five page links on the narrowest phones: a touch smaller, so they stay on one row */
@media (max-width:380px){.nav:has(#nadmin){column-gap:4px}.nav:has(#nadmin) :is(#nlevels,#nlearn,#nsandbox,#nleaderboard,#nadmin){font-size:13px}}

/* locked blocks: set by the patch's maker, never guessed. Laid out like any block (graph, readout, rows), with their own
   in the same ink as every block (no colour of their own), marked only by the lock in the header */
.lkt{color:var(--mute)}
.lkt{display:inline-flex}.lkt .ic{width:13px;height:13px;stroke-width:2.2}
.blk.lkb .gw.lkg{padding:0}
.crvw{position:relative;flex:1;min-height:0;margin:5px 6px}
.crvw>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.crvw.ed{cursor:crosshair;touch-action:none}
.crvw .cgrid line{stroke:var(--gl);stroke-width:.6}
.crvw .cfill{fill:var(--ink);fill-opacity:.1}
.crvw .cline{fill:none;stroke:var(--ink);stroke-width:2;stroke-linejoin:round}
.cpt,.cbd,.eqh{position:absolute;transform:translate(-50%,-50%);border-radius:50%;box-sizing:border-box}
.cpt{width:10px;height:10px;background:var(--screen,var(--panel));border:2px solid var(--ink);cursor:grab}
.cbd{width:7px;height:7px;background:var(--ink);opacity:.45;cursor:ns-resize}
.cpt:hover,.cbd:hover{background:var(--ink);opacity:1}
.eqh{width:15px;height:15px;display:grid;place-items:center;font-size:9px;font-style:normal;font-weight:800;line-height:1;color:var(--ink);background:var(--screen,var(--panel));border:1.5px solid var(--ink)}
.eqh[data-eqh]{cursor:grab}
.eqh.sel{background:var(--ink);color:var(--screen,var(--panel))}
.aroll{flex:1;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));gap:2px;margin:5px 6px;min-height:0}
.aroll i{background:color-mix(in srgb,var(--ink) 7%,transparent);border-radius:1.5px;cursor:pointer}
.aroll i.bar{background:color-mix(in srgb,var(--ink) 12%,transparent)}
.aroll i.on{background:var(--ink)}
.aroll.lkro i{cursor:default}
.r.lkr .rl{width:42px}
.r.lkr .dd{min-width:0}
/* a value: step squares, or for fine ones the filled bar with the number on it, as on every block */
.sqs.lksq{cursor:pointer}.sqs.lksq:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
select.lkdd{appearance:none;-webkit-appearance:none;border:0;cursor:pointer;padding-right:18px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23888' stroke-width='2.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 3px center;background-size:11px;text-overflow:ellipsis}
.plock{display:flex;gap:6px;align-items:flex-start;margin:8px 0 0;padding:7px 9px;border-radius:4px;font-size:12px;line-height:1.4;background:var(--cell)}
.plock .ic{width:14px;height:14px;flex:none;color:var(--mute);margin-top:1px}
@media (max-width:640px){
  .blk.lkb:not(.wide) .lkt{display:none} /* a phone's square has room for the name or the lock, not both */
  #board .blk.lkb.wide{aspect-ratio:auto}#board .blk.lkb.wide .gw.lkg{min-height:130px} /* rows take more of a phone's width: the block grows rather than squash its graph */
}
/* the drawer's note about locked blocks (Sandbox and Create): its own line under the chips */
.lknote{flex-basis:100%;display:flex;gap:7px;align-items:flex-start;margin:2px 2px 0;font-size:12px;line-height:1.45;color:var(--mute)}
.lknote b{color:var(--ink)}.lknote .ic{width:13px;height:13px;flex:none;margin-top:2px}
/* Profile: your submissions, a row each with its status (accent: in the library; plain: waiting; faded: declined) */
.psubl{display:grid;gap:6px}.psub{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:6px;background:var(--cell);min-width:0}
.psub b{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.psub small{color:var(--mute);font-size:12px;flex:1;white-space:nowrap}
.psst{font:700 11px ui-monospace,monospace;letter-spacing:.04em;padding:3px 8px;border-radius:999px;background:var(--tint);color:var(--ink);white-space:nowrap}
.psst.approved{background:var(--acc);color:#fff}.psst.rejected{background:transparent;color:var(--mute);box-shadow:inset 0 0 0 1px var(--tint2)}
.psub .lnk{font-size:12px}
/* the leaderboard's two boards: Players and Patch makers */
.rktabs{margin-top:12px;display:inline-flex}.rktabs button{white-space:nowrap}
.rkps{display:block;font-size:12px;color:var(--mute);margin-top:2px;line-height:1.4;white-space:normal}.rkps a{color:inherit}
