/* StarMap 編輯畫面（3A：瀏覽） */
:root{--e2-sec:#4b5b72;--e2-fg:#0B1528;--e2-line:#c5ccd6;--e2-faint:#c9d1da;--e2-blue:#2f6fd0;--e2-acc:#c0561f;--e2-mut:#7b8794;--e2-off:#d6453d;--cR:#2bb39a;--cL:#5b8def}
:root[data-theme="dark"]{--e2-sec:#c3cde0;--e2-fg:#e9eef6;--e2-line:#3a4660;--e2-faint:#38445c;--e2-blue:#7aa7ff;--e2-acc:#ffa76b;--e2-mut:#8e9bb0;--e2-off:#ff7b73;--cR:#4fd3b8;--cL:#86a9ff}
.ed{position:fixed;inset:0;z-index:5;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0px)}
.ed[hidden]{display:none}
.ed-hd{display:flex;align-items:center;gap:var(--s2);padding:var(--s4) var(--s4) 0}
.ed-title{flex:1;min-width:0;margin:0;text-align:center;font-size:1.0625rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


.ed-view{flex:1;min-height:0;margin:0 var(--s2);border-radius:var(--r-panel) var(--r-panel) 0 0;background:var(--surface);border:1px solid var(--surface-edge);border-bottom:0;box-shadow:var(--shadow-card);overflow:auto;touch-action:pan-x pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;outline:0;padding-bottom:env(safe-area-inset-bottom,0px)}
.ed-stage{width:max-content;min-width:100%;padding-top:8px}   /* 實際留白由 applyScale 照最上面的字算（inline style） */   /* 第 44 版回饋：第一列的小節號不要貼著上緣被切到（screen_edit.js 的 PADT 要一樣） */
.ed-view svg{display:block;max-width:none;overflow:visible;user-select:none;-webkit-user-select:none}
.ed-empty{padding:var(--s6) var(--s4);text-align:center}
.ed-view[data-v="sv"],.ed-view[data-v="sj"]{--e2-fg:#4b5b72;--e2-line:#cdd4de}   /* 五線譜：墨色改淺一點，不要比其他譜面重（原本 #0B1528 太重） */
:root[data-theme="dark"] .ed-view[data-v="sv"],:root[data-theme="dark"] .ed-view[data-v="sj"]{--e2-fg:#c3cde0;--e2-line:#3a4660}

/* ---------- 3B 編輯：下方固定鍵盤（高度固定、不切分頁） ---------- */
.ed.editing .ed-view{border-radius:var(--r-panel);border-bottom:1px solid var(--surface-edge);padding-bottom:0;margin-bottom:var(--s2);cursor:cell}
.ed-kb{flex:none;margin:0 var(--s2);padding:var(--s2) var(--s2) calc(var(--s2) + env(safe-area-inset-bottom,0px));border-radius:var(--r-panel) var(--r-panel) 0 0;display:flex;flex-direction:column;gap:6px}
.ed-kb-where{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--fs-meta);color:var(--ink-2);white-space:nowrap;padding:0 var(--s1)}
.ed-kb-tabs{flex:none}.ed-kb-tabs .sm-btn{min-height:2.75rem;min-width:2.75rem;padding:0 var(--s3);font-size:var(--fs-meta)}
.ed-kb-gridb{flex:none;min-height:2.75rem;min-width:2.75rem;padding:0 var(--s2);font-size:var(--fs-meta)}
/* 中間：音位頁與編輯頁疊在同一格，高度取比較高的那一頁（切換分頁時鍵盤高度不變） */
.ed-kb-mid{display:grid}.ed-kb-mid>*{grid-area:1/1}
.ed-kb[data-tab="keys"] .ed-kb-page,.ed-kb:not([data-tab="keys"]) .ed-kb-keys{visibility:hidden}
.ed-kb-page:not(.ed-pg){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;align-self:start}   /* 編輯頁十四顆按鈕一列五顆、共三列（11-14 加了上下對調、左右對調；維持三列，鍵盤高度不變） */

.ed-kb-keys{display:grid;grid-template-columns:repeat(var(--cols,5),minmax(0,1fr));gap:4px}
.ed-key{appearance:none;font:inherit;height:2.75rem;border-radius:var(--r-ctl);border:1px solid var(--surface-edge);background:var(--surface);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:1.05;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation;transition:transform var(--dur-press) var(--ease-out),background-color var(--dur-press) ease}
.ed-key:active{transform:scale(.95);background:var(--press)}
.ed-key .t{font-size:1.0625rem;font-weight:500;font-variant-numeric:tabular-nums}
.ed-key .s{font-size:.6875rem;color:var(--ink-3)}
.ed-key.perc .t{font-weight:500;color:var(--ink-2)}
.ed-kb-acts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px}
.ed-kb-acts.ed-kb-low{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}   /* 第 111 版：最下列＝切換 往左 往右 [休止] 復原 重做（5～6 顆平均分寬） */
/* 右手／左手：手形圖示用手的顏色，底邊同色色條 */
.ed-kb-acts .ed-hand.hR svg{color:var(--cR)}.ed-kb-acts .ed-hand.hL svg{color:var(--cL)}.ed-kb-acts .ed-hand.hL svg{transform:scaleX(-1)}
.ed-kb-acts .ed-hand{box-shadow:inset 0 -3px 0 -0px var(--hc)}.ed-kb-acts .ed-hand.hR{--hc:var(--cR)}.ed-kb-acts .ed-hand.hL{--hc:var(--cL)}
/* 效果薄列：一列高、可以左右滑；每顆上面代碼、下面簡短說明（像音位鍵底下的音高）；組和組之間細分隔線 */
.ed-fxbar{padding-bottom:6px;border-bottom:1px solid var(--sep,var(--surface-edge));margin:0 calc(-1 * var(--s2));}
.ed-fx-strip{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;touch-action:pan-x;padding:0 var(--s2)}
.ed-fx-strip::-webkit-scrollbar{display:none}
.ed-fx-g{display:flex;gap:6px;flex:none}
.ed-fx-g+.ed-fx-g{padding-left:6px;border-left:1px solid var(--sep,var(--surface-edge))}
.ed-fxb{appearance:none;font:inherit;flex:none;width:4rem;height:2.75rem;border-radius:var(--r-ctl);border:1px solid var(--surface-edge);background:var(--surface);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:1.05;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.ed-fxb .c{font-size:1.0625rem;font-weight:500}
.ed-fxb .s{font-size:.6875rem;color:var(--ink-3);white-space:nowrap}
.ed-fxb:active{transform:scale(.95);background:var(--press)}
.ed-fxb[aria-pressed="true"]{background:var(--press);border-color:var(--e2-blue);color:var(--e2-blue)}.ed-fxb[aria-pressed="true"] .s{color:var(--e2-blue)}.ed-fxb:disabled{opacity:.4}
@media (max-width:480px){.ed-fxbar{margin:0 -4px}.ed-fx-strip{padding:0 4px}}
/* 滑鼠電腦：不好橫向滑，改成換行、全部看得到 */
@media (pointer:fine){.ed-fx-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible}.ed-fx-g{display:contents}.ed-fxb{width:auto}.ed-fx-g+.ed-fx-g .ed-fxb:first-child{box-shadow:-4px 0 0 -2px var(--sep,var(--surface-edge))}}
.ed-kb-acts .ed-act{flex-direction:column;gap:1px;min-width:0;padding:var(--s1) 0;font-size:.6875rem}
/* 手機：鍵盤貼齊左右邊、內距小一點，最下面一排 8 顆在 360 寬也有 44px */
@media (max-width:480px){.ed-kb{margin:0;padding-left:4px;padding-right:4px}.ed-kb-acts{gap:0}}
.ed-kb-acts .ed-act[hidden]{display:none}
.ed-kb-acts .ed-act[aria-pressed="true"]{background:var(--press);color:var(--e2-blue)}
.ed-kb-acts .ed-act:disabled{opacity:.35}
@media (min-width:900px){.ed.editing:not(.ed-bot){display:grid;grid-template-columns:minmax(0,1fr) 26rem;grid-template-rows:auto auto minmax(0,1fr)}
.ed.editing:not(.ed-bot) .ed-hd{grid-column:1/-1}
.ed.editing:not(.ed-bot) .ed-view{grid-column:1;grid-row:3;margin-bottom:var(--s2)}
.ed.editing:not(.ed-bot) .ed-kb{grid-column:2;grid-row:3;align-self:start;margin:0 var(--s2) 0 0;border-radius:var(--r-panel);padding-bottom:var(--s2)}
}

.ed.editing .ed-stage>svg{pointer-events:none}   /* 編輯中：觸控的目標固定是外框（重畫譜面時 svg 會換掉，手指拖到一半目標不見，後面的移動就收不到） */
/* ---------- 3C-2：分頁列五個（圖示＋兩字，上下排）、和弦／記號／歌詞三頁 ---------- */
.ed-kb-tabs{gap:0}.ed-kb-tabs .sm-btn{flex-direction:column;gap:0;min-width:2.75rem;padding:2px 3px;font-size:.6875rem;line-height:1.1}
.ed-kb-tabs .sm-btn .ic{width:1.2rem;height:1.2rem}
/* 網格鈕跟分頁一樣上下排：上面小字「網格」、下面 1/16 */

@media (max-width:420px){.ed-kb-tabs{padding:0}.ed-kb-gridb{padding:2px}.ed-kb-where{padding:0}}
@media (max-width:370px){.ed-kb{padding-left:3px;padding-right:3px}}   /* 360 寬：五個分頁＋網格＋復原重做每顆 44px 剛好放得下 */
.ed-kb-mid{position:relative}
.ed-kb[data-tab] .ed-kb-mid>[data-pg]{visibility:hidden}
.ed-kb[data-tab="keys"] .ed-kb-mid>[data-pg="keys"],.ed-kb[data-tab="sel"] .ed-kb-mid>[data-pg="sel"],.ed-kb[data-tab="chord"] .ed-kb-mid>[data-pg="chord"],.ed-kb[data-tab="bar"] .ed-kb-mid>[data-pg="bar"],.ed-kb[data-tab="view"] .ed-kb-mid>[data-pg="view"],.ed-kb[data-tab="lyric"] .ed-kb-mid>[data-pg="lyric"]{visibility:visible}
/* 和弦、記號、歌詞三頁疊在音位頁上面，高度跟音位頁一樣，內容多就在裡面上下捲（鍵盤高度不跳） */
.ed-kb-mid>.ed-pg{position:absolute;inset:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;align-self:stretch;gap:6px}
.ed-ch-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.ed-ch{appearance:none;font:inherit;min-height:3.6rem;border-radius:var(--r-ctl);border:1px solid var(--surface-edge);background:var(--surface);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:4px 2px;line-height:1.1;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;min-width:0;transition:transform var(--dur-press) var(--ease-out),background-color var(--dur-press) ease}
.ed-ch:active{transform:scale(.95);background:var(--press)}
.ed-ch .d{font-size:.6875rem;color:var(--ink-3)}
.ed-ch .n{font-size:1.0625rem;font-weight:500;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-ch .k{font-size:.6875rem;color:var(--ink-3);letter-spacing:.06em;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-ch[aria-pressed="true"]{background:var(--press);border-color:var(--e2-blue);color:var(--e2-blue)}.ed-ch[aria-pressed="true"] .d,.ed-ch[aria-pressed="true"] .k{color:var(--e2-blue)}
.ed-pg-empty{grid-column:1/-1;padding:var(--s4) 0;text-align:center}
.ed-pg-g{display:flex;flex-direction:column;gap:2px;padding-bottom:6px;border-bottom:1px solid var(--sep,var(--surface-edge))}.ed-pg-g:last-child{border-bottom:0}
.ed-pg-h{font-size:.6875rem;padding:0 2px}
.ed-pg-bs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.ed-mk{min-width:0;min-height:2.75rem;padding:0 4px;font-size:.8125rem;justify-content:center}
.ed-mk .lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-mk.wide{grid-column:span 2}
.ed-mk.dyn .lbl{font-style:italic;font-weight:500;font-family:Georgia,'Times New Roman',serif;font-size:1rem}
.ed-mk[aria-pressed="true"]{background:var(--press);color:var(--e2-blue);box-shadow:inset 0 0 0 1px var(--e2-blue)}
.ed-mk:disabled{opacity:.35}
.ed-ly-row{display:flex;align-items:center;gap:4px}
.ed-ly-row .sm-btn{flex:none;width:2.75rem;height:2.75rem;min-width:2.75rem;padding:0}
.ed-ly-box{flex:1;min-width:3.5rem;position:relative}
.ed-ly-in{width:100%;box-sizing:border-box;height:2.75rem;font-size:1rem;padding-right:3.6em}
.ed-ly-pos{position:absolute;right:.5em;top:50%;transform:translateY(-50%);font-size:.6875rem;pointer-events:none;white-space:nowrap}
.ed-ly-tools{grid-template-columns:repeat(3,minmax(0,1fr))}
.ed-ly-ta{width:100%;min-height:7rem;resize:vertical;font:inherit;line-height:1.5}
.ed-ask-note{margin:var(--s2) 0 0}

/* 小面板的內容（整段歌詞等）：左右和面板邊界留一樣的距離 */
.ed-ask{padding:var(--s2) var(--pad-modal) 0}
.ed-ask .ed-ly-ta{box-sizing:border-box;width:100%;min-height:11rem}
.ed-ask-note.over{color:var(--e2-off)}

/* 和弦頁：游標這一拍的音；完全符合的和弦卡加一條綠色底線與小點，部分符合的不標 */

.ed-ch.fit{box-shadow:inset 0 -3px 0 var(--cR)}
.ed-ch.fit .d::before{content:'● ';color:var(--cR)}
.ed-ly-tools{grid-template-columns:repeat(3,minmax(0,1fr))}

@media (max-width:400px){.ed-ly-row{gap:0}.ed-ly-row>.sm-btn{width:2.75rem;min-width:2.75rem}}
.ed-ly-from{margin-bottom:var(--s2)}.ed-ly-from .sm-btn{min-height:2.75rem;font-size:var(--fs-meta)}

/* iPhone 長按譜面：不要跳出系統的放大鏡與選字把手 */
.ed-view,.ed-view *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

.ed-info{display:grid;gap:var(--s2)}
.ed-ts-btn{text-align:left;min-height:2.75rem;cursor:pointer}
.ed-ts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(4.25rem,1fr));gap:var(--s2);margin-bottom:var(--s2)}
.ed-ts-o{min-height:2.75rem}.ed-ts-o[aria-pressed=true]{background:var(--press);color:var(--e2-blue);box-shadow:inset 0 0 0 1px var(--e2-blue)}
/* 3E：網格鈕、時值鈕和分頁一樣是「圖示＋小字」上下排 */
.ed-kb-gridb{flex-direction:column;gap:0;padding:2px 3px;font-size:.6875rem;line-height:1.1}.ed-kb-gridb .ic{width:1.2rem;height:1.2rem}.ed-kb-gridb[hidden]{display:none}
.ed-kb-gridb .lbl{font-variant-numeric:tabular-nums}
.ed-key.rest .t{color:var(--ink-2)}
.ed-db{width:3.5rem}.ed-db .ic{width:1.25rem;height:1.25rem}.ed-db[aria-pressed="true"] .ic{color:var(--e2-blue)}/* 3E-2：連音鈕旁邊的小箭頭（選 3／5／6／7），兩顆貼在一起；寬度 44px 以上好按 */
.ed-tupw{display:flex;flex:none}
.ed-tupw>.ed-fxb:first-child{border-top-right-radius:0;border-bottom-right-radius:0}
.ed-fxb.ed-tupm{width:2.75rem;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}
.ed-fxb.ed-tupm svg{width:1rem;height:1rem}
@media (pointer:fine){.ed-tupw{display:contents}.ed-tupw>.ed-fxb:first-child,.ed-fxb.ed-tupm{border-radius:var(--r-ctl);border-left:1px solid var(--surface-edge)}}
/* ---------- 第 4 步：播放列、磁頭、循環範圍、三個面板 ---------- */
.pl-bar{flex:none;display:flex;justify-content:center;gap:2px;margin:0 var(--s2) var(--s2);padding:2px 4px;border-radius:var(--r-panel)}
.ed.editing .pl-bar{margin-bottom:var(--s2)}
.pl-b{flex:0 1 4rem;min-width:2.75rem;min-height:2.75rem;flex-direction:column;gap:0;padding:2px 2px;font-size:.6875rem;line-height:1.15}
.pl-b .ic{width:1.25rem;height:1.25rem}
.pl-b .lbl{white-space:nowrap;font-variant-numeric:tabular-nums}
.pl-b[aria-pressed="true"]{color:var(--e2-blue,#3b6fd8);background:var(--press)}
.pl-b.stair .lbl::after{content:'↗';margin-left:1px}
.pl-b:disabled{opacity:.35}
@media (max-width:420px){.pl-bar{margin-left:0;margin-right:0;border-radius:var(--r-panel) var(--r-panel) 0 0;gap:0;padding:2px 0}}
.ed-stage{position:relative}
.pl-ov{position:absolute;inset:0;pointer-events:none;overflow:hidden;contain:layout style paint}   /* 第 210 版：磁頭、亮音自成一個繪製範圍，它們動的時候不連帶重算譜面 */
.pl-head{position:absolute;left:0;top:0;width:2px;margin-left:-1px;border-radius:1px;background:var(--e2-blue,#3b6fd8);opacity:.45;will-change:transform;backface-visibility:hidden}
.pl-head.live{opacity:.85;box-shadow:0 0 0 2px color-mix(in srgb,var(--e2-blue,#3b6fd8) 18%,transparent)}
.pl-band{position:absolute;background:color-mix(in srgb,var(--e2-blue,#3b6fd8) 7%,transparent);border-top:2px solid color-mix(in srgb,var(--e2-blue,#3b6fd8) 25%,transparent)}
.pl-lits{position:absolute;left:0;top:0;pointer-events:none}   /* V1：正在響的音（不做淡入淡出，減少動態也一樣） */
.pl-band.on{background:color-mix(in srgb,var(--e2-blue,#3b6fd8) 13%,transparent);border-top-color:color-mix(in srgb,var(--e2-blue,#3b6fd8) 55%,transparent)}

.pl-step{display:inline-flex;align-items:center;gap:2px}
.pl-step .sm-btn{min-width:2.75rem;min-height:2.75rem}
.pl-val{min-width:3.4em;text-align:center;font-variant-numeric:tabular-nums}
.pl-stair{display:grid;gap:2px;padding:0 0 var(--s2)}
.pl-srow{display:flex;align-items:center;justify-content:space-between;gap:var(--s2)}
.pl-info{padding:2px 0}
.pl-cap{margin:var(--s2) 0 var(--s1)}
.pl-cells{display:grid;grid-template-columns:repeat(var(--n,16),minmax(0,1fr));gap:2px;align-items:center}
.pl-cell{min-height:2.75rem;min-width:0;border:0;background:transparent;border-radius:var(--r-ctl);position:relative;cursor:pointer;color:var(--ink-1)}
.pl-cell::after{content:'';position:absolute;left:50%;top:50%;width:4px;height:4px;margin:-2px 0 0 -2px;border-radius:50%;background:currentColor;opacity:.4}
.pl-cell[data-v="n"]::after{width:12px;height:12px;margin:-6px 0 0 -6px;background:transparent;border:1.6px solid currentColor;opacity:.85;box-sizing:border-box}
.pl-cell[data-v="a"]::after{width:12px;height:12px;margin:-6px 0 0 -6px;opacity:1}
.pl-cell:active{background:var(--press)}
.pl-reset{grid-column:1/-1;justify-self:end;margin-top:var(--s1)}
@media (min-width:900px){.ed.editing:not(.ed-bot){grid-template-rows:auto auto minmax(0,1fr) auto}
.ed.editing:not(.ed-bot) .pl-bar{grid-column:1;grid-row:4;margin:0 var(--s2) var(--s2)}
.ed.editing:not(.ed-bot) .ed-kb{grid-row:3/5}
}

.pl-stair,.pl-met{padding-left:var(--pad-modal);padding-right:var(--pad-modal)}
.pl-met{padding-bottom:var(--s2);border-top:1px solid var(--line)}
@media (max-width:480px){.pl-stair,.pl-met{padding-left:var(--s3);padding-right:var(--s3)}.pl-panel .sm-row{padding-left:var(--s3);padding-right:var(--s3)}}
/* 320 寬放不下 8 顆 44px：播放列可以左右滑（不縮小按鈕） */
.pl-bar{justify-content:safe center;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
.pl-bar::-webkit-scrollbar{display:none}
.pl-b{flex:1 0 2.75rem;max-width:4.5rem}
/* 3D（使用者 11-14）：寬螢幕鍵盤在右側，和弦、記號、歌詞頁不必跟音位頁一樣高——照內容長高，最多到視窗底，超過才在頁裡捲 */
@media (min-width:900px){.ed.editing:not(.ed-bot) .ed-kb{max-height:calc(100% - var(--s2));min-height:0;box-sizing:border-box}
.ed.editing:not(.ed-bot) .ed-kb-mid{display:flex;flex-direction:column;flex:0 1 auto;min-height:0}
.ed.editing:not(.ed-bot) .ed-kb-mid>[data-pg]{flex:none}
.ed.editing:not(.ed-bot) .ed-kb-mid>.ed-pg{position:static;inset:auto;flex:0 1 auto;min-height:0}
.ed.editing:not(.ed-bot) .ed-kb:not([data-tab="keys"]) .ed-kb-mid>[data-pg="keys"],.ed.editing:not(.ed-bot) .ed-kb:not([data-tab="sel"]) .ed-kb-mid>[data-pg="sel"],.ed.editing:not(.ed-bot) .ed-kb:not([data-tab="chord"]) .ed-kb-mid>[data-pg="chord"],.ed.editing:not(.ed-bot) .ed-kb:not([data-tab="bar"]) .ed-kb-mid>[data-pg="bar"],.ed.editing:not(.ed-bot) .ed-kb:not([data-tab="view"]) .ed-kb-mid>[data-pg="view"],.ed.editing:not(.ed-bot) .ed-kb:not([data-tab="lyric"]) .ed-kb-mid>[data-pg="lyric"]{display:none}
}


/* ================= UI 統一（2026-11-14 使用者說「全部一起改」）=================
   按鈕只留三種長相：
   動作鈕＝圖示＋字、平常沒底色、按下灰底縮一點（下排、播放列、編輯頁、歌詞頁、復原重做）；
   輸入鍵＝白色方塊（音位鍵、拍擊音、效果鍵、和弦卡），不加陰影或彩色底邊；
   選項鈕＝膠囊形、選中深色底（分頁、記號頁、拍號選項；sm-seg 在 ui.css）。
   字只留 11／13／16／17（22 是大標題）；圓角只留 12（按鈕）／24（面板）／膠囊。 */
/* 動作鈕：右手、左手拿掉底下的彩色弧線，只保留手形圖示的顏色 */
.ed-kb-acts .ed-hand{box-shadow:none}
/* 歌詞頁的按鈕是動作鈕：上圖示下字、可以換行（不截斷） */
[data-pg="lyric"] .ed-mk,.ed-pg-lyric .ed-mk{flex-direction:column;gap:1px;min-height:2.75rem;padding:var(--s1) 2px;font-size:.6875rem;line-height:1.15;border-radius:var(--r-ctl);background:transparent;box-shadow:none;color:var(--ink)}
[data-pg="lyric"] .ed-mk .lbl,.ed-pg-lyric .ed-mk .lbl{white-space:normal;overflow:visible;text-align:center}
/* 輸入鍵：和弦卡不要陰影與彩色底邊（「這一拍的音全部符合」改只用名稱前的小圓點） */
.ed-ch,.ed-ch.fit{box-shadow:none}
/* 選項鈕：記號頁的按鈕、拍號選項＝膠囊；選中（已經有的記號）＝深色底 */
.ed-pg-mark .ed-mk,.ed-ts-o{border-radius:var(--r-pill);background:var(--press);box-shadow:none}
.ed-pg-mark .ed-mk[aria-pressed="true"],.ed-ts-o[aria-pressed=true]{background:var(--ink);color:var(--page);box-shadow:none;font-weight:500}
.ed-pg-mark .ed-mk[aria-pressed="true"] .ic{color:var(--page)}
/* 瀏覽／編輯：一個兩段式切換，放在工具列中間 */
.ed-mode{flex:none;padding:.1875rem;gap:.125rem;align-self:center}
.ed-mode .sm-btn{flex-direction:column;gap:.125rem;min-width:3.25rem;min-height:2.75rem;padding:.25rem .625rem;font-size:.6875rem;line-height:1.1}
.ed-mode .sm-btn .ic{width:1.375rem;height:1.375rem}
/* 外框：播放列和上方工具列一樣浮起來（手機不再是滿版長條），圓角 24 */
@media (max-width:420px){.pl-bar{margin-left:var(--s2);margin-right:var(--s2);border-radius:var(--r-panel);padding:2px}}
@media (max-width:370px){.pl-bar{margin-left:4px;margin-right:4px}}
.ed:not(.editing) .pl-bar{margin-bottom:calc(var(--s2) + env(safe-area-inset-bottom,0px))}   /* 瀏覽：播放列浮在最下面，避開 iPhone 底部橫條 */
/* P3（11-14）：播放磁頭、循環範圍畫在譜面後面，數字蓋在上面 */
.ed-stage{isolation:isolate}
.pl-ov{z-index:-1}
/* E4（11-14）：長按回饋——淡藍底，外框等速長滿；放開或移動馬上淡掉 */
.ed-hold{position:fixed;z-index:45;pointer-events:none;border-radius:6px;background:color-mix(in srgb,var(--e2-blue) 14%,transparent);opacity:0;transition:opacity 120ms ease-out}
.ed-hold.on{opacity:1}.ed-hold.off{opacity:0}
.ed-hold svg{position:absolute;left:-2px;top:-2px;overflow:visible}
.ed-hold rect{fill:none;stroke:var(--e2-blue);stroke-width:2;stroke-dasharray:100;stroke-dashoffset:100}
.ed-hold.on rect{transition:stroke-dashoffset var(--hold-ms,350ms) linear;stroke-dashoffset:0}
@media (prefers-reduced-motion:reduce){.ed-hold.on rect{transition:none;stroke-dashoffset:0}}
:root.sm-reduce .ed-hold.on rect{transition:none;stroke-dashoffset:0}
/* E5＋舊版框選效果：拖動時跟著手指的藍色虛線框；即將選到的範圍先畫出來（不重畫整張譜） */
.ed-marq{position:fixed;z-index:44;pointer-events:none;border:1.5px dashed var(--e2-blue);border-radius:6px;background:color-mix(in srgb,var(--e2-blue) 8%,transparent)}
.ed-dragov{position:absolute;left:0;pointer-events:none}
.ed-dragov svg{display:block;max-width:none;overflow:visible}
/* E2：記號、和弦、歌詞頁還有內容時，上下邊緣淡出（不被下排按鈕硬切） */
.ed-pg.fade-b{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 2rem),transparent)}
.ed-pg.fade-t{-webkit-mask-image:linear-gradient(0deg,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(0deg,#000 calc(100% - 2rem),transparent)}
.ed-pg.fade-t.fade-b{-webkit-mask-image:linear-gradient(180deg,transparent,#000 2rem,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(180deg,transparent,#000 2rem,#000 calc(100% - 2rem),transparent)}
/* E1：手機編輯時收起播放列，標題列多一顆「播放／暫停」 */
.ed-hd [data-a="pp"]{display:none}
@media (max-width:899px){.ed.editing .ed-hd [data-a="pp"]{display:inline-flex}.ed.editing .pl-bar{display:none}}
/* W3（11-14）：電腦版編輯時播放列移到右欄、鍵盤下方，左邊整個高度都給譜面 */
@media (min-width:900px){.ed.editing:not(.ed-bot) .ed-view{grid-row:3/5}
.ed.editing:not(.ed-bot) .ed-kb{grid-row:3}
.ed.editing:not(.ed-bot) .pl-bar{grid-column:2;grid-row:4;margin:var(--s2) var(--s2) var(--s2) 0}
}


/* 第53版：格線鈕在工具列、標題列圓鈕 */

.ed-hd .sm-btn.raised{width:var(--hit);padding:0;flex-shrink:0}
.ed-key.lit{border-color:var(--e2-blue);outline:2px solid var(--e2-blue);outline-offset:-3px;background:color-mix(in srgb,var(--e2-blue) 14%,var(--surface))}
/* 第53版：編輯時工具列多了格線鈕，手機寬度收緊按鈕內距，讓縮小／放大不被擠出去 */


.pl-sc{display:inline-flex;flex-direction:column;align-items:center}
.pl-hint{line-height:1;margin-top:-2px}
.pl-speedbox{display:grid;gap:var(--s1);min-width:0}
.pl-speedbox.dim{opacity:.4;pointer-events:none}
.pl-caprow{display:flex;align-items:center;justify-content:space-between;gap:var(--s2)}
.pl-caprow .pl-cap{margin:var(--s2) 0 var(--s1);flex:1;min-width:0}
/* 鍵盤分頁：在左邊自己的範圍內平均分寬（2026-11-15）；復原、重做、時值維持右邊 */

/* v66 換琴演奏 */
.ed-pan{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--s2);margin:0;padding:0}
.editing .ed-pan{display:none}   /* 編輯時跟調式圖一樣收起來（進編輯時有一行提示） */

.ed-pan-tag{display:inline-flex;align-items:center;gap:.25rem;min-height:var(--hit);padding:0 .25rem 0 var(--s3);border-radius:var(--r-pill);font-size:.8125rem;color:var(--e2-blue,#3b6fd8);background:color-mix(in srgb,var(--e2-blue,#3b6fd8) 12%,transparent);border:1px solid color-mix(in srgb,var(--e2-blue,#3b6fd8) 40%,transparent)}
.ed-pan-tag .sm-btn{width:var(--hit);height:var(--hit);min-height:var(--hit);margin:-4px -2px -4px 0;padding:0;color:inherit}
.ed-pan-sheet{display:flex;flex-direction:column;gap:var(--s3);padding:0 var(--s4) var(--s4)}   /* 第 72 版：換琴面板左右留邊（使用者 21:13 截圖：內容貼到面板邊緣） */
.ed-pan-intro{margin:0}
.ed-pan-h{font-size:var(--fs-meta);color:var(--ink-2);margin:var(--s2) 0 0}
.ed-pan-shs{display:flex;flex-wrap:wrap;gap:var(--s1);margin-top:var(--s1)}
.ed-pan-sh.sm-btn{min-height:var(--hit);border-radius:var(--r-pill);border:1px solid var(--line-strong);padding:0 var(--s3);font-size:.8125rem}
.ed-pan-sh[aria-pressed="true"]{border-color:var(--star);color:var(--star)}
.ed-pan-list,.ed-pan-more{display:flex;flex-direction:column;gap:var(--s1)}
.ed-pan-card{display:flex;align-items:center;gap:var(--s3);width:100%;min-height:var(--hit);padding:var(--s2) var(--s3);border-radius:var(--r-ctl);border:1px solid var(--surface-edge);background:var(--surface);color:var(--ink);text-align:left;font:inherit;cursor:pointer}
.ed-pan-card[aria-pressed="true"]{border-color:var(--star);box-shadow:0 0 0 1px var(--star) inset}
.ed-pan-th{flex:0 0 3rem;width:3rem;height:3rem}.ed-pan-th svg{width:100%;height:100%}
.ed-pan-tx{min-width:0;flex:1}.ed-pan-nm{font-weight:500}.ed-pan-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ed-pan-card[data-ok="false"] .ed-pan-sub{color:var(--warn,#c77a12)}
.ed-miss{position:absolute;left:0;top:0;pointer-events:none}
.ed-miss-n{position:absolute;border-radius:5px;border:0;padding:0;margin:0;background:color-mix(in srgb,#e5484d 28%,transparent);box-shadow:0 0 0 1.5px #e5484d inset;pointer-events:auto;cursor:pointer}
div.ed-miss-n{pointer-events:none}
.ed-miss-n.drop{background:color-mix(in srgb,var(--ink-3,#888) 18%,transparent);box-shadow:0 0 0 1px var(--ink-3,#888) inset}

/* v68 選取範圍切換：編輯時浮在譜面底部中央，樣式同「瀏覽｜編輯」 */





/* v68 手機橫放（高度 < 500）：瀏覽＝標題列與工具列併成一列、調式圖與換琴收起、播放列在底部；編輯＝譜面在左、鍵盤在右（同電腦版），播放只留標題列那顆 */
@media (orientation:landscape) and (max-height:500px){
 .ed-scl-tg,.ed-scl>svg.hps{display:none!important}.ed-scl{margin:0 auto var(--s1)}.ed-scl:not(:has(.ed-pan-tag)){display:none!important}
 /* 第 70 版：橫放也要看得到「用某某琴打」的標籤（原本整排被收起來）；「換琴」鈕仍在「更多」選單裡，這排只留標籤 */
 .ed-pan{margin:0 auto var(--s1)}.ed-pan:not(:has(.ed-pan-tag)){display:none!important}.editing .ed-pan{display:none!important}
 .ed-pan-tag{min-height:2rem}.ed-pan-tag .sm-btn{width:2rem;height:2rem;min-height:2rem}
 .ed-hd{padding:var(--s2) var(--s3) 0;gap:var(--s2)}
 .ed-hd .ed-title{text-align:left;font-size:1rem}
 
 
 
 .ed-hd .ed-mode .sm-btn{min-height:2.5rem}
 .ed-view{margin-top:var(--s2)}
 .ed.editing{display:grid;grid-template-columns:minmax(0,1fr) min(22rem,46vw);grid-template-rows:auto minmax(0,1fr)}
 .ed.editing .ed-hd{grid-column:1/-1;grid-row:1}
 .ed.editing .ed-view{grid-column:1;grid-row:2;margin-bottom:var(--s2)}
 .ed.editing .ed-kb{grid-column:2;grid-row:2;align-self:stretch;margin:var(--s2) var(--s2) var(--s2) 0;overflow:auto;border-radius:var(--r-panel)}
 .ed.editing .ed-hd [data-a="pp"]{display:inline-flex}
 .ed.editing .pl-bar{display:none}
}
/* v69 譜面／顯示切換面板（沿用 .ed-scope 的浮動位置） */


   /* 第 72 版：換過琴後換琴鈕只留圖示，讓這一行放得下 */
.ed-scl>.ed-pan{display:contents}   /* 琴名、換琴圖示在同一行，放不下的升降標籤自己換到下一行 */
.ed-pan-tag .t{background:none;border:0;color:inherit;font:inherit;padding:0;min-height:var(--hit);cursor:pointer}


/* 第 73 版檢視（最壞資料） */

.ed-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
/* 第75版：右手／左手鈕亮出目前的手（跟音位鍵選中同一種藍框） */
.ed-kb-acts .ed-hand.lit{border-color:var(--e2-blue);outline:2px solid var(--e2-blue);outline-offset:-3px}

/* ---------- 第 86 版：聲部（規格卡 StarMap_規格卡_聲部.md） ---------- */
.ed-parts{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--s2);padding:var(--s2) var(--s3) 0}
.ed-parts[hidden]{display:none}
.ed-pts-sheet{display:flex;flex-direction:column;gap:var(--s3);padding:0 var(--s4) var(--s4)}
.ed-pts-intro{margin:0}
.ed-pt{display:flex;flex-direction:column;gap:var(--s3);padding:var(--s3);border:1px solid var(--line-strong);border-radius:var(--r-panel);background:var(--surface)}
.ed-pt-hd{display:flex;align-items:center;gap:var(--s2)}
.ed-pt-sel.sm-btn{flex:1 1 auto;min-width:0;justify-content:flex-start;border-radius:var(--r-pill)}
.ed-pt-sel[aria-pressed="true"]{color:var(--e2-blue)}
@media (min-width:900px){.ed.editing:not(.ed-bot){grid-template-rows:auto auto auto minmax(0,1fr)}
.ed.editing:not(.ed-bot) .ed-hd{grid-row:1}
.ed.editing:not(.ed-bot) .ed-parts{grid-column:1/-1;grid-row:2}

.ed.editing:not(.ed-bot) .ed-view,.ed.editing:not(.ed-bot) .ed-kb{grid-row:4}
}

@media (orientation:landscape) and (max-height:500px){.ed.editing{grid-template-rows:auto auto minmax(0,1fr)}.ed.editing .ed-parts{grid-column:1/-1;grid-row:2;padding-top:var(--s1)}.ed.editing .ed-view,.ed.editing .ed-kb{grid-row:3}}

/* 第 91 版：聲部鈕（取代聲部膠囊列）與聲部面板（每列：名稱｜顯示｜聲音｜設定） */
.ed-ptbtn.sm-btn{display:inline-flex;align-items:center;gap:.375rem;min-height:var(--hit);padding:0 var(--s3);border:1px solid var(--line-strong);border-radius:var(--r-pill);font-size:.8125rem;max-width:100%}
.ed-ptbtn .lbl{white-space:nowrap}
.ed-ptbtn .ed-ptbtn-sub{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:12rem}
.ed-parts:has(.ed-ptbtn){padding-top:var(--s1)}
.ed-pt.cur{border-color:var(--e2-blue)}
.ed-pt{gap:var(--s2);padding:var(--s2)}
.ed-pt-hd{gap:var(--s1);flex-wrap:wrap;justify-content:flex-end}
.ed-pt-sel.sm-btn{flex:1 1 7rem;min-height:var(--hit);text-align:left;padding:var(--s1) var(--s3)}
.ed-pt-sel .lbl{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere;white-space:normal;line-height:1.25}
.ed-pt-nm{font-size:.75rem}
.ed-pt-ic.sm-btn{flex:0 0 auto;flex-direction:column;gap:2px;min-width:3rem;min-height:var(--hit);padding:.25rem .25rem;font-size:.6875rem;border-radius:var(--r-ctl)}
.ed-pt-ic .ic{width:1.25rem;height:1.25rem}
.ed-pt-ic[data-a="pt-eye"][aria-pressed="false"],.ed-pt-ic[data-a="pt-snd"][aria-pressed="false"]{color:var(--ink-3)}
.ed-pt-ic[data-a="pt-more"][aria-pressed="true"]{background:var(--press);color:var(--e2-blue)}
.ed-pt-ic[aria-disabled="true"]{opacity:.55}
.ed-pt-det{display:flex;flex-direction:column;gap:var(--s3);padding:var(--s2) var(--s1) var(--s1)}
.ed-pt-det .sm-slider{min-width:0}.ed-pt-det .sm-slider input[type=range]{min-width:0}
.ed-pt-mv{display:flex;gap:var(--s2);flex-wrap:wrap}.ed-pt-mv .sm-btn{border:1px solid var(--line-strong);border-radius:var(--r-pill);padding:0 var(--s3)}
.ed-pts-act{display:flex;gap:var(--s2);flex-wrap:wrap}
.ed-pts-act .sm-btn{flex:1 1 9rem;justify-content:center;border:1px solid var(--line-strong);border-radius:var(--r-pill)}
@media (orientation:landscape) and (max-height:500px){.ed-scl:has(.ed-ptbtn){display:flex!important}}
/* 第 91 版：跳到段落（每列：段落名稱＋重播） */
.pl-secs{display:flex;flex-direction:column;gap:var(--s1);width:min(20rem,calc(100vw - 4rem));max-width:100%}
.pl-sec{display:flex;align-items:center;gap:var(--s2)}
.pl-sec-go.sm-btn{flex:1 1 auto;min-width:0;justify-content:flex-start;gap:var(--s2);min-height:var(--hit);padding:0 var(--s3);border-radius:var(--r-ctl)}
.pl-sec-go .lbl{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pl-sec-m{flex:0 0 auto;margin-left:auto}
.pl-sec-rp.sm-btn{flex:0 0 auto;min-height:var(--hit);padding:0 var(--s3);border:1px solid var(--line-strong);border-radius:var(--r-pill)}

/* 第 103 版：播放展開——再播一次的小節 */
.pl-dup{position:absolute;pointer-events:none;background:color-mix(in srgb,var(--e2-blue,#3b6fd8) 6%,transparent)}
.pl-dup.tag{background:none}
.pl-dup-t{position:absolute;left:3px;top:1px;font-size:.6875rem;line-height:1;color:color-mix(in srgb,var(--e2-blue,#3b6fd8) 70%,var(--fg,#333))}
/* 第 108 版：電腦版編輯時播放列跑到鍵盤底下（第 91 版加了聲部列，列號往下推一格，播放列和鍵盤擠在同一格）。
   版面：1 標題｜2 聲部｜3 工具列｜4 譜面（左，跨到底）＋鍵盤（右）｜5 播放列（右，鍵盤下方） */
@media (min-width:900px){.ed.editing:not(.ed-bot){grid-template-rows:auto auto auto minmax(0,1fr) auto}
.ed.editing:not(.ed-bot) .ed-view{grid-row:4/6}
.ed.editing:not(.ed-bot) .ed-kb{grid-row:4;align-self:start}
.ed.editing:not(.ed-bot) .pl-bar{grid-column:2;grid-row:5;margin:var(--s2) var(--s2) var(--s2) 0;align-self:end}
}

/* 第 108 版：鍵盤的底音一列（列首「底音」，底音鍵深一點的底色） */

/* 第 109 版：鍵盤多了一列底音，字很大（200%）的手機上，按鍵區可以捲，下面的往左／右手／效果那一列一定看得到 */
@media (max-width:899px) and (min-height:501px){.ed.editing .ed-kb{max-height:calc(100dvh - 8rem)}.ed.editing .ed-kb-mid{min-height:0;overflow-y:auto;overscroll-behavior:contain}}

/* ===== 第 111 版：鍵盤與手碟圖統一版面（手碟圖放在鍵盤的「音位」那一塊，同一個外框） ===== */
.ed-pad-wrap{display:none;position:relative}
.ed.padin .ed-pad-wrap{display:block}
.ed.padin .ed-kb-keys{display:none}
.pd-name{position:absolute;top:2px;left:4px;right:4px;font-size:var(--fs-meta);color:var(--ink-2);text-align:center;line-height:1.1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.pd-fig{padding-top:14px;min-width:0;display:flex;align-items:center;justify-content:center;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.pd-fig svg.hp{width:100%;height:auto;max-height:clamp(140px,calc(100dvh - 37rem),50dvh);display:block;touch-action:none}
.pd-fig .hp-n{cursor:pointer}   /* 第 198 版：亮起來的樣子（lit 游標的音、pl 播放中、tap 點一下）改用 css/library.css 共用的霧面發光環 */
.ed-es svg{width:1.2rem;height:1.2rem}
@media (orientation:landscape) and (max-height:500px){.ed.editing .ed-pad-wrap .pd-fig svg.hp{max-height:34dvh}}


/* ===== 第 114 版：兩顆球（▶ 播放、✎ 編輯）＋照內容大小的面板 ===== */
.ed-hd .ed-title{min-width:0;flex:1 1 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-kb-mid>.pg-off{display:none!important}
.ed-kb:not([data-tab="keys"]) .ed-pad-wrap{display:none!important}
.ed-kb-sub{display:flex;align-items:center;gap:var(--s1);min-height:2.75rem}
.ed-kb-sub .ed-kb-where{flex:1 1 0;min-width:0;text-align:left;padding-left:var(--s2)}
.ed-kb-x{flex:none;width:2.75rem;height:2.75rem;min-width:2.75rem;padding:0;border-radius:50%}
.ed-kb:not([data-tab="keys"]) .ed-kb-gridb{display:none}
.ed-kb:not([data-tab="keys"]) .ed-kb-acts:not(.ed-kb-low){display:none}
.ed-kb[data-tab="lyric"] .ed-kb-low{display:none}
.ed-kb-gp[hidden]{display:none}
.ed-fab{position:absolute;right:12px;bottom:16px;z-index:30;width:3.25rem;height:3.25rem;min-width:3.25rem;padding:0;border-radius:50%;display:grid;place-items:center;box-shadow:0 4px 16px rgba(0,0,0,.28)}
.ed-fab svg{width:1.6rem;height:1.6rem}
/* 小球選單（v116）：一排玻璃按鈕，樣式見檔尾 */
.ed-dial{position:absolute;z-index:31;display:flex;flex-direction:row;justify-content:flex-end;align-items:flex-end;gap:6px;width:19.5rem}
.ed-dial[hidden]{display:none}
.ed[data-fab="left"] .ed-dial{justify-content:flex-start}
.ed-dial:not([hidden]) .ed-dial-b{animation:edDial .18s ease-out both}
@keyframes edDial{from{opacity:0;transform:translateY(10px) scale(.9)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.ed-dial:not([hidden]) .ed-dial-b{animation:none}}
/* 播放列、檢視工具列：浮在球旁邊的一條 */
#edit .pl-bar{position:absolute!important;grid-area:auto!important;z-index:29;margin:0!important;height:3.25rem;box-sizing:border-box;align-items:center;border-radius:999px!important;padding:0 6px!important;box-shadow:0 4px 16px rgba(0,0,0,.25)}
.ed:not(.plopen) .pl-bar{display:none!important}
.ed.plopen .pl-bar{display:flex!important}
.ed-kb-mid>.ed-pg{position:static!important;inset:auto!important;max-height:min(30dvh,13rem);visibility:visible}
@media (orientation:landscape) and (max-height:500px){.ed-kb-mid>.ed-pg{max-height:none}}
/* ===== 第 115 版：檢視球在左下、鍵盤｜手碟圖兩段切換、第一次的小字、空白譜提示 ===== */
.ed-modeseg{flex:none;display:flex}
.ed-modeseg .sm-btn{min-height:2.75rem;font-size:var(--fs-meta);padding:0 10px;gap:4px}
.ed-modeseg .sm-btn svg{width:1.15rem;height:1.15rem}
@media (max-width:360px){.ed-modeseg .sm-btn{padding:0 6px}.ed-modeseg .sm-btn .lbl{font-size:.75rem}}
@keyframes edTip{from{opacity:0}to{opacity:.92}}
.ed-kb-hu{flex:none;width:2.75rem;height:2.75rem;min-width:2.75rem;padding:0}
.ed-kb:not([data-tab="lyric"]) .ed-kb-hu{display:none}

/* ===== 第 116 版：全部按鈕同一種「玻璃按鈕」（圖示在上、字在下）=====
   小球選單、檢視條、各編輯面板的動作鈕、記號頁、歌詞頁、格子／時值都用這一種；
   音位鍵、效果鍵、和弦卡本來就是同樣的白色方塊（邊框、底色、圓角相同）。球（👁 ✎ ▶ ✕）只當開關。 */
.ed .ed-dial-b,.ed .ed-kb-acts .ed-act,.ed .ed-mk,.ed .ed-kb-gridb,.ed .ed-kb-hu,.ed .ed-ly-row .sm-btn,.ed .pl-bar .pl-b{
 appearance:none;font:inherit;font-size:.6875rem;font-weight:400;line-height:1.15;text-align:center;
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
 min-width:0;min-height:2.75rem;padding:var(--s1) 2px;margin:0;
 border-radius:var(--r-ctl);border:1px solid var(--surface-edge);background:var(--surface);color:var(--ink);box-shadow:none;
 -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
 cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.ed .ed-dial-b svg,.ed .ed-kb-acts .ed-act svg,.ed .ed-mk svg,.ed .ed-kb-gridb svg,.ed .ed-kb-hu svg,.ed .ed-ly-row .sm-btn svg,.ed .pl-bar .pl-b svg{width:1.25rem;height:1.25rem}
.ed .ed-dial-b:active,.ed .ed-kb-acts .ed-act:active,.ed .ed-mk:active,.ed .ed-kb-gridb:active,.ed .ed-kb-hu:active,.ed .ed-ly-row .sm-btn:active,.ed .pl-bar .pl-b:active{transform:scale(.95);background:var(--press)}
.ed .ed-dial-b[aria-pressed="true"],.ed .ed-kb-acts .ed-act[aria-pressed="true"],.ed .ed-mk[aria-pressed="true"],.ed .ed-kb-gridb[aria-pressed="true"],.ed .pl-bar .pl-b[aria-pressed="true"]{background:var(--press);border-color:var(--e2-blue);color:var(--e2-blue);font-weight:400;box-shadow:none}
.ed .ed-pg-mark .ed-mk[aria-pressed="true"] .ic{color:inherit}
.ed .ed-dial-b:disabled,.ed .ed-kb-acts .ed-act:disabled,.ed .ed-mk:disabled,.ed .ed-kb-gridb:disabled,.ed .ed-kb-hu:disabled,.ed .ed-ly-row .sm-btn:disabled,.ed .pl-bar .pl-b:disabled{opacity:.35}
.ed .ed-dial-b .lbl{padding:0;border:0;background:none;box-shadow:none;border-radius:0;font-size:.6875rem;white-space:nowrap}
.ed .ed-kb-hu,.ed .ed-ly-row .sm-btn{width:2.75rem;min-width:2.75rem;padding:0}
.ed .ed-kb-gridb{min-width:2.75rem;padding:var(--s1) 6px}
/* 小球選單：一排五顆，浮在 ✎ 球上方 */
.ed .ed-dial-b{flex:1 1 3rem;max-width:3.75rem;min-height:3.25rem;gap:3px;box-shadow:0 3px 12px rgba(0,0,0,.18)}
.ed .ed-dial-b .ed-dial-ic{display:grid;place-items:center;width:auto;height:auto;border-radius:0;background:none;box-shadow:none;outline:0}
/* 檢視條：一排玻璃按鈕（不再有外面那個膠囊） */
/* 面板裡的按鈕排：格子之間留 4px */
.ed .ed-kb-acts{gap:4px}
@media (max-width:480px){.ed .ed-kb-acts{gap:4px}}

/* ===== 第 117 版：譜面至少一半、手碟圖滿版、按鈕收成一排＋更多、三顆球編輯中停靠在面板頂列 ===== */
.ed.editing .ed-kb{position:relative}
.ed-kb-hid{display:none!important}
/* 頂列：👁 ▶｜字｜✎ ✕ */
.ed-kb-dock{display:flex;align-items:center;gap:4px;flex:none}
.ed-kb-dock .ed-fab{position:static;flex:none;width:2.75rem;height:2.75rem;min-width:2.75rem;min-height:2.75rem;padding:0;border-radius:50%;display:grid;place-items:center;box-shadow:none}
.ed-kb-dock .ed-fab svg{width:1.35rem;height:1.35rem}
.ed[data-fab="dock"] .ed-dial{justify-content:flex-end}
/* 按鈕排：一個容器。輸入面板常駐 7 顆，.mo 是「更多」展開才出現的第二排；其他面板只留 往左 往右 復原 重做 */
.ed .ed-kb-acts.ed-kb-low{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px}
.ed .ed-kb[data-tab="keys"] .ed-kb-low{grid-auto-flow:row;grid-template-columns:repeat(7,minmax(0,1fr))}
.ed .ed-kb[data-tab="keys"]:not(.more) .ed-kb-low .mo{display:none}
.ed .ed-kb:not([data-tab="keys"]) .ed-kb-low .kx,.ed .ed-kb:not([data-tab="keys"]) .ed-kb-low .mo:not(.rd){display:none}
.ed .ed-kb-low .ed-act[hidden]{display:none}
.ed .ed-kb-low .ed-act.ed-kb-gridb{min-width:0;padding:var(--s1) 2px}
.ed .ed-kb-low .ed-hand.hR svg{color:var(--cR)}.ed .ed-kb-low .ed-hand.hL svg{color:var(--cL);transform:scaleX(-1)}
@media (max-width:350px){   /* 320 寬：7 顆不到 44px，效果退到「更多」那排 */
 .ed .ed-kb[data-tab="keys"] .ed-kb-low{grid-template-columns:repeat(6,minmax(0,1fr))}
 .ed .ed-kb[data-tab="keys"]:not(.more) .ed-kb-low .nw{display:none}
 .ed .ed-kb[data-tab="keys"] .ed-kb-low .nw{order:1}.ed .ed-kb[data-tab="keys"] .ed-kb-low .mo{order:2}
}
/* 直放：譜面至少佔畫面一半；面板拿剩下的，手碟圖把面板撐滿 */
@media (max-width:899px) and (min-height:501px){
 .ed.editing .ed-view{flex:1 0 min(50%,calc(100% - 18rem));min-height:0}   /* 第 132 版：大字級（rem 變大）時讓出空間給鍵盤；一般字級 18rem＝288px，仍是 50% */
 .ed.editing .ed-kb{flex:0 1 auto;min-height:0;max-height:none}
 .ed.editing.padin .ed-kb[data-tab="keys"]{flex:0 1 100%}
}
/* 手碟圖模式：圖撐滿面板，頂列疊在圖的上緣兩個角（不佔高度） */
.ed.padin .ed-kb[data-tab="keys"] .ed-kb-mid{flex:1 1 0;min-height:0;display:flex;overflow:hidden}
.ed.padin .ed-kb[data-tab="keys"] .ed-pad-wrap{flex:1 1 0;min-height:0;min-width:0;display:flex}
.ed.padin .ed-kb[data-tab="keys"] .pd-fig{flex:1 1 0;min-height:0;padding:0;position:relative;margin:0 3rem}
.ed.padin .ed-kb[data-tab="keys"] .pd-fig svg.hp{position:absolute;inset:0;width:100%;height:100%;max-height:none}
.ed.padin .ed-kb[data-tab="keys"] .pd-name{display:none}
.ed.padin .ed-kb[data-tab="keys"]:not(.subflow):not(:has(.ed-fxbar)) .ed-kb-sub{position:absolute;left:var(--s2);right:var(--s2);z-index:2;pointer-events:none}
.ed.padin .ed-kb[data-tab="keys"]:not(.subflow):not(:has(.ed-fxbar)) .ed-kb-sub>*{pointer-events:auto}
.ed.padin .ed-kb[data-tab="keys"]:not(.subflow):not(:has(.ed-fxbar)) .ed-kb-sub>.ed-kb-where{pointer-events:none}
@media (max-width:480px){.ed.padin .ed-kb[data-tab="keys"]:not(.subflow):not(:has(.ed-fxbar)) .ed-kb-sub{left:4px;right:4px}}
/* 橫放：譜面左半、面板右半 */
@media (orientation:landscape) and (max-height:500px){
 .ed.editing{grid-template-columns:minmax(0,1fr) calc(50% - 1rem)}
 .ed.editing .ed-kb{overflow:hidden}
 .ed.editing .ed-kb-mid{min-height:0;overflow-y:auto}
}
/* 電腦版：手碟圖模式時面板寬度跟鍵盤一樣（26rem，第 294 版不再放大到右半），圖撐滿高度 */
@media (min-width:900px){.ed.editing.padin:not(.ed-bot) .ed-kb[data-tab="keys"]{align-self:stretch}
}

.ed .ed-kb[data-tab="lyric"] .ed-kb-acts.ed-kb-low{display:none}

/* ===== 第 118 版：音區圓形（scales.js）、切換鈕回頂列、復原重做搬到頂列（手碟圖模式在圖右邊直排）、彈出的那排浮在面板上方且一次只開一個、播放列同樣式 ===== */
.ed-kb-sub{position:relative}
.ed .ed-kb .ed-kb-sub .ed-kb-hu{display:flex}
.ed .ed-kb-sub .ed-es{padding:0;gap:1px}.ed .ed-kb-sub .ed-es .lbl{font-size:.625rem;white-space:nowrap;letter-spacing:0}   /* 第 247 版：四個字「編輯設定」要擠進 44px */
.ed .ed-kb-sub .ed-es svg{width:1.15rem;height:1.15rem}
@media (max-width:350px){.ed-kb-sub{gap:0}.ed-kb-sub .ed-kb-dock{gap:0}.ed-kb-sub .ed-kb-where{display:none}.ed-kb-sub{justify-content:space-between}}
/* 手碟圖模式：✎ 掛在 👁 下面、復原重做掛在 ✕ 下面（圖兩邊各留 3rem） */
.ed.padin .ed-kb[data-tab="keys"] .ed-kb-dockE,.ed.padin .ed-kb[data-tab="keys"] .ed-kb-ur{position:absolute;top:3rem;flex-direction:column;pointer-events:auto}
.ed.padin .ed-kb[data-tab="keys"] .ed-kb-dockE{left:0}
.ed.padin .ed-kb[data-tab="keys"] .ed-kb-ur{right:0}
/* 彈出的那排（✎ 選單、檢視條、播放列、效果列、時值列）：一排玻璃按鈕，沒有外框 */
#edit .pl-bar{background:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;height:auto;gap:3px;justify-content:flex-start}
.ed .pl-bar .pl-b{flex:1 0 2.75rem;max-width:4.5rem;min-height:3.25rem;box-shadow:0 3px 12px rgba(0,0,0,.18)}
.ed .pl-bar .pl-b .lbl{font-size:.6875rem;letter-spacing:0}
/* 直放：效果列／時值列浮在面板上緣外面（不擠手碟圖、不疊在面板裡） */
@media (max-width:899px) and (min-height:501px){
 .ed.editing .ed-kb>.ed-fxbar{position:absolute;left:0;right:0;bottom:calc(100% + 6px);margin:0;padding:0 var(--s2);border:0;z-index:29}
 .ed.editing .ed-kb>.ed-fxbar .ed-fxb{box-shadow:0 3px 12px rgba(0,0,0,.18)}
 .ed.padin .ed-kb[data-tab="keys"]:not(.subflow):has(.ed-fxbar) .ed-kb-sub{position:absolute;left:4px;right:4px;z-index:2;pointer-events:none}
 .ed.padin .ed-kb[data-tab="keys"]:not(.subflow):has(.ed-fxbar) .ed-kb-sub>*{pointer-events:auto}
 .ed.padin .ed-kb[data-tab="keys"]:not(.subflow):has(.ed-fxbar) .ed-kb-sub>.ed-kb-where{pointer-events:none}
}

/* ===== 第 119 版：手碟譜沒有「更多」（換列放常駐排最後），手碟圖模式譜面 36%、面板較高 ===== */
.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low [data-k=more],.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low [data-k=gridp]{display:none!important}
.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low .rw{display:flex!important;order:3}
.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low .nw{display:flex!important}
@media (max-width:350px){
 .ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(7,minmax(0,1fr));gap:1px}
 .ed.editing .ed-kb[data-tab="keys"]:not(.nv){padding-left:2px;padding-right:2px}
}
@media (max-width:899px) and (min-height:501px){
 .ed.editing.padin .ed-view{flex:1 0 min(36%,calc(100% - 18rem))}
}

/* ===== 第 130 版：照 Apple 設計規範檢視後的修正 ===== */
/* 減少動態：按下縮放、球選單、調音器指針都不做位移與縮放（只留顏色變化） */
@media (prefers-reduced-motion:reduce){
 .ed-key,.ed-ch,.ed-fxb{transition:none}
 .ed-key:active,.ed-fxb:active,.ed-ch:active,.ed .ed-dial-b:active,.ed .ed-kb-acts .ed-act:active,.ed .ed-mk:active,.trn-cand:active,.tun-hr-go:active,.sm-nav .sm-nav-tile:active{transform:none}
}

/* ===== 第 130 版（最壞資料檢視）：大字級下頂列放不下就換行，不再把切換鈕與編輯球推出畫面 ===== */
.ed-kb-sub{flex-wrap:wrap}
/* 頂列的圖示鈕固定 44px（觸控目標不隨字級放大，圖示 22px）：200% 字級時每顆不再變成 88px，兩行就放得下 */
.ed .ed-kb-sub .sm-btn.icon-only,.ed .ed-kb-sub .ed-fab,.ed .ed-kb-sub .ed-kb-x{width:44px;height:44px;min-width:44px;min-height:44px}
.ed .ed-kb-sub .sm-btn.icon-only svg,.ed .ed-kb-sub .ed-fab svg{width:22px;height:22px}
.ed .ed-kb-sub .ed-es{height:44px;min-height:44px;padding-top:2px;padding-bottom:2px;gap:0}
.ed .ed-kb-sub .ed-es .lbl{line-height:1.05;overflow:visible}
.ed .ed-kb-sub .ed-es svg{width:20px;height:20px}
/* 動作列（往左、往右、疊加…）：大字級時高度不跟著長到 88px，留空間給上面的鍵盤（字照樣放大） */
.ed .ed-kb-low .ed-act{height:min(2.75rem,56px);min-height:min(2.75rem,56px);padding-top:2px;padding-bottom:2px;gap:0}
.ed .ed-kb-low .ed-act .lbl{line-height:1.05;overflow:visible}
.ed .ed-kb-low .ed-act svg{width:20px;height:20px}

/* ===== 第 133 版：✎ 扇形選單、瀏覽中 ▶ 在左下 👁 在上面、調式膠囊在標題列、編輯中標題列沒有 ▶、浮動那排不透明且全部看得到 ===== */
.ed.editing .ed-hd [data-a="pp"],.ed .ed-hd [data-a="pp"]{display:none!important}
/* 調式膠囊在標題列裡：不換行、收不下就截斷；展開的調式圖浮在下面 */
.ed-hd .ed-scl{flex:0 1 auto;min-width:0;max-width:46%;margin:0!important;position:relative;display:flex;align-items:center}
.ed-hd .ed-scl .ed-scl-tg{max-width:100%;overflow:hidden}
.ed-hd .ed-scl .ed-scl-tg .n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ed-hd .ed-scl>svg.hps{position:absolute;top:calc(100% + 6px);right:0;z-index:40;width:min(15rem,80vw);height:auto;background:var(--glass-strong);border-radius:var(--r-panel);box-shadow:var(--shadow-card);padding:6px}
.ed-hd .ed-scl:not(.open)>svg.hps{display:none}
.ed-hd .ed-scl>.ed-pan-tag,.ed-hd .ed-scl .ed-pan-tag{flex:none}
/* 扇形選單 */
.ed .ed-dial{position:absolute!important;inset:0!important;width:auto!important;max-width:none!important;height:auto!important;display:block!important;pointer-events:none;z-index:31;background:none;padding:0;margin:0;gap:0}
.ed .ed-dial[hidden]{display:none!important}
.ed .ed-dial .ed-dial-b{position:absolute;width:3.5rem;height:3.5rem;min-width:0;max-width:none;min-height:0;margin:-1.75rem 0 0 -1.75rem;padding:0;border-radius:50%;flex:none;gap:1px;pointer-events:auto;
 background:var(--glass-strong);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:0 4px 14px rgba(0,0,0,.3);
 transform:translate(var(--fx,0),var(--fy,0)) scale(.4);opacity:0;transition:transform .26s cubic-bezier(.2,.9,.3,1.2),opacity .18s ease}
.ed .ed-dial:not([hidden]) .ed-dial-b{animation:none}   /* 舊的「往上淡入」動畫會蓋掉飛出去的效果 */
.ed .ed-dial.on .ed-dial-b{transform:none;opacity:1}
.ed .ed-dial.on .ed-dial-b:active{transform:scale(.92)}
.ed .ed-dial .ed-dial-b:nth-child(2){transition-delay:.02s}.ed .ed-dial .ed-dial-b:nth-child(3){transition-delay:.04s}.ed .ed-dial .ed-dial-b:nth-child(4){transition-delay:.06s}.ed .ed-dial .ed-dial-b:nth-child(5){transition-delay:.08s}
.ed .ed-dial .ed-dial-b .lbl{font-size:.6875rem;line-height:1.1}
.ed .ed-dial .ed-dial-b .ed-dial-ic svg{width:1.25rem;height:1.25rem}
@media (prefers-reduced-motion:reduce){.ed .ed-dial .ed-dial-b{transition:none}}
/* 浮在譜面上的那幾排（檢視條、播放列、效果列、時值列）：按鈕不透明，才看得出是一排按鈕 */
.ed .pl-bar .pl-b,.ed.editing .ed-kb>.ed-fxbar .ed-fxb{background:var(--glass-strong)!important;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
/* 播放列：全部按鈕都看得到（放不下就換到第二排，不要藏在右邊要滑才看得到） */
#edit .pl-bar{flex-wrap:wrap!important;overflow:visible!important;row-gap:4px}
.ed .pl-bar .pl-b{flex:1 1 2.75rem!important;min-width:2.75rem!important;max-width:4.5rem}
/* 編輯中 ✎ 在頂列（手碟圖模式也是），不再掛在 👁 下面 */
.ed.padin .ed-kb[data-tab="keys"] .ed-kb-dockE{position:static;flex-direction:row;top:auto;left:auto}

/* ===== 第 135 版（清楚度）：頂列的 ✎ 永遠是鉛筆＋「編輯」字，跟旁邊的「手碟圖」切換鈕分開 ===== */
.ed-efab .lbl{display:none}
.ed .ed-kb-sub .ed-efab .lbl{display:block;font-size:.6875rem;line-height:1.05;white-space:nowrap;letter-spacing:0;overflow:visible;padding:0;border:0;background:none;box-shadow:none}
.ed .ed-kb-sub .ed-efab:has(.lbl){flex-direction:column;gap:0;padding-top:2px;padding-bottom:2px;border-radius:var(--r-ctl)}
.ed .ed-kb-sub .ed-efab:has(.lbl) svg{width:20px;height:20px}

/* ===== 第 137 版：▶ 球直接播放、速度膠囊、捲動時球淡出、譜面底部留白 ===== */
.ed .pl-bar .pl-b[data-p="play"]{display:none}
.ed:not(.editing) .ed-view::after{content:"";display:block;height:4.5rem}

/* ===== 第 139 版：固定底列、曲名下小字、自動存檔 ===== */
.ed{padding-bottom:var(--bar-h,3.75rem)}
.ed-bar{position:absolute;left:0;right:0;bottom:0;z-index:28;display:flex;justify-content:center;align-items:stretch;gap:6px;padding:4px var(--s2) calc(4px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--surface-edge);border-radius:0;box-sizing:border-box}
.ed-bar .ed-bb{flex:1 1 0;max-width:8rem;min-width:0;min-height:min(3rem,42px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:2px 4px;border-radius:var(--r-ctl)}
.ed-bar .ed-bb svg{width:min(1.35rem,22px);height:min(1.35rem,22px);flex:none}
.ed-bar .ed-bb .lbl{display:block;font-size:clamp(11px,.6875rem,15px);line-height:1.1;white-space:nowrap;max-width:100%;letter-spacing:0;padding:0;border:0;background:none}
.ed-bar .ed-bb[aria-expanded="true"]{background:var(--press)}
.ed-bar .ed-ebtn.on{background:var(--ink);color:var(--page);font-weight:500}
.ed-bar .ed-spdc.stair .ed-spdv::after{content:" ↗"}
@media (max-width:359px){.ed-bar .ed-bb{padding-left:0;padding-right:0}}   /* 第 244 版：320 寬編輯中六顆，四個字的鈕名要放得下 */
.ed-bar .ed-spdv{display:block;height:min(1.35rem,22px);line-height:min(1.35rem,22px);font-size:clamp(12px,.8125rem,16px);font-weight:500;white-space:nowrap;flex:none}   /* 第 244 版：播放設定鈕，圖示位置寫目前速度 */
.ed:not(.editing)>.ed-efab{display:none}   /* ✎ 模式鈕只在編輯中（面板頂列）；看譜時點底列「編輯」 */
.ed-ttl{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:0}
.ed-ttl .ed-title{flex:none;max-width:100%;width:100%}
.ed-sub{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:0;min-width:0;max-width:100%;font-size:min(.75rem,13px);line-height:1.2;color:var(--ink-2)}
.ed .ed-sub .ed-scl{display:inline-flex;min-width:0;max-width:100%;padding:0;margin:0!important}
.ed .ed-sub .ed-scl:not(:has(.ed-scl-tg)){display:none}
.ed-sub .ed-scl-tg{min-height:0;padding:0 2px;border:0;background:none;font-size:min(.75rem,13px);color:var(--ink-2);text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:2px}
.ed-sub .ed-scl>svg.hps{right:auto;left:50%;transform:translateX(-50%)}
@media (max-width:899px) and (min-height:501px){.ed.editing .ed-view{min-height:80px}.ed.editing .ed-kb{overflow:visible;min-height:0}}   /* 第 146 版：不能 overflow:auto——會把浮在面板上緣外面的效果列、檢視條剪掉（手機點「效果」沒東西出現）。面板內容超過時由 .ed-kb-mid 自己捲 */   /* 大字級、矮螢幕：譜面至少留 80px，面板自己捲 */

/* ===== 第 140 版：調式名長按開調式圖視窗 ===== */


.ed-sub .ed-scl-tg{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
/* ===== 第 141 版：底列在面板下面了，面板自己不用再留 iPhone 底部橫條的空間（底列已經留了）；以前這裡多出約 34px 空白 ===== */
.ed-kb{padding-bottom:var(--s2)!important}
/* ===== 第 143 版：按鈕彈跳（規格書 5.2）：按下縮到 0.92、放開彈到約 1.06 再回 1（約 0.3 秒）；系統或 app 開「減少動態」就不做 ===== */
.sm-btn,.ed-key,.ed-bb,.ed-fxb,.ed-ch{transition:transform .3s cubic-bezier(.34,1.8,.5,1),background-color .15s}
.sm-btn:active,.ed-key:active,.ed-bb:active,.ed-fxb:active,.ed-ch:active{transform:scale(.92);transition:transform .08s ease-out,background-color .15s}
@media (prefers-reduced-motion:reduce){.sm-btn,.ed-key,.ed-bb,.ed-fxb,.ed-ch,.sm-btn:active,.ed-key:active,.ed-bb:active,.ed-fxb:active,.ed-ch:active{transition:none;transform:none}}
:root.sm-reduce .sm-btn,:root.sm-reduce .ed-key,:root.sm-reduce .ed-bb,:root.sm-reduce .ed-fxb,:root.sm-reduce .ed-ch,:root.sm-reduce .sm-btn:active,:root.sm-reduce .ed-key:active,:root.sm-reduce .ed-bb:active,:root.sm-reduce .ed-fxb:active,:root.sm-reduce .ed-ch:active{transition:none;transform:none}

/* 第 149 版：換琴標籤（「升 4 個半音 ✕」）縮成跟調式小字同大小的藍色小字，不再是 44px 高的藍色膠囊（使用者 22:51：太佔空間）；點擊範圍用 ::after 外擴，仍 ≥44px */
.ed .ed-pan-tag{min-height:0;padding:0;gap:.125rem;border:0;border-radius:0;background:none;font-size:min(.75rem,13px);line-height:1.3;position:relative}
.ed .ed-pan-tag .t{position:relative;min-height:0;line-height:1.3;color:var(--e2-blue,#3b6fd8)}
.ed .ed-pan-tag .sm-btn{position:relative;width:1.125rem;height:1.125rem;min-height:0;margin:0;padding:0;color:var(--e2-blue,#3b6fd8)}
.ed .ed-pan-tag .sm-btn svg{width:.875rem;height:.875rem}
.ed .ed-pan-tag .t::after{content:"";position:absolute;inset:-.75rem -.25rem}
.ed .ed-pan-tag .sm-btn::after{content:"";position:absolute;inset:-.75rem -.5rem}

/* ===== 第 152 版：三段切換（輸入｜標記｜歌詞）＋選取把手＋選取動作列 ===== */
.ed .ed-efab,.ed .ed-dial,.ed .ed-kb-sub .ed-efab{display:none!important}   /* ✎ 扇形選單拿掉（程式還在，沒有入口） */
.ed .ed-kb-dockE{flex:1 1 auto;min-width:0;order:-1}
.ed .ed-kb-sub .ed-kb-where{display:none!important}   /* 「已選 N 個音」改由選取動作列呈現，頂列不放字 */
.ed .ed-m3{flex:1 1 auto;min-width:0;max-width:15rem;height:44px;display:flex}
.ed .ed-m3 .sm-btn{flex:1 1 0;min-width:0;min-height:44px;padding:0 .25rem;justify-content:center}
.ed .ed-m3 .sm-btn .lbl{display:block;font-size:.8125rem;white-space:nowrap}
.ed-stage .ed-selh{position:absolute;z-index:6;width:44px;height:44px;touch-action:none;cursor:grab;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;user-select:none}
.ed-stage .ed-selh.head{margin:-40px 0 0 -22px}
.ed-stage .ed-selh.tail{margin:-4px 0 0 -22px}
.ed-stage .ed-selh i{position:absolute;left:50%;width:18px;height:18px;margin-left:-9px;border-radius:50%;background:var(--e2-blue,#3a7bd5);border:2px solid #fff;box-sizing:border-box;box-shadow:0 1px 4px rgba(0,0,0,.35)}
.ed-stage .ed-selh.head i{top:3px}
.ed-stage .ed-selh.tail i{bottom:3px}
.ed-stage .ed-selh::after{content:"";position:absolute;left:50%;width:2px;margin-left:-1px;background:var(--e2-blue,#3a7bd5)}
.ed-stage .ed-selh.head::after{top:20px;bottom:0}
.ed-stage .ed-selh.tail::after{top:0;bottom:20px}
.ed.editing .ed-kb>.ed-selbar{position:absolute;left:0;right:0;bottom:calc(100% + 6px);margin:0;padding:0 var(--s2);z-index:28;display:flex;flex-direction:column;gap:6px;pointer-events:none}
.ed.editing .ed-kb:has(>.ed-fxbar)>.ed-selbar{bottom:calc(100% + 66px)}
.ed-selbar[hidden]{display:none!important}
.ed-selbar-r{display:flex;gap:6px;align-items:center;background:var(--glass-strong,var(--surface));border:1px solid var(--surface-edge);border-radius:12px;padding:5px;box-shadow:0 3px 12px rgba(0,0,0,.18);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);pointer-events:auto}
.ed-selbar-r[hidden]{display:none!important}
.ed-selbar .ed-sb{flex:1 1 0;min-width:0;min-height:44px;padding:0 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.ed-selbar .ed-sb svg{width:1.2rem;height:1.2rem}
.ed-selbar .ed-sb .lbl{font-size:.6875rem;line-height:1.05;white-space:nowrap}
.ed-pg-bs>.ed-ch-list{grid-column:1/-1;min-width:0}   /* 和弦名單併進「標記」頁：整排寬 */
@media (min-width:900px){.ed.editing:not(.ed-bot) .ed-kb>.ed-selbar,.ed.editing:not(.ed-bot) .ed-kb:has(>.ed-fxbar)>.ed-selbar{bottom:auto;top:calc(100% + 6px)}
}
   /* 電腦（面板在右邊的浮動卡）：動作列放在面板下面，不蓋到右上角的選單鈕 */
@media (min-width:900px){.ed.editing:not(.ed-bot) .ed-kb:has(>.ed-selbar:not([hidden])){max-height:calc(100% - 68px)}
}
   /* 第 197 版：選取動作列放在面板下面；面板（手碟圖輸入）一直長到底時，動作列會被固定底列蓋住（電腦、iPad 橫放選取範圍後動作列消失）→ 有選取時面板讓出動作列的高度 */

.ed-stage .ed-selh.head.flip{margin:-4px 0 0 -44px}   /* 第 153 版：第一列貼著上緣時，頭把手翻到左下 */
.ed-stage .ed-selh.head.flip i{top:auto;bottom:3px}
.ed-stage .ed-selh.head.flip::after{top:0;bottom:20px}

/* 第 163 版：選取把手的圓點直接放在選取範圍的角上（頭＝左上角、尾＝右下角），沒有往下伸的長柄——只選上列時，圓點不會跑到下列的底部 */
.ed-stage .ed-selh.head,.ed-stage .ed-selh.tail,.ed-stage .ed-selh.head.flip{margin:-22px 0 0 -22px}
.ed-stage .ed-selh.head i,.ed-stage .ed-selh.tail i,.ed-stage .ed-selh.head.flip i{top:13px;bottom:auto}
.ed-stage .ed-selh::after,.ed-stage .ed-selh.head::after,.ed-stage .ed-selh.tail::after,.ed-stage .ed-selh.head.flip::after{display:none}

/* 第 167 版：循環範圍兩端的把手（瀏覽時；圓點放在範圍的角上，跟編輯的選取把手同款） */
.pl-hds{position:absolute;left:0;top:0;width:0;height:0;z-index:6}
.pl-hd{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;pointer-events:auto;touch-action:none;cursor:grab;z-index:6;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;user-select:none}
.pl-hd i{position:absolute;left:50%;top:13px;width:18px;height:18px;margin-left:-9px;border-radius:50%;background:var(--e2-blue,#3a7bd5);border:2px solid #fff;box-sizing:border-box;box-shadow:0 1px 4px rgba(0,0,0,.35)}
.pl-stairw{display:grid;gap:var(--s2)}

/* 第 169 版：速度面板簡單版（滑桿＋左右 −／+） */
.pl-spdval{text-align:center;font-size:1.5rem;line-height:1.2}
.pl-spdrow{display:flex;align-items:center;gap:var(--s2)}
.pl-spdrow input[type=range]{flex:1;min-width:0}

/* 第 170 版：速度數字本身是「回原速」按鈕（有框、有按壓感），Tap 在 + 右邊 */
.pl-spdval{justify-self:center;min-width:8rem;padding:var(--s1) var(--s3);font-size:1.5rem;line-height:1.2;border:1px solid var(--line,rgba(255,255,255,.28));border-radius:999px;background:var(--e2-fill,rgba(255,255,255,.08))}
.pl-spdval:active{transform:scale(.96)}
.pl-spdval.is-orig{opacity:.85}

/* 第 171 版：速度數字是一般文字（不做成按鈕樣子，點它仍回原速）；Tap 是明顯的按鈕（有框、有底色） */
.pl-spdval{border:0;background:none;border-radius:0;padding:0;min-width:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.pl-spdval:active{transform:none}
.pl-spdrow .pl-tap{border:1px solid var(--line,rgba(255,255,255,.35));background:var(--e2-fill,rgba(255,255,255,.14));border-radius:var(--r2,10px);padding:var(--s2) var(--s3);min-width:3.5rem;font-weight:500}
.pl-spdrow .pl-tap:active{transform:scale(.95)}

/* 第 173 版：檢視條的「譜面」「標示」鈕，鈕名固定、目前的值用小字寫在下面 */


/* 第 173 版：標記頁只有文字的鈕（段落 A、B、前奏、拍號、跳轉…）字跟其他鈕一樣大、不再小又淡 */
.ed-mk:not(:has(svg)):not(.dyn) .lbl{font-size:.9375rem;font-weight:500}
/* 草稿版儲存鈕：有沒存的修改才出現（hidden 時完全不佔位） */
.ed-hd .ed-savebtn{position:relative;flex:none;opacity:.5}
.ed-hd .ed-savebtn.dirty{opacity:1}
.ed-hd .ed-savebtn.dirty::after{content:'';position:absolute;top:5px;right:5px;width:.6rem;height:.6rem;border-radius:50%;background:var(--e2-blue);box-shadow:0 0 0 2px var(--surface,#fff)}

/* ===== 第 187 版：常駐那排多一顆「全選」（手碟譜 8 顆；簡譜／五線譜 8 顆，320 寬時效果退到更多＝7 顆） ===== */
.ed .ed-kb[data-tab="keys"] .ed-kb-low,.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(8,minmax(0,1fr))}
@media (max-width:350px){
 .ed .ed-kb[data-tab="keys"].nv .ed-kb-low{grid-template-columns:repeat(7,minmax(0,1fr))}
 .ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(8,minmax(0,1fr));gap:1px}
}
/* 第 189 版：樂譜資訊的影片連結，右邊「開啟」（另開新視窗） */
.ed-vu-row{display:flex;gap:6px;align-items:center}
.ed-vu-row .sm-input{flex:1 1 auto;min-width:0}
.ed-vu-open{flex:0 0 auto;text-decoration:none;min-height:44px}
.ed-vu-open[hidden]{display:none}
/* 第 190 版：「選取」分頁 */
.ed-kb[data-tab="pick"] .ed-kb-mid>[data-pg="pick"]{visibility:visible}
/* ===== 第 191 版：往左往右搬到頂列（原本復原重做的位置）、復原重做搬到固定底列（使用者 19:55） ===== */
.ed .ed-kb-low [data-k=left],.ed .ed-kb-low [data-k=right]{display:none!important}
.ed .ed-kb[data-tab="keys"] .ed-kb-low,.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(6,minmax(0,1fr))}
@media (max-width:350px){
 .ed .ed-kb[data-tab="keys"].nv .ed-kb-low{grid-template-columns:repeat(5,minmax(0,1fr))}
 .ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(6,minmax(0,1fr));gap:1px}
}
.ed .ed-kb:not([data-tab="keys"]) .ed-kb-low{display:none!important}
.ed:not(.editing) .ed-bar .ed-bur{display:none}
/* 第 263 版：底列七顆——編輯中循環、節拍器讓位給復原、重做；375 寬每顆約 53px、320 寬約 45px */
.ed.editing .ed-bar .ed-bblp,.ed.editing .ed-bar .ed-bbmt{display:none}
.ed-bar{gap:1px;padding-left:2px;padding-right:2px}
.ed-bar .ed-bb{padding-left:0;padding-right:0}
.ed-bar .ed-bblp.on,.ed-bar .ed-bbmt.on{background:var(--press)}
@media (max-width:350px){.ed .ed-kb-sub .ed-kb-x{display:none}}   /* 第 191 版：320 寬頂列放不下；✕ 跟底列「完成」是同一件事，窄螢幕只留底列那顆 */
/* 第 192 版（使用者 11-18 20:35）：iPad 編輯面板加高——選取／標記／和弦那幾頁原本最高 13rem（約 208px）要上下捲，平板螢幕夠高就放寬到螢幕的一半左右，工具直接看得到 */
@media (min-width:700px) and (min-height:600px){.ed-kb-mid>.ed-pg{max-height:min(52dvh,34rem)}}
@media (min-width:900px) and (orientation:landscape) and (min-height:600px){.ed:not(.ed-bot) .ed-kb-mid>.ed-pg{max-height:calc(100dvh - 15rem)}
}
   /* 平板橫放：面板在譜面旁邊的側欄，不蓋譜面，高度直接拉到快滿 */
/* 第 201 版：選取動作列改成翻頁（一排、左右滑或 ‹ › 換頁）。玻璃底移到 .ed-selbar-box，三頁（.ed-selbar-r）各佔一整排寬、scroll-snap 對齊 */
.ed-selbar-box{position:relative;display:flex;align-items:center;gap:2px;background:var(--glass-strong,var(--surface));border:1px solid var(--surface-edge);border-radius:12px;box-shadow:0 3px 12px rgba(0,0,0,.18);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);pointer-events:auto;overflow:hidden}

/* 第 202 版：「兩列｜上列｜下列」固定在左邊不分頁，只有右邊的按鈕翻頁；點陣點放在翻頁區底下 */


/* ===== 第 203 版：看譜時譜面下方的手碟圖（檢視條「手碟圖」開關，smVHp） ===== */
.ed-vpad{display:none}
.ed.vhp:not(.editing) .ed-vpad{display:block;position:relative;flex:0 1 55%;min-height:0;margin:0 var(--s2) var(--s2);pointer-events:auto;border-radius:var(--r-panel);background:var(--surface);border:1px solid var(--surface-edge);box-shadow:var(--shadow-card);contain:layout paint style}
.ed.vhp:not(.editing) .ed-view{flex:1 0 min(44%,calc(100% - 11rem));border-radius:var(--r-panel);border-bottom:1px solid var(--surface-edge);margin-bottom:var(--s2)}
.ed.vhp:not(.editing) .ed-view::after{height:1rem}
.vp-fig{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.vp-fig .hp-n{cursor:pointer}   /* 第 309 版：看譜手碟圖可以點（發聲），邊線粗細跟編輯輸入的手碟圖一樣（:is(.pd-fig,.vp-fig)） */
.vp-fig{position:absolute;inset:0;box-sizing:border-box;padding:var(--s2);display:flex;align-items:center;justify-content:center}
.vp-fig svg.hp{width:100%;height:100%;max-height:none;display:block}
@media (orientation:landscape) and (max-height:500px){
 .ed.vhp:not(.editing){display:grid;grid-template-columns:minmax(0,1fr) min(46%,34rem);grid-template-rows:auto auto minmax(0,1fr)}
 .ed.vhp:not(.editing) .ed-hd,.ed.vhp:not(.editing) .ed-parts{grid-column:1/-1}
 .ed.vhp:not(.editing) .ed-hd{grid-row:1}
 .ed.vhp:not(.editing) .ed-parts{grid-row:2}
 .ed.vhp:not(.editing) .ed-view{grid-column:1;grid-row:3;flex:none;min-height:0}
 .ed.vhp:not(.editing) .ed-vpad{grid-column:2;grid-row:3;flex:none;margin:0 var(--s2) var(--s2) 0}
}
@media (min-width:900px){
 .ed.vhp:not(.editing):not(.ed-bot){display:grid;grid-template-columns:minmax(0,1fr) min(46%,34rem);grid-template-rows:auto auto minmax(0,1fr)}
 .ed.vhp:not(.editing):not(.ed-bot) .ed-hd,.ed.vhp:not(.editing):not(.ed-bot) .ed-parts{grid-column:1/-1}
 .ed.vhp:not(.editing):not(.ed-bot) .ed-hd{grid-row:1}
 .ed.vhp:not(.editing):not(.ed-bot) .ed-parts{grid-row:2}
 .ed.vhp:not(.editing):not(.ed-bot) .ed-view{grid-column:1;grid-row:3;flex:none;min-height:0}
 .ed.vhp:not(.editing):not(.ed-bot) .ed-vpad{grid-column:2;grid-row:3;flex:none;margin:0 var(--s2) var(--s2) 0}
}
@media (orientation:landscape) and (max-height:500px){.ed.vhp:not(.editing) .ed-vpad{margin-top:var(--s2)}}
/* 第 204 版：看譜手碟圖敲到的音區要看得出在動——比編輯輸入的亮得更明顯，並微微放大一下（只用 fill／transform，不用濾鏡；漣漪在看譜手碟圖不放，見 player.js padLit1） */
.ed-vpad .hp-n.pl .hp-o{fill:color-mix(in srgb,var(--star) 52%,var(--surface));stroke:var(--star);transform:scale(1.07)}
.ed-vpad .hp-n.pl .hp-h{opacity:.6}   /* 看譜手碟圖重複使用的漣漪圈：由 player.js ripple2 用 Web Animations 播放 */

/* ===== 第 207 版 ===== */
/* 跳到段落面板：最多顯示 5 列，更多的在面板裡捲；重播鈕只有圖示（圓形） */
.pl-secs{max-height:calc(var(--hit)*5 + var(--s1)*4);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.pl-sec-rp.sm-btn{width:var(--hit);padding:0;justify-content:center}
/* 看譜手碟圖文字：字加粗、次要字不再半透明，比較不會「糊糊的」 */
.ed-vpad .hp-t{font-weight:500}
.ed-vpad .hp-s{opacity:1;fill:var(--ink-2);font-weight:500}

/* 第 225 版（B5）：記號不成對的提示 */
.ed-mkhint{display:flex;flex-direction:column;gap:4px;margin:2px 0 6px}
.ed-mkhint[hidden]{display:none}
.ed-mkhint-b{text-align:left;font:inherit;font-size:.8125rem;line-height:1.3;padding:6px 10px;border-radius:8px;border:1px solid color-mix(in srgb,var(--e2-warn,#c0561f) 45%,transparent);background:color-mix(in srgb,var(--e2-warn,#c0561f) 9%,transparent);color:inherit;cursor:pointer}

/* 第 257 版（B4）：打音後旁邊的換音小標籤（同一個字母／數字有好幾顆音）；墨色字＋半透明底，沒有白框 */
.ed-ntag{position:absolute;z-index:40;display:flex;align-items:center;padding:0 4px;min-height:36px;border-radius:var(--r-pill,999px);background:var(--glass-strong,var(--glass));color:var(--ink);box-shadow:var(--shadow-sm);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);font-size:.8125rem;line-height:1;visibility:hidden;max-width:calc(100% - 16px)}
.ed-ntag-sep{font-style:normal;color:var(--ink-3);padding:0 1px}
.ed-ntag-b{position:relative;min-width:2rem;height:36px;padding:0 .5rem;border:0;border-radius:var(--r-pill,999px);background:transparent;color:inherit;font:inherit;font-weight:500;cursor:pointer}
.ed-ntag-b::after{content:"";position:absolute;inset:-4px 0}
.ed-ntag-b[aria-pressed="true"]{background:var(--press);color:var(--e2-blue,var(--focus))}
/* 第 257 版（B2）：清除標記面板 */
.ed-clr-act{display:flex;justify-content:flex-end;padding-top:var(--s3,.75rem)}
.ed-mkclr{min-width:var(--hit,44px)}

/* 第 258 版（E3 缺音分析）：換琴卡片的缺音行、這首沒用到的音變淡、面板「多出來」行 */
.ed-pan-miss{font-size:.75rem;line-height:1.35;color:#e5484d;overflow-wrap:anywhere}
.ed-pan-card .scl-nt-n.off{opacity:.38}
.ed-pan-card[data-ok="false"] .ed-pan-sub{color:var(--ink-2)}
.ed-pan-extra{margin-top:var(--s2);overflow-wrap:anywhere}

/* 第 259 版：換琴面板「缺音處理」——一種缺音一列、升降一顆鈕、補琴與換別顆琴收合 */
.ed-pan-det{display:flex;flex-direction:column;gap:var(--s2)}
.ed-pan-dh{display:flex;align-items:center;justify-content:space-between;gap:var(--s3)}
.ed-pan-dh .ed-pan-nm{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-pan-fb.sm-btn{flex:none;min-height:var(--hit);border-radius:var(--r-pill);border:1px solid var(--line-strong);padding:0 var(--s3);font-size:.8125rem;gap:.25rem;align-self:flex-start}
.ed-pan-fb.sm-btn svg{width:1rem;height:1rem;order:2}
.ed-pan-frs{display:flex;flex-direction:column}
.ed-pan-fr{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);min-height:calc(var(--hit) + var(--s2));border-bottom:1px solid var(--line)}
.ed-pan-fr:last-child{border-bottom:0}
.ed-pan-fr .ed-pan-fb{align-self:center}
.ed-pan-fn{font-variant-numeric:tabular-nums;font-weight:500}
.ed-pan-fr.todo .ed-pan-fn{color:#e5484d}
.ed-pan-ln{margin:0}
.ed-pan-det .ed-pan-add{display:flex;flex-direction:column;gap:var(--s1)}
.ed-pan-ft{display:flex;justify-content:flex-end;gap:var(--s2);margin-top:var(--s2)}
.ed-pan-ft .sm-btn{min-height:var(--hit);border-radius:var(--r-pill);padding:0 var(--s4)}
.ed-pan-ft .sm-btn:not(.sm-primary){border:1px solid var(--line-strong)}

/* 第 263 版：選取動作列一排七顆、不翻頁。玻璃底在 .ed-selbar-box，七顆平分寬度（375 寬每顆約 50px、320 寬約 44px） */
.ed-selbar-box{gap:0;padding:4px 2px}
.ed-selbar-box>.ed-selbar-r{flex:1 1 0;min-width:0;display:flex;gap:1px;align-items:stretch;background:none;border:0;border-radius:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;padding:0}
.ed-selbar .ed-sb.ed-sblane .lbl{white-space:nowrap}
.ed-selbar .ed-sb[hidden]{display:none}
@media (max-width:359px){.ed.editing .ed-kb>.ed-selbar{padding-left:2px;padding-right:2px}.ed-selbar-box{padding-left:0;padding-right:0}}   /* 320 寬：七顆每顆要有 44px */
.ed-bar .ed-bb{min-height:44px}   /* 按鈕 44px */

/* ===== 第 264 版：標記頁重新整理（組標題可收合、備註多行框、段落按鈕截斷）＋和弦獨立分頁 ===== */
.ed-pg-fold{appearance:none;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:0 4px;margin:0;border:0;background:none;color:var(--ink-2);font:inherit;font-size:.75rem;text-align:left;cursor:pointer}
.ed-pg-fold svg{width:1rem;height:1rem;flex:none;transform:rotate(90deg);transition:transform .15s}
.ed-pg-g.fold .ed-pg-fold svg{transform:rotate(0deg)}
.ed-pg-g.fold>:not(.ed-pg-h){display:none!important}
.ed-pg-cap{font-size:.6875rem;padding:4px 2px 0;color:var(--ink-3)}
.ed-note-box{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.ed-note-ta{width:100%;box-sizing:border-box;min-height:4.6rem;max-height:320px;resize:none;font-size:1rem;line-height:1.35;padding:8px 10px;overflow-y:auto}
.ed-pg-mark .ed-mk[data-k="s:*"]{min-width:0}
.ed-pg-mark .ed-mk[data-k="s:*"] .lbl{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-pg-g .ed-pg-lyric .ed-pg-bs,.ed-pg-lyric>.ed-pg-bs{margin-top:4px}
.ed-pg-lyric>.ed-ly-row{margin-top:2px}
.ed-ch-top{display:flex;gap:6px;align-items:stretch;margin-bottom:6px}
.ed-ch-top .ed-chsplit{flex:0 0 auto;min-height:44px;padding:0 14px;border-radius:var(--r-pill)}
.ed-ch-top .ed-chput{flex:1 1 0;min-width:0;min-height:44px}
.ed-ch-body{display:flex;flex-direction:column;gap:8px}
.ed-ch.fit{background:var(--press)}

/* ===== 第 265 版：譜面設定列寫出目前的排版值 ===== */


/* ===== 第 265 版：輸入｜選取｜標記｜和弦 四個分頁的面板高度一致（切換時譜面不重排；內容多的頁在裡面捲） ===== */
@media (min-width:700px) and (min-height:600px){
 .ed.editing .ed-kb-mid{flex:none;height:min(40dvh,26rem);min-height:0;overflow:hidden}
 .ed.editing .ed-kb-mid>.ed-pg{max-height:100%;overflow-y:auto}
 .ed.editing .ed-kb:not([data-tab="keys"]) .ed-kb-low{display:grid!important;min-height:44px;visibility:hidden;pointer-events:none}   /* 輸入頁底下那一排別的分頁沒有：留著位置（看不見、點不到），四個分頁一樣高 */
}
@media (min-width:900px) and (orientation:landscape) and (min-height:600px){.ed.editing:not(.ed-bot) .ed-kb-mid{height:calc(100dvh - 19rem)}
}


/* ===== 第 266 版：手碟圖輸入放大（圈盡量大、K／T／S 在角落）、往左往右搬到常駐排最左邊 ===== */
.ed .ed-kb-sub .ed-kb-ur{display:none!important}
.ed .ed-kb-low [data-k=left],.ed .ed-kb-low [data-k=right]{display:flex!important}   /* 蓋掉第 191 版的隱藏 */
.ed .ed-kb[data-tab="keys"] .ed-kb-low,.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(7,minmax(0,1fr))}
@media (max-width:350px){
 .ed .ed-kb[data-tab="keys"].nv .ed-kb-low,.ed .ed-kb[data-tab="keys"]:not(.nv) .ed-kb-low{grid-template-columns:repeat(7,minmax(0,1fr));gap:1px}
 .ed.editing .ed-kb[data-tab="keys"]{padding-left:2px;padding-right:2px}
}
.ed.padin .ed-kb[data-tab="keys"] .pd-fig{margin:0 0 8px}   /* 圖用滿寬度；跟常駐排之間留 8px 不收觸控的縫 */
:is(.pd-fig,.vp-fig) svg.hpx{overflow:visible}
:is(.pd-fig,.vp-fig) svg.hpx .hp-o{stroke-width:1.3}
:is(.pd-fig,.vp-fig) svg.hpx .hp-rim{stroke-width:1.2}
:is(.pd-fig,.vp-fig) svg.hpx .hp-d .hp-o{stroke-width:1.7}
:is(.pd-fig,.vp-fig) svg.hpx .hp-h{stroke-width:4}
:is(.pd-fig,.vp-fig) svg.hpx .hp-b ellipse.hp-o{fill:color-mix(in srgb,var(--ink-3) 15%,var(--surface))}   /* 底音：底色深一點（跟音位鍵的底音同一個做法） */
:is(.pd-fig,.vp-fig) svg.hpx rect.hp-o{fill:color-mix(in srgb,var(--surface) 70%,transparent);stroke:color-mix(in srgb,var(--ink-3) 42%,transparent);transform-box:fill-box;transform-origin:center;transition:fill .3s ease-out,stroke .3s ease-out,transform .12s var(--ease-out)}
:is(.pd-fig,.vp-fig) svg.hpx .hp-pc .hp-t{fill:var(--ink-2);font-weight:500}
:is(.pd-fig,.vp-fig) svg.hpx .hp-n.lit rect.hp-o,:is(.pd-fig,.vp-fig) svg.hpx .hp-n.tap rect.hp-o{fill:color-mix(in srgb,var(--star) 14%,var(--surface));stroke:var(--star)}
:is(.pd-fig,.vp-fig) svg.hpx .hp-n.lit.hp-pc .hp-t,:is(.pd-fig,.vp-fig) svg.hpx .hp-n.tap.hp-pc .hp-t{fill:var(--star)}

/* ===== 第 268 版：譜面設定鈕在標題列（儲存與更多之間）；320 寬放不下就收進「更多」 ===== */


/* ===== 第 268 版（第 3 次）：時值列常駐（簡譜、五線譜）、常駐排不再有「更多」、iPad 橫放／電腦側欄音位鍵加大 ===== */
.ed-kb-keys .ed-durrow{grid-column:1/-1;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;margin-bottom:2px}
.ed-dr{appearance:none;font:inherit;min-width:0;height:2.75rem;padding:0 1px;border-radius:var(--r-ctl);border:1px solid var(--surface-edge);background:var(--surface);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:1.05;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation;transition:transform var(--dur-press) var(--ease-out),background-color var(--dur-press) ease}
.ed-dr:active{transform:scale(.95);background:var(--press)}
.ed-dr svg{width:1.15rem;height:1.15rem;flex:none}
.ed-dr .s{font-size:.625rem;color:var(--ink-3);white-space:nowrap;letter-spacing:0}
.ed-dr .t{font-size:1.0625rem;font-weight:500;line-height:1.15;color:var(--ink-2)}
.ed-dr[aria-pressed="true"]{border-color:var(--e2-blue);outline:2px solid var(--e2-blue);outline-offset:-3px;background:color-mix(in srgb,var(--e2-blue) 14%,var(--surface))}
@media (max-width:359px){.ed-kb-keys .ed-durrow{grid-template-columns:repeat(4,minmax(0,1fr))}}   /* 320 寬八顆不到 44px：分兩排 */
.ed .ed-kb[data-tab="keys"] .ed-kb-low [data-k=more],.ed .ed-kb[data-tab="keys"] .ed-kb-low [data-k=gridp],.ed .ed-kb-low [data-k=dur]{display:none!important}
.ed .ed-kb[data-tab="keys"] .ed-kb-low .rw{display:flex!important;order:3}
.ed .ed-kb[data-tab="keys"] .ed-kb-low .nw{display:flex!important}
@media (max-width:350px){
 .ed .ed-kb[data-tab="keys"] .ed-kb-low{grid-template-columns:repeat(7,minmax(0,1fr));gap:1px}
 .ed.editing .ed-kb[data-tab="keys"]{padding-left:2px;padding-right:2px}
}
@media (min-width:900px){.ed.editing:not(.ed-bot) .ed-kb-keys{--cols:6!important}
.ed.editing:not(.ed-bot) .ed-kb-keys .ed-key,.ed.editing:not(.ed-bot) .ed-kb-keys .ed-dr{height:3.5rem}
}

.ed-kb-keys.lay-hand{grid-template-columns:repeat(7,minmax(0,1fr))}
.ed-kb-keys.lay-hand .ed-key.bot{background:color-mix(in srgb,var(--ink) 9%,var(--surface))}   /* 第 268 版（C3）：照左右手排法，底音底色較深 */

/* 第 271 版：譜面設定列太寬時的邊緣漸層（有東西被切掉的提示） */

/* 第 273 版：電腦／平板橫放的輸入頁，鍵加大（高度夠時 4.5rem），底下的操作列接在鍵後面，不再貼到面板最底、中間空一大塊。其他分頁照舊等高。 */
@media (min-width:900px) and (min-height:700px){.ed.editing:not(.ed-bot) .ed-kb-keys .ed-key,.ed.editing:not(.ed-bot) .ed-kb-keys .ed-dr{height:4.5rem}
}

@media (min-width:900px) and (orientation:landscape) and (min-height:600px){.ed.editing:not(.ed-bot) .ed-kb[data-tab="keys"] .ed-kb-mid{height:auto}
.ed.editing:not(.ed-bot) .ed-kb[data-tab="keys"]{min-height:calc(100dvh - 19rem + 118px)}
}



/* ===== 第 275 版（檢視第 9 點）：淺色模式——標題與副標加白色暈邊，不被山景線條干擾；看譜紙張不透明度提高到 .9，山景不再從譜面透出（深色不動） ===== */
:root:not([data-theme="dark"]) .ed-hd .ed-title,:root:not([data-theme="dark"]) .ed-hd .ed-sub{text-shadow:0 0 6px rgba(255,255,255,.95),0 0 2px rgba(255,255,255,.95)}
:root:not([data-theme="dark"]) .ed-hd .ed-sub,:root:not([data-theme="dark"]) .ed-sub .ed-scl-tg{color:var(--ink)}
:root:not([data-theme="dark"]) .ed-view{background:rgba(255,255,255,.9)}

/* 第 290 版：固定列。輸入方式（鍵盤｜手碟圖）在分頁列最右邊，輸入、選取、標記、和弦四頁都在、位置不動。只留圖示（側欄與窄手機都放不下字；名稱在 title／aria-label），整列高度仍是 44px，不改四分頁等高的量法 */
.ed .ed-kb-sub .ed-kb-dockE{gap:6px}
.ed .ed-kb-sub .ed-modeseg{flex:none;display:flex;align-items:center;height:44px}
.ed .ed-kb-sub .ed-modeseg .sm-btn{width:44px;min-width:44px;min-height:44px;height:44px;padding:0;justify-content:center}
.ed .ed-kb-sub .ed-modeseg .sm-btn .lbl{display:none}
.ed .ed-kb-sub .ed-m3 .sm-btn{min-width:44px}   /* 分頁鈕被擠時仍保底 44px */


/* 第 293 版：縮放膠囊（譜面右下角浮動「－ 值 ＋」；譜面設定列整條拿掉，縮放獨立出來）。位置由 screen_edit.js 的 zcSync 算（鍵盤上緣／底列之上）；捲動時 .fade 淡出，播放中與選單面板開著時 .off */








/* 第 293 版：編輯中從「更多」開的設定面板（不擋譜面的那種）高度上限＝標題列下緣到底列上緣之間；「顯示」組多了譜面、標示兩列，內容比以前高，超過的部分在面板裡捲動，不蓋住底列 */
.sm-panel.ed-es-panel{max-height:calc(100dvh - 8.5rem - env(safe-area-inset-bottom,0px))}

/* ===== 第 294 版：段落尾的小「＋」（加小節）；看譜右邊手碟圖電腦版寬度＝鍵盤 ===== */
.ed-ab-layer{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none}
.ed-ab{position:absolute;pointer-events:auto;width:2rem;height:2rem;padding:0;border-radius:50%;border:0;background:var(--e2-blue,#2f6df6);color:#fff;font:600 1.5rem/1 var(--font,inherit);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.25);touch-action:manipulation}   /* 第 295 版：放大、實心藍，才看得到 */
.ed-ab::after{content:"";position:absolute;inset:-6px}   /* 觸控區 44px */
.ed-ab:hover,.ed-ab:focus-visible{filter:brightness(1.1)}
@media (min-width:900px){.ed.vhp:not(.editing):not(.ed-bot){grid-template-columns:minmax(0,1fr) 26rem}
}

@media (min-width:900px) and (orientation:landscape) and (max-height:500px){.ed.vhp:not(.editing):not(.ed-bot){grid-template-columns:minmax(0,1fr) min(46%,34rem)}
}


/* 第 295 版：譜面最下面多留一塊，縮放膠囊不擋住最後一個小節（選取動作列開著時 syncSelBar 另外設 inline padding-bottom） */
:root[data-theme="dark"] .ed-ab{color:#0B1528}

/* 第 299 版：更多選單裡的縮放一列 */
.ed-mz{display:flex;align-items:center;gap:var(--s2)}
.ed-mz .sm-btn{min-width:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;flex:none}
.ed-mz-v{flex:1;text-align:center;font-variant-numeric:tabular-nums}

/* 第 300 版：⋯ 裡的選項列（譜面／標示／格子） */
.ed-mrows{display:flex;flex-direction:column}
.ed-mrow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s2) var(--s3);padding:var(--s1) 0}
.ed-mrow[hidden]{display:none}
.ed-mrow-l{min-width:0}
.ed-mrow-full .sm-seg{flex:1 1 100%;width:100%}
.ed-mrow-full .sm-seg .sm-btn{padding:0 var(--s2)}
.ed-mrow .sm-seg.dis{opacity:.45}

/* 第 300 版：標題列「Aa」鈕與顯示面板 */
.ed-hd .ed-savebtn[hidden]{display:none}
.ed-hd .ed-vwbtn{font-weight:500;font-size:.9375rem;letter-spacing:0;padding:0}
.ed-vw{display:flex;flex-direction:column;gap:var(--s1);padding:var(--s2) var(--pad-modal) var(--s3)}
.ed-vw-sw{cursor:pointer;min-height:44px}
.sm-panel.ed-vw-panel{max-height:calc(100dvh - 8.5rem - env(safe-area-inset-bottom,0px))}
/* 第 328 版：「聲部 N」鈕縮小，跟旁邊的調式名同樣是小字加底線，不再是大顆膠囊 */
.ed-ptbtn.sm-btn{min-height:0;padding:0 2px;border:0;background:none;font-size:min(.75rem,13px);color:var(--ink-2);text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:2px;gap:.25rem}
.ed-ptbtn.sm-btn svg{width:.9em;height:.9em}
/* 第 329 版：「鍵盤／手碟圖」切換搬到固定列最左（占兩格）；往左往右搬到頂列右側 */
.ed-kb-low>.ed-modeseg{grid-column:span 2;display:flex;gap:2px}
.ed-kb-low>.ed-modeseg .sm-btn{flex:1 1 0;min-width:0;padding:0;justify-content:center}
.ed-kb-dockE .ed-kb-top.sm-btn{flex:none;min-width:2.75rem;min-height:2.75rem;padding:0 6px;flex-direction:column;gap:0;font-size:.6875rem;line-height:1.1}
.ed-kb-dockE .ed-kb-top.sm-btn svg{width:1.15rem;height:1.15rem}
.ed-key.perc .s{display:block;font-size:.625rem;opacity:.7;line-height:1}
@media (max-width:700px){.ed-kb-low>.ed-modeseg .lbl{display:none}.ed-kb-low>.ed-modeseg .sm-btn{font-size:0}.ed-kb-low>.ed-modeseg .sm-btn svg{width:1.35rem;height:1.35rem}}
/* 第 330 版：電腦／平板視窗不夠高時，按鍵區自己捲動，固定列（疊加、清除…）一直在面板底部看得到（以前按鍵區不縮，把固定列擠到固定底列後面） */
.ed.editing:not(.padin) .ed-kb[data-tab="keys"] .ed-kb-mid{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.ed.editing:not(.padin) .ed-kb .ed-kb-low{flex:none}

/* 第 333 版：平板／電腦「編輯面板放下方」模式（.ed-bot）：上面所有 min-width:900px 的側欄規則改成「不是 ed-bot 才套」，所有 max-width:899px 的手機版規則在寬螢幕複製一份給 .ed-bot（機器產生，改上面的原規則時要一起重產） */
@media (min-width:900px){.ed.editing.ed-bot .ed-hd [data-a="pp"]{display:inline-flex}
.ed.editing.ed-bot .pl-bar{display:none}
}
@media (min-width:900px) and (min-height:501px){.ed.editing.ed-bot .ed-kb{max-height:calc(100dvh - 8rem)}
.ed.editing.ed-bot .ed-kb-mid{min-height:0;overflow-y:auto;overscroll-behavior:contain}
}
@media (min-width:900px) and (min-height:501px){.ed.editing.ed-bot .ed-view{flex:1 0 min(50%,calc(100% - 18rem));min-height:0}
.ed.editing.ed-bot .ed-kb{flex:0 1 auto;min-height:0;max-height:none}
.ed.editing.padin.ed-bot .ed-kb[data-tab="keys"]{flex:0 1 100%}
}
@media (min-width:900px) and (min-height:501px){.ed.editing.ed-bot .ed-kb>.ed-fxbar{position:absolute;left:0;right:0;bottom:calc(100% + 6px);margin:0;padding:0 var(--s2);border:0;z-index:29}
.ed.editing.ed-bot .ed-kb>.ed-fxbar .ed-fxb{box-shadow:0 3px 12px rgba(0,0,0,.18)}
.ed.padin.ed-bot .ed-kb[data-tab="keys"]:not(.subflow):has(.ed-fxbar) .ed-kb-sub{position:absolute;left:4px;right:4px;z-index:2;pointer-events:none}
.ed.padin.ed-bot .ed-kb[data-tab="keys"]:not(.subflow):has(.ed-fxbar) .ed-kb-sub>*{pointer-events:auto}
.ed.padin.ed-bot .ed-kb[data-tab="keys"]:not(.subflow):has(.ed-fxbar) .ed-kb-sub>.ed-kb-where{pointer-events:none}
}
@media (min-width:900px) and (min-height:501px){.ed.editing.padin.ed-bot .ed-view{flex:1 0 min(36%,calc(100% - 18rem))}
}
@media (min-width:900px) and (min-height:501px){.ed.editing.ed-bot .ed-view{min-height:80px}
.ed.editing.ed-bot .ed-kb{overflow:visible;min-height:0}
}
@media (min-width:900px){.ed:not(.ed-bot) .ed-kb-low>.ed-modeseg .lbl{display:none}.ed:not(.ed-bot) .ed-kb-low>.ed-modeseg .sm-btn{font-size:0}.ed:not(.ed-bot) .ed-kb-low>.ed-modeseg .sm-btn svg{width:1.35rem;height:1.35rem}}   /* 側欄較窄：切換鈕只放圖示 */

/* 第 335 版：面板在下方且螢幕寬時，選取／標記／和弦頁的按鈕不隨寬度拉伸，維持固定大小靠左排 */
@media (min-width:900px){
 .ed.ed-bot .ed-pg-bs,.ed.ed-bot .ed-ch-list,.ed.ed-bot .ed-ly-tools{grid-template-columns:repeat(auto-fill,minmax(5.5rem,7rem));justify-content:start}
 .ed.ed-bot .ed-pg-bs>.ed-ch-list{grid-column:1/-1}
 .ed.ed-bot .ed-kb-page:not(.ed-pg){grid-template-columns:repeat(5,minmax(0,7rem));justify-content:start}
}

/* ===== 第 339 版：底列順序照 DOM（切換｜手｜疊加｜效果｜換列｜清除）；各種寬度的舊 order 值一律作廢 ===== */
.ed .ed-kb .ed-kb-low .ed-act{order:0!important}

/* 第 340 版：輸入時鍵盤上的字用目前那隻手的顏色（手的顏色開著、單一隻手）；手碟圖亮起也用；自動交替鈕 */
[data-hc="1"][data-ih="R"] .ed-key:not(.perc):not(.altb):not(.rest) .t{color:var(--cR)}
[data-hc="1"][data-ih="L"] .ed-key:not(.perc):not(.altb):not(.rest) .t{color:var(--cL)}
[data-hc="1"][data-ih="R"] .pd-fig{--star:var(--cR)}
[data-hc="1"][data-ih="L"] .pd-fig{--star:var(--cL)}
.ed-key.altb .t{font-size:1.25rem;line-height:1}
.ed-key.altb .s{display:block;font-size:.625rem;opacity:.8;line-height:1}
.ed-key.altb.on{border-color:var(--e2-blue);background:color-mix(in srgb,var(--e2-blue) 14%,var(--surface));box-shadow:inset 0 -3px 0 var(--e2-blue)}
:is(.pd-fig,.vp-fig) svg.hpx .hp-n.hp-pc[data-k="alt"].on rect.hp-o{fill:color-mix(in srgb,var(--e2-blue) 14%,var(--surface));stroke:var(--e2-blue)}
:is(.pd-fig,.vp-fig) svg.hpx .hp-n.hp-pc[data-k="alt"].on .hp-t{fill:var(--e2-blue)}
/* 第 341 版：交替鈕圖示＝切換手順（swapHand），鍵盤版與手碟圖版同一個 */
.ed-key.altb .t{display:flex;align-items:center;justify-content:center;line-height:1}
.ed-key.altb .t svg{width:1.5rem;height:1.5rem}
:is(.pd-fig,.vp-fig) svg.hpx .hp-pc[data-k="alt"] .hp-ic{fill:none;stroke:var(--ink-2);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:is(.pd-fig,.vp-fig) svg.hpx .hp-n.hp-pc[data-k="alt"].on .hp-ic{stroke:var(--e2-blue)}

/* 第 363 版（使用者 11-30）：電腦版「選取」分頁要一眼看完整列編輯區——四組（選取、剪貼、小節、列）改成「組名在左、按鈕橫排」，窄的組併在同一排，不夠寬才換行；按鈕縮成固定寬（不再一排四顆撐滿），不用捲動就看得到「列」 */
@media (min-width:900px){
.ed.editing .ed-kb-mid>.ed-pg-pick{display:flex;flex-flow:row wrap;align-content:flex-start;align-items:flex-start;gap:4px 14px;max-height:none}
.ed.editing .ed-pg-pick>.ed-pg-g{flex:0 1 auto;flex-direction:row;align-items:center;gap:6px;padding:0;border:0;min-width:0}
.ed.editing .ed-pg-pick>.ed-pg-g>.ed-pg-h{flex:none;width:1.75rem;padding:0;text-align:left}
.ed.editing .ed-pg-pick .ed-pg-bs{display:flex;flex-flow:row wrap;gap:4px;min-width:0}
.ed.editing .ed-pg-pick .ed-pg-bs>.ed-mk{flex:none;width:4rem;min-width:0;height:2.75rem;min-height:0;padding:2px 0;gap:0}
.ed.editing .ed-pg-pick .ed-mk .lbl{font-size:.625rem;white-space:nowrap}
.ed.editing .ed-pg-pick .ed-mk svg{width:1.1rem;height:1.1rem}
}

/* 第 364 版：標記頁「反覆與跳轉」的簡短解說（游標那一小節的記號）；只在編輯鍵盤出現，不影響譜面 */
.ed-mkdesc{display:flex;flex-direction:column;gap:2px;padding:4px 2px 0;color:var(--ink-2);font-size:.75rem;line-height:1.35}
.ed-mkdesc[hidden]{display:none}
/* 第 368 版：歌詞多語言（Aa 面板的語言列、歌詞面板的語言鈕、新增拼音面板） */
.ed-vw-ly .ed-vw-lylist{display:flex;flex-direction:column;gap:2px;width:100%}
.ed-vw-lyr{display:flex;align-items:center;gap:6px;min-height:2.75rem;padding:0 4px 0 0;border-radius:var(--r-ctl);cursor:pointer}
.ed-vw-lyr.drag{background:var(--press)}
.ed-vw-grip{flex:none;display:inline-flex;width:2rem;height:2.75rem;align-items:center;justify-content:center;color:var(--ink-2);cursor:grab;touch-action:none}
.ed-vw-grip .ic{width:1.1rem;height:1.1rem}
.ed-vw-lyn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-ly-row .ed-ly-lang .lbl{font-size:.8125rem;white-space:nowrap}
.ed-ly-kinds{flex-wrap:wrap}
.ed-vw-ly .ed-vw-lylist{flex:1 1 100%}.ed-vw-ly[hidden]{display:none}
.ed-ly-rp .sm-field{padding-inline:0}.ed-ly-rp .ed-ask-note{margin-top:var(--s2)}
.ed-ly-rep{flex-wrap:nowrap;cursor:pointer}.ed-ly-rep .ed-mrow-l{flex:1}.ed-ly-rep .ed-mrow-l .sm-meta{display:block;font-size:.75rem}
/* ===== 第 383 版：標記頁次分頁（結構｜表情｜歌詞）、歌詞語言列、音節條 ===== */
.ed-mksub{display:flex;align-items:center;gap:6px;flex:none}
.ed-mksub-seg{flex:1 1 auto;min-width:0;display:flex;padding:.1875rem;gap:.125rem;border-radius:var(--r-pill);background:var(--press)}   /* 跟 SM.seg 同一種選項鈕 */
.ed-mksub-b{appearance:none;flex:1 1 0;min-width:0;min-height:2.75rem;padding:0 var(--s2);border:0;border-radius:var(--r-pill);background:transparent;color:var(--ink-2);font:inherit;font-size:.8125rem;cursor:pointer;white-space:nowrap}
.ed-mksub-b.on{background:var(--ink);color:var(--page);font-weight:500}
.ed-mksub-b:focus-visible{outline:2px solid var(--e2-blue);outline-offset:1px}
.ed .ed-mksub .ed-mkclr{flex:none;width:2.75rem;min-width:2.75rem;min-height:2.75rem;padding:0}
.ed-mkp{display:flex;flex-direction:column;gap:6px}.ed-mkp[hidden]{display:none!important}
.ed-mkp>.ed-pg-lyric>.ed-pg-h{display:none}
.ed-ly-lrow{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.ed-ly-lang,.ed-ly-pill{appearance:none;display:inline-flex;align-items:center;gap:4px;min-height:2.75rem;max-width:70%;padding:0 10px 0 12px;border:1px solid var(--line-strong);border-radius:var(--r-pill);background:transparent;color:var(--ink);font:inherit;font-size:.8125rem;cursor:pointer}   /* 文字鈕：膠囊、有框沒底色 */
.ed-ly-lang .ic,.ed-ly-pill .ic{width:1.05rem;height:1.05rem;flex:none}.ed-ly-lang .ic:last-child,.ed-ly-pill .ic:last-child{width:.85rem;height:.85rem;transform:rotate(90deg);color:var(--ink-2)}
.ed-ly-lang .lbl,.ed-ly-pill .lbl{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-ly-lang:active,.ed-ly-pill:active{background:var(--press)}
.ed .ed-ly-lrow .ed-ly-add{width:2.75rem;min-width:2.75rem;min-height:2.75rem;padding:0;border-radius:50%}.ed-ly-add[hidden]{display:none!important}
.ed-ly-syl{display:flex;align-items:center;gap:6px}.ed-ly-syl[hidden]{display:none}
.ed-ly-sylw{flex:1 1 auto;min-width:0;display:flex;align-items:center;overflow-x:auto;scrollbar-width:none;padding:2px 0;font-size:1rem}
.ed-ly-sylw::-webkit-scrollbar{display:none}
.ed-ly-sylw.fade-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 2rem),transparent)}
.ed-ly-sylw.fade-l{-webkit-mask-image:linear-gradient(90deg,transparent,#000 2rem);mask-image:linear-gradient(90deg,transparent,#000 2rem)}
.ed-ly-sylw.fade-l.fade-r{-webkit-mask-image:linear-gradient(90deg,transparent,#000 2rem,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(90deg,transparent,#000 2rem,#000 calc(100% - 2rem),transparent)}
.ed-ly-su{flex:none;display:inline-flex;align-items:center;height:2.75rem;padding:0 2px;border-radius:6px}
.ed-ly-su.cur{background:var(--press);box-shadow:inset 0 -2px 0 var(--e2-blue)}
.ed-ly-sl{display:inline-block;line-height:2.75rem;white-space:pre}
.ed-ly-sb,.ed-ly-se,.ed-ly-sg{appearance:none;flex:none;margin:0;padding:0;border:0;background:none;font:inherit;cursor:pointer;color:var(--ink-3);height:2.75rem;touch-action:manipulation}
.ed-ly-sb{width:1.5rem;font-size:1.1rem}
.ed-ly-se{width:1.25rem;color:var(--e2-blue)}
.ed-ly-sg{width:.75rem;margin:0 -.2rem;position:relative}   /* 字母之間的縫：點了拆開 */
.ed-ly-sg::after{content:'';position:absolute;left:50%;top:30%;bottom:30%;width:1px;background:currentColor;opacity:.35}
.ed-ly-sb:hover,.ed-ly-sb:active,.ed-ly-sg:hover,.ed-ly-sg:active,.ed-ly-se:hover,.ed-ly-se:active{color:var(--e2-blue);background:var(--press);border-radius:4px}
.ed-ly-sg:hover::after,.ed-ly-sg:active::after{opacity:1}
.ed-ly-sylc{flex:none;font-size:.75rem;color:var(--ink-2)}.ed-ly-sylc.over{color:var(--e2-off)}
.ed-vw-lyadd{align-self:flex-start;margin-top:2px}
.ed-vw-ly.one .ed-vw-lyr{padding-left:4px}
/* 第 383 版：標記頁的次分頁那排捲動時黏在上面（整頁照舊一起捲；上緣不淡出） */
.ed-pg-mark[data-pg="bar"]>.ed-mksub{position:sticky;top:0;z-index:3;margin:0 -2px;padding:0 2px 4px;background:linear-gradient(var(--glass-strong),var(--glass-strong)),linear-gradient(var(--glass-strong),var(--glass-strong))}   /* 兩層＝幾乎不透明，捲上去的字不會透出來 */
.ed .ed-kb-mid>.ed-pg.ed-pg-mark[data-pg="bar"].fade-t:not(.fade-b){-webkit-mask-image:none;mask-image:none}
.ed .ed-kb-mid>.ed-pg.ed-pg-mark[data-pg="bar"].fade-t.fade-b{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 2rem),transparent)}
.ed-ly-sg::after{opacity:.2}
/* ===== 第 384 版：編輯面板頂端瘦身、和弦分法分段控制、歌詞頁重排（規格卡 StarMap_規格卡_編輯面板頂端與歌詞頁重排.md） ===== */
/* A. 分頁列：外觀 36px，手指範圍用透明的 ::after 補到 44px */
.ed .ed-kb .ed-kb-sub{min-height:2.25rem}
.ed .ed-kb-sub .ed-m3{height:2.25rem;padding:.125rem;overflow:visible}
.ed .ed-kb-sub .ed-m3 .sm-btn{min-height:2rem;height:2rem;position:relative}
.ed .ed-kb-sub .ed-m3 .sm-btn::after{content:'';position:absolute;left:0;right:0;top:-6px;bottom:-6px}
.ed .ed-kb-sub .ed-kb-x,.ed .ed-kb-sub .sm-btn.icon-only{width:2.25rem;height:2.25rem;min-width:2.25rem;min-height:2.25rem;position:relative}
.ed .ed-kb-sub .ed-kb-x::after,.ed .ed-kb-sub .sm-btn.icon-only::after{content:'';position:absolute;inset:-4px}
.ed .ed-kb-dockE .ed-kb-top.sm-btn{min-height:2.25rem;height:2.25rem;min-width:2.25rem;width:2.25rem;padding:0;position:relative}
.ed .ed-kb-dockE .ed-kb-top.sm-btn::after{content:'';position:absolute;inset:-4px}
.ed .ed-kb-dockE .ed-kb-top.sm-btn .lbl{display:none}
.ed .ed-kb-dockE .ed-kb-top.sm-btn svg{width:1.25rem;height:1.25rem}
.ed .ed-kb-sub .ed-kb-dockE{gap:2px}
/* 次分頁：文字分頁，貼合字寬靠左，選中＝字加深＋底線；清除鈕同一排最右 */
.ed-mksub{min-height:2.25rem;gap:2px;padding:0 2px;margin-bottom:6px;box-shadow:inset 0 -1px 0 var(--line)}
.ed-mksub .ed-mksub-seg{flex:0 1 auto;padding:0;gap:0;background:none;border-radius:0}
.ed-mksub .ed-mksub-b{flex:none;min-height:2.25rem;height:2.25rem;padding:0 .875rem;border-radius:0;background:none;color:var(--ink-3);font-size:.875rem;position:relative}
.ed-mksub .ed-mksub-b::after{content:'';position:absolute;left:0;right:0;top:-4px;bottom:-4px}
.ed-mksub .ed-mksub-b.on{background:none;color:var(--ink);font-weight:500;box-shadow:inset 0 -2px 0 var(--ink)}
.ed-mksub .ed-mksub-b:not(.on):hover{color:var(--ink-2)}
.ed .ed-mksub .ed-mkclr{margin-left:auto;width:2.25rem;min-width:2.25rem;height:2.25rem;min-height:2.25rem;border-color:transparent;position:relative}
.ed .ed-mksub .ed-mkclr::after{content:'';position:absolute;inset:-4px}
.ed-pg-mark .ed-pg-g{margin-top:0}
.ed-pg-mark .ed-pg-h{line-height:1.2;margin:2px 0 4px}
/* B. 和弦：分段控制＋右邊「放進譜」 */
.ed-ch-top{align-items:center}
.ed .ed-ch-top .ed-chsplit{flex:none;display:inline-flex;height:2.25rem;min-height:0;box-sizing:border-box;padding:.125rem;border-radius:var(--r-pill);overflow:visible}
.ed .ed-ch-top .ed-chsplit .sm-btn{min-height:2rem;height:2rem;padding:0 1rem;position:relative}
.ed .ed-ch-top .ed-chsplit .sm-btn::after{content:'';position:absolute;left:0;right:0;top:-6px;bottom:-6px}
.ed .ed-ch-top .ed-chput{flex:none;margin-left:auto;width:auto;min-width:0;min-height:2.25rem;height:2.25rem;padding:0 .875rem;border-radius:var(--r-pill);flex-direction:row;gap:4px;position:relative;font-size:.8125rem}
.ed .ed-ch-top .ed-chput::after{content:'';position:absolute;left:0;right:0;top:-4px;bottom:-4px}
.ed .ed-ch-top .ed-chput .lbl{font-size:.8125rem;white-space:nowrap}
.ed .ed-ch-top .ed-chput svg{width:1rem;height:1rem}
/* C. 歌詞頁：語言｜段｜整首歌詞｜＋ 一排 */
.ed-ly-lrow{gap:6px;overflow:hidden}
.ed-ly-lrow .ed-ly-lang{flex:0 1 auto;min-width:0;max-width:none}
.ed-ly-lrow .ed-ly-stz,.ed-ly-lrow .ed-ly-pastebtn{flex:none}
.ed-ly-lrow .ed-ly-pastebtn .ic{width:1rem;height:1rem;transform:none;color:inherit}
.ed-ly-lrow .ed-ly-pastebtn:disabled{opacity:.35;cursor:default}
@media (max-width:370px){.ed-ly-lrow .ed-ly-pastebtn .lbl{display:none}.ed-ly-lrow .ed-ly-pastebtn{width:2.75rem;justify-content:center;padding:0}}
.ed-ly-in{padding-right:.75em}
.ed-ly-row>.sm-btn{flex:none}
/* 音節條：一個音一塊（有框沒底），塊與塊之間的「＋」＝合併 */
.ed-ly-syl{margin:6px 0}
.ed-ly-sylw{gap:0;padding:4px 2px}
.ed-ly-su{height:2.25rem;padding:0 .5rem;border:1px solid var(--line-strong);border-radius:8px;background:transparent;box-sizing:border-box;cursor:default}
.ed-ly-su[role="button"]{cursor:pointer}
.ed-ly-su.cur{background:transparent;box-shadow:none;border:1.5px solid var(--e2-blue)}
[data-hc="1"] .ed-ly-syl[data-h="R"] .ed-ly-su.cur{border-color:var(--cR)}
[data-hc="1"] .ed-ly-syl[data-h="L"] .ed-ly-su.cur{border-color:var(--cL)}
.ed-ly-su.open{background:var(--press)}
.ed-ly-sl{line-height:2.25rem}
.ed-ly-sb{width:1.375rem;height:2.25rem;position:relative;color:var(--ink-3)}
.ed-ly-sb::before{content:'+';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.8125rem;opacity:.55}
.ed-ly-sb::after{content:'';position:absolute;left:-2px;right:-2px;top:-4px;bottom:-4px}
.ed-ly-sb:hover::before,.ed-ly-sb:active::before{opacity:1}
.ed-ly-se{height:2.25rem;width:1rem}
.ed-ly-sg{height:2.25rem;width:1.125rem;margin:0}
.ed-ly-su.open .ed-ly-sg::after{opacity:.6;background:var(--e2-blue);width:2px;margin-left:-1px}
.ed-ly-sylc[hidden]{display:none}
.ed-ly-sylc.over{font-weight:500}
@media (hover:none){.ed-ly-sb:hover,.ed-ly-sg:hover,.ed-ly-se:hover{background:none;color:inherit}.ed-ly-sb:hover::before{opacity:.55}}
/* 第 387 版：Aa 顯示面板的組分隔線 */
.ed-vw .ed-vw-sep,.ed-mrows .ed-vw-sep{border:0;border-top:1px solid var(--line);margin:var(--s2) 0;height:0}
.ed-mrows .ed-vw-sep:last-child{display:none}
