.recording-panel { margin:18px 0; }
.recording-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:18px; }
.import-button { display:inline-flex; align-items:center; padding:9px 16px; border:1px solid #bcbcb6; border-radius:2px; background:#fff; cursor:pointer; }
.import-button:hover { background:#eceeec; }
.import-button:focus-within { outline:2px solid #526a82; outline-offset:4px; }
.import-button input { position:absolute; width:1px; height:1px; opacity:0; }
.recording-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
.recording-row strong,.recording-row small { display:block; overflow-wrap:anywhere; }
.recording-row small { color:var(--muted); }
.recording-actions { display:flex; gap:8px; flex-shrink:0; }
.recording-modal { position:fixed; z-index:30; inset:0; display:grid; place-items:center; padding:20px; background:rgba(25,29,32,.5); }
.export-modal { z-index:40; }
.recording-dialog { width:min(100%,1000px); max-height:90vh; overflow:auto; box-shadow:0 20px 60px rgba(24,30,36,.25); }
.export-dialog { width:min(100%,480px); }
.roll-heading { gap:15px; }
.roll-heading h2 { overflow-wrap:anywhere; }
.roll-controls { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.piano-roll { overflow:auto; max-height:50vh; border:1px solid var(--line); background:#f9f9f7; cursor:crosshair; touch-action:pan-y; }
.piano-roll:focus-visible { outline:2px solid #526a82; outline-offset:4px; }
.roll-grid { position:relative; overflow:hidden; background-image:repeating-linear-gradient(to right, transparent 0, transparent 44px, #deded9 44px, #deded9 45px); background-position:62px 0; }
.roll-row { position:absolute; left:0; right:0; height:24px; border-bottom:1px solid #e3e3df; }
.black-key-row { background:rgba(48,60,73,.07); }
.roll-key { position:sticky; z-index:2; left:0; display:block; width:62px; height:23px; padding:2px 5px; border-right:1px solid #aaa; background:#fff; font-size:11px; }
.black-key-row .roll-key { color:#fff; background:#46515d; }
.roll-note { position:absolute; z-index:1; height:20px; border:1px solid #315348; border-radius:3px; background:#75a892; }
.roll-cursor { position:absolute; z-index:3; top:0; bottom:0; left:62px; width:2px; background:#c45b4b; pointer-events:none; }
.roll-cursor::before { content:''; position:absolute; top:0; left:-5px; width:12px; height:10px; background:#c45b4b; clip-path:polygon(0 0,100% 0,50% 100%); }
.export-options { display:flex; flex-wrap:wrap; gap:8px; }
.export-dialog h3 { margin:18px 0 8px; font-size:13px; }
@media(max-width:600px) { .recording-row { align-items:flex-start; flex-direction:column; } .recording-dialog { padding:18px; } }
