@import './chord-picker.css';
.app-shell{height:100dvh;overflow:hidden}
.editor-workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;padding:10px 5.6% 82px;background:var(--v2-bg);height:calc(100dvh - 72px)}
.score-side,.library-side{min-height:0;min-width:0}
.score-side{display:grid;padding:0 12px 0 0;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px}
.selection-tools,.scope-tools{display:flex;align-items:center;gap:6px}
.selection-tools{justify-content:space-between}
.selection-tools>div{display:grid;gap:3px}
.selection-tools strong{font-size:14px;color:#204b41}
.selection-tools span,.editing-hint{font-size:11px;color:#616d66}
.selection-tools button,.scope-tools button,.filter-buttons button,.quick-searches button,.results-head button,.finder-search button{border:1px solid #c5c8bc;border-radius:4px;background:#f8f6f0;color:#53635b;padding:5px 9px;min-height:28px;font-size:12px}
.scope-tools{flex-wrap:wrap}
button[aria-pressed=true],.filter-buttons button[aria-pressed=true]{background:#244d40;border-color:#244d40;color:#fff8ec}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #b95132;outline-offset:2px}
.paper-scroll{border:1px solid #dfe2de;border-radius:10px 1px 1px 10px;background:var(--v2-paper);box-shadow:0 8px 24px #173c3012;min-height:0;overflow:auto;padding:2px 4px 8px 0;scrollbar-width:thin}
.composition-paper{border:0;box-shadow:none;width:100%;height:auto;min-height:100%;aspect-ratio:auto;overflow:visible;border-radius:3px;padding:22px 14px 26px;background:var(--v2-paper)}
.sheet-heading{text-align:center;margin-bottom:20px}
.sheet-heading input{min-height:0;padding:0;border:0;width:90%;background:transparent;text-align:center;font:700 22px/1.4 Georgia,"Songti SC",serif;color:#263c35}
.sheet-heading p{font-size:11px;color:#6d776f;margin:7px 0 0}
.section-label{margin:18px 0 5px 22px;font:600 12px/1.4 Georgia,"Songti SC",serif;color:#0b564e}
.score-row{position:relative;width:100%;padding-top:28px;margin-bottom:15px;isolation:isolate}
.score-row>svg{display:block;width:100%;height:auto;mix-blend-mode:multiply;pointer-events:none}
.bar-select{position:absolute;border:0;border-top:2px solid transparent;background:transparent;z-index:-1;padding:0;border-radius:0}
.bar-select.selected{background:#3273570c;border-top-color:#327357}
.bar-select::after{content:attr(data-number);position:absolute;top:-21px;left:2px;color:#7c8178;font:10px Georgia,serif}
.bar-select.modified::after{content:attr(data-number) " · 已修改";color:#a6402c}
.bar-select:hover{background:#32735712}
.chord-position{position:absolute;z-index:2;top:4px;min-height:22px;min-width:30px;padding:1px 4px;border:1px solid transparent;background:transparent;color:#a6402c;font:700 14px/1 Georgia,"Songti SC",serif;transform:translateX(-50%)}
.chord-position.empty{font:11px/1.4 "PingFang SC",sans-serif;border:1px dashed #cbbca9;color:#8b877b;transform:none;white-space:nowrap}
.chord-position:hover{background:#f5e6d8;border-color:#cfae96}
.beat-target{position:absolute;border:0;background:transparent;z-index:1;border-radius:0;padding:0}
.beat-target:hover,.beat-target:focus-visible{background:#b9513215;outline:1px solid #b9513280}
.score-row .tech-label{position:absolute;bottom:-10px;right:8px;color:#8c7468;font-size:9px}
#blank-help{padding:14px 12px 0;font-size:12px;line-height:1.7;color:#878477;text-align:center}
.library-side{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;border:1px solid #bdbcb1;border-radius:1px 10px 10px 1px;background:var(--v2-paper);box-shadow:0 3px 8px #253c3314;overflow:hidden}
.library-tabs{display:flex;align-items:center;gap:4px;padding:0 14px;border-bottom:1px solid #d6d2c7;min-height:45px}
.library-tabs>button{min-height:43px;padding:0 14px;border:0;border-bottom:3px solid transparent;background:transparent;color:#747a70;font:600 15px Georgia,"Songti SC",serif}
.library-tabs>button[aria-selected=true]{border-color:#a6402c;color:#a6402c}
.library-tabs>span{margin-left:auto;font-size:11px;color:#7b8176;white-space:nowrap}
.finder{padding:10px 14px 0}
.filter-cards{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:5px;margin-bottom:9px}
.filter-cards button{min-width:0;min-height:49px;display:grid;align-content:center;gap:4px;padding:6px 3px;border:1px solid #d7d1c3;border-radius:5px;background:#fffdf8;color:#506052;text-align:center}
.filter-cards button strong{font-size:12px;font-weight:600;white-space:nowrap}
.filter-cards button small{font-size:10px;color:#8b8c7f}
.filter-cards button:hover{border-color:#809f7e;background:#f0f2e9}
.filter-cards button[aria-pressed=true]{background:#28573f;border-color:#28573f;color:#fffaf0}
.filter-cards button[aria-pressed=true] small{color:#d5dfcf}
.finder-search{display:flex;align-items:center;background:#fffdf8;border:1px solid #c9c6bb;border-radius:5px;margin-bottom:8px;padding:0 7px}
.finder-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;min-height:34px;font:13px "PingFang SC",sans-serif;color:#30483e}
.finder-search button{white-space:nowrap;padding:3px 6px;min-height:24px;border:0;background:transparent;color:#7f837b}
.filter-buttons{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.filter-buttons button{border-color:transparent;background:transparent;padding:4px 7px;font-size:12px}
.filter-buttons button:hover{background:#e9e8dc}
.filter-row{display:flex;align-items:center;gap:7px;min-height:32px;font-size:11px;color:#7d8279;margin-top:3px}
.filter-row>select{min-height:27px;border:1px solid #d7d2c6;border-radius:3px;background:#fffdf8;color:#506055;font:12px "PingFang SC",sans-serif;padding:2px 7px}
#more-filters{padding:5px 0;font-size:11px;color:#797f76}
#more-filters summary{cursor:pointer;width:fit-content;min-height:20px}
#more-filters p{margin:4px 0 6px;font-size:10px;line-height:1.5}
.quick-searches{display:flex;gap:5px;align-items:center;margin:3px 0 4px;flex-wrap:wrap}
.quick-searches span{font-size:10px;color:#878b81}
.quick-searches button{font-size:10px;padding:2px 6px;min-height:22px;border-style:dashed;background:transparent}
.results-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #d7d3c9;padding:4px 0;font-size:11px;color:#737c70}
.results-head button{border:0;background:transparent;font-size:11px}
.candidates{min-height:0;overflow-y:scroll;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#b5bbab #efeee5;scrollbar-gutter:stable;padding:0 14px}
.candidate{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 35px;gap:8px;align-items:center;min-height:78px;border-bottom:1px solid #ded8ca;position:relative;padding:7px 7px}
.candidate.selected{background:#edf1e6;box-shadow:inset 3px 0 #327357}
.candidate:hover{background:#f1eee3}
.candidate-select{border:0;background:transparent;text-align:left;min-width:0;padding:0;align-self:stretch;display:grid;align-content:center;gap:5px;color:#29483c}
.candidate-select strong{font-size:12px;font-weight:600;line-height:1.4}
.candidate-select small{font-size:10px;color:#8b887c;line-height:1.4}
.candidate-image{min-width:0;display:block;width:100%;height:59px;object-fit:contain;mix-blend-mode:multiply;pointer-events:none}
.candidate-listen{width:31px;height:31px;border:1px solid #cdd5c6;border-radius:5px;background:#fafcf6;color:#446350;display:grid;place-items:center;padding:5px}
.candidate-listen svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chord-sequence{color:#a6402c;font:700 13px/1.8 Georgia,serif;overflow-wrap:anywhere}
.candidate.chord-candidate{min-height:67px;grid-template-columns:1fr 1.25fr 35px}
.empty-results{text-align:center;color:#758073;padding:24px 12px;font-size:13px;line-height:1.8}
.selected-preview{max-height:95px;overflow:auto;border-top:1px solid #d5d3c6;background:#f3f1e7;padding:9px 14px;font-size:11px;line-height:1.6;color:#6d796b;min-height:49px}
.selected-preview p{margin:0}
.selected-preview strong{font-size:12px;color:#314f41}
.selected-preview select{margin-left:6px;border:1px solid #c5c8bc;border-radius:4px;background:#fffdf8;font:11px "PingFang SC",sans-serif;min-height:26px}
.selected-preview details{margin-top:4px}
.selected-preview details img{display:block;width:100%;max-height:160px;object-fit:contain;mix-blend-mode:multiply}
.apply-area{padding:10px 14px 8px;border-top:1px solid #d4d0c3;background:var(--v2-paper)}
.apply-target{display:flex;align-items:center;justify-content:space-between;gap:8px}
.apply-target strong{font-size:12px;color:#264b3d;white-space:nowrap}
.apply-target span{color:#858777;font-size:10px;line-height:1.5}
.apply-actions{display:flex;gap:7px;margin-top:7px}
.apply-actions button{min-height:34px;padding:0 13px;border:1px solid #c2c8b7;background:#fffdf8;border-radius:4px;font-size:12px;color:#375b49}
.primary,.apply-actions .primary{background:#28573f;color:#fffaf0;border-color:#28573f;font-weight:600}
.apply-actions .primary{flex:1}
#eligibility{margin:4px 0 0;font-size:11px;color:#a26547;min-height:15px;line-height:1.5}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#toast{position:fixed;z-index:1000;bottom:84px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 40px);background:#254a3d;color:#fff9eb;padding:11px 18px;border-radius:6px;box-shadow:0 5px 24px #182c3440;font-size:13px;line-height:1.6}
dialog{width:min(470px,calc(100vw - 32px));border:1px solid #c6bfae;border-radius:8px;padding:18px;background:var(--v2-paper);color:#354d3f;box-shadow:0 18px 60px #182c3450}
dialog::backdrop{background:#182c3460}
dialog header,dialog footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
dialog header{margin-bottom:14px}
dialog button{border:1px solid #c6c9bb;border-radius:4px;min-height:34px;background:#fffdf7;padding:0 12px;font-size:12px;color:#50684f}
dialog .primary{background:#28573f;color:#fffaf0}
dialog footer{justify-content:flex-end;margin-top:18px;flex-wrap:wrap}
dialog label{display:flex;align-items:center;gap:12px;min-height:40px;font-size:12px}
dialog select,dialog input{border:1px solid #c6c9bb;background:#fffdf7;border-radius:4px;padding:5px 8px;min-height:32px;font:13px "PingFang SC",sans-serif;color:#354d3f}
dialog input[type=number]{width:72px}
dialog p{font-size:12px;color:#7b8173;line-height:1.7}
dialog .note-edit{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
dialog .note-edit label{gap:6px}
#audio-host{position:fixed;top:-10000px;left:-10000px;width:800px;height:200px;pointer-events:none}
[hidden]{display:none!important}
.loading-message{padding:22px;text-align:center;color:#778175;font-size:13px}
@media(max-width:1250px){.editor-workspace{gap:12px;padding-left:12px}.candidate{gap:5px;grid-template-columns:1fr 1.15fr 31px}.candidate-select strong{font-size:11px}.library-tabs{padding-inline:10px}.library-tabs>button{padding-inline:8px;font-size:14px}.finder,.apply-area{padding-inline:10px}.candidates{padding-inline:8px}.apply-target{display:grid;gap:3px}}
@media(max-height:760px){.quick-searches{display:none}.selected-preview{padding:6px 12px;min-height:37px}.candidate{min-height:70px}.candidate-image{height:52px}.composition-paper{padding-top:17px}.sheet-heading{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

@media(max-height:760px){.library-tabs{min-height:38px}.library-tabs>button{min-height:38px}.finder{padding-top:6px}.filter-cards{margin-bottom:6px}.filter-cards button{min-height:40px;gap:2px;padding-block:4px}.finder-search{margin-bottom:4px}.finder-search input{min-height:28px}.filter-row{min-height:26px;margin-top:0}.filter-row>select{min-height:24px}.filter-buttons button{min-height:24px;padding-block:2px}#more-filters{padding:2px 0}.results-head{padding:0}.results-head button{min-height:24px}.candidate,.candidate.chord-candidate{min-height:61px;padding-block:5px}.candidate-image{height:46px}.apply-area{padding-block:7px}.apply-actions{margin-top:5px}.apply-actions button{min-height:30px}.apply-target span{max-width:50%}}

.editor-v2 .candidate-select[aria-pressed=true]{background:transparent;color:#29483c;border:0}.editor-v2 .v2-dock{position:fixed}.scope-tools label{display:flex;align-items:center;gap:6px;font-size:12px;color:#61756b}.scope-tools select{min-height:28px;padding:2px 7px;font-size:12px;background:#fffefa}.editor-v2 .v2-dock .section-nav button[aria-pressed=true]{border-bottom-color:var(--v2-brass);color:#9b6310;background:transparent}.editor-v2 .paper-scroll{padding:0}.editor-v2 .section-nav{min-width:0}.editor-v2 .v2-dock{grid-template-columns:auto minmax(200px,1fr) auto}.editor-v2 .bpm-control .tempo-trigger strong{font-size:15px}.editor-v2 .library-side{border-color:#dfe2de}.editor-v2 #toast{bottom:78px}.editor-v2 .score-row{margin-bottom:22px}@media(max-width:1250px){.editor-v2 .editor-workspace{padding-inline:4%;gap:0}}

.editor-v2 .play-toggle.playing .play-glyph{width:9px;height:12px;margin:0;border:0;border-left:3px solid currentColor;border-right:3px solid currentColor}.editor-v2 .v2-score-title{min-width:250px}.editor-v2 .composition-paper{background:var(--v2-paper)}

@media(max-width:1120px){.editor-v2 .editor-workspace{height:calc(100dvh - 104px)}}.editor-v2 .candidate-listen{min-height:31px}.editor-v2 dialog input[type=checkbox]{width:auto;min-height:0}.editor-v2 .composition-paper{border-radius:0}

/* v4: 点谱面后才显示当前对象的选项。 */
.editor-v2 .score-side{grid-template-rows:auto minmax(0,1fr) auto;padding-right:12px}
.editor-v2 .library-side{display:block;min-height:0;background:var(--v2-paper)}
.library-page{height:100%;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto auto;min-height:0}
.context-bar{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:6px 14px;border-bottom:1px solid #d9e1dc;color:#264f42;font-size:13px}
.context-bar>div{display:grid;gap:3px}.context-bar small{font-size:10px}.context-bar button{border:0;min-height:30px;width:30px;padding:0;font-size:22px;color:#7b887e}
.idle-page{padding:64px 28px;color:#5d7167}.idle-kicker,.context-kicker{color:#9b7b37;font-size:11px;letter-spacing:.08em}.idle-page h2{font-size:25px;margin:12px 0 16px;color:#294e41}.idle-page p{font-size:13px;line-height:2.2;color:#7d8b80}.idle-page small{font-size:11px;color:#8b978e}.idle-paper-lines{height:55px;margin:35px 0 24px;background:repeating-linear-gradient(to bottom,transparent 0 9px,#dce3da 9px 10px);max-width:210px;opacity:.45}
.context-page{height:100%;overflow:auto}.context-body{padding:28px 24px}.context-body h2{font-size:25px;margin:10px 0 16px;line-height:1.4}.context-body h3{font-size:12px;color:#83907e;margin:24px 0 10px}.context-body p{font-size:12px;line-height:1.9;color:#7c8c80;margin:12px 0 20px}.context-body label{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:16px 0;font-size:13px;color:#5c7566}.context-body select,.context-body input{min-height:36px;padding:6px 10px;max-width:65%;font-size:13px}.context-body input[type=checkbox]{width:auto;min-height:0}.check-label{justify-content:flex-start!important}.context-body button{font-size:13px;min-height:40px}.context-body>.primary{display:block;width:100%;margin:16px 0 8px}.context-actions{display:grid;gap:12px;margin:26px 0}.context-actions button{padding:18px;text-align:left;display:grid;gap:6px}.context-actions strong{font-size:15px}.context-actions small{font-size:11px;color:#859386}.text-button{border:0;padding:4px 0;font-size:12px!important;color:#607467}
.chord-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.chord-choices button{min-height:59px;font:700 21px Georgia,serif;color:#a6402c;background:#fffdfa;border-color:#d9dfd6}.chord-choices button.chosen{background:#eff4e9;border-color:#668e6c}.action-footnote{font-size:11px!important}.change-summary{padding:16px;background:#fff4df;border-radius:6px;font-size:12px;line-height:1.8;color:#8c6b37}
.score-settings{display:flex;justify-content:center;gap:18px;margin:14px 0 8px}.score-settings label{display:flex;align-items:center;gap:5px;font-size:11px;color:#66796a}.score-settings select{font-size:12px;min-height:32px;padding:4px 8px;border-color:#ced8ce;background:#fffefa}.required-mark{color:#a6402c}.sheet-heading{margin-bottom:30px}.sheet-heading p{font-size:10px}.history-actions{display:flex!important;gap:6px}.composition-paper{min-height:100%;padding-inline:18px}.section-heading{display:flex;align-items:center;gap:9px;margin:15px 0 8px}.section-title{border:0;padding:3px 0;min-height:25px;font:600 14px Georgia,"Songti SC",serif;color:#07594b}.section-heading small{font-size:10px;color:#919d91}.section-footer{display:flex;gap:14px;align-items:center;margin:8px 0 25px;padding-left:14px}.section-footer button{border:0;padding:2px 0;min-height:27px;font-size:11px;color:#8c998c}.section-footer button:first-child{color:#426b55}.editor-v2 .score-row{padding-top:64px;margin-bottom:28px}.score-row>svg{position:relative;z-index:1}.bar-select{z-index:0;min-height:0;border-top:0}.bar-select::after{display:none}.bar-select.selected{outline:1px solid #638c6960;border-top:0;background:#32735708}.measure-caption{position:absolute;top:0;border:0;min-height:18px;padding:0;font-size:10px;color:#8a958a}.chord-slots{position:absolute;top:22px;display:grid;gap:4px;z-index:3;padding:0 4px}.beat-cell{min-width:0;text-align:center}.beat-slot{width:100%;min-height:26px;height:26px;padding:0;border:1px dashed #c8d1c1;border-radius:3px;color:#9aa78f;font:12px Georgia,serif;background:#fffefa}.beat-slot.filled{border-style:solid;border-color:#ddd9cc;color:#a6402c;font-weight:700}.beat-slot.manual{border-bottom:2px solid #a9864d}.beat-slot.active{outline:2px solid #528261;outline-offset:1px;background:#eef4e8}.beat-slot.strong-beat{border-left-width:2px}.beat-cell small{font-size:8px;color:#a6ada1;display:block;line-height:14px}.fractional-chord{position:absolute;top:50px;border:0;min-height:12px;padding:0 2px;z-index:3;font:10px Georgia,serif;color:#a6402c;background:#fffefa}.measure-actions{position:absolute;z-index:10;transform:translateY(14px);padding:5px;border:1px solid #c7d5c5;border-radius:7px;background:#fffefa;box-shadow:0 7px 18px #173c3026;display:grid;min-width:145px}.measure-actions button{border:0;padding:8px 10px;min-height:33px;font-size:12px;text-align:left}.measure-actions button:hover{background:#eef3e9}.beat-target{min-height:0}
.fill-settings{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin-bottom:8px}.fill-settings label{display:flex;align-items:center;gap:5px;font-size:10px;color:#71836f}.fill-settings select{min-height:25px;padding:3px 5px;font-size:11px;max-width:180px}.preserve-choice input{min-height:0;width:auto;margin:0}.apply-target span{max-width:55%}.editor-v2 .library-tabs>button{font-size:13px}.editor-v2 .selected-preview{padding:7px 12px;min-height:0}.editor-v2 .v2-dock{grid-template-columns:auto minmax(160px,1fr) auto}
@media(max-height:760px){.idle-page{padding-top:42px}.library-page .finder{padding-top:5px}.library-page .quick-searches{display:none}.library-page .filter-cards button{min-height:35px}.library-page .context-bar{min-height:38px}.library-page .library-tabs,.library-page .library-tabs>button{min-height:34px}.fill-settings{margin-bottom:5px}.composition-paper{padding-top:16px}}

.score-row:has(.measure-actions){z-index:5}
/* 第五版只增加左页对象交互和右页的粗略示意。 */
.chord-display{display:flex;justify-content:center;gap:0;margin:8px 0}.chord-display button{font-size:10px;min-height:25px;padding:3px 13px;border-radius:0}.chord-display button:first-child{border-radius:4px 0 0 4px}.chord-display button:last-child{border-radius:0 4px 4px 0}.editor-v2 .paper-scroll{overflow-y:auto;scrollbar-gutter:stable}.composition-paper{height:auto;max-height:none}.bar-select{z-index:2}.bar-select:hover{background:#3273570a}.bar-select.play-current{background:#b08b4920;outline:1px solid #a9864d}.note-target,.rhythm-target{position:absolute;padding:0;min-height:0;border:0;background:transparent}.note-target{z-index:5;border-radius:3px}.note-target:hover,.note-target.active{outline:1px solid #986131;background:#c99d4320}.rhythm-target{z-index:4;border-radius:3px}.rhythm-target:hover,.rhythm-target.active{outline:1px solid #327357;background:#32735712}.score-context-menu{position:fixed;z-index:1000;background:#fffefa;padding:5px;border:1px solid #d2dacf;border-radius:6px;box-shadow:0 5px 18px #173c3026}.score-context-menu button{min-height:32px;font-size:12px;border:0;padding:6px 12px}.score-context-menu button:hover{background:#eef3e9}.section-footer{padding-left:14px;gap:16px}.section-footer button:last-child{color:#426b55}.editing-hint{font-size:9px}.section-title{scroll-margin-top:20px}

.library-side[data-context-kind=rhythm] #tab-chords{display:none}

/* 第六版：变化点是谱面的标记，网站播放效果直接复用。 */
.score-row{margin-inline:0;margin-top:0}.score-row.has-signature{margin-top:22px}.bar-signature{position:absolute;top:-21px;border:0;background:transparent;min-height:19px;padding:0;font:600 12px Georgia,"Songti SC",serif;color:#426b55}.bar-select.signature-change{background:#bfa5710c;box-shadow:inset 0 0 0 1px #bfa57118}.bar-select.signature-change:hover{background:#bfa57118}.score-context-menu{display:grid;min-width:164px}.score-context-menu button{text-align:left}.editor-v2 .paper-scroll.v2-score-stage{container-type:normal;padding:0}.editor-v2 .v2-playback-marker{pointer-events:none}.editor-v2 .v2-motion-layer{pointer-events:none}.editor-v2 .beat-slot:hover{border-color:#60836b}

/* 第七版：行内调拍信息与可发现的结构编辑入口。 */
.bar-signature{z-index:4;display:flex;align-items:center;justify-content:center;gap:5px;background:#fffefa;color:#426b55;font:600 12px Georgia,"Songti SC",serif;padding:0;min-height:0;border-radius:2px}
.bar-signature small{display:block;font:8px system-ui;margin-top:2px}.time-signature{display:grid;gap:0;line-height:1.05;font-size:14px}.time-signature b{font-weight:600}
.measure-more{position:absolute;top:-2px;transform:translateX(-100%);z-index:4;border:0;padding:0 5px;min-height:22px;height:22px;font-size:19px;color:#7a8e7d;background:transparent}.measure-more:hover,.section-more:hover{background:#eef3e9}.section-more{border:0;background:transparent;min-height:26px;padding:0 7px;font-size:19px;color:#7a8e7d}
.score-context-menu{max-height:calc(100vh - 20px);overflow:auto;width:202px;padding:6px;border:1px solid #c7d5c5;border-radius:7px;background:#fffefa;box-shadow:0 7px 18px #173c3026;z-index:1000;position:fixed}.score-context-menu>strong{padding:6px 9px;font-size:12px;color:#526e5e}.score-context-menu button{padding:5px 9px;min-height:28px;font-size:12px;border:0;background:transparent;border-radius:3px}.score-context-menu button:hover,.score-context-menu button:focus-visible{background:#eaf1e5}.score-context-menu button:disabled{opacity:.4}.score-context-menu hr{margin:4px 3px;border:0;border-top:1px solid #e3e8e0}
.score-context-menu .score-context-group{padding:7px 9px 2px;font-size:10px;font-weight:700;color:#829282}.score-context-menu hr+.score-context-group{padding-top:3px}
.score-context-section{border-top:1px solid #e3e8e0}.score-context-section summary{cursor:pointer;list-style:none;padding:9px;font-size:12px;color:#526e5e}.score-context-section summary::after{content:'⌄';float:right}.score-context-section[open] summary::after{content:'⌃'}.score-context-section summary:hover,.score-context-section summary:focus-visible{background:#eaf1e5}.score-context-section button{display:block;width:calc(100% - 8px);margin:0 4px;text-align:left}
.score-context-submenu{width:min(330px,calc(100vw - 16px))}.score-context-submenu .score-menu-back{font-weight:700;color:#345b47}.score-menu-modes{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px}.score-menu-modes button[aria-pressed=true]{background:#28573f;color:#fff}.score-menu-choices{display:grid;gap:3px}.score-context-submenu[data-quick-type=note] .score-menu-choices{grid-template-columns:repeat(4,1fr)}.score-context-submenu[data-quick-type=note] .score-menu-choice{text-align:center;font-size:15px;min-height:36px}.score-menu-choice{display:grid;gap:2px;width:100%;border-bottom:1px solid #edf0e8!important}.score-menu-preview{display:block;min-width:0;height:50px;overflow:hidden;pointer-events:none}.score-menu-preview svg{display:block;width:auto;max-width:100%;height:50px;mix-blend-mode:multiply}.score-menu-more{color:#3a6951!important}.score-quick-trigger{display:none;position:absolute;z-index:7;width:28px;height:28px;min-height:28px;border:1px solid #b9c8b7;border-radius:15px;background:#fffdf8;color:#345b47;box-shadow:0 2px 5px #173c3026;font-size:18px;line-height:18px;padding:0}@media(pointer:coarse){.score-quick-trigger{display:block;width:44px;height:44px;min-height:44px;border-radius:22px}.score-context-menu button{min-height:44px}.score-context-submenu[data-quick-type=note] .score-menu-choice{min-height:44px}}
.beat-slot.carried{color:#798f7c;font-weight:400;background:#fafbf7}.beat-slot.carried::after{content:"↳";font:8px system-ui;margin-left:2px;color:#8d9d8f}.history-actions{flex-wrap:wrap;justify-content:flex-end}.editing-hint #save-status{font:inherit;color:#527460;background:transparent;border:0;padding:0;min-height:16px}
.score-context-submenu[data-quick-type=beat] .score-menu-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.score-context-submenu[data-quick-type=beat] .score-menu-choice{min-width:0}.score-context-submenu[data-quick-type=beat] .score-menu-preview,.score-context-submenu[data-quick-type=beat] .score-menu-preview svg{height:38px}
#operation-dialog{max-width:360px;width:calc(100vw - 48px);padding:24px;border:1px solid #c7d5c5;border-radius:10px;background:#fffefa;color:#29483c;box-shadow:0 15px 45px #173c3033}#operation-dialog::backdrop{background:#173c301c}#operation-dialog h2{font-size:19px;margin:0 0 18px}#operation-dialog label{display:grid;gap:6px;margin-bottom:12px;font-size:13px}#operation-dialog input,#operation-dialog select{width:100%;min-height:34px}#operation-dialog p{font-size:12px;line-height:1.8}#operation-error{color:#a6402c}.operation-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.operation-actions button{min-height:34px}.bar-select.selected{outline:2px solid #638c69!important;outline-offset:-1px}

.bar-signature button{border:0;padding:3px;background:transparent;color:inherit;font:inherit;cursor:pointer}.bar-signature button:focus-visible{outline:2px solid #60836b;outline-offset:1px}

.bar-select{touch-action:pan-y}.measure-caption{touch-action:none}.measure-caption[aria-pressed=true]{color:#426b55;font-weight:600;background:transparent}#score-rows.is-drag-selecting,#score-rows.is-drag-selecting *{cursor:crosshair!important;user-select:none}

/* 和弦页：复用老站的候选分组，适配新版双页编辑。 */
.library-side[data-context-kind=beat] .context-body{padding:12px 14px}



.progression-degrees{font:600 12px/1.7 Georgia,serif;color:#52705a;overflow-wrap:anywhere}.chord-candidate .chord-sequence{font-size:13px;line-height:1.7}.chord-candidate .candidate-select small{font-size:9px}



/* 和弦右页是一张连续纸页：展开内容自然推开下文。 */
.editor-v2 .library-side.chord-split{overflow-y:auto;scrollbar-width:thin;scrollbar-gutter:stable}
.chord-split #context-page,.chord-split #library-page{height:auto;min-height:0;overflow:visible;display:block}
.chord-split #context-page>.context-bar{border:0;padding:12px 22px 0;min-height:36px}
.library-side[data-context-kind=beat] .context-body{padding:10px 22px 8px}








.chord-split #library-page>.context-bar{border:0;padding:12px 22px 6px;min-height:48px}
.chord-split #library-page>.context-bar>div{display:flex;align-items:baseline;justify-content:space-between;width:100%;gap:12px}
.chord-split #context-kind{font-size:17px;font-weight:600;color:#294e41}.chord-split #context-title{font-size:11px;font-weight:400;color:#7c897b}
.chord-split #library-page>.context-bar button,.chord-split .library-tabs,.chord-split .finder{display:none}
.chord-split .candidates{overflow:visible;padding:0 22px 12px;scrollbar-gutter:auto}
.candidate.chord-candidate{grid-template-columns:minmax(0,1fr) 32px;gap:12px;min-height:72px;padding:10px 8px}
.chord-candidate .candidate-select{display:grid;grid-template-columns:minmax(100px,.75fr) minmax(0,1.6fr);gap:14px;align-items:center;min-height:50px}
.progression-name{display:grid;gap:5px}.chord-candidate .candidate-select strong{font-size:13px}.chord-candidate .candidate-select small{font-size:10px;color:#8b9385}
.progression-sequence{display:flex;flex-wrap:wrap;gap:8px 12px}.progression-step{display:grid;gap:3px;min-width:28px;text-align:center}
.progression-degrees{font:600 12px/1.4 Georgia,serif;color:#55735b}.chord-candidate .chord-sequence{font:600 15px/1.4 Georgia,serif;white-space:nowrap}
.chord-candidate .candidate-listen{border:0;background:transparent}.chord-candidate.selected{border-radius:4px}
.chord-split .apply-area{position:sticky;bottom:0;z-index:6;padding:14px 22px;background:var(--v2-paper);box-shadow:0 -5px 16px #253c3308}
.apply-area .apply-target{display:grid;gap:5px}.apply-area .apply-target span{max-width:none;font-size:11px}.apply-area #eligibility:empty{display:none}
#apply-options{margin:8px 0;font-size:11px;color:#637b69}#apply-options>summary{cursor:pointer;line-height:24px;width:fit-content}
#apply-options[open]{padding-bottom:6px}#apply-options .fill-settings{margin:8px 0}
.editor-v2 #apply-options .selected-preview{border:0;padding:0;background:transparent;overflow:visible;max-height:none}
#apply-options .selected-preview select{font-size:11px}.chord-split #preview-sound{display:none}
@media(max-width:1120px){.chord-candidate .candidate-select{grid-template-columns:minmax(78px,.7fr) minmax(0,1.5fr);gap:8px}.progression-sequence{gap:6px}.chord-split .candidates{padding-inline:16px}.library-side[data-context-kind=beat] .context-body{padding-inline:16px}}

/* 数字进行与写入方式共用一个预览和执行入口。 */
.library-page{grid-template-rows:auto auto auto minmax(0,1fr) auto}
.library-page[data-finder=chords]{grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
.progression-search{padding:10px 14px 12px}.chord-split .progression-search{padding:4px 22px 14px}
.progression-search>label{display:block;margin-bottom:8px;font-size:12px;color:#466653}.progression-search .finder-search{margin-bottom:5px}
.progression-search input{font:500 17px Georgia,serif;letter-spacing:.1em;min-height:38px}.progression-search input::placeholder{font:12px system-ui;letter-spacing:0}
.progression-search small{font-size:10px;color:#7b897b}.progression-search [role=alert]{font-size:12px;color:#a6402c;margin:8px 0 0}
.custom-progression{background:#f4f5ed;border:1px dashed #bacbb5;border-radius:5px;margin-bottom:8px}
.progression-mode{display:flex;gap:4px;margin-bottom:12px;padding:3px;background:#edf0e8;border-radius:5px}
.progression-mode button{flex:1;padding:6px 8px;min-height:32px;font-size:12px;border:0;background:transparent;color:#627567}
.progression-mode button[aria-pressed=true]{background:#fffefa;color:#244d40;box-shadow:0 1px 4px #244d4020}
.bar-select.insert-before{border-left:3px solid #b07a2d;background:transparent;outline:none!important}
.bar-select.insert-before::before{content:'插入 ' attr(data-insert-count) ' 小节';position:absolute;bottom:100%;left:-3px;padding:3px 6px;background:#fff3d7;color:#805b22;border-radius:3px;font:11px system-ui;white-space:nowrap}

/* 右手弹法以完整节奏卡片展示；多小节卡片跨两列，节宽保持一致。 */
@font-face{font-family:alphaTab;src:url('/a/a6627ce37ff040ce16493a0f6cf50aef5f05442c/static/vendor/alphatab/font/Bravura.woff2') format('woff2')}
.library-page[data-finder=patterns] .empty-results{grid-column:1/-1}
.score-settings .bpm-control{display:inline-flex;vertical-align:middle;margin-left:8px}
.score-settings .tempo-trigger{min-height:30px;padding:2px 8px;border:1px solid #d8d8cc;border-radius:5px;background:#fffefa;color:#435849}


.rhythm-controls{padding:10px 16px;border-bottom:1px solid #dce2d6}.rhythm-mode-buttons,.rhythm-beats{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}.rhythm-controls button[aria-pressed=true]{background:#dcead5;border-color:#749a71}.rhythm-controls p{font-size:12px;color:#68766c;margin:4px 0}.rhythm-adjust,.rhythm-more{grid-column:1/-1;padding:10px}.rhythm-adjust{background:#edf4e8}

.library-page[data-finder]{grid-template-rows:auto auto auto auto auto minmax(0,1fr) auto}.library-page>.context-bar{grid-row:1}.library-page>.library-tabs{grid-row:2}.library-page>.finder{grid-row:3}.library-page>#progression-search{grid-row:4}.library-page>#rhythm-controls{grid-row:5}.library-page>.candidates{grid-row:6}.library-page>.apply-area{grid-row:7}

.rhythm-controls button[aria-pressed=true]{color:#355744}

/* 右页：入口、筛选、候选和固定操作各占一层。 */
.library-page[data-finder=patterns]>#rhythm-controls{grid-row:3;padding:10px 14px 8px}
.library-page[data-finder=patterns]>.finder{grid-row:4;padding:6px 14px}
.library-page[data-finder=patterns]>#progression-search{grid-row:5}
.library-page[data-finder=patterns] .filter-cards{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 5px}
.library-page[data-finder=patterns] .filter-cards button{min-height:30px;padding:4px 10px;border:0;background:transparent;flex:none}
.library-page[data-finder=patterns] .filter-cards button[aria-pressed=true]{background:#e6eee0;color:#355744}
.library-page[data-finder=patterns] .filter-cards strong{font-size:12px;font-weight:500}.library-page[data-finder=patterns] .filter-cards small{display:none}
.library-page[data-finder=patterns] #pattern-filters{font-size:11px;color:#627567;margin:2px 0 6px}
#pattern-filters>summary{cursor:pointer;min-height:24px;line-height:24px;width:fit-content}
.library-page[data-finder=patterns] .results-head{margin:0;padding:3px 0;font-size:10px}
.rhythm-route{display:flex;align-items:center;gap:6px}.rhythm-route button{min-height:32px;padding:5px 12px;font-size:12px}.rhythm-route strong{font-size:12px;font-weight:500}
.catalog-switch{margin-left:auto}.library-page[data-rhythm-view=measure]>.rhythm-controls{display:flex;align-items:center;justify-content:space-between;gap:8px}
.catalog-switch button{border:0;background:transparent;min-height:30px;padding:4px;font-size:11px;color:#657b68}
.rhythm-reference{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:center;gap:8px;margin:6px 0;font-size:10px;color:#657b68}
#rhythm-reference-score{height:62px;overflow:hidden}#rhythm-reference-score svg{width:100%;height:62px}
.rhythm-beats,.rhythm-mode-buttons{gap:4px;margin:5px 0 0}.rhythm-beats button,.rhythm-mode-buttons button{min-height:28px;padding:4px 10px;font-size:11px}
.library-page[data-finder=patterns] .apply-area{padding:10px 14px;border-top:1px solid #dce2d6;background:#fffefa}
.library-page[data-finder=patterns] .apply-target{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px}.library-page[data-finder=patterns] .apply-target span{font-size:10px}
.library-page[data-finder=patterns] .apply-actions{display:flex;gap:6px;margin-top:8px}.library-page[data-finder=patterns] .apply-actions button{font-size:11px;min-height:32px;padding:5px 9px}.library-page[data-finder=patterns] #apply{flex:1}
.library-page[data-finder=patterns] #apply-options{margin:3px 0}.candidate-select:focus-visible,.candidate-listen:focus-visible,.rhythm-controls button:focus-visible{outline:2px solid #426e54;outline-offset:-2px}

.library-page[data-finder=patterns]>.finder{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px}
.library-page[data-finder=patterns] #family-filters{grid-column:1;grid-row:1;margin:0}.library-page[data-finder=patterns] #pattern-filters{grid-column:2;grid-row:1;margin:0}.library-page[data-finder=patterns] #pattern-filters[open]{grid-column:1/-1;grid-row:2}
.library-page[data-finder=patterns] .results-head{grid-column:1/-1}.library-page[data-finder=patterns] .filter-cards button{padding:3px 7px;min-height:28px}
.library-page[data-finder=patterns] .context-bar>div{display:flex;gap:12px;align-items:center}.library-page[data-finder=patterns] #context-kind{font-size:13px;color:#355744}.library-page[data-finder=patterns] #context-title{font-size:12px}
.rhythm-more{flex-basis:100%}

/* 预览谱面和文字拍位共享同一坐标；按钮覆盖谱面及其下方文字。 */
.rhythm-reference{grid-template-columns:70px minmax(0,1fr);margin:8px 0 6px}
.reference-stage{position:relative;justify-self:center;padding-bottom:32px;max-width:100%}
.reference-svg svg{display:block;width:100%;height:auto;max-height:72px}
.reference-beats{position:absolute;inset:0;bottom:0}
.reference-beats button{position:absolute;top:0;bottom:0;min-height:0;padding:0;border:0;background:transparent;border-radius:0}
.reference-beats button>span{position:absolute;bottom:0;transform:translateX(-50%);white-space:nowrap;font-size:10px;padding:5px 1px;border:1px solid #dce2d6;border-radius:4px;background:#fffefa}
.rhythm-controls .reference-beats button[aria-pressed=true]{background:transparent;border:0}
.reference-beats button[aria-pressed=true]>span{background:#dcead5;border-color:#749a71;color:#355744}
.reference-beats button:focus-visible{outline:2px solid #426e54;outline-offset:-2px}

.editor-v2 .library-side{margin-top:var(--page-top,43px);margin-bottom:var(--page-bottom,24px)}
.editor-v2 .library-page .apply-actions button,.editor-v2 .library-page[data-finder=patterns] .apply-actions button{min-height:44px;padding:8px 12px;font-size:12px}
#save-draft{color:#28573f;border-color:#91aa91;background:#eef3e9}
#finish-score{color:#fffefa;background:#28573f;border-color:#28573f;white-space:nowrap}
.editor-workspace.formal-mode{grid-template-columns:minmax(0,1fr)}
.formal-mode .score-side{width:100%;justify-self:center;padding:0}
.formal-mode .library-side{display:none}
.formal-preview{min-height:0;overflow:auto;scrollbar-width:thin;padding:12px 0 28px}
.formal-preview[hidden]{display:none}
@media (orientation:landscape) and (max-width:1200px){.editor-v2 .editor-workspace{grid-template-columns:minmax(0,1fr)}.editor-v2 .score-side{grid-column:1;min-width:0}.editor-v2 .library-side{display:none}.editor-v2 .library-side.editing-popover{display:block;position:fixed;z-index:80;right:12px;top:72px;bottom:70px;width:min(470px,47vw);height:auto;margin:0;border-radius:10px;box-shadow:0 12px 38px #173c3040;overflow:auto}.score-quick-trigger{display:block}}

.formal-page-controls{display:flex;align-items:center;justify-content:center;gap:16px;position:sticky;top:0;z-index:4;background:#f2f3eeeF;padding:8px;margin-bottom:12px}
.formal-page-controls[hidden]{display:none}
.formal-page-controls button{min-height:40px}
