/* Skins set the neutrals; the accent is the player's pick. Green, yellow and red are reserved for feedback in every skin. */
:root{
  --bg:#e4e4de; --panel:#ffffff; --cell:#f0f0ec; --tint:#d9d9d2; --tint2:#c6c6be; --ink:#171717; --mute:#64645e; --gl:#d9d9d2; --tgt:#171717;
  --acc:#4f9f4a; --hit:#5fa85a; --near:#f0b400; --miss:#dc4b3f;
  --font:"Figtree",system-ui,sans-serif; color-scheme:light;
}
:root[data-skin="night"]{--bg:#121318; --panel:#1d1f26; --cell:#262933; --tint:#2b2e38; --tint2:#393d4a; --ink:#ecebf2; --mute:#8f91a0; --gl:#2e313c; --tgt:#0a0b0e; 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:50;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 h2{font-size:20px}
.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)}
.target.playing{box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 35%,transparent)}
.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}
.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;display:flex;align-items:baseline;gap:8px}
.lvl b{font-size:26px;font-weight:700}
.lvl span{font-size:12.5px;color:var(--mute)}
.lvl.bad b{color:var(--miss)}
.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 input{width:62px}
.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}
.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}
.board>*{container-type:inline-size}
@container (max-width:178px){.blk .r{height:18px}.blk .gw{padding:0}.blk{gap:3px}.blk .opts button{height:15px}.blk .stp{height:15px}}
.fxnote{font-size:12px;color:var(--mute)}
.fxnote em{font-style:normal;font-size:11.5px;font-weight:700;padding:2px 7px;border-radius:3px;color:#fff}
.fxnote em.hit{background:var(--hit)}.fxnote em.miss{background:var(--miss)}
.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}
.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}
.blk h3{font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;margin-right:auto}
.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:hover{background:var(--cell);color:var(--ink)}
.hb .ic{width:13px;height:13px}
.hb.mu{color:var(--miss)}
.board.live .blk{box-shadow:inset 0 0 0 2px var(--acc)}
.board.live .blk:has(.hb.mu),.board.live .blk.quiet{box-shadow:none}
/* a whole block that isn't in the target: red band and a red wash, unlike a single red control */
.blk.bmiss{background:color-mix(in srgb,var(--miss) 9%,var(--panel))}
.blk.bmiss header{margin:-7px -8px 0;padding:0 8px;height:26px;background:var(--miss);color:#fff}
.blk.bmiss header .hb{color:#fff}
.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}
.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.z,.r .sqs i.z{background:transparent!important}
.sqs i{flex:1;background:var(--tint);border-radius:2px}
.sqs i.on{background:var(--ink)}
.sqs[aria-disabled="true"]{cursor:default}
.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(--mute)}
.stp button .ic{width:11px;height:11px}
.stp span{font-size:11.5px;font-weight:600}
.r.hit,.r.near,.r.miss{color:#fff}
.r.hit{background:var(--hit)}.r.near{background:var(--fc,var(--near))}.r.miss{background:var(--miss)}
.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}
.flw{height:300px;overflow-y:auto;overflow-x:hidden;border-radius:4px;background:var(--cell);display:flex;align-items:flex-start;overscroll-behavior:contain}
.flk{width:58px;flex:none;position:sticky;left:0;z-index:2;cursor:pointer;border-right:1px solid var(--tint2)}
.fk{box-sizing:border-box;border-bottom:1px solid #dcdcd6;background:#fdfdfb;display:flex;align-items:center;justify-content:flex-end;padding-right:5px;position:relative}
.fk.b{background:#2a2a2c}
.fk.b::after{content:"";position:absolute;right:0;top:0;bottom:0;width:18px;background:#f9f9f7}
.fk span{font-size:9.5px;font-weight:700;color:#6f6f6a;position:relative;z-index:1}
.fk.c span{color:#171717}
.flg{position:relative;flex:1;touch-action:none;cursor:crosshair;overflow:hidden}
.fr{box-sizing:border-box;border-bottom:1px solid color-mix(in srgb,var(--tint) 60%,transparent)}
.fr.b{background:color-mix(in srgb,var(--tint) 55%,transparent)}
.fr.c{border-bottom-color:var(--tint2)}
.fgl{position:absolute;inset:0;pointer-events:none;background-image:repeating-linear-gradient(to right,var(--tint2) 0 2px,transparent 2px 25%),repeating-linear-gradient(to right,var(--tint) 0 1px,transparent 1px 6.25%),repeating-linear-gradient(to right,color-mix(in srgb,var(--tint) 50%,transparent) 0 1px,transparent 1px 1.5625%)}
.fn{position:absolute;background:var(--acc);border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18);cursor:move;display:flex;align-items:center;overflow:hidden}
.fn span{font-size:9.5px;font-weight:700;color:#fff;padding-left:4px;pointer-events:none;white-space:nowrap}
.fn .fe{position:absolute;right:0;top:0;bottom:0;width:7px;cursor:ew-resize}
.fn .fe::after{content:"";position:absolute;right:2px;top:25%;bottom:25%;width:1.5px;background:rgba(255,255,255,.6)}
.pph{position:absolute;top:0;bottom:0;width:2px;left:-4px;background:var(--ink);opacity:.6;pointer-events:none;z-index:1}
.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{grid-template-columns:272px minmax(0,1fr);gap:16px 22px;align-items:start}
.grow{flex:1}
.brand{display:inline-flex;align-items:center;gap:9px;font-weight:700;font-size:22px;letter-spacing:-.03em;color:var(--ink)!important;text-decoration:none;border:none!important;margin-right:10px}
.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}
.me{display:inline-flex;align-items:center;gap:12px;font-size:12.5px;color:var(--mute);font-weight:600}
.me>span{display:inline-flex;align-items:center;gap:4px;line-height:1}
.me b{color:var(--ink);font-size:14px}
.me .lv{background:var(--ink);color:var(--panel);border-radius:4px;padding:2px 7px;font-size:11.5px;font-weight:700}
.me .ic{width:15px;height:15px;color:var(--acc);display:block}
.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}
.fxnote:empty{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}}
.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}}
.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;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)}

/* 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,.fk span,.fn 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}
.flk{border-right-width:2px}.fr.c{border-bottom-width:2px}
.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"]),select,summary,[data-pick],[draggable="true"],.flk,.fn),
:root[data-cursor="eski"] :is(a,button:not(:disabled),[data-pick],[draggable="true"]) *{cursor:var(--curp)!important}
:root[data-cursor="eski"] :is(input,textarea){cursor:text!important}
:root[data-cursor="eski"] .fn .fe{cursor:ew-resize!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 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}
/* difficulty stars */
.stars{display:inline-flex;align-items:center;gap:1px;color:var(--tint2);font-size:12px;font-weight:700}
.stars i{display:grid}
.stars .ic{width:13px;height:13px;fill:currentColor;stroke:none}
.stars i.on{color:var(--ink)}
.stars em{font-style:normal;color:var(--mute);margin-left:6px}
.dcard .stars{color:rgba(255,255,255,.3)}.dcard .stars i.on{color:#fff}.dcard .stars em{color:rgba(255,255,255,.7)}
.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}
.lpi .stars{margin-top:4px}
.phead .stars{background:var(--panel);border-radius:4px;padding:3px 8px}
.tc .stars{margin-bottom:2px}

/* segmented sliders: rounded ends, square inner edges */
.sqs:not(.bar) i{border-radius:0}
.sqs:not(.bar) i:first-child,.sqs:not(.bar) i.z+i{border-radius:3px 0 0 3px}
.sqs:not(.bar) i:last-child{border-radius:0 3px 3px 0}
.sqs:not(.bar) i.z+i:last-child,.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 .gh{display:flex;align-items:baseline;justify-content:space-between}
.gpanel .gh span{font-size:11px;letter-spacing:.09em;text-transform:uppercase;font-weight:800;color:var(--mute)}
.gpanel .gh b{font-size:30px;line-height:1;font-weight:800}
.grows{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow:auto}
.gw2{display:flex;align-items:center;gap:8px}
.gw2 .gi{width:16px;font-size:12px;font-weight:800;color:var(--mute);text-align:right;flex:none}
.gcells{display:flex;flex-wrap:wrap;gap:3px;flex:1;min-width:0}
.gcells i{width:16px;height:16px;border-radius:3px}
.gw2 .gs{font-size:12.5px;font-weight:800;flex:none}
.gkey{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--mute);font-weight:600;border-top:2px solid var(--tint);padding-top:8px}
.gkey span{display:flex;align-items:center;gap:7px}
.gkey i{width:14px;height:14px;border-radius:3px;flex:none}

.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}
.gcells i{width:13px;height:13px}

/* 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}
.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 .stars{color:rgba(255,255,255,.35)}.card.solved .stars i.on{color:#fff}.card.solved .stars em,.card.solved .cnt{color:rgba(255,255,255,.85)}
.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 */
:root:not([data-dailies]) [data-daily],:root[data-dailies] [data-nodaily]{display:none}.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 */
.lm{display:flex;align-items:center;gap:8px;font-size:10.5px;font-weight:700;flex:none;--r:0;--p:0}
.lm span{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;text-align:right;font-variant-numeric:tabular-nums}
.yours.empty .lm{opacity:.35}
.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}
#ldaily,#lcards{transition:opacity .25s}
.lload{position:absolute;left:0;right:0;top:60px;display:flex;flex-direction:column;align-items:center;gap:12px;font-size:13px;font-weight:700;color:var(--mute);z-index:2}
.lload[hidden]{display:none}
.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}}
