:root{--clay:#e4e8ee;--ink:#485467;--blue:#075cff;--line:#bcc7d6;--raise:2px 2px 5px #b9c0cb,-2px -2px 5px #fff;--press:inset 2px 2px 4px #c1c8d2,inset -2px -2px 4px #fff;font-family:Inter,"Segoe UI",system-ui,sans-serif;color:var(--ink);background:var(--clay);font-size:12px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,summary,select{cursor:pointer}button,input,select{border:0;border-radius:6px;background:var(--clay)}button{box-shadow:var(--raise);font-size:10px;font-weight:650;white-space:nowrap}button:disabled{opacity:.4;cursor:default}button:hover{color:var(--blue)}button[aria-pressed=true]{color:var(--blue);box-shadow:var(--press)}:focus-visible{outline:2px solid var(--blue);outline-offset:2px}[hidden]{display:none!important}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.stage{padding:14px 18px}.device{max-width:1440px;margin:auto}.chip{height:27px;padding:0 10px}.topbar{height:32px;display:flex;align-items:center;gap:10px;margin-bottom:8px}.topbar select{height:27px;padding:3px 26px 3px 9px;max-width:245px;box-shadow:var(--press)}.octv{font-size:10px;color:#728096;white-space:nowrap}#songName{margin-left:auto;width:210px;min-width:70px;height:27px;padding:4px 9px;box-shadow:var(--press);font-size:11px}.file-wrap{position:relative}.file-menu{position:absolute;right:0;top:34px;width:165px;padding:5px;z-index:30;background:#f0f3f7;border:1px solid #c8d0dc;border-radius:9px;box-shadow:0 7px 24px #43547433}.file-menu button{display:block;text-align:left;width:100%;height:32px;box-shadow:none;background:transparent;padding:0 10px;font-size:12px}.file-menu button:hover{background:#dbe5f6}.keyboard-row{display:flex;align-items:center;gap:9px;margin:0 0 10px}.octave{width:28px;height:34px;flex:none;font-size:19px;padding:0}.kb{--g:6px;position:relative;display:grid;grid-template-columns:repeat(var(--n,8),minmax(0,1fr));gap:var(--g);height:100px;padding:5px 6px;border-radius:10px;box-shadow:var(--press);flex:1;min-width:0;touch-action:none;user-select:none}.wk,.bk{appearance:none;border:0;padding:0;cursor:pointer;font-weight:700}.wk{position:relative;border-radius:5px 5px 8px 8px;background:linear-gradient(#f4f6fa,#e3e8ef);box-shadow:2px 3px 5px #b2bdcb;min-width:0}.wk .lt{position:absolute;left:0;right:0;bottom:7px;font-size:9px;color:#8d9aab;text-transform:uppercase}.wk .cn{position:absolute;left:0;right:0;bottom:22px;font-size:9px;color:var(--blue)}.wk.down{background:#bdcff0;box-shadow:var(--press)}.bk{position:absolute;z-index:2;top:5px;height:56%;left:calc(6px + (100% - 12px + var(--g)) / var(--n) * var(--i) - var(--g) / 2);width:calc((100% - 12px + var(--g)) / var(--n) * .58);transform:translateX(-50%);border-radius:4px 4px 7px 7px;background:linear-gradient(#6c7a8e,#455269);box-shadow:2px 3px 4px #8797ad}.bk .lt{position:absolute;bottom:9px;left:0;right:0;color:#cfdae9;text-transform:uppercase;font-size:9px}.bk.down{background:#075cff}.transport{display:flex;align-items:center;gap:7px;height:32px;margin-bottom:5px}.transport-buttons{display:flex;gap:5px}.transport-spacer{flex:1}#position{font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap;min-width:83px;padding-left:4px}.transport select{height:26px;padding:3px;box-shadow:var(--press);font-size:10px}.timeline{position:relative;overflow-x:auto;overflow-y:hidden;height:422px;border:1px solid #b9c5d5;border-radius:8px;background:#eaf0f7;overscroll-behavior:contain}#track{position:relative;min-height:408px;--step:36px}.pitch-row{position:absolute;left:0;right:0;height:16px;border-bottom:1px solid #c5cfdd;background-image:repeating-linear-gradient(90deg,transparent 0,transparent calc(var(--step) - 1px),#b0bfd24a calc(var(--step) - 1px),#b0bfd24a var(--step));background-position:44px 0}.pitch-row.black{background-color:#d4deeb}.pitch-label{position:sticky;left:0;display:block;width:44px;height:16px;padding:1px 7px;background:#eef2f7;border-right:1px solid #9fadc0;z-index:7;font-size:9px;line-height:13px;color:#65758a}.black .pitch-label{background:#bfccdd;color:#344661}.ruler{position:sticky;top:0;height:24px;background:#dfe6ef;z-index:8;border-bottom:1px solid #a3b3c9;cursor:crosshair;touch-action:none}.ruler span{position:absolute;top:5px;font-size:9px;padding-left:4px;user-select:none;pointer-events:none}.ruler:before{content:'TAKT';position:sticky;left:0;display:block;width:44px;height:23px;background:#dfe6ef;z-index:2;font-size:8px;line-height:23px;text-align:center;color:#78879b}.tile{position:absolute;z-index:2;height:14px;border:1px solid #0052d4;border-radius:3px;background:linear-gradient(135deg,#3889ff,#0759e9);color:#fff;box-shadow:none;cursor:grab;font-size:9px;line-height:12px;overflow:hidden;user-select:none;touch-action:none}.tile>span:not(.edge){padding-left:7px;pointer-events:none;white-space:nowrap}.tile.lane-1{background:linear-gradient(135deg,#fc6978,#dc2147);border-color:#cc1940}.tile.selected{outline:2px solid #ec9624;outline-offset:0;z-index:4}.tile.playing{filter:brightness(1.25);outline:1px solid #fff;outline-offset:-2px}.tile.split{font-size:0}.edge{position:absolute;top:0;bottom:0;width:6px;cursor:ew-resize}.edge.left{left:0}.edge.right{right:0}.edge:after{content:'';position:absolute;top:2px;bottom:2px;left:2px;border-left:1px solid #ffffff99}#playhead{position:absolute;top:0;bottom:0;width:2px;background:#ed334b;z-index:9;pointer-events:none}.playhead-grip{position:absolute;left:-6px;top:0;width:14px;height:24px;cursor:ew-resize;pointer-events:auto;touch-action:none}.playhead-grip:after{content:'';position:absolute;top:2px;left:1px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:10px solid #ed334b}#empty{position:absolute;top:180px;left:65px;font-size:12px;color:#7b8ca4;pointer-events:none;background:#eaf0f7d9;padding:8px;border-radius:5px}.footline{position:relative;display:flex;gap:15px;align-items:flex-start;justify-content:space-between;margin-top:7px;font-size:9px;color:#7e8ca0}.footline summary{font-size:9px;white-space:nowrap}#notationDetails{margin-left:auto}.notation-panel{position:absolute;top:24px;left:0;right:0;z-index:15;padding:12px;background:#e4e8ee;box-shadow:0 5px 20px #66758940;border:1px solid #bdc8d8;border-radius:8px}textarea{display:block;width:100%;height:95px;resize:vertical;border:0;padding:8px;background:#f0f3f7;border-radius:5px;font:12px/1.6 ui-monospace,monospace;white-space:pre}.help{font-size:11px;line-height:1.5}.notation-panel p{margin-bottom:0}#status{font-size:10px;color:#47709e;min-height:12px;margin:6px 0 0}#error{font-size:11px;color:#b62738;margin:5px 0}#error:empty{display:none}#editor{display:flex;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:1px solid #bec9d8;margin-top:8px}#editor label{font-size:10px;display:flex;align-items:center;gap:4px}#editor input,#editor select{height:27px;padding:4px;box-shadow:var(--press);max-width:160px}#noteStart{width:90px}#editor p{width:100%;margin:0;color:#7e8ca0}.toolbar{display:flex;gap:10px;margin-top:16px}.download{display:inline-flex;align-items:center;text-decoration:none;color:var(--blue);margin-top:8px;box-shadow:var(--raise)}dialog{border:1px solid #bec9d8;background:#e9edf3;border-radius:12px;max-width:min(500px,92vw);padding:22px;color:var(--ink)}dialog::backdrop{background:#25374d55}dialog h2{font-size:16px;margin:0 0 16px}dialog input{padding:8px;box-shadow:var(--press);width:100%}dialog label{display:grid;gap:8px}#shareLink{min-width:260px;font-size:11px}#shareStatus{font-size:11px}button:active{box-shadow:var(--press)}@media(max-width:640px){.stage{padding:8px}.topbar{gap:6px}.topbar select{max-width:40%;font-size:10px}.octv{display:none}#songName{width:30%;font-size:10px}.keyboard-row{gap:5px}.octave{width:23px}.kb{height:85px;--g:4px}.transport{gap:4px;flex-wrap:wrap;height:auto;min-height:32px}.transport .chip{font-size:9px;padding:0 6px}.transport-spacer{display:none}#position{margin-right:auto;font-size:9px;min-width:75px}.footline{gap:8px}.footline>span:nth-child(2){display:none}.timeline{height:422px}#empty{left:50px;right:15px;font-size:11px}.topbar .chip{padding:0 9px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

/* File-first toolbar and temporary ripple selection */
.file-menu{left:0;right:auto}.instrument-control{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:650;height:27px;padding-left:9px;border-radius:6px;box-shadow:var(--raise)}.instrument-control select{box-shadow:none;height:27px;max-width:230px}.topbar .octv{margin-left:auto}.kb{height:130px}.tile.ripple{outline:2px solid #e92338;outline-offset:1px;z-index:5;cursor:ew-resize}.tile.ripple.selected{outline-color:#e92338}.notation-panel a{color:#667c9b;font-size:10px}@media(max-width:640px){.kb{height:110.5px}.instrument-control{min-width:0;flex:1;font-size:9px;gap:2px}.topbar .instrument-control select{max-width:100%;min-width:0;flex:1}.instrument-control span{flex:none}}

/* Compact recessed instrument selection and clear history controls. */
#fileMenuButton{min-width:65px}.instrument-control{box-shadow:none;padding-left:6px;gap:6px}.topbar .instrument-control select{width:151px;max-width:151px;background:#fff;box-shadow:inset 2px 2px 5px #9caac655,inset -1px -1px 2px #fff;border:1px solid #c4cddb;font-size:10px;font-weight:600}.topbar .instrument-control select:focus:not(:focus-visible){outline:none}.icon-button{width:29px;padding:5px;display:inline-flex;align-items:center;justify-content:center}.icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#snapToggle[aria-pressed=true]{color:#075cff;box-shadow:var(--press);background:#dae6fa}#snapToggle[aria-pressed=false]{color:#738095}.transport{flex-wrap:wrap;height:auto;min-height:32px}@media(max-width:640px){.instrument-control{flex:none}.topbar .instrument-control select{width:140px;max-width:140px}.transport .icon-button{padding:4px;width:27px}.topbar{gap:7px}}

/* Three octaves, shared toolbar and session documents. */
.brand{height:40px;margin-bottom:0;display:flex;align-items:center;justify-content:center;color:#075cff;font-size:18px;font-weight:400;letter-spacing:2px;opacity:.75}
.keyboard-row{margin-bottom:64px}.kb{--g:4px}.topbar{height:27px;margin:0;gap:7px;min-width:0}.transport{gap:7px;row-gap:9px;margin-bottom:9px}.topbar .octv{display:none}.instrument-control span{display:none}.topbar .instrument-control select{width:128px;max-width:128px}.document-control{display:flex;max-width:190px;min-width:0;height:27px;background:white;border:1px solid #c4cddb;border-radius:6px;box-shadow:var(--press)}#songName{background:transparent;width:145px;margin:0;box-shadow:none;min-width:40px}.topbar #documentSelect{width:30px;max-width:30px;background:transparent;padding:0;font-size:0;box-shadow:none}.topbar #documentSelect option{font-size:12px}.transport-spacer{display:none}.timeline{height:422px}#track{min-height:408px}.time-selection{position:absolute;top:24px;bottom:0;background:#ffdc3c55;border-left:1px solid #d6a500;border-right:1px solid #d6a500;z-index:1;pointer-events:none}.tile.selected{outline:2px solid #e9b500;filter:brightness(1.12)}#rippleToggle[aria-pressed=true]{background:#dae6fa;color:var(--blue)}.context-menu{position:fixed;z-index:100;min-width:210px;padding:5px;background:#f4f6fa;border:1px solid #bdc8d8;border-radius:8px;box-shadow:0 7px 24px #43547433}.context-menu button{display:block;width:100%;text-align:left;padding:9px;box-shadow:none;background:transparent;font-size:12px}.context-menu button:hover,.context-menu button:focus-visible{background:#dbe5f6}.file-menu{z-index:40}
@media(max-width:640px){.brand{font-size:16px}.keyboard-row{margin-bottom:58px;gap:4px}.kb{--g:2px;padding-left:3px;padding-right:3px}.bk{left:calc(3px + (100% - 6px + var(--g)) / var(--n) * var(--i) - var(--g) / 2);width:calc((100% - 6px + var(--g)) / var(--n) * .62)}.wk .lt,.bk .lt{display:none}.wk .cn{font-size:7px}.topbar{width:100%;gap:5px}.document-control{flex:1}#songName{width:100%}.topbar .instrument-control select{width:105px;max-width:105px}.instrument-control{padding-left:0}.timeline{height:422px}}

/* Engraved wordmark and compact dialogs. */
.brand{color:#a4afbf;opacity:1;font-weight:650;letter-spacing:2px;text-shadow:0 1px 1px #fff,0 -1px 1px #66758b80}.device{max-width:none}.toolbar{flex-wrap:wrap}#tempoDialog label{margin:12px 0}#tempoDialog select{padding:8px;box-shadow:var(--press)}#closeDescription{line-height:1.6}#closeDialog{max-width:min(560px,94vw)}.file-menu{width:180px}

/* Fixed-size keys, full pitch roll, immediate editing and mobile controls. */
.keyboard-row{justify-content:center}.kb{flex:0 0 auto;--g:4px;padding:5px 6px;max-width:100%}.wk.main-octave .lt{color:#456eae}.wk.main-octave{background:linear-gradient(#f7faff,#e2eaf7)}.bk{left:calc(6px + (100% - 12px + var(--g)) / var(--n) * var(--i) - var(--g) / 2);width:calc((100% - 12px + var(--g)) / var(--n) * .58)}
.timeline{overflow:auto;scrollbar-gutter:stable;height:422px;scrollbar-width:auto;scrollbar-color:#98abc2 #dce5ef}.timeline::-webkit-scrollbar{width:13px;height:13px}.timeline::-webkit-scrollbar-track{background:#dce5ef}.timeline::-webkit-scrollbar-thumb{background:#9aadc5;border:3px solid #dce5ef;border-radius:8px}#track{min-height:0}.pitch-row,.pitch-label{height:var(--row-height,16px)}.tile{height:calc(var(--row-height,16px) - 2px)}.tile.selected .edge{width:8px}.edge:after{border-left:2px solid white}.time-selection{pointer-events:none}.range-boundary{position:absolute;top:0;bottom:0;width:14px;transform:translateX(-7px);z-index:10;cursor:ew-resize;touch-action:none}.range-boundary:before{content:'';position:absolute;left:6px;top:0;bottom:0;width:2px;background:#dfb000;box-shadow:0 0 2px #fff}.range-grip{display:block;position:sticky;top:0;height:24px;background:#f2cc4a;border:1px solid #bd9400;border-radius:3px}.range-grip:after{content:'↔';display:block;font-size:11px;text-align:center;color:#766000}#playhead{z-index:9}.playhead-grip{position:sticky;display:block;top:0;margin-left:-6px;left:auto}.advanced-controls{display:flex;gap:7px;align-items:center;flex-wrap:wrap}#mobileMenuButton,#mobileSongName{display:none}.context-menu{max-height:calc(100dvh - 16px);overflow-y:auto}.context-menu button{min-height:34px}#empty{position:sticky;top:45%;left:65px;margin-top:-240px;width:max-content;max-width:80%;z-index:11}.tile.split>span:not(.edge){display:none}
@media(max-width:640px), (pointer:coarse) and (max-width:1000px){
.stage{padding:8px}.brand{height:32px}.keyboard-row{margin-bottom:26px;gap:9px}.kb{height:130px;--g:4px;padding:5px 6px}.octave{width:23px;height:42px}.wk .cn{font-size:10px;bottom:12px}.wk .lt,.bk .lt{display:none}.transport{gap:7px;align-items:center}.transport .chip{height:38px;font-size:10px;padding:0 9px}.transport-buttons{gap:6px}.topbar,.advanced-controls{display:none}#mobileMenuButton{display:block;font-size:23px;order:0;width:40px;padding:0}.transport-buttons{order:1}#position{order:2;margin-left:auto;min-width:70px;padding:0;font-size:9px}.topbar{order:3;width:100%;height:auto;flex-wrap:wrap;gap:9px}.advanced-controls{order:4;width:100%;gap:9px;padding:5px 0}.menu-open .topbar,.menu-open .advanced-controls{display:flex}.topbar .document-control{height:38px;flex:1;max-width:none}.topbar #songName,.topbar #documentSelect{height:36px}.topbar .instrument-control{width:100%;height:38px}.topbar .instrument-control select{height:38px;width:100%;max-width:none}.topbar .instrument-control span{display:block}.advanced-controls select{height:38px}.transport .icon-button{width:38px;height:38px}.file-menu{top:43px}.file-menu button{min-height:40px}#mobileSongName{display:block;margin:0 0 7px;font-size:10px;color:#728198}.timeline{height:470px}.pitch-label{font-size:11px;line-height:34px;padding:0 6px}.tile{font-size:11px;line-height:32px;min-width:10px}.tile.selected .edge{width:13px}.edge:after{top:7px;bottom:7px;left:5px}.range-boundary{width:24px;transform:translateX(-12px)}.range-boundary:before{left:11px}.range-grip{height:28px}.ruler{height:24px}.context-menu button{min-height:42px;font-size:13px}#editor{display:none}.menu-open #editor:not([hidden]){display:flex}.footline{font-size:10px}.footline>span:nth-child(2){display:none}.notation-panel{position:fixed;left:8px;right:8px;top:20%;max-height:65dvh;overflow:auto;z-index:40}.footline summary{padding:6px}#empty{font-size:11px;left:55px;max-width:80%;width:auto;pointer-events:none}
}

/* An always-visible pitch scrollbar, including systems with hidden native scrollbars. */
.timeline-shell{display:grid;grid-template-columns:minmax(0,1fr) 20px;gap:5px;align-items:stretch}.timeline{scrollbar-gutter:auto}.timeline::-webkit-scrollbar:vertical{width:0}#pitchScroll{writing-mode:vertical-lr;direction:ltr;appearance:none;-webkit-appearance:none;width:20px;height:100%;min-height:100%;margin:0;padding:0;background:#d6e0ed;border:1px solid #bac8d9;box-shadow:var(--press);border-radius:8px;cursor:ns-resize;touch-action:none}#pitchScroll::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:42px;border-radius:6px;background:linear-gradient(90deg,#b6c4d6,#8fa4bf);border:1px solid #8a9db8;box-shadow:1px 1px 3px #889bb166}#pitchScroll::-moz-range-thumb{width:16px;height:42px;border-radius:6px;background:#9eafc6;border:1px solid #8a9db8}
@media(max-width:640px), (pointer:coarse) and (max-width:1000px){.timeline{height:458px}.timeline-shell{grid-template-columns:minmax(0,1fr) 22px;gap:4px}#pitchScroll{width:22px}#pitchScroll::-webkit-slider-thumb{width:18px;height:48px}}

.topbar .instrument-control select{width:205px;max-width:205px}@media(max-width:640px), (pointer:coarse) and (max-width:1000px){.topbar .instrument-control select{width:100%;max-width:none}}

#legato[aria-pressed=true]{background:#dae6fa;color:var(--blue)}.wk.sustained{background:#c6d8f4;box-shadow:var(--press)}.bk.sustained{background:#416bbb}
/* Ergonomic workspace: focused instrument, practice/record, document tabs. */
.stage{padding:16px 18px 24px}.brand{height:auto;min-height:32px;margin:0 0 24px}.instrument-row{display:flex;justify-content:center;align-items:center;gap:14px;margin:0 0 28px;min-height:38px}.instrument-row .instrument-control{display:flex;align-items:center;gap:10px;height:auto;padding:0;flex:none}.instrument-row .instrument-control span{display:block;font-size:10px;letter-spacing:.1em;color:#7b8ca4}.instrument-row select{width:265px;max-width:65vw;min-width:0;height:36px;padding:5px 28px 5px 12px;background:#f5f7fb;border:1px solid #c4cddb;box-shadow:var(--press);font-size:11px;font-weight:600}.instrument-row .octv{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:30px;border-radius:6px;box-shadow:var(--press);font-weight:700;color:#647995}.keyboard-row{margin:0;gap:12px;justify-content:center;max-width:1260px;margin-inline:auto}.kb{display:block;position:relative;height:160px;flex:0 0 auto;padding:0;max-width:calc(100% - 76px);overflow:hidden;box-shadow:none;background:transparent;border-radius:10px}.kb .wk,.kb .bk{position:absolute;transform:none;bottom:auto;transition:background .12s,box-shadow .12s}.kb .wk{border-radius:5px 5px 9px 9px;box-shadow:1px 3px 5px #a4b3c580}.kb .bk{border-radius:4px 4px 7px 7px;box-shadow:1px 3px 4px #63738e80}.kb .wk.main-octave{background:linear-gradient(#fff,#e5edfa);box-shadow:1px 3px 6px #8da6c880,inset 0 0 0 1px #ccdcf2}.kb .wk .lt{display:block;font-size:10px;bottom:8px}.kb .bk .lt{display:block;font-size:10px}.kb .wk .cn{font-size:10px;bottom:25px}.kb .wk.down,.kb .wk.sustained{background:#b7d1f5;box-shadow:var(--press)}.kb .bk.down{background:#075cff}.octave{width:30px;height:42px}.mode-row{display:flex;align-items:center;justify-content:center;gap:6px;width:max-content;margin:28px auto 30px;padding:5px;border-radius:10px;box-shadow:var(--press)}.mode-button{min-width:94px;height:33px;letter-spacing:.06em;font-size:11px}.mode-button[aria-pressed=true]{background:#dce9fc;color:#075cff;box-shadow:inset 1px 1px 3px #aebed5,inset -1px -1px 3px #fff}.practice .mode-row{margin-bottom:0}.transport{margin-bottom:12px;gap:9px}.topbar{display:flex;order:0;width:auto;gap:9px;flex-wrap:nowrap}.topbar .file-wrap{order:0}.edit-wrap{position:relative;order:1}#fileMenuButton,#editMenuButton{height:30px;min-width:75px}.edit-wrap .file-menu{width:238px;left:0;right:auto}.file-menu hr{border:0;border-top:1px solid #d3dce8;margin:5px}.file-menu kbd{float:right;font:10px system-ui;color:#8492a6}.document-tabs-row{display:flex;gap:7px;align-items:end;border-bottom:1px solid #aabacf;margin:0 0 10px;min-width:0}#documentTabs{display:flex;gap:4px;overflow-x:auto;align-items:stretch;max-width:100%;min-width:0;scrollbar-width:thin}.document-tab{display:flex;align-items:center;flex-shrink:0;border:1px solid #c2ccda;border-bottom:0;border-radius:8px 8px 0 0;background:#d9e0ea;min-width:130px;max-width:265px;padding-right:4px}.document-tab.active{background:#f1f5fc;border-color:#b1c7e5;box-shadow:inset 0 3px 0 #4085ef}.document-tab [role=tab]{padding:10px 10px 10px 14px;min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1;text-align:left;box-shadow:none;border-radius:8px 0 0;background:transparent;height:37px;font-size:11px;font-weight:500}.document-tab.active [role=tab]{font-weight:650;color:#345a93}.document-tab .close-tab{width:24px;height:25px;padding:0;box-shadow:none;background:transparent;font-size:17px;color:#7e8ca1}.document-tab .close-tab:hover{background:#dce5f3;color:#254a86}#newTab{height:31px;width:31px;padding:0;font-size:20px;margin-bottom:3px;flex:none}.advanced-controls{order:2}.transport-buttons{order:1}#position{order:1}.file-menu,.edit-wrap .file-menu{top:36px}.footline .notation-panel{position:static;margin-top:8px;padding:10px;width:100%;box-shadow:var(--press)}.footline{flex-wrap:wrap}.footline #notationDetails{width:100%;flex-basis:100%;margin-left:0}.footline #notationDetails summary{text-align:right;padding:5px 2px}.notation-panel textarea{height:110px}.timeline{height:clamp(280px,48vh,550px)}#mobileSongName{display:none!important}
@media(max-width:900px){.stage{padding:12px}.transport{gap:8px}.advanced-controls{gap:8px}.instrument-row{margin-bottom:22px}.mode-row{margin-top:22px}.kb{height:145px}.document-tab{max-width:220px}}
@media(max-width:640px),(pointer:coarse) and (max-width:1000px){.stage{padding:10px 8px 20px}.brand{margin-bottom:18px;font-size:17px}.instrument-row{margin-bottom:20px;gap:9px}.instrument-row .instrument-control{width:auto;flex:0 1 auto}.instrument-row .instrument-control span{display:none}.instrument-row select{height:40px;width:250px;max-width:70vw;font-size:11px}.instrument-row .octv{font-size:11px}.keyboard-row{gap:9px}.kb{height:150px;max-width:calc(100% - 66px)}.octave{width:24px;height:44px}.kb .wk .lt,.kb .bk .lt{display:block;font-size:9px}.kb .wk .cn{font-size:9px;bottom:24px}.mode-row{margin-top:20px;margin-bottom:22px}.mode-button{height:38px;min-width:100px}.transport{position:relative;gap:8px}.transport .topbar{display:flex;order:0;width:auto;flex:1;gap:9px;flex-wrap:nowrap}.transport #mobileMenuButton{order:4;display:block;margin-left:auto;width:36px;height:36px;font-size:20px}.transport .transport-buttons{order:2}.transport #position{order:3;margin-left:0}.transport .advanced-controls{order:5;display:none;width:100%}.menu-open .transport .advanced-controls{display:flex}.topbar .chip,#fileMenuButton,#editMenuButton{height:36px;min-width:65px;padding:0 10px}.file-menu,.edit-wrap .file-menu{top:40px}.edit-wrap .file-menu{left:0;max-width:calc(100vw - 105px)}.document-tabs-row{margin-bottom:8px}.document-tab{min-width:125px;max-width:210px}.document-tab [role=tab]{height:40px;padding:10px;font-size:11px}.document-tab .close-tab{height:32px;width:28px}.footline .notation-panel{position:static;max-height:none;padding:8px}.timeline{height:clamp(260px,48dvh,458px)}.footline{margin-top:8px}#editor:not([hidden]){display:flex}.document-tab .close-tab:hover{background:transparent}}
@media(max-width:1000px) and (orientation:landscape){.brand{margin-bottom:10px;min-height:25px}.instrument-row{margin-bottom:12px;min-height:32px}.instrument-row select{height:32px}.kb{height:106px}.mode-row{margin-top:12px;margin-bottom:16px;padding:3px}.mode-button{height:30px}.stage{padding-top:8px}.kb .wk .cn{bottom:23px}.timeline{height:260px}}
/* Keep file/edit and playback controls in separate rows on narrow screens. */
@media(max-width:640px),(pointer:coarse) and (max-width:1000px){.transport{display:grid;grid-template-columns:minmax(0,1fr) auto 36px;align-items:center;row-gap:10px}.transport .topbar{grid-column:1/3;grid-row:1;min-width:0;height:auto;flex:none}.transport #mobileMenuButton{grid-column:3;grid-row:1;margin:0}.transport .transport-buttons{grid-column:1;grid-row:2}.transport #position{grid-column:2/4;grid-row:2;text-align:right;min-width:78px}.transport .advanced-controls{grid-column:1/-1;grid-row:3}.file-wrap .file-menu{left:0;right:auto}}
/* The light keyboard rises out of the centre to reveal the recording workspace. */
.performance-panel{position:relative;z-index:12;transform:translateY(0);transform-origin:top center}.mode-ready .performance-panel{transition:transform .68s cubic-bezier(.22,1,.36,1)}.device.practice .performance-panel{transform:translateY(var(--practice-offset,0px))}.device.practice{min-height:calc(100svh - 40px)}.mode-ready .song:not([hidden]){animation:workspace-reveal .68s cubic-bezier(.22,1,.36,1) both}@keyframes workspace-reveal{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.mode-row{margin-bottom:30px}.practice .mode-row{margin-bottom:30px}
@media(prefers-reduced-motion:reduce){.mode-ready .performance-panel{transition:none}.mode-ready .song:not([hidden]){animation:none}}
.performance-panel{display:flow-root}.mode-row,.practice .mode-row{margin-bottom:0}.song{margin-top:30px}
.instrument-block{margin-bottom:28px}.instrument-block .instrument-row{margin-bottom:0}.legato-row{display:flex;justify-content:center;margin-top:9px}.legato-row #legato{height:24px;min-width:82px;padding:0 12px;font-size:9px;letter-spacing:.05em}.legato-row #legato[aria-pressed=true]{background:#dce9fc}.kb .bk.sustained{background:#075cff}
@media(max-width:900px){.instrument-block{margin-bottom:22px}}@media(max-width:640px),(pointer:coarse) and (max-width:1000px){.instrument-block{margin-bottom:20px}.legato-row #legato{height:30px;min-width:90px;font-size:10px}}@media(max-height:600px) and (orientation:landscape) and (max-width:1000px){.instrument-block{margin-bottom:12px}.legato-row{margin-top:6px}.legato-row #legato{height:24px;font-size:9px}}
/* Reusable motifs share the document strip without looking like file tabs. */
.document-tabs-row{align-items:center}.document-tabs-row #documentTabs{max-width:65%;flex:0 1 auto;align-self:end}.motifs{display:flex;align-items:center;gap:7px;min-width:0;flex:1;overflow-x:auto;padding:5px 5px 7px;scrollbar-width:thin}.motifs:empty{display:none}.motif-chip{display:flex;align-items:center;flex:none;max-width:205px;border:1px solid #b9ccbf;border-radius:20px;background:linear-gradient(#edf4ef,#e1ece5);box-shadow:0 3px 7px #4b936844,inset 0 2px 0 #80b790;overflow:hidden}.motif-chip button{background:transparent;box-shadow:none;color:#427054}.motif-name{height:32px;max-width:166px;padding:0 7px 0 14px;overflow:hidden;text-overflow:ellipsis;font-size:10px;cursor:grab;touch-action:manipulation}.motif-name:active{cursor:grabbing}.close-motif{width:27px;height:29px;padding:0 8px 0 0;font-size:16px}.motif-chip.dragging{opacity:.45}.motif-chip:hover{border-color:#74a785}.motif-drop-preview{position:absolute;z-index:12;border:1px solid #388559;background:#76b48e77;border-radius:3px;pointer-events:none}.export-menu{margin:0 5px 3px 12px;padding:3px 0;border-left:2px solid #b9cce4}.file-menu #exportMenuButton[aria-expanded=true]{color:#075cff;background:#dbe5f6}.file-menu .export-menu button{font-size:11px}.document-tabs-row #newTab{margin-bottom:0}
@media(max-width:700px){.document-tabs-row{flex-wrap:wrap}.document-tabs-row #documentTabs{max-width:calc(100% - 40px)}.motifs:not(:empty){flex-basis:100%;padding-top:2px}.motif-name{height:36px}.close-motif{height:34px}}
.motif-name{touch-action:none;user-select:none}

/* Compact motif library, matching the file tabs with a green top accent. */
.document-tabs-row{align-items:end}.document-tabs-row #documentTabs{max-width:calc(100% - 260px);flex:0 1 auto}
.motifs{position:relative;display:block;flex:0 0 210px;min-width:0;margin-left:auto;padding:0;overflow:visible;align-self:end;z-index:25}
#motifSelect{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:41px;padding:10px;border:1px solid #b1c7e5;border-bottom:0;border-radius:8px 8px 0 0;background:#f1f5fc;box-shadow:inset 0 3px 0 #67a17c;font-size:11px;text-align:left;color:var(--ink)}
#motifSelectedName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#motifSelect{touch-action:none;user-select:none}
#motifList{position:absolute;right:0;top:100%;width:290px;max-width:calc(100vw - 32px);max-height:320px;overflow-y:auto;padding:5px;border:1px solid #c2ccda;border-radius:0 0 8px 8px;background:#edf1f6;box-shadow:0 8px 20px #43547433}
.motif-option{display:flex;align-items:center;border-radius:5px}.motif-option:hover{background:#dce3ed}.motif-option button{color:var(--ink);box-shadow:none;background:transparent;border-radius:4px}
.motif-option .motif-name{flex:1;min-width:0;max-width:none;height:38px;text-align:left;padding:0 9px;font-size:11px}.motif-option .rename-motif,.motif-option .close-motif{flex:none;width:29px;height:34px;padding:0;font-size:16px}.motif-empty{padding:8px;font-size:11px;line-height:1.5;margin:0}.motifs.drag-active #motifList{opacity:0;pointer-events:none}.motif-option.dragging{opacity:.45}
@media(max-width:700px){.document-tabs-row #documentTabs{max-width:calc(100% - 40px)}.motifs:not(:empty){flex:0 0 min(210px,100%);padding:0;margin-left:auto}.motif-option .motif-name{height:44px}}

/* File navigation and explicit rename action, with labels above both libraries. */
.document-tabs-row{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:18px;align-items:end;margin-top:24px}
.files-section{min-width:0}.files-controls{display:flex;gap:7px;align-items:end;min-width:0}.document-tabs-row #documentTabs{max-width:none;min-width:0;flex:0 1 auto}.files-controls #newTab{flex:none}
.section-caption{font-size:10px;font-weight:650;letter-spacing:.1em;color:#7b8ca4;line-height:14px;margin-bottom:8px}
.document-tabs-row .motifs{width:210px;margin:0;min-width:0;align-self:end}.document-tab .rename-tab{width:26px;height:28px;flex:none;padding:0;background:transparent;box-shadow:none;color:#7e8ca1;font-size:16px}.document-tab .rename-tab:hover{color:#254a86}.document-tab .close-tab{flex:none}
@media(max-width:700px){.document-tabs-row{grid-template-columns:minmax(0,1fr);gap:16px;margin-top:24px}.document-tabs-row .motifs{justify-self:end;max-width:100%}.document-tab .rename-tab{height:32px;width:28px}}

.files-controls{min-height:41px}

.legato-row{gap:9px;align-items:center;position:relative}.legato-row #metronome{height:24px;padding:0 12px;font-size:9px;letter-spacing:.05em}.legato-row #metronome[aria-pressed=true]{background:#dce9fc}.legato-row #metronome.beat{box-shadow:inset 0 0 0 2px #75a0d7}#metroBeat{position:absolute;left:calc(50% + 137px);font-size:10px;color:#7b8ca4;width:24px}.ruler .bar-start{font-weight:750;color:#345a93}.timeline-help{font-size:10px;color:#728198;margin-top:10px;max-width:900px}.timeline-help summary{cursor:pointer}.timeline-help p{font-size:12px;line-height:1.6;color:var(--ink)}@media(max-width:640px),(pointer:coarse) and (max-width:1000px){.legato-row #metronome{height:30px;font-size:10px}#metroBeat{left:calc(50% + 145px)}}

/* One origin and exact musical periods for ruler, subdivisions, beats and bars. */
.pitch-row{background-image:none}.time-grid{position:absolute;right:0;bottom:0;z-index:1;pointer-events:none;background-image:linear-gradient(90deg,#617b9f 0 2px,transparent 2px),linear-gradient(90deg,var(--beat-color,#879ab880) 0 1px,transparent 1px),linear-gradient(90deg,#a8b8ce75 0 1px,transparent 1px);background-size:var(--bar) 100%,var(--beat) 100%,var(--division) 100%;background-repeat:repeat-x;background-position:0 0}
.ruler span:before{content:'';position:absolute;left:0;top:-5px;height:24px;border-left:1px solid #879ab8}.ruler span.bar-start:before{border-left:2px solid #617b9f}
.document-tabs-row{display:flex;gap:12px;align-items:end;flex-wrap:nowrap}.file-picker,.document-tabs-row .motifs{position:relative;width:210px;flex:0 1 210px;margin:0;min-width:0;z-index:25}.file-picker{z-index:26}#fileSelect{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:41px;padding:10px;border:1px solid #b1c7e5;border-bottom:0;border-radius:8px 8px 0 0;background:#f1f5fc;box-shadow:inset 0 3px 0 #4085ef;font-size:11px;text-align:left;color:var(--ink)}#fileSelectedName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.document-tabs-row #documentTabs{position:absolute;display:block;left:0;top:100%;width:290px;max-width:calc(100vw - 32px);max-height:320px;overflow-y:auto;padding:5px;border:1px solid #c2ccda;border-radius:0 0 8px 8px;background:#edf1f6;box-shadow:0 8px 20px #43547433}
#documentTabs .document-tab{border:0;border-radius:5px;min-width:0;max-width:none;padding:0;background:transparent;box-shadow:none}#documentTabs .document-tab.active{background:#dce5f3}#documentTabs .document-tab:hover{background:#dce3ed}#documentTabs [role=tab]{height:38px;min-width:0;font-size:11px;padding:0 9px}#documentTabs .rename-tab,#documentTabs .close-tab{width:29px;height:34px}.document-tabs-row #motifList{left:0;right:auto}
@media(max-width:700px){.document-tabs-row{gap:10px;flex-wrap:nowrap}.file-picker,.document-tabs-row .motifs{width:calc(50% - 5px);flex:1 1 0;max-width:none}.document-tabs-row #motifList{right:0;left:auto}#documentTabs [role=tab]{height:44px}}
