/* Woodshed — UI design language shared with "modular": near-black warm bg, one amber accent, hairline panels. */
:root {
  --bg: #0d0c0f; --ink: #e8e4dc; --dim: #8f8a82; --faint: #5d5952;
  --panel: rgba(18, 17, 21, 0.92); --panel-solid: #121115; --raise: rgba(255, 255, 255, 0.04); --raise2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.08); --line2: rgba(255, 255, 255, 0.14);
  --amber: #e2b04a; --amber-dim: rgba(226, 176, 74, 0.16); --rh: #58c4f0; --lh: #f07096; --bad: #c85446;
  --r: 4px;
  --display: "Barlow Condensed", "Barlow", "Arial Narrow", system-ui, sans-serif;
  --body: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body); overflow: hidden; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; margin: 0; text-transform: uppercase; }
h2 { font-size: 20px; } h3 { font-size: 18px; }
small { color: var(--dim); font-size: 12px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2); border-radius: var(--r); padding: 6px 8px; outline: none; }
input:focus, select:focus, button:focus-visible { border-color: var(--amber); outline: none; box-shadow: 0 0 0 1px var(--amber); }
input.num { width: 64px; text-align: center; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; border: 0; padding: 0; min-width: 90px; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: var(--line2); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; background: var(--amber); border: 0; }
input[type=range]::-moz-range-track { height: 3px; background: var(--line2); } input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--amber); border: 0; }
output { font-family: var(--display); font-weight: 600; font-size: 16px; min-width: 52px; text-align: right; color: var(--ink); }

.wordmark { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 0.14em; line-height: 1; }
.wordmark span { color: var(--amber); }
.wordmark.big { font-size: clamp(64px, 13vw, 168px); letter-spacing: 0.06em; }
.display { font-size: 44px; line-height: 1; }

.btn { background: var(--raise); border: 1px solid var(--line2); border-radius: var(--r); padding: 8px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; transition: background .15s, border-color .15s, transform .08s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: var(--raise2); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #111; }
.btn.primary:hover { background: #efc063; box-shadow: 0 0 24px rgba(226, 176, 74, 0.28); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--dim); } .btn.ghost:hover { color: var(--ink); background: var(--raise); }
.btn.sq { padding: 8px 11px; font-size: 14px; } .btn.xl { padding: 13px 30px; font-size: 14px; letter-spacing: 0.12em; }
.btn.on { color: var(--amber); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.seg button { background: transparent; border: 0; border-right: 1px solid var(--line); padding: 7px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); transition: all .15s; }
.seg button:last-child { border-right: 0; } .seg button:hover { color: var(--ink); background: var(--raise); }
.seg button.on { background: var(--amber); color: #111; }
.toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 4px 2px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.toggle i { width: 28px; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.1); position: relative; transition: background .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--dim); transition: all .2s cubic-bezier(.3, 1.4, .5, 1); }
.toggle.on { color: var(--ink); } .toggle.on i { background: var(--amber-dim); } .toggle.on i::after { left: 14px; background: var(--amber); }

.pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); background: transparent; max-width: 300px; }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.on { color: #111; background: var(--amber); border-color: var(--amber); }
.pill.midi i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.pill.midi.connected { color: var(--ink); } .pill.midi.connected i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.pill.midi.denied i, .pill.midi.unsupported i { background: var(--bad); } .pill.midi.nodevice { color: var(--dim); }
.badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line2); color: var(--dim); border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: 1px; }
.badge.lock { color: var(--amber); border-color: rgba(226, 176, 74, 0.4); } .badges .badge { margin: 0 6px 6px 0; }
.chip { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; border: 1px solid var(--line2); border-radius: 3px; padding: 1px 7px; color: var(--dim); background: transparent; }
.chip.cleared { color: #111; border-color: transparent; } button.chip:hover { color: var(--ink); border-color: var(--amber); }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); } .dots i.on { background: var(--amber); }
.stars i { font-style: normal; font-size: 22px; color: rgba(255, 255, 255, 0.12); margin-right: 2px; } .stars i.on { color: var(--amber); text-shadow: 0 0 14px rgba(226, 176, 74, 0.5); }
.pips { display: inline-flex; gap: 5px; margin-left: 10px; vertical-align: middle; } .pips i { width: 18px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); } .pips i.on { background: var(--amber); box-shadow: 0 0 8px rgba(226, 176, 74, .6); }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; } .ring b { position: absolute; font-family: var(--display); font-size: 17px; font-weight: 700; } .ring b small { font-size: 10px; margin-left: 1px; }
.stat b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.05; } .stat small { text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; }

/* boot */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, #1b1814 0%, var(--bg) 62%); transition: opacity .55s ease, visibility .55s; }
.boot.gone { opacity: 0; visibility: hidden; }
.boot-inner { text-align: center; padding: 24px; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.boot-tag { color: var(--dim); font-size: 18px; margin: 18px 0 36px; } .boot-note { color: var(--faint); font-size: 13px; margin-top: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* screens */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
#home { overflow-y: auto; background: radial-gradient(ellipse at 20% -10%, #1a1713 0%, var(--bg) 55%); }
#home.drag::after { content: "Drop to import"; position: fixed; inset: 16px; border: 2px dashed var(--amber); border-radius: 8px; display: grid; place-items: center; font: 700 40px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); background: rgba(13, 12, 15, .8); z-index: 5; }
.home-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(13, 12, 15, 0.86); backdrop-filter: blur(10px); z-index: 2; }
.home-stats { display: flex; gap: 30px; align-items: center; }
.home-body { padding: 44px 40px 80px; max-width: 1360px; width: 100%; margin: 0 auto; }
.lede { color: var(--dim); max-width: 700px; margin: 10px 0 30px; font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .2s, transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; animation: rise .5s both; }
.card:hover { border-color: rgba(226, 176, 74, 0.5); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.card.private { background: linear-gradient(160deg, rgba(226, 176, 74, 0.07), var(--panel) 45%); }
.card-top { display: flex; justify-content: space-between; gap: 14px; } .card h3 { font-size: 24px; line-height: 1.05; } .composer { color: var(--dim); margin-top: 4px; font-size: 14px; }
.blurb { color: var(--dim); margin: 0; flex: 1; font-size: 14px; } .card-meta { display: flex; align-items: center; gap: 12px; }
.card-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; } .card-foot .credit { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 11px; }
.card.add { border-style: dashed; align-items: center; justify-content: center; text-align: center; min-height: 220px; background: transparent; } .card.add .plus { font: 300 54px var(--display); color: var(--amber); line-height: 1; } .card.add .blurb { flex: none; }

/* piece view */
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 14px; height: 54px; border-bottom: 1px solid var(--line); background: var(--panel-solid); flex: none; }
.piece-id { min-width: 0; margin-right: 8px; } .piece-title { font: 700 19px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; } .piece-sub { font-size: 12px; color: var(--dim); white-space: nowrap; }
.tabs { display: flex; height: 100%; } .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); transition: color .15s; }
.tabs button:hover { color: var(--ink); } .tabs button.on { color: var(--amber); border-bottom-color: var(--amber); }
.work { flex: 1; display: flex; min-height: 0; position: relative; }
.side { width: 300px; flex: none; border-right: 1px solid var(--line); background: var(--panel-solid); display: flex; flex-direction: column; min-height: 0; transition: width .25s cubic-bezier(.2, .8, .2, 1); }
.side.wide { width: clamp(340px, 30vw, 440px); }
.pane { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow-y: auto; }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 16px 10px; } .pane-foot { padding: 14px 16px; border-top: 1px solid var(--line); margin-top: auto; display: grid; gap: 8px; }
.group { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 14px 16px 6px; }
.sections, .lessons { display: flex; flex-direction: column; }
.section, .lesson { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-left: 2px solid transparent; padding: 9px 14px; transition: background .15s; }
.section:hover, .lesson:hover { background: var(--raise); } .section.on { background: var(--amber-dim); border-left-color: var(--amber); } .section.part { border-left-color: rgba(226, 176, 74, .4); }
.sid { font: 700 16px var(--display); width: 30px; color: var(--amber); flex: none; } .sname { flex: 1; min-width: 0; } .sname b, .lesson b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .smeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.lesson .state { width: 18px; font-style: normal; color: var(--amber); flex: none; text-align: center; } .lesson span { flex: 1; min-width: 0; } .lesson small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lesson.done b { color: var(--dim); } .lesson.later { opacity: .55; } .lesson.prog { border-left-color: var(--amber); }
.tag { font-style: normal; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; }
.hero { margin: 4px 16px 8px; padding: 18px; border: 1px solid rgba(226, 176, 74, .35); border-radius: var(--r); background: linear-gradient(150deg, rgba(226, 176, 74, .1), transparent 60%); } .hero .kicker, .res-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); } .hero h3 { font-size: 26px; margin: 4px 0; line-height: 1.05; } .hero p { color: var(--dim); margin: 0 0 14px; font-size: 14px; }
.empty { padding: 30px 16px; color: var(--dim); }

/* coach chat */
.lesson-head { display: flex; gap: 8px; align-items: flex-start; padding: 12px 12px 8px; border-bottom: 1px solid var(--line); } .lesson-head h2 { font-size: 19px; line-height: 1.1; } .lesson-head .btn { flex: none; padding: 6px 8px; }
.stepdots { display: flex; gap: 4px; padding: 10px 16px; flex-wrap: wrap; } .stepdots i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); transition: background .3s; } .stepdots i.play { width: 22px; } .stepdots i.done { background: rgba(226, 176, 74, .45); } .stepdots i.cur { background: var(--amber); box-shadow: 0 0 8px rgba(226, 176, 74, .6); }
.chat { flex: 1; overflow-y: auto; padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 92%; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1); } .msg.in { opacity: 1; transform: none; }
.msg .who { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin: 0 0 3px 2px; }
.msg .body { padding: 10px 13px; border-radius: 2px 10px 10px 10px; background: var(--raise); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; } .msg .body b { color: #fff; font-weight: 600; }
.msg .ctx { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 5px 0 0 3px; } .msg .ctx::before { content: "▸ "; color: var(--amber); }
.msg.me { align-self: flex-end; } .msg.me .body { background: var(--amber); color: #111; border-color: var(--amber); border-radius: 10px 2px 10px 10px; font-weight: 500; } .msg.me .body b { color: #000; }
.msg.result { align-self: center; max-width: 100%; } .msg.result .body { background: transparent; border: 1px dashed var(--line2); border-radius: var(--r); font: 600 14px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--dim); text-align: center; } .msg.result.pass .body { border-color: rgba(226, 176, 74, .5); } .msg.result .body b { color: var(--ink); font-weight: 600; }
.msg.sys { align-self: center; } .msg.sys .body { background: none; border: 0; padding: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.msg.rest { align-self: stretch; max-width: 100%; } .msg.rest .body { display: flex; gap: 14px; align-items: center; } .msg.rest b { display: block; font: 700 30px var(--display); color: var(--ink); }
.rest-ring { width: 46px; height: 46px; border-radius: 50%; flex: none; background: conic-gradient(var(--amber) calc(var(--p) * 360deg), rgba(255, 255, 255, .08) 0); -webkit-mask: radial-gradient(circle, transparent 56%, #000 58%); mask: radial-gradient(circle, transparent 56%, #000 58%); animation: breathe 5s ease-in-out infinite; } @keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }
.actions { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; background: rgba(0, 0, 0, .25); } .actions .btn { flex: 1 1 auto; white-space: normal; } .actions .btn.ghost { flex: 0 1 auto; }

/* stage */
.stage-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--panel-solid); }
.cgroup { display: flex; align-items: center; gap: 8px; } .cgroup > label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); } .cgroup.tempo input[type=range] { width: 130px; } .dash { color: var(--faint); }
.gates, .chunk { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; } .gates button, .chunk button { background: none; border: 0; border-right: 1px solid var(--line); padding: 6px 9px; font: 600 13px var(--display); letter-spacing: .04em; color: var(--dim); text-transform: uppercase; } .gates button:last-child, .chunk button:last-child { border: 0; } .gates button:hover, .chunk button:hover { color: var(--ink); background: var(--raise); } .gates button.on { color: var(--amber); background: var(--amber-dim); }
.stage { flex: 1; position: relative; min-height: 0; overflow: hidden; background: var(--bg); } canvas.highway { position: absolute; inset: 0; display: block; touch-action: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .55) 100%); }
.results { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(13, 12, 15, .55); backdrop-filter: blur(3px); animation: fade .3s both; } @keyframes fade { from { opacity: 0; } }
.res-card { width: min(560px, 92%); max-height: calc(100% - 20px); overflow-y: auto; background: var(--panel); backdrop-filter: blur(10px); border: 1px solid var(--line2); border-radius: var(--r); padding: 22px 24px; display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.res-head { display: flex; justify-content: space-between; align-items: flex-start; } .res-main { display: flex; gap: 26px; align-items: center; }
.big b { font: 800 92px/0.9 var(--display); color: var(--ink); } .big i { font: 700 34px var(--display); color: var(--amber); font-style: normal; } .big small { display: block; text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }
.res-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; flex: 1; } .res-stats b { display: block; font: 700 20px var(--display); } .res-stats small { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.res-bars { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .res-bars label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); width: 100%; } .chip.bar { padding: 4px 10px; cursor: pointer; color: var(--ink); }
.res-gate { border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13.5px; } .res-gate .pips { margin-left: 0; } .res-gate.cleared { color: var(--amber); font-weight: 600; }

/* HUD */
.hud { height: 72px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px; border-top: 1px solid var(--line); background: var(--panel-solid); position: relative; } .hud.off { display: none; }
.hud-progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: transparent; } .hud-progress i { display: block; height: 100%; width: 0; background: var(--amber); box-shadow: 0 0 10px rgba(226, 176, 74, .7); transition: width .15s linear; }
.hud-name { font: 700 24px/1.05 var(--display); letter-spacing: .04em; text-transform: uppercase; } .hud-sub { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-mid { display: flex; align-items: center; gap: 10px; } .btn.play { min-width: 168px; font-size: 15px; } .btn.play.running { background: transparent; color: var(--amber); }
.hud-right { display: flex; justify-content: flex-end; gap: 26px; text-align: right; } .hud-right b { font: 700 26px/1 var(--display); } .hud-right b i { font-style: normal; font-size: 15px; color: var(--amber); } .hud-right small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; margin-left: 4px; } .hud-right .acc b { color: var(--amber); } .hud-right .hint small { font-size: 11px; }

/* progress tab */
.progress-pane { flex: 1; overflow-y: auto; padding: 28px 36px 60px; } .prog-head { display: flex; gap: 36px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .ringstat { display: flex; align-items: center; gap: 10px; }
.prog-body { display: flex; gap: 40px; padding-top: 22px; flex-wrap: wrap; align-items: flex-start; } .grid { display: grid; gap: 4px; flex: 1 1 560px; max-width: 860px; }
.grow { display: grid; grid-template-columns: minmax(200px, 1fr) repeat(3, 84px); gap: 4px; align-items: stretch; } .ghead span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); text-align: center; padding-bottom: 4px; } .ghead span:first-child { text-align: left; }
.gname { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; min-width: 0; } .gname b { font: 700 16px var(--display); color: var(--amber); width: 30px; flex: none; } .gname em { font-style: normal; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.cell { border: 1px solid var(--line); border-radius: 3px; background: rgba(255, 255, 255, .02); font: 600 14px var(--display); color: var(--dim); display: grid; place-items: center; transition: transform .12s, border-color .15s; } button.cell:hover { border-color: var(--amber); transform: scale(1.04); } .cell.na { color: var(--faint); border-style: dashed; opacity: .5; }
.legend { flex: 0 1 260px; display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; } .legend label { width: 100%; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); } .legend span { font: 600 13px var(--display); padding: 3px 8px; border-radius: 3px; } .legend small { width: 100%; margin-top: 10px; line-height: 1.5; }

/* drawer / modal / toasts */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 94vw); z-index: 50; background: var(--panel); backdrop-filter: blur(10px); border-left: 1px solid var(--line2); transform: translateX(102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; box-shadow: -30px 0 80px rgba(0, 0, 0, .5); } .drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); } .drawer-body { padding: 6px 20px 30px; overflow-y: auto; } .drawer-body h3 { font-size: 13px; letter-spacing: .14em; color: var(--amber); margin: 24px 0 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); } .row label { font-size: 14px; flex: 1; } .row label small { display: block; } .row .ctl { display: flex; align-items: center; gap: 8px; flex: none; max-width: 62%; } .row .ctl select { max-width: 190px; } .note { color: var(--dim); font-size: 12.5px; }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(8, 7, 10, .7); backdrop-filter: blur(4px); animation: fade .2s both; } .modal-card { width: min(520px, 94vw); max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); animation: rise .35s both; } .modal-body { padding: 8px 20px 20px; }
.keys { display: grid; gap: 8px; padding: 10px 0; } .keys div { display: flex; gap: 14px; align-items: center; } kbd { font: 600 13px var(--display); letter-spacing: .06em; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 2px 8px; min-width: 74px; text-align: center; color: var(--amber); }
.import .row .ctl input[type=text] { width: 240px; } .import-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 16px 0; } .import-info small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; } .import-info b { font-weight: 500; } .err { color: #e08070; grid-column: 1 / -1; }
.toasts { position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--panel); backdrop-filter: blur(10px); border: 1px solid var(--line2); border-radius: var(--r); padding: 9px 16px; font-size: 13.5px; animation: rise .3s both; transition: opacity .4s, transform .4s; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); } .toast.out { opacity: 0; transform: translateY(6px); } .toast.good { border-color: rgba(226, 176, 74, .6); color: var(--amber); } .toast.bad { border-color: rgba(200, 84, 70, .7); color: #e79a8e; }
.piano-load { position: fixed; left: 16px; bottom: 84px; z-index: 70; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 5px 10px; transition: opacity .8s; pointer-events: none; } .piano-load.out { opacity: 0; }
.stage > canvas { position: absolute; inset: 0; display: block; }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .2); }

@media (max-width: 1180px) { .side { width: 250px; } .side.wide { width: 330px; } .piece-title { max-width: 22vw; } .hud-right { gap: 16px; } .pill.midi span { max-width: 130px; } .controls { gap: 8px 14px; } }
@media (max-height: 760px) { .res-card { padding: 14px 20px; gap: 10px; } .big b { font-size: 64px; } .hud { height: 60px; } .topbar { height: 48px; } .controls { padding: 6px 12px; } }
