:root{--bg: #f5f5f5;--panel: #ffffff;--border: #d0d0d0;font-family:PingFang SC,Microsoft YaHei,微软雅黑,Source Han Sans SC,Noto Sans CJK SC,Yu Gothic UI,Meiryo,Malgun Gothic,Arial Unicode MS,sans-serif}*{box-sizing:border-box}html,body{margin:0;height:100%}#app{display:flex;flex-direction:column;height:100vh}body.file-drag-active #app:after{content:"松开鼠标，直接导入乐谱 / MIDI / 图片";position:fixed;top:14px;right:14px;bottom:14px;left:14px;z-index:10050;display:grid;place-items:center;border:3px dashed #2474d8;border-radius:12px;color:#1556a3;background:#ebf5ffeb;box-shadow:inset 0 0 0 1px #ffffffd9;font-size:clamp(18px,2.5vw,30px);font-weight:700;pointer-events:none}#toolbar{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:6px 10px;background:var(--panel);border-bottom:1px solid var(--border)}#toolbar button{padding:4px 10px;cursor:pointer}#toolbar button.format-unavailable{color:#777;background:#ededed;border-color:#c9c9c9;cursor:not-allowed;filter:grayscale(1);opacity:.62}#toolbar button.format-unavailable:hover{background:#e7e7e7}#toolbar .sep{width:1px;height:20px;background:var(--border);margin:0 6px}.toolbar-notice{position:fixed;z-index:10020;max-width:min(420px,calc(100vw - 24px));padding:8px 12px;border:1px solid #b9b9b9;border-radius:6px;color:#333;background:#fffffffa;box-shadow:0 4px 16px #0000002e;font-size:14px;pointer-events:none;opacity:0;transform:translateY(-4px);transition:opacity .14s ease,transform .14s ease}.toolbar-notice.visible{opacity:1;transform:translateY(0)}#body{flex:1 1 auto;display:flex;min-height:0}#code-pane{flex:0 0 38%;border-right:1px solid var(--border);overflow:auto;background:var(--panel)}#body.mixed #code-pane{display:none}.omr-recognize{background:#fff}.omr-recognize>image{opacity:1}.omr-recognize .omr-overlay{pointer-events:none;opacity:.85}.omr-popup .omr-overlay{opacity:1}.omr-overlay text{fill:#d4145a;font-weight:700;font-family:PingFang SC,Microsoft YaHei,ui-sans-serif,sans-serif}.omr-overlay circle{fill:#d4145a}.omr-overlay .omr-mark{stroke:#d4145a}.omr-overlay .omr-barline{stroke:#1565ff;stroke-linecap:round;opacity:.95}.omr-overlay text.omr-header{fill:#0a7d2c}.omr-overlay text.omr-lyric{fill:#6a1b9a}.omr-overlay .omr-slur{stroke:#e65100}.omr-overlay .omr-tie{stroke:#00838f}.omr-hits rect{fill:transparent;pointer-events:all;cursor:pointer}.omr-hits rect.omr-hover{fill:#ff6d001f;stroke:#ff6d00;stroke-width:2}.omr-hits rect.selected{fill:#1565ff1f;stroke:#1565ff;stroke-width:2}.omr-popup{position:absolute;left:0;width:100%;box-sizing:border-box;z-index:20;pointer-events:none;background:#fffffff7;border:1px solid #bbb;border-radius:4px;box-shadow:0 2px 10px #00000040;padding:0}#toolbar #sel-recog-view{margin:0 2px}#score-pane{flex:1 1 auto;overflow:auto;background:var(--bg);padding:16px;display:flex;flex-direction:column;align-items:safe center;gap:12px;user-select:none;-webkit-user-select:none}#score-pane:focus{outline:none}.cm-editor .cm-selectionBackground,.cm-editor .cm-score-source-selection{background:#1565ff3d!important}.cm-editor .cm-score-source-selection{border-radius:2px;box-shadow:inset 0 -1px #1565ffa6}.cm-slash-voice{border-radius:2px}.cm-slash-voice-marker{position:relative;border-radius:2px}.cm-slash-voice-marker:before{content:attr(data-voice);display:inline-block;width:0;overflow:visible;transform:translateY(-.85em);font-size:8px;font-weight:700;opacity:.75}.score-voice-colored{color:var(--score-voice-color)}.score-page-wrap{width:calc(min(720px,100%) * var(--score-zoom, 1));aspect-ratio:595 / 842;flex:0 0 auto;position:relative;background:#fff;box-shadow:0 1px 6px #00000026;content-visibility:auto}.score-page{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;user-select:none;-webkit-user-select:none}#measure-svg{position:absolute;left:-9999px;top:-9999px;overflow:hidden}.score-page g.selected [fill]:not([fill=none]){fill:#1565ff}.score-page g.selected [stroke]{stroke:#1565ff}.score-page g.selected{cursor:pointer}.score-page text,.score-page path,.score-page line{cursor:default}.score-page g.soft-deleted{opacity:.28}.score-page g.playing [fill]:not([fill=none]){fill:#e8590c}.score-page g.playing [stroke]{stroke:#e8590c}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-box{background:#fff;border-radius:6px;min-width:280px;padding:16px;box-shadow:0 8px 30px #00000040}.modal-title{font-weight:700;margin-bottom:12px}.modal-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}.modal-row span{color:#444}.modal-row input,.modal-row select{padding:4px 6px;min-width:160px}.modal-hint{color:#777;font-size:12px;margin:6px 2px 0;line-height:1.4}.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.modal-footer button{padding:4px 14px;cursor:pointer}.options-box{width:min(620px,calc(100vw - 36px));max-height:calc(100vh - 36px);overflow:auto}.soundfont-options{margin-top:10px;padding:8px 10px;border:1px solid #d9dee7;border-radius:5px;background:#fafbfc}.soundfont-options summary{cursor:pointer;font-weight:600;color:#444}.soundfont-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.soundfont-actions button{padding:4px 9px;cursor:pointer}.soundfont-status{min-height:17px}.soundfont-assignment-list{margin-top:8px;padding-top:2px;border-top:1px solid #e1e5eb}.midi-import-box{width:min(780px,calc(100vw - 36px));max-height:calc(100vh - 36px);overflow:auto}.midi-import-info{margin-bottom:8px;line-height:1.5}.midi-duration-counts,.midi-live-gesture-counts{padding:8px;margin-bottom:8px;border-radius:4px;background:#f3f5f8;font-size:12px;line-height:1.6}.midi-live-gesture-counts{background:#eef6ff;color:#174f86}.midi-import-warning{padding:7px 9px;margin-bottom:8px;border:1px solid #e6b84c;border-radius:4px;background:#fff8dc;color:#785500;font-size:12px}.midi-import-box details{margin-top:8px}.midi-import-box summary{cursor:pointer;color:#444}.midi-split-control,.midi-meter-control{display:inline-flex;align-items:center;gap:6px}.midi-split-control input{min-width:80px;width:80px}.midi-split-control em{min-width:32px;color:#666;font-style:normal}.midi-meter-control input{min-width:64px;width:64px}.midi-meter-control select{min-width:70px}.midi-track-mapping{margin-top:10px;padding:8px;border:1px solid #d9dee7;border-radius:5px;background:#fafbfc}.midi-instrument-editor{margin-top:8px;padding:8px;border:1px solid #e1e5eb;border-radius:4px;background:#fff}.midi-instrument-header,.midi-track-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.midi-instrument-header input{min-width:0;padding:5px 7px}.midi-instrument-header button,.midi-add-instrument{padding:4px 9px;cursor:pointer}.midi-track-row{grid-template-columns:auto minmax(0,1fr) 92px;margin-top:6px;font-size:12px}.midi-track-row input{margin:0}.midi-track-row select{min-width:0;padding:3px}.midi-add-instrument{margin-top:8px}.midi-mapping-error{color:#b42318}.slash-import-box{width:min(700px,calc(100vw - 36px));max-height:calc(100vh - 36px);overflow:auto}.slash-import-box details{margin-top:9px}.slash-import-box summary{cursor:pointer;color:#444}.slash-symbol-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 12px;margin:9px 0}.slash-symbol-row{display:grid;grid-template-columns:auto 54px minmax(130px,1fr);align-items:center;gap:7px;font-size:12px}.slash-symbol-row input,.slash-symbol-row select{min-width:0;padding:4px 6px}.slash-symbol-row input{width:40px;text-align:center;font-family:ui-monospace,Menlo,Consolas,monospace}.slash-space-control{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.slash-space-control small{max-width:360px;color:#777;font-size:11px;text-align:right}.slash-meter-hint{margin:5px 0 8px;padding:6px 8px;border-radius:4px;background:#f3f5f8;color:#596170;font-size:12px}.create-score-box{width:min(520px,calc(100vw - 36px))}.create-score-choices{display:grid;gap:8px;margin-top:12px}.create-score-choices button{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:11px 13px;border:1px solid #cfd5df;border-radius:5px;background:#fafbfc;text-align:left;cursor:pointer}.create-score-choices button:hover{border-color:#4187e8;background:#f2f7ff}.create-score-choices strong{font-size:14px}.create-score-choices small{color:#667085}@media(max-width:620px){.slash-symbol-grid{grid-template-columns:1fr}}.engraving-box{width:min(940px,calc(100vw - 36px));max-height:calc(100vh - 36px);overflow:auto}.engraving-dialog-body{min-width:0}.engraving-hint{margin-bottom:10px}.engraving-preview{display:flex;align-items:center;justify-content:center;min-height:290px;padding:8px 12px;border:1px solid #d8dde6;border-radius:6px;background:#fff;color:#111;overflow:hidden}.engraving-preview svg{display:block;width:100%;max-height:360px}.engraving-controls{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:10px;margin-top:12px}.engraving-section{padding:10px;border:1px solid #e0e3e8;border-radius:6px;background:#f8f9fb}.engraving-section-wide{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;align-content:start}.engraving-section-wide>.engraving-section-title,.engraving-section-wide>.modal-hint{grid-column:1 / -1}.engraving-section-double{grid-column:span 2}.engraving-section-title{margin-bottom:7px;color:#28313d;font-weight:600}.engraving-control{display:grid;grid-template-columns:minmax(86px,1fr) minmax(90px,1.4fr) 58px;align-items:center;gap:7px;min-height:30px;font-size:12px}.engraving-control input[type=range]{min-width:0;width:100%;padding:0}.engraving-control output{color:#55606f;font-variant-numeric:tabular-nums;text-align:right}.engraving-section .modal-row{min-height:30px;margin:0;font-size:12px}.engraving-section .modal-row input[type=checkbox]{min-width:auto;width:18px;height:18px}.engraving-reset{margin-top:10px;padding:5px 12px;cursor:pointer}@media(max-width:780px){.engraving-controls{grid-template-columns:1fr}.engraving-section-wide{grid-column:auto;grid-template-columns:1fr}.engraving-section-double{grid-column:auto}.engraving-section-wide>.engraving-section-title,.engraving-section-wide>.modal-hint{grid-column:auto}.engraving-preview{min-height:135px}}.help-box{width:760px;max-width:92vw;max-height:86vh;display:flex;flex-direction:column}.help-tabs{display:flex;gap:4px;border-bottom:1px solid #ddd;margin-bottom:10px}.help-tab{padding:7px 16px;background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;color:#666;font-size:14px}.help-tab.active{color:#1565ff;border-bottom-color:#1565ff;font-weight:700}.help-content{overflow:auto;flex:1 1 auto;padding-right:6px}.help-pane{color:#333;line-height:1.6;font-size:13px}.help-intro{color:#555;margin:0 0 12px}.help-p{margin:6px 0}.help-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#f2f3f5;border-radius:3px;padding:0 4px;font-size:12px;color:#c0341d}.help-topic{border:1px solid #eaeaea;border-radius:5px;margin:6px 0;padding:0 12px}.help-topic>summary{cursor:pointer;padding:9px 2px;list-style:none;display:flex;align-items:center;gap:8px}.help-topic>summary::-webkit-details-marker{display:none}.help-topic>summary:before{content:"▸";color:#999;font-size:11px}.help-topic[open]>summary:before{content:"▾"}.help-topic[open]>summary{border-bottom:1px solid #f0f0f0}.help-topic-title{font-weight:700;color:#222}.help-topic>.help-p{margin:6px 2px}.help-topic>.help-p:last-child{margin-bottom:10px}.help-badge{font-size:11px;color:#0a7d33;background:#eaf7ee;border-radius:3px;padding:1px 6px}.help-shortcuts{border-collapse:collapse;margin:6px 2px 10px;width:100%}.help-shortcuts td{padding:4px 8px;border-top:1px solid #f0f0f0}.help-shortcuts td:first-child{color:#555;white-space:nowrap}.help-shortcuts td:last-child{color:#222;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px}.help-glossary{border:1px solid #eaeaea;background:#fafbfc;border-radius:5px;padding:4px 12px;margin:0 0 14px}.help-glossary>summary{cursor:pointer;padding:6px 0;font-weight:700;color:#444}.help-gloss-list{margin:4px 0 8px}.help-gloss-list dt{font-weight:700;color:#1565ff;margin-top:8px}.help-gloss-list dd{margin:2px 0 0;color:#444}.help-section{margin:0 0 18px}.help-sec-head{display:flex;align-items:center;gap:8px;margin-bottom:4px}.help-sec-title{font-size:15px;font-weight:700;color:#222}.help-level{font-size:11px;border-radius:3px;padding:1px 7px}.help-level-common{color:#0a7d33;background:#eaf7ee}.help-level-adv{color:#8a5a00;background:#fbf1de}.help-example{border:1px solid #ececec;border-radius:5px;overflow:hidden;margin-top:8px}.help-source{margin:0;padding:8px 12px;background:#f7f8fa;border-bottom:1px solid #ececec;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:#333;white-space:pre-wrap;overflow-x:auto}.help-render{padding:10px 12px;background:#fff;display:flex;justify-content:flex-start;align-items:center;overflow-x:auto}.help-render svg.help-svg{position:static;inset:auto;display:block}#status{flex:0 0 auto;padding:3px 10px;font-size:12px;color:#555;background:var(--panel);border-top:1px solid var(--border);min-height:22px}.note{color:#00f}.break{color:maroon}.barline{color:#f0f}.comment{color:gray}.text{color:green}.lrc{color:#333}.slash{color:#999}.lrcspec{color:#a0a}.metakey{color:#b8860b}.metaval{color:#2e8b57}.unknown{color:#c00}.section{font-weight:700;color:#444}
