/* styles.css —— MoonSinger 试验页样式。created 2026-10-06 by Claude Opus 5.5
   家族外壳规矩：页面本身永不滚动（html/body overflow hidden），只有谱面板内部滚。
   z band：menu 300 / sheet 500 / err 900（z 数字只写在这里）。 */
@font-face { font-family: "Bravura"; src: url("./vendor/fonts/bravura/Bravura.woff2") format("woff2"); font-display: block; }
.smufl { font-family: "Bravura"; }   /* 所有 SMuFL 字形一律 Bravura（v0.10.31：乐器页力度表的字形漏了这一句 = 显示成方框，user「乱码了」）；各处只管字号 / 位置 */
:root {
  --bg: #f4f1ea;
  --panel: #ffffff;
  --ink: #2a2a2a;
  --muted: #8a8780;
  --line: #ddd9d0;
  --accent: #2b6cb0;
  --accent-soft: #e3edf9;
  --play: #e0702a;    /* 播放线 / 正在响的音（和光标的 --accent 分开；2026-10-10 user「线，和光标用不一样的颜色」） */
  --start: #2f8f5b;   /* 起点的小旗（⟲ 从这儿重放） */
  --ghost: #a9b4c2;
  --z-menu: 300;      /* 浮在 body 上的小菜单 / 滚轮 / 提示条：盖过歌库一屏和「即兴」叠上来的舞台（v0.9.43：滑窗的滚轮原来写死 40，即兴时压在下面点不出来） */
  --z-float: 30;      /* 谱面上浮着的小钮（1:1）：在谱之上、在任何一屏之下 */
  --z-overlay: 250;   /* 歌库一屏（在 menu 之下：图库包的卡片菜单 / 弹层用 --z-menu，要压在屏上面） */
  --z-window: 200;    /* 参考窗（@internal/reference-window 读这个名字）：谱 / pad 之上，歌库一屏和菜单之下（2026-10-08 深夜 v0.8） */
  --z-sheet: 500;
  --z-busy: 520;      /* busy 遮罩盖住 sheet（互斥护栏：交互 sheet 不许在 busy 里开） */
  --z-gate: 540;      /* 同步闸（冲突面）盖住一切、不可 dismiss */
  --z-err: 900;
  /* @internal/gallery 要宿主给的 token（包只用 var()） */
  --tile-min: 150px;
  --tile-min-narrow: 112px;
  --enc: #c98a00;
  --warn: #d99a20;
  --info: #4c8bf5;
  /* @internal/workbench-elements 要宿主给的 token（包只用 var()，值归宿主；同 CatsUp styles.css） */
  --bg-soft: #ece9e2;
  --ink-soft: #6b6b66;
  --shadow: 0 8px 28px rgba(0, 0, 0, .18);
  --danger: #b0412b;
  --z-popover: var(--z-menu);
  --z-modal: var(--z-sheet);
  --z-notice: 950;
  --z-toast: var(--z-notice);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif; font-size: 14px;
  touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }

/* 列宽 minmax(0, 1fr)：里面的内容（谱面 SVG 按上一次的宽度画的）不许把整页撑宽——转屏 / PWA 启动时会卡在宽的那次（2026-10-07 user 截图「pwa的时候好像宽度超了」）；
   border-box：安全区的内边距算在 100% 里面（PWA 全屏时不再多出一截） */
#app { height: calc(100% - var(--kb-offset, 0px)); box-sizing: border-box;   /* --kb-offset = iOS 软键盘占掉的高度（main.ts visualViewport）：整个 app 缩到键盘上面，谱的最底下才滚得到 */ display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); }

/* 顶栏 */
/* 顶栏只有一行（2026-10-07）：左 = 文件钮 + 文件名，中 = 走带条（居中），右 = 键盘 + 扳手；文件名太长省略号 */
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; white-space: nowrap; }
.bar { position: relative; }   /* 渲染进度条贴在顶栏底边（2026-10-08 深夜） */
.render-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; overflow: hidden; }
.render-bar .rb-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); transition: width .2s; }
.render-bar .rb-cur { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--accent-soft) 6px 12px); background-size: 17px 100%; animation: rb-stripe .6s linear infinite; opacity: .8; }
.render-bar .rb-cur.known { animation: none; background: var(--accent-soft); }
@keyframes rb-stripe { to { background-position: 17px 0; } }
@media (prefers-reduced-motion: reduce) { .render-bar .rb-cur { animation: none; } }
.bar .tb-left { display: flex; align-items: center; min-width: 0; }
.bar .tb-mid { display: flex; align-items: center; gap: 6px; }
.bar .tb-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.bar .tb-file { min-width: 0; max-width: 100%; gap: 6px; justify-content: flex-start; }
.bar .tb-file .title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* toast 栈：谱那一块的底边居中（v0.10.23：原来顶栏下面，长的报错压住挂签 / 混音台顶条）；位置由 main.ts 量谱的那一块填进 --notice-bottom / --notice-x（竖屏 = 键盘上面，不盖键）。对话框开着 = 库挪到顶上 */
.notice-stack { top: auto; bottom: var(--notice-bottom, max(env(safe-area-inset-bottom, 0px), 20px)); left: var(--notice-x, 50%); }
.notice-stack.docked-top { top: calc(var(--safe-top) + 54px); bottom: auto; left: 50%; }
/* 歌手牌：第一行谱号左边的声部名 */
.staff-svg .part-name { fill: var(--ink); font-weight: 600; cursor: pointer; }
.staff-svg .part-name.empty { fill: var(--muted); font-weight: 400; }
.bar .title { font-weight: 600; letter-spacing: .02em; }
.bar .ver { color: var(--muted); font-size: 12px; }
.bar .spacer { flex: 1; }
.bar .field { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.bar select, .bar input { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 6px; color: var(--ink); font-size: 13px; }
.bar input[type=number] { width: 64px; }
.btn { height: 34px; min-width: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
@media (hover: hover) { .btn:hover { background: #f7f6f2; } }   /* 只给真的会悬停的（鼠标）：iPad 点过的钮会一直粘着 hover 变灰（user「点了之后按下的灰色没有自动消失」；同 gallery 0.6.3） */
.btn.is-on { background: var(--accent-soft); border-color: #b8cde8; color: var(--accent); }
.btn:disabled { opacity: .35; cursor: default; }
.pad-tools .btn:disabled, .pad-head .btn:disabled { pointer-events: none; }   /* 符号层开着时写音那一层的键 / 旋钮：灰掉也按不动（2026-10-08 Opus 5.5） */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* 舞台：谱面板（内部滚）+ pad 面板 */
/* 舞台 = 命名区域的 grid，不是 flex 流（user 2026-10-07「keyboard不应该用flex，这是一个很固定的有着很严密逻辑的东西」）：
   谱区 / 找人视图都占 main，pad 永远占 pad；节点顺序随便，位置由这里钉死。横屏 main | pad，竖屏 main 上 pad 下；pad 收起 = 那一列 / 行消失。 */
#stage { min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); grid-template-areas: "main pad"; }
#stage[data-dock="none"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }   /* 底座空着（收起 / 词 / 听）：谱占满 */
.score, .finder, .inst-page { grid-area: main; }
.studio { grid-area: pad; }   /* 录音室在底座里（键盘那个位子，和键盘互斥；2026-10-10） */
.pad-panel { grid-area: pad; }
.score { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; outline: none; background: var(--panel);
  -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.score svg { display: block; }
.pad-panel { min-width: 0; min-height: 0; border-left: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; padding: 10px; gap: 8px; }   /* 宽度由 #stage 的 grid 列定 */

.err-banner { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-bottom)); z-index: var(--z-err); background: #c0392b; color: #fff;
  padding: 10px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }

/* 状态行 */
.status { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 40vw; }

/* 五线谱（颜色与 src/render/svg.ts 的 STANDALONE_CSS 同义） */
.staff-svg line { stroke: var(--ink); stroke-linecap: butt; }
.staff-svg text { fill: var(--ink); }
.staff-svg path { fill: var(--ink); }
.staff-svg line.staff { stroke: #666; }
.staff-svg path.tie { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.staff-svg path.slur { fill: none; stroke: var(--ink); stroke-width: 1.3; }   /* 连线（2026-10-08 连断） */
.staff-svg path.hairpin { fill: none; stroke: var(--ink); stroke-width: 1.1; }   /* 渐强渐弱（2026-10-08） */
.staff-svg path.hairpin.art-mute { stroke: var(--muted); opacity: .5; }
.staff-svg text.note.in-span { fill: var(--accent); }   /* 点开的记号管的那几个音 */   /* 渐到：虚线发夹（从上一个力度字起；手写的是实线）——2026-10-08 Opus 5.5 */
.staff-svg text.tempo-change { fill: var(--accent); font-weight: 700; }   /* 这一段开头的速度和上一段不一样：↑ 快了 / ↓ 慢了（2026-10-08 Opus 5.5；user「不要grey out，而是有变化的时候会标一个东西提示用户」） */
.staff-svg text.dyn-word { font-style: italic; font-family: "Times New Roman", Georgia, serif; }   /* 太长的渐强渐弱写成「cresc. - - -」（2026-10-08 Opus 5.5） */
.staff-svg path.slur.art-mute { fill: none; stroke: var(--muted); opacity: .5; }
.staff-svg .ghost { fill: var(--ghost); stroke: var(--ghost); }
.staff-svg path.tie.ghost { fill: none; }
.staff-svg .cur { fill: var(--accent); stroke: var(--accent); }
.staff-svg path.tie.cur { fill: none; }
.staff-svg line.caret { stroke: var(--accent); }
.staff-svg line.playhead { stroke: var(--accent); stroke-width: 2px; opacity: 0.55; pointer-events: none; }   /* 播放头（实时试听的「谱上跟着亮」；src/ui/score-view.ts setPlayhead） */
.staff-svg rect.warn { fill: #d9a23a; }
.staff-svg text.lyric { font-family: system-ui, "Hiragino Sans", "PingFang SC", "Noto Sans CJK JP", sans-serif; }
/* 选中 = 底下那条淡蓝带子（rect.selbox）就够了，音不涂蓝（user 2026-10-08「选区画成一条淡蓝的带子盖住那几个音（不是把音涂蓝）」） */
.staff-svg .sel { }
.staff-svg rect.selbox { fill: var(--accent-soft); opacity: .8; }
.staff-svg path.tuplet-bracket { fill: none; stroke: var(--ink); stroke-width: 1; }
/* 谱面板：svg 一层 + 歌词输入框一层（就地写歌词，不随重画消失） */
.score { position: relative; }
.score .sheet { position: relative; }
.sheet-ink { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: visible; }   /* 歌词框 / 记号框的容器（分页时挪到版心） */
.score.pages .sheet { background: transparent; box-shadow: none; }   /* 分页：页框自己画，桌面当背景 */
.lyric-input { position: absolute; z-index: 5; height: 2em; min-width: 3em; border: 1px solid #b8cde8; border-radius: 6px; background: #fff;
  text-align: center; padding: 0 4px; font: inherit; -webkit-user-select: text; user-select: text; outline: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.score { cursor: default; touch-action: none; }

/* pad（MEDO 音符模式）：工具键在上（像拼音候选条），音键网格 = 列 × 行（全是音，0 在工具条）。
   键高 / 键缝照 WXHW 量的 iOS 键盘：平板（iPad mini）键高 55.5、上下缝 9；手机（iPhone）46、6；左右缝 5；圆角 7（pad.ts KEY_METRIC 同一组数） */
.pad-panel { --key-h: 46px; --kgv: 6px; --kg: 5px; --knob: 44px; }   /* --knob = 「⋯」和 ← → 的方块边长、头两排的高（固定，不跟屏幕宽，好记肌肉记忆） */
.pad-panel[data-form="tablet"] { --key-h: 55.5px; --kgv: 9px; }
.pad-tools { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.pad-tools .btn { padding: 0; min-width: 0; height: 40px; font-size: 16px; }
.pad-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); grid-auto-rows: var(--key-h); column-gap: var(--kg); row-gap: var(--kgv); }
.pad-key { border: 0; border-radius: 7px; background: #fff; box-shadow: 0 1px 0 rgba(42, 42, 42, .28); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; touch-action: none; padding: 0; min-width: 0; }
.pad-key .deg { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 21px; font-weight: 600; line-height: 1; }
.pad-panel[data-form="tablet"] .pad-key .deg { font-size: 23px; gap: 3px; }
/* 简谱八度点：真的小圆点，上方 = 高八度、下方 = 低八度，多个横排（占位固定高，有没有点数字都不跳） */
.pad-key .jp-dots { display: flex; gap: 2px; height: 4px; }
.pad-key .jp-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pad-panel[data-form="tablet"] .pad-key .jp-dots { height: 5px; gap: 3px; }
.pad-panel[data-form="tablet"] .pad-key .jp-dots i { width: 5px; height: 5px; }
.pad-key .abs { font-size: 10px; color: var(--muted); }
.pad-key.hit, .pad-key.down { background: var(--accent-soft); }

/* 竖屏（iPad mini 竖着拿）：像 iPad 软键盘贴底——全宽，不是正方形；键高按手指定 */
@media (max-aspect-ratio: 1/1) {
  #stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "main" "pad"; }
  #stage[data-dock="none"] { grid-template-rows: minmax(0, 1fr); grid-template-areas: "main"; }
  .studio { max-height: 46vh; border-left: 0 !important; border-top: 1px solid var(--line); }
  .pad-panel { border-left: 0; border-top: 1px solid var(--line); padding: 6px 8px 8px; gap: 6px; }
  .pad-tools .btn { height: 44px; }
}


/* UX-2 工具条：候选、Shift 状态、时值字形、即兴 */
.bar select.mini { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 4px; color: var(--muted); font-size: 12px; max-width: 8.5em; }
.pad-tools.cands { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
.pad-tools .btn.once { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
/* 挂着 ♯ / ♭：音键的升降号字醒目、键带一点底色 */
.pad-key .acc { color: var(--accent); font-size: .8em; margin-right: 1px; }
.pad-grid.acc-armed .pad-key { background: #f4f8fd; }
.pad-tools .btn.lock { background: var(--accent); border-color: var(--accent); color: #fff; }
.pad-tools .btn.manual { color: var(--accent); }
.pad-tools .t-unit { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink); }
.pad-tools .t-unit .smufl { font-family: "Bravura"; font-size: 30px; line-height: 1; position: relative; top: 8px; }
.pad-tools .t-unit sup { font-size: 10px; color: var(--accent); }
.pad-tools .btn.cand { font-size: 13px; }
/* 横屏侧栏 300 宽：工具条折成两行 */
@media (min-aspect-ratio: 1/1) { #stage { grid-template-columns: minmax(0, 1fr) 340px; } .pad-tools .btn { height: 36px; font-size: 15px; } }

/* 「好了」面板（导出歌声后：分享 / 下载 / 关；应用内，不用系统弹窗） */
.offer { position: fixed; inset: 0; z-index: var(--z-sheet); display: flex; align-items: center; justify-content: center; background: rgba(40, 38, 34, .28); padding: 16px; }
.offer-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; width: min(360px, 100%); box-shadow: 0 8px 28px rgba(0, 0, 0, .14); }
.offer-title { font-weight: 600; margin-bottom: 6px; }
.offer-msg { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.offer-btns { display: flex; gap: 8px; justify-content: flex-end; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 记号框（点谱上的调号 / 拍号 / 速度）：文本框 + 一排候选 */
.mark-ed { position: absolute; z-index: 6; background: var(--panel); border: 1px solid #b8cde8; border-radius: 10px; padding: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: 8px; }
.mark-in { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 15px; -webkit-user-select: text; user-select: text; outline: none; }
.mark-in:focus { border-color: #b8cde8; }
.mark-cands { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mark-cands.tempo { grid-template-columns: repeat(2, 1fr); }
.mark-cands .btn { height: 36px; padding: 0 4px; font-size: 14px; min-width: 0; }
.mark-cands.tempo .btn { height: 40px; flex-direction: column; gap: 0; line-height: 1.15; }
.mark-cands.tempo .btn b { font-weight: 600; font-size: 13px; }
.mark-cands.tempo .btn small { font-size: 11px; color: var(--muted); }
.mark-cands .btn.is-on { background: var(--accent-soft); border-color: #b8cde8; color: var(--accent); }
.mark-cands .btn.danger { color: #b0412b; }
.staff-svg text.tempo-word { font-weight: 600; font-family: system-ui, sans-serif; }
.staff-svg text.tempo-num, .staff-svg text.key-label { font-family: system-ui, sans-serif; }

/* 框选（笔 / 鼠标在谱面空白处拖） */
.marquee { position: absolute; z-index: 4; border: 1px dashed var(--accent); background: rgba(43, 108, 176, .08); border-radius: 3px; pointer-events: none; }

/* 速度框：节拍器（摆到一头 = 一拍）+ 确定（user「选速度的时候能不能有一个文本框旁边的节拍器动画让你参考，然后有一个确认按钮才commit」） */
.mark-row { display: flex; align-items: center; gap: 8px; }
.mark-row .mark-in { flex: 1; min-width: 0; }
.metro { position: relative; width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.metro-arm { position: absolute; left: calc(50% - 1px); bottom: 4px; width: 2px; height: 24px; background: var(--accent); border-radius: 1px;
  transform-origin: 50% 100%; transform: rotate(-32deg); }   /* 摆是 JS 算的（src/ui/metronome.ts 自激的摆，W-12）；这里只是初始位置 */
.metro-arm::before { content: ""; position: absolute; left: -3px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mark-ok { flex: none; }
/* 速度滚轮（候选左边；user「速度输入框能不能也做成这种能dial的」）：滚轮本体同 .drum-col，中间那格 = 试听值 */
.mark-body { display: flex; align-items: center; gap: 8px; }
.mark-body .mark-cands { flex: 1; min-width: 0; }
.tempo-wheel { position: relative; flex: none; width: 64px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.tempo-wheel[hidden] { display: none; }
.tempo-wheel::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 40px; transform: translateY(-50%); background: var(--accent-soft); pointer-events: none; }
.tempo-wheel .drum-item { font-size: 18px; font-variant-numeric: tabular-nums; }

/* 设置面板：模型来源 / 导入模型包 / 月读的署名与条款 */
.settings-card { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.set-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.set-field input { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 14px; color: var(--ink); -webkit-user-select: text; user-select: text; }
.set-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.set-packs { font-size: 11px; color: var(--muted); white-space: pre-wrap; margin: 0 0 10px; }
.set-credit { margin-bottom: 12px; font-size: 13px; }
.cal-row { align-items: center; }   /* 歌手牌：响度校准 */
.cal-row .cal-note { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.credits-box { margin: 8px 0; }   /* 署名推演（文件菜单 / 导出好了的面板） */
.credits-pre { white-space: pre-wrap; font: inherit; font-size: 12px; max-height: 9em; overflow: auto; margin: 4px 0; padding: 6px 8px; background: var(--bg-soft); border-radius: 6px; -webkit-user-select: text; user-select: text; }
.set-credit pre { white-space: pre-wrap; font: inherit; font-size: 12px; -webkit-user-select: text; user-select: text; }

/* 有新版本（PWA 壳，2026-10-07）：顶上一条，不挡谱 */
.update-bar { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 6px); left: 50%; transform: translateX(-50%); z-index: var(--z-menu); display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 14px; box-shadow: 0 4px 16px rgba(0,0,0,.12); font-size: 14px; }
.set-app { align-items: center; }
.set-ver { color: #777; font-size: 12px; margin-right: auto; }
/* 报错条（替补顶上等）：在「有新版本」那条下面，字可以折行，原因不截断 */
.notice-err { top: calc(env(safe-area-inset-top, 0px) + 54px); max-width: calc(100vw - 32px); border-color: #e5a29b; color: #8a1c12; }
.notice-err .notice-text { white-space: normal; }
/* 文件菜单（无地逃生口） */
.file-row { flex-wrap: wrap; }
.file-row .btn { display: inline-flex; align-items: center; gap: 6px; }
#docTitle { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 纸面最上面的歌名（不填也行；点了就地改） */
.staff-svg .song-title { fill: var(--ink); font-weight: 600; }
.staff-svg .song-title.empty { fill: #b9b2a5; font-weight: 400; }   /* 歌名 / 作者空着：浅色短提示（只在编辑器里画） */
.staff-svg .part-name.focus { fill: var(--accent); }                 /* 光标所在的声部 */
.staff-svg .paper-name { fill: var(--ink); font-weight: 600; }        /* 曲段名（纸顶一条） */
.staff-svg .paper-name.empty { fill: #b9b2a5; font-weight: 400; }
.staff-svg .paper-chip-text { fill: var(--muted); font-weight: 600; }
.staff-svg .part-badge { fill: var(--accent); font-weight: 600; }       /* 名字下面的角标：静音 / 独奏 / 只看它 */
.staff-svg .part-stub { fill: #b9b2a5; }                                   /* 隐藏的声部缩成的细行 */
.staff-svg .part-stub-line { stroke: #ddd6c8; }
.staff-svg path.brace { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }   /* 大谱表花括号 */
.staff-svg path.family-bracket { fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linejoin: miter; cursor: pointer; }   /* 合租展开着的一家（v0.10.29）：括在一起；点它 = 叠回去。灰一点（是编辑器的提示，不印——导出不画，见 svg.ts） */
.staff-svg rect.paper-chip.off { opacity: .35; }                           /* ‹ › 到头了 */
.staff-svg rect.paper-chip.on { fill: var(--accent-soft); stroke: var(--accent); }   /* 「本段 | 全部」亮的那个 */
.staff-svg .nav-text.on { fill: var(--accent); font-weight: 600; }
.staff-svg .nav-text { cursor: pointer; }
.staff-svg .nav-text { fill: var(--muted); font-variant-numeric: tabular-nums; }
.paper-row { align-items: center; justify-content: space-between; }
.paper-row-name { font-size: 14px; }
.title-input.paper { text-align: left; font-weight: 600; }
.title-input.arr { text-align: left; font-weight: 400; }   /* 编排那一行（2026-10-08 深夜） */
.staff-svg text.arr-label { fill: var(--muted); }
.staff-svg text.arr-empty { fill: var(--muted); opacity: .6; }
.staff-svg text.arr-issue { fill: var(--muted); font-style: italic; }
.staff-svg .credits.empty { fill: var(--muted); opacity: .7; }
.title-input { position: absolute; z-index: 5; box-sizing: border-box; text-align: center; font-weight: 600; border: 1px solid var(--accent); border-radius: 7px; background: #fff; color: var(--ink); padding: 0 8px; }
/* pad = 独立的 MEDO 式输入设备（2026-10-07 晚）：最上面 1= / 长短 / 音域分宽度 +「⋯」方块（按住原地滚、点开滚轮）；写字键 ← → 同样大小的方块，0 | — ⌫ 分剩下的宽；音键占满整宽 */
.pad-tools.knobs { grid-template-columns: repeat(3, minmax(0, 1fr)) var(--knob) var(--knob) var(--knob) var(--knob); }   /* v0.10.37 又加「符 / 音」切换键 = 再加一列（同一个坑：漏加 = 「⋯」掉到第二排） */   /* 1= / 长短 / 音域 分宽度；弹、收起、⋯ = 方块（2026-10-08 Opus：加「弹」时漏加一列，「⋯」被挤到第二排） */
.pad-tools .btn.hide-pad { height: var(--knob); font-size: 13px; color: var(--muted); padding: 0; }
.pad-tools .btn.impro-pad { height: var(--knob); font-size: 15px; font-weight: 600; padding: 0; }
.pad-tools .btn.kb-switch { height: var(--knob); font-size: 15px; font-weight: 600; padding: 0; color: var(--accent); }   /* 音键 ↔ 符号格（v0.10.37；两面同一个位置） */
.pad-tools .btn.sym-tab { height: var(--knob); font-size: 14px; padding: 0 4px; }   /* 符号层的三页标签（占 1= / 长短 / 音域 的位置；亮 = 现在这页） */   /* 弹（只响不写）：收起左边 */
.pad-panel.is-locked .pad-tools .btn.impro-pad { pointer-events: none; }   /* 找人视图里一直是弹 */
/* 写字键：← → 方块；0 | 升降 /2 — ⌫ 分剩下的宽。pad 窄了依次让位（user「太窄的时候这几个功能怎么办…0和-是必须要的|一般一首歌至少要一次，
   /2可以用时长平替，#b可能一辈子也用不上」）：先藏升降（单个音照样能在音键上上下滑升降）；/2 一直留着（2026-10-08 user「/2 一直留着」——
   窄 pad = iPad 横屏 / 电脑侧栏，原来那里根本点不到 /2，也就打不出附点拉长） */
.pad-panel { container-type: inline-size; }
.pad-tools.writes { display: flex; gap: 4px; }
.pad-tools.writes .btn { flex: 1 1 0; min-width: 0; }
.pad-tools.writes .btn[data-caret] { flex: 0 0 var(--knob); }
@container (max-width: 440px) { .pad-tools.writes .btn.accshift { display: none; } .pad-tools.writes .btn[data-caret] { flex: 1 1 0; } }   /* 窄的时候 8 颗一样宽（user 2026-10-08「make those 8 buttons evenly spaced out for that thin width」；宽的时候 ← → 照旧是方块） */
.pad-tools .btn.accshift { touch-action: none; }
.pad-tools .btn.breath .smufl { font-family: "Bravura"; font-size: 30px; line-height: 1; display: inline-block; height: 16px; position: relative; top: -4px; }   /* 写音那一排的呼吸（Bravura 的逗号本来就小） */
.pad-tools .btn.accshift .smufl { font-family: "Bravura"; font-size: 22px; line-height: 1; display: inline-block; height: 16px; position: relative; top: -2px; }
.pad-tools.writes .btn { height: var(--knob); }
.pad-tools .btn.knob { position: relative; touch-action: none; gap: 2px; height: var(--knob); }
.knob .kl { display: inline-flex; align-items: baseline; gap: 4px; }
.knob .kl small { font-size: 11px; color: var(--muted); }
.knob .kl .smufl { font-family: "Bravura"; font-size: 28px; line-height: 1; position: relative; top: 7px; }
.knob .kl sup { font-size: 10px; color: var(--accent); }
.knob .kh { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--muted); opacity: .8; }
.knob.k-range .kl { font-size: 15px; }
.knob.tight .kh { display: none; }   /* pad.ts TIGHT：音域字和 ⇅ 挤在一起时不画 ⇅ */
/* 音域旋钮太窄：两行，下面是低的那头（滚轮里同样） */
.rg { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 12px; }
.drum-item .rg { font-size: 13px; }
.pad-tools.cands .btn.cand small { display: block; font-size: 10px; color: var(--muted); }
.pad-tools.cands .btn.cand .smufl { font-family: "Bravura"; font-size: 26px; line-height: 1; position: relative; top: 6px; }
.pad-key { touch-action: none; }
/* 月读音域里的键：底部一道细条（正面提示；音域外的键就是普通的键，不变灰——user「灰色…容易以为是unavailable，而不是not hinted」） */
.pad-key.hint { box-shadow: inset 0 -3px 0 #e3cf9c, 0 1px 0 rgba(42, 42, 42, .28); }
.pad-key.swiping { background: var(--accent-soft); }
.pad-key.swiping .acc { font-weight: 700; }
/* 竖直滚轮（点开 pad 的旋钮；src/ui/drum.ts）：中间那格 = 选中 */
.drum { position: fixed; z-index: var(--z-menu); display: flex; gap: 2px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 8px 28px rgba(0,0,0,.18); overflow: hidden; }   /* 描边不占地方：滚轮和旋钮一样宽 */
.drum::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); background: var(--accent-soft); pointer-events: none; }
/* 原生滚动 + 吸附（user「拖动的物理也很难受，能不能换成标准的」）：手感 = 系统里别的列表 */
.drum-col { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; }
.drum-col::-webkit-scrollbar { display: none; }
.drum-col + .drum-col { border-left: 1px solid var(--line); }
.drum-item { height: 44px; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; color: var(--ink); white-space: nowrap; }
.drum-item.on { color: var(--accent); font-weight: 600; }
.drum-item small { font-size: 11px; color: var(--muted); font-weight: 400; }
.drum-item .smufl { font-family: "Bravura"; font-size: 26px; line-height: 1; position: relative; top: 6px; }
/* 连音的样子 = 真画一组小蝌蚪（pad.ts tupletMark，跟着长短基线变）；太窄就整组等比缩小 */
.tupsvg { max-width: 100%; fill: none; stroke: currentColor; stroke-width: .9; }
.tupsvg .fi, .tupsvg rect, .tupsvg text { fill: currentColor; stroke: none; }
.tupsvg .ho { stroke-width: 1; }
.tupsvg text { font-family: "Bravura"; font-size: 15px; }
/* 旋钮原地滚 = 汽车里程表：旋钮变成一扇窗，滚轮藏在后面，窗里只露一格（上下边一道内阴影 = 窗沿） */
.pad-tools .btn.knob.rolling { overflow: hidden; background: #fff; border-color: var(--accent);
  box-shadow: inset 0 8px 7px -7px rgba(0, 0, 0, .3), inset 0 -8px 7px -7px rgba(0, 0, 0, .3); }
.knob.rolling > .kl { visibility: hidden; }
.kroll { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; will-change: transform; }
.kroll-i { display: flex; align-items: center; justify-content: center; white-space: nowrap; color: var(--ink); }
.kroll-i .smufl { font-family: "Bravura"; font-size: 28px; line-height: 1; position: relative; top: 7px; }
.drum-item .plain { font-size: 13px; }
/* 「1=」旋钮：调 + 调式名（小字）；窄了分两行（pad.ts STACK）。调式滚轮：名字 + 从主音起的音级（羽调式 = 6 1 2 3 5） */
.knob.k-key .kl { align-items: baseline; gap: 6px; }
.knob.k-key.stack .kl { flex-direction: column; align-items: center; gap: 0; line-height: 1.15; }
.knob.k-key.stack .kl small { font-size: 10px; }
.kroll-i small { font-size: 11px; color: var(--muted); margin-left: 6px; }
.drum-item .sc { display: flex; flex-direction: column; align-items: center; line-height: 1.2; max-width: 100%; padding: 0 4px; }
.drum-item .sc b { font-weight: inherit; font-size: 15px; }
.drum-item .sc small { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* 「⋯」里的插记号：「+」+ 音乐符号（Bravura） */
.pad-tools.cands .btn.cand .plus { font-size: 13px; line-height: 1; color: var(--muted); margin-right: 5px; }   /* 「+」在符号左边，字号和颜色拉开（user「放在左上角太不显眼了，能不能放在符号左边，只是字号和颜色拉开差距」） */
.pad-tools.cands .btn.cand .mg { font-family: "Bravura"; font-size: 22px; line-height: 1; }
.pad-tools.cands .btn.cand .mg.met { font-size: 24px; position: relative; top: 3px; }
.pad-tools.cands .btn.cand .mg.ts { display: inline-flex; flex-direction: column; font-size: 20px; line-height: .5; }
.pad-tools.cands .btn.cand .eq { font-size: 14px; margin-left: 1px; }
/* 写字键 0 | —：符号下面一行小字（user「0 - | 三个承重的按钮还是有点谜语人」） */
.pad-tools.writes .btn.wk { flex-direction: column; gap: 1px; line-height: 1.05; }
.pad-tools.writes .btn.wk small { font-size: 10px; color: var(--muted); }
/* 「⋯」里：格子宽一点（可以多行），「自动小节线」一行写得下 */
.pad-tools.cands.m-more { grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); }
.pad-tools.cands.m-more .btn.cand { white-space: nowrap; }
@media (max-width: 420px) { .bar .tb-file svg { display: none; } .bar .tb-file { padding: 0 8px; } }   /* 手机：文件钮不画图标，多给文件名留地方 */
/* 纸（2026-10-07）：纸的版心放得下 = 纸居中、四周是桌面（同 WXHW 屏幕太宽时行宽有上限）；放不下（手机）= 纸铺满 */
.score.desk { background: var(--bg); }
.score.zoomed { overflow-x: auto; }                 /* 触屏捏合放大后能横着滚 */
/* 横卷（v0.9.35）：一行一直往右，谱面板横着滚；歌手名钉在屏幕左边（滚开了才露出来；只看不接点） */
.score.hscroll { overflow-x: auto; }
.pin-names { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .15s; }
.pin-names.is-on { opacity: 1; }
.pin-name { position: absolute; left: 4px; white-space: nowrap; font-size: 12px; line-height: 1.5; color: var(--ink-soft); background: color-mix(in srgb, var(--panel) 88%, transparent);
  border-radius: 4px; padding: 0 5px 0 4px; box-shadow: 0 0 0 1px var(--line); }
.pin-name::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--cat, var(--muted)); }
.score.zoomed.desk .sheet { margin: 0; }            /* 放大超出屏幕时不再居中（居中会让左边滚不到） */
.btn.zoom-reset { position: fixed; z-index: var(--z-float); height: 30px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.score.desk .sheet { margin: 0 auto; background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 2px 10px rgba(0, 0, 0, .08); min-height: 100%; }
.staff-svg .paper-chip { fill: var(--panel); stroke: var(--line); rx: 6px; cursor: pointer; }
.staff-svg .paper-chip-icon { color: var(--muted); cursor: pointer; }
.settings-card .btn.cand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.settings-card .btn.cand:has(small) { flex-direction: column; height: auto; padding: 6px 12px; gap: 2px; }
.pad-tools .btn.lock small { color: rgba(255, 255, 255, .85); }   /* /2 锁住时小字也看得见 */
/* 角色卡：按功能的下拉 + 谱上写的名字（可改） */
.inst-page .role-sel { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 8px; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.inst-page .role-name { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.inst-page .role-in { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; font-size: 15px; color: var(--ink); -webkit-user-select: text; user-select: text; }
.inst-page .role-sound { font-size: 11px; color: var(--muted); margin: -2px 0 6px; }
/* 作词 / 作曲：标题下面靠右 */
.staff-svg .credits { fill: var(--ink); cursor: pointer; }
/* 歌词框左边的「合」：这个字并进前一个音（回头改用） */
.lyric-merge { position: absolute; z-index: 5; min-width: 0; padding: 0; font-size: 15px; color: var(--accent); border-color: #b8cde8; background: #fff; box-sizing: border-box; }
.credits-card .credits-in { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink); resize: vertical; -webkit-user-select: text; user-select: text; }

/* 找人视图（src/ui/finder.ts）：全屏替掉谱区，pad 留着当试听键盘；按概念列，展开 = 谁能演 */
.finder { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }   /* 占 #stage 的 main 区（grid-area 在上面）*/
.finder[hidden] { display: none; }
.finder-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; }
.finder-title { font-weight: 600; white-space: nowrap; }
.finder-q { flex: 1; min-width: 80px; height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 14px; -webkit-user-select: text; user-select: text; }
.finder-sort { height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; max-width: 42%; }
/* 从歌库进的乐器目录（只弹着玩）：舞台整层盖到歌库上面（歌库 = --z-overlay 的整屏） */
body.finder-over-gallery #stage { position: fixed; inset: 0; z-index: calc(var(--z-overlay) + 1); background: var(--bg); padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); }
.finder-pad { flex: none; display: inline-flex; align-items: center; gap: 4px; }   /* 试听键盘开关（收起了也叫得回来） */
@media (max-width: 560px) { .finder-pad span, .finder-title { display: none; } }
.finder-hint { flex: none; padding: 6px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
/* 类级跳转：一组一项的下拉；滚动时跟着显示现在所在的组 */
.finder-jump { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--muted); }   /* 类级跳转 = 下拉（user「category选项能做成下拉而不是滑动吗」） */
.finder-jump[hidden] { display: none; }
.finder-jump-sel { flex: 1; min-width: 0; max-width: 420px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.finder-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 0 24px; }   /* 顶上不留内边距：组标题粘在顶上时和边对齐，不留一条透字的缝（user 2026-10-08「category条没对齐，有缝隙」） */
.finder-empty { padding: 24px; color: var(--muted); text-align: center; }
.finder-group-h { position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.inst-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.inst-row.is-open { background: var(--accent-soft); }
.inst-ico { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.inst-ico.none { border: 1px dashed var(--line); border-radius: 6px; font-size: 13px; color: var(--muted); }
.inst-name { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.inst-name b { font-weight: 600; font-size: 15px; }
.inst-name span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst-name .inst-w { font-size: 11px; color: var(--accent); margin-left: 6px; letter-spacing: 1px; }   /* 〇〇风里的承重 ★ */
.inst-name b .inst-preset { font-size: 13px; font-weight: 400; color: var(--ink); }   /* 按曲风：音色行的 GM 名（星级 / 入选按音色） */
.inst-name b .inst-as { display: inline-block; font-size: 10px; font-weight: 400; line-height: 1.5; border: 1px dashed var(--line); border-radius: 4px; padding: 0 4px; margin-left: 6px; color: var(--muted); vertical-align: 1px; }   /* 在这种风里顶替某个概念 */
.inst-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
/* 乐器目录多列（2026-10-09，user「挑乐曲界面到时候屏幕空间够的话做成多列的，好挑一点」→「我觉得可以三列」）：每格至少 260 px（手机一列、iPad 竖 / 横（右边有键盘）三列）；
   点开的「谁能演」横跨整行、落在那件乐器那一行下面（dense：同一行别的格子留在原地） */
.finder-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-flow: row dense; container-type: inline-size; }
/* 多列（目录宽 ≥ 两格）：格子窄，「年代 · 年份」挪到名字下面一行，名字占满这一格；中文名整体不拆行（「合成 / 器」）。user「我觉得可以三列」 */
.inst-name b .zh { white-space: nowrap; font-size: inherit; color: inherit; overflow: visible; }   /* 盖掉 .inst-name span（那条是给下面英日名那一行的小灰字） */
@container (min-width: 520px) {
  .finder-items > .inst-row { grid-template-columns: 36px minmax(0, 1fr); row-gap: 1px; align-content: center; }
  .finder-items > .inst-row > .inst-ico { grid-row: span 2; }
  .finder-items > .inst-row > .inst-meta { grid-column: 2; }
}
.finder-items > .inst-prov { grid-column: 1 / -1; }
@media (min-width: 680px) { .finder-items > .inst-row { border-right: 1px solid var(--line); } }
.inst-prov { padding: 4px 12px 10px 48px; background: var(--accent-soft); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.prov { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.prov.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.prov-l { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.prov-l b { font-weight: 600; font-size: 14px; }
.prov-l small { font-size: 11px; color: var(--muted); }
.prov-b { display: flex; gap: 6px; flex: none; }
.prov-b .btn { height: 30px; padding: 0 10px; font-size: 13px; }
.prov-none { font-size: 12px; color: var(--muted); padding: 4px; }
.cand-status { font-size: 12px; color: var(--muted); margin: -2px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cand-del { height: 28px; width: 28px; padding: 0; font-size: 13px; color: var(--muted); margin-left: -4px; }
/* 找人视图开着 = 试听台：pad 只许音键出声，写字那一排和「⋯」灰掉、不响应（宿主回调里还有第二道闸） */
.pad-panel.is-locked .pad-tools.writes .btn:not(.accshift), .pad-panel.is-locked [data-mark] { opacity: .3; pointer-events: none; }   /* 升降留着、「⋯」能开（里面的布局 / 行数 / 列数弹着玩要用）：只灰掉会碰谱的——写字键和插记号（user「...里面也许有一些需要的东西，特别是改变键盘大小」） */
/* 平替的提供者弱化：虚线框、灰字、「顶替」小标（本尊才是实线黑字） */
.prov.sub { border-style: dashed; background: transparent; }
.prov.sub .prov-l b { font-weight: 500; color: var(--muted); }
.prov.sub.is-on { border-color: var(--accent); }
.prov-tag { display: inline-block; font-size: 10px; line-height: 1.5; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 5px; color: var(--muted); vertical-align: 1px; }

/* 录音室（src/ui/studio.ts）：占 #stage 的 main 区；一个声部一条 */
.studio { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); overflow: hidden; }
.studio-strips { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 10px; align-content: start; }   /* 网格：撑不满一排的卡片也和别的一样宽（2026-10-10 user「录音房撑不满行宽的卡片应该也一样大，看着舒服」；原来 flex 换行、最后一排被拉宽） */
.strip { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); height: var(--card-h, 248px); overflow: hidden; }   /* 一样高 = 基础页那么高（v0.10.21） */
.strip-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; margin: 0 -4px; padding: 0 4px; }   /* 放不下 = 卡片里自己滚 */
/* 混音台全屏（v0.10.21）：铺满整个舞台、卡片排成好几列 */
.studio.full { grid-area: 1 / 1 / -1 / -1; position: absolute; inset: 0; z-index: 46; border-left: 0; max-height: none !important; }   /* 全屏：竖屏的半屏上限不算（v0.10.38；user「混音台全屏有bug，下面谱子露出来了，可能高度没有适配」） */
.strip-name { font-weight: 600; }
.strip-head { display: flex; align-items: center; gap: 6px; min-width: 0; }   /* 歌手卡顶上：名字 + 静 / 独（v0.10.34） */
.strip-head .strip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-ms { margin-left: auto; display: flex; gap: 3px; flex: none; }
.strip .strip-ms .btn { height: 22px; min-width: 24px; padding: 0 5px; font-size: 12px; border-radius: 6px; }
.strip .strip-ms .btn.mute { background: color-mix(in srgb, var(--danger) 15%, var(--panel)); border-color: var(--danger); color: var(--danger); }
.strip .strip-ms .btn.solo { background: color-mix(in srgb, var(--accent) 15%, var(--panel)); border-color: var(--accent); color: var(--accent); }
.strip-who { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-row { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
.strip-row output { color: var(--ink); font-variant-numeric: tabular-nums; }
.strip-row input[type="range"] { width: 100%; }
.strip-btns { display: flex; gap: 6px; }
.strip-refs { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strip.master { border-color: var(--accent); }   /* 总轨（2026-10-10 刀 3） */
.strip .meter-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.strip .meter-fill { height: 100%; width: 0; background: var(--accent); transition: width 60ms linear; }
.strip .meter-fill.hot { background: #d33; }
/* 插件格（v0.10.8）：每条轨一排小钮（默认 EQ 在最前）+「＋」；点一格 = 混音台顶上展开它的面板（一键 / 全量） */
.strip-fx { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; position: relative; }
.strip-fx .fx-chip { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-fx .fx-chip.is-on { border-color: var(--accent); color: var(--accent); }
.strip-fx .fx-chip.off { color: var(--muted); text-decoration: line-through; }
.strip-fx .fx-add { height: 26px; min-width: 26px; padding: 0 6px; border-radius: 13px; font-size: 14px; }
.strip-fx .fx-add-menu { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }
.fx-panel { border-bottom: 1px solid var(--line); background: var(--bg); padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 8px; max-height: 55%; overflow: auto; flex: none; }
.fx-panel[hidden] { display: none; }
.fx-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-head .fx-title { font-weight: 600; margin-right: auto; }
.fx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fx-seg .btn { border: 0; border-radius: 0; height: 28px; padding: 0 10px; background: transparent; }
.fx-seg .btn + .btn { border-left: 1px solid var(--line); }
.fx-seg .btn.is-on { background: var(--accent); color: #fff; }
.fx-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; }
.fx-row { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.fx-row output { color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-row input[type="range"] { width: 100%; }
.fx-row select { height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; }
.fx-row .btn { align-self: flex-start; }
.fx-note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.fx-dim { color: var(--muted); }
/* 路由轨（v0.10.9）：混音轨卡片 + 出到 / 发送 + 「＋ 混音轨」 */
.strip select { height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; min-width: 0; }
.strip-send { display: flex; align-items: flex-end; gap: 4px; }
.strip-send .strip-row { flex: 1; min-width: 0; }
.strip-send .btn { height: 26px; min-width: 26px; padding: 0 6px; }
.strip .send-add { color: var(--muted); }
.strip.bus { border-style: dashed; }
.strip .bus-name { font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); padding: 2px 4px; margin: -2px -4px; min-width: 0; }
.strip .bus-name:hover, .strip .bus-name:focus { border-color: var(--line); background: var(--panel); }
.strip.add-bus { justify-content: center; align-items: center; color: var(--muted); border-style: dashed; cursor: pointer; font: inherit; min-height: 80px; }
.strip.add-bus:hover { color: var(--accent); border-color: var(--accent); }
/* 混音台分页（v0.10.10）：页签一行 + 一键 / 全量下拉 + 「⋯」；每张卡片顶上一条峰值细线；EQ / 压缩页卡片上摊开那一格的控件 */
.mix-tabbar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mix-tabbar .mix-tabs .btn { padding: 0 10px; }
.mix-tabbar .mix-mode { height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.mix-tabbar .mix-more { margin-left: auto; height: 28px; min-width: 32px; }
.mix-menu { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mix-menu[hidden] { display: none; }
.strip { position: relative; }
.strip-meter { position: absolute; left: 10px; right: 10px; top: 4px; height: 6px; overflow: hidden; border-radius: 3px; pointer-events: none; background: color-mix(in srgb, var(--ink) 7%, transparent); }   /* 电平条（v0.10.38：每一页每张卡都有、粗一点——user「任何模式的所有卡上面应该都有那个音量的调，这样我知道谁在动」）：淡底槽 */
.strip-meter > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); }   /* 峰值：淡的 */
.strip-meter > b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }   /* 平均（RMS）：实心 = 耳朵觉得的响 */
.strip-meter > i.hot, .strip-meter.hot > b { background: #d33; }
.strip { padding-top: 14px; }   /* 给电平条让出地方 */
/* 窄屏（iPad mini 竖屏 744）：每页一排都放得下三张卡——字小一号、钮矮一点、间距抠一点（v0.10.26，user「能稍微抠一点让ipadmini竖屏显示三张混音卡吗。整体放小字号？」） */
@media (max-width: 820px) {
  .studio-strips { gap: 8px; padding: 8px; }
  .studio-strips { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .strip { padding: 8px; gap: 4px; font-size: 13px; }
  .strip-body { gap: 4px; }
  .strip-row, .strip-who { font-size: 11px; }
  .strip .btn { height: 26px; min-width: 26px; padding: 0 7px; font-size: 12px; }
  .strip .fx-seg .btn { padding: 0 6px; }
  .strip select { height: 26px; font-size: 12px; }
}
.fx-inline { display: flex; flex-direction: column; gap: 6px; }
.fx-inline.off .fx-body { opacity: .5; }
.fx-inline-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-inline .fx-body { grid-template-columns: 1fr; }
/* 参数的小方块问号（v0.10.10）：点了这一行下面展开说明（iPad 没有悬停） */
.row-lab { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.row-lab .q { width: 16px; height: 16px; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--muted); font-size: 11px; line-height: 14px; cursor: pointer; }
.row-lab .q:hover { color: var(--accent); border-color: var(--accent); }
.row-help { display: none; font-size: 12px; color: var(--muted); line-height: 1.45; padding: 2px 0 4px; }
.show-help .row-help { display: block; }
.show-help .row-lab .q { background: var(--accent); color: #fff; border-color: var(--accent); }
/* EQ 页卡片背景（v0.10.11）：频谱填充面 + 这一格 EQ 的响应曲线；只画不接点 */
.strip-spec { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 10px; overflow: hidden; }
/* 示波器统一的规矩（v0.10.21；user「李萨如的浓度再低调一点，不要蓝色，就是像背景一样，然后别的示波器也用一样的标准做」）：量出来的东西 = 墨色、很淡（像背景）；格线 / 刻度更淡；
   EQ 曲线不是量出来的、是你在调的那一样 = 照旧主题色 */
:root { --scope-data: .05; --scope-line: .13; --scope-grid: .08; }   /* v0.10.25：再嵌进背景一点（user「应该像无光照浮雕那样，蛮淡的」） */
.strip-spec .spec { fill: var(--ink); opacity: var(--scope-data); }
.strip-spec .eqc { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .7; vector-effect: non-scaling-stroke; }
.strip-spec .grid { stroke: var(--muted); stroke-width: 1; opacity: var(--scope-grid); vector-effect: non-scaling-stroke; fill: none; }
.spec-ticks { position: absolute; left: 0; right: 0; bottom: 2px; height: 12px; pointer-events: none; }
.spec-ticks span { position: absolute; transform: translateX(-50%); font-size: 9px; line-height: 12px; color: var(--muted); opacity: .8; }
/* 基础页总轨 / 混音轨的李萨如图（v0.10.16）：卡片背景，正方形居中 */
.strip-gonio { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 10px; overflow: hidden; }
.strip-gonio .gon { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; opacity: var(--scope-line); vector-effect: non-scaling-stroke; }   /* 散点（v0.10.41）：每个点 2px 的圆头 */
.strip-gonio .gon-axis { stroke: var(--muted); stroke-width: 1; opacity: var(--scope-grid); vector-effect: non-scaling-stroke; }
.strip-comp { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 10px; overflow: hidden; }   /* 压缩页波形图（v0.10.21），同一套示波器规矩 */
.strip-comp .cin { fill: var(--ink); opacity: var(--scope-data); }
.strip-comp .cout { fill: none; stroke: var(--ink); stroke-width: 1; opacity: var(--scope-line); vector-effect: non-scaling-stroke; }
.strip-comp .cgr { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: calc(var(--scope-line) * 1.6); vector-effect: non-scaling-stroke; }
.strip-comp .cthr { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; opacity: calc(var(--scope-grid) * 3); vector-effect: non-scaling-stroke; }
.strip > :not(.strip-spec):not(.strip-meter):not(.spec-ticks):not(.strip-gonio):not(.strip-comp) { position: relative; }
.strip-gonio .gon-lab { fill: var(--muted); font-size: .1px; opacity: .5; }
.corr-val.neg { color: var(--danger, #c0392b); font-weight: 600; }
/* 压缩页：压了多少 dB（0–20 dB 满格） */
.gr-row .gr-bar { display: block; height: 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); overflow: hidden; }
.gr-row .gr-bar > i { display: block; height: 100%; width: 0; background: var(--accent); }
/* 效果全关（A/B，v0.10.18）：钮醒目、顶上一条说明、插件格划掉的样子 */
.mix-ab.ab-off { background: var(--danger); border-color: var(--danger); color: #fff; }
.mix-ab-note { margin: 6px 10px 0; }
.studio.bypassed .fx-chip, .studio.bypassed .fx-inline { opacity: .5; }   /* 歌手管理：在几张纸上；一张都不在 = 能删（2026-10-08 深夜） */
/* 分页：页框 + 页码 */
.staff-svg rect.page { fill: #fff; stroke: var(--line); stroke-width: 1; }
.staff-svg .page-no { fill: var(--muted); }

/* ═══ 歌库（v0.6.0，2026-10-08 Claude Fable 5.1；屏 = src/gallery-host.ts，卡片样式在 vendor/internal-css/gallery.css）═══ */
.gallery-full { position: fixed; inset: 0; z-index: var(--z-overlay); display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.gallery-chrome, .gallery-asidebar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.gallery-chrome { padding-top: max(var(--safe-top), 6px); }
.gallery-chrome-title { font-weight: 600; letter-spacing: .02em; }
.gallery-chrome .spacer, .gallery-asidebar .spacer { flex: 1; }
.gallery-aside-tabs { display: inline-flex; gap: 4px; }
.gallery-aside-tab.is-on { background: var(--accent-soft); border-color: #b8cde8; color: var(--accent); }
.gallery-mount { flex: 1 1 auto; overflow: auto; padding: 0 0 calc(12px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; }
.gallery-mount .sheet-action { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink); font: inherit; cursor: pointer; }
.btn.tb-lib { flex: none; }
.cloud-st { display: inline-flex; align-items: center; color: var(--muted); margin-left: 2px; }
.cloud-st:empty { display: none; }
.ico.ico-sm { width: 14px; height: 14px; }

/* ── busy 遮罩 / 同步闸 / 交互 sheet（src/ui/sheets.ts）── */
.busy-overlay { position: fixed; inset: 0; z-index: var(--z-busy); display: flex; align-items: center; justify-content: center; background: rgba(40, 38, 34, .28); cursor: default; }
.busy-card { width: auto; min-width: 200px; text-align: center; }
.busy-spinner { width: 22px; height: 22px; margin: 2px auto 10px; border: 2px solid rgba(0, 0, 0, .15); border-top-color: var(--accent); border-radius: 50%; animation: ms-spin .9s linear infinite; }
@keyframes ms-spin { to { transform: rotate(360deg); } }
.offer.gate-sheet { z-index: var(--z-gate); }
.gate-actions { flex-wrap: wrap; }
.gate-note { margin: 10px 0 0; }
.sheet-choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sheet-choices .btn { justify-content: flex-start; height: auto; min-height: 36px; padding: 8px 12px; white-space: normal; text-align: left; }
.btn.danger { border-color: #e5a29b; color: var(--danger); }
.sheet-input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 8px; color: var(--ink); }
.cover-row { align-items: center; }
.cover-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.cover-none { color: var(--muted); font-size: 12px; }

/* ═══ 歌库封面（唱片封面式；排版规则在 src/ui/song-cover.ts；user 2026-10-08「我们这个应该是唱片封面，是矩形的…都是 HTML 排版进 gallery 的两个槽」）═══
   两层：底下 = 封面图（有）或一块按歌名选的哑色（.ms-cover-bg，占位槽）；上面 = 歌名 / 日期 / 大小（.ms-cover，覆盖槽），有没有图都一样印。 */
.gallery-tile-thumb.placeholder:has(.ms-cover-bg) { padding: 0; }
.ms-cover-bg { display: block; width: 100%; height: 100%; background: var(--cover-bg, #d9c7a3); }
.ms-cover-bg.hue-0 { --cover-bg: #d9c7a3; } .ms-cover-bg.hue-1 { --cover-bg: #b9c9b0; } .ms-cover-bg.hue-2 { --cover-bg: #c9b7c9; } .ms-cover-bg.hue-3 { --cover-bg: #a9bfd0; }
.ms-cover-bg.hue-4 { --cover-bg: #e0b8a8; } .ms-cover-bg.hue-5 { --cover-bg: #c5c5b4; } .ms-cover-bg.hue-6 { --cover-bg: #d8c2b0; } .ms-cover-bg.hue-7 { --cover-bg: #b0c4c4; }
.ms-cover { --cover-ink: #2a2a2a; --cover-ink-soft: #5a5750; --cover-paper: #fffdf8; position: absolute; inset: 0; box-sizing: border-box; padding: 7% 7% 20px; display: flex; flex-direction: column; container-type: inline-size; color: var(--cover-ink); }
.ms-cover.v { align-items: flex-end; justify-content: flex-start; padding-top: 15%; }      /* 汉字：竖排，右上起（顶上让开图库包右上角的同步徽章） */
.ms-cover.h { align-items: flex-start; justify-content: flex-end; }      /* 拉丁：横排，大字在左下（专辑封面惯例） */
.ms-cover-title { display: block; max-width: 100%; max-height: 100%; overflow: hidden; font-weight: 700; letter-spacing: .02em; line-height: 1.12; }
.ms-cover.v .ms-cover-title { writing-mode: vertical-rl; text-orientation: mixed; height: 100%; letter-spacing: .08em; }
.ms-cover.v .tcy { text-combine-upright: all; -webkit-text-combine: horizontal; letter-spacing: 0; }
.ms-cover.h .ms-cover-title { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.ms-cover.coded .ms-cover-title { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 400; letter-spacing: .04em; color: var(--cover-ink-soft); font-size: clamp(13px, 13cqw, 22px); }
.ms-cover.v.sz-xl .ms-cover-title { font-size: clamp(16px, 20cqw, 36px); }
.ms-cover.v.sz-l  .ms-cover-title { font-size: clamp(14px, 15cqw, 27px); }
.ms-cover.v.sz-m  .ms-cover-title { font-size: clamp(13px, 12cqw, 21px); }
.ms-cover.v.sz-s  .ms-cover-title { font-size: clamp(12px, 10cqw, 17px); }
.ms-cover.h.sz-xl .ms-cover-title { font-size: clamp(16px, 18cqw, 32px); }
.ms-cover.h.sz-l  .ms-cover-title { font-size: clamp(14px, 13cqw, 24px); }
.ms-cover.h.sz-m  .ms-cover-title { font-size: clamp(12px, 11cqw, 19px); }
.ms-cover.h.sz-s  .ms-cover-title { font-size: clamp(11px, 9.5cqw, 16px); }
.ms-cover-artist { display: block; margin-top: .35em; font-size: clamp(10px, 6cqw, 13px); color: var(--cover-ink-soft); }
.ms-cover.v .ms-cover-artist { writing-mode: vertical-rl; margin: 0 .4em 0 0; }
/* 底栏：左 yyyymmdd、右 大小（学 WXHW 书架：很窄的一条贴底、半透明垫底、不描边） */
.ms-cover-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 17px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px; font-size: 9px; line-height: 17px; letter-spacing: .02em; color: var(--cover-ink-soft); background: color-mix(in srgb, var(--cover-paper) 72%, transparent); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 底下是封面图：歌名垫一块半透明的纸（学 WXHW 2026-10-01「标题的字下面还是垫一个半透明吧」），不描边 */
img.gallery-tile-thumb + .gallery-tile-overlay .ms-cover-title { background: color-mix(in srgb, var(--cover-paper) 78%, transparent); padding: .18em; border-radius: .22em; box-sizing: border-box; }
img.gallery-tile-thumb + .gallery-tile-overlay .ms-cover.v .ms-cover-title { height: fit-content; }
img.gallery-tile-thumb + .gallery-tile-overlay .ms-cover.h .ms-cover-title { width: fit-content; }
img.gallery-tile-thumb + .gallery-tile-overlay .ms-cover-artist { background: color-mix(in srgb, var(--cover-paper) 78%, transparent); padding: .1em .3em; border-radius: .2em; }

/* ═══ 顶栏重理（2026-10-08 Claude Fable 5.1；user「wxhw 就是左边一个库的图标，然后是文件名非按钮就是一个能按的字…最右边是加密，smart save 和三条杠」）═══ */
.doc-name { border: 0; background: transparent; padding: 0 6px; height: 34px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; letter-spacing: .02em; cursor: pointer; color: var(--ink); text-align: left; }
.doc-name:hover, .doc-name:focus-visible { color: var(--accent); outline: none; }
.btn.tb-lock { color: var(--muted); min-width: 30px; padding: 0 6px; }
.save-btn.s-clean { color: var(--info); }
.save-btn.s-unsynced { color: var(--accent); }
.save-btn.s-local, .save-btn.s-offline, .save-btn.s-saving, .save-btn.s-fileClean, .save-btn.s-fresh { color: var(--muted); }
.save-btn.flash { color: #2f9e44; }
/* 走带胶囊：挂在顶栏下面、不随谱滚（照 WeebPaint 浮动 toolbar）；纸上面留 52px 边距，滚下去被遮无所谓 */
#stage { position: relative; }
.transport { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); white-space: nowrap; max-width: calc(100% - 24px); }
/* 键盘 tab：pad 收起后屏幕最下面一粒，点了弹出来 */
.pad-tab { position: absolute; bottom: max(8px, var(--safe-bottom)); left: 50%; transform: translateX(-50%); z-index: 40; border-radius: 999px; padding: 0 14px; gap: 6px; background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.diag-log { max-height: 40vh; overflow: auto; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }

/* ═══ 改的手感（2026-10-08 Claude Fable 5.1）：长按选区的两个棒棒糖把手 + 选区条 ═══ */
.sel-handle { position: absolute; z-index: 6; width: 28px; height: 36px; margin-left: -14px; touch-action: none; cursor: grab; }
.sel-handle::before { content: ""; position: absolute; left: 13px; top: 0; width: 2px; height: 16px; background: var(--accent); }
.sel-handle::after { content: ""; position: absolute; left: 5px; top: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.sel-handle.start::before { left: 13px; }
.sel-bar { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); white-space: nowrap; max-width: calc(100% - 16px); overflow-x: auto; }
.sel-bar .btn { height: 30px; min-width: 30px; padding: 0 8px; font-size: 13px; }
.sel-bar .sel-n { color: var(--muted); font-size: 12px; padding: 0 4px; }
/* 选区条两排（v0.10.1：第二排 = 微调）：胶囊变成圆角卡片 */
.sel-bar.has-tweak { flex-direction: column; align-items: stretch; border-radius: 14px; gap: 4px; }
.sel-bar .sel-row { display: flex; align-items: center; gap: 4px; }
.sel-bar .sel-tweak { justify-content: center; }
.sel-bar .sel-tw { min-width: 36px; font-variant-numeric: tabular-nums; }
/* 修（2026-10-08）：演奏法开关（都有 = 亮，有的有 = 虚线半亮）+ 力度字（Bravura 字形） */
.sel-bar .smufl { font-family: Bravura; font-size: 20px; line-height: 1; display: inline-block; transform: translateY(2px); }
.sel-bar .fix-art { gap: 4px; }
.sel-bar .fix-art.is-some { border-style: dashed; border-color: #b8cde8; color: var(--accent); }
.sel-bar .fix-dyn { padding: 0 6px; }
.sel-bar .fix-dyn .smufl { font-size: 26px; transform: translateY(6px); }
.sel-bar .sel-gap { flex: none; width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* 句（换气记号）、隐藏的纸 */
.staff-svg .phrase-mark { fill: var(--muted); }
.staff-svg .breath-label { fill: currentColor; }   /* 出声的换气：逗号后面的「吸」/「深吸」（2026-10-10） */
.staff-svg .part-stub.hidden-note { fill: var(--muted); }   /* 灰字（user「红字：应该用灰字」） */

/* 叠音（polyphony，2026-10-08）：单声乐器的声部里下面的音灰掉 */
.staff-svg .note.chord-mute { fill: var(--muted); stroke: var(--muted); }
.staff-svg .art-mute { fill: var(--muted); opacity: .5; }   /* 台上那位不认的记号：照画、画灰（出声不受影响；写的时候会说一声） */
/* pad：叠音键（Shift 逻辑同 /2）；单声乐器的声部叠不了 = 灰 */
.pad-tools .btn.stack.off { opacity: .3; pointer-events: none; }
@container (max-width: 520px) { .pad-tools.writes .btn.stack { display: none; } }
/* 横屏（键盘在右边一栏，窄）：写字那一排不藏键、折成两行（v0.10.34；user「横屏的时候小键盘的叠不见了。横屏的时候能显示全部widget吗」） */
@media (min-aspect-ratio: 1/1) {
  .pad-tools.writes { flex-wrap: wrap; }
  @container (max-width: 520px) {
    .pad-tools.writes .btn.stack, .pad-tools.writes .btn.accshift { display: flex; }
    .pad-tools.writes .btn, .pad-tools.writes .btn[data-caret] { flex: 1 1 calc(20% - 4px); }
  }
}
@container (max-width: 440px) { .pad-tools.writes .btn small { font-size: 9px; white-space: nowrap; letter-spacing: -0.3px; } }   /* 窄 pad 多了呼吸键（9 颗 ≈ 32 px）：小字不折行（「小节线」原来折成两行） */
/* pad 符号层（像 iOS 键盘的 .?123 翻过去那一页；user 2026-10-08「软键盘里面后面有一个符号模式」「row col 超了可以拖动滚」） */
.pad-grid.symbols { overflow-y: auto; touch-action: pan-y; align-content: start; grid-auto-rows: var(--key-h); -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  height: calc(var(--rows, 4) * var(--key-h) + (var(--rows, 4) - 1) * var(--kgv)); }   /* 高 = 音键那几排（几何不变），多了的格子在里面滚 */
.pad-grid.symbols .pad-key { touch-action: pan-y; overflow: hidden; }   /* 放大的演奏法字形别撑出滚动量 */
.pad-key.sym .big { font-size: 20px; font-weight: 600; line-height: 1; }
.pad-key.sym .smufl { font-family: "Bravura"; font-size: 26px; line-height: 1; display: inline-block; height: 22px; }
.pad-key.sym small { font-size: 10px; color: var(--muted); }
.pad-key.sym .glyphs { display: inline-flex; flex-direction: row; align-items: flex-end; gap: 1px; white-space: nowrap; height: 22px; }   /* 速度格：♩= 一行（pad-key 是竖排 flex，两个 span 会叠成两行） */
.pad-key.sym .glyphs .smufl { font-size: 22px; height: 22px; position: relative; top: 1px; }
.pad-key.sym .glyphs .big { font-size: 19px; padding-bottom: 2px; }
.pad-key.sym.art .smufl { font-size: 34px; }   /* 跳音 / 重音 / 保持 / 呼吸：Bravura 里本来就小 */

/* 撤销 / 重做在顶栏中间；窄屏（手机）把录音室钮收进设置（顶栏放不下 10 个钮） */
/* 走带「循环」/「接缝」（2026-10-08 深夜 Opus 5.5）：手机上顶栏挤——循环钮收窄、间距收紧、走带不硬居中（居中 = 两边各分一半，右边一组被压到和撤销 / 重做叠在一起）；「接缝」不放（循环放着每一圈都过接缝，钮只是直接跳过去听） */
@media (max-width: 480px) { #transportMore { padding: 0 6px; min-width: 0; } .bar { gap: 4px; padding-left: 6px; padding-right: 6px; grid-template-columns: minmax(0, 1fr) auto auto; } .bar .tb-left { overflow: hidden; } .bar .tb-mid { gap: 4px; } }

/* 声部的设置分两处（2026-10-08 by Claude Opus 5.5；user「乐器设置和轨设置视觉上分开来…是否是弹窗的模态。还是别的更好？你判断一下」）：
   轨 = 歌手牌旁边的非模态小卡（没有遮罩、谱照常看得见）；乐器 = 全屏一页（占 #stage 的 main，pad 留在旁边只弹不写，改了马上能试） */
.track-card { position: fixed; z-index: var(--z-sheet); width: min(300px, calc(100vw - 16px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .16); padding: 8px; }
.tc-inst { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid #b8cde8; background: var(--accent-soft); border-radius: 9px; padding: 8px 10px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.tc-inst .tc-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tc-inst b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-inst small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-inst .tc-go { flex: none; font-size: 13px; font-weight: 600; color: var(--accent); }
.tc-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 10px 4px 8px; }
.tc-k { font-size: 12px; color: var(--muted); }
.tc-v { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-v .btn { height: 32px; padding: 0 12px; }
.tc-foot { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding: 8px 4px 2px; }
.tc-foot .btn { height: 32px; padding: 0 10px; font-size: 13px; }
/* 轨小卡的两页（2026-10-08 Opus 5.5）：「交给…」换绑 / 「＋ 加歌手…」——只改这张纸 */
.tc-sub .btn { height: 32px; padding: 0 10px; font-size: 13px; border-color: transparent; background: transparent; }
.tc-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px; }
.tc-list .btn { height: 34px; padding: 0 12px; font-size: 13px; }
.tc-list .btn small { font-size: 11px; color: var(--muted); margin-left: 2px; }
.tc-hint { font-size: 12px; color: var(--muted); padding: 2px 6px 6px; max-width: 280px; line-height: 1.45; }
.inst-page { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.inst-page[hidden] { display: none; }
.ip-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.ip-title { font-weight: 600; white-space: nowrap; }
.ip-part { min-width: 0; max-width: 50%; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 14px; color: var(--ink); }
.ip-part-one { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-gap { flex: 1; }
@media (max-width: 560px) { .ip-pad span { display: none; } }
.ip-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px; }
.ip-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; align-items: start; max-width: 1100px; margin: 0 auto; }
.ip-card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; }
.ip-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.ip-card h3 small { font-size: 12px; font-weight: 400; color: var(--muted); }
.ip-how { grid-column: 1 / -1; }
.ip-cands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ip-sub { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.ip-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-note { font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 8px; }
.ip-picker { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 9px; }
.ip-picker .ip-sub { margin-top: 0; }
.ip-picker .ip-btns { margin-top: 8px; }
.ip-grid { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 14px 12px; align-items: start; }
.ip-k { font-size: 13px; color: var(--muted); padding-top: 9px; }
.ip-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ip-val { min-width: 4.2em; font-size: 15px; }
.ip-v .ip-note { margin-top: 4px; }
/* 空白处的小菜单（长按 / 右键；2026-10-08 by Claude Fable 5.1）：和轨的小卡同一种非模态卡，竖着一列 */
.ctx-menu { width: auto; min-width: 150px; max-width: 220px; display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.ctx-menu .ctx-item { justify-content: flex-start; height: 36px; padding: 0 12px; font-size: 14px; border-color: transparent; background: transparent; }
.ctx-menu .ctx-item:hover, .ctx-menu .ctx-item:active { background: var(--accent-soft); }
.ctx-menu .ctx-item:disabled { opacity: .4; }
.ctx-menu .ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }
/* 选区菜单（2026-10-08 by Claude Opus 5.5）：一行一组小钮（移调 / 时值）+ 一列项 */
.sel-menu { max-width: 320px; }
.ctx-menu .ctx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 6px; }
.ctx-menu .ctx-k { font-size: 12px; color: var(--muted); width: 2.6em; flex: none; }
.ctx-menu .ctx-chip { height: 32px; padding: 0 8px; font-size: 13px; }
.ctx-menu .ctx-chip .smufl { font-family: "Bravura"; font-size: 20px; line-height: 1; position: relative; top: 4px; }
/* Bravura 的上下留白很大：字形 span（inline、position: relative）的点击区域会伸出按钮很远、还压在后面的按钮上面——小菜单里点「渐到」点中了上面一排的 mp
   （2026-10-08 Opus 5.5，E2E 抓到）。字形一律不接点击，点到哪个按钮就是哪个按钮 */
span.smufl { pointer-events: none; }
.ctx-menu .ctx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.ctx-menu .ctx-item.danger { color: var(--danger); }
/* 力度记号 / 渐强渐弱的小菜单（2026-10-08 Opus 5.5）：底下一行灰字说「长按拖 = 挪」；拿起来拖着的时候指针是抓手 */
.ctx-menu .ctx-hint { font-size: 11px; color: var(--muted); padding: 2px 12px 4px; }
.score.lifting { cursor: grabbing; }
/* 正拖着的力度记号 / 渐强渐弱 / 字：强调色（2026-10-08 user「然后拖动能不能给一点视觉反馈」） */
.staff-svg text.hot { fill: var(--accent); }
/* 台上这位唱不出来的歌词：画灰（纪律「做不到的一律画灰 + 明说」；说明在歌手牌小卡 / 歌词框上面的小字） */
.staff-svg text.lyric.lyric-mute { fill: var(--muted); opacity: .55; }
.lyric-hint { position: absolute; z-index: 6; width: max-content; max-width: 280px; font-size: 12px; line-height: 1.35; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; pointer-events: none; }
.lyric-reading { max-width: 360px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.lyric-reading b { color: var(--ink); background: var(--accent-soft); border-radius: 3px; padding: 0 2px; }
.tc-warn { font-size: 12px; color: var(--muted); padding: 6px 4px 0; line-height: 1.45; max-width: 300px; }
.staff-svg path.hairpin.hot { stroke: var(--accent); stroke-width: 1.6; }
/* pad「⋯ → 布局…」= 对话框（2026-10-08 Opus 5.5；user「…比如变成加减号」「要不键盘layout还是一个模态对话框，不会破坏键盘的尺寸」）：
   行 / 列 = 加减号步进，二选一 = 分段钮；卡片靠上，键盘在下面看得见、点了马上变 */
.offer.pad-layout { align-items: flex-start; padding-top: 64px; }
.pad-layout-card { width: min(380px, 100%); }
.lay-body { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.lay-line { display: flex; align-items: center; gap: 10px; }
.lay-line > .lay-k { width: 2.6em; flex: none; font-size: 13px; color: var(--muted); }
.lay-grp { display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.lay-grp .btn.cand { border: 0; border-radius: 0; box-shadow: none; min-width: 56px; height: 100%; padding: 0 12px; background: transparent; }
.lay-grp > * + * { border-left: 1px solid var(--line) !important; }
.lay-grp .btn.cand.is-on { background: var(--accent-soft); color: var(--accent); }
.lay-grp .btn.cand:disabled { opacity: .3; }
.lay-v { display: flex; align-items: center; justify-content: center; min-width: 40px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lay-step { font-size: 22px !important; line-height: 1; min-width: 48px !important; }
/* 顶栏三条杠的菜单（2026-10-08 Opus 5.5；同 WeebPaint ☰「文件」页：这首歌的低频事务 + 设置） */
.ctx-menu.main-menu { min-width: 220px; max-width: 300px; }
.ctx-menu .ctx-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px 8px; font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-menu .ctx-head b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-menu .ctx-head span { font-size: 11px; color: var(--muted); line-height: 1.4; }
.ctx-menu.main-menu .ctx-item { gap: 10px; }
.ctx-menu.main-menu .ctx-item .ico { width: 18px; height: 18px; flex: none; }
/* 修 / 符号层：现在这位不认的记号——照样能写，钮上标「不认」 */
.ign-tag { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-size: 10px; line-height: 15px; color: var(--muted); border: 1px dashed var(--line); vertical-align: middle; }
.pad-key.sym.ignored { background: #f7f5f0; }
.pad-key.sym.ignored .smufl { opacity: .45; }
.slur-ico { width: 22px; height: 12px; display: inline-block; vertical-align: middle; }
.pad-key.sym .slur-ico { width: 30px; height: 16px; margin-bottom: 4px; }
.pad-key.sym.ignored .slur-ico { opacity: .45; }
.pad-key.sym.is-on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }   /* 符号层：现在生效的力度（状态） */
.pad-key.sym.once { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }   /* 渐到：点一下 = 下一个（同「符」的 once） */
.pad-key.sym.lock { background: var(--accent); color: #fff; }   /* 渐到：锁住 */
.pad-key.sym.lock small { color: rgba(255, 255, 255, .85); }
.sym-tab .ramp-tag { margin-left: 3px; font-size: 9px; padding: 0 3px; border-radius: 3px; border: 1px solid var(--accent); color: var(--accent); vertical-align: 1px; }
.sym-tab .ramp-tag.lock { background: var(--accent); color: #fff; }
.ctx-menu .ctx-ver { font-size: 11px; color: var(--muted); padding: 2px 12px 0; font-variant-numeric: tabular-nums; }   /* 三条杠菜单：设置上面的版本号 */
.ctx-menu .ctx-dyn { flex-wrap: nowrap; }
.ctx-menu .ctx-dyn .ctx-chip { min-width: 34px; padding: 0 4px; }
.ctx-menu .ctx-dyn .ctx-chip .smufl { font-family: "Bravura"; font-size: 24px; line-height: 1; position: relative; top: 5px; }
/* 风格记号（拍子轻重；2026-10-08 深夜 Opus 5.5）：谱上一行斜体字；不认识的预设 = 灰；小菜单宽一点、说明可以折行 */
.staff-svg text.groove-mark { font-style: italic; font-weight: 600; font-family: system-ui, sans-serif; }
.staff-svg text.groove-mark.groove-unknown { fill: var(--muted); }
.staff-svg text.groove-mark.sel { fill: var(--accent); }
/* 谱内反复 / 跳转（2026-10-09）：房子括号、Segno / Coda、D.C. / Fine…；不起作用的画灰（.art-mute，通用规则） */
.staff-svg path.volta { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.staff-svg path.volta.art-mute { stroke: var(--muted); opacity: .5; }
.staff-svg text.nav-mark { font-family: system-ui, sans-serif; font-weight: 600; }
.staff-svg text.nav-word { font-style: italic; }
.staff-svg .nav-mark.sel, .staff-svg .nav-sign.sel, .staff-svg .repeat-bar.sel, .staff-svg .nav-sign.hot { fill: var(--accent); }
.ctx-menu.groove-menu { max-width: min(360px, calc(100vw - 16px)); }
/* 整段 / 整首移调转调（v0.9.33） */
.ctx-menu.transpose-menu { max-width: min(380px, calc(100vw - 16px)); }
.ctx-menu.transpose-menu .ctx-hint { white-space: normal; }
.ctx-menu.transpose-menu .ctx-what { color: var(--ink); padding-top: 6px; }
.ctx-menu.groove-menu .ctx-hint { white-space: normal; }
.ctx-menu.groove-menu .ctx-what { color: var(--ink); padding-top: 6px; }
.pad-key.sym .big.it { font-style: italic; font-size: 16px; }
.ctx-menu .ctx-chip.is-on { background: var(--accent-soft); border-color: var(--accent); }
/* 乐器页「记号怎么演」：这位 by value 的解读表（只读） */
.dyn-tab { border-collapse: collapse; margin-top: 4px; font-size: 12px; color: var(--ink); }   /* 力度换算表（乐器页「力度」那一行，v0.9.23） */
.dyn-tab th, .dyn-tab td { padding: 1px 6px; text-align: center; white-space: nowrap; }
.dyn-tab th:first-child { text-align: left; font-weight: 500; color: var(--muted); padding-left: 0; }
.dyn-tab th .smufl { font-size: 18px; line-height: 1; }
.ip-marks { margin-top: 10px; font-size: 13px; }
.ip-marks summary { cursor: pointer; color: var(--muted); }
.ip-marks table { border-collapse: collapse; margin-top: 6px; }
.ip-marks th { text-align: left; font-weight: 500; padding: 3px 12px 3px 0; white-space: nowrap; color: var(--ink); vertical-align: top; }
.ip-marks td { padding: 3px 0; color: var(--ink); }
.ip-marks tr.ign th, .ip-marks tr.ign td { color: var(--muted); }
.staff-svg .dyn-implied { fill: var(--muted); font-style: italic; font-weight: 600; }   /* 渐强渐弱没写终点：走一档推定的终点（灰字披露） */

/* 走带（2026-10-10 Opus 5.5）：播放线 / 正在响的音 / 起点 / 听模式 */
.playhead { position: absolute; width: 2px; background: var(--play); opacity: .75; pointer-events: none; border-radius: 1px; }
/* 播放时的小节底色（v0.10.12）：正在放的那一小节，盖住这一行所有声部；很淡，垫在音符高亮下面；长跳转到了闪一下 */
.play-bar { position: absolute; background: var(--ink); opacity: .06; border-radius: 4px; pointer-events: none; }   /* 很淡的灰（user「小节背景可以用很淡的灰色吗」）：--ink 跟着明暗主题走 */
.play-bar.flash { animation: play-bar-flash .6s ease-out; }
@keyframes play-bar-flash { 0% { opacity: .22; } 100% { opacity: .06; } }
.play-hl { position: absolute; background: var(--hl, var(--play)); opacity: .32; border-radius: 50%; pointer-events: none; }   /* 正在响的音：这位歌手的类别色（v0.9.31） */
/* 歌手的类别色（tab20，src/ui/part-colors.ts；user「乐手名和颜色同意」）：每行左边细色条 + 名字前小色点；不印 */
.staff-svg .cat-0 { fill: #1f77b4; } .staff-svg .cat-1 { fill: #aec7e8; } .staff-svg .cat-2 { fill: #ff7f0e; } .staff-svg .cat-3 { fill: #ffbb78; } .staff-svg .cat-4 { fill: #2ca02c; } .staff-svg .cat-5 { fill: #98df8a; } .staff-svg .cat-6 { fill: #d62728; } .staff-svg .cat-7 { fill: #ff9896; } .staff-svg .cat-8 { fill: #9467bd; } .staff-svg .cat-9 { fill: #c5b0d5; } .staff-svg .cat-10 { fill: #8c564b; } .staff-svg .cat-11 { fill: #c49c94; } .staff-svg .cat-12 { fill: #e377c2; } .staff-svg .cat-13 { fill: #f7b6d2; } .staff-svg .cat-14 { fill: #7f7f7f; } .staff-svg .cat-15 { fill: #c7c7c7; } .staff-svg .cat-16 { fill: #bcbd22; } .staff-svg .cat-17 { fill: #dbdb8d; } .staff-svg .cat-18 { fill: #17becf; } .staff-svg .cat-19 { fill: #9edae5; }
.staff-svg .cat-bar, .staff-svg .cat-dot { stroke: none; }
.strip[data-color] { border-top: 3px solid var(--cat); }
.start-mark { position: absolute; width: 0; border-left: 2px dashed var(--start); pointer-events: none; }
.start-mark::before { content: ""; position: absolute; left: -2px; top: -2px; width: 10px; height: 8px; background: var(--start); clip-path: polygon(0 0, 100% 50%, 0 100%); }
body.listen-mode .staff-svg .caret { display: none; }   /* 听：不写谱 = 不画光标 */
/* 模式（2026-10-10）：顶栏的分段钮；「听」亮着用播放色 */
/* 模式不再把别的层调淡（v0.10.38，见下） */
/* （v0.10.38 拿掉：「词」里记号变淡、「符」里歌词变淡——user「词模式下符号没必要灰色」；音 / 符现在是同一个模式，歌词也不淡） */
/* 歌库「新建」小菜单（v0.9.41） */
.gallery-full .gallery-new-menu { z-index: var(--z-menu); }
.gallery-new-menu .ctx-item { display: flex; align-items: center; gap: 8px; }
/* 小节号（v0.9.42） */
.staff-svg .bar-no { fill: var(--ink-soft); }
/* 补齐的淡色休止（v0.10.6）：这张纸别的声部更长，这位后面空着的那几个小节；只画不存、点它 = 点那个小节写 */
/* 「弹」的鬼音符（v0.10.6）：盖在谱上的一层，不接点击、不影响排版 */
.ghost-preview { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; opacity: .5; }
.ghost-preview text { fill: var(--accent); }
.ghost-preview line { stroke: var(--accent); }
/* 琶音（v0.9.45）：和弦左边的波浪线 */
.staff-svg path.arpeggio { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.staff-svg path.arpeggio.art-mute { stroke: var(--ghost); }
/* 左上角三个下拉（v0.10.2）：模式 / 看哪一段 / 看哪位歌手 */
/* 挂签（v0.10.3）：模式 + 看哪一段 + 看哪位歌手，从顶栏底边往下挂、浮在谱上（user「顶栏下面创建一个类似tab的往下的东西，可以遮挡屏幕」） */
.view-tab { position: absolute; top: 0; left: 8px; z-index: 40; display: flex; align-items: center; gap: 4px; padding: 4px 6px 5px; max-width: calc(100% - 16px); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: color-mix(in srgb, var(--panel) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); white-space: nowrap; }
.view-tab[hidden] { display: none; }
.view-tab .btn { height: 28px; font-size: 13px; }
.view-tab .vt-sel { height: 28px; max-width: 9em; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; padding: 0 4px; text-overflow: ellipsis; }
.mode-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.mode-seg .btn { border: 0; border-radius: 0; min-width: 30px; padding: 0 8px; background: transparent; }
.mode-seg .btn + .btn { border-left: 1px solid var(--line); }
.mode-seg .btn.is-on { background: var(--accent); color: #fff; }
.mode-seg [data-mode="listen"].is-on { background: var(--play); }
@media (max-width: 720px) { .sel-bar { top: 44px; } }   /* 窄屏：选区条让到挂签下面（居中的选区条会撞上左边的挂签） */
@media (max-width: 480px) { .view-tab .vt-sel { max-width: 5.5em; } .mode-seg .btn { min-width: 0; padding: 0 6px; } }

/* 底座边上的小条（v0.10.20；user「音符词听那个小面版变成靠着键盘…竖屏的时候就是左下角，拉着键盘的左上角 / 横屏的时候变成竖排」「尤其是模式条的位置…不然鼠标上下跑」）：
   用 #stage 的 grid 区域定位（绝对定位的子元素按它的 grid-area 当包含块）——底座在哪它就挂在哪，不用 JS 量。 */
.dock-tab { position: absolute; z-index: 45; display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.dock-tab[hidden] { display: none; }
.dock-tab .btn { height: 32px; min-width: 32px; font-size: 13px; -webkit-touch-callout: none; user-select: none; }
.dock-tab .dock-tr { display: flex; gap: 4px; }
.dock-tab .pad-tab { position: static; transform: none; border-radius: 7px; padding: 0 8px; box-shadow: none; background: var(--panel); bottom: auto; left: auto; }
.dock-tab .pad-tab[hidden] { display: none; }
/* 横屏：键盘在右边 = 挂在它左边、竖着排 */
#stage:not([data-dock="none"]) > .dock-tab { grid-area: pad; right: 100%; top: 8px; flex-direction: column; border-right: 0; border-radius: 10px 0 0 10px; }
#stage[data-dock="none"] > .dock-tab { grid-area: main; right: 0; top: 8px; flex-direction: column; border-right: 0; border-radius: 10px 0 0 10px; }
#stage > .dock-tab .mode-seg, #stage > .dock-tab .dock-tr { flex-direction: column; }
#stage > .dock-tab .mode-seg .btn + .btn { border-left: 0; border-top: 1px solid var(--line); }
#stage > .dock-tab .pad-tab span { display: none; }   /* 横屏竖着排：「键盘」只留图标（字会折成两行；悬停有说明） */
/* 竖屏：键盘贴底 = 挂在它左上角、往上、横着排；收起 = 贴屏幕左下 */
@media (max-aspect-ratio: 1/1) {
  #stage:not([data-dock="none"]) > .dock-tab { grid-area: pad; right: auto; left: 8px; top: auto; bottom: 100%; flex-direction: row; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
  #stage[data-dock="none"] > .dock-tab { grid-area: main; right: auto; left: 8px; top: auto; bottom: max(8px, var(--safe-bottom)); flex-direction: row; border: 1px solid var(--line); border-radius: 10px; }
  #stage > .dock-tab .mode-seg, #stage > .dock-tab .dock-tr { flex-direction: row; }
  #stage > .dock-tab .mode-seg .btn + .btn { border-top: 0; border-left: 1px solid var(--line); }
  #stage > .dock-tab .pad-tab span { display: inline; }
}
/* 小条不盖谱：横屏 = 谱的右边让出小条那一条（margin：谱宽按 clientWidth 算，padding 会算进去）；竖屏不用让——谱底下本来就留了 ¾ 屏能滚过去 */
#stage > .score { margin-right: 46px; }
@media (max-aspect-ratio: 1/1) { #stage > .score { margin-right: 0; } }
/* 选区条：在谱那一块里居中（原来按整个舞台居中，宽了会伸到键盘那边、压住小条）；横屏让出小条那 46px */
#stage > .sel-bar { grid-area: main; left: calc((100% - 46px) / 2); max-width: calc(100% - 16px - 46px); }
@media (max-aspect-ratio: 1/1) { #stage > .sel-bar { left: 50%; max-width: calc(100% - 16px); } }
/* |▶ 开着循环：右上角一个小「循环」 */
.play-btn { position: relative; }
.play-btn.looping::after { content: "循环"; position: absolute; top: -6px; right: -8px; padding: 0 3px; border-radius: 6px; font-size: 9px; line-height: 13px; background: var(--accent); color: #fff; pointer-events: none; }
/* 走带菜单里「提前翻」那一排（v0.10.21） */
.ctx-menu .ctx-row { display: flex; align-items: center; gap: 4px; padding: 2px 4px; }
.ctx-menu .ctx-lab { font-size: 12px; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.ctx-menu .ctx-seg { height: 26px; min-width: 0; padding: 0 6px; font-size: 12px; }
/* 混音轨旁通（v0.10.23）：插件格变淡、划掉 */
.strip.bus.bypassed .fx-chip, .strip.bus.bypassed .fx-inline { opacity: .45; text-decoration: line-through; }
/* 合租（v0.10.24）：歌手牌里「挂在谁上」的下拉 */
.track-card .tc-sel { height: 30px; max-width: 100%; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; padding: 0 6px; }
